# ! [ doc = "Peripheral access API for MK66F18 microcontrollers (generated using svd2rust v0.16.1)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.16.1/svd2rust/#peripheral-api" ] # ! [ deny ( missing_docs ) ] # ! [ deny ( warnings ) ] # ! [ allow ( non_camel_case_types ) ] # ! [ no_std ] extern crate cortex_m ; # [ cfg ( feature = "rt" ) ] extern crate cortex_m_rt ; extern crate bare_metal ; extern crate vcell ; use core :: ops :: Deref ; use core :: marker :: PhantomData ; # [ doc = r"Number available in the NVIC for configuring priority" ] pub const NVIC_PRIO_BITS : u8 = 4 ; # [ cfg ( feature = "rt" ) ] extern "C" { fn DMA0_DMA16 ( ) ; fn DMA1_DMA17 ( ) ; fn DMA2_DMA18 ( ) ; fn DMA3_DMA19 ( ) ; fn DMA4_DMA20 ( ) ; fn DMA5_DMA21 ( ) ; fn DMA6_DMA22 ( ) ; fn DMA7_DMA23 ( ) ; fn DMA8_DMA24 ( ) ; fn DMA9_DMA25 ( ) ; fn DMA10_DMA26 ( ) ; fn DMA11_DMA27 ( ) ; fn DMA12_DMA28 ( ) ; fn DMA13_DMA29 ( ) ; fn DMA14_DMA30 ( ) ; fn DMA15_DMA31 ( ) ; fn DMA_ERROR ( ) ; fn MCM ( ) ; fn FTFE ( ) ; fn READ_COLLISION ( ) ; fn LVD_LVW ( ) ; fn LLWU ( ) ; fn WDOG_EWM ( ) ; fn RNG ( ) ; fn I2C0 ( ) ; fn I2C1 ( ) ; fn SPI0 ( ) ; fn SPI1 ( ) ; fn I2S0_TX ( ) ; fn I2S0_RX ( ) ; fn UART0_RX_TX ( ) ; fn UART0_ERR ( ) ; fn UART1_RX_TX ( ) ; fn UART1_ERR ( ) ; fn UART2_RX_TX ( ) ; fn UART2_ERR ( ) ; fn UART3_RX_TX ( ) ; fn UART3_ERR ( ) ; fn ADC0 ( ) ; fn CMP0 ( ) ; fn CMP1 ( ) ; fn FTM0 ( ) ; fn FTM1 ( ) ; fn FTM2 ( ) ; fn CMT ( ) ; fn RTC ( ) ; fn RTC_SECONDS ( ) ; fn PIT0 ( ) ; fn PIT1 ( ) ; fn PIT2 ( ) ; fn PIT3 ( ) ; fn PDB0 ( ) ; fn USB0 ( ) ; fn USBDCD ( ) ; fn DAC0 ( ) ; fn LPTMR0 ( ) ; fn PORTA ( ) ; fn PORTB ( ) ; fn PORTC ( ) ; fn PORTD ( ) ; fn PORTE ( ) ; fn SPI2 ( ) ; fn UART4_RX_TX ( ) ; fn UART4_ERR ( ) ; fn CMP2 ( ) ; fn FTM3 ( ) ; fn DAC1 ( ) ; fn ADC1 ( ) ; fn I2C2 ( ) ; fn CAN0_ORED_MESSAGE_BUFFER ( ) ; fn CAN0_BUS_OFF ( ) ; fn CAN0_ERROR ( ) ; fn CAN0_TX_WARNING ( ) ; fn CAN0_RX_WARNING ( ) ; fn CAN0_WAKE_UP ( ) ; fn SDHC ( ) ; fn ENET_1588_TIMER ( ) ; fn ENET_TRANSMIT ( ) ; fn ENET_RECEIVE ( ) ; fn ENET_ERROR ( ) ; fn LPUART0 ( ) ; fn TSI0 ( ) ; fn TPM1 ( ) ; fn TPM2 ( ) ; fn USBHSDCD ( ) ; fn I2C3 ( ) ; fn CMP3 ( ) ; fn USBHS ( ) ; fn CAN1_ORED_MESSAGE_BUFFER ( ) ; fn CAN1_BUS_OFF ( ) ; fn CAN1_ERROR ( ) ; fn CAN1_TX_WARNING ( ) ; fn CAN1_RX_WARNING ( ) ; fn CAN1_WAKE_UP ( ) ; } # [ doc ( hidden ) ] pub union Vector { _handler : unsafe extern "C" fn ( ) , _reserved : u32 , } # [ cfg ( feature = "rt" ) ] # [ doc ( hidden ) ] # [ link_section = ".vector_table.interrupts" ] # [ no_mangle ] pub static __INTERRUPTS : [ Vector ; 100 ] = [ Vector { _handler : DMA0_DMA16 } , Vector { _handler : DMA1_DMA17 } , Vector { _handler : DMA2_DMA18 } , Vector { _handler : DMA3_DMA19 } , Vector { _handler : DMA4_DMA20 } , Vector { _handler : DMA5_DMA21 } , Vector { _handler : DMA6_DMA22 } , Vector { _handler : DMA7_DMA23 } , Vector { _handler : DMA8_DMA24 } , Vector { _handler : DMA9_DMA25 } , Vector { _handler : DMA10_DMA26 } , Vector { _handler : DMA11_DMA27 } , Vector { _handler : DMA12_DMA28 } , Vector { _handler : DMA13_DMA29 } , Vector { _handler : DMA14_DMA30 } , Vector { _handler : DMA15_DMA31 } , Vector { _handler : DMA_ERROR } , Vector { _handler : MCM } , Vector { _handler : FTFE } , Vector { _handler : READ_COLLISION } , Vector { _handler : LVD_LVW } , Vector { _handler : LLWU } , Vector { _handler : WDOG_EWM } , Vector { _handler : RNG } , Vector { _handler : I2C0 } , Vector { _handler : I2C1 } , Vector { _handler : SPI0 } , Vector { _handler : SPI1 } , Vector { _handler : I2S0_TX } , Vector { _handler : I2S0_RX } , Vector { _reserved : 0 } , Vector { _handler : UART0_RX_TX } , Vector { _handler : UART0_ERR } , Vector { _handler : UART1_RX_TX } , Vector { _handler : UART1_ERR } , Vector { _handler : UART2_RX_TX } , Vector { _handler : UART2_ERR } , Vector { _handler : UART3_RX_TX } , Vector { _handler : UART3_ERR } , Vector { _handler : ADC0 } , Vector { _handler : CMP0 } , Vector { _handler : CMP1 } , Vector { _handler : FTM0 } , Vector { _handler : FTM1 } , Vector { _handler : FTM2 } , Vector { _handler : CMT } , Vector { _handler : RTC } , Vector { _handler : RTC_SECONDS } , Vector { _handler : PIT0 } , Vector { _handler : PIT1 } , Vector { _handler : PIT2 } , Vector { _handler : PIT3 } , Vector { _handler : PDB0 } , Vector { _handler : USB0 } , Vector { _handler : USBDCD } , Vector { _reserved : 0 } , Vector { _handler : DAC0 } , Vector { _reserved : 0 } , Vector { _handler : LPTMR0 } , Vector { _handler : PORTA } , Vector { _handler : PORTB } , Vector { _handler : PORTC } , Vector { _handler : PORTD } , Vector { _handler : PORTE } , Vector { _reserved : 0 } , Vector { _handler : SPI2 } , Vector { _handler : UART4_RX_TX } , Vector { _handler : UART4_ERR } , Vector { _reserved : 0 } , Vector { _reserved : 0 } , Vector { _handler : CMP2 } , Vector { _handler : FTM3 } , Vector { _handler : DAC1 } , Vector { _handler : ADC1 } , Vector { _handler : I2C2 } , Vector { _handler : CAN0_ORED_MESSAGE_BUFFER } , Vector { _handler : CAN0_BUS_OFF } , Vector { _handler : CAN0_ERROR } , Vector { _handler : CAN0_TX_WARNING } , Vector { _handler : CAN0_RX_WARNING } , Vector { _handler : CAN0_WAKE_UP } , Vector { _handler : SDHC } , Vector { _handler : ENET_1588_TIMER } , Vector { _handler : ENET_TRANSMIT } , Vector { _handler : ENET_RECEIVE } , Vector { _handler : ENET_ERROR } , Vector { _handler : LPUART0 } , Vector { _handler : TSI0 } , Vector { _handler : TPM1 } , Vector { _handler : TPM2 } , Vector { _handler : USBHSDCD } , Vector { _handler : I2C3 } , Vector { _handler : CMP3 } , Vector { _handler : USBHS } , Vector { _handler : CAN1_ORED_MESSAGE_BUFFER } , Vector { _handler : CAN1_BUS_OFF } , Vector { _handler : CAN1_ERROR } , Vector { _handler : CAN1_TX_WARNING } , Vector { _handler : CAN1_RX_WARNING } , Vector { _handler : CAN1_WAKE_UP } , ] ; # [ doc = r"Enumeration of all the interrupts" ] # [ derive ( Copy , Clone , Debug ) ] pub enum Interrupt { # [ doc = "0 - DMA0_DMA16" ] DMA0_DMA16 , # [ doc = "1 - DMA1_DMA17" ] DMA1_DMA17 , # [ doc = "2 - DMA2_DMA18" ] DMA2_DMA18 , # [ doc = "3 - DMA3_DMA19" ] DMA3_DMA19 , # [ doc = "4 - DMA4_DMA20" ] DMA4_DMA20 , # [ doc = "5 - DMA5_DMA21" ] DMA5_DMA21 , # [ doc = "6 - DMA6_DMA22" ] DMA6_DMA22 , # [ doc = "7 - DMA7_DMA23" ] DMA7_DMA23 , # [ doc = "8 - DMA8_DMA24" ] DMA8_DMA24 , # [ doc = "9 - DMA9_DMA25" ] DMA9_DMA25 , # [ doc = "10 - DMA10_DMA26" ] DMA10_DMA26 , # [ doc = "11 - DMA11_DMA27" ] DMA11_DMA27 , # [ doc = "12 - DMA12_DMA28" ] DMA12_DMA28 , # [ doc = "13 - DMA13_DMA29" ] DMA13_DMA29 , # [ doc = "14 - DMA14_DMA30" ] DMA14_DMA30 , # [ doc = "15 - DMA15_DMA31" ] DMA15_DMA31 , # [ doc = "16 - DMA_Error" ] DMA_ERROR , # [ doc = "17 - MCM" ] MCM , # [ doc = "18 - FTFE" ] FTFE , # [ doc = "19 - Read_Collision" ] READ_COLLISION , # [ doc = "20 - LVD_LVW" ] LVD_LVW , # [ doc = "21 - LLWU" ] LLWU , # [ doc = "22 - WDOG_EWM" ] WDOG_EWM , # [ doc = "23 - RNG" ] RNG , # [ doc = "24 - I2C0" ] I2C0 , # [ doc = "25 - I2C1" ] I2C1 , # [ doc = "26 - SPI0" ] SPI0 , # [ doc = "27 - SPI1" ] SPI1 , # [ doc = "28 - I2S0_Tx" ] I2S0_TX , # [ doc = "29 - I2S0_Rx" ] I2S0_RX , # [ doc = "31 - UART0_RX_TX" ] UART0_RX_TX , # [ doc = "32 - UART0_ERR" ] UART0_ERR , # [ doc = "33 - UART1_RX_TX" ] UART1_RX_TX , # [ doc = "34 - UART1_ERR" ] UART1_ERR , # [ doc = "35 - UART2_RX_TX" ] UART2_RX_TX , # [ doc = "36 - UART2_ERR" ] UART2_ERR , # [ doc = "37 - UART3_RX_TX" ] UART3_RX_TX , # [ doc = "38 - UART3_ERR" ] UART3_ERR , # [ doc = "39 - ADC0" ] ADC0 , # [ doc = "40 - CMP0" ] CMP0 , # [ doc = "41 - CMP1" ] CMP1 , # [ doc = "42 - FTM0" ] FTM0 , # [ doc = "43 - FTM1" ] FTM1 , # [ doc = "44 - FTM2" ] FTM2 , # [ doc = "45 - CMT" ] CMT , # [ doc = "46 - RTC" ] RTC , # [ doc = "47 - RTC_Seconds" ] RTC_SECONDS , # [ doc = "48 - PIT0" ] PIT0 , # [ doc = "49 - PIT1" ] PIT1 , # [ doc = "50 - PIT2" ] PIT2 , # [ doc = "51 - PIT3" ] PIT3 , # [ doc = "52 - PDB0" ] PDB0 , # [ doc = "53 - USB0" ] USB0 , # [ doc = "54 - USBDCD" ] USBDCD , # [ doc = "56 - DAC0" ] DAC0 , # [ doc = "58 - LPTMR0" ] LPTMR0 , # [ doc = "59 - PORTA" ] PORTA , # [ doc = "60 - PORTB" ] PORTB , # [ doc = "61 - PORTC" ] PORTC , # [ doc = "62 - PORTD" ] PORTD , # [ doc = "63 - PORTE" ] PORTE , # [ doc = "65 - SPI2" ] SPI2 , # [ doc = "66 - UART4_RX_TX" ] UART4_RX_TX , # [ doc = "67 - UART4_ERR" ] UART4_ERR , # [ doc = "70 - CMP2" ] CMP2 , # [ doc = "71 - FTM3" ] FTM3 , # [ doc = "72 - DAC1" ] DAC1 , # [ doc = "73 - ADC1" ] ADC1 , # [ doc = "74 - I2C2" ] I2C2 , # [ doc = "75 - CAN0_ORed_Message_buffer" ] CAN0_ORED_MESSAGE_BUFFER , # [ doc = "76 - CAN0_Bus_Off" ] CAN0_BUS_OFF , # [ doc = "77 - CAN0_Error" ] CAN0_ERROR , # [ doc = "78 - CAN0_Tx_Warning" ] CAN0_TX_WARNING , # [ doc = "79 - CAN0_Rx_Warning" ] CAN0_RX_WARNING , # [ doc = "80 - CAN0_Wake_Up" ] CAN0_WAKE_UP , # [ doc = "81 - SDHC" ] SDHC , # [ doc = "82 - ENET_1588_Timer" ] ENET_1588_TIMER , # [ doc = "83 - ENET_Transmit" ] ENET_TRANSMIT , # [ doc = "84 - ENET_Receive" ] ENET_RECEIVE , # [ doc = "85 - ENET_Error" ] ENET_ERROR , # [ doc = "86 - LPUART0" ] LPUART0 , # [ doc = "87 - TSI0" ] TSI0 , # [ doc = "88 - TPM1" ] TPM1 , # [ doc = "89 - TPM2" ] TPM2 , # [ doc = "90 - USBHSDCD" ] USBHSDCD , # [ doc = "91 - I2C3" ] I2C3 , # [ doc = "92 - CMP3" ] CMP3 , # [ doc = "93 - USBHS" ] USBHS , # [ doc = "94 - CAN1_ORed_Message_buffer" ] CAN1_ORED_MESSAGE_BUFFER , # [ doc = "95 - CAN1_Bus_Off" ] CAN1_BUS_OFF , # [ doc = "96 - CAN1_Error" ] CAN1_ERROR , # [ doc = "97 - CAN1_Tx_Warning" ] CAN1_TX_WARNING , # [ doc = "98 - CAN1_Rx_Warning" ] CAN1_RX_WARNING , # [ doc = "99 - CAN1_Wake_Up" ] CAN1_WAKE_UP , } unsafe impl bare_metal :: Nr for Interrupt { # [ inline ] fn nr ( & self ) -> u8 { match * self { Interrupt :: DMA0_DMA16 => 0 , Interrupt :: DMA1_DMA17 => 1 , Interrupt :: DMA2_DMA18 => 2 , Interrupt :: DMA3_DMA19 => 3 , Interrupt :: DMA4_DMA20 => 4 , Interrupt :: DMA5_DMA21 => 5 , Interrupt :: DMA6_DMA22 => 6 , Interrupt :: DMA7_DMA23 => 7 , Interrupt :: DMA8_DMA24 => 8 , Interrupt :: DMA9_DMA25 => 9 , Interrupt :: DMA10_DMA26 => 10 , Interrupt :: DMA11_DMA27 => 11 , Interrupt :: DMA12_DMA28 => 12 , Interrupt :: DMA13_DMA29 => 13 , Interrupt :: DMA14_DMA30 => 14 , Interrupt :: DMA15_DMA31 => 15 , Interrupt :: DMA_ERROR => 16 , Interrupt :: MCM => 17 , Interrupt :: FTFE => 18 , Interrupt :: READ_COLLISION => 19 , Interrupt :: LVD_LVW => 20 , Interrupt :: LLWU => 21 , Interrupt :: WDOG_EWM => 22 , Interrupt :: RNG => 23 , Interrupt :: I2C0 => 24 , Interrupt :: I2C1 => 25 , Interrupt :: SPI0 => 26 , Interrupt :: SPI1 => 27 , Interrupt :: I2S0_TX => 28 , Interrupt :: I2S0_RX => 29 , Interrupt :: UART0_RX_TX => 31 , Interrupt :: UART0_ERR => 32 , Interrupt :: UART1_RX_TX => 33 , Interrupt :: UART1_ERR => 34 , Interrupt :: UART2_RX_TX => 35 , Interrupt :: UART2_ERR => 36 , Interrupt :: UART3_RX_TX => 37 , Interrupt :: UART3_ERR => 38 , Interrupt :: ADC0 => 39 , Interrupt :: CMP0 => 40 , Interrupt :: CMP1 => 41 , Interrupt :: FTM0 => 42 , Interrupt :: FTM1 => 43 , Interrupt :: FTM2 => 44 , Interrupt :: CMT => 45 , Interrupt :: RTC => 46 , Interrupt :: RTC_SECONDS => 47 , Interrupt :: PIT0 => 48 , Interrupt :: PIT1 => 49 , Interrupt :: PIT2 => 50 , Interrupt :: PIT3 => 51 , Interrupt :: PDB0 => 52 , Interrupt :: USB0 => 53 , Interrupt :: USBDCD => 54 , Interrupt :: DAC0 => 56 , Interrupt :: LPTMR0 => 58 , Interrupt :: PORTA => 59 , Interrupt :: PORTB => 60 , Interrupt :: PORTC => 61 , Interrupt :: PORTD => 62 , Interrupt :: PORTE => 63 , Interrupt :: SPI2 => 65 , Interrupt :: UART4_RX_TX => 66 , Interrupt :: UART4_ERR => 67 , Interrupt :: CMP2 => 70 , Interrupt :: FTM3 => 71 , Interrupt :: DAC1 => 72 , Interrupt :: ADC1 => 73 , Interrupt :: I2C2 => 74 , Interrupt :: CAN0_ORED_MESSAGE_BUFFER => 75 , Interrupt :: CAN0_BUS_OFF => 76 , Interrupt :: CAN0_ERROR => 77 , Interrupt :: CAN0_TX_WARNING => 78 , Interrupt :: CAN0_RX_WARNING => 79 , Interrupt :: CAN0_WAKE_UP => 80 , Interrupt :: SDHC => 81 , Interrupt :: ENET_1588_TIMER => 82 , Interrupt :: ENET_TRANSMIT => 83 , Interrupt :: ENET_RECEIVE => 84 , Interrupt :: ENET_ERROR => 85 , Interrupt :: LPUART0 => 86 , Interrupt :: TSI0 => 87 , Interrupt :: TPM1 => 88 , Interrupt :: TPM2 => 89 , Interrupt :: USBHSDCD => 90 , Interrupt :: I2C3 => 91 , Interrupt :: CMP3 => 92 , Interrupt :: USBHS => 93 , Interrupt :: CAN1_ORED_MESSAGE_BUFFER => 94 , Interrupt :: CAN1_BUS_OFF => 95 , Interrupt :: CAN1_ERROR => 96 , Interrupt :: CAN1_TX_WARNING => 97 , Interrupt :: CAN1_RX_WARNING => 98 , Interrupt :: CAN1_WAKE_UP => 99 , } } } pub use cortex_m :: peripheral :: Peripherals as CorePeripherals ; # [ cfg ( feature = "rt" ) ] pub use cortex_m_rt :: interrupt ; # [ cfg ( feature = "rt" ) ] pub use self :: Interrupt as interrupt ; pub use cortex_m :: peripheral :: { CBP , CPUID , DCB , DWT , FPB , FPU , ITM , MPU , NVIC , SCB , SYST , TPIU , } ; # [ allow ( unused_imports ) ] use generic :: * ; # [ doc = r"Common register and bit access and modify traits" ] pub mod generic { use core :: marker ; ///This trait shows that register has `read` method /// ///Registers marked with `Writable` can be also `modify`'ed pub trait Readable { } ///This trait shows that register has `write`, `write_with_zero` and `reset` method /// ///Registers marked with `Readable` can be also `modify`'ed pub trait Writable { } ///Reset value of the register /// ///This value is initial value for `write` method. ///It can be also directly writed to register by `reset` method. pub trait ResetValue { ///Register size type Type ; ///Reset value of the register fn reset_value ( ) -> Self :: Type ; } ///This structure provides volatile access to register pub struct Reg < U , REG > { register : vcell :: VolatileCell < U > , _marker : marker :: PhantomData < REG > } unsafe impl < U : Send , REG > Send for Reg < U , REG > { } impl < U , REG > Reg < U , REG > where Self : Readable , U : Copy { ///Reads the contents of `Readable` register /// ///You can read the contents of a register in such way: ///```ignore ///let bits = periph.reg.read().bits(); ///``` ///or get the content of a particular field of a register. ///```ignore ///let reader = periph.reg.read(); ///let bits = reader.field1().bits(); ///let flag = reader.field2().bit_is_set(); ///``` # [ inline ( always ) ] pub fn read ( & self ) -> R < U , Self > { R { bits : self . register . get ( ) , _reg : marker :: PhantomData } } } impl < U , REG > Reg < U , REG > where Self : ResetValue < Type = U > + Writable , U : Copy { ///Writes the reset value to `Writable` register /// ///Resets the register to its initial state # [ inline ( always ) ] pub fn reset ( & self ) { self . register . set ( Self :: reset_value ( ) ) } } impl < U , REG > Reg < U , REG > where Self : ResetValue < Type = U > + Writable , U : Copy { ///Writes bits to `Writable` register /// ///You can write raw bits into a register: ///```ignore ///periph.reg.write(|w| unsafe { w.bits(rawbits) }); ///``` ///or write only the fields you need: ///```ignore ///periph.reg.write(|w| w /// .field1().bits(newfield1bits) /// .field2().set_bit() /// .field3().variant(VARIANT) ///); ///``` ///Other fields will have reset value. # [ inline ( always ) ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W < U , Self > ) -> & mut W < U , Self > { self . register . set ( f ( & mut W { bits : Self :: reset_value ( ) , _reg : marker :: PhantomData } ) . bits ) ; } } impl < U , REG > Reg < U , REG > where Self : Writable , U : Copy + Default { ///Writes Zero to `Writable` register /// ///Similar to `write`, but unused bits will contain 0. # [ inline ( always ) ] pub fn write_with_zero < F > ( & self , f : F ) where F : FnOnce ( & mut W < U , Self > ) -> & mut W < U , Self > { self . register . set ( f ( & mut W { bits : U :: default ( ) , _reg : marker :: PhantomData } ) . bits ) ; } } impl < U , REG > Reg < U , REG > where Self : Readable + Writable , U : Copy { ///Modifies the contents of the register /// ///E.g. to do a read-modify-write sequence to change parts of a register: ///```ignore ///periph.reg.modify(|r, w| unsafe { w.bits( /// r.bits() | 3 ///) }); ///``` ///or ///```ignore ///periph.reg.modify(|_, w| w /// .field1().bits(newfield1bits) /// .field2().set_bit() /// .field3().variant(VARIANT) ///); ///``` ///Other fields will have value they had before call `modify`. # [ inline ( always ) ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R < U , Self > , & 'w mut W < U , Self > ) -> & 'w mut W < U , Self > { let bits = self . register . get ( ) ; self . register . set ( f ( & R { bits , _reg : marker :: PhantomData } , & mut W { bits , _reg : marker :: PhantomData } ) . bits ) ; } } ///Register/field reader /// ///Result of the [`read`](Reg::read) method of a register. ///Also it can be used in the [`modify`](Reg::read) method pub struct R < U , T > { pub ( crate ) bits : U , _reg : marker :: PhantomData < T > } impl < U , T > R < U , T > where U : Copy { ///Create new instance of reader # [ inline ( always ) ] pub ( crate ) fn new ( bits : U ) -> Self { Self { bits , _reg : marker :: PhantomData } } ///Read raw bits from register/field # [ inline ( always ) ] pub fn bits ( & self ) -> U { self . bits } } impl < U , T , FI > PartialEq < FI > for R < U , T > where U : PartialEq , FI : Copy + Into < U > { # [ inline ( always ) ] fn eq ( & self , other : & FI ) -> bool { self . bits . eq ( & ( * other ) . into ( ) ) } } impl < FI > R < bool , FI > { ///Value of the field as raw bits # [ inline ( always ) ] pub fn bit ( & self ) -> bool { self . bits } ///Returns `true` if the bit is clear (0) # [ inline ( always ) ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } ///Returns `true` if the bit is set (1) # [ inline ( always ) ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } ///Register writer /// ///Used as an argument to the closures in the [`write`](Reg::write) and [`modify`](Reg::modify) methods of the register pub struct W < U , REG > { ///Writable bits pub ( crate ) bits : U , _reg : marker :: PhantomData < REG > } impl < U , REG > W < U , REG > { ///Writes raw bits to the register # [ inline ( always ) ] pub unsafe fn bits ( & mut self , bits : U ) -> & mut Self { self . bits = bits ; self } } ///Used if enumerated values cover not the whole range # [ derive ( Clone , Copy , PartialEq ) ] pub enum Variant < U , T > { ///Expected variant Val ( T ) , ///Raw bits Res ( U ) , } } # [ doc = "Flash configuration field" ] pub struct FTFE_FLASHCONFIG { _marker : PhantomData < * const ( ) > } unsafe impl Send for FTFE_FLASHCONFIG { } impl FTFE_FLASHCONFIG { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const ftfe_flash_config :: RegisterBlock { 0x0400 as * const _ } } impl Deref for FTFE_FLASHCONFIG { type Target = ftfe_flash_config :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * FTFE_FLASHCONFIG :: ptr ( ) } } } # [ doc = "Flash configuration field" ] pub mod ftfe_flash_config { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Backdoor Comparison Key 3." ] pub backkey3 : BACKKEY3 , # [ doc = "0x01 - Backdoor Comparison Key 2." ] pub backkey2 : BACKKEY2 , # [ doc = "0x02 - Backdoor Comparison Key 1." ] pub backkey1 : BACKKEY1 , # [ doc = "0x03 - Backdoor Comparison Key 0." ] pub backkey0 : BACKKEY0 , # [ doc = "0x04 - Backdoor Comparison Key 7." ] pub backkey7 : BACKKEY7 , # [ doc = "0x05 - Backdoor Comparison Key 6." ] pub backkey6 : BACKKEY6 , # [ doc = "0x06 - Backdoor Comparison Key 5." ] pub backkey5 : BACKKEY5 , # [ doc = "0x07 - Backdoor Comparison Key 4." ] pub backkey4 : BACKKEY4 , # [ doc = "0x08 - Non-volatile P-Flash Protection 1 - Low Register" ] pub fprot3 : FPROT3 , # [ doc = "0x09 - Non-volatile P-Flash Protection 1 - High Register" ] pub fprot2 : FPROT2 , # [ doc = "0x0a - Non-volatile P-Flash Protection 0 - Low Register" ] pub fprot1 : FPROT1 , # [ doc = "0x0b - Non-volatile P-Flash Protection 0 - High Register" ] pub fprot0 : FPROT0 , # [ doc = "0x0c - Non-volatile Flash Security Register" ] pub fsec : FSEC , # [ doc = "0x0d - Non-volatile Flash Option Register" ] pub fopt : FOPT , # [ doc = "0x0e - Non-volatile EERAM Protection Register" ] pub feprot : FEPROT , # [ doc = "0x0f - Non-volatile D-Flash Protection Register" ] pub fdprot : FDPROT , } # [ doc = "Backdoor Comparison Key 3.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [backkey3](backkey3) module" ] pub type BACKKEY3 = crate :: Reg < u8 , _BACKKEY3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BACKKEY3 ; # [ doc = "`read()` method returns [backkey3::R](backkey3::R) reader structure" ] impl crate :: Readable for BACKKEY3 { } # [ doc = "Backdoor Comparison Key 3." ] pub mod backkey3 { # [ doc = "Reader of register BACKKEY3" ] pub type R = crate :: R < u8 , super :: BACKKEY3 > ; # [ doc = "Reader of field `KEY`" ] pub type KEY_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Backdoor Comparison Key." ] # [ inline ( always ) ] pub fn key ( & self ) -> KEY_R { KEY_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Backdoor Comparison Key 2.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [backkey2](backkey2) module" ] pub type BACKKEY2 = crate :: Reg < u8 , _BACKKEY2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BACKKEY2 ; # [ doc = "`read()` method returns [backkey2::R](backkey2::R) reader structure" ] impl crate :: Readable for BACKKEY2 { } # [ doc = "Backdoor Comparison Key 2." ] pub mod backkey2 { # [ doc = "Reader of register BACKKEY2" ] pub type R = crate :: R < u8 , super :: BACKKEY2 > ; # [ doc = "Reader of field `KEY`" ] pub type KEY_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Backdoor Comparison Key." ] # [ inline ( always ) ] pub fn key ( & self ) -> KEY_R { KEY_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Backdoor Comparison Key 1.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [backkey1](backkey1) module" ] pub type BACKKEY1 = crate :: Reg < u8 , _BACKKEY1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BACKKEY1 ; # [ doc = "`read()` method returns [backkey1::R](backkey1::R) reader structure" ] impl crate :: Readable for BACKKEY1 { } # [ doc = "Backdoor Comparison Key 1." ] pub mod backkey1 { # [ doc = "Reader of register BACKKEY1" ] pub type R = crate :: R < u8 , super :: BACKKEY1 > ; # [ doc = "Reader of field `KEY`" ] pub type KEY_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Backdoor Comparison Key." ] # [ inline ( always ) ] pub fn key ( & self ) -> KEY_R { KEY_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Backdoor Comparison Key 0.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [backkey0](backkey0) module" ] pub type BACKKEY0 = crate :: Reg < u8 , _BACKKEY0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BACKKEY0 ; # [ doc = "`read()` method returns [backkey0::R](backkey0::R) reader structure" ] impl crate :: Readable for BACKKEY0 { } # [ doc = "Backdoor Comparison Key 0." ] pub mod backkey0 { # [ doc = "Reader of register BACKKEY0" ] pub type R = crate :: R < u8 , super :: BACKKEY0 > ; # [ doc = "Reader of field `KEY`" ] pub type KEY_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Backdoor Comparison Key." ] # [ inline ( always ) ] pub fn key ( & self ) -> KEY_R { KEY_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Backdoor Comparison Key 7.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [backkey7](backkey7) module" ] pub type BACKKEY7 = crate :: Reg < u8 , _BACKKEY7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BACKKEY7 ; # [ doc = "`read()` method returns [backkey7::R](backkey7::R) reader structure" ] impl crate :: Readable for BACKKEY7 { } # [ doc = "Backdoor Comparison Key 7." ] pub mod backkey7 { # [ doc = "Reader of register BACKKEY7" ] pub type R = crate :: R < u8 , super :: BACKKEY7 > ; # [ doc = "Reader of field `KEY`" ] pub type KEY_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Backdoor Comparison Key." ] # [ inline ( always ) ] pub fn key ( & self ) -> KEY_R { KEY_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Backdoor Comparison Key 6.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [backkey6](backkey6) module" ] pub type BACKKEY6 = crate :: Reg < u8 , _BACKKEY6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BACKKEY6 ; # [ doc = "`read()` method returns [backkey6::R](backkey6::R) reader structure" ] impl crate :: Readable for BACKKEY6 { } # [ doc = "Backdoor Comparison Key 6." ] pub mod backkey6 { # [ doc = "Reader of register BACKKEY6" ] pub type R = crate :: R < u8 , super :: BACKKEY6 > ; # [ doc = "Reader of field `KEY`" ] pub type KEY_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Backdoor Comparison Key." ] # [ inline ( always ) ] pub fn key ( & self ) -> KEY_R { KEY_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Backdoor Comparison Key 5.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [backkey5](backkey5) module" ] pub type BACKKEY5 = crate :: Reg < u8 , _BACKKEY5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BACKKEY5 ; # [ doc = "`read()` method returns [backkey5::R](backkey5::R) reader structure" ] impl crate :: Readable for BACKKEY5 { } # [ doc = "Backdoor Comparison Key 5." ] pub mod backkey5 { # [ doc = "Reader of register BACKKEY5" ] pub type R = crate :: R < u8 , super :: BACKKEY5 > ; # [ doc = "Reader of field `KEY`" ] pub type KEY_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Backdoor Comparison Key." ] # [ inline ( always ) ] pub fn key ( & self ) -> KEY_R { KEY_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Backdoor Comparison Key 4.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [backkey4](backkey4) module" ] pub type BACKKEY4 = crate :: Reg < u8 , _BACKKEY4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BACKKEY4 ; # [ doc = "`read()` method returns [backkey4::R](backkey4::R) reader structure" ] impl crate :: Readable for BACKKEY4 { } # [ doc = "Backdoor Comparison Key 4." ] pub mod backkey4 { # [ doc = "Reader of register BACKKEY4" ] pub type R = crate :: R < u8 , super :: BACKKEY4 > ; # [ doc = "Reader of field `KEY`" ] pub type KEY_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Backdoor Comparison Key." ] # [ inline ( always ) ] pub fn key ( & self ) -> KEY_R { KEY_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Non-volatile P-Flash Protection 1 - Low Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fprot3](fprot3) module" ] pub type FPROT3 = crate :: Reg < u8 , _FPROT3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPROT3 ; # [ doc = "`read()` method returns [fprot3::R](fprot3::R) reader structure" ] impl crate :: Readable for FPROT3 { } # [ doc = "Non-volatile P-Flash Protection 1 - Low Register" ] pub mod fprot3 { # [ doc = "Reader of register FPROT3" ] pub type R = crate :: R < u8 , super :: FPROT3 > ; # [ doc = "Reader of field `PROT`" ] pub type PROT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - P-Flash Region Protect" ] # [ inline ( always ) ] pub fn prot ( & self ) -> PROT_R { PROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Non-volatile P-Flash Protection 1 - High Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fprot2](fprot2) module" ] pub type FPROT2 = crate :: Reg < u8 , _FPROT2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPROT2 ; # [ doc = "`read()` method returns [fprot2::R](fprot2::R) reader structure" ] impl crate :: Readable for FPROT2 { } # [ doc = "Non-volatile P-Flash Protection 1 - High Register" ] pub mod fprot2 { # [ doc = "Reader of register FPROT2" ] pub type R = crate :: R < u8 , super :: FPROT2 > ; # [ doc = "Reader of field `PROT`" ] pub type PROT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - P-Flash Region Protect" ] # [ inline ( always ) ] pub fn prot ( & self ) -> PROT_R { PROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Non-volatile P-Flash Protection 0 - Low Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fprot1](fprot1) module" ] pub type FPROT1 = crate :: Reg < u8 , _FPROT1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPROT1 ; # [ doc = "`read()` method returns [fprot1::R](fprot1::R) reader structure" ] impl crate :: Readable for FPROT1 { } # [ doc = "Non-volatile P-Flash Protection 0 - Low Register" ] pub mod fprot1 { # [ doc = "Reader of register FPROT1" ] pub type R = crate :: R < u8 , super :: FPROT1 > ; # [ doc = "Reader of field `PROT`" ] pub type PROT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - P-Flash Region Protect" ] # [ inline ( always ) ] pub fn prot ( & self ) -> PROT_R { PROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Non-volatile P-Flash Protection 0 - High Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fprot0](fprot0) module" ] pub type FPROT0 = crate :: Reg < u8 , _FPROT0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPROT0 ; # [ doc = "`read()` method returns [fprot0::R](fprot0::R) reader structure" ] impl crate :: Readable for FPROT0 { } # [ doc = "Non-volatile P-Flash Protection 0 - High Register" ] pub mod fprot0 { # [ doc = "Reader of register FPROT0" ] pub type R = crate :: R < u8 , super :: FPROT0 > ; # [ doc = "Reader of field `PROT`" ] pub type PROT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - P-Flash Region Protect" ] # [ inline ( always ) ] pub fn prot ( & self ) -> PROT_R { PROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Non-volatile Flash Security Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fsec](fsec) module" ] pub type FSEC = crate :: Reg < u8 , _FSEC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FSEC ; # [ doc = "`read()` method returns [fsec::R](fsec::R) reader structure" ] impl crate :: Readable for FSEC { } # [ doc = "Non-volatile Flash Security Register" ] pub mod fsec { # [ doc = "Reader of register FSEC" ] pub type R = crate :: R < u8 , super :: FSEC > ; # [ doc = "Flash Security\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEC_A { # [ doc = "2: MCU security status is unsecure" ] _10 , # [ doc = "3: MCU security status is secure" ] _11 } impl From < SEC_A > for u8 { # [ inline ( always ) ] fn from ( variant : SEC_A ) -> Self { match variant { SEC_A :: _10 => 2 , SEC_A :: _11 => 3 } } } # [ doc = "Reader of field `SEC`" ] pub type SEC_R = crate :: R < u8 , SEC_A > ; impl SEC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SEC_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( SEC_A :: _10 ) , 3 => Val ( SEC_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SEC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SEC_A :: _11 } } # [ doc = "Freescale Failure Analysis Access Code\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSLACC_A { # [ doc = "2: Freescale factory access denied" ] _10 , # [ doc = "3: Freescale factory access granted" ] _11 } impl From < FSLACC_A > for u8 { # [ inline ( always ) ] fn from ( variant : FSLACC_A ) -> Self { match variant { FSLACC_A :: _10 => 2 , FSLACC_A :: _11 => 3 } } } # [ doc = "Reader of field `FSLACC`" ] pub type FSLACC_R = crate :: R < u8 , FSLACC_A > ; impl FSLACC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FSLACC_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( FSLACC_A :: _10 ) , 3 => Val ( FSLACC_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FSLACC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FSLACC_A :: _11 } } # [ doc = "no description available\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MEEN_A { # [ doc = "2: Mass erase is disabled" ] _10 , # [ doc = "3: Mass erase is enabled" ] _11 } impl From < MEEN_A > for u8 { # [ inline ( always ) ] fn from ( variant : MEEN_A ) -> Self { match variant { MEEN_A :: _10 => 2 , MEEN_A :: _11 => 3 } } } # [ doc = "Reader of field `MEEN`" ] pub type MEEN_R = crate :: R < u8 , MEEN_A > ; impl MEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , MEEN_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( MEEN_A :: _10 ) , 3 => Val ( MEEN_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MEEN_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MEEN_A :: _11 } } # [ doc = "Backdoor Key Security Enable\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum KEYEN_A { # [ doc = "2: Backdoor key access enabled" ] _10 , # [ doc = "3: Backdoor key access disabled" ] _11 } impl From < KEYEN_A > for u8 { # [ inline ( always ) ] fn from ( variant : KEYEN_A ) -> Self { match variant { KEYEN_A :: _10 => 2 , KEYEN_A :: _11 => 3 } } } # [ doc = "Reader of field `KEYEN`" ] pub type KEYEN_R = crate :: R < u8 , KEYEN_A > ; impl KEYEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , KEYEN_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( KEYEN_A :: _10 ) , 3 => Val ( KEYEN_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == KEYEN_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == KEYEN_A :: _11 } } impl R { # [ doc = "Bits 0:1 - Flash Security" ] # [ inline ( always ) ] pub fn sec ( & self ) -> SEC_R { SEC_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Freescale Failure Analysis Access Code" ] # [ inline ( always ) ] pub fn fslacc ( & self ) -> FSLACC_R { FSLACC_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - no description available" ] # [ inline ( always ) ] pub fn meen ( & self ) -> MEEN_R { MEEN_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Backdoor Key Security Enable" ] # [ inline ( always ) ] pub fn keyen ( & self ) -> KEYEN_R { KEYEN_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } } # [ doc = "Non-volatile Flash Option Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fopt](fopt) module" ] pub type FOPT = crate :: Reg < u8 , _FOPT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FOPT ; # [ doc = "`read()` method returns [fopt::R](fopt::R) reader structure" ] impl crate :: Readable for FOPT { } # [ doc = "Non-volatile Flash Option Register" ] pub mod fopt { # [ doc = "Reader of register FOPT" ] pub type R = crate :: R < u8 , super :: FOPT > ; # [ doc = "no description available\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPBOOT_A { # [ doc = "0: Low-power boot" ] _00 , # [ doc = "1: Normal boot" ] _01 } impl From < LPBOOT_A > for bool { # [ inline ( always ) ] fn from ( variant : LPBOOT_A ) -> Self { match variant { LPBOOT_A :: _00 => false , LPBOOT_A :: _01 => true } } } # [ doc = "Reader of field `LPBOOT`" ] pub type LPBOOT_R = crate :: R < bool , LPBOOT_A > ; impl LPBOOT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPBOOT_A { match self . bits { false => LPBOOT_A :: _00 , true => LPBOOT_A :: _01 } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LPBOOT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LPBOOT_A :: _01 } } # [ doc = "no description available\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EZPORT_DIS_A { # [ doc = "0: EzPort operation is disabled" ] _00 , # [ doc = "1: EzPort operation is enabled" ] _01 } impl From < EZPORT_DIS_A > for bool { # [ inline ( always ) ] fn from ( variant : EZPORT_DIS_A ) -> Self { match variant { EZPORT_DIS_A :: _00 => false , EZPORT_DIS_A :: _01 => true } } } # [ doc = "Reader of field `EZPORT_DIS`" ] pub type EZPORT_DIS_R = crate :: R < bool , EZPORT_DIS_A > ; impl EZPORT_DIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EZPORT_DIS_A { match self . bits { false => EZPORT_DIS_A :: _00 , true => EZPORT_DIS_A :: _01 } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EZPORT_DIS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == EZPORT_DIS_A :: _01 } } # [ doc = "no description available\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NMI_DIS_A { # [ doc = "0: NMI interrupts are always blocked" ] _00 , # [ doc = "1: NMI_b pin/interrupts reset default to enabled" ] _01 } impl From < NMI_DIS_A > for bool { # [ inline ( always ) ] fn from ( variant : NMI_DIS_A ) -> Self { match variant { NMI_DIS_A :: _00 => false , NMI_DIS_A :: _01 => true } } } # [ doc = "Reader of field `NMI_DIS`" ] pub type NMI_DIS_R = crate :: R < bool , NMI_DIS_A > ; impl NMI_DIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NMI_DIS_A { match self . bits { false => NMI_DIS_A :: _00 , true => NMI_DIS_A :: _01 } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == NMI_DIS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == NMI_DIS_A :: _01 } } impl R { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn lpboot ( & self ) -> LPBOOT_R { LPBOOT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn ezport_dis ( & self ) -> EZPORT_DIS_R { EZPORT_DIS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn nmi_dis ( & self ) -> NMI_DIS_R { NMI_DIS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } } # [ doc = "Non-volatile EERAM Protection Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [feprot](feprot) module" ] pub type FEPROT = crate :: Reg < u8 , _FEPROT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FEPROT ; # [ doc = "`read()` method returns [feprot::R](feprot::R) reader structure" ] impl crate :: Readable for FEPROT { } # [ doc = "Non-volatile EERAM Protection Register" ] pub mod feprot { # [ doc = "Reader of register FEPROT" ] pub type R = crate :: R < u8 , super :: FEPROT > ; # [ doc = "Reader of field `EPROT`" ] pub type EPROT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - no description available" ] # [ inline ( always ) ] pub fn eprot ( & self ) -> EPROT_R { EPROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Non-volatile D-Flash Protection Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fdprot](fdprot) module" ] pub type FDPROT = crate :: Reg < u8 , _FDPROT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FDPROT ; # [ doc = "`read()` method returns [fdprot::R](fdprot::R) reader structure" ] impl crate :: Readable for FDPROT { } # [ doc = "Non-volatile D-Flash Protection Register" ] pub mod fdprot { # [ doc = "Reader of register FDPROT" ] pub type R = crate :: R < u8 , super :: FDPROT > ; # [ doc = "Reader of field `DPROT`" ] pub type DPROT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - D-Flash Region Protect" ] # [ inline ( always ) ] pub fn dprot ( & self ) -> DPROT_R { DPROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } } # [ doc = "AIPS-Lite Bridge" ] pub struct AIPS0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for AIPS0 { } impl AIPS0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const aips0 :: RegisterBlock { 0x4000_0000 as * const _ } } impl Deref for AIPS0 { type Target = aips0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * AIPS0 :: ptr ( ) } } } # [ doc = "AIPS-Lite Bridge" ] pub mod aips0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Master Privilege Register A" ] pub mpra : MPRA , _reserved1 : [ u8 ; 28usize ] , # [ doc = "0x20 - Peripheral Access Control Register" ] pub pacra : PACRA , # [ doc = "0x24 - Peripheral Access Control Register" ] pub pacrb : PACRB , # [ doc = "0x28 - Peripheral Access Control Register" ] pub pacrc : PACRC , # [ doc = "0x2c - Peripheral Access Control Register" ] pub pacrd : PACRD , _reserved5 : [ u8 ; 16usize ] , # [ doc = "0x40 - Peripheral Access Control Register" ] pub pacre : PACRE , # [ doc = "0x44 - Peripheral Access Control Register" ] pub pacrf : PACRF , # [ doc = "0x48 - Peripheral Access Control Register" ] pub pacrg : PACRG , # [ doc = "0x4c - Peripheral Access Control Register" ] pub pacrh : PACRH , # [ doc = "0x50 - Peripheral Access Control Register" ] pub pacri : PACRI , # [ doc = "0x54 - Peripheral Access Control Register" ] pub pacrj : PACRJ , # [ doc = "0x58 - Peripheral Access Control Register" ] pub pacrk : PACRK , # [ doc = "0x5c - Peripheral Access Control Register" ] pub pacrl : PACRL , # [ doc = "0x60 - Peripheral Access Control Register" ] pub pacrm : PACRM , # [ doc = "0x64 - Peripheral Access Control Register" ] pub pacrn : PACRN , # [ doc = "0x68 - Peripheral Access Control Register" ] pub pacro : PACRO , # [ doc = "0x6c - Peripheral Access Control Register" ] pub pacrp : PACRP , } # [ doc = "Master Privilege Register A\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mpra](mpra) module" ] pub type MPRA = crate :: Reg < u32 , _MPRA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MPRA ; # [ doc = "`read()` method returns [mpra::R](mpra::R) reader structure" ] impl crate :: Readable for MPRA { } # [ doc = "`write(|w| ..)` method takes [mpra::W](mpra::W) writer structure" ] impl crate :: Writable for MPRA { } # [ doc = "Master Privilege Register A" ] pub mod mpra { # [ doc = "Reader of register MPRA" ] pub type R = crate :: R < u32 , super :: MPRA > ; # [ doc = "Writer for register MPRA" ] pub type W = crate :: W < u32 , super :: MPRA > ; # [ doc = "Register MPRA `reset()`'s with value 0x7770_0000" ] impl crate :: ResetValue for super :: MPRA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7770_0000 } } # [ doc = "Master 6 Privilege Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL6_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL6_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL6_A ) -> Self { match variant { MPL6_A :: _0 => false , MPL6_A :: _1 => true } } } # [ doc = "Reader of field `MPL6`" ] pub type MPL6_R = crate :: R < bool , MPL6_A > ; impl MPL6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL6_A { match self . bits { false => MPL6_A :: _0 , true => MPL6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL6_A :: _1 } } # [ doc = "Write proxy for field `MPL6`" ] pub struct MPL6_W < 'a > { w : & 'a mut W , } impl < 'a > MPL6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL6_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Master 6 Trusted for Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW6_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW6_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW6_A ) -> Self { match variant { MTW6_A :: _0 => false , MTW6_A :: _1 => true } } } # [ doc = "Reader of field `MTW6`" ] pub type MTW6_R = crate :: R < bool , MTW6_A > ; impl MTW6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW6_A { match self . bits { false => MTW6_A :: _0 , true => MTW6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW6_A :: _1 } } # [ doc = "Write proxy for field `MTW6`" ] pub struct MTW6_W < 'a > { w : & 'a mut W , } impl < 'a > MTW6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW6_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW6_A :: _1 ) } # [ 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 = "Master 6 Trusted for Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR6_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR6_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR6_A ) -> Self { match variant { MTR6_A :: _0 => false , MTR6_A :: _1 => true } } } # [ doc = "Reader of field `MTR6`" ] pub type MTR6_R = crate :: R < bool , MTR6_A > ; impl MTR6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR6_A { match self . bits { false => MTR6_A :: _0 , true => MTR6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR6_A :: _1 } } # [ doc = "Write proxy for field `MTR6`" ] pub struct MTR6_W < 'a > { w : & 'a mut W , } impl < 'a > MTR6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR6_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR6_A :: _1 ) } # [ 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 = "Master 5 Privilege Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL5_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL5_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL5_A ) -> Self { match variant { MPL5_A :: _0 => false , MPL5_A :: _1 => true } } } # [ doc = "Reader of field `MPL5`" ] pub type MPL5_R = crate :: R < bool , MPL5_A > ; impl MPL5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL5_A { match self . bits { false => MPL5_A :: _0 , true => MPL5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL5_A :: _1 } } # [ doc = "Write proxy for field `MPL5`" ] pub struct MPL5_W < 'a > { w : & 'a mut W , } impl < 'a > MPL5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL5_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Master 5 Trusted For Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW5_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW5_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW5_A ) -> Self { match variant { MTW5_A :: _0 => false , MTW5_A :: _1 => true } } } # [ doc = "Reader of field `MTW5`" ] pub type MTW5_R = crate :: R < bool , MTW5_A > ; impl MTW5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW5_A { match self . bits { false => MTW5_A :: _0 , true => MTW5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW5_A :: _1 } } # [ doc = "Write proxy for field `MTW5`" ] pub struct MTW5_W < 'a > { w : & 'a mut W , } impl < 'a > MTW5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW5_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Master 5 Trusted For Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR5_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR5_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR5_A ) -> Self { match variant { MTR5_A :: _0 => false , MTR5_A :: _1 => true } } } # [ doc = "Reader of field `MTR5`" ] pub type MTR5_R = crate :: R < bool , MTR5_A > ; impl MTR5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR5_A { match self . bits { false => MTR5_A :: _0 , true => MTR5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR5_A :: _1 } } # [ doc = "Write proxy for field `MTR5`" ] pub struct MTR5_W < 'a > { w : & 'a mut W , } impl < 'a > MTR5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR5_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Master 4 Privilege Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL4_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL4_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL4_A ) -> Self { match variant { MPL4_A :: _0 => false , MPL4_A :: _1 => true } } } # [ doc = "Reader of field `MPL4`" ] pub type MPL4_R = crate :: R < bool , MPL4_A > ; impl MPL4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL4_A { match self . bits { false => MPL4_A :: _0 , true => MPL4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL4_A :: _1 } } # [ doc = "Write proxy for field `MPL4`" ] pub struct MPL4_W < 'a > { w : & 'a mut W , } impl < 'a > MPL4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL4_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Master 4 Trusted For Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW4_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW4_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW4_A ) -> Self { match variant { MTW4_A :: _0 => false , MTW4_A :: _1 => true } } } # [ doc = "Reader of field `MTW4`" ] pub type MTW4_R = crate :: R < bool , MTW4_A > ; impl MTW4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW4_A { match self . bits { false => MTW4_A :: _0 , true => MTW4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW4_A :: _1 } } # [ doc = "Write proxy for field `MTW4`" ] pub struct MTW4_W < 'a > { w : & 'a mut W , } impl < 'a > MTW4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW4_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW4_A :: _1 ) } # [ 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 = "Master 4 Trusted For Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR4_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR4_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR4_A ) -> Self { match variant { MTR4_A :: _0 => false , MTR4_A :: _1 => true } } } # [ doc = "Reader of field `MTR4`" ] pub type MTR4_R = crate :: R < bool , MTR4_A > ; impl MTR4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR4_A { match self . bits { false => MTR4_A :: _0 , true => MTR4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR4_A :: _1 } } # [ doc = "Write proxy for field `MTR4`" ] pub struct MTR4_W < 'a > { w : & 'a mut W , } impl < 'a > MTR4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR4_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Master 3 Privilege Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL3_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL3_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL3_A ) -> Self { match variant { MPL3_A :: _0 => false , MPL3_A :: _1 => true } } } # [ doc = "Reader of field `MPL3`" ] pub type MPL3_R = crate :: R < bool , MPL3_A > ; impl MPL3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL3_A { match self . bits { false => MPL3_A :: _0 , true => MPL3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL3_A :: _1 } } # [ doc = "Write proxy for field `MPL3`" ] pub struct MPL3_W < 'a > { w : & 'a mut W , } impl < 'a > MPL3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL3_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Master 3 Trusted For Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW3_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW3_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW3_A ) -> Self { match variant { MTW3_A :: _0 => false , MTW3_A :: _1 => true } } } # [ doc = "Reader of field `MTW3`" ] pub type MTW3_R = crate :: R < bool , MTW3_A > ; impl MTW3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW3_A { match self . bits { false => MTW3_A :: _0 , true => MTW3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW3_A :: _1 } } # [ doc = "Write proxy for field `MTW3`" ] pub struct MTW3_W < 'a > { w : & 'a mut W , } impl < 'a > MTW3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW3_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Master 3 Trusted For Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR3_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR3_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR3_A ) -> Self { match variant { MTR3_A :: _0 => false , MTR3_A :: _1 => true } } } # [ doc = "Reader of field `MTR3`" ] pub type MTR3_R = crate :: R < bool , MTR3_A > ; impl MTR3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR3_A { match self . bits { false => MTR3_A :: _0 , true => MTR3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR3_A :: _1 } } # [ doc = "Write proxy for field `MTR3`" ] pub struct MTR3_W < 'a > { w : & 'a mut W , } impl < 'a > MTR3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR3_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Master 2 Privilege Level\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL2_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL2_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL2_A ) -> Self { match variant { MPL2_A :: _0 => false , MPL2_A :: _1 => true } } } # [ doc = "Reader of field `MPL2`" ] pub type MPL2_R = crate :: R < bool , MPL2_A > ; impl MPL2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL2_A { match self . bits { false => MPL2_A :: _0 , true => MPL2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL2_A :: _1 } } # [ doc = "Write proxy for field `MPL2`" ] pub struct MPL2_W < 'a > { w : & 'a mut W , } impl < 'a > MPL2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL2_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL2_A :: _1 ) } # [ 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 = "Master 2 Trusted For Writes\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW2_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW2_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW2_A ) -> Self { match variant { MTW2_A :: _0 => false , MTW2_A :: _1 => true } } } # [ doc = "Reader of field `MTW2`" ] pub type MTW2_R = crate :: R < bool , MTW2_A > ; impl MTW2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW2_A { match self . bits { false => MTW2_A :: _0 , true => MTW2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW2_A :: _1 } } # [ doc = "Write proxy for field `MTW2`" ] pub struct MTW2_W < 'a > { w : & 'a mut W , } impl < 'a > MTW2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW2_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW2_A :: _1 ) } # [ 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 = "Master 2 Trusted For Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR2_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR2_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR2_A ) -> Self { match variant { MTR2_A :: _0 => false , MTR2_A :: _1 => true } } } # [ doc = "Reader of field `MTR2`" ] pub type MTR2_R = crate :: R < bool , MTR2_A > ; impl MTR2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR2_A { match self . bits { false => MTR2_A :: _0 , true => MTR2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR2_A :: _1 } } # [ doc = "Write proxy for field `MTR2`" ] pub struct MTR2_W < 'a > { w : & 'a mut W , } impl < 'a > MTR2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR2_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Master 1 Privilege Level\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL1_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL1_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL1_A ) -> Self { match variant { MPL1_A :: _0 => false , MPL1_A :: _1 => true } } } # [ doc = "Reader of field `MPL1`" ] pub type MPL1_R = crate :: R < bool , MPL1_A > ; impl MPL1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL1_A { match self . bits { false => MPL1_A :: _0 , true => MPL1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL1_A :: _1 } } # [ doc = "Write proxy for field `MPL1`" ] pub struct MPL1_W < 'a > { w : & 'a mut W , } impl < 'a > MPL1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL1_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL1_A :: _1 ) } # [ 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 = "Master 1 Trusted for Writes\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW1_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW1_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW1_A ) -> Self { match variant { MTW1_A :: _0 => false , MTW1_A :: _1 => true } } } # [ doc = "Reader of field `MTW1`" ] pub type MTW1_R = crate :: R < bool , MTW1_A > ; impl MTW1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW1_A { match self . bits { false => MTW1_A :: _0 , true => MTW1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW1_A :: _1 } } # [ doc = "Write proxy for field `MTW1`" ] pub struct MTW1_W < 'a > { w : & 'a mut W , } impl < 'a > MTW1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW1_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW1_A :: _1 ) } # [ 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 = "Master 1 Trusted for Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR1_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR1_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR1_A ) -> Self { match variant { MTR1_A :: _0 => false , MTR1_A :: _1 => true } } } # [ doc = "Reader of field `MTR1`" ] pub type MTR1_R = crate :: R < bool , MTR1_A > ; impl MTR1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR1_A { match self . bits { false => MTR1_A :: _0 , true => MTR1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR1_A :: _1 } } # [ doc = "Write proxy for field `MTR1`" ] pub struct MTR1_W < 'a > { w : & 'a mut W , } impl < 'a > MTR1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR1_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR1_A :: _1 ) } # [ 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 = "Master 0 Privilege Level\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL0_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL0_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL0_A ) -> Self { match variant { MPL0_A :: _0 => false , MPL0_A :: _1 => true } } } # [ doc = "Reader of field `MPL0`" ] pub type MPL0_R = crate :: R < bool , MPL0_A > ; impl MPL0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL0_A { match self . bits { false => MPL0_A :: _0 , true => MPL0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL0_A :: _1 } } # [ doc = "Write proxy for field `MPL0`" ] pub struct MPL0_W < 'a > { w : & 'a mut W , } impl < 'a > MPL0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL0_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Master 0 Trusted For Writes\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW0_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW0_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW0_A ) -> Self { match variant { MTW0_A :: _0 => false , MTW0_A :: _1 => true } } } # [ doc = "Reader of field `MTW0`" ] pub type MTW0_R = crate :: R < bool , MTW0_A > ; impl MTW0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW0_A { match self . bits { false => MTW0_A :: _0 , true => MTW0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW0_A :: _1 } } # [ doc = "Write proxy for field `MTW0`" ] pub struct MTW0_W < 'a > { w : & 'a mut W , } impl < 'a > MTW0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW0_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Master 0 Trusted For Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR0_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR0_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR0_A ) -> Self { match variant { MTR0_A :: _0 => false , MTR0_A :: _1 => true } } } # [ doc = "Reader of field `MTR0`" ] pub type MTR0_R = crate :: R < bool , MTR0_A > ; impl MTR0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR0_A { match self . bits { false => MTR0_A :: _0 , true => MTR0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR0_A :: _1 } } # [ doc = "Write proxy for field `MTR0`" ] pub struct MTR0_W < 'a > { w : & 'a mut W , } impl < 'a > MTR0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR0_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 4 - Master 6 Privilege Level" ] # [ inline ( always ) ] pub fn mpl6 ( & self ) -> MPL6_R { MPL6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Master 6 Trusted for Writes" ] # [ inline ( always ) ] pub fn mtw6 ( & self ) -> MTW6_R { MTW6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Master 6 Trusted for Read" ] # [ inline ( always ) ] pub fn mtr6 ( & self ) -> MTR6_R { MTR6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Master 5 Privilege Level" ] # [ inline ( always ) ] pub fn mpl5 ( & self ) -> MPL5_R { MPL5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Master 5 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw5 ( & self ) -> MTW5_R { MTW5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Master 5 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr5 ( & self ) -> MTR5_R { MTR5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Master 4 Privilege Level" ] # [ inline ( always ) ] pub fn mpl4 ( & self ) -> MPL4_R { MPL4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Master 4 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw4 ( & self ) -> MTW4_R { MTW4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Master 4 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr4 ( & self ) -> MTR4_R { MTR4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Master 3 Privilege Level" ] # [ inline ( always ) ] pub fn mpl3 ( & self ) -> MPL3_R { MPL3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Master 3 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw3 ( & self ) -> MTW3_R { MTW3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Master 3 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr3 ( & self ) -> MTR3_R { MTR3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Master 2 Privilege Level" ] # [ inline ( always ) ] pub fn mpl2 ( & self ) -> MPL2_R { MPL2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Master 2 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw2 ( & self ) -> MTW2_R { MTW2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Master 2 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr2 ( & self ) -> MTR2_R { MTR2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Master 1 Privilege Level" ] # [ inline ( always ) ] pub fn mpl1 ( & self ) -> MPL1_R { MPL1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Master 1 Trusted for Writes" ] # [ inline ( always ) ] pub fn mtw1 ( & self ) -> MTW1_R { MTW1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Master 1 Trusted for Read" ] # [ inline ( always ) ] pub fn mtr1 ( & self ) -> MTR1_R { MTR1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Master 0 Privilege Level" ] # [ inline ( always ) ] pub fn mpl0 ( & self ) -> MPL0_R { MPL0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Master 0 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw0 ( & self ) -> MTW0_R { MTW0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Master 0 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr0 ( & self ) -> MTR0_R { MTR0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Master 6 Privilege Level" ] # [ inline ( always ) ] pub fn mpl6 ( & mut self ) -> MPL6_W { MPL6_W { w : self } } # [ doc = "Bit 5 - Master 6 Trusted for Writes" ] # [ inline ( always ) ] pub fn mtw6 ( & mut self ) -> MTW6_W { MTW6_W { w : self } } # [ doc = "Bit 6 - Master 6 Trusted for Read" ] # [ inline ( always ) ] pub fn mtr6 ( & mut self ) -> MTR6_W { MTR6_W { w : self } } # [ doc = "Bit 8 - Master 5 Privilege Level" ] # [ inline ( always ) ] pub fn mpl5 ( & mut self ) -> MPL5_W { MPL5_W { w : self } } # [ doc = "Bit 9 - Master 5 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw5 ( & mut self ) -> MTW5_W { MTW5_W { w : self } } # [ doc = "Bit 10 - Master 5 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr5 ( & mut self ) -> MTR5_W { MTR5_W { w : self } } # [ doc = "Bit 12 - Master 4 Privilege Level" ] # [ inline ( always ) ] pub fn mpl4 ( & mut self ) -> MPL4_W { MPL4_W { w : self } } # [ doc = "Bit 13 - Master 4 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw4 ( & mut self ) -> MTW4_W { MTW4_W { w : self } } # [ doc = "Bit 14 - Master 4 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr4 ( & mut self ) -> MTR4_W { MTR4_W { w : self } } # [ doc = "Bit 16 - Master 3 Privilege Level" ] # [ inline ( always ) ] pub fn mpl3 ( & mut self ) -> MPL3_W { MPL3_W { w : self } } # [ doc = "Bit 17 - Master 3 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw3 ( & mut self ) -> MTW3_W { MTW3_W { w : self } } # [ doc = "Bit 18 - Master 3 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr3 ( & mut self ) -> MTR3_W { MTR3_W { w : self } } # [ doc = "Bit 20 - Master 2 Privilege Level" ] # [ inline ( always ) ] pub fn mpl2 ( & mut self ) -> MPL2_W { MPL2_W { w : self } } # [ doc = "Bit 21 - Master 2 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw2 ( & mut self ) -> MTW2_W { MTW2_W { w : self } } # [ doc = "Bit 22 - Master 2 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr2 ( & mut self ) -> MTR2_W { MTR2_W { w : self } } # [ doc = "Bit 24 - Master 1 Privilege Level" ] # [ inline ( always ) ] pub fn mpl1 ( & mut self ) -> MPL1_W { MPL1_W { w : self } } # [ doc = "Bit 25 - Master 1 Trusted for Writes" ] # [ inline ( always ) ] pub fn mtw1 ( & mut self ) -> MTW1_W { MTW1_W { w : self } } # [ doc = "Bit 26 - Master 1 Trusted for Read" ] # [ inline ( always ) ] pub fn mtr1 ( & mut self ) -> MTR1_W { MTR1_W { w : self } } # [ doc = "Bit 28 - Master 0 Privilege Level" ] # [ inline ( always ) ] pub fn mpl0 ( & mut self ) -> MPL0_W { MPL0_W { w : self } } # [ doc = "Bit 29 - Master 0 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw0 ( & mut self ) -> MTW0_W { MTW0_W { w : self } } # [ doc = "Bit 30 - Master 0 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr0 ( & mut self ) -> MTR0_W { MTR0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacra](pacra) module" ] pub type PACRA = crate :: Reg < u32 , _PACRA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRA ; # [ doc = "`read()` method returns [pacra::R](pacra::R) reader structure" ] impl crate :: Readable for PACRA { } # [ doc = "`write(|w| ..)` method takes [pacra::W](pacra::W) writer structure" ] impl crate :: Writable for PACRA { } # [ doc = "Peripheral Access Control Register" ] pub mod pacra { # [ doc = "Reader of register PACRA" ] pub type R = crate :: R < u32 , super :: PACRA > ; # [ doc = "Writer for register PACRA" ] pub type W = crate :: W < u32 , super :: PACRA > ; # [ doc = "Register PACRA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrb](pacrb) module" ] pub type PACRB = crate :: Reg < u32 , _PACRB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRB ; # [ doc = "`read()` method returns [pacrb::R](pacrb::R) reader structure" ] impl crate :: Readable for PACRB { } # [ doc = "`write(|w| ..)` method takes [pacrb::W](pacrb::W) writer structure" ] impl crate :: Writable for PACRB { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrb { # [ doc = "Reader of register PACRB" ] pub type R = crate :: R < u32 , super :: PACRB > ; # [ doc = "Writer for register PACRB" ] pub type W = crate :: W < u32 , super :: PACRB > ; # [ doc = "Register PACRB `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRB { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrc](pacrc) module" ] pub type PACRC = crate :: Reg < u32 , _PACRC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRC ; # [ doc = "`read()` method returns [pacrc::R](pacrc::R) reader structure" ] impl crate :: Readable for PACRC { } # [ doc = "`write(|w| ..)` method takes [pacrc::W](pacrc::W) writer structure" ] impl crate :: Writable for PACRC { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrc { # [ doc = "Reader of register PACRC" ] pub type R = crate :: R < u32 , super :: PACRC > ; # [ doc = "Writer for register PACRC" ] pub type W = crate :: W < u32 , super :: PACRC > ; # [ doc = "Register PACRC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrd](pacrd) module" ] pub type PACRD = crate :: Reg < u32 , _PACRD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRD ; # [ doc = "`read()` method returns [pacrd::R](pacrd::R) reader structure" ] impl crate :: Readable for PACRD { } # [ doc = "`write(|w| ..)` method takes [pacrd::W](pacrd::W) writer structure" ] impl crate :: Writable for PACRD { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrd { # [ doc = "Reader of register PACRD" ] pub type R = crate :: R < u32 , super :: PACRD > ; # [ doc = "Writer for register PACRD" ] pub type W = crate :: W < u32 , super :: PACRD > ; # [ doc = "Register PACRD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacre](pacre) module" ] pub type PACRE = crate :: Reg < u32 , _PACRE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRE ; # [ doc = "`read()` method returns [pacre::R](pacre::R) reader structure" ] impl crate :: Readable for PACRE { } # [ doc = "`write(|w| ..)` method takes [pacre::W](pacre::W) writer structure" ] impl crate :: Writable for PACRE { } # [ doc = "Peripheral Access Control Register" ] pub mod pacre { # [ doc = "Reader of register PACRE" ] pub type R = crate :: R < u32 , super :: PACRE > ; # [ doc = "Writer for register PACRE" ] pub type W = crate :: W < u32 , super :: PACRE > ; # [ doc = "Register PACRE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrf](pacrf) module" ] pub type PACRF = crate :: Reg < u32 , _PACRF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRF ; # [ doc = "`read()` method returns [pacrf::R](pacrf::R) reader structure" ] impl crate :: Readable for PACRF { } # [ doc = "`write(|w| ..)` method takes [pacrf::W](pacrf::W) writer structure" ] impl crate :: Writable for PACRF { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrf { # [ doc = "Reader of register PACRF" ] pub type R = crate :: R < u32 , super :: PACRF > ; # [ doc = "Writer for register PACRF" ] pub type W = crate :: W < u32 , super :: PACRF > ; # [ doc = "Register PACRF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrg](pacrg) module" ] pub type PACRG = crate :: Reg < u32 , _PACRG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRG ; # [ doc = "`read()` method returns [pacrg::R](pacrg::R) reader structure" ] impl crate :: Readable for PACRG { } # [ doc = "`write(|w| ..)` method takes [pacrg::W](pacrg::W) writer structure" ] impl crate :: Writable for PACRG { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrg { # [ doc = "Reader of register PACRG" ] pub type R = crate :: R < u32 , super :: PACRG > ; # [ doc = "Writer for register PACRG" ] pub type W = crate :: W < u32 , super :: PACRG > ; # [ doc = "Register PACRG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrh](pacrh) module" ] pub type PACRH = crate :: Reg < u32 , _PACRH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRH ; # [ doc = "`read()` method returns [pacrh::R](pacrh::R) reader structure" ] impl crate :: Readable for PACRH { } # [ doc = "`write(|w| ..)` method takes [pacrh::W](pacrh::W) writer structure" ] impl crate :: Writable for PACRH { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrh { # [ doc = "Reader of register PACRH" ] pub type R = crate :: R < u32 , super :: PACRH > ; # [ doc = "Writer for register PACRH" ] pub type W = crate :: W < u32 , super :: PACRH > ; # [ doc = "Register PACRH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRH { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacri](pacri) module" ] pub type PACRI = crate :: Reg < u32 , _PACRI > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRI ; # [ doc = "`read()` method returns [pacri::R](pacri::R) reader structure" ] impl crate :: Readable for PACRI { } # [ doc = "`write(|w| ..)` method takes [pacri::W](pacri::W) writer structure" ] impl crate :: Writable for PACRI { } # [ doc = "Peripheral Access Control Register" ] pub mod pacri { # [ doc = "Reader of register PACRI" ] pub type R = crate :: R < u32 , super :: PACRI > ; # [ doc = "Writer for register PACRI" ] pub type W = crate :: W < u32 , super :: PACRI > ; # [ doc = "Register PACRI `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRI { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrj](pacrj) module" ] pub type PACRJ = crate :: Reg < u32 , _PACRJ > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRJ ; # [ doc = "`read()` method returns [pacrj::R](pacrj::R) reader structure" ] impl crate :: Readable for PACRJ { } # [ doc = "`write(|w| ..)` method takes [pacrj::W](pacrj::W) writer structure" ] impl crate :: Writable for PACRJ { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrj { # [ doc = "Reader of register PACRJ" ] pub type R = crate :: R < u32 , super :: PACRJ > ; # [ doc = "Writer for register PACRJ" ] pub type W = crate :: W < u32 , super :: PACRJ > ; # [ doc = "Register PACRJ `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRJ { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrk](pacrk) module" ] pub type PACRK = crate :: Reg < u32 , _PACRK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRK ; # [ doc = "`read()` method returns [pacrk::R](pacrk::R) reader structure" ] impl crate :: Readable for PACRK { } # [ doc = "`write(|w| ..)` method takes [pacrk::W](pacrk::W) writer structure" ] impl crate :: Writable for PACRK { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrk { # [ doc = "Reader of register PACRK" ] pub type R = crate :: R < u32 , super :: PACRK > ; # [ doc = "Writer for register PACRK" ] pub type W = crate :: W < u32 , super :: PACRK > ; # [ doc = "Register PACRK `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrl](pacrl) module" ] pub type PACRL = crate :: Reg < u32 , _PACRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRL ; # [ doc = "`read()` method returns [pacrl::R](pacrl::R) reader structure" ] impl crate :: Readable for PACRL { } # [ doc = "`write(|w| ..)` method takes [pacrl::W](pacrl::W) writer structure" ] impl crate :: Writable for PACRL { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrl { # [ doc = "Reader of register PACRL" ] pub type R = crate :: R < u32 , super :: PACRL > ; # [ doc = "Writer for register PACRL" ] pub type W = crate :: W < u32 , super :: PACRL > ; # [ doc = "Register PACRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrm](pacrm) module" ] pub type PACRM = crate :: Reg < u32 , _PACRM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRM ; # [ doc = "`read()` method returns [pacrm::R](pacrm::R) reader structure" ] impl crate :: Readable for PACRM { } # [ doc = "`write(|w| ..)` method takes [pacrm::W](pacrm::W) writer structure" ] impl crate :: Writable for PACRM { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrm { # [ doc = "Reader of register PACRM" ] pub type R = crate :: R < u32 , super :: PACRM > ; # [ doc = "Writer for register PACRM" ] pub type W = crate :: W < u32 , super :: PACRM > ; # [ doc = "Register PACRM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrn](pacrn) module" ] pub type PACRN = crate :: Reg < u32 , _PACRN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRN ; # [ doc = "`read()` method returns [pacrn::R](pacrn::R) reader structure" ] impl crate :: Readable for PACRN { } # [ doc = "`write(|w| ..)` method takes [pacrn::W](pacrn::W) writer structure" ] impl crate :: Writable for PACRN { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrn { # [ doc = "Reader of register PACRN" ] pub type R = crate :: R < u32 , super :: PACRN > ; # [ doc = "Writer for register PACRN" ] pub type W = crate :: W < u32 , super :: PACRN > ; # [ doc = "Register PACRN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacro](pacro) module" ] pub type PACRO = crate :: Reg < u32 , _PACRO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRO ; # [ doc = "`read()` method returns [pacro::R](pacro::R) reader structure" ] impl crate :: Readable for PACRO { } # [ doc = "`write(|w| ..)` method takes [pacro::W](pacro::W) writer structure" ] impl crate :: Writable for PACRO { } # [ doc = "Peripheral Access Control Register" ] pub mod pacro { # [ doc = "Reader of register PACRO" ] pub type R = crate :: R < u32 , super :: PACRO > ; # [ doc = "Writer for register PACRO" ] pub type W = crate :: W < u32 , super :: PACRO > ; # [ doc = "Register PACRO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRO { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrp](pacrp) module" ] pub type PACRP = crate :: Reg < u32 , _PACRP > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRP ; # [ doc = "`read()` method returns [pacrp::R](pacrp::R) reader structure" ] impl crate :: Readable for PACRP { } # [ doc = "`write(|w| ..)` method takes [pacrp::W](pacrp::W) writer structure" ] impl crate :: Writable for PACRP { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrp { # [ doc = "Reader of register PACRP" ] pub type R = crate :: R < u32 , super :: PACRP > ; # [ doc = "Writer for register PACRP" ] pub type W = crate :: W < u32 , super :: PACRP > ; # [ doc = "Register PACRP `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRP { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } } # [ doc = "AIPS-Lite Bridge" ] pub struct AIPS1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for AIPS1 { } impl AIPS1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const aips1 :: RegisterBlock { 0x4008_0000 as * const _ } } impl Deref for AIPS1 { type Target = aips1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * AIPS1 :: ptr ( ) } } } # [ doc = "AIPS-Lite Bridge" ] pub mod aips1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Master Privilege Register A" ] pub mpra : MPRA , _reserved1 : [ u8 ; 28usize ] , # [ doc = "0x20 - Peripheral Access Control Register" ] pub pacra : PACRA , # [ doc = "0x24 - Peripheral Access Control Register" ] pub pacrb : PACRB , # [ doc = "0x28 - Peripheral Access Control Register" ] pub pacrc : PACRC , # [ doc = "0x2c - Peripheral Access Control Register" ] pub pacrd : PACRD , _reserved5 : [ u8 ; 16usize ] , # [ doc = "0x40 - Peripheral Access Control Register" ] pub pacre : PACRE , # [ doc = "0x44 - Peripheral Access Control Register" ] pub pacrf : PACRF , # [ doc = "0x48 - Peripheral Access Control Register" ] pub pacrg : PACRG , # [ doc = "0x4c - Peripheral Access Control Register" ] pub pacrh : PACRH , # [ doc = "0x50 - Peripheral Access Control Register" ] pub pacri : PACRI , # [ doc = "0x54 - Peripheral Access Control Register" ] pub pacrj : PACRJ , # [ doc = "0x58 - Peripheral Access Control Register" ] pub pacrk : PACRK , # [ doc = "0x5c - Peripheral Access Control Register" ] pub pacrl : PACRL , # [ doc = "0x60 - Peripheral Access Control Register" ] pub pacrm : PACRM , # [ doc = "0x64 - Peripheral Access Control Register" ] pub pacrn : PACRN , # [ doc = "0x68 - Peripheral Access Control Register" ] pub pacro : PACRO , # [ doc = "0x6c - Peripheral Access Control Register" ] pub pacrp : PACRP , } # [ doc = "Master Privilege Register A\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mpra](mpra) module" ] pub type MPRA = crate :: Reg < u32 , _MPRA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MPRA ; # [ doc = "`read()` method returns [mpra::R](mpra::R) reader structure" ] impl crate :: Readable for MPRA { } # [ doc = "`write(|w| ..)` method takes [mpra::W](mpra::W) writer structure" ] impl crate :: Writable for MPRA { } # [ doc = "Master Privilege Register A" ] pub mod mpra { # [ doc = "Reader of register MPRA" ] pub type R = crate :: R < u32 , super :: MPRA > ; # [ doc = "Writer for register MPRA" ] pub type W = crate :: W < u32 , super :: MPRA > ; # [ doc = "Register MPRA `reset()`'s with value 0x7770_0000" ] impl crate :: ResetValue for super :: MPRA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7770_0000 } } # [ doc = "Master 6 Privilege Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL6_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL6_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL6_A ) -> Self { match variant { MPL6_A :: _0 => false , MPL6_A :: _1 => true } } } # [ doc = "Reader of field `MPL6`" ] pub type MPL6_R = crate :: R < bool , MPL6_A > ; impl MPL6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL6_A { match self . bits { false => MPL6_A :: _0 , true => MPL6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL6_A :: _1 } } # [ doc = "Write proxy for field `MPL6`" ] pub struct MPL6_W < 'a > { w : & 'a mut W , } impl < 'a > MPL6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL6_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Master 6 Trusted for Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW6_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW6_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW6_A ) -> Self { match variant { MTW6_A :: _0 => false , MTW6_A :: _1 => true } } } # [ doc = "Reader of field `MTW6`" ] pub type MTW6_R = crate :: R < bool , MTW6_A > ; impl MTW6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW6_A { match self . bits { false => MTW6_A :: _0 , true => MTW6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW6_A :: _1 } } # [ doc = "Write proxy for field `MTW6`" ] pub struct MTW6_W < 'a > { w : & 'a mut W , } impl < 'a > MTW6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW6_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW6_A :: _1 ) } # [ 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 = "Master 6 Trusted for Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR6_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR6_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR6_A ) -> Self { match variant { MTR6_A :: _0 => false , MTR6_A :: _1 => true } } } # [ doc = "Reader of field `MTR6`" ] pub type MTR6_R = crate :: R < bool , MTR6_A > ; impl MTR6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR6_A { match self . bits { false => MTR6_A :: _0 , true => MTR6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR6_A :: _1 } } # [ doc = "Write proxy for field `MTR6`" ] pub struct MTR6_W < 'a > { w : & 'a mut W , } impl < 'a > MTR6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR6_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR6_A :: _1 ) } # [ 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 = "Master 5 Privilege Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL5_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL5_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL5_A ) -> Self { match variant { MPL5_A :: _0 => false , MPL5_A :: _1 => true } } } # [ doc = "Reader of field `MPL5`" ] pub type MPL5_R = crate :: R < bool , MPL5_A > ; impl MPL5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL5_A { match self . bits { false => MPL5_A :: _0 , true => MPL5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL5_A :: _1 } } # [ doc = "Write proxy for field `MPL5`" ] pub struct MPL5_W < 'a > { w : & 'a mut W , } impl < 'a > MPL5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL5_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Master 5 Trusted For Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW5_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW5_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW5_A ) -> Self { match variant { MTW5_A :: _0 => false , MTW5_A :: _1 => true } } } # [ doc = "Reader of field `MTW5`" ] pub type MTW5_R = crate :: R < bool , MTW5_A > ; impl MTW5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW5_A { match self . bits { false => MTW5_A :: _0 , true => MTW5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW5_A :: _1 } } # [ doc = "Write proxy for field `MTW5`" ] pub struct MTW5_W < 'a > { w : & 'a mut W , } impl < 'a > MTW5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW5_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Master 5 Trusted For Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR5_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR5_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR5_A ) -> Self { match variant { MTR5_A :: _0 => false , MTR5_A :: _1 => true } } } # [ doc = "Reader of field `MTR5`" ] pub type MTR5_R = crate :: R < bool , MTR5_A > ; impl MTR5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR5_A { match self . bits { false => MTR5_A :: _0 , true => MTR5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR5_A :: _1 } } # [ doc = "Write proxy for field `MTR5`" ] pub struct MTR5_W < 'a > { w : & 'a mut W , } impl < 'a > MTR5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR5_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Master 4 Privilege Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL4_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL4_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL4_A ) -> Self { match variant { MPL4_A :: _0 => false , MPL4_A :: _1 => true } } } # [ doc = "Reader of field `MPL4`" ] pub type MPL4_R = crate :: R < bool , MPL4_A > ; impl MPL4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL4_A { match self . bits { false => MPL4_A :: _0 , true => MPL4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL4_A :: _1 } } # [ doc = "Write proxy for field `MPL4`" ] pub struct MPL4_W < 'a > { w : & 'a mut W , } impl < 'a > MPL4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL4_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Master 4 Trusted For Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW4_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW4_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW4_A ) -> Self { match variant { MTW4_A :: _0 => false , MTW4_A :: _1 => true } } } # [ doc = "Reader of field `MTW4`" ] pub type MTW4_R = crate :: R < bool , MTW4_A > ; impl MTW4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW4_A { match self . bits { false => MTW4_A :: _0 , true => MTW4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW4_A :: _1 } } # [ doc = "Write proxy for field `MTW4`" ] pub struct MTW4_W < 'a > { w : & 'a mut W , } impl < 'a > MTW4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW4_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW4_A :: _1 ) } # [ 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 = "Master 4 Trusted For Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR4_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR4_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR4_A ) -> Self { match variant { MTR4_A :: _0 => false , MTR4_A :: _1 => true } } } # [ doc = "Reader of field `MTR4`" ] pub type MTR4_R = crate :: R < bool , MTR4_A > ; impl MTR4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR4_A { match self . bits { false => MTR4_A :: _0 , true => MTR4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR4_A :: _1 } } # [ doc = "Write proxy for field `MTR4`" ] pub struct MTR4_W < 'a > { w : & 'a mut W , } impl < 'a > MTR4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR4_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Master 3 Privilege Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL3_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL3_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL3_A ) -> Self { match variant { MPL3_A :: _0 => false , MPL3_A :: _1 => true } } } # [ doc = "Reader of field `MPL3`" ] pub type MPL3_R = crate :: R < bool , MPL3_A > ; impl MPL3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL3_A { match self . bits { false => MPL3_A :: _0 , true => MPL3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL3_A :: _1 } } # [ doc = "Write proxy for field `MPL3`" ] pub struct MPL3_W < 'a > { w : & 'a mut W , } impl < 'a > MPL3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL3_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Master 3 Trusted For Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW3_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW3_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW3_A ) -> Self { match variant { MTW3_A :: _0 => false , MTW3_A :: _1 => true } } } # [ doc = "Reader of field `MTW3`" ] pub type MTW3_R = crate :: R < bool , MTW3_A > ; impl MTW3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW3_A { match self . bits { false => MTW3_A :: _0 , true => MTW3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW3_A :: _1 } } # [ doc = "Write proxy for field `MTW3`" ] pub struct MTW3_W < 'a > { w : & 'a mut W , } impl < 'a > MTW3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW3_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Master 3 Trusted For Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR3_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR3_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR3_A ) -> Self { match variant { MTR3_A :: _0 => false , MTR3_A :: _1 => true } } } # [ doc = "Reader of field `MTR3`" ] pub type MTR3_R = crate :: R < bool , MTR3_A > ; impl MTR3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR3_A { match self . bits { false => MTR3_A :: _0 , true => MTR3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR3_A :: _1 } } # [ doc = "Write proxy for field `MTR3`" ] pub struct MTR3_W < 'a > { w : & 'a mut W , } impl < 'a > MTR3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR3_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Master 2 Privilege Level\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL2_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL2_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL2_A ) -> Self { match variant { MPL2_A :: _0 => false , MPL2_A :: _1 => true } } } # [ doc = "Reader of field `MPL2`" ] pub type MPL2_R = crate :: R < bool , MPL2_A > ; impl MPL2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL2_A { match self . bits { false => MPL2_A :: _0 , true => MPL2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL2_A :: _1 } } # [ doc = "Write proxy for field `MPL2`" ] pub struct MPL2_W < 'a > { w : & 'a mut W , } impl < 'a > MPL2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL2_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL2_A :: _1 ) } # [ 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 = "Master 2 Trusted For Writes\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW2_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW2_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW2_A ) -> Self { match variant { MTW2_A :: _0 => false , MTW2_A :: _1 => true } } } # [ doc = "Reader of field `MTW2`" ] pub type MTW2_R = crate :: R < bool , MTW2_A > ; impl MTW2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW2_A { match self . bits { false => MTW2_A :: _0 , true => MTW2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW2_A :: _1 } } # [ doc = "Write proxy for field `MTW2`" ] pub struct MTW2_W < 'a > { w : & 'a mut W , } impl < 'a > MTW2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW2_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW2_A :: _1 ) } # [ 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 = "Master 2 Trusted For Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR2_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR2_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR2_A ) -> Self { match variant { MTR2_A :: _0 => false , MTR2_A :: _1 => true } } } # [ doc = "Reader of field `MTR2`" ] pub type MTR2_R = crate :: R < bool , MTR2_A > ; impl MTR2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR2_A { match self . bits { false => MTR2_A :: _0 , true => MTR2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR2_A :: _1 } } # [ doc = "Write proxy for field `MTR2`" ] pub struct MTR2_W < 'a > { w : & 'a mut W , } impl < 'a > MTR2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR2_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Master 1 Privilege Level\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL1_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL1_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL1_A ) -> Self { match variant { MPL1_A :: _0 => false , MPL1_A :: _1 => true } } } # [ doc = "Reader of field `MPL1`" ] pub type MPL1_R = crate :: R < bool , MPL1_A > ; impl MPL1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL1_A { match self . bits { false => MPL1_A :: _0 , true => MPL1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL1_A :: _1 } } # [ doc = "Write proxy for field `MPL1`" ] pub struct MPL1_W < 'a > { w : & 'a mut W , } impl < 'a > MPL1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL1_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL1_A :: _1 ) } # [ 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 = "Master 1 Trusted for Writes\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW1_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW1_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW1_A ) -> Self { match variant { MTW1_A :: _0 => false , MTW1_A :: _1 => true } } } # [ doc = "Reader of field `MTW1`" ] pub type MTW1_R = crate :: R < bool , MTW1_A > ; impl MTW1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW1_A { match self . bits { false => MTW1_A :: _0 , true => MTW1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW1_A :: _1 } } # [ doc = "Write proxy for field `MTW1`" ] pub struct MTW1_W < 'a > { w : & 'a mut W , } impl < 'a > MTW1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW1_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW1_A :: _1 ) } # [ 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 = "Master 1 Trusted for Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR1_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR1_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR1_A ) -> Self { match variant { MTR1_A :: _0 => false , MTR1_A :: _1 => true } } } # [ doc = "Reader of field `MTR1`" ] pub type MTR1_R = crate :: R < bool , MTR1_A > ; impl MTR1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR1_A { match self . bits { false => MTR1_A :: _0 , true => MTR1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR1_A :: _1 } } # [ doc = "Write proxy for field `MTR1`" ] pub struct MTR1_W < 'a > { w : & 'a mut W , } impl < 'a > MTR1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR1_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR1_A :: _1 ) } # [ 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 = "Master 0 Privilege Level\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPL0_A { # [ doc = "0: Accesses from this master are forced to user-mode." ] _0 , # [ doc = "1: Accesses from this master are not forced to user-mode." ] _1 } impl From < MPL0_A > for bool { # [ inline ( always ) ] fn from ( variant : MPL0_A ) -> Self { match variant { MPL0_A :: _0 => false , MPL0_A :: _1 => true } } } # [ doc = "Reader of field `MPL0`" ] pub type MPL0_R = crate :: R < bool , MPL0_A > ; impl MPL0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPL0_A { match self . bits { false => MPL0_A :: _0 , true => MPL0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPL0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPL0_A :: _1 } } # [ doc = "Write proxy for field `MPL0`" ] pub struct MPL0_W < 'a > { w : & 'a mut W , } impl < 'a > MPL0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPL0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from this master are forced to user-mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPL0_A :: _0 ) } # [ doc = "Accesses from this master are not forced to user-mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPL0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Master 0 Trusted For Writes\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTW0_A { # [ doc = "0: This master is not trusted for write accesses." ] _0 , # [ doc = "1: This master is trusted for write accesses." ] _1 } impl From < MTW0_A > for bool { # [ inline ( always ) ] fn from ( variant : MTW0_A ) -> Self { match variant { MTW0_A :: _0 => false , MTW0_A :: _1 => true } } } # [ doc = "Reader of field `MTW0`" ] pub type MTW0_R = crate :: R < bool , MTW0_A > ; impl MTW0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTW0_A { match self . bits { false => MTW0_A :: _0 , true => MTW0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTW0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTW0_A :: _1 } } # [ doc = "Write proxy for field `MTW0`" ] pub struct MTW0_W < 'a > { w : & 'a mut W , } impl < 'a > MTW0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTW0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTW0_A :: _0 ) } # [ doc = "This master is trusted for write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTW0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Master 0 Trusted For Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTR0_A { # [ doc = "0: This master is not trusted for read accesses." ] _0 , # [ doc = "1: This master is trusted for read accesses." ] _1 } impl From < MTR0_A > for bool { # [ inline ( always ) ] fn from ( variant : MTR0_A ) -> Self { match variant { MTR0_A :: _0 => false , MTR0_A :: _1 => true } } } # [ doc = "Reader of field `MTR0`" ] pub type MTR0_R = crate :: R < bool , MTR0_A > ; impl MTR0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTR0_A { match self . bits { false => MTR0_A :: _0 , true => MTR0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTR0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTR0_A :: _1 } } # [ doc = "Write proxy for field `MTR0`" ] pub struct MTR0_W < 'a > { w : & 'a mut W , } impl < 'a > MTR0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTR0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This master is not trusted for read accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTR0_A :: _0 ) } # [ doc = "This master is trusted for read accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTR0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 4 - Master 6 Privilege Level" ] # [ inline ( always ) ] pub fn mpl6 ( & self ) -> MPL6_R { MPL6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Master 6 Trusted for Writes" ] # [ inline ( always ) ] pub fn mtw6 ( & self ) -> MTW6_R { MTW6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Master 6 Trusted for Read" ] # [ inline ( always ) ] pub fn mtr6 ( & self ) -> MTR6_R { MTR6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Master 5 Privilege Level" ] # [ inline ( always ) ] pub fn mpl5 ( & self ) -> MPL5_R { MPL5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Master 5 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw5 ( & self ) -> MTW5_R { MTW5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Master 5 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr5 ( & self ) -> MTR5_R { MTR5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Master 4 Privilege Level" ] # [ inline ( always ) ] pub fn mpl4 ( & self ) -> MPL4_R { MPL4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Master 4 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw4 ( & self ) -> MTW4_R { MTW4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Master 4 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr4 ( & self ) -> MTR4_R { MTR4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Master 3 Privilege Level" ] # [ inline ( always ) ] pub fn mpl3 ( & self ) -> MPL3_R { MPL3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Master 3 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw3 ( & self ) -> MTW3_R { MTW3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Master 3 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr3 ( & self ) -> MTR3_R { MTR3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Master 2 Privilege Level" ] # [ inline ( always ) ] pub fn mpl2 ( & self ) -> MPL2_R { MPL2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Master 2 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw2 ( & self ) -> MTW2_R { MTW2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Master 2 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr2 ( & self ) -> MTR2_R { MTR2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Master 1 Privilege Level" ] # [ inline ( always ) ] pub fn mpl1 ( & self ) -> MPL1_R { MPL1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Master 1 Trusted for Writes" ] # [ inline ( always ) ] pub fn mtw1 ( & self ) -> MTW1_R { MTW1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Master 1 Trusted for Read" ] # [ inline ( always ) ] pub fn mtr1 ( & self ) -> MTR1_R { MTR1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Master 0 Privilege Level" ] # [ inline ( always ) ] pub fn mpl0 ( & self ) -> MPL0_R { MPL0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Master 0 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw0 ( & self ) -> MTW0_R { MTW0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Master 0 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr0 ( & self ) -> MTR0_R { MTR0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Master 6 Privilege Level" ] # [ inline ( always ) ] pub fn mpl6 ( & mut self ) -> MPL6_W { MPL6_W { w : self } } # [ doc = "Bit 5 - Master 6 Trusted for Writes" ] # [ inline ( always ) ] pub fn mtw6 ( & mut self ) -> MTW6_W { MTW6_W { w : self } } # [ doc = "Bit 6 - Master 6 Trusted for Read" ] # [ inline ( always ) ] pub fn mtr6 ( & mut self ) -> MTR6_W { MTR6_W { w : self } } # [ doc = "Bit 8 - Master 5 Privilege Level" ] # [ inline ( always ) ] pub fn mpl5 ( & mut self ) -> MPL5_W { MPL5_W { w : self } } # [ doc = "Bit 9 - Master 5 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw5 ( & mut self ) -> MTW5_W { MTW5_W { w : self } } # [ doc = "Bit 10 - Master 5 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr5 ( & mut self ) -> MTR5_W { MTR5_W { w : self } } # [ doc = "Bit 12 - Master 4 Privilege Level" ] # [ inline ( always ) ] pub fn mpl4 ( & mut self ) -> MPL4_W { MPL4_W { w : self } } # [ doc = "Bit 13 - Master 4 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw4 ( & mut self ) -> MTW4_W { MTW4_W { w : self } } # [ doc = "Bit 14 - Master 4 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr4 ( & mut self ) -> MTR4_W { MTR4_W { w : self } } # [ doc = "Bit 16 - Master 3 Privilege Level" ] # [ inline ( always ) ] pub fn mpl3 ( & mut self ) -> MPL3_W { MPL3_W { w : self } } # [ doc = "Bit 17 - Master 3 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw3 ( & mut self ) -> MTW3_W { MTW3_W { w : self } } # [ doc = "Bit 18 - Master 3 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr3 ( & mut self ) -> MTR3_W { MTR3_W { w : self } } # [ doc = "Bit 20 - Master 2 Privilege Level" ] # [ inline ( always ) ] pub fn mpl2 ( & mut self ) -> MPL2_W { MPL2_W { w : self } } # [ doc = "Bit 21 - Master 2 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw2 ( & mut self ) -> MTW2_W { MTW2_W { w : self } } # [ doc = "Bit 22 - Master 2 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr2 ( & mut self ) -> MTR2_W { MTR2_W { w : self } } # [ doc = "Bit 24 - Master 1 Privilege Level" ] # [ inline ( always ) ] pub fn mpl1 ( & mut self ) -> MPL1_W { MPL1_W { w : self } } # [ doc = "Bit 25 - Master 1 Trusted for Writes" ] # [ inline ( always ) ] pub fn mtw1 ( & mut self ) -> MTW1_W { MTW1_W { w : self } } # [ doc = "Bit 26 - Master 1 Trusted for Read" ] # [ inline ( always ) ] pub fn mtr1 ( & mut self ) -> MTR1_W { MTR1_W { w : self } } # [ doc = "Bit 28 - Master 0 Privilege Level" ] # [ inline ( always ) ] pub fn mpl0 ( & mut self ) -> MPL0_W { MPL0_W { w : self } } # [ doc = "Bit 29 - Master 0 Trusted For Writes" ] # [ inline ( always ) ] pub fn mtw0 ( & mut self ) -> MTW0_W { MTW0_W { w : self } } # [ doc = "Bit 30 - Master 0 Trusted For Read" ] # [ inline ( always ) ] pub fn mtr0 ( & mut self ) -> MTR0_W { MTR0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacra](pacra) module" ] pub type PACRA = crate :: Reg < u32 , _PACRA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRA ; # [ doc = "`read()` method returns [pacra::R](pacra::R) reader structure" ] impl crate :: Readable for PACRA { } # [ doc = "`write(|w| ..)` method takes [pacra::W](pacra::W) writer structure" ] impl crate :: Writable for PACRA { } # [ doc = "Peripheral Access Control Register" ] pub mod pacra { # [ doc = "Reader of register PACRA" ] pub type R = crate :: R < u32 , super :: PACRA > ; # [ doc = "Writer for register PACRA" ] pub type W = crate :: W < u32 , super :: PACRA > ; # [ doc = "Register PACRA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrb](pacrb) module" ] pub type PACRB = crate :: Reg < u32 , _PACRB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRB ; # [ doc = "`read()` method returns [pacrb::R](pacrb::R) reader structure" ] impl crate :: Readable for PACRB { } # [ doc = "`write(|w| ..)` method takes [pacrb::W](pacrb::W) writer structure" ] impl crate :: Writable for PACRB { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrb { # [ doc = "Reader of register PACRB" ] pub type R = crate :: R < u32 , super :: PACRB > ; # [ doc = "Writer for register PACRB" ] pub type W = crate :: W < u32 , super :: PACRB > ; # [ doc = "Register PACRB `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRB { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrc](pacrc) module" ] pub type PACRC = crate :: Reg < u32 , _PACRC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRC ; # [ doc = "`read()` method returns [pacrc::R](pacrc::R) reader structure" ] impl crate :: Readable for PACRC { } # [ doc = "`write(|w| ..)` method takes [pacrc::W](pacrc::W) writer structure" ] impl crate :: Writable for PACRC { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrc { # [ doc = "Reader of register PACRC" ] pub type R = crate :: R < u32 , super :: PACRC > ; # [ doc = "Writer for register PACRC" ] pub type W = crate :: W < u32 , super :: PACRC > ; # [ doc = "Register PACRC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrd](pacrd) module" ] pub type PACRD = crate :: Reg < u32 , _PACRD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRD ; # [ doc = "`read()` method returns [pacrd::R](pacrd::R) reader structure" ] impl crate :: Readable for PACRD { } # [ doc = "`write(|w| ..)` method takes [pacrd::W](pacrd::W) writer structure" ] impl crate :: Writable for PACRD { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrd { # [ doc = "Reader of register PACRD" ] pub type R = crate :: R < u32 , super :: PACRD > ; # [ doc = "Writer for register PACRD" ] pub type W = crate :: W < u32 , super :: PACRD > ; # [ doc = "Register PACRD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacre](pacre) module" ] pub type PACRE = crate :: Reg < u32 , _PACRE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRE ; # [ doc = "`read()` method returns [pacre::R](pacre::R) reader structure" ] impl crate :: Readable for PACRE { } # [ doc = "`write(|w| ..)` method takes [pacre::W](pacre::W) writer structure" ] impl crate :: Writable for PACRE { } # [ doc = "Peripheral Access Control Register" ] pub mod pacre { # [ doc = "Reader of register PACRE" ] pub type R = crate :: R < u32 , super :: PACRE > ; # [ doc = "Writer for register PACRE" ] pub type W = crate :: W < u32 , super :: PACRE > ; # [ doc = "Register PACRE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrf](pacrf) module" ] pub type PACRF = crate :: Reg < u32 , _PACRF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRF ; # [ doc = "`read()` method returns [pacrf::R](pacrf::R) reader structure" ] impl crate :: Readable for PACRF { } # [ doc = "`write(|w| ..)` method takes [pacrf::W](pacrf::W) writer structure" ] impl crate :: Writable for PACRF { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrf { # [ doc = "Reader of register PACRF" ] pub type R = crate :: R < u32 , super :: PACRF > ; # [ doc = "Writer for register PACRF" ] pub type W = crate :: W < u32 , super :: PACRF > ; # [ doc = "Register PACRF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrg](pacrg) module" ] pub type PACRG = crate :: Reg < u32 , _PACRG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRG ; # [ doc = "`read()` method returns [pacrg::R](pacrg::R) reader structure" ] impl crate :: Readable for PACRG { } # [ doc = "`write(|w| ..)` method takes [pacrg::W](pacrg::W) writer structure" ] impl crate :: Writable for PACRG { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrg { # [ doc = "Reader of register PACRG" ] pub type R = crate :: R < u32 , super :: PACRG > ; # [ doc = "Writer for register PACRG" ] pub type W = crate :: W < u32 , super :: PACRG > ; # [ doc = "Register PACRG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrh](pacrh) module" ] pub type PACRH = crate :: Reg < u32 , _PACRH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRH ; # [ doc = "`read()` method returns [pacrh::R](pacrh::R) reader structure" ] impl crate :: Readable for PACRH { } # [ doc = "`write(|w| ..)` method takes [pacrh::W](pacrh::W) writer structure" ] impl crate :: Writable for PACRH { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrh { # [ doc = "Reader of register PACRH" ] pub type R = crate :: R < u32 , super :: PACRH > ; # [ doc = "Writer for register PACRH" ] pub type W = crate :: W < u32 , super :: PACRH > ; # [ doc = "Register PACRH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRH { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacri](pacri) module" ] pub type PACRI = crate :: Reg < u32 , _PACRI > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRI ; # [ doc = "`read()` method returns [pacri::R](pacri::R) reader structure" ] impl crate :: Readable for PACRI { } # [ doc = "`write(|w| ..)` method takes [pacri::W](pacri::W) writer structure" ] impl crate :: Writable for PACRI { } # [ doc = "Peripheral Access Control Register" ] pub mod pacri { # [ doc = "Reader of register PACRI" ] pub type R = crate :: R < u32 , super :: PACRI > ; # [ doc = "Writer for register PACRI" ] pub type W = crate :: W < u32 , super :: PACRI > ; # [ doc = "Register PACRI `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRI { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrj](pacrj) module" ] pub type PACRJ = crate :: Reg < u32 , _PACRJ > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRJ ; # [ doc = "`read()` method returns [pacrj::R](pacrj::R) reader structure" ] impl crate :: Readable for PACRJ { } # [ doc = "`write(|w| ..)` method takes [pacrj::W](pacrj::W) writer structure" ] impl crate :: Writable for PACRJ { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrj { # [ doc = "Reader of register PACRJ" ] pub type R = crate :: R < u32 , super :: PACRJ > ; # [ doc = "Writer for register PACRJ" ] pub type W = crate :: W < u32 , super :: PACRJ > ; # [ doc = "Register PACRJ `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRJ { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrk](pacrk) module" ] pub type PACRK = crate :: Reg < u32 , _PACRK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRK ; # [ doc = "`read()` method returns [pacrk::R](pacrk::R) reader structure" ] impl crate :: Readable for PACRK { } # [ doc = "`write(|w| ..)` method takes [pacrk::W](pacrk::W) writer structure" ] impl crate :: Writable for PACRK { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrk { # [ doc = "Reader of register PACRK" ] pub type R = crate :: R < u32 , super :: PACRK > ; # [ doc = "Writer for register PACRK" ] pub type W = crate :: W < u32 , super :: PACRK > ; # [ doc = "Register PACRK `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrl](pacrl) module" ] pub type PACRL = crate :: Reg < u32 , _PACRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRL ; # [ doc = "`read()` method returns [pacrl::R](pacrl::R) reader structure" ] impl crate :: Readable for PACRL { } # [ doc = "`write(|w| ..)` method takes [pacrl::W](pacrl::W) writer structure" ] impl crate :: Writable for PACRL { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrl { # [ doc = "Reader of register PACRL" ] pub type R = crate :: R < u32 , super :: PACRL > ; # [ doc = "Writer for register PACRL" ] pub type W = crate :: W < u32 , super :: PACRL > ; # [ doc = "Register PACRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrm](pacrm) module" ] pub type PACRM = crate :: Reg < u32 , _PACRM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRM ; # [ doc = "`read()` method returns [pacrm::R](pacrm::R) reader structure" ] impl crate :: Readable for PACRM { } # [ doc = "`write(|w| ..)` method takes [pacrm::W](pacrm::W) writer structure" ] impl crate :: Writable for PACRM { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrm { # [ doc = "Reader of register PACRM" ] pub type R = crate :: R < u32 , super :: PACRM > ; # [ doc = "Writer for register PACRM" ] pub type W = crate :: W < u32 , super :: PACRM > ; # [ doc = "Register PACRM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrn](pacrn) module" ] pub type PACRN = crate :: Reg < u32 , _PACRN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRN ; # [ doc = "`read()` method returns [pacrn::R](pacrn::R) reader structure" ] impl crate :: Readable for PACRN { } # [ doc = "`write(|w| ..)` method takes [pacrn::W](pacrn::W) writer structure" ] impl crate :: Writable for PACRN { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrn { # [ doc = "Reader of register PACRN" ] pub type R = crate :: R < u32 , super :: PACRN > ; # [ doc = "Writer for register PACRN" ] pub type W = crate :: W < u32 , super :: PACRN > ; # [ doc = "Register PACRN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacro](pacro) module" ] pub type PACRO = crate :: Reg < u32 , _PACRO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRO ; # [ doc = "`read()` method returns [pacro::R](pacro::R) reader structure" ] impl crate :: Readable for PACRO { } # [ doc = "`write(|w| ..)` method takes [pacro::W](pacro::W) writer structure" ] impl crate :: Writable for PACRO { } # [ doc = "Peripheral Access Control Register" ] pub mod pacro { # [ doc = "Reader of register PACRO" ] pub type R = crate :: R < u32 , super :: PACRO > ; # [ doc = "Writer for register PACRO" ] pub type W = crate :: W < u32 , super :: PACRO > ; # [ doc = "Register PACRO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRO { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } # [ doc = "Peripheral Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pacrp](pacrp) module" ] pub type PACRP = crate :: Reg < u32 , _PACRP > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PACRP ; # [ doc = "`read()` method returns [pacrp::R](pacrp::R) reader structure" ] impl crate :: Readable for PACRP { } # [ doc = "`write(|w| ..)` method takes [pacrp::W](pacrp::W) writer structure" ] impl crate :: Writable for PACRP { } # [ doc = "Peripheral Access Control Register" ] pub mod pacrp { # [ doc = "Reader of register PACRP" ] pub type R = crate :: R < u32 , super :: PACRP > ; # [ doc = "Writer for register PACRP" ] pub type W = crate :: W < u32 , super :: PACRP > ; # [ doc = "Register PACRP `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PACRP { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP7_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP7_A > for bool { # [ inline ( always ) ] fn from ( variant : TP7_A ) -> Self { match variant { TP7_A :: _0 => false , TP7_A :: _1 => true } } } # [ doc = "Reader of field `TP7`" ] pub type TP7_R = crate :: R < bool , TP7_A > ; impl TP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP7_A { match self . bits { false => TP7_A :: _0 , true => TP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP7_A :: _1 } } # [ doc = "Write proxy for field `TP7`" ] pub struct TP7_W < 'a > { w : & 'a mut W , } impl < 'a > TP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP7_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP7_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP7_A > for bool { # [ inline ( always ) ] fn from ( variant : WP7_A ) -> Self { match variant { WP7_A :: _0 => false , WP7_A :: _1 => true } } } # [ doc = "Reader of field `WP7`" ] pub type WP7_R = crate :: R < bool , WP7_A > ; impl WP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP7_A { match self . bits { false => WP7_A :: _0 , true => WP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP7_A :: _1 } } # [ doc = "Write proxy for field `WP7`" ] pub struct WP7_W < 'a > { w : & 'a mut W , } impl < 'a > WP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP7_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP7_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP7_A > for bool { # [ inline ( always ) ] fn from ( variant : SP7_A ) -> Self { match variant { SP7_A :: _0 => false , SP7_A :: _1 => true } } } # [ doc = "Reader of field `SP7`" ] pub type SP7_R = crate :: R < bool , SP7_A > ; impl SP7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP7_A { match self . bits { false => SP7_A :: _0 , true => SP7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP7_A :: _1 } } # [ doc = "Write proxy for field `SP7`" ] pub struct SP7_W < 'a > { w : & 'a mut W , } impl < 'a > SP7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP7_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP6_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP6_A > for bool { # [ inline ( always ) ] fn from ( variant : TP6_A ) -> Self { match variant { TP6_A :: _0 => false , TP6_A :: _1 => true } } } # [ doc = "Reader of field `TP6`" ] pub type TP6_R = crate :: R < bool , TP6_A > ; impl TP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP6_A { match self . bits { false => TP6_A :: _0 , true => TP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP6_A :: _1 } } # [ doc = "Write proxy for field `TP6`" ] pub struct TP6_W < 'a > { w : & 'a mut W , } impl < 'a > TP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP6_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP6_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP6_A > for bool { # [ inline ( always ) ] fn from ( variant : WP6_A ) -> Self { match variant { WP6_A :: _0 => false , WP6_A :: _1 => true } } } # [ doc = "Reader of field `WP6`" ] pub type WP6_R = crate :: R < bool , WP6_A > ; impl WP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP6_A { match self . bits { false => WP6_A :: _0 , true => WP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP6_A :: _1 } } # [ doc = "Write proxy for field `WP6`" ] pub struct WP6_W < 'a > { w : & 'a mut W , } impl < 'a > WP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP6_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP6_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP6_A > for bool { # [ inline ( always ) ] fn from ( variant : SP6_A ) -> Self { match variant { SP6_A :: _0 => false , SP6_A :: _1 => true } } } # [ doc = "Reader of field `SP6`" ] pub type SP6_R = crate :: R < bool , SP6_A > ; impl SP6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP6_A { match self . bits { false => SP6_A :: _0 , true => SP6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP6_A :: _1 } } # [ doc = "Write proxy for field `SP6`" ] pub struct SP6_W < 'a > { w : & 'a mut W , } impl < 'a > SP6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP6_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP5_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP5_A > for bool { # [ inline ( always ) ] fn from ( variant : TP5_A ) -> Self { match variant { TP5_A :: _0 => false , TP5_A :: _1 => true } } } # [ doc = "Reader of field `TP5`" ] pub type TP5_R = crate :: R < bool , TP5_A > ; impl TP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP5_A { match self . bits { false => TP5_A :: _0 , true => TP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP5_A :: _1 } } # [ doc = "Write proxy for field `TP5`" ] pub struct TP5_W < 'a > { w : & 'a mut W , } impl < 'a > TP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP5_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP5_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP5_A > for bool { # [ inline ( always ) ] fn from ( variant : WP5_A ) -> Self { match variant { WP5_A :: _0 => false , WP5_A :: _1 => true } } } # [ doc = "Reader of field `WP5`" ] pub type WP5_R = crate :: R < bool , WP5_A > ; impl WP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP5_A { match self . bits { false => WP5_A :: _0 , true => WP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP5_A :: _1 } } # [ doc = "Write proxy for field `WP5`" ] pub struct WP5_W < 'a > { w : & 'a mut W , } impl < 'a > WP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP5_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP5_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP5_A > for bool { # [ inline ( always ) ] fn from ( variant : SP5_A ) -> Self { match variant { SP5_A :: _0 => false , SP5_A :: _1 => true } } } # [ doc = "Reader of field `SP5`" ] pub type SP5_R = crate :: R < bool , SP5_A > ; impl SP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP5_A { match self . bits { false => SP5_A :: _0 , true => SP5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP5_A :: _1 } } # [ doc = "Write proxy for field `SP5`" ] pub struct SP5_W < 'a > { w : & 'a mut W , } impl < 'a > SP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP5_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP4_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP4_A > for bool { # [ inline ( always ) ] fn from ( variant : TP4_A ) -> Self { match variant { TP4_A :: _0 => false , TP4_A :: _1 => true } } } # [ doc = "Reader of field `TP4`" ] pub type TP4_R = crate :: R < bool , TP4_A > ; impl TP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP4_A { match self . bits { false => TP4_A :: _0 , true => TP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP4_A :: _1 } } # [ doc = "Write proxy for field `TP4`" ] pub struct TP4_W < 'a > { w : & 'a mut W , } impl < 'a > TP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP4_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP4_A > for bool { # [ inline ( always ) ] fn from ( variant : WP4_A ) -> Self { match variant { WP4_A :: _0 => false , WP4_A :: _1 => true } } } # [ doc = "Reader of field `WP4`" ] pub type WP4_R = crate :: R < bool , WP4_A > ; impl WP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP4_A { match self . bits { false => WP4_A :: _0 , true => WP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP4_A :: _1 } } # [ doc = "Write proxy for field `WP4`" ] pub struct WP4_W < 'a > { w : & 'a mut W , } impl < 'a > WP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP4_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP4_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP4_A > for bool { # [ inline ( always ) ] fn from ( variant : SP4_A ) -> Self { match variant { SP4_A :: _0 => false , SP4_A :: _1 => true } } } # [ doc = "Reader of field `SP4`" ] pub type SP4_R = crate :: R < bool , SP4_A > ; impl SP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP4_A { match self . bits { false => SP4_A :: _0 , true => SP4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP4_A :: _1 } } # [ doc = "Write proxy for field `SP4`" ] pub struct SP4_W < 'a > { w : & 'a mut W , } impl < 'a > SP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP4_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP3_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP3_A > for bool { # [ inline ( always ) ] fn from ( variant : TP3_A ) -> Self { match variant { TP3_A :: _0 => false , TP3_A :: _1 => true } } } # [ doc = "Reader of field `TP3`" ] pub type TP3_R = crate :: R < bool , TP3_A > ; impl TP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP3_A { match self . bits { false => TP3_A :: _0 , true => TP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP3_A :: _1 } } # [ doc = "Write proxy for field `TP3`" ] pub struct TP3_W < 'a > { w : & 'a mut W , } impl < 'a > TP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP3_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP3_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP3_A > for bool { # [ inline ( always ) ] fn from ( variant : WP3_A ) -> Self { match variant { WP3_A :: _0 => false , WP3_A :: _1 => true } } } # [ doc = "Reader of field `WP3`" ] pub type WP3_R = crate :: R < bool , WP3_A > ; impl WP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP3_A { match self . bits { false => WP3_A :: _0 , true => WP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP3_A :: _1 } } # [ doc = "Write proxy for field `WP3`" ] pub struct WP3_W < 'a > { w : & 'a mut W , } impl < 'a > WP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP3_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP3_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP3_A > for bool { # [ inline ( always ) ] fn from ( variant : SP3_A ) -> Self { match variant { SP3_A :: _0 => false , SP3_A :: _1 => true } } } # [ doc = "Reader of field `SP3`" ] pub type SP3_R = crate :: R < bool , SP3_A > ; impl SP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP3_A { match self . bits { false => SP3_A :: _0 , true => SP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP3_A :: _1 } } # [ doc = "Write proxy for field `SP3`" ] pub struct SP3_W < 'a > { w : & 'a mut W , } impl < 'a > SP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP3_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP2_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP2_A > for bool { # [ inline ( always ) ] fn from ( variant : TP2_A ) -> Self { match variant { TP2_A :: _0 => false , TP2_A :: _1 => true } } } # [ doc = "Reader of field `TP2`" ] pub type TP2_R = crate :: R < bool , TP2_A > ; impl TP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP2_A { match self . bits { false => TP2_A :: _0 , true => TP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP2_A :: _1 } } # [ doc = "Write proxy for field `TP2`" ] pub struct TP2_W < 'a > { w : & 'a mut W , } impl < 'a > TP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP2_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP2_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP2_A > for bool { # [ inline ( always ) ] fn from ( variant : WP2_A ) -> Self { match variant { WP2_A :: _0 => false , WP2_A :: _1 => true } } } # [ doc = "Reader of field `WP2`" ] pub type WP2_R = crate :: R < bool , WP2_A > ; impl WP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP2_A { match self . bits { false => WP2_A :: _0 , true => WP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP2_A :: _1 } } # [ doc = "Write proxy for field `WP2`" ] pub struct WP2_W < 'a > { w : & 'a mut W , } impl < 'a > WP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP2_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP2_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP2_A > for bool { # [ inline ( always ) ] fn from ( variant : SP2_A ) -> Self { match variant { SP2_A :: _0 => false , SP2_A :: _1 => true } } } # [ doc = "Reader of field `SP2`" ] pub type SP2_R = crate :: R < bool , SP2_A > ; impl SP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP2_A { match self . bits { false => SP2_A :: _0 , true => SP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP2_A :: _1 } } # [ doc = "Write proxy for field `SP2`" ] pub struct SP2_W < 'a > { w : & 'a mut W , } impl < 'a > SP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP1_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP1_A > for bool { # [ inline ( always ) ] fn from ( variant : TP1_A ) -> Self { match variant { TP1_A :: _0 => false , TP1_A :: _1 => true } } } # [ doc = "Reader of field `TP1`" ] pub type TP1_R = crate :: R < bool , TP1_A > ; impl TP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP1_A { match self . bits { false => TP1_A :: _0 , true => TP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP1_A :: _1 } } # [ doc = "Write proxy for field `TP1`" ] pub struct TP1_W < 'a > { w : & 'a mut W , } impl < 'a > TP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP1_A :: _1 ) } # [ 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 = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP1_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP1_A > for bool { # [ inline ( always ) ] fn from ( variant : WP1_A ) -> Self { match variant { WP1_A :: _0 => false , WP1_A :: _1 => true } } } # [ doc = "Reader of field `WP1`" ] pub type WP1_R = crate :: R < bool , WP1_A > ; impl WP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP1_A { match self . bits { false => WP1_A :: _0 , true => WP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP1_A :: _1 } } # [ doc = "Write proxy for field `WP1`" ] pub struct WP1_W < 'a > { w : & 'a mut W , } impl < 'a > WP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP1_A :: _1 ) } # [ 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 = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP1_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP1_A > for bool { # [ inline ( always ) ] fn from ( variant : SP1_A ) -> Self { match variant { SP1_A :: _0 => false , SP1_A :: _1 => true } } } # [ doc = "Reader of field `SP1`" ] pub type SP1_R = crate :: R < bool , SP1_A > ; impl SP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP1_A { match self . bits { false => SP1_A :: _0 , true => SP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP1_A :: _1 } } # [ doc = "Write proxy for field `SP1`" ] pub struct SP1_W < 'a > { w : & 'a mut W , } impl < 'a > SP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP1_A :: _1 ) } # [ 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 = "Trusted Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TP0_A { # [ doc = "0: Accesses from an untrusted master are allowed." ] _0 , # [ doc = "1: Accesses from an untrusted master are not allowed." ] _1 } impl From < TP0_A > for bool { # [ inline ( always ) ] fn from ( variant : TP0_A ) -> Self { match variant { TP0_A :: _0 => false , TP0_A :: _1 => true } } } # [ doc = "Reader of field `TP0`" ] pub type TP0_R = crate :: R < bool , TP0_A > ; impl TP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TP0_A { match self . bits { false => TP0_A :: _0 , true => TP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TP0_A :: _1 } } # [ doc = "Write proxy for field `TP0`" ] pub struct TP0_W < 'a > { w : & 'a mut W , } impl < 'a > TP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Accesses from an untrusted master are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _0 ) } # [ doc = "Accesses from an untrusted master are not allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TP0_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP0_A { # [ doc = "0: This peripheral allows write accesses." ] _0 , # [ doc = "1: This peripheral is write protected." ] _1 } impl From < WP0_A > for bool { # [ inline ( always ) ] fn from ( variant : WP0_A ) -> Self { match variant { WP0_A :: _0 => false , WP0_A :: _1 => true } } } # [ doc = "Reader of field `WP0`" ] pub type WP0_R = crate :: R < bool , WP0_A > ; impl WP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP0_A { match self . bits { false => WP0_A :: _0 , true => WP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP0_A :: _1 } } # [ doc = "Write proxy for field `WP0`" ] pub struct WP0_W < 'a > { w : & 'a mut W , } impl < 'a > WP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral allows write accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _0 ) } # [ doc = "This peripheral is write protected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP0_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Supervisor Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SP0_A { # [ doc = "0: This peripheral does not require supervisor privilege level for accesses." ] _0 , # [ doc = "1: This peripheral requires supervisor privilege level for accesses." ] _1 } impl From < SP0_A > for bool { # [ inline ( always ) ] fn from ( variant : SP0_A ) -> Self { match variant { SP0_A :: _0 => false , SP0_A :: _1 => true } } } # [ doc = "Reader of field `SP0`" ] pub type SP0_R = crate :: R < bool , SP0_A > ; impl SP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SP0_A { match self . bits { false => SP0_A :: _0 , true => SP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SP0_A :: _1 } } # [ doc = "Write proxy for field `SP0`" ] pub struct SP0_W < 'a > { w : & 'a mut W , } impl < 'a > SP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "This peripheral does not require supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _0 ) } # [ doc = "This peripheral requires supervisor privilege level for accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SP0_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & self ) -> TP7_R { TP7_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & self ) -> WP7_R { WP7_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & self ) -> SP7_R { SP7_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & self ) -> TP6_R { TP6_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & self ) -> WP6_R { WP6_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & self ) -> SP6_R { SP6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & self ) -> TP5_R { TP5_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & self ) -> WP5_R { WP5_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & self ) -> SP5_R { SP5_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & self ) -> TP4_R { TP4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & self ) -> WP4_R { WP4_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & self ) -> SP4_R { SP4_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & self ) -> TP3_R { TP3_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & self ) -> WP3_R { WP3_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & self ) -> SP3_R { SP3_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & self ) -> TP2_R { TP2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & self ) -> WP2_R { WP2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & self ) -> SP2_R { SP2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & self ) -> TP1_R { TP1_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & self ) -> WP1_R { WP1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & self ) -> SP1_R { SP1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & self ) -> TP0_R { TP0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & self ) -> WP0_R { WP0_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & self ) -> SP0_R { SP0_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp7 ( & mut self ) -> TP7_W { TP7_W { w : self } } # [ doc = "Bit 1 - Write Protect" ] # [ inline ( always ) ] pub fn wp7 ( & mut self ) -> WP7_W { WP7_W { w : self } } # [ doc = "Bit 2 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp7 ( & mut self ) -> SP7_W { SP7_W { w : self } } # [ doc = "Bit 4 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp6 ( & mut self ) -> TP6_W { TP6_W { w : self } } # [ doc = "Bit 5 - Write Protect" ] # [ inline ( always ) ] pub fn wp6 ( & mut self ) -> WP6_W { WP6_W { w : self } } # [ doc = "Bit 6 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp6 ( & mut self ) -> SP6_W { SP6_W { w : self } } # [ doc = "Bit 8 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp5 ( & mut self ) -> TP5_W { TP5_W { w : self } } # [ doc = "Bit 9 - Write Protect" ] # [ inline ( always ) ] pub fn wp5 ( & mut self ) -> WP5_W { WP5_W { w : self } } # [ doc = "Bit 10 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp5 ( & mut self ) -> SP5_W { SP5_W { w : self } } # [ doc = "Bit 12 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp4 ( & mut self ) -> TP4_W { TP4_W { w : self } } # [ doc = "Bit 13 - Write Protect" ] # [ inline ( always ) ] pub fn wp4 ( & mut self ) -> WP4_W { WP4_W { w : self } } # [ doc = "Bit 14 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp4 ( & mut self ) -> SP4_W { SP4_W { w : self } } # [ doc = "Bit 16 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp3 ( & mut self ) -> TP3_W { TP3_W { w : self } } # [ doc = "Bit 17 - Write Protect" ] # [ inline ( always ) ] pub fn wp3 ( & mut self ) -> WP3_W { WP3_W { w : self } } # [ doc = "Bit 18 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp3 ( & mut self ) -> SP3_W { SP3_W { w : self } } # [ doc = "Bit 20 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp2 ( & mut self ) -> TP2_W { TP2_W { w : self } } # [ doc = "Bit 21 - Write Protect" ] # [ inline ( always ) ] pub fn wp2 ( & mut self ) -> WP2_W { WP2_W { w : self } } # [ doc = "Bit 22 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp2 ( & mut self ) -> SP2_W { SP2_W { w : self } } # [ doc = "Bit 24 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp1 ( & mut self ) -> TP1_W { TP1_W { w : self } } # [ doc = "Bit 25 - Write Protect" ] # [ inline ( always ) ] pub fn wp1 ( & mut self ) -> WP1_W { WP1_W { w : self } } # [ doc = "Bit 26 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp1 ( & mut self ) -> SP1_W { SP1_W { w : self } } # [ doc = "Bit 28 - Trusted Protect" ] # [ inline ( always ) ] pub fn tp0 ( & mut self ) -> TP0_W { TP0_W { w : self } } # [ doc = "Bit 29 - Write Protect" ] # [ inline ( always ) ] pub fn wp0 ( & mut self ) -> WP0_W { WP0_W { w : self } } # [ doc = "Bit 30 - Supervisor Protect" ] # [ inline ( always ) ] pub fn sp0 ( & mut self ) -> SP0_W { SP0_W { w : self } } } } } # [ doc = "Crossbar switch" ] pub struct AXBS { _marker : PhantomData < * const ( ) > } unsafe impl Send for AXBS { } impl AXBS { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const axbs :: RegisterBlock { 0x4000_4000 as * const _ } } impl Deref for AXBS { type Target = axbs :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * AXBS :: ptr ( ) } } } # [ doc = "Crossbar switch" ] pub mod axbs { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Priority Registers Slave" ] pub prs0 : PRS , _reserved1 : [ u8 ; 12usize ] , # [ doc = "0x10 - Control Register" ] pub crs0 : CRS , _reserved2 : [ u8 ; 236usize ] , # [ doc = "0x100 - Priority Registers Slave" ] pub prs1 : PRS , _reserved3 : [ u8 ; 12usize ] , # [ doc = "0x110 - Control Register" ] pub crs1 : CRS , _reserved4 : [ u8 ; 236usize ] , # [ doc = "0x200 - Priority Registers Slave" ] pub prs2 : PRS , _reserved5 : [ u8 ; 12usize ] , # [ doc = "0x210 - Control Register" ] pub crs2 : CRS , _reserved6 : [ u8 ; 236usize ] , # [ doc = "0x300 - Priority Registers Slave" ] pub prs3 : PRS , _reserved7 : [ u8 ; 12usize ] , # [ doc = "0x310 - Control Register" ] pub crs3 : CRS , _reserved8 : [ u8 ; 236usize ] , # [ doc = "0x400 - Priority Registers Slave" ] pub prs4 : PRS , _reserved9 : [ u8 ; 12usize ] , # [ doc = "0x410 - Control Register" ] pub crs4 : CRS , _reserved10 : [ u8 ; 1004usize ] , # [ doc = "0x800 - Master General Purpose Control Register" ] pub mgpcr0 : MGPCR , _reserved11 : [ u8 ; 252usize ] , # [ doc = "0x900 - Master General Purpose Control Register" ] pub mgpcr1 : MGPCR , _reserved12 : [ u8 ; 252usize ] , # [ doc = "0xa00 - Master General Purpose Control Register" ] pub mgpcr2 : MGPCR , _reserved13 : [ u8 ; 252usize ] , # [ doc = "0xb00 - Master General Purpose Control Register" ] pub mgpcr3 : MGPCR , _reserved14 : [ u8 ; 252usize ] , # [ doc = "0xc00 - Master General Purpose Control Register" ] pub mgpcr4 : MGPCR , _reserved15 : [ u8 ; 252usize ] , # [ doc = "0xd00 - Master General Purpose Control Register" ] pub mgpcr5 : MGPCR , _reserved16 : [ u8 ; 252usize ] , # [ doc = "0xe00 - Master General Purpose Control Register" ] pub mgpcr6 : MGPCR , } # [ doc = "Priority Registers Slave\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [prs](prs) module" ] pub type PRS = crate :: Reg < u32 , _PRS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PRS ; # [ doc = "`read()` method returns [prs::R](prs::R) reader structure" ] impl crate :: Readable for PRS { } # [ doc = "`write(|w| ..)` method takes [prs::W](prs::W) writer structure" ] impl crate :: Writable for PRS { } # [ doc = "Priority Registers Slave" ] pub mod prs { # [ doc = "Reader of register PRS%s" ] pub type R = crate :: R < u32 , super :: PRS > ; # [ doc = "Writer for register PRS%s" ] pub type W = crate :: W < u32 , super :: PRS > ; # [ doc = "Register PRS%s `reset()`'s with value 0x0654_3210" ] impl crate :: ResetValue for super :: PRS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0654_3210 } } # [ doc = "Master 0 Priority. Sets the arbitration priority for this port on the associated slave port.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M0_A { # [ doc = "0: This master has level 1, or highest, priority when accessing the slave port." ] _000 , # [ doc = "1: This master has level 2 priority when accessing the slave port." ] _001 , # [ doc = "2: This master has level 3 priority when accessing the slave port." ] _010 , # [ doc = "3: This master has level 4 priority when accessing the slave port." ] _011 , # [ doc = "4: This master has level 5 priority when accessing the slave port." ] _100 , # [ doc = "5: This master has level 6 priority when accessing the slave port." ] _101 , # [ doc = "6: This master has level 7 priority when accessing the slave port." ] _110 , # [ doc = "7: This master has level 8, or lowest, priority when accessing the slave port." ] _111 } impl From < M0_A > for u8 { # [ inline ( always ) ] fn from ( variant : M0_A ) -> Self { match variant { M0_A :: _000 => 0 , M0_A :: _001 => 1 , M0_A :: _010 => 2 , M0_A :: _011 => 3 , M0_A :: _100 => 4 , M0_A :: _101 => 5 , M0_A :: _110 => 6 , M0_A :: _111 => 7 } } } # [ doc = "Reader of field `M0`" ] pub type M0_R = crate :: R < u8 , M0_A > ; impl M0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M0_A { match self . bits { 0 => M0_A :: _000 , 1 => M0_A :: _001 , 2 => M0_A :: _010 , 3 => M0_A :: _011 , 4 => M0_A :: _100 , 5 => M0_A :: _101 , 6 => M0_A :: _110 , 7 => M0_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == M0_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == M0_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == M0_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == M0_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == M0_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == M0_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == M0_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == M0_A :: _111 } } # [ doc = "Write proxy for field `M0`" ] pub struct M0_W < 'a > { w : & 'a mut W , } impl < 'a > M0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M0_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "This master has level 1, or highest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( M0_A :: _000 ) } # [ doc = "This master has level 2 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( M0_A :: _001 ) } # [ doc = "This master has level 3 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( M0_A :: _010 ) } # [ doc = "This master has level 4 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( M0_A :: _011 ) } # [ doc = "This master has level 5 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( M0_A :: _100 ) } # [ doc = "This master has level 6 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( M0_A :: _101 ) } # [ doc = "This master has level 7 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( M0_A :: _110 ) } # [ doc = "This master has level 8, or lowest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( M0_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Master 1 Priority. Sets the arbitration priority for this port on the associated slave port.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M1_A { # [ doc = "0: This master has level 1, or highest, priority when accessing the slave port." ] _000 , # [ doc = "1: This master has level 2 priority when accessing the slave port." ] _001 , # [ doc = "2: This master has level 3 priority when accessing the slave port." ] _010 , # [ doc = "3: This master has level 4 priority when accessing the slave port." ] _011 , # [ doc = "4: This master has level 5 priority when accessing the slave port." ] _100 , # [ doc = "5: This master has level 6 priority when accessing the slave port." ] _101 , # [ doc = "6: This master has level 7 priority when accessing the slave port." ] _110 , # [ doc = "7: This master has level 8, or lowest, priority when accessing the slave port." ] _111 } impl From < M1_A > for u8 { # [ inline ( always ) ] fn from ( variant : M1_A ) -> Self { match variant { M1_A :: _000 => 0 , M1_A :: _001 => 1 , M1_A :: _010 => 2 , M1_A :: _011 => 3 , M1_A :: _100 => 4 , M1_A :: _101 => 5 , M1_A :: _110 => 6 , M1_A :: _111 => 7 } } } # [ doc = "Reader of field `M1`" ] pub type M1_R = crate :: R < u8 , M1_A > ; impl M1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M1_A { match self . bits { 0 => M1_A :: _000 , 1 => M1_A :: _001 , 2 => M1_A :: _010 , 3 => M1_A :: _011 , 4 => M1_A :: _100 , 5 => M1_A :: _101 , 6 => M1_A :: _110 , 7 => M1_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == M1_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == M1_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == M1_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == M1_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == M1_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == M1_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == M1_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == M1_A :: _111 } } # [ doc = "Write proxy for field `M1`" ] pub struct M1_W < 'a > { w : & 'a mut W , } impl < 'a > M1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M1_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "This master has level 1, or highest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( M1_A :: _000 ) } # [ doc = "This master has level 2 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( M1_A :: _001 ) } # [ doc = "This master has level 3 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( M1_A :: _010 ) } # [ doc = "This master has level 4 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( M1_A :: _011 ) } # [ doc = "This master has level 5 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( M1_A :: _100 ) } # [ doc = "This master has level 6 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( M1_A :: _101 ) } # [ doc = "This master has level 7 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( M1_A :: _110 ) } # [ doc = "This master has level 8, or lowest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( M1_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 4 ) ) | ( ( ( value as u32 ) & 0x07 ) << 4 ) ; self . w } } # [ doc = "Master 2 Priority. Sets the arbitration priority for this port on the associated slave port.\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M2_A { # [ doc = "0: This master has level 1, or highest, priority when accessing the slave port." ] _000 , # [ doc = "1: This master has level 2 priority when accessing the slave port." ] _001 , # [ doc = "2: This master has level 3 priority when accessing the slave port." ] _010 , # [ doc = "3: This master has level 4 priority when accessing the slave port." ] _011 , # [ doc = "4: This master has level 5 priority when accessing the slave port." ] _100 , # [ doc = "5: This master has level 6 priority when accessing the slave port." ] _101 , # [ doc = "6: This master has level 7 priority when accessing the slave port." ] _110 , # [ doc = "7: This master has level 8, or lowest, priority when accessing the slave port." ] _111 } impl From < M2_A > for u8 { # [ inline ( always ) ] fn from ( variant : M2_A ) -> Self { match variant { M2_A :: _000 => 0 , M2_A :: _001 => 1 , M2_A :: _010 => 2 , M2_A :: _011 => 3 , M2_A :: _100 => 4 , M2_A :: _101 => 5 , M2_A :: _110 => 6 , M2_A :: _111 => 7 } } } # [ doc = "Reader of field `M2`" ] pub type M2_R = crate :: R < u8 , M2_A > ; impl M2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M2_A { match self . bits { 0 => M2_A :: _000 , 1 => M2_A :: _001 , 2 => M2_A :: _010 , 3 => M2_A :: _011 , 4 => M2_A :: _100 , 5 => M2_A :: _101 , 6 => M2_A :: _110 , 7 => M2_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == M2_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == M2_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == M2_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == M2_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == M2_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == M2_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == M2_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == M2_A :: _111 } } # [ doc = "Write proxy for field `M2`" ] pub struct M2_W < 'a > { w : & 'a mut W , } impl < 'a > M2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M2_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "This master has level 1, or highest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( M2_A :: _000 ) } # [ doc = "This master has level 2 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( M2_A :: _001 ) } # [ doc = "This master has level 3 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( M2_A :: _010 ) } # [ doc = "This master has level 4 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( M2_A :: _011 ) } # [ doc = "This master has level 5 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( M2_A :: _100 ) } # [ doc = "This master has level 6 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( M2_A :: _101 ) } # [ doc = "This master has level 7 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( M2_A :: _110 ) } # [ doc = "This master has level 8, or lowest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( M2_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Master 3 Priority. Sets the arbitration priority for this port on the associated slave port.\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3_A { # [ doc = "0: This master has level 1, or highest, priority when accessing the slave port." ] _000 , # [ doc = "1: This master has level 2 priority when accessing the slave port." ] _001 , # [ doc = "2: This master has level 3 priority when accessing the slave port." ] _010 , # [ doc = "3: This master has level 4 priority when accessing the slave port." ] _011 , # [ doc = "4: This master has level 5 priority when accessing the slave port." ] _100 , # [ doc = "5: This master has level 6 priority when accessing the slave port." ] _101 , # [ doc = "6: This master has level 7 priority when accessing the slave port." ] _110 , # [ doc = "7: This master has level 8, or lowest, priority when accessing the slave port." ] _111 } impl From < M3_A > for u8 { # [ inline ( always ) ] fn from ( variant : M3_A ) -> Self { match variant { M3_A :: _000 => 0 , M3_A :: _001 => 1 , M3_A :: _010 => 2 , M3_A :: _011 => 3 , M3_A :: _100 => 4 , M3_A :: _101 => 5 , M3_A :: _110 => 6 , M3_A :: _111 => 7 } } } # [ doc = "Reader of field `M3`" ] pub type M3_R = crate :: R < u8 , M3_A > ; impl M3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M3_A { match self . bits { 0 => M3_A :: _000 , 1 => M3_A :: _001 , 2 => M3_A :: _010 , 3 => M3_A :: _011 , 4 => M3_A :: _100 , 5 => M3_A :: _101 , 6 => M3_A :: _110 , 7 => M3_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == M3_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == M3_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == M3_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == M3_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == M3_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == M3_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == M3_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == M3_A :: _111 } } # [ doc = "Write proxy for field `M3`" ] pub struct M3_W < 'a > { w : & 'a mut W , } impl < 'a > M3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "This master has level 1, or highest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( M3_A :: _000 ) } # [ doc = "This master has level 2 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( M3_A :: _001 ) } # [ doc = "This master has level 3 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( M3_A :: _010 ) } # [ doc = "This master has level 4 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( M3_A :: _011 ) } # [ doc = "This master has level 5 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( M3_A :: _100 ) } # [ doc = "This master has level 6 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( M3_A :: _101 ) } # [ doc = "This master has level 7 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( M3_A :: _110 ) } # [ doc = "This master has level 8, or lowest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( M3_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 12 ) ) | ( ( ( value as u32 ) & 0x07 ) << 12 ) ; self . w } } # [ doc = "Master 4 Priority. Sets the arbitration priority for this port on the associated slave port.\n\nValue on reset: 4" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M4_A { # [ doc = "0: This master has level 1, or highest, priority when accessing the slave port." ] _000 , # [ doc = "1: This master has level 2 priority when accessing the slave port." ] _001 , # [ doc = "2: This master has level 3 priority when accessing the slave port." ] _010 , # [ doc = "3: This master has level 4 priority when accessing the slave port." ] _011 , # [ doc = "4: This master has level 5 priority when accessing the slave port." ] _100 , # [ doc = "5: This master has level 6 priority when accessing the slave port." ] _101 , # [ doc = "6: This master has level 7 priority when accessing the slave port." ] _110 , # [ doc = "7: This master has level 8, or lowest, priority when accessing the slave port." ] _111 } impl From < M4_A > for u8 { # [ inline ( always ) ] fn from ( variant : M4_A ) -> Self { match variant { M4_A :: _000 => 0 , M4_A :: _001 => 1 , M4_A :: _010 => 2 , M4_A :: _011 => 3 , M4_A :: _100 => 4 , M4_A :: _101 => 5 , M4_A :: _110 => 6 , M4_A :: _111 => 7 } } } # [ doc = "Reader of field `M4`" ] pub type M4_R = crate :: R < u8 , M4_A > ; impl M4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M4_A { match self . bits { 0 => M4_A :: _000 , 1 => M4_A :: _001 , 2 => M4_A :: _010 , 3 => M4_A :: _011 , 4 => M4_A :: _100 , 5 => M4_A :: _101 , 6 => M4_A :: _110 , 7 => M4_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == M4_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == M4_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == M4_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == M4_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == M4_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == M4_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == M4_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == M4_A :: _111 } } # [ doc = "Write proxy for field `M4`" ] pub struct M4_W < 'a > { w : & 'a mut W , } impl < 'a > M4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M4_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "This master has level 1, or highest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( M4_A :: _000 ) } # [ doc = "This master has level 2 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( M4_A :: _001 ) } # [ doc = "This master has level 3 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( M4_A :: _010 ) } # [ doc = "This master has level 4 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( M4_A :: _011 ) } # [ doc = "This master has level 5 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( M4_A :: _100 ) } # [ doc = "This master has level 6 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( M4_A :: _101 ) } # [ doc = "This master has level 7 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( M4_A :: _110 ) } # [ doc = "This master has level 8, or lowest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( M4_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 16 ) ) | ( ( ( value as u32 ) & 0x07 ) << 16 ) ; self . w } } # [ doc = "Master 5 Priority. Sets the arbitration priority for this port on the associated slave port.\n\nValue on reset: 5" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M5_A { # [ doc = "0: This master has level 1, or highest, priority when accessing the slave port." ] _000 , # [ doc = "1: This master has level 2 priority when accessing the slave port." ] _001 , # [ doc = "2: This master has level 3 priority when accessing the slave port." ] _010 , # [ doc = "3: This master has level 4 priority when accessing the slave port." ] _011 , # [ doc = "4: This master has level 5 priority when accessing the slave port." ] _100 , # [ doc = "5: This master has level 6 priority when accessing the slave port." ] _101 , # [ doc = "6: This master has level 7 priority when accessing the slave port." ] _110 , # [ doc = "7: This master has level 8, or lowest, priority when accessing the slave port." ] _111 } impl From < M5_A > for u8 { # [ inline ( always ) ] fn from ( variant : M5_A ) -> Self { match variant { M5_A :: _000 => 0 , M5_A :: _001 => 1 , M5_A :: _010 => 2 , M5_A :: _011 => 3 , M5_A :: _100 => 4 , M5_A :: _101 => 5 , M5_A :: _110 => 6 , M5_A :: _111 => 7 } } } # [ doc = "Reader of field `M5`" ] pub type M5_R = crate :: R < u8 , M5_A > ; impl M5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M5_A { match self . bits { 0 => M5_A :: _000 , 1 => M5_A :: _001 , 2 => M5_A :: _010 , 3 => M5_A :: _011 , 4 => M5_A :: _100 , 5 => M5_A :: _101 , 6 => M5_A :: _110 , 7 => M5_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == M5_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == M5_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == M5_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == M5_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == M5_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == M5_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == M5_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == M5_A :: _111 } } # [ doc = "Write proxy for field `M5`" ] pub struct M5_W < 'a > { w : & 'a mut W , } impl < 'a > M5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M5_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "This master has level 1, or highest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( M5_A :: _000 ) } # [ doc = "This master has level 2 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( M5_A :: _001 ) } # [ doc = "This master has level 3 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( M5_A :: _010 ) } # [ doc = "This master has level 4 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( M5_A :: _011 ) } # [ doc = "This master has level 5 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( M5_A :: _100 ) } # [ doc = "This master has level 6 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( M5_A :: _101 ) } # [ doc = "This master has level 7 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( M5_A :: _110 ) } # [ doc = "This master has level 8, or lowest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( M5_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 20 ) ) | ( ( ( value as u32 ) & 0x07 ) << 20 ) ; self . w } } # [ doc = "Master 6 Priority. Sets the arbitration priority for this port on the associated slave port.\n\nValue on reset: 6" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M6_A { # [ doc = "0: This master has level 1, or highest, priority when accessing the slave port." ] _000 , # [ doc = "1: This master has level 2 priority when accessing the slave port." ] _001 , # [ doc = "2: This master has level 3 priority when accessing the slave port." ] _010 , # [ doc = "3: This master has level 4 priority when accessing the slave port." ] _011 , # [ doc = "4: This master has level 5 priority when accessing the slave port." ] _100 , # [ doc = "5: This master has level 6 priority when accessing the slave port." ] _101 , # [ doc = "6: This master has level 7 priority when accessing the slave port." ] _110 , # [ doc = "7: This master has level 8, or lowest, priority when accessing the slave port." ] _111 } impl From < M6_A > for u8 { # [ inline ( always ) ] fn from ( variant : M6_A ) -> Self { match variant { M6_A :: _000 => 0 , M6_A :: _001 => 1 , M6_A :: _010 => 2 , M6_A :: _011 => 3 , M6_A :: _100 => 4 , M6_A :: _101 => 5 , M6_A :: _110 => 6 , M6_A :: _111 => 7 } } } # [ doc = "Reader of field `M6`" ] pub type M6_R = crate :: R < u8 , M6_A > ; impl M6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M6_A { match self . bits { 0 => M6_A :: _000 , 1 => M6_A :: _001 , 2 => M6_A :: _010 , 3 => M6_A :: _011 , 4 => M6_A :: _100 , 5 => M6_A :: _101 , 6 => M6_A :: _110 , 7 => M6_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == M6_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == M6_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == M6_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == M6_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == M6_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == M6_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == M6_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == M6_A :: _111 } } # [ doc = "Write proxy for field `M6`" ] pub struct M6_W < 'a > { w : & 'a mut W , } impl < 'a > M6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M6_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "This master has level 1, or highest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( M6_A :: _000 ) } # [ doc = "This master has level 2 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( M6_A :: _001 ) } # [ doc = "This master has level 3 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( M6_A :: _010 ) } # [ doc = "This master has level 4 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( M6_A :: _011 ) } # [ doc = "This master has level 5 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( M6_A :: _100 ) } # [ doc = "This master has level 6 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( M6_A :: _101 ) } # [ doc = "This master has level 7 priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( M6_A :: _110 ) } # [ doc = "This master has level 8, or lowest, priority when accessing the slave port." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( M6_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 24 ) ) | ( ( ( value as u32 ) & 0x07 ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Master 0 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m0 ( & self ) -> M0_R { M0_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 4:6 - Master 1 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m1 ( & self ) -> M1_R { M1_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bits 8:10 - Master 2 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m2 ( & self ) -> M2_R { M2_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bits 12:14 - Master 3 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m3 ( & self ) -> M3_R { M3_R :: new ( ( ( self . bits >> 12 ) & 0x07 ) as u8 ) } # [ doc = "Bits 16:18 - Master 4 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m4 ( & self ) -> M4_R { M4_R :: new ( ( ( self . bits >> 16 ) & 0x07 ) as u8 ) } # [ doc = "Bits 20:22 - Master 5 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m5 ( & self ) -> M5_R { M5_R :: new ( ( ( self . bits >> 20 ) & 0x07 ) as u8 ) } # [ doc = "Bits 24:26 - Master 6 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m6 ( & self ) -> M6_R { M6_R :: new ( ( ( self . bits >> 24 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Master 0 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m0 ( & mut self ) -> M0_W { M0_W { w : self } } # [ doc = "Bits 4:6 - Master 1 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m1 ( & mut self ) -> M1_W { M1_W { w : self } } # [ doc = "Bits 8:10 - Master 2 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m2 ( & mut self ) -> M2_W { M2_W { w : self } } # [ doc = "Bits 12:14 - Master 3 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m3 ( & mut self ) -> M3_W { M3_W { w : self } } # [ doc = "Bits 16:18 - Master 4 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m4 ( & mut self ) -> M4_W { M4_W { w : self } } # [ doc = "Bits 20:22 - Master 5 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m5 ( & mut self ) -> M5_W { M5_W { w : self } } # [ doc = "Bits 24:26 - Master 6 Priority. Sets the arbitration priority for this port on the associated slave port." ] # [ inline ( always ) ] pub fn m6 ( & mut self ) -> M6_W { M6_W { w : self } } } } # [ doc = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [crs](crs) module" ] pub type CRS = crate :: Reg < u32 , _CRS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CRS ; # [ doc = "`read()` method returns [crs::R](crs::R) reader structure" ] impl crate :: Readable for CRS { } # [ doc = "`write(|w| ..)` method takes [crs::W](crs::W) writer structure" ] impl crate :: Writable for CRS { } # [ doc = "Control Register" ] pub mod crs { # [ doc = "Reader of register CRS%s" ] pub type R = crate :: R < u32 , super :: CRS > ; # [ doc = "Writer for register CRS%s" ] pub type W = crate :: W < u32 , super :: CRS > ; # [ doc = "Register CRS%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CRS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Park\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARK_A { # [ doc = "0: Park on master port M0" ] _000 , # [ doc = "1: Park on master port M1" ] _001 , # [ doc = "2: Park on master port M2" ] _010 , # [ doc = "3: Park on master port M3" ] _011 , # [ doc = "4: Park on master port M4" ] _100 , # [ doc = "5: Park on master port M5" ] _101 , # [ doc = "6: Park on master port M6" ] _110 , # [ doc = "7: Park on master port M7" ] _111 } impl From < PARK_A > for u8 { # [ inline ( always ) ] fn from ( variant : PARK_A ) -> Self { match variant { PARK_A :: _000 => 0 , PARK_A :: _001 => 1 , PARK_A :: _010 => 2 , PARK_A :: _011 => 3 , PARK_A :: _100 => 4 , PARK_A :: _101 => 5 , PARK_A :: _110 => 6 , PARK_A :: _111 => 7 } } } # [ doc = "Reader of field `PARK`" ] pub type PARK_R = crate :: R < u8 , PARK_A > ; impl PARK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PARK_A { match self . bits { 0 => PARK_A :: _000 , 1 => PARK_A :: _001 , 2 => PARK_A :: _010 , 3 => PARK_A :: _011 , 4 => PARK_A :: _100 , 5 => PARK_A :: _101 , 6 => PARK_A :: _110 , 7 => PARK_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PARK_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PARK_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PARK_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PARK_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PARK_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PARK_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PARK_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PARK_A :: _111 } } # [ doc = "Write proxy for field `PARK`" ] pub struct PARK_W < 'a > { w : & 'a mut W , } impl < 'a > PARK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PARK_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Park on master port M0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PARK_A :: _000 ) } # [ doc = "Park on master port M1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PARK_A :: _001 ) } # [ doc = "Park on master port M2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PARK_A :: _010 ) } # [ doc = "Park on master port M3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PARK_A :: _011 ) } # [ doc = "Park on master port M4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PARK_A :: _100 ) } # [ doc = "Park on master port M5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PARK_A :: _101 ) } # [ doc = "Park on master port M6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PARK_A :: _110 ) } # [ doc = "Park on master port M7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PARK_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Parking Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCTL_A { # [ doc = "0: When no master makes a request, the arbiter parks the slave port on the master port defined by the PARK field" ] _00 , # [ doc = "1: When no master makes a request, the arbiter parks the slave port on the last master to be in control of the slave port" ] _01 , # [ doc = "2: When no master makes a request, the slave port is not parked on a master and the arbiter drives all outputs to a constant safe state" ] _10 } impl From < PCTL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PCTL_A ) -> Self { match variant { PCTL_A :: _00 => 0 , PCTL_A :: _01 => 1 , PCTL_A :: _10 => 2 } } } # [ doc = "Reader of field `PCTL`" ] pub type PCTL_R = crate :: R < u8 , PCTL_A > ; impl PCTL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PCTL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PCTL_A :: _00 ) , 1 => Val ( PCTL_A :: _01 ) , 2 => Val ( PCTL_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PCTL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PCTL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PCTL_A :: _10 } } # [ doc = "Write proxy for field `PCTL`" ] pub struct PCTL_W < 'a > { w : & 'a mut W , } impl < 'a > PCTL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCTL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "When no master makes a request, the arbiter parks the slave port on the master port defined by the PARK field" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PCTL_A :: _00 ) } # [ doc = "When no master makes a request, the arbiter parks the slave port on the last master to be in control of the slave port" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PCTL_A :: _01 ) } # [ doc = "When no master makes a request, the slave port is not parked on a master and the arbiter drives all outputs to a constant safe state" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PCTL_A :: _10 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Arbitration Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ARB_A { # [ doc = "0: Fixed priority" ] _00 , # [ doc = "1: Round-robin, or rotating, priority" ] _01 } impl From < ARB_A > for u8 { # [ inline ( always ) ] fn from ( variant : ARB_A ) -> Self { match variant { ARB_A :: _00 => 0 , ARB_A :: _01 => 1 } } } # [ doc = "Reader of field `ARB`" ] pub type ARB_R = crate :: R < u8 , ARB_A > ; impl ARB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ARB_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ARB_A :: _00 ) , 1 => Val ( ARB_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ARB_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ARB_A :: _01 } } # [ doc = "Write proxy for field `ARB`" ] pub struct ARB_W < 'a > { w : & 'a mut W , } impl < 'a > ARB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ARB_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Fixed priority" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ARB_A :: _00 ) } # [ doc = "Round-robin, or rotating, priority" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ARB_A :: _01 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "Halt Low Priority\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HLP_A { # [ doc = "0: The low power mode request has the highest priority for arbitration on this slave port" ] _0 , # [ doc = "1: The low power mode request has the lowest initial priority for arbitration on this slave port" ] _1 } impl From < HLP_A > for bool { # [ inline ( always ) ] fn from ( variant : HLP_A ) -> Self { match variant { HLP_A :: _0 => false , HLP_A :: _1 => true } } } # [ doc = "Reader of field `HLP`" ] pub type HLP_R = crate :: R < bool , HLP_A > ; impl HLP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HLP_A { match self . bits { false => HLP_A :: _0 , true => HLP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HLP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HLP_A :: _1 } } # [ doc = "Write proxy for field `HLP`" ] pub struct HLP_W < 'a > { w : & 'a mut W , } impl < 'a > HLP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HLP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The low power mode request has the highest priority for arbitration on this slave port" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HLP_A :: _0 ) } # [ doc = "The low power mode request has the lowest initial priority for arbitration on this slave port" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HLP_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Read Only\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RO_A { # [ doc = "0: The slave port's registers are writeable" ] _0 , # [ doc = "1: The slave port's registers are read-only and cannot be written. Attempted writes have no effect on the registers and result in a bus error response." ] _1 } impl From < RO_A > for bool { # [ inline ( always ) ] fn from ( variant : RO_A ) -> Self { match variant { RO_A :: _0 => false , RO_A :: _1 => true } } } # [ doc = "Reader of field `RO`" ] pub type RO_R = crate :: R < bool , RO_A > ; impl RO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RO_A { match self . bits { false => RO_A :: _0 , true => RO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RO_A :: _1 } } # [ doc = "Write proxy for field `RO`" ] pub struct RO_W < 'a > { w : & 'a mut W , } impl < 'a > RO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The slave port's registers are writeable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RO_A :: _0 ) } # [ doc = "The slave port's registers are read-only and cannot be written. Attempted writes have no effect on the registers and result in a bus error response." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RO_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Park" ] # [ inline ( always ) ] pub fn park ( & self ) -> PARK_R { PARK_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 4:5 - Parking Control" ] # [ inline ( always ) ] pub fn pctl ( & self ) -> PCTL_R { PCTL_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 8:9 - Arbitration Mode" ] # [ inline ( always ) ] pub fn arb ( & self ) -> ARB_R { ARB_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 30 - Halt Low Priority" ] # [ inline ( always ) ] pub fn hlp ( & self ) -> HLP_R { HLP_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Read Only" ] # [ inline ( always ) ] pub fn ro ( & self ) -> RO_R { RO_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Park" ] # [ inline ( always ) ] pub fn park ( & mut self ) -> PARK_W { PARK_W { w : self } } # [ doc = "Bits 4:5 - Parking Control" ] # [ inline ( always ) ] pub fn pctl ( & mut self ) -> PCTL_W { PCTL_W { w : self } } # [ doc = "Bits 8:9 - Arbitration Mode" ] # [ inline ( always ) ] pub fn arb ( & mut self ) -> ARB_W { ARB_W { w : self } } # [ doc = "Bit 30 - Halt Low Priority" ] # [ inline ( always ) ] pub fn hlp ( & mut self ) -> HLP_W { HLP_W { w : self } } # [ doc = "Bit 31 - Read Only" ] # [ inline ( always ) ] pub fn ro ( & mut self ) -> RO_W { RO_W { w : self } } } } # [ doc = "Master General Purpose Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mgpcr](mgpcr) module" ] pub type MGPCR = crate :: Reg < u32 , _MGPCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MGPCR ; # [ doc = "`read()` method returns [mgpcr::R](mgpcr::R) reader structure" ] impl crate :: Readable for MGPCR { } # [ doc = "`write(|w| ..)` method takes [mgpcr::W](mgpcr::W) writer structure" ] impl crate :: Writable for MGPCR { } # [ doc = "Master General Purpose Control Register" ] pub mod mgpcr { # [ doc = "Reader of register MGPCR%s" ] pub type R = crate :: R < u32 , super :: MGPCR > ; # [ doc = "Writer for register MGPCR%s" ] pub type W = crate :: W < u32 , super :: MGPCR > ; # [ doc = "Register MGPCR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MGPCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Arbitrates On Undefined Length Bursts\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AULB_A { # [ doc = "0: No arbitration is allowed during an undefined length burst" ] _000 , # [ doc = "1: Arbitration is allowed at any time during an undefined length burst" ] _001 , # [ doc = "2: Arbitration is allowed after four beats of an undefined length burst" ] _010 , # [ doc = "3: Arbitration is allowed after eight beats of an undefined length burst" ] _011 , # [ doc = "4: Arbitration is allowed after 16 beats of an undefined length burst" ] _100 } impl From < AULB_A > for u8 { # [ inline ( always ) ] fn from ( variant : AULB_A ) -> Self { match variant { AULB_A :: _000 => 0 , AULB_A :: _001 => 1 , AULB_A :: _010 => 2 , AULB_A :: _011 => 3 , AULB_A :: _100 => 4 } } } # [ doc = "Reader of field `AULB`" ] pub type AULB_R = crate :: R < u8 , AULB_A > ; impl AULB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , AULB_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( AULB_A :: _000 ) , 1 => Val ( AULB_A :: _001 ) , 2 => Val ( AULB_A :: _010 ) , 3 => Val ( AULB_A :: _011 ) , 4 => Val ( AULB_A :: _100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == AULB_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == AULB_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == AULB_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == AULB_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == AULB_A :: _100 } } # [ doc = "Write proxy for field `AULB`" ] pub struct AULB_W < 'a > { w : & 'a mut W , } impl < 'a > AULB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AULB_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No arbitration is allowed during an undefined length burst" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( AULB_A :: _000 ) } # [ doc = "Arbitration is allowed at any time during an undefined length burst" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( AULB_A :: _001 ) } # [ doc = "Arbitration is allowed after four beats of an undefined length burst" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( AULB_A :: _010 ) } # [ doc = "Arbitration is allowed after eight beats of an undefined length burst" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( AULB_A :: _011 ) } # [ doc = "Arbitration is allowed after 16 beats of an undefined length burst" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( AULB_A :: _100 ) } # [ 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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Arbitrates On Undefined Length Bursts" ] # [ inline ( always ) ] pub fn aulb ( & self ) -> AULB_R { AULB_R :: new ( ( self . bits & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Arbitrates On Undefined Length Bursts" ] # [ inline ( always ) ] pub fn aulb ( & mut self ) -> AULB_W { AULB_W { w : self } } } } } # [ doc = "Enhanced direct memory access controller" ] pub struct DMA { _marker : PhantomData < * const ( ) > } unsafe impl Send for DMA { } impl DMA { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const dma :: RegisterBlock { 0x4000_8000 as * const _ } } impl Deref for DMA { type Target = dma :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * DMA :: ptr ( ) } } } # [ doc = "Enhanced direct memory access controller" ] pub mod dma { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Control Register" ] pub cr : CR , # [ doc = "0x04 - Error Status Register" ] pub es : ES , _reserved2 : [ u8 ; 4usize ] , # [ doc = "0x0c - Enable Request Register" ] pub erq : ERQ , _reserved3 : [ u8 ; 4usize ] , # [ doc = "0x14 - Enable Error Interrupt Register" ] pub eei : EEI , # [ doc = "0x18 - Clear Enable Error Interrupt Register" ] pub ceei : CEEI , # [ doc = "0x19 - Set Enable Error Interrupt Register" ] pub seei : SEEI , # [ doc = "0x1a - Clear Enable Request Register" ] pub cerq : CERQ , # [ doc = "0x1b - Set Enable Request Register" ] pub serq : SERQ , # [ doc = "0x1c - Clear DONE Status Bit Register" ] pub cdne : CDNE , # [ doc = "0x1d - Set START Bit Register" ] pub ssrt : SSRT , # [ doc = "0x1e - Clear Error Register" ] pub cerr : CERR , # [ doc = "0x1f - Clear Interrupt Request Register" ] pub cint : CINT , _reserved12 : [ u8 ; 4usize ] , # [ doc = "0x24 - Interrupt Request Register" ] pub int : INT , _reserved13 : [ u8 ; 4usize ] , # [ doc = "0x2c - Error Register" ] pub err : ERR , _reserved14 : [ u8 ; 4usize ] , # [ doc = "0x34 - Hardware Request Status Register" ] pub hrs : HRS , _reserved15 : [ u8 ; 12usize ] , # [ doc = "0x44 - Enable Asynchronous Request in Stop Register" ] pub ears : EARS , _reserved16 : [ u8 ; 184usize ] , # [ doc = "0x100 - Channel n Priority Register" ] pub dchpri3 : DCHPRI , # [ doc = "0x101 - Channel n Priority Register" ] pub dchpri2 : DCHPRI , # [ doc = "0x102 - Channel n Priority Register" ] pub dchpri1 : DCHPRI , # [ doc = "0x103 - Channel n Priority Register" ] pub dchpri0 : DCHPRI , # [ doc = "0x104 - Channel n Priority Register" ] pub dchpri7 : DCHPRI , # [ doc = "0x105 - Channel n Priority Register" ] pub dchpri6 : DCHPRI , # [ doc = "0x106 - Channel n Priority Register" ] pub dchpri5 : DCHPRI , # [ doc = "0x107 - Channel n Priority Register" ] pub dchpri4 : DCHPRI , # [ doc = "0x108 - Channel n Priority Register" ] pub dchpri11 : DCHPRI , # [ doc = "0x109 - Channel n Priority Register" ] pub dchpri10 : DCHPRI , # [ doc = "0x10a - Channel n Priority Register" ] pub dchpri9 : DCHPRI , # [ doc = "0x10b - Channel n Priority Register" ] pub dchpri8 : DCHPRI , # [ doc = "0x10c - Channel n Priority Register" ] pub dchpri15 : DCHPRI , # [ doc = "0x10d - Channel n Priority Register" ] pub dchpri14 : DCHPRI , # [ doc = "0x10e - Channel n Priority Register" ] pub dchpri13 : DCHPRI , # [ doc = "0x10f - Channel n Priority Register" ] pub dchpri12 : DCHPRI , # [ doc = "0x110 - Channel n Priority Register" ] pub dchpri19 : DCHPRI , # [ doc = "0x111 - Channel n Priority Register" ] pub dchpri18 : DCHPRI , # [ doc = "0x112 - Channel n Priority Register" ] pub dchpri17 : DCHPRI , # [ doc = "0x113 - Channel n Priority Register" ] pub dchpri16 : DCHPRI , # [ doc = "0x114 - Channel n Priority Register" ] pub dchpri23 : DCHPRI , # [ doc = "0x115 - Channel n Priority Register" ] pub dchpri22 : DCHPRI , # [ doc = "0x116 - Channel n Priority Register" ] pub dchpri21 : DCHPRI , # [ doc = "0x117 - Channel n Priority Register" ] pub dchpri20 : DCHPRI , # [ doc = "0x118 - Channel n Priority Register" ] pub dchpri27 : DCHPRI , # [ doc = "0x119 - Channel n Priority Register" ] pub dchpri26 : DCHPRI , # [ doc = "0x11a - Channel n Priority Register" ] pub dchpri25 : DCHPRI , # [ doc = "0x11b - Channel n Priority Register" ] pub dchpri24 : DCHPRI , # [ doc = "0x11c - Channel n Priority Register" ] pub dchpri31 : DCHPRI , # [ doc = "0x11d - Channel n Priority Register" ] pub dchpri30 : DCHPRI , # [ doc = "0x11e - Channel n Priority Register" ] pub dchpri29 : DCHPRI , # [ doc = "0x11f - Channel n Priority Register" ] pub dchpri28 : DCHPRI , _reserved48 : [ u8 ; 3808usize ] , # [ doc = "0x1000 - TCD Source Address" ] pub tcd0_saddr : TCD_SADDR , # [ doc = "0x1004 - TCD Signed Source Address Offset" ] pub tcd0_soff : TCD_SOFF , # [ doc = "0x1006 - TCD Transfer Attributes" ] pub tcd0_attr : TCD_ATTR , _reserved_51_tcd0_nbytes : [ u8 ; 4usize ] , # [ doc = "0x100c - TCD Last Source Address Adjustment" ] pub tcd0_slast : TCD_SLAST , # [ doc = "0x1010 - TCD Destination Address" ] pub tcd0_daddr : TCD_DADDR , # [ doc = "0x1014 - TCD Signed Destination Address Offset" ] pub tcd0_doff : TCD_DOFF , _reserved_55_tcd0_citer : [ u8 ; 2usize ] , # [ doc = "0x1018 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd0_dlastsga : TCD_DLASTSGA , # [ doc = "0x101c - TCD Control and Status" ] pub tcd0_csr : TCD_CSR , _reserved_58_tcd0_biter : [ u8 ; 2usize ] , # [ doc = "0x1020 - TCD Source Address" ] pub tcd1_saddr : TCD_SADDR , # [ doc = "0x1024 - TCD Signed Source Address Offset" ] pub tcd1_soff : TCD_SOFF , # [ doc = "0x1026 - TCD Transfer Attributes" ] pub tcd1_attr : TCD_ATTR , _reserved_62_tcd1_nbytes : [ u8 ; 4usize ] , # [ doc = "0x102c - TCD Last Source Address Adjustment" ] pub tcd1_slast : TCD_SLAST , # [ doc = "0x1030 - TCD Destination Address" ] pub tcd1_daddr : TCD_DADDR , # [ doc = "0x1034 - TCD Signed Destination Address Offset" ] pub tcd1_doff : TCD_DOFF , _reserved_66_tcd1_citer : [ u8 ; 2usize ] , # [ doc = "0x1038 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd1_dlastsga : TCD_DLASTSGA , # [ doc = "0x103c - TCD Control and Status" ] pub tcd1_csr : TCD_CSR , _reserved_69_tcd1_biter : [ u8 ; 2usize ] , # [ doc = "0x1040 - TCD Source Address" ] pub tcd2_saddr : TCD_SADDR , # [ doc = "0x1044 - TCD Signed Source Address Offset" ] pub tcd2_soff : TCD_SOFF , # [ doc = "0x1046 - TCD Transfer Attributes" ] pub tcd2_attr : TCD_ATTR , _reserved_73_tcd2_nbytes : [ u8 ; 4usize ] , # [ doc = "0x104c - TCD Last Source Address Adjustment" ] pub tcd2_slast : TCD_SLAST , # [ doc = "0x1050 - TCD Destination Address" ] pub tcd2_daddr : TCD_DADDR , # [ doc = "0x1054 - TCD Signed Destination Address Offset" ] pub tcd2_doff : TCD_DOFF , _reserved_77_tcd2_citer : [ u8 ; 2usize ] , # [ doc = "0x1058 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd2_dlastsga : TCD_DLASTSGA , # [ doc = "0x105c - TCD Control and Status" ] pub tcd2_csr : TCD_CSR , _reserved_80_tcd2_biter : [ u8 ; 2usize ] , # [ doc = "0x1060 - TCD Source Address" ] pub tcd3_saddr : TCD_SADDR , # [ doc = "0x1064 - TCD Signed Source Address Offset" ] pub tcd3_soff : TCD_SOFF , # [ doc = "0x1066 - TCD Transfer Attributes" ] pub tcd3_attr : TCD_ATTR , _reserved_84_tcd3_nbytes : [ u8 ; 4usize ] , # [ doc = "0x106c - TCD Last Source Address Adjustment" ] pub tcd3_slast : TCD_SLAST , # [ doc = "0x1070 - TCD Destination Address" ] pub tcd3_daddr : TCD_DADDR , # [ doc = "0x1074 - TCD Signed Destination Address Offset" ] pub tcd3_doff : TCD_DOFF , _reserved_88_tcd3_citer : [ u8 ; 2usize ] , # [ doc = "0x1078 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd3_dlastsga : TCD_DLASTSGA , # [ doc = "0x107c - TCD Control and Status" ] pub tcd3_csr : TCD_CSR , _reserved_91_tcd3_biter : [ u8 ; 2usize ] , # [ doc = "0x1080 - TCD Source Address" ] pub tcd4_saddr : TCD_SADDR , # [ doc = "0x1084 - TCD Signed Source Address Offset" ] pub tcd4_soff : TCD_SOFF , # [ doc = "0x1086 - TCD Transfer Attributes" ] pub tcd4_attr : TCD_ATTR , _reserved_95_tcd4_nbytes : [ u8 ; 4usize ] , # [ doc = "0x108c - TCD Last Source Address Adjustment" ] pub tcd4_slast : TCD_SLAST , # [ doc = "0x1090 - TCD Destination Address" ] pub tcd4_daddr : TCD_DADDR , # [ doc = "0x1094 - TCD Signed Destination Address Offset" ] pub tcd4_doff : TCD_DOFF , _reserved_99_tcd4_citer : [ u8 ; 2usize ] , # [ doc = "0x1098 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd4_dlastsga : TCD_DLASTSGA , # [ doc = "0x109c - TCD Control and Status" ] pub tcd4_csr : TCD_CSR , _reserved_102_tcd4_biter : [ u8 ; 2usize ] , # [ doc = "0x10a0 - TCD Source Address" ] pub tcd5_saddr : TCD_SADDR , # [ doc = "0x10a4 - TCD Signed Source Address Offset" ] pub tcd5_soff : TCD_SOFF , # [ doc = "0x10a6 - TCD Transfer Attributes" ] pub tcd5_attr : TCD_ATTR , _reserved_106_tcd5_nbytes : [ u8 ; 4usize ] , # [ doc = "0x10ac - TCD Last Source Address Adjustment" ] pub tcd5_slast : TCD_SLAST , # [ doc = "0x10b0 - TCD Destination Address" ] pub tcd5_daddr : TCD_DADDR , # [ doc = "0x10b4 - TCD Signed Destination Address Offset" ] pub tcd5_doff : TCD_DOFF , _reserved_110_tcd5_citer : [ u8 ; 2usize ] , # [ doc = "0x10b8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd5_dlastsga : TCD_DLASTSGA , # [ doc = "0x10bc - TCD Control and Status" ] pub tcd5_csr : TCD_CSR , _reserved_113_tcd5_biter : [ u8 ; 2usize ] , # [ doc = "0x10c0 - TCD Source Address" ] pub tcd6_saddr : TCD_SADDR , # [ doc = "0x10c4 - TCD Signed Source Address Offset" ] pub tcd6_soff : TCD_SOFF , # [ doc = "0x10c6 - TCD Transfer Attributes" ] pub tcd6_attr : TCD_ATTR , _reserved_117_tcd6_nbytes : [ u8 ; 4usize ] , # [ doc = "0x10cc - TCD Last Source Address Adjustment" ] pub tcd6_slast : TCD_SLAST , # [ doc = "0x10d0 - TCD Destination Address" ] pub tcd6_daddr : TCD_DADDR , # [ doc = "0x10d4 - TCD Signed Destination Address Offset" ] pub tcd6_doff : TCD_DOFF , _reserved_121_tcd6_citer : [ u8 ; 2usize ] , # [ doc = "0x10d8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd6_dlastsga : TCD_DLASTSGA , # [ doc = "0x10dc - TCD Control and Status" ] pub tcd6_csr : TCD_CSR , _reserved_124_tcd6_biter : [ u8 ; 2usize ] , # [ doc = "0x10e0 - TCD Source Address" ] pub tcd7_saddr : TCD_SADDR , # [ doc = "0x10e4 - TCD Signed Source Address Offset" ] pub tcd7_soff : TCD_SOFF , # [ doc = "0x10e6 - TCD Transfer Attributes" ] pub tcd7_attr : TCD_ATTR , _reserved_128_tcd7_nbytes : [ u8 ; 4usize ] , # [ doc = "0x10ec - TCD Last Source Address Adjustment" ] pub tcd7_slast : TCD_SLAST , # [ doc = "0x10f0 - TCD Destination Address" ] pub tcd7_daddr : TCD_DADDR , # [ doc = "0x10f4 - TCD Signed Destination Address Offset" ] pub tcd7_doff : TCD_DOFF , _reserved_132_tcd7_citer : [ u8 ; 2usize ] , # [ doc = "0x10f8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd7_dlastsga : TCD_DLASTSGA , # [ doc = "0x10fc - TCD Control and Status" ] pub tcd7_csr : TCD_CSR , _reserved_135_tcd7_biter : [ u8 ; 2usize ] , # [ doc = "0x1100 - TCD Source Address" ] pub tcd8_saddr : TCD_SADDR , # [ doc = "0x1104 - TCD Signed Source Address Offset" ] pub tcd8_soff : TCD_SOFF , # [ doc = "0x1106 - TCD Transfer Attributes" ] pub tcd8_attr : TCD_ATTR , _reserved_139_tcd8_nbytes : [ u8 ; 4usize ] , # [ doc = "0x110c - TCD Last Source Address Adjustment" ] pub tcd8_slast : TCD_SLAST , # [ doc = "0x1110 - TCD Destination Address" ] pub tcd8_daddr : TCD_DADDR , # [ doc = "0x1114 - TCD Signed Destination Address Offset" ] pub tcd8_doff : TCD_DOFF , _reserved_143_tcd8_citer : [ u8 ; 2usize ] , # [ doc = "0x1118 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd8_dlastsga : TCD_DLASTSGA , # [ doc = "0x111c - TCD Control and Status" ] pub tcd8_csr : TCD_CSR , _reserved_146_tcd8_biter : [ u8 ; 2usize ] , # [ doc = "0x1120 - TCD Source Address" ] pub tcd9_saddr : TCD_SADDR , # [ doc = "0x1124 - TCD Signed Source Address Offset" ] pub tcd9_soff : TCD_SOFF , # [ doc = "0x1126 - TCD Transfer Attributes" ] pub tcd9_attr : TCD_ATTR , _reserved_150_tcd9_nbytes : [ u8 ; 4usize ] , # [ doc = "0x112c - TCD Last Source Address Adjustment" ] pub tcd9_slast : TCD_SLAST , # [ doc = "0x1130 - TCD Destination Address" ] pub tcd9_daddr : TCD_DADDR , # [ doc = "0x1134 - TCD Signed Destination Address Offset" ] pub tcd9_doff : TCD_DOFF , _reserved_154_tcd9_citer : [ u8 ; 2usize ] , # [ doc = "0x1138 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd9_dlastsga : TCD_DLASTSGA , # [ doc = "0x113c - TCD Control and Status" ] pub tcd9_csr : TCD_CSR , _reserved_157_tcd9_biter : [ u8 ; 2usize ] , # [ doc = "0x1140 - TCD Source Address" ] pub tcd10_saddr : TCD_SADDR , # [ doc = "0x1144 - TCD Signed Source Address Offset" ] pub tcd10_soff : TCD_SOFF , # [ doc = "0x1146 - TCD Transfer Attributes" ] pub tcd10_attr : TCD_ATTR , _reserved_161_tcd10_nbytes : [ u8 ; 4usize ] , # [ doc = "0x114c - TCD Last Source Address Adjustment" ] pub tcd10_slast : TCD_SLAST , # [ doc = "0x1150 - TCD Destination Address" ] pub tcd10_daddr : TCD_DADDR , # [ doc = "0x1154 - TCD Signed Destination Address Offset" ] pub tcd10_doff : TCD_DOFF , _reserved_165_tcd10_citer : [ u8 ; 2usize ] , # [ doc = "0x1158 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd10_dlastsga : TCD_DLASTSGA , # [ doc = "0x115c - TCD Control and Status" ] pub tcd10_csr : TCD_CSR , _reserved_168_tcd10_biter : [ u8 ; 2usize ] , # [ doc = "0x1160 - TCD Source Address" ] pub tcd11_saddr : TCD_SADDR , # [ doc = "0x1164 - TCD Signed Source Address Offset" ] pub tcd11_soff : TCD_SOFF , # [ doc = "0x1166 - TCD Transfer Attributes" ] pub tcd11_attr : TCD_ATTR , _reserved_172_tcd11_nbytes : [ u8 ; 4usize ] , # [ doc = "0x116c - TCD Last Source Address Adjustment" ] pub tcd11_slast : TCD_SLAST , # [ doc = "0x1170 - TCD Destination Address" ] pub tcd11_daddr : TCD_DADDR , # [ doc = "0x1174 - TCD Signed Destination Address Offset" ] pub tcd11_doff : TCD_DOFF , _reserved_176_tcd11_citer : [ u8 ; 2usize ] , # [ doc = "0x1178 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd11_dlastsga : TCD_DLASTSGA , # [ doc = "0x117c - TCD Control and Status" ] pub tcd11_csr : TCD_CSR , _reserved_179_tcd11_biter : [ u8 ; 2usize ] , # [ doc = "0x1180 - TCD Source Address" ] pub tcd12_saddr : TCD_SADDR , # [ doc = "0x1184 - TCD Signed Source Address Offset" ] pub tcd12_soff : TCD_SOFF , # [ doc = "0x1186 - TCD Transfer Attributes" ] pub tcd12_attr : TCD_ATTR , _reserved_183_tcd12_nbytes : [ u8 ; 4usize ] , # [ doc = "0x118c - TCD Last Source Address Adjustment" ] pub tcd12_slast : TCD_SLAST , # [ doc = "0x1190 - TCD Destination Address" ] pub tcd12_daddr : TCD_DADDR , # [ doc = "0x1194 - TCD Signed Destination Address Offset" ] pub tcd12_doff : TCD_DOFF , _reserved_187_tcd12_citer : [ u8 ; 2usize ] , # [ doc = "0x1198 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd12_dlastsga : TCD_DLASTSGA , # [ doc = "0x119c - TCD Control and Status" ] pub tcd12_csr : TCD_CSR , _reserved_190_tcd12_biter : [ u8 ; 2usize ] , # [ doc = "0x11a0 - TCD Source Address" ] pub tcd13_saddr : TCD_SADDR , # [ doc = "0x11a4 - TCD Signed Source Address Offset" ] pub tcd13_soff : TCD_SOFF , # [ doc = "0x11a6 - TCD Transfer Attributes" ] pub tcd13_attr : TCD_ATTR , _reserved_194_tcd13_nbytes : [ u8 ; 4usize ] , # [ doc = "0x11ac - TCD Last Source Address Adjustment" ] pub tcd13_slast : TCD_SLAST , # [ doc = "0x11b0 - TCD Destination Address" ] pub tcd13_daddr : TCD_DADDR , # [ doc = "0x11b4 - TCD Signed Destination Address Offset" ] pub tcd13_doff : TCD_DOFF , _reserved_198_tcd13_citer : [ u8 ; 2usize ] , # [ doc = "0x11b8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd13_dlastsga : TCD_DLASTSGA , # [ doc = "0x11bc - TCD Control and Status" ] pub tcd13_csr : TCD_CSR , _reserved_201_tcd13_biter : [ u8 ; 2usize ] , # [ doc = "0x11c0 - TCD Source Address" ] pub tcd14_saddr : TCD_SADDR , # [ doc = "0x11c4 - TCD Signed Source Address Offset" ] pub tcd14_soff : TCD_SOFF , # [ doc = "0x11c6 - TCD Transfer Attributes" ] pub tcd14_attr : TCD_ATTR , _reserved_205_tcd14_nbytes : [ u8 ; 4usize ] , # [ doc = "0x11cc - TCD Last Source Address Adjustment" ] pub tcd14_slast : TCD_SLAST , # [ doc = "0x11d0 - TCD Destination Address" ] pub tcd14_daddr : TCD_DADDR , # [ doc = "0x11d4 - TCD Signed Destination Address Offset" ] pub tcd14_doff : TCD_DOFF , _reserved_209_tcd14_citer : [ u8 ; 2usize ] , # [ doc = "0x11d8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd14_dlastsga : TCD_DLASTSGA , # [ doc = "0x11dc - TCD Control and Status" ] pub tcd14_csr : TCD_CSR , _reserved_212_tcd14_biter : [ u8 ; 2usize ] , # [ doc = "0x11e0 - TCD Source Address" ] pub tcd15_saddr : TCD_SADDR , # [ doc = "0x11e4 - TCD Signed Source Address Offset" ] pub tcd15_soff : TCD_SOFF , # [ doc = "0x11e6 - TCD Transfer Attributes" ] pub tcd15_attr : TCD_ATTR , _reserved_216_tcd15_nbytes : [ u8 ; 4usize ] , # [ doc = "0x11ec - TCD Last Source Address Adjustment" ] pub tcd15_slast : TCD_SLAST , # [ doc = "0x11f0 - TCD Destination Address" ] pub tcd15_daddr : TCD_DADDR , # [ doc = "0x11f4 - TCD Signed Destination Address Offset" ] pub tcd15_doff : TCD_DOFF , _reserved_220_tcd15_citer : [ u8 ; 2usize ] , # [ doc = "0x11f8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd15_dlastsga : TCD_DLASTSGA , # [ doc = "0x11fc - TCD Control and Status" ] pub tcd15_csr : TCD_CSR , _reserved_223_tcd15_biter : [ u8 ; 2usize ] , # [ doc = "0x1200 - TCD Source Address" ] pub tcd16_saddr : TCD_SADDR , # [ doc = "0x1204 - TCD Signed Source Address Offset" ] pub tcd16_soff : TCD_SOFF , # [ doc = "0x1206 - TCD Transfer Attributes" ] pub tcd16_attr : TCD_ATTR , _reserved_227_tcd16_nbytes : [ u8 ; 4usize ] , # [ doc = "0x120c - TCD Last Source Address Adjustment" ] pub tcd16_slast : TCD_SLAST , # [ doc = "0x1210 - TCD Destination Address" ] pub tcd16_daddr : TCD_DADDR , # [ doc = "0x1214 - TCD Signed Destination Address Offset" ] pub tcd16_doff : TCD_DOFF , _reserved_231_tcd16_citer : [ u8 ; 2usize ] , # [ doc = "0x1218 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd16_dlastsga : TCD_DLASTSGA , # [ doc = "0x121c - TCD Control and Status" ] pub tcd16_csr : TCD_CSR , _reserved_234_tcd16_biter : [ u8 ; 2usize ] , # [ doc = "0x1220 - TCD Source Address" ] pub tcd17_saddr : TCD_SADDR , # [ doc = "0x1224 - TCD Signed Source Address Offset" ] pub tcd17_soff : TCD_SOFF , # [ doc = "0x1226 - TCD Transfer Attributes" ] pub tcd17_attr : TCD_ATTR , _reserved_238_tcd17_nbytes : [ u8 ; 4usize ] , # [ doc = "0x122c - TCD Last Source Address Adjustment" ] pub tcd17_slast : TCD_SLAST , # [ doc = "0x1230 - TCD Destination Address" ] pub tcd17_daddr : TCD_DADDR , # [ doc = "0x1234 - TCD Signed Destination Address Offset" ] pub tcd17_doff : TCD_DOFF , _reserved_242_tcd17_citer : [ u8 ; 2usize ] , # [ doc = "0x1238 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd17_dlastsga : TCD_DLASTSGA , # [ doc = "0x123c - TCD Control and Status" ] pub tcd17_csr : TCD_CSR , _reserved_245_tcd17_biter : [ u8 ; 2usize ] , # [ doc = "0x1240 - TCD Source Address" ] pub tcd18_saddr : TCD_SADDR , # [ doc = "0x1244 - TCD Signed Source Address Offset" ] pub tcd18_soff : TCD_SOFF , # [ doc = "0x1246 - TCD Transfer Attributes" ] pub tcd18_attr : TCD_ATTR , _reserved_249_tcd18_nbytes : [ u8 ; 4usize ] , # [ doc = "0x124c - TCD Last Source Address Adjustment" ] pub tcd18_slast : TCD_SLAST , # [ doc = "0x1250 - TCD Destination Address" ] pub tcd18_daddr : TCD_DADDR , # [ doc = "0x1254 - TCD Signed Destination Address Offset" ] pub tcd18_doff : TCD_DOFF , _reserved_253_tcd18_citer : [ u8 ; 2usize ] , # [ doc = "0x1258 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd18_dlastsga : TCD_DLASTSGA , # [ doc = "0x125c - TCD Control and Status" ] pub tcd18_csr : TCD_CSR , _reserved_256_tcd18_biter : [ u8 ; 2usize ] , # [ doc = "0x1260 - TCD Source Address" ] pub tcd19_saddr : TCD_SADDR , # [ doc = "0x1264 - TCD Signed Source Address Offset" ] pub tcd19_soff : TCD_SOFF , # [ doc = "0x1266 - TCD Transfer Attributes" ] pub tcd19_attr : TCD_ATTR , _reserved_260_tcd19_nbytes : [ u8 ; 4usize ] , # [ doc = "0x126c - TCD Last Source Address Adjustment" ] pub tcd19_slast : TCD_SLAST , # [ doc = "0x1270 - TCD Destination Address" ] pub tcd19_daddr : TCD_DADDR , # [ doc = "0x1274 - TCD Signed Destination Address Offset" ] pub tcd19_doff : TCD_DOFF , _reserved_264_tcd19_citer : [ u8 ; 2usize ] , # [ doc = "0x1278 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd19_dlastsga : TCD_DLASTSGA , # [ doc = "0x127c - TCD Control and Status" ] pub tcd19_csr : TCD_CSR , _reserved_267_tcd19_biter : [ u8 ; 2usize ] , # [ doc = "0x1280 - TCD Source Address" ] pub tcd20_saddr : TCD_SADDR , # [ doc = "0x1284 - TCD Signed Source Address Offset" ] pub tcd20_soff : TCD_SOFF , # [ doc = "0x1286 - TCD Transfer Attributes" ] pub tcd20_attr : TCD_ATTR , _reserved_271_tcd20_nbytes : [ u8 ; 4usize ] , # [ doc = "0x128c - TCD Last Source Address Adjustment" ] pub tcd20_slast : TCD_SLAST , # [ doc = "0x1290 - TCD Destination Address" ] pub tcd20_daddr : TCD_DADDR , # [ doc = "0x1294 - TCD Signed Destination Address Offset" ] pub tcd20_doff : TCD_DOFF , _reserved_275_tcd20_citer : [ u8 ; 2usize ] , # [ doc = "0x1298 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd20_dlastsga : TCD_DLASTSGA , # [ doc = "0x129c - TCD Control and Status" ] pub tcd20_csr : TCD_CSR , _reserved_278_tcd20_biter : [ u8 ; 2usize ] , # [ doc = "0x12a0 - TCD Source Address" ] pub tcd21_saddr : TCD_SADDR , # [ doc = "0x12a4 - TCD Signed Source Address Offset" ] pub tcd21_soff : TCD_SOFF , # [ doc = "0x12a6 - TCD Transfer Attributes" ] pub tcd21_attr : TCD_ATTR , _reserved_282_tcd21_nbytes : [ u8 ; 4usize ] , # [ doc = "0x12ac - TCD Last Source Address Adjustment" ] pub tcd21_slast : TCD_SLAST , # [ doc = "0x12b0 - TCD Destination Address" ] pub tcd21_daddr : TCD_DADDR , # [ doc = "0x12b4 - TCD Signed Destination Address Offset" ] pub tcd21_doff : TCD_DOFF , _reserved_286_tcd21_citer : [ u8 ; 2usize ] , # [ doc = "0x12b8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd21_dlastsga : TCD_DLASTSGA , # [ doc = "0x12bc - TCD Control and Status" ] pub tcd21_csr : TCD_CSR , _reserved_289_tcd21_biter : [ u8 ; 2usize ] , # [ doc = "0x12c0 - TCD Source Address" ] pub tcd22_saddr : TCD_SADDR , # [ doc = "0x12c4 - TCD Signed Source Address Offset" ] pub tcd22_soff : TCD_SOFF , # [ doc = "0x12c6 - TCD Transfer Attributes" ] pub tcd22_attr : TCD_ATTR , _reserved_293_tcd22_nbytes : [ u8 ; 4usize ] , # [ doc = "0x12cc - TCD Last Source Address Adjustment" ] pub tcd22_slast : TCD_SLAST , # [ doc = "0x12d0 - TCD Destination Address" ] pub tcd22_daddr : TCD_DADDR , # [ doc = "0x12d4 - TCD Signed Destination Address Offset" ] pub tcd22_doff : TCD_DOFF , _reserved_297_tcd22_citer : [ u8 ; 2usize ] , # [ doc = "0x12d8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd22_dlastsga : TCD_DLASTSGA , # [ doc = "0x12dc - TCD Control and Status" ] pub tcd22_csr : TCD_CSR , _reserved_300_tcd22_biter : [ u8 ; 2usize ] , # [ doc = "0x12e0 - TCD Source Address" ] pub tcd23_saddr : TCD_SADDR , # [ doc = "0x12e4 - TCD Signed Source Address Offset" ] pub tcd23_soff : TCD_SOFF , # [ doc = "0x12e6 - TCD Transfer Attributes" ] pub tcd23_attr : TCD_ATTR , _reserved_304_tcd23_nbytes : [ u8 ; 4usize ] , # [ doc = "0x12ec - TCD Last Source Address Adjustment" ] pub tcd23_slast : TCD_SLAST , # [ doc = "0x12f0 - TCD Destination Address" ] pub tcd23_daddr : TCD_DADDR , # [ doc = "0x12f4 - TCD Signed Destination Address Offset" ] pub tcd23_doff : TCD_DOFF , _reserved_308_tcd23_citer : [ u8 ; 2usize ] , # [ doc = "0x12f8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd23_dlastsga : TCD_DLASTSGA , # [ doc = "0x12fc - TCD Control and Status" ] pub tcd23_csr : TCD_CSR , _reserved_311_tcd23_biter : [ u8 ; 2usize ] , # [ doc = "0x1300 - TCD Source Address" ] pub tcd24_saddr : TCD_SADDR , # [ doc = "0x1304 - TCD Signed Source Address Offset" ] pub tcd24_soff : TCD_SOFF , # [ doc = "0x1306 - TCD Transfer Attributes" ] pub tcd24_attr : TCD_ATTR , _reserved_315_tcd24_nbytes : [ u8 ; 4usize ] , # [ doc = "0x130c - TCD Last Source Address Adjustment" ] pub tcd24_slast : TCD_SLAST , # [ doc = "0x1310 - TCD Destination Address" ] pub tcd24_daddr : TCD_DADDR , # [ doc = "0x1314 - TCD Signed Destination Address Offset" ] pub tcd24_doff : TCD_DOFF , _reserved_319_tcd24_citer : [ u8 ; 2usize ] , # [ doc = "0x1318 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd24_dlastsga : TCD_DLASTSGA , # [ doc = "0x131c - TCD Control and Status" ] pub tcd24_csr : TCD_CSR , _reserved_322_tcd24_biter : [ u8 ; 2usize ] , # [ doc = "0x1320 - TCD Source Address" ] pub tcd25_saddr : TCD_SADDR , # [ doc = "0x1324 - TCD Signed Source Address Offset" ] pub tcd25_soff : TCD_SOFF , # [ doc = "0x1326 - TCD Transfer Attributes" ] pub tcd25_attr : TCD_ATTR , _reserved_326_tcd25_nbytes : [ u8 ; 4usize ] , # [ doc = "0x132c - TCD Last Source Address Adjustment" ] pub tcd25_slast : TCD_SLAST , # [ doc = "0x1330 - TCD Destination Address" ] pub tcd25_daddr : TCD_DADDR , # [ doc = "0x1334 - TCD Signed Destination Address Offset" ] pub tcd25_doff : TCD_DOFF , _reserved_330_tcd25_citer : [ u8 ; 2usize ] , # [ doc = "0x1338 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd25_dlastsga : TCD_DLASTSGA , # [ doc = "0x133c - TCD Control and Status" ] pub tcd25_csr : TCD_CSR , _reserved_333_tcd25_biter : [ u8 ; 2usize ] , # [ doc = "0x1340 - TCD Source Address" ] pub tcd26_saddr : TCD_SADDR , # [ doc = "0x1344 - TCD Signed Source Address Offset" ] pub tcd26_soff : TCD_SOFF , # [ doc = "0x1346 - TCD Transfer Attributes" ] pub tcd26_attr : TCD_ATTR , _reserved_337_tcd26_nbytes : [ u8 ; 4usize ] , # [ doc = "0x134c - TCD Last Source Address Adjustment" ] pub tcd26_slast : TCD_SLAST , # [ doc = "0x1350 - TCD Destination Address" ] pub tcd26_daddr : TCD_DADDR , # [ doc = "0x1354 - TCD Signed Destination Address Offset" ] pub tcd26_doff : TCD_DOFF , _reserved_341_tcd26_citer : [ u8 ; 2usize ] , # [ doc = "0x1358 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd26_dlastsga : TCD_DLASTSGA , # [ doc = "0x135c - TCD Control and Status" ] pub tcd26_csr : TCD_CSR , _reserved_344_tcd26_biter : [ u8 ; 2usize ] , # [ doc = "0x1360 - TCD Source Address" ] pub tcd27_saddr : TCD_SADDR , # [ doc = "0x1364 - TCD Signed Source Address Offset" ] pub tcd27_soff : TCD_SOFF , # [ doc = "0x1366 - TCD Transfer Attributes" ] pub tcd27_attr : TCD_ATTR , _reserved_348_tcd27_nbytes : [ u8 ; 4usize ] , # [ doc = "0x136c - TCD Last Source Address Adjustment" ] pub tcd27_slast : TCD_SLAST , # [ doc = "0x1370 - TCD Destination Address" ] pub tcd27_daddr : TCD_DADDR , # [ doc = "0x1374 - TCD Signed Destination Address Offset" ] pub tcd27_doff : TCD_DOFF , _reserved_352_tcd27_citer : [ u8 ; 2usize ] , # [ doc = "0x1378 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd27_dlastsga : TCD_DLASTSGA , # [ doc = "0x137c - TCD Control and Status" ] pub tcd27_csr : TCD_CSR , _reserved_355_tcd27_biter : [ u8 ; 2usize ] , # [ doc = "0x1380 - TCD Source Address" ] pub tcd28_saddr : TCD_SADDR , # [ doc = "0x1384 - TCD Signed Source Address Offset" ] pub tcd28_soff : TCD_SOFF , # [ doc = "0x1386 - TCD Transfer Attributes" ] pub tcd28_attr : TCD_ATTR , _reserved_359_tcd28_nbytes : [ u8 ; 4usize ] , # [ doc = "0x138c - TCD Last Source Address Adjustment" ] pub tcd28_slast : TCD_SLAST , # [ doc = "0x1390 - TCD Destination Address" ] pub tcd28_daddr : TCD_DADDR , # [ doc = "0x1394 - TCD Signed Destination Address Offset" ] pub tcd28_doff : TCD_DOFF , _reserved_363_tcd28_citer : [ u8 ; 2usize ] , # [ doc = "0x1398 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd28_dlastsga : TCD_DLASTSGA , # [ doc = "0x139c - TCD Control and Status" ] pub tcd28_csr : TCD_CSR , _reserved_366_tcd28_biter : [ u8 ; 2usize ] , # [ doc = "0x13a0 - TCD Source Address" ] pub tcd29_saddr : TCD_SADDR , # [ doc = "0x13a4 - TCD Signed Source Address Offset" ] pub tcd29_soff : TCD_SOFF , # [ doc = "0x13a6 - TCD Transfer Attributes" ] pub tcd29_attr : TCD_ATTR , _reserved_370_tcd29_nbytes : [ u8 ; 4usize ] , # [ doc = "0x13ac - TCD Last Source Address Adjustment" ] pub tcd29_slast : TCD_SLAST , # [ doc = "0x13b0 - TCD Destination Address" ] pub tcd29_daddr : TCD_DADDR , # [ doc = "0x13b4 - TCD Signed Destination Address Offset" ] pub tcd29_doff : TCD_DOFF , _reserved_374_tcd29_citer : [ u8 ; 2usize ] , # [ doc = "0x13b8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd29_dlastsga : TCD_DLASTSGA , # [ doc = "0x13bc - TCD Control and Status" ] pub tcd29_csr : TCD_CSR , _reserved_377_tcd29_biter : [ u8 ; 2usize ] , # [ doc = "0x13c0 - TCD Source Address" ] pub tcd30_saddr : TCD_SADDR , # [ doc = "0x13c4 - TCD Signed Source Address Offset" ] pub tcd30_soff : TCD_SOFF , # [ doc = "0x13c6 - TCD Transfer Attributes" ] pub tcd30_attr : TCD_ATTR , _reserved_381_tcd30_nbytes : [ u8 ; 4usize ] , # [ doc = "0x13cc - TCD Last Source Address Adjustment" ] pub tcd30_slast : TCD_SLAST , # [ doc = "0x13d0 - TCD Destination Address" ] pub tcd30_daddr : TCD_DADDR , # [ doc = "0x13d4 - TCD Signed Destination Address Offset" ] pub tcd30_doff : TCD_DOFF , _reserved_385_tcd30_citer : [ u8 ; 2usize ] , # [ doc = "0x13d8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd30_dlastsga : TCD_DLASTSGA , # [ doc = "0x13dc - TCD Control and Status" ] pub tcd30_csr : TCD_CSR , _reserved_388_tcd30_biter : [ u8 ; 2usize ] , # [ doc = "0x13e0 - TCD Source Address" ] pub tcd31_saddr : TCD_SADDR , # [ doc = "0x13e4 - TCD Signed Source Address Offset" ] pub tcd31_soff : TCD_SOFF , # [ doc = "0x13e6 - TCD Transfer Attributes" ] pub tcd31_attr : TCD_ATTR , _reserved_392_tcd31_nbytes : [ u8 ; 4usize ] , # [ doc = "0x13ec - TCD Last Source Address Adjustment" ] pub tcd31_slast : TCD_SLAST , # [ doc = "0x13f0 - TCD Destination Address" ] pub tcd31_daddr : TCD_DADDR , # [ doc = "0x13f4 - TCD Signed Destination Address Offset" ] pub tcd31_doff : TCD_DOFF , _reserved_396_tcd31_citer : [ u8 ; 2usize ] , # [ doc = "0x13f8 - TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub tcd31_dlastsga : TCD_DLASTSGA , # [ doc = "0x13fc - TCD Control and Status" ] pub tcd31_csr : TCD_CSR , _reserved_399_tcd31_biter : [ u8 ; 2usize ] , } impl RegisterBlock { # [ doc = "0x1008 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd0_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4104usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1008 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd0_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4104usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1008 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd0_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4104usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1008 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd0_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4104usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1008 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd0_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4104usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1008 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd0_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4104usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1016 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd0_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4118usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1016 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd0_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4118usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1016 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd0_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4118usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1016 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd0_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4118usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x101e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd0_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4126usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x101e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd0_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4126usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x101e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd0_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4126usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x101e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd0_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4126usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1028 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd1_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4136usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1028 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd1_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4136usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1028 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd1_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4136usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1028 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd1_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4136usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1028 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd1_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4136usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1028 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd1_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4136usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1036 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd1_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4150usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1036 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd1_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4150usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1036 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd1_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4150usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1036 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd1_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4150usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x103e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd1_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4158usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x103e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd1_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4158usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x103e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd1_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4158usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x103e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd1_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4158usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1048 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd2_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4168usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1048 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd2_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4168usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1048 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd2_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4168usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1048 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd2_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4168usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1048 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd2_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4168usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1048 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd2_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4168usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1056 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd2_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4182usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1056 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd2_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4182usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1056 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd2_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4182usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1056 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd2_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4182usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x105e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd2_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4190usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x105e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd2_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4190usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x105e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd2_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4190usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x105e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd2_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4190usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1068 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd3_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4200usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1068 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd3_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4200usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1068 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd3_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4200usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1068 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd3_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4200usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1068 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd3_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4200usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1068 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd3_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4200usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1076 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd3_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4214usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1076 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd3_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4214usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1076 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd3_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4214usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1076 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd3_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4214usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x107e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd3_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4222usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x107e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd3_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4222usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x107e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd3_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4222usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x107e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd3_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4222usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1088 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd4_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4232usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1088 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd4_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4232usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1088 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd4_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4232usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1088 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd4_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4232usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1088 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd4_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4232usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1088 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd4_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4232usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1096 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd4_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4246usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1096 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd4_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4246usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1096 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd4_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4246usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1096 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd4_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4246usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x109e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd4_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4254usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x109e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd4_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4254usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x109e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd4_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4254usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x109e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd4_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4254usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x10a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd5_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4264usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x10a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd5_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4264usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x10a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd5_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4264usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x10a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd5_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4264usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x10a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd5_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4264usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x10a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd5_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4264usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x10b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd5_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4278usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x10b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd5_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4278usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x10b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd5_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4278usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x10b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd5_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4278usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x10be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd5_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4286usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x10be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd5_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4286usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x10be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd5_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4286usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x10be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd5_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4286usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x10c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd6_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4296usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x10c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd6_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4296usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x10c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd6_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4296usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x10c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd6_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4296usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x10c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd6_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4296usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x10c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd6_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4296usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x10d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd6_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4310usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x10d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd6_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4310usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x10d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd6_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4310usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x10d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd6_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4310usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x10de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd6_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4318usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x10de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd6_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4318usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x10de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd6_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4318usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x10de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd6_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4318usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x10e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd7_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4328usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x10e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd7_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4328usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x10e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd7_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4328usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x10e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd7_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4328usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x10e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd7_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4328usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x10e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd7_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4328usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x10f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd7_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4342usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x10f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd7_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4342usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x10f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd7_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4342usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x10f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd7_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4342usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x10fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd7_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4350usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x10fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd7_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4350usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x10fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd7_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4350usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x10fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd7_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4350usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1108 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd8_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4360usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1108 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd8_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4360usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1108 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd8_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4360usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1108 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd8_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4360usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1108 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd8_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4360usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1108 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd8_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4360usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1116 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd8_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4374usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1116 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd8_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4374usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1116 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd8_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4374usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1116 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd8_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4374usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x111e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd8_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4382usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x111e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd8_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4382usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x111e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd8_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4382usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x111e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd8_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4382usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1128 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd9_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4392usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1128 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd9_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4392usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1128 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd9_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4392usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1128 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd9_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4392usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1128 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd9_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4392usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1128 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd9_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4392usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1136 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd9_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4406usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1136 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd9_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4406usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1136 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd9_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4406usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1136 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd9_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4406usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x113e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd9_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4414usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x113e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd9_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4414usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x113e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd9_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4414usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x113e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd9_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4414usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1148 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd10_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4424usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1148 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd10_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4424usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1148 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd10_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4424usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1148 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd10_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4424usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1148 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd10_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4424usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1148 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd10_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4424usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1156 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd10_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4438usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1156 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd10_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4438usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1156 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd10_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4438usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1156 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd10_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4438usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x115e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd10_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4446usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x115e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd10_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4446usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x115e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd10_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4446usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x115e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd10_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4446usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1168 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd11_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4456usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1168 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd11_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4456usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1168 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd11_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4456usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1168 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd11_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4456usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1168 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd11_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4456usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1168 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd11_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4456usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1176 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd11_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4470usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1176 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd11_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4470usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1176 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd11_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4470usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1176 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd11_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4470usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x117e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd11_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4478usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x117e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd11_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4478usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x117e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd11_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4478usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x117e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd11_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4478usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1188 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd12_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4488usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1188 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd12_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4488usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1188 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd12_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4488usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1188 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd12_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4488usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1188 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd12_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4488usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1188 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd12_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4488usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1196 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd12_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4502usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1196 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd12_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4502usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1196 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd12_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4502usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1196 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd12_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4502usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x119e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd12_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4510usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x119e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd12_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4510usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x119e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd12_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4510usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x119e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd12_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4510usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x11a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd13_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4520usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x11a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd13_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4520usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x11a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd13_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4520usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x11a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd13_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4520usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x11a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd13_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4520usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x11a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd13_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4520usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x11b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd13_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4534usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x11b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd13_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4534usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x11b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd13_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4534usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x11b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd13_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4534usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x11be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd13_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4542usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x11be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd13_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4542usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x11be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd13_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4542usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x11be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd13_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4542usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x11c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd14_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4552usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x11c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd14_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4552usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x11c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd14_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4552usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x11c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd14_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4552usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x11c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd14_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4552usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x11c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd14_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4552usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x11d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd14_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4566usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x11d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd14_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4566usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x11d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd14_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4566usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x11d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd14_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4566usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x11de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd14_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4574usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x11de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd14_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4574usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x11de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd14_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4574usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x11de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd14_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4574usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x11e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd15_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4584usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x11e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd15_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4584usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x11e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd15_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4584usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x11e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd15_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4584usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x11e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd15_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4584usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x11e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd15_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4584usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x11f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd15_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4598usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x11f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd15_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4598usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x11f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd15_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4598usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x11f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd15_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4598usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x11fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd15_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4606usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x11fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd15_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4606usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x11fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd15_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4606usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x11fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd15_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4606usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1208 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd16_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4616usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1208 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd16_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4616usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1208 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd16_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4616usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1208 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd16_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4616usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1208 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd16_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4616usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1208 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd16_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4616usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1216 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd16_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4630usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1216 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd16_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4630usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1216 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd16_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4630usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1216 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd16_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4630usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x121e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd16_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4638usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x121e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd16_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4638usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x121e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd16_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4638usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x121e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd16_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4638usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1228 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd17_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4648usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1228 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd17_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4648usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1228 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd17_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4648usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1228 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd17_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4648usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1228 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd17_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4648usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1228 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd17_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4648usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1236 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd17_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4662usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1236 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd17_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4662usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1236 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd17_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4662usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1236 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd17_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4662usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x123e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd17_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4670usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x123e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd17_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4670usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x123e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd17_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4670usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x123e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd17_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4670usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1248 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd18_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4680usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1248 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd18_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4680usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1248 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd18_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4680usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1248 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd18_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4680usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1248 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd18_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4680usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1248 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd18_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4680usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1256 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd18_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4694usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1256 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd18_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4694usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1256 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd18_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4694usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1256 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd18_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4694usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x125e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd18_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4702usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x125e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd18_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4702usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x125e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd18_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4702usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x125e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd18_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4702usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1268 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd19_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4712usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1268 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd19_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4712usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1268 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd19_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4712usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1268 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd19_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4712usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1268 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd19_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4712usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1268 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd19_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4712usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1276 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd19_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4726usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1276 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd19_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4726usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1276 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd19_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4726usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1276 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd19_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4726usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x127e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd19_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4734usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x127e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd19_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4734usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x127e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd19_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4734usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x127e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd19_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4734usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1288 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd20_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4744usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1288 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd20_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4744usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1288 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd20_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4744usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1288 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd20_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4744usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1288 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd20_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4744usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1288 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd20_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4744usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1296 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd20_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4758usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1296 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd20_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4758usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1296 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd20_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4758usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1296 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd20_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4758usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x129e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd20_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4766usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x129e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd20_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4766usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x129e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd20_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4766usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x129e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd20_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4766usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x12a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd21_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4776usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x12a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd21_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4776usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x12a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd21_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4776usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x12a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd21_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4776usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x12a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd21_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4776usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x12a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd21_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4776usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x12b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd21_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4790usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x12b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd21_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4790usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x12b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd21_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4790usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x12b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd21_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4790usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x12be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd21_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4798usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x12be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd21_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4798usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x12be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd21_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4798usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x12be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd21_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4798usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x12c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd22_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4808usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x12c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd22_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4808usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x12c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd22_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4808usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x12c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd22_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4808usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x12c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd22_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4808usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x12c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd22_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4808usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x12d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd22_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4822usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x12d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd22_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4822usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x12d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd22_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4822usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x12d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd22_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4822usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x12de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd22_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4830usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x12de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd22_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4830usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x12de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd22_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4830usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x12de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd22_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4830usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x12e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd23_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4840usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x12e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd23_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4840usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x12e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd23_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4840usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x12e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd23_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4840usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x12e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd23_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4840usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x12e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd23_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4840usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x12f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd23_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4854usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x12f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd23_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4854usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x12f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd23_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4854usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x12f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd23_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4854usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x12fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd23_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4862usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x12fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd23_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4862usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x12fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd23_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4862usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x12fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd23_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4862usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1308 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd24_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4872usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1308 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd24_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4872usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1308 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd24_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4872usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1308 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd24_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4872usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1308 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd24_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4872usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1308 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd24_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4872usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1316 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd24_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4886usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1316 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd24_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4886usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1316 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd24_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4886usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1316 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd24_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4886usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x131e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd24_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4894usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x131e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd24_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4894usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x131e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd24_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4894usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x131e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd24_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4894usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1328 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd25_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4904usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1328 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd25_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4904usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1328 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd25_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4904usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1328 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd25_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4904usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1328 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd25_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4904usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1328 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd25_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4904usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1336 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd25_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4918usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1336 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd25_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4918usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1336 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd25_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4918usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1336 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd25_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4918usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x133e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd25_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4926usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x133e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd25_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4926usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x133e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd25_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4926usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x133e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd25_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4926usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1348 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd26_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4936usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1348 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd26_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4936usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1348 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd26_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4936usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1348 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd26_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4936usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1348 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd26_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4936usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1348 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd26_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4936usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1356 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd26_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4950usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1356 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd26_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4950usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1356 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd26_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4950usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1356 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd26_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4950usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x135e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd26_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4958usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x135e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd26_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4958usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x135e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd26_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4958usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x135e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd26_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4958usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1368 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd27_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4968usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1368 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd27_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4968usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1368 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd27_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4968usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1368 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd27_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4968usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1368 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd27_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4968usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1368 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd27_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4968usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1376 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd27_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4982usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1376 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd27_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4982usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1376 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd27_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4982usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1376 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd27_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4982usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x137e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd27_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4990usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x137e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd27_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4990usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x137e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd27_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4990usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x137e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd27_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4990usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x1388 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd28_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5000usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1388 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd28_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5000usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x1388 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd28_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5000usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1388 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd28_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5000usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x1388 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd28_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5000usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x1388 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd28_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5000usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x1396 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd28_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5014usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x1396 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd28_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5014usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x1396 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd28_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5014usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x1396 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd28_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5014usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x139e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd28_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5022usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x139e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd28_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5022usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x139e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd28_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5022usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x139e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd28_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5022usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x13a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd29_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5032usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x13a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd29_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5032usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x13a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd29_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5032usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x13a8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd29_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5032usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x13a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd29_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5032usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x13a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd29_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5032usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x13b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd29_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5046usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x13b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd29_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5046usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x13b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd29_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5046usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x13b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd29_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5046usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x13be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd29_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5054usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x13be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd29_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5054usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x13be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd29_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5054usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x13be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd29_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5054usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x13c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd30_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5064usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x13c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd30_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5064usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x13c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd30_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5064usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x13c8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd30_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5064usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x13c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd30_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5064usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x13c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd30_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5064usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x13d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd30_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5078usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x13d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd30_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5078usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x13d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd30_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5078usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x13d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd30_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5078usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x13de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd30_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5086usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x13de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd30_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5086usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x13de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd30_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5086usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x13de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd30_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5086usize ) as * mut TCD_BITER_ELINKNO ) } } # [ doc = "0x13e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd31_nbytes_mloffyes ( & self ) -> & TCD_NBYTES_MLOFFYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5096usize ) as * const TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x13e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] # [ inline ( always ) ] pub fn tcd31_nbytes_mloffyes_mut ( & self ) -> & mut TCD_NBYTES_MLOFFYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5096usize ) as * mut TCD_NBYTES_MLOFFYES ) } } # [ doc = "0x13e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd31_nbytes_mloffno ( & self ) -> & TCD_NBYTES_MLOFFNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5096usize ) as * const TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x13e8 - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] # [ inline ( always ) ] pub fn tcd31_nbytes_mloffno_mut ( & self ) -> & mut TCD_NBYTES_MLOFFNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5096usize ) as * mut TCD_NBYTES_MLOFFNO ) } } # [ doc = "0x13e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd31_nbytes_mlno ( & self ) -> & TCD_NBYTES_MLNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5096usize ) as * const TCD_NBYTES_MLNO ) } } # [ doc = "0x13e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] # [ inline ( always ) ] pub fn tcd31_nbytes_mlno_mut ( & self ) -> & mut TCD_NBYTES_MLNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5096usize ) as * mut TCD_NBYTES_MLNO ) } } # [ doc = "0x13f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd31_citer_elinkyes ( & self ) -> & TCD_CITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5110usize ) as * const TCD_CITER_ELINKYES ) } } # [ doc = "0x13f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd31_citer_elinkyes_mut ( & self ) -> & mut TCD_CITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5110usize ) as * mut TCD_CITER_ELINKYES ) } } # [ doc = "0x13f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd31_citer_elinkno ( & self ) -> & TCD_CITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5110usize ) as * const TCD_CITER_ELINKNO ) } } # [ doc = "0x13f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd31_citer_elinkno_mut ( & self ) -> & mut TCD_CITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5110usize ) as * mut TCD_CITER_ELINKNO ) } } # [ doc = "0x13fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd31_biter_elinkyes ( & self ) -> & TCD_BITER_ELINKYES { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5118usize ) as * const TCD_BITER_ELINKYES ) } } # [ doc = "0x13fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] # [ inline ( always ) ] pub fn tcd31_biter_elinkyes_mut ( & self ) -> & mut TCD_BITER_ELINKYES { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5118usize ) as * mut TCD_BITER_ELINKYES ) } } # [ doc = "0x13fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd31_biter_elinkno ( & self ) -> & TCD_BITER_ELINKNO { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5118usize ) as * const TCD_BITER_ELINKNO ) } } # [ doc = "0x13fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] # [ inline ( always ) ] pub fn tcd31_biter_elinkno_mut ( & self ) -> & mut TCD_BITER_ELINKNO { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5118usize ) as * mut TCD_BITER_ELINKNO ) } } } # [ doc = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr](cr) module" ] pub type CR = crate :: Reg < u32 , _CR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR ; # [ doc = "`read()` method returns [cr::R](cr::R) reader structure" ] impl crate :: Readable for CR { } # [ doc = "`write(|w| ..)` method takes [cr::W](cr::W) writer structure" ] impl crate :: Writable for CR { } # [ doc = "Control Register" ] pub mod cr { # [ doc = "Reader of register CR" ] pub type R = crate :: R < u32 , super :: CR > ; # [ doc = "Writer for register CR" ] pub type W = crate :: W < u32 , super :: CR > ; # [ doc = "Register CR `reset()`'s with value 0x0400" ] impl crate :: ResetValue for super :: CR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0400 } } # [ doc = "Enable Debug\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDBG_A { # [ doc = "0: When in debug mode, the DMA continues to operate." ] _0 , # [ doc = "1: When in debug mode, the DMA stalls the start of a new channel. Executing channels are allowed to complete. Channel execution resumes when the system exits debug mode or the EDBG bit is cleared." ] _1 } impl From < EDBG_A > for bool { # [ inline ( always ) ] fn from ( variant : EDBG_A ) -> Self { match variant { EDBG_A :: _0 => false , EDBG_A :: _1 => true } } } # [ doc = "Reader of field `EDBG`" ] pub type EDBG_R = crate :: R < bool , EDBG_A > ; impl EDBG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDBG_A { match self . bits { false => EDBG_A :: _0 , true => EDBG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDBG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDBG_A :: _1 } } # [ doc = "Write proxy for field `EDBG`" ] pub struct EDBG_W < 'a > { w : & 'a mut W , } impl < 'a > EDBG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDBG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "When in debug mode, the DMA continues to operate." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDBG_A :: _0 ) } # [ doc = "When in debug mode, the DMA stalls the start of a new channel. Executing channels are allowed to complete. Channel execution resumes when the system exits debug mode or the EDBG bit is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDBG_A :: _1 ) } # [ 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 } } # [ doc = "Enable Round Robin Channel Arbitration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERCA_A { # [ doc = "0: Fixed priority arbitration is used for channel selection within each group." ] _0 , # [ doc = "1: Round robin arbitration is used for channel selection within each group." ] _1 } impl From < ERCA_A > for bool { # [ inline ( always ) ] fn from ( variant : ERCA_A ) -> Self { match variant { ERCA_A :: _0 => false , ERCA_A :: _1 => true } } } # [ doc = "Reader of field `ERCA`" ] pub type ERCA_R = crate :: R < bool , ERCA_A > ; impl ERCA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERCA_A { match self . bits { false => ERCA_A :: _0 , true => ERCA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERCA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERCA_A :: _1 } } # [ doc = "Write proxy for field `ERCA`" ] pub struct ERCA_W < 'a > { w : & 'a mut W , } impl < 'a > ERCA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERCA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fixed priority arbitration is used for channel selection within each group." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERCA_A :: _0 ) } # [ doc = "Round robin arbitration is used for channel selection within each group." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERCA_A :: _1 ) } # [ 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 = "Enable Round Robin Group Arbitration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERGA_A { # [ doc = "0: Fixed priority arbitration is used for selection among the groups." ] _0 , # [ doc = "1: Round robin arbitration is used for selection among the groups." ] _1 } impl From < ERGA_A > for bool { # [ inline ( always ) ] fn from ( variant : ERGA_A ) -> Self { match variant { ERGA_A :: _0 => false , ERGA_A :: _1 => true } } } # [ doc = "Reader of field `ERGA`" ] pub type ERGA_R = crate :: R < bool , ERGA_A > ; impl ERGA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERGA_A { match self . bits { false => ERGA_A :: _0 , true => ERGA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERGA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERGA_A :: _1 } } # [ doc = "Write proxy for field `ERGA`" ] pub struct ERGA_W < 'a > { w : & 'a mut W , } impl < 'a > ERGA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERGA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fixed priority arbitration is used for selection among the groups." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERGA_A :: _0 ) } # [ doc = "Round robin arbitration is used for selection among the groups." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERGA_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Halt On Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HOE_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Any error causes the HALT bit to set. Subsequently, all service requests are ignored until the HALT bit is cleared." ] _1 } impl From < HOE_A > for bool { # [ inline ( always ) ] fn from ( variant : HOE_A ) -> Self { match variant { HOE_A :: _0 => false , HOE_A :: _1 => true } } } # [ doc = "Reader of field `HOE`" ] pub type HOE_R = crate :: R < bool , HOE_A > ; impl HOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HOE_A { match self . bits { false => HOE_A :: _0 , true => HOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HOE_A :: _1 } } # [ doc = "Write proxy for field `HOE`" ] pub struct HOE_W < 'a > { w : & 'a mut W , } impl < 'a > HOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HOE_A :: _0 ) } # [ doc = "Any error causes the HALT bit to set. Subsequently, all service requests are ignored until the HALT bit is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HOE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Halt DMA Operations\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HALT_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Stall the start of any new channels. Executing channels are allowed to complete. Channel execution resumes when this bit is cleared." ] _1 } impl From < HALT_A > for bool { # [ inline ( always ) ] fn from ( variant : HALT_A ) -> Self { match variant { HALT_A :: _0 => false , HALT_A :: _1 => true } } } # [ doc = "Reader of field `HALT`" ] pub type HALT_R = crate :: R < bool , HALT_A > ; impl HALT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HALT_A { match self . bits { false => HALT_A :: _0 , true => HALT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HALT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HALT_A :: _1 } } # [ doc = "Write proxy for field `HALT`" ] pub struct HALT_W < 'a > { w : & 'a mut W , } impl < 'a > HALT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HALT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _0 ) } # [ doc = "Stall the start of any new channels. Executing channels are allowed to complete. Channel execution resumes when this bit is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _1 ) } # [ 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 = "Continuous Link Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLM_A { # [ doc = "0: A minor loop channel link made to itself goes through channel arbitration before being activated again." ] _0 , # [ doc = "1: A minor loop channel link made to itself does not go through channel arbitration before being activated again. Upon minor loop completion, the channel activates again if that channel has a minor loop channel link enabled and the link channel is itself. This effectively applies the minor loop offsets and restarts the next minor loop." ] _1 } impl From < CLM_A > for bool { # [ inline ( always ) ] fn from ( variant : CLM_A ) -> Self { match variant { CLM_A :: _0 => false , CLM_A :: _1 => true } } } # [ doc = "Reader of field `CLM`" ] pub type CLM_R = crate :: R < bool , CLM_A > ; impl CLM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLM_A { match self . bits { false => CLM_A :: _0 , true => CLM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLM_A :: _1 } } # [ doc = "Write proxy for field `CLM`" ] pub struct CLM_W < 'a > { w : & 'a mut W , } impl < 'a > CLM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A minor loop channel link made to itself goes through channel arbitration before being activated again." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLM_A :: _0 ) } # [ doc = "A minor loop channel link made to itself does not go through channel arbitration before being activated again. Upon minor loop completion, the channel activates again if that channel has a minor loop channel link enabled and the link channel is itself. This effectively applies the minor loop offsets and restarts the next minor loop." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLM_A :: _1 ) } # [ 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 = "Enable Minor Loop Mapping\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMLM_A { # [ doc = "0: Disabled. TCDn.word2 is defined as a 32-bit NBYTES field." ] _0 , # [ doc = "1: Enabled. TCDn.word2 is redefined to include individual enable fields, an offset field, and the NBYTES field. The individual enable fields allow the minor loop offset to be applied to the source address, the destination address, or both. The NBYTES field is reduced when either offset is enabled." ] _1 } impl From < EMLM_A > for bool { # [ inline ( always ) ] fn from ( variant : EMLM_A ) -> Self { match variant { EMLM_A :: _0 => false , EMLM_A :: _1 => true } } } # [ doc = "Reader of field `EMLM`" ] pub type EMLM_R = crate :: R < bool , EMLM_A > ; impl EMLM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMLM_A { match self . bits { false => EMLM_A :: _0 , true => EMLM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EMLM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EMLM_A :: _1 } } # [ doc = "Write proxy for field `EMLM`" ] pub struct EMLM_W < 'a > { w : & 'a mut W , } impl < 'a > EMLM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMLM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled. TCDn.word2 is defined as a 32-bit NBYTES field." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EMLM_A :: _0 ) } # [ doc = "Enabled. TCDn.word2 is redefined to include individual enable fields, an offset field, and the NBYTES field. The individual enable fields allow the minor loop offset to be applied to the source address, the destination address, or both. The NBYTES field is reduced when either offset is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EMLM_A :: _1 ) } # [ 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 = "Reader of field `GRP0PRI`" ] pub type GRP0PRI_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `GRP0PRI`" ] pub struct GRP0PRI_W < 'a > { w : & 'a mut W , } impl < 'a > GRP0PRI_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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Reader of field `GRP1PRI`" ] pub type GRP1PRI_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `GRP1PRI`" ] pub struct GRP1PRI_W < 'a > { w : & 'a mut W , } impl < 'a > GRP1PRI_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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Error Cancel Transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ECX_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Cancel the remaining data transfer in the same fashion as the CX bit. Stop the executing channel and force the minor loop to finish. The cancel takes effect after the last write of the current read/write sequence. The ECX bit clears itself after the cancel is honored. In addition to cancelling the transfer, ECX treats the cancel as an error condition, thus updating the Error Status register (DMAx_ES) and generating an optional error interrupt." ] _1 } impl From < ECX_A > for bool { # [ inline ( always ) ] fn from ( variant : ECX_A ) -> Self { match variant { ECX_A :: _0 => false , ECX_A :: _1 => true } } } # [ doc = "Reader of field `ECX`" ] pub type ECX_R = crate :: R < bool , ECX_A > ; impl ECX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ECX_A { match self . bits { false => ECX_A :: _0 , true => ECX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ECX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ECX_A :: _1 } } # [ doc = "Write proxy for field `ECX`" ] pub struct ECX_W < 'a > { w : & 'a mut W , } impl < 'a > ECX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ECX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ECX_A :: _0 ) } # [ doc = "Cancel the remaining data transfer in the same fashion as the CX bit. Stop the executing channel and force the minor loop to finish. The cancel takes effect after the last write of the current read/write sequence. The ECX bit clears itself after the cancel is honored. In addition to cancelling the transfer, ECX treats the cancel as an error condition, thus updating the Error Status register (DMAx_ES) and generating an optional error interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ECX_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Cancel Transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CX_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Cancel the remaining data transfer. Stop the executing channel and force the minor loop to finish. The cancel takes effect after the last write of the current read/write sequence. The CX bit clears itself after the cancel has been honored. This cancel retires the channel normally as if the minor loop was completed." ] _1 } impl From < CX_A > for bool { # [ inline ( always ) ] fn from ( variant : CX_A ) -> Self { match variant { CX_A :: _0 => false , CX_A :: _1 => true } } } # [ doc = "Reader of field `CX`" ] pub type CX_R = crate :: R < bool , CX_A > ; impl CX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CX_A { match self . bits { false => CX_A :: _0 , true => CX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CX_A :: _1 } } # [ doc = "Write proxy for field `CX`" ] pub struct CX_W < 'a > { w : & 'a mut W , } impl < 'a > CX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CX_A :: _0 ) } # [ doc = "Cancel the remaining data transfer. Stop the executing channel and force the minor loop to finish. The cancel takes effect after the last write of the current read/write sequence. The CX bit clears itself after the cancel has been honored. This cancel retires the channel normally as if the minor loop was completed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CX_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } impl R { # [ doc = "Bit 1 - Enable Debug" ] # [ inline ( always ) ] pub fn edbg ( & self ) -> EDBG_R { EDBG_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Enable Round Robin Channel Arbitration" ] # [ inline ( always ) ] pub fn erca ( & self ) -> ERCA_R { ERCA_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Enable Round Robin Group Arbitration" ] # [ inline ( always ) ] pub fn erga ( & self ) -> ERGA_R { ERGA_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Halt On Error" ] # [ inline ( always ) ] pub fn hoe ( & self ) -> HOE_R { HOE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Halt DMA Operations" ] # [ inline ( always ) ] pub fn halt ( & self ) -> HALT_R { HALT_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Continuous Link Mode" ] # [ inline ( always ) ] pub fn clm ( & self ) -> CLM_R { CLM_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Enable Minor Loop Mapping" ] # [ inline ( always ) ] pub fn emlm ( & self ) -> EMLM_R { EMLM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Channel Group 0 Priority" ] # [ inline ( always ) ] pub fn grp0pri ( & self ) -> GRP0PRI_R { GRP0PRI_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Channel Group 1 Priority" ] # [ inline ( always ) ] pub fn grp1pri ( & self ) -> GRP1PRI_R { GRP1PRI_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Error Cancel Transfer" ] # [ inline ( always ) ] pub fn ecx ( & self ) -> ECX_R { ECX_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Cancel Transfer" ] # [ inline ( always ) ] pub fn cx ( & self ) -> CX_R { CX_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Enable Debug" ] # [ inline ( always ) ] pub fn edbg ( & mut self ) -> EDBG_W { EDBG_W { w : self } } # [ doc = "Bit 2 - Enable Round Robin Channel Arbitration" ] # [ inline ( always ) ] pub fn erca ( & mut self ) -> ERCA_W { ERCA_W { w : self } } # [ doc = "Bit 3 - Enable Round Robin Group Arbitration" ] # [ inline ( always ) ] pub fn erga ( & mut self ) -> ERGA_W { ERGA_W { w : self } } # [ doc = "Bit 4 - Halt On Error" ] # [ inline ( always ) ] pub fn hoe ( & mut self ) -> HOE_W { HOE_W { w : self } } # [ doc = "Bit 5 - Halt DMA Operations" ] # [ inline ( always ) ] pub fn halt ( & mut self ) -> HALT_W { HALT_W { w : self } } # [ doc = "Bit 6 - Continuous Link Mode" ] # [ inline ( always ) ] pub fn clm ( & mut self ) -> CLM_W { CLM_W { w : self } } # [ doc = "Bit 7 - Enable Minor Loop Mapping" ] # [ inline ( always ) ] pub fn emlm ( & mut self ) -> EMLM_W { EMLM_W { w : self } } # [ doc = "Bit 8 - Channel Group 0 Priority" ] # [ inline ( always ) ] pub fn grp0pri ( & mut self ) -> GRP0PRI_W { GRP0PRI_W { w : self } } # [ doc = "Bit 10 - Channel Group 1 Priority" ] # [ inline ( always ) ] pub fn grp1pri ( & mut self ) -> GRP1PRI_W { GRP1PRI_W { w : self } } # [ doc = "Bit 16 - Error Cancel Transfer" ] # [ inline ( always ) ] pub fn ecx ( & mut self ) -> ECX_W { ECX_W { w : self } } # [ doc = "Bit 17 - Cancel Transfer" ] # [ inline ( always ) ] pub fn cx ( & mut self ) -> CX_W { CX_W { w : self } } } } # [ doc = "Error Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [es](es) module" ] pub type ES = crate :: Reg < u32 , _ES > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ES ; # [ doc = "`read()` method returns [es::R](es::R) reader structure" ] impl crate :: Readable for ES { } # [ doc = "Error Status Register" ] pub mod es { # [ doc = "Reader of register ES" ] pub type R = crate :: R < u32 , super :: ES > ; # [ doc = "Destination Bus Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBE_A { # [ doc = "0: No destination bus error" ] _0 , # [ doc = "1: The last recorded error was a bus error on a destination write" ] _1 } impl From < DBE_A > for bool { # [ inline ( always ) ] fn from ( variant : DBE_A ) -> Self { match variant { DBE_A :: _0 => false , DBE_A :: _1 => true } } } # [ doc = "Reader of field `DBE`" ] pub type DBE_R = crate :: R < bool , DBE_A > ; impl DBE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBE_A { match self . bits { false => DBE_A :: _0 , true => DBE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBE_A :: _1 } } # [ doc = "Source Bus Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBE_A { # [ doc = "0: No source bus error" ] _0 , # [ doc = "1: The last recorded error was a bus error on a source read" ] _1 } impl From < SBE_A > for bool { # [ inline ( always ) ] fn from ( variant : SBE_A ) -> Self { match variant { SBE_A :: _0 => false , SBE_A :: _1 => true } } } # [ doc = "Reader of field `SBE`" ] pub type SBE_R = crate :: R < bool , SBE_A > ; impl SBE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBE_A { match self . bits { false => SBE_A :: _0 , true => SBE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBE_A :: _1 } } # [ doc = "Scatter/Gather Configuration Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SGE_A { # [ doc = "0: No scatter/gather configuration error" ] _0 , # [ doc = "1: The last recorded error was a configuration error detected in the TCDn_DLASTSGA field. This field is checked at the beginning of a scatter/gather operation after major loop completion if TCDn_CSR\\[ESG\\] is enabled. TCDn_DLASTSGA is not on a 32 byte boundary." ] _1 } impl From < SGE_A > for bool { # [ inline ( always ) ] fn from ( variant : SGE_A ) -> Self { match variant { SGE_A :: _0 => false , SGE_A :: _1 => true } } } # [ doc = "Reader of field `SGE`" ] pub type SGE_R = crate :: R < bool , SGE_A > ; impl SGE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SGE_A { match self . bits { false => SGE_A :: _0 , true => SGE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SGE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SGE_A :: _1 } } # [ doc = "NBYTES/CITER Configuration Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NCE_A { # [ doc = "0: No NBYTES/CITER configuration error" ] _0 , # [ doc = "1: The last recorded error was a configuration error detected in the TCDn_NBYTES or TCDn_CITER fields. TCDn_NBYTES is not a multiple of TCDn_ATTR\\[SSIZE\\] and TCDn_ATTR\\[DSIZE\\], or TCDn_CITER\\[CITER\\] is equal to zero, or TCDn_CITER\\[ELINK\\] is not equal to TCDn_BITER\\[ELINK\\]" ] _1 } impl From < NCE_A > for bool { # [ inline ( always ) ] fn from ( variant : NCE_A ) -> Self { match variant { NCE_A :: _0 => false , NCE_A :: _1 => true } } } # [ doc = "Reader of field `NCE`" ] pub type NCE_R = crate :: R < bool , NCE_A > ; impl NCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NCE_A { match self . bits { false => NCE_A :: _0 , true => NCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NCE_A :: _1 } } # [ doc = "Destination Offset Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOE_A { # [ doc = "0: No destination offset configuration error" ] _0 , # [ doc = "1: The last recorded error was a configuration error detected in the TCDn_DOFF field. TCDn_DOFF is inconsistent with TCDn_ATTR\\[DSIZE\\]." ] _1 } impl From < DOE_A > for bool { # [ inline ( always ) ] fn from ( variant : DOE_A ) -> Self { match variant { DOE_A :: _0 => false , DOE_A :: _1 => true } } } # [ doc = "Reader of field `DOE`" ] pub type DOE_R = crate :: R < bool , DOE_A > ; impl DOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DOE_A { match self . bits { false => DOE_A :: _0 , true => DOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DOE_A :: _1 } } # [ doc = "Destination Address Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DAE_A { # [ doc = "0: No destination address configuration error" ] _0 , # [ doc = "1: The last recorded error was a configuration error detected in the TCDn_DADDR field. TCDn_DADDR is inconsistent with TCDn_ATTR\\[DSIZE\\]." ] _1 } impl From < DAE_A > for bool { # [ inline ( always ) ] fn from ( variant : DAE_A ) -> Self { match variant { DAE_A :: _0 => false , DAE_A :: _1 => true } } } # [ doc = "Reader of field `DAE`" ] pub type DAE_R = crate :: R < bool , DAE_A > ; impl DAE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DAE_A { match self . bits { false => DAE_A :: _0 , true => DAE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DAE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DAE_A :: _1 } } # [ doc = "Source Offset Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SOE_A { # [ doc = "0: No source offset configuration error" ] _0 , # [ doc = "1: The last recorded error was a configuration error detected in the TCDn_SOFF field. TCDn_SOFF is inconsistent with TCDn_ATTR\\[SSIZE\\]." ] _1 } impl From < SOE_A > for bool { # [ inline ( always ) ] fn from ( variant : SOE_A ) -> Self { match variant { SOE_A :: _0 => false , SOE_A :: _1 => true } } } # [ doc = "Reader of field `SOE`" ] pub type SOE_R = crate :: R < bool , SOE_A > ; impl SOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SOE_A { match self . bits { false => SOE_A :: _0 , true => SOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SOE_A :: _1 } } # [ doc = "Source Address Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAE_A { # [ doc = "0: No source address configuration error." ] _0 , # [ doc = "1: The last recorded error was a configuration error detected in the TCDn_SADDR field. TCDn_SADDR is inconsistent with TCDn_ATTR\\[SSIZE\\]." ] _1 } impl From < SAE_A > for bool { # [ inline ( always ) ] fn from ( variant : SAE_A ) -> Self { match variant { SAE_A :: _0 => false , SAE_A :: _1 => true } } } # [ doc = "Reader of field `SAE`" ] pub type SAE_R = crate :: R < bool , SAE_A > ; impl SAE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SAE_A { match self . bits { false => SAE_A :: _0 , true => SAE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SAE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SAE_A :: _1 } } # [ doc = "Reader of field `ERRCHN`" ] pub type ERRCHN_R = crate :: R < u8 , u8 > ; # [ doc = "Channel Priority Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPE_A { # [ doc = "0: No channel priority error" ] _0 , # [ doc = "1: The last recorded error was a configuration error in the channel priorities within a group. Channel priorities within a group are not unique." ] _1 } impl From < CPE_A > for bool { # [ inline ( always ) ] fn from ( variant : CPE_A ) -> Self { match variant { CPE_A :: _0 => false , CPE_A :: _1 => true } } } # [ doc = "Reader of field `CPE`" ] pub type CPE_R = crate :: R < bool , CPE_A > ; impl CPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPE_A { match self . bits { false => CPE_A :: _0 , true => CPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPE_A :: _1 } } # [ doc = "Group Priority Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPE_A { # [ doc = "0: No group priority error" ] _0 , # [ doc = "1: The last recorded error was a configuration error among the group priorities. All group priorities are not unique." ] _1 } impl From < GPE_A > for bool { # [ inline ( always ) ] fn from ( variant : GPE_A ) -> Self { match variant { GPE_A :: _0 => false , GPE_A :: _1 => true } } } # [ doc = "Reader of field `GPE`" ] pub type GPE_R = crate :: R < bool , GPE_A > ; impl GPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GPE_A { match self . bits { false => GPE_A :: _0 , true => GPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GPE_A :: _1 } } # [ doc = "Transfer Canceled\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ECX_A { # [ doc = "0: No canceled transfers" ] _0 , # [ doc = "1: The last recorded entry was a canceled transfer by the error cancel transfer input" ] _1 } impl From < ECX_A > for bool { # [ inline ( always ) ] fn from ( variant : ECX_A ) -> Self { match variant { ECX_A :: _0 => false , ECX_A :: _1 => true } } } # [ doc = "Reader of field `ECX`" ] pub type ECX_R = crate :: R < bool , ECX_A > ; impl ECX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ECX_A { match self . bits { false => ECX_A :: _0 , true => ECX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ECX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ECX_A :: _1 } } # [ doc = "Logical OR of all ERR status bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VLD_A { # [ doc = "0: No ERR bits are set." ] _0 , # [ doc = "1: At least one ERR bit is set indicating a valid error exists that has not been cleared." ] _1 } impl From < VLD_A > for bool { # [ inline ( always ) ] fn from ( variant : VLD_A ) -> Self { match variant { VLD_A :: _0 => false , VLD_A :: _1 => true } } } # [ doc = "Reader of field `VLD`" ] pub type VLD_R = crate :: R < bool , VLD_A > ; impl VLD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VLD_A { match self . bits { false => VLD_A :: _0 , true => VLD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VLD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VLD_A :: _1 } } impl R { # [ doc = "Bit 0 - Destination Bus Error" ] # [ inline ( always ) ] pub fn dbe ( & self ) -> DBE_R { DBE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Source Bus Error" ] # [ inline ( always ) ] pub fn sbe ( & self ) -> SBE_R { SBE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Scatter/Gather Configuration Error" ] # [ inline ( always ) ] pub fn sge ( & self ) -> SGE_R { SGE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - NBYTES/CITER Configuration Error" ] # [ inline ( always ) ] pub fn nce ( & self ) -> NCE_R { NCE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Destination Offset Error" ] # [ inline ( always ) ] pub fn doe ( & self ) -> DOE_R { DOE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Destination Address Error" ] # [ inline ( always ) ] pub fn dae ( & self ) -> DAE_R { DAE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Source Offset Error" ] # [ inline ( always ) ] pub fn soe ( & self ) -> SOE_R { SOE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Source Address Error" ] # [ inline ( always ) ] pub fn sae ( & self ) -> SAE_R { SAE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:12 - Error Channel Number or Canceled Channel Number" ] # [ inline ( always ) ] pub fn errchn ( & self ) -> ERRCHN_R { ERRCHN_R :: new ( ( ( self . bits >> 8 ) & 0x1f ) as u8 ) } # [ doc = "Bit 14 - Channel Priority Error" ] # [ inline ( always ) ] pub fn cpe ( & self ) -> CPE_R { CPE_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Group Priority Error" ] # [ inline ( always ) ] pub fn gpe ( & self ) -> GPE_R { GPE_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Transfer Canceled" ] # [ inline ( always ) ] pub fn ecx ( & self ) -> ECX_R { ECX_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Logical OR of all ERR status bits" ] # [ inline ( always ) ] pub fn vld ( & self ) -> VLD_R { VLD_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Enable Request Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [erq](erq) module" ] pub type ERQ = crate :: Reg < u32 , _ERQ > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ERQ ; # [ doc = "`read()` method returns [erq::R](erq::R) reader structure" ] impl crate :: Readable for ERQ { } # [ doc = "`write(|w| ..)` method takes [erq::W](erq::W) writer structure" ] impl crate :: Writable for ERQ { } # [ doc = "Enable Request Register" ] pub mod erq { # [ doc = "Reader of register ERQ" ] pub type R = crate :: R < u32 , super :: ERQ > ; # [ doc = "Writer for register ERQ" ] pub type W = crate :: W < u32 , super :: ERQ > ; # [ doc = "Register ERQ `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ERQ { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Enable DMA Request 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ0_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ0_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ0_A ) -> Self { match variant { ERQ0_A :: _0 => false , ERQ0_A :: _1 => true } } } # [ doc = "Reader of field `ERQ0`" ] pub type ERQ0_R = crate :: R < bool , ERQ0_A > ; impl ERQ0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ0_A { match self . bits { false => ERQ0_A :: _0 , true => ERQ0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ0_A :: _1 } } # [ doc = "Write proxy for field `ERQ0`" ] pub struct ERQ0_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ0_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Enable DMA Request 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ1_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ1_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ1_A ) -> Self { match variant { ERQ1_A :: _0 => false , ERQ1_A :: _1 => true } } } # [ doc = "Reader of field `ERQ1`" ] pub type ERQ1_R = crate :: R < bool , ERQ1_A > ; impl ERQ1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ1_A { match self . bits { false => ERQ1_A :: _0 , true => ERQ1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ1_A :: _1 } } # [ doc = "Write proxy for field `ERQ1`" ] pub struct ERQ1_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ1_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ1_A :: _1 ) } # [ 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 } } # [ doc = "Enable DMA Request 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ2_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ2_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ2_A ) -> Self { match variant { ERQ2_A :: _0 => false , ERQ2_A :: _1 => true } } } # [ doc = "Reader of field `ERQ2`" ] pub type ERQ2_R = crate :: R < bool , ERQ2_A > ; impl ERQ2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ2_A { match self . bits { false => ERQ2_A :: _0 , true => ERQ2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ2_A :: _1 } } # [ doc = "Write proxy for field `ERQ2`" ] pub struct ERQ2_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ2_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ2_A :: _1 ) } # [ 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 = "Enable DMA Request 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ3_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ3_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ3_A ) -> Self { match variant { ERQ3_A :: _0 => false , ERQ3_A :: _1 => true } } } # [ doc = "Reader of field `ERQ3`" ] pub type ERQ3_R = crate :: R < bool , ERQ3_A > ; impl ERQ3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ3_A { match self . bits { false => ERQ3_A :: _0 , true => ERQ3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ3_A :: _1 } } # [ doc = "Write proxy for field `ERQ3`" ] pub struct ERQ3_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ3_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enable DMA Request 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ4_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ4_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ4_A ) -> Self { match variant { ERQ4_A :: _0 => false , ERQ4_A :: _1 => true } } } # [ doc = "Reader of field `ERQ4`" ] pub type ERQ4_R = crate :: R < bool , ERQ4_A > ; impl ERQ4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ4_A { match self . bits { false => ERQ4_A :: _0 , true => ERQ4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ4_A :: _1 } } # [ doc = "Write proxy for field `ERQ4`" ] pub struct ERQ4_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ4_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Enable DMA Request 5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ5_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ5_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ5_A ) -> Self { match variant { ERQ5_A :: _0 => false , ERQ5_A :: _1 => true } } } # [ doc = "Reader of field `ERQ5`" ] pub type ERQ5_R = crate :: R < bool , ERQ5_A > ; impl ERQ5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ5_A { match self . bits { false => ERQ5_A :: _0 , true => ERQ5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ5_A :: _1 } } # [ doc = "Write proxy for field `ERQ5`" ] pub struct ERQ5_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ5_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ5_A :: _1 ) } # [ 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 = "Enable DMA Request 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ6_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ6_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ6_A ) -> Self { match variant { ERQ6_A :: _0 => false , ERQ6_A :: _1 => true } } } # [ doc = "Reader of field `ERQ6`" ] pub type ERQ6_R = crate :: R < bool , ERQ6_A > ; impl ERQ6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ6_A { match self . bits { false => ERQ6_A :: _0 , true => ERQ6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ6_A :: _1 } } # [ doc = "Write proxy for field `ERQ6`" ] pub struct ERQ6_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ6_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ6_A :: _1 ) } # [ 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 = "Enable DMA Request 7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ7_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ7_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ7_A ) -> Self { match variant { ERQ7_A :: _0 => false , ERQ7_A :: _1 => true } } } # [ doc = "Reader of field `ERQ7`" ] pub type ERQ7_R = crate :: R < bool , ERQ7_A > ; impl ERQ7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ7_A { match self . bits { false => ERQ7_A :: _0 , true => ERQ7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ7_A :: _1 } } # [ doc = "Write proxy for field `ERQ7`" ] pub struct ERQ7_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ7_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ7_A :: _1 ) } # [ 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 = "Enable DMA Request 8\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ8_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ8_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ8_A ) -> Self { match variant { ERQ8_A :: _0 => false , ERQ8_A :: _1 => true } } } # [ doc = "Reader of field `ERQ8`" ] pub type ERQ8_R = crate :: R < bool , ERQ8_A > ; impl ERQ8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ8_A { match self . bits { false => ERQ8_A :: _0 , true => ERQ8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ8_A :: _1 } } # [ doc = "Write proxy for field `ERQ8`" ] pub struct ERQ8_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ8_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Enable DMA Request 9\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ9_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ9_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ9_A ) -> Self { match variant { ERQ9_A :: _0 => false , ERQ9_A :: _1 => true } } } # [ doc = "Reader of field `ERQ9`" ] pub type ERQ9_R = crate :: R < bool , ERQ9_A > ; impl ERQ9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ9_A { match self . bits { false => ERQ9_A :: _0 , true => ERQ9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ9_A :: _1 } } # [ doc = "Write proxy for field `ERQ9`" ] pub struct ERQ9_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ9_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Enable DMA Request 10\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ10_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ10_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ10_A ) -> Self { match variant { ERQ10_A :: _0 => false , ERQ10_A :: _1 => true } } } # [ doc = "Reader of field `ERQ10`" ] pub type ERQ10_R = crate :: R < bool , ERQ10_A > ; impl ERQ10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ10_A { match self . bits { false => ERQ10_A :: _0 , true => ERQ10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ10_A :: _1 } } # [ doc = "Write proxy for field `ERQ10`" ] pub struct ERQ10_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ10_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Enable DMA Request 11\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ11_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ11_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ11_A ) -> Self { match variant { ERQ11_A :: _0 => false , ERQ11_A :: _1 => true } } } # [ doc = "Reader of field `ERQ11`" ] pub type ERQ11_R = crate :: R < bool , ERQ11_A > ; impl ERQ11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ11_A { match self . bits { false => ERQ11_A :: _0 , true => ERQ11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ11_A :: _1 } } # [ doc = "Write proxy for field `ERQ11`" ] pub struct ERQ11_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ11_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Enable DMA Request 12\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ12_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ12_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ12_A ) -> Self { match variant { ERQ12_A :: _0 => false , ERQ12_A :: _1 => true } } } # [ doc = "Reader of field `ERQ12`" ] pub type ERQ12_R = crate :: R < bool , ERQ12_A > ; impl ERQ12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ12_A { match self . bits { false => ERQ12_A :: _0 , true => ERQ12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ12_A :: _1 } } # [ doc = "Write proxy for field `ERQ12`" ] pub struct ERQ12_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ12_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Enable DMA Request 13\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ13_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ13_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ13_A ) -> Self { match variant { ERQ13_A :: _0 => false , ERQ13_A :: _1 => true } } } # [ doc = "Reader of field `ERQ13`" ] pub type ERQ13_R = crate :: R < bool , ERQ13_A > ; impl ERQ13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ13_A { match self . bits { false => ERQ13_A :: _0 , true => ERQ13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ13_A :: _1 } } # [ doc = "Write proxy for field `ERQ13`" ] pub struct ERQ13_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ13_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ13_A :: _1 ) } # [ 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 = "Enable DMA Request 14\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ14_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ14_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ14_A ) -> Self { match variant { ERQ14_A :: _0 => false , ERQ14_A :: _1 => true } } } # [ doc = "Reader of field `ERQ14`" ] pub type ERQ14_R = crate :: R < bool , ERQ14_A > ; impl ERQ14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ14_A { match self . bits { false => ERQ14_A :: _0 , true => ERQ14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ14_A :: _1 } } # [ doc = "Write proxy for field `ERQ14`" ] pub struct ERQ14_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ14_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Enable DMA Request 15\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ15_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ15_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ15_A ) -> Self { match variant { ERQ15_A :: _0 => false , ERQ15_A :: _1 => true } } } # [ doc = "Reader of field `ERQ15`" ] pub type ERQ15_R = crate :: R < bool , ERQ15_A > ; impl ERQ15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ15_A { match self . bits { false => ERQ15_A :: _0 , true => ERQ15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ15_A :: _1 } } # [ doc = "Write proxy for field `ERQ15`" ] pub struct ERQ15_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ15_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Enable DMA Request 16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ16_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ16_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ16_A ) -> Self { match variant { ERQ16_A :: _0 => false , ERQ16_A :: _1 => true } } } # [ doc = "Reader of field `ERQ16`" ] pub type ERQ16_R = crate :: R < bool , ERQ16_A > ; impl ERQ16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ16_A { match self . bits { false => ERQ16_A :: _0 , true => ERQ16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ16_A :: _1 } } # [ doc = "Write proxy for field `ERQ16`" ] pub struct ERQ16_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ16_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Enable DMA Request 17\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ17_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ17_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ17_A ) -> Self { match variant { ERQ17_A :: _0 => false , ERQ17_A :: _1 => true } } } # [ doc = "Reader of field `ERQ17`" ] pub type ERQ17_R = crate :: R < bool , ERQ17_A > ; impl ERQ17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ17_A { match self . bits { false => ERQ17_A :: _0 , true => ERQ17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ17_A :: _1 } } # [ doc = "Write proxy for field `ERQ17`" ] pub struct ERQ17_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ17_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Enable DMA Request 18\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ18_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ18_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ18_A ) -> Self { match variant { ERQ18_A :: _0 => false , ERQ18_A :: _1 => true } } } # [ doc = "Reader of field `ERQ18`" ] pub type ERQ18_R = crate :: R < bool , ERQ18_A > ; impl ERQ18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ18_A { match self . bits { false => ERQ18_A :: _0 , true => ERQ18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ18_A :: _1 } } # [ doc = "Write proxy for field `ERQ18`" ] pub struct ERQ18_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ18_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Enable DMA Request 19\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ19_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ19_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ19_A ) -> Self { match variant { ERQ19_A :: _0 => false , ERQ19_A :: _1 => true } } } # [ doc = "Reader of field `ERQ19`" ] pub type ERQ19_R = crate :: R < bool , ERQ19_A > ; impl ERQ19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ19_A { match self . bits { false => ERQ19_A :: _0 , true => ERQ19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ19_A :: _1 } } # [ doc = "Write proxy for field `ERQ19`" ] pub struct ERQ19_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ19_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Enable DMA Request 20\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ20_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ20_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ20_A ) -> Self { match variant { ERQ20_A :: _0 => false , ERQ20_A :: _1 => true } } } # [ doc = "Reader of field `ERQ20`" ] pub type ERQ20_R = crate :: R < bool , ERQ20_A > ; impl ERQ20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ20_A { match self . bits { false => ERQ20_A :: _0 , true => ERQ20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ20_A :: _1 } } # [ doc = "Write proxy for field `ERQ20`" ] pub struct ERQ20_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ20_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ20_A :: _1 ) } # [ 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 = "Enable DMA Request 21\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ21_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ21_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ21_A ) -> Self { match variant { ERQ21_A :: _0 => false , ERQ21_A :: _1 => true } } } # [ doc = "Reader of field `ERQ21`" ] pub type ERQ21_R = crate :: R < bool , ERQ21_A > ; impl ERQ21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ21_A { match self . bits { false => ERQ21_A :: _0 , true => ERQ21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ21_A :: _1 } } # [ doc = "Write proxy for field `ERQ21`" ] pub struct ERQ21_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ21_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ21_A :: _1 ) } # [ 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 = "Enable DMA Request 22\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ22_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ22_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ22_A ) -> Self { match variant { ERQ22_A :: _0 => false , ERQ22_A :: _1 => true } } } # [ doc = "Reader of field `ERQ22`" ] pub type ERQ22_R = crate :: R < bool , ERQ22_A > ; impl ERQ22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ22_A { match self . bits { false => ERQ22_A :: _0 , true => ERQ22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ22_A :: _1 } } # [ doc = "Write proxy for field `ERQ22`" ] pub struct ERQ22_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ22_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Enable DMA Request 23\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ23_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ23_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ23_A ) -> Self { match variant { ERQ23_A :: _0 => false , ERQ23_A :: _1 => true } } } # [ doc = "Reader of field `ERQ23`" ] pub type ERQ23_R = crate :: R < bool , ERQ23_A > ; impl ERQ23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ23_A { match self . bits { false => ERQ23_A :: _0 , true => ERQ23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ23_A :: _1 } } # [ doc = "Write proxy for field `ERQ23`" ] pub struct ERQ23_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ23_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Enable DMA Request 24\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ24_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ24_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ24_A ) -> Self { match variant { ERQ24_A :: _0 => false , ERQ24_A :: _1 => true } } } # [ doc = "Reader of field `ERQ24`" ] pub type ERQ24_R = crate :: R < bool , ERQ24_A > ; impl ERQ24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ24_A { match self . bits { false => ERQ24_A :: _0 , true => ERQ24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ24_A :: _1 } } # [ doc = "Write proxy for field `ERQ24`" ] pub struct ERQ24_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ24_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ24_A :: _1 ) } # [ 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 = "Enable DMA Request 25\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ25_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ25_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ25_A ) -> Self { match variant { ERQ25_A :: _0 => false , ERQ25_A :: _1 => true } } } # [ doc = "Reader of field `ERQ25`" ] pub type ERQ25_R = crate :: R < bool , ERQ25_A > ; impl ERQ25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ25_A { match self . bits { false => ERQ25_A :: _0 , true => ERQ25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ25_A :: _1 } } # [ doc = "Write proxy for field `ERQ25`" ] pub struct ERQ25_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ25_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ25_A :: _1 ) } # [ 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 = "Enable DMA Request 26\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ26_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ26_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ26_A ) -> Self { match variant { ERQ26_A :: _0 => false , ERQ26_A :: _1 => true } } } # [ doc = "Reader of field `ERQ26`" ] pub type ERQ26_R = crate :: R < bool , ERQ26_A > ; impl ERQ26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ26_A { match self . bits { false => ERQ26_A :: _0 , true => ERQ26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ26_A :: _1 } } # [ doc = "Write proxy for field `ERQ26`" ] pub struct ERQ26_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ26_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ26_A :: _1 ) } # [ 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 = "Enable DMA Request 27\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ27_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ27_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ27_A ) -> Self { match variant { ERQ27_A :: _0 => false , ERQ27_A :: _1 => true } } } # [ doc = "Reader of field `ERQ27`" ] pub type ERQ27_R = crate :: R < bool , ERQ27_A > ; impl ERQ27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ27_A { match self . bits { false => ERQ27_A :: _0 , true => ERQ27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ27_A :: _1 } } # [ doc = "Write proxy for field `ERQ27`" ] pub struct ERQ27_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ27_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Enable DMA Request 28\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ28_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ28_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ28_A ) -> Self { match variant { ERQ28_A :: _0 => false , ERQ28_A :: _1 => true } } } # [ doc = "Reader of field `ERQ28`" ] pub type ERQ28_R = crate :: R < bool , ERQ28_A > ; impl ERQ28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ28_A { match self . bits { false => ERQ28_A :: _0 , true => ERQ28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ28_A :: _1 } } # [ doc = "Write proxy for field `ERQ28`" ] pub struct ERQ28_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ28_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Enable DMA Request 29\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ29_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ29_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ29_A ) -> Self { match variant { ERQ29_A :: _0 => false , ERQ29_A :: _1 => true } } } # [ doc = "Reader of field `ERQ29`" ] pub type ERQ29_R = crate :: R < bool , ERQ29_A > ; impl ERQ29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ29_A { match self . bits { false => ERQ29_A :: _0 , true => ERQ29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ29_A :: _1 } } # [ doc = "Write proxy for field `ERQ29`" ] pub struct ERQ29_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ29_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Enable DMA Request 30\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ30_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ30_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ30_A ) -> Self { match variant { ERQ30_A :: _0 => false , ERQ30_A :: _1 => true } } } # [ doc = "Reader of field `ERQ30`" ] pub type ERQ30_R = crate :: R < bool , ERQ30_A > ; impl ERQ30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ30_A { match self . bits { false => ERQ30_A :: _0 , true => ERQ30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ30_A :: _1 } } # [ doc = "Write proxy for field `ERQ30`" ] pub struct ERQ30_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ30_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Enable DMA Request 31\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERQ31_A { # [ doc = "0: The DMA request signal for the corresponding channel is disabled" ] _0 , # [ doc = "1: The DMA request signal for the corresponding channel is enabled" ] _1 } impl From < ERQ31_A > for bool { # [ inline ( always ) ] fn from ( variant : ERQ31_A ) -> Self { match variant { ERQ31_A :: _0 => false , ERQ31_A :: _1 => true } } } # [ doc = "Reader of field `ERQ31`" ] pub type ERQ31_R = crate :: R < bool , ERQ31_A > ; impl ERQ31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERQ31_A { match self . bits { false => ERQ31_A :: _0 , true => ERQ31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERQ31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERQ31_A :: _1 } } # [ doc = "Write proxy for field `ERQ31`" ] pub struct ERQ31_W < 'a > { w : & 'a mut W , } impl < 'a > ERQ31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERQ31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DMA request signal for the corresponding channel is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERQ31_A :: _0 ) } # [ doc = "The DMA request signal for the corresponding channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERQ31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Enable DMA Request 0" ] # [ inline ( always ) ] pub fn erq0 ( & self ) -> ERQ0_R { ERQ0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Enable DMA Request 1" ] # [ inline ( always ) ] pub fn erq1 ( & self ) -> ERQ1_R { ERQ1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Enable DMA Request 2" ] # [ inline ( always ) ] pub fn erq2 ( & self ) -> ERQ2_R { ERQ2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Enable DMA Request 3" ] # [ inline ( always ) ] pub fn erq3 ( & self ) -> ERQ3_R { ERQ3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enable DMA Request 4" ] # [ inline ( always ) ] pub fn erq4 ( & self ) -> ERQ4_R { ERQ4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enable DMA Request 5" ] # [ inline ( always ) ] pub fn erq5 ( & self ) -> ERQ5_R { ERQ5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Enable DMA Request 6" ] # [ inline ( always ) ] pub fn erq6 ( & self ) -> ERQ6_R { ERQ6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Enable DMA Request 7" ] # [ inline ( always ) ] pub fn erq7 ( & self ) -> ERQ7_R { ERQ7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Enable DMA Request 8" ] # [ inline ( always ) ] pub fn erq8 ( & self ) -> ERQ8_R { ERQ8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Enable DMA Request 9" ] # [ inline ( always ) ] pub fn erq9 ( & self ) -> ERQ9_R { ERQ9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Enable DMA Request 10" ] # [ inline ( always ) ] pub fn erq10 ( & self ) -> ERQ10_R { ERQ10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Enable DMA Request 11" ] # [ inline ( always ) ] pub fn erq11 ( & self ) -> ERQ11_R { ERQ11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Enable DMA Request 12" ] # [ inline ( always ) ] pub fn erq12 ( & self ) -> ERQ12_R { ERQ12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Enable DMA Request 13" ] # [ inline ( always ) ] pub fn erq13 ( & self ) -> ERQ13_R { ERQ13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Enable DMA Request 14" ] # [ inline ( always ) ] pub fn erq14 ( & self ) -> ERQ14_R { ERQ14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Enable DMA Request 15" ] # [ inline ( always ) ] pub fn erq15 ( & self ) -> ERQ15_R { ERQ15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Enable DMA Request 16" ] # [ inline ( always ) ] pub fn erq16 ( & self ) -> ERQ16_R { ERQ16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Enable DMA Request 17" ] # [ inline ( always ) ] pub fn erq17 ( & self ) -> ERQ17_R { ERQ17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Enable DMA Request 18" ] # [ inline ( always ) ] pub fn erq18 ( & self ) -> ERQ18_R { ERQ18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Enable DMA Request 19" ] # [ inline ( always ) ] pub fn erq19 ( & self ) -> ERQ19_R { ERQ19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enable DMA Request 20" ] # [ inline ( always ) ] pub fn erq20 ( & self ) -> ERQ20_R { ERQ20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Enable DMA Request 21" ] # [ inline ( always ) ] pub fn erq21 ( & self ) -> ERQ21_R { ERQ21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Enable DMA Request 22" ] # [ inline ( always ) ] pub fn erq22 ( & self ) -> ERQ22_R { ERQ22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Enable DMA Request 23" ] # [ inline ( always ) ] pub fn erq23 ( & self ) -> ERQ23_R { ERQ23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Enable DMA Request 24" ] # [ inline ( always ) ] pub fn erq24 ( & self ) -> ERQ24_R { ERQ24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Enable DMA Request 25" ] # [ inline ( always ) ] pub fn erq25 ( & self ) -> ERQ25_R { ERQ25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Enable DMA Request 26" ] # [ inline ( always ) ] pub fn erq26 ( & self ) -> ERQ26_R { ERQ26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Enable DMA Request 27" ] # [ inline ( always ) ] pub fn erq27 ( & self ) -> ERQ27_R { ERQ27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Enable DMA Request 28" ] # [ inline ( always ) ] pub fn erq28 ( & self ) -> ERQ28_R { ERQ28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Enable DMA Request 29" ] # [ inline ( always ) ] pub fn erq29 ( & self ) -> ERQ29_R { ERQ29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Enable DMA Request 30" ] # [ inline ( always ) ] pub fn erq30 ( & self ) -> ERQ30_R { ERQ30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Enable DMA Request 31" ] # [ inline ( always ) ] pub fn erq31 ( & self ) -> ERQ31_R { ERQ31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Enable DMA Request 0" ] # [ inline ( always ) ] pub fn erq0 ( & mut self ) -> ERQ0_W { ERQ0_W { w : self } } # [ doc = "Bit 1 - Enable DMA Request 1" ] # [ inline ( always ) ] pub fn erq1 ( & mut self ) -> ERQ1_W { ERQ1_W { w : self } } # [ doc = "Bit 2 - Enable DMA Request 2" ] # [ inline ( always ) ] pub fn erq2 ( & mut self ) -> ERQ2_W { ERQ2_W { w : self } } # [ doc = "Bit 3 - Enable DMA Request 3" ] # [ inline ( always ) ] pub fn erq3 ( & mut self ) -> ERQ3_W { ERQ3_W { w : self } } # [ doc = "Bit 4 - Enable DMA Request 4" ] # [ inline ( always ) ] pub fn erq4 ( & mut self ) -> ERQ4_W { ERQ4_W { w : self } } # [ doc = "Bit 5 - Enable DMA Request 5" ] # [ inline ( always ) ] pub fn erq5 ( & mut self ) -> ERQ5_W { ERQ5_W { w : self } } # [ doc = "Bit 6 - Enable DMA Request 6" ] # [ inline ( always ) ] pub fn erq6 ( & mut self ) -> ERQ6_W { ERQ6_W { w : self } } # [ doc = "Bit 7 - Enable DMA Request 7" ] # [ inline ( always ) ] pub fn erq7 ( & mut self ) -> ERQ7_W { ERQ7_W { w : self } } # [ doc = "Bit 8 - Enable DMA Request 8" ] # [ inline ( always ) ] pub fn erq8 ( & mut self ) -> ERQ8_W { ERQ8_W { w : self } } # [ doc = "Bit 9 - Enable DMA Request 9" ] # [ inline ( always ) ] pub fn erq9 ( & mut self ) -> ERQ9_W { ERQ9_W { w : self } } # [ doc = "Bit 10 - Enable DMA Request 10" ] # [ inline ( always ) ] pub fn erq10 ( & mut self ) -> ERQ10_W { ERQ10_W { w : self } } # [ doc = "Bit 11 - Enable DMA Request 11" ] # [ inline ( always ) ] pub fn erq11 ( & mut self ) -> ERQ11_W { ERQ11_W { w : self } } # [ doc = "Bit 12 - Enable DMA Request 12" ] # [ inline ( always ) ] pub fn erq12 ( & mut self ) -> ERQ12_W { ERQ12_W { w : self } } # [ doc = "Bit 13 - Enable DMA Request 13" ] # [ inline ( always ) ] pub fn erq13 ( & mut self ) -> ERQ13_W { ERQ13_W { w : self } } # [ doc = "Bit 14 - Enable DMA Request 14" ] # [ inline ( always ) ] pub fn erq14 ( & mut self ) -> ERQ14_W { ERQ14_W { w : self } } # [ doc = "Bit 15 - Enable DMA Request 15" ] # [ inline ( always ) ] pub fn erq15 ( & mut self ) -> ERQ15_W { ERQ15_W { w : self } } # [ doc = "Bit 16 - Enable DMA Request 16" ] # [ inline ( always ) ] pub fn erq16 ( & mut self ) -> ERQ16_W { ERQ16_W { w : self } } # [ doc = "Bit 17 - Enable DMA Request 17" ] # [ inline ( always ) ] pub fn erq17 ( & mut self ) -> ERQ17_W { ERQ17_W { w : self } } # [ doc = "Bit 18 - Enable DMA Request 18" ] # [ inline ( always ) ] pub fn erq18 ( & mut self ) -> ERQ18_W { ERQ18_W { w : self } } # [ doc = "Bit 19 - Enable DMA Request 19" ] # [ inline ( always ) ] pub fn erq19 ( & mut self ) -> ERQ19_W { ERQ19_W { w : self } } # [ doc = "Bit 20 - Enable DMA Request 20" ] # [ inline ( always ) ] pub fn erq20 ( & mut self ) -> ERQ20_W { ERQ20_W { w : self } } # [ doc = "Bit 21 - Enable DMA Request 21" ] # [ inline ( always ) ] pub fn erq21 ( & mut self ) -> ERQ21_W { ERQ21_W { w : self } } # [ doc = "Bit 22 - Enable DMA Request 22" ] # [ inline ( always ) ] pub fn erq22 ( & mut self ) -> ERQ22_W { ERQ22_W { w : self } } # [ doc = "Bit 23 - Enable DMA Request 23" ] # [ inline ( always ) ] pub fn erq23 ( & mut self ) -> ERQ23_W { ERQ23_W { w : self } } # [ doc = "Bit 24 - Enable DMA Request 24" ] # [ inline ( always ) ] pub fn erq24 ( & mut self ) -> ERQ24_W { ERQ24_W { w : self } } # [ doc = "Bit 25 - Enable DMA Request 25" ] # [ inline ( always ) ] pub fn erq25 ( & mut self ) -> ERQ25_W { ERQ25_W { w : self } } # [ doc = "Bit 26 - Enable DMA Request 26" ] # [ inline ( always ) ] pub fn erq26 ( & mut self ) -> ERQ26_W { ERQ26_W { w : self } } # [ doc = "Bit 27 - Enable DMA Request 27" ] # [ inline ( always ) ] pub fn erq27 ( & mut self ) -> ERQ27_W { ERQ27_W { w : self } } # [ doc = "Bit 28 - Enable DMA Request 28" ] # [ inline ( always ) ] pub fn erq28 ( & mut self ) -> ERQ28_W { ERQ28_W { w : self } } # [ doc = "Bit 29 - Enable DMA Request 29" ] # [ inline ( always ) ] pub fn erq29 ( & mut self ) -> ERQ29_W { ERQ29_W { w : self } } # [ doc = "Bit 30 - Enable DMA Request 30" ] # [ inline ( always ) ] pub fn erq30 ( & mut self ) -> ERQ30_W { ERQ30_W { w : self } } # [ doc = "Bit 31 - Enable DMA Request 31" ] # [ inline ( always ) ] pub fn erq31 ( & mut self ) -> ERQ31_W { ERQ31_W { w : self } } } } # [ doc = "Enable Error Interrupt Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [eei](eei) module" ] pub type EEI = crate :: Reg < u32 , _EEI > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EEI ; # [ doc = "`read()` method returns [eei::R](eei::R) reader structure" ] impl crate :: Readable for EEI { } # [ doc = "`write(|w| ..)` method takes [eei::W](eei::W) writer structure" ] impl crate :: Writable for EEI { } # [ doc = "Enable Error Interrupt Register" ] pub mod eei { # [ doc = "Reader of register EEI" ] pub type R = crate :: R < u32 , super :: EEI > ; # [ doc = "Writer for register EEI" ] pub type W = crate :: W < u32 , super :: EEI > ; # [ doc = "Register EEI `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EEI { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Enable Error Interrupt 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI0_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI0_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI0_A ) -> Self { match variant { EEI0_A :: _0 => false , EEI0_A :: _1 => true } } } # [ doc = "Reader of field `EEI0`" ] pub type EEI0_R = crate :: R < bool , EEI0_A > ; impl EEI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI0_A { match self . bits { false => EEI0_A :: _0 , true => EEI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI0_A :: _1 } } # [ doc = "Write proxy for field `EEI0`" ] pub struct EEI0_W < 'a > { w : & 'a mut W , } impl < 'a > EEI0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI0_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Enable Error Interrupt 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI1_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI1_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI1_A ) -> Self { match variant { EEI1_A :: _0 => false , EEI1_A :: _1 => true } } } # [ doc = "Reader of field `EEI1`" ] pub type EEI1_R = crate :: R < bool , EEI1_A > ; impl EEI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI1_A { match self . bits { false => EEI1_A :: _0 , true => EEI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI1_A :: _1 } } # [ doc = "Write proxy for field `EEI1`" ] pub struct EEI1_W < 'a > { w : & 'a mut W , } impl < 'a > EEI1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI1_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI1_A :: _1 ) } # [ 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 } } # [ doc = "Enable Error Interrupt 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI2_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI2_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI2_A ) -> Self { match variant { EEI2_A :: _0 => false , EEI2_A :: _1 => true } } } # [ doc = "Reader of field `EEI2`" ] pub type EEI2_R = crate :: R < bool , EEI2_A > ; impl EEI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI2_A { match self . bits { false => EEI2_A :: _0 , true => EEI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI2_A :: _1 } } # [ doc = "Write proxy for field `EEI2`" ] pub struct EEI2_W < 'a > { w : & 'a mut W , } impl < 'a > EEI2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI2_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI2_A :: _1 ) } # [ 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 = "Enable Error Interrupt 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI3_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI3_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI3_A ) -> Self { match variant { EEI3_A :: _0 => false , EEI3_A :: _1 => true } } } # [ doc = "Reader of field `EEI3`" ] pub type EEI3_R = crate :: R < bool , EEI3_A > ; impl EEI3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI3_A { match self . bits { false => EEI3_A :: _0 , true => EEI3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI3_A :: _1 } } # [ doc = "Write proxy for field `EEI3`" ] pub struct EEI3_W < 'a > { w : & 'a mut W , } impl < 'a > EEI3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI3_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enable Error Interrupt 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI4_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI4_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI4_A ) -> Self { match variant { EEI4_A :: _0 => false , EEI4_A :: _1 => true } } } # [ doc = "Reader of field `EEI4`" ] pub type EEI4_R = crate :: R < bool , EEI4_A > ; impl EEI4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI4_A { match self . bits { false => EEI4_A :: _0 , true => EEI4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI4_A :: _1 } } # [ doc = "Write proxy for field `EEI4`" ] pub struct EEI4_W < 'a > { w : & 'a mut W , } impl < 'a > EEI4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI4_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Enable Error Interrupt 5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI5_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI5_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI5_A ) -> Self { match variant { EEI5_A :: _0 => false , EEI5_A :: _1 => true } } } # [ doc = "Reader of field `EEI5`" ] pub type EEI5_R = crate :: R < bool , EEI5_A > ; impl EEI5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI5_A { match self . bits { false => EEI5_A :: _0 , true => EEI5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI5_A :: _1 } } # [ doc = "Write proxy for field `EEI5`" ] pub struct EEI5_W < 'a > { w : & 'a mut W , } impl < 'a > EEI5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI5_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI5_A :: _1 ) } # [ 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 = "Enable Error Interrupt 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI6_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI6_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI6_A ) -> Self { match variant { EEI6_A :: _0 => false , EEI6_A :: _1 => true } } } # [ doc = "Reader of field `EEI6`" ] pub type EEI6_R = crate :: R < bool , EEI6_A > ; impl EEI6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI6_A { match self . bits { false => EEI6_A :: _0 , true => EEI6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI6_A :: _1 } } # [ doc = "Write proxy for field `EEI6`" ] pub struct EEI6_W < 'a > { w : & 'a mut W , } impl < 'a > EEI6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI6_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI6_A :: _1 ) } # [ 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 = "Enable Error Interrupt 7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI7_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI7_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI7_A ) -> Self { match variant { EEI7_A :: _0 => false , EEI7_A :: _1 => true } } } # [ doc = "Reader of field `EEI7`" ] pub type EEI7_R = crate :: R < bool , EEI7_A > ; impl EEI7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI7_A { match self . bits { false => EEI7_A :: _0 , true => EEI7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI7_A :: _1 } } # [ doc = "Write proxy for field `EEI7`" ] pub struct EEI7_W < 'a > { w : & 'a mut W , } impl < 'a > EEI7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI7_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI7_A :: _1 ) } # [ 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 = "Enable Error Interrupt 8\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI8_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI8_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI8_A ) -> Self { match variant { EEI8_A :: _0 => false , EEI8_A :: _1 => true } } } # [ doc = "Reader of field `EEI8`" ] pub type EEI8_R = crate :: R < bool , EEI8_A > ; impl EEI8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI8_A { match self . bits { false => EEI8_A :: _0 , true => EEI8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI8_A :: _1 } } # [ doc = "Write proxy for field `EEI8`" ] pub struct EEI8_W < 'a > { w : & 'a mut W , } impl < 'a > EEI8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI8_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Enable Error Interrupt 9\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI9_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI9_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI9_A ) -> Self { match variant { EEI9_A :: _0 => false , EEI9_A :: _1 => true } } } # [ doc = "Reader of field `EEI9`" ] pub type EEI9_R = crate :: R < bool , EEI9_A > ; impl EEI9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI9_A { match self . bits { false => EEI9_A :: _0 , true => EEI9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI9_A :: _1 } } # [ doc = "Write proxy for field `EEI9`" ] pub struct EEI9_W < 'a > { w : & 'a mut W , } impl < 'a > EEI9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI9_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Enable Error Interrupt 10\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI10_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI10_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI10_A ) -> Self { match variant { EEI10_A :: _0 => false , EEI10_A :: _1 => true } } } # [ doc = "Reader of field `EEI10`" ] pub type EEI10_R = crate :: R < bool , EEI10_A > ; impl EEI10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI10_A { match self . bits { false => EEI10_A :: _0 , true => EEI10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI10_A :: _1 } } # [ doc = "Write proxy for field `EEI10`" ] pub struct EEI10_W < 'a > { w : & 'a mut W , } impl < 'a > EEI10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI10_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Enable Error Interrupt 11\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI11_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI11_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI11_A ) -> Self { match variant { EEI11_A :: _0 => false , EEI11_A :: _1 => true } } } # [ doc = "Reader of field `EEI11`" ] pub type EEI11_R = crate :: R < bool , EEI11_A > ; impl EEI11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI11_A { match self . bits { false => EEI11_A :: _0 , true => EEI11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI11_A :: _1 } } # [ doc = "Write proxy for field `EEI11`" ] pub struct EEI11_W < 'a > { w : & 'a mut W , } impl < 'a > EEI11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI11_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Enable Error Interrupt 12\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI12_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI12_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI12_A ) -> Self { match variant { EEI12_A :: _0 => false , EEI12_A :: _1 => true } } } # [ doc = "Reader of field `EEI12`" ] pub type EEI12_R = crate :: R < bool , EEI12_A > ; impl EEI12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI12_A { match self . bits { false => EEI12_A :: _0 , true => EEI12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI12_A :: _1 } } # [ doc = "Write proxy for field `EEI12`" ] pub struct EEI12_W < 'a > { w : & 'a mut W , } impl < 'a > EEI12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI12_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Enable Error Interrupt 13\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI13_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI13_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI13_A ) -> Self { match variant { EEI13_A :: _0 => false , EEI13_A :: _1 => true } } } # [ doc = "Reader of field `EEI13`" ] pub type EEI13_R = crate :: R < bool , EEI13_A > ; impl EEI13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI13_A { match self . bits { false => EEI13_A :: _0 , true => EEI13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI13_A :: _1 } } # [ doc = "Write proxy for field `EEI13`" ] pub struct EEI13_W < 'a > { w : & 'a mut W , } impl < 'a > EEI13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI13_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI13_A :: _1 ) } # [ 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 = "Enable Error Interrupt 14\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI14_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI14_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI14_A ) -> Self { match variant { EEI14_A :: _0 => false , EEI14_A :: _1 => true } } } # [ doc = "Reader of field `EEI14`" ] pub type EEI14_R = crate :: R < bool , EEI14_A > ; impl EEI14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI14_A { match self . bits { false => EEI14_A :: _0 , true => EEI14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI14_A :: _1 } } # [ doc = "Write proxy for field `EEI14`" ] pub struct EEI14_W < 'a > { w : & 'a mut W , } impl < 'a > EEI14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI14_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Enable Error Interrupt 15\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI15_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI15_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI15_A ) -> Self { match variant { EEI15_A :: _0 => false , EEI15_A :: _1 => true } } } # [ doc = "Reader of field `EEI15`" ] pub type EEI15_R = crate :: R < bool , EEI15_A > ; impl EEI15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI15_A { match self . bits { false => EEI15_A :: _0 , true => EEI15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI15_A :: _1 } } # [ doc = "Write proxy for field `EEI15`" ] pub struct EEI15_W < 'a > { w : & 'a mut W , } impl < 'a > EEI15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI15_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Enable Error Interrupt 16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI16_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI16_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI16_A ) -> Self { match variant { EEI16_A :: _0 => false , EEI16_A :: _1 => true } } } # [ doc = "Reader of field `EEI16`" ] pub type EEI16_R = crate :: R < bool , EEI16_A > ; impl EEI16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI16_A { match self . bits { false => EEI16_A :: _0 , true => EEI16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI16_A :: _1 } } # [ doc = "Write proxy for field `EEI16`" ] pub struct EEI16_W < 'a > { w : & 'a mut W , } impl < 'a > EEI16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI16_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Enable Error Interrupt 17\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI17_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI17_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI17_A ) -> Self { match variant { EEI17_A :: _0 => false , EEI17_A :: _1 => true } } } # [ doc = "Reader of field `EEI17`" ] pub type EEI17_R = crate :: R < bool , EEI17_A > ; impl EEI17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI17_A { match self . bits { false => EEI17_A :: _0 , true => EEI17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI17_A :: _1 } } # [ doc = "Write proxy for field `EEI17`" ] pub struct EEI17_W < 'a > { w : & 'a mut W , } impl < 'a > EEI17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI17_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Enable Error Interrupt 18\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI18_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI18_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI18_A ) -> Self { match variant { EEI18_A :: _0 => false , EEI18_A :: _1 => true } } } # [ doc = "Reader of field `EEI18`" ] pub type EEI18_R = crate :: R < bool , EEI18_A > ; impl EEI18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI18_A { match self . bits { false => EEI18_A :: _0 , true => EEI18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI18_A :: _1 } } # [ doc = "Write proxy for field `EEI18`" ] pub struct EEI18_W < 'a > { w : & 'a mut W , } impl < 'a > EEI18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI18_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Enable Error Interrupt 19\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI19_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI19_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI19_A ) -> Self { match variant { EEI19_A :: _0 => false , EEI19_A :: _1 => true } } } # [ doc = "Reader of field `EEI19`" ] pub type EEI19_R = crate :: R < bool , EEI19_A > ; impl EEI19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI19_A { match self . bits { false => EEI19_A :: _0 , true => EEI19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI19_A :: _1 } } # [ doc = "Write proxy for field `EEI19`" ] pub struct EEI19_W < 'a > { w : & 'a mut W , } impl < 'a > EEI19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI19_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Enable Error Interrupt 20\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI20_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI20_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI20_A ) -> Self { match variant { EEI20_A :: _0 => false , EEI20_A :: _1 => true } } } # [ doc = "Reader of field `EEI20`" ] pub type EEI20_R = crate :: R < bool , EEI20_A > ; impl EEI20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI20_A { match self . bits { false => EEI20_A :: _0 , true => EEI20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI20_A :: _1 } } # [ doc = "Write proxy for field `EEI20`" ] pub struct EEI20_W < 'a > { w : & 'a mut W , } impl < 'a > EEI20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI20_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI20_A :: _1 ) } # [ 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 = "Enable Error Interrupt 21\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI21_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI21_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI21_A ) -> Self { match variant { EEI21_A :: _0 => false , EEI21_A :: _1 => true } } } # [ doc = "Reader of field `EEI21`" ] pub type EEI21_R = crate :: R < bool , EEI21_A > ; impl EEI21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI21_A { match self . bits { false => EEI21_A :: _0 , true => EEI21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI21_A :: _1 } } # [ doc = "Write proxy for field `EEI21`" ] pub struct EEI21_W < 'a > { w : & 'a mut W , } impl < 'a > EEI21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI21_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI21_A :: _1 ) } # [ 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 = "Enable Error Interrupt 22\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI22_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI22_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI22_A ) -> Self { match variant { EEI22_A :: _0 => false , EEI22_A :: _1 => true } } } # [ doc = "Reader of field `EEI22`" ] pub type EEI22_R = crate :: R < bool , EEI22_A > ; impl EEI22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI22_A { match self . bits { false => EEI22_A :: _0 , true => EEI22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI22_A :: _1 } } # [ doc = "Write proxy for field `EEI22`" ] pub struct EEI22_W < 'a > { w : & 'a mut W , } impl < 'a > EEI22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI22_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Enable Error Interrupt 23\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI23_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI23_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI23_A ) -> Self { match variant { EEI23_A :: _0 => false , EEI23_A :: _1 => true } } } # [ doc = "Reader of field `EEI23`" ] pub type EEI23_R = crate :: R < bool , EEI23_A > ; impl EEI23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI23_A { match self . bits { false => EEI23_A :: _0 , true => EEI23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI23_A :: _1 } } # [ doc = "Write proxy for field `EEI23`" ] pub struct EEI23_W < 'a > { w : & 'a mut W , } impl < 'a > EEI23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI23_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Enable Error Interrupt 24\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI24_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI24_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI24_A ) -> Self { match variant { EEI24_A :: _0 => false , EEI24_A :: _1 => true } } } # [ doc = "Reader of field `EEI24`" ] pub type EEI24_R = crate :: R < bool , EEI24_A > ; impl EEI24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI24_A { match self . bits { false => EEI24_A :: _0 , true => EEI24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI24_A :: _1 } } # [ doc = "Write proxy for field `EEI24`" ] pub struct EEI24_W < 'a > { w : & 'a mut W , } impl < 'a > EEI24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI24_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI24_A :: _1 ) } # [ 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 = "Enable Error Interrupt 25\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI25_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI25_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI25_A ) -> Self { match variant { EEI25_A :: _0 => false , EEI25_A :: _1 => true } } } # [ doc = "Reader of field `EEI25`" ] pub type EEI25_R = crate :: R < bool , EEI25_A > ; impl EEI25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI25_A { match self . bits { false => EEI25_A :: _0 , true => EEI25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI25_A :: _1 } } # [ doc = "Write proxy for field `EEI25`" ] pub struct EEI25_W < 'a > { w : & 'a mut W , } impl < 'a > EEI25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI25_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI25_A :: _1 ) } # [ 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 = "Enable Error Interrupt 26\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI26_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI26_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI26_A ) -> Self { match variant { EEI26_A :: _0 => false , EEI26_A :: _1 => true } } } # [ doc = "Reader of field `EEI26`" ] pub type EEI26_R = crate :: R < bool , EEI26_A > ; impl EEI26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI26_A { match self . bits { false => EEI26_A :: _0 , true => EEI26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI26_A :: _1 } } # [ doc = "Write proxy for field `EEI26`" ] pub struct EEI26_W < 'a > { w : & 'a mut W , } impl < 'a > EEI26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI26_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI26_A :: _1 ) } # [ 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 = "Enable Error Interrupt 27\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI27_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI27_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI27_A ) -> Self { match variant { EEI27_A :: _0 => false , EEI27_A :: _1 => true } } } # [ doc = "Reader of field `EEI27`" ] pub type EEI27_R = crate :: R < bool , EEI27_A > ; impl EEI27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI27_A { match self . bits { false => EEI27_A :: _0 , true => EEI27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI27_A :: _1 } } # [ doc = "Write proxy for field `EEI27`" ] pub struct EEI27_W < 'a > { w : & 'a mut W , } impl < 'a > EEI27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI27_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Enable Error Interrupt 28\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI28_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI28_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI28_A ) -> Self { match variant { EEI28_A :: _0 => false , EEI28_A :: _1 => true } } } # [ doc = "Reader of field `EEI28`" ] pub type EEI28_R = crate :: R < bool , EEI28_A > ; impl EEI28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI28_A { match self . bits { false => EEI28_A :: _0 , true => EEI28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI28_A :: _1 } } # [ doc = "Write proxy for field `EEI28`" ] pub struct EEI28_W < 'a > { w : & 'a mut W , } impl < 'a > EEI28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI28_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Enable Error Interrupt 29\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI29_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI29_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI29_A ) -> Self { match variant { EEI29_A :: _0 => false , EEI29_A :: _1 => true } } } # [ doc = "Reader of field `EEI29`" ] pub type EEI29_R = crate :: R < bool , EEI29_A > ; impl EEI29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI29_A { match self . bits { false => EEI29_A :: _0 , true => EEI29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI29_A :: _1 } } # [ doc = "Write proxy for field `EEI29`" ] pub struct EEI29_W < 'a > { w : & 'a mut W , } impl < 'a > EEI29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI29_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Enable Error Interrupt 30\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI30_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI30_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI30_A ) -> Self { match variant { EEI30_A :: _0 => false , EEI30_A :: _1 => true } } } # [ doc = "Reader of field `EEI30`" ] pub type EEI30_R = crate :: R < bool , EEI30_A > ; impl EEI30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI30_A { match self . bits { false => EEI30_A :: _0 , true => EEI30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI30_A :: _1 } } # [ doc = "Write proxy for field `EEI30`" ] pub struct EEI30_W < 'a > { w : & 'a mut W , } impl < 'a > EEI30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI30_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Enable Error Interrupt 31\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEI31_A { # [ doc = "0: The error signal for corresponding channel does not generate an error interrupt" ] _0 , # [ doc = "1: The assertion of the error signal for corresponding channel generates an error interrupt request" ] _1 } impl From < EEI31_A > for bool { # [ inline ( always ) ] fn from ( variant : EEI31_A ) -> Self { match variant { EEI31_A :: _0 => false , EEI31_A :: _1 => true } } } # [ doc = "Reader of field `EEI31`" ] pub type EEI31_R = crate :: R < bool , EEI31_A > ; impl EEI31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEI31_A { match self . bits { false => EEI31_A :: _0 , true => EEI31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEI31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEI31_A :: _1 } } # [ doc = "Write proxy for field `EEI31`" ] pub struct EEI31_W < 'a > { w : & 'a mut W , } impl < 'a > EEI31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EEI31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The error signal for corresponding channel does not generate an error interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EEI31_A :: _0 ) } # [ doc = "The assertion of the error signal for corresponding channel generates an error interrupt request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EEI31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Enable Error Interrupt 0" ] # [ inline ( always ) ] pub fn eei0 ( & self ) -> EEI0_R { EEI0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Enable Error Interrupt 1" ] # [ inline ( always ) ] pub fn eei1 ( & self ) -> EEI1_R { EEI1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Enable Error Interrupt 2" ] # [ inline ( always ) ] pub fn eei2 ( & self ) -> EEI2_R { EEI2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Enable Error Interrupt 3" ] # [ inline ( always ) ] pub fn eei3 ( & self ) -> EEI3_R { EEI3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enable Error Interrupt 4" ] # [ inline ( always ) ] pub fn eei4 ( & self ) -> EEI4_R { EEI4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enable Error Interrupt 5" ] # [ inline ( always ) ] pub fn eei5 ( & self ) -> EEI5_R { EEI5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Enable Error Interrupt 6" ] # [ inline ( always ) ] pub fn eei6 ( & self ) -> EEI6_R { EEI6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Enable Error Interrupt 7" ] # [ inline ( always ) ] pub fn eei7 ( & self ) -> EEI7_R { EEI7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Enable Error Interrupt 8" ] # [ inline ( always ) ] pub fn eei8 ( & self ) -> EEI8_R { EEI8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Enable Error Interrupt 9" ] # [ inline ( always ) ] pub fn eei9 ( & self ) -> EEI9_R { EEI9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Enable Error Interrupt 10" ] # [ inline ( always ) ] pub fn eei10 ( & self ) -> EEI10_R { EEI10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Enable Error Interrupt 11" ] # [ inline ( always ) ] pub fn eei11 ( & self ) -> EEI11_R { EEI11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Enable Error Interrupt 12" ] # [ inline ( always ) ] pub fn eei12 ( & self ) -> EEI12_R { EEI12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Enable Error Interrupt 13" ] # [ inline ( always ) ] pub fn eei13 ( & self ) -> EEI13_R { EEI13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Enable Error Interrupt 14" ] # [ inline ( always ) ] pub fn eei14 ( & self ) -> EEI14_R { EEI14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Enable Error Interrupt 15" ] # [ inline ( always ) ] pub fn eei15 ( & self ) -> EEI15_R { EEI15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Enable Error Interrupt 16" ] # [ inline ( always ) ] pub fn eei16 ( & self ) -> EEI16_R { EEI16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Enable Error Interrupt 17" ] # [ inline ( always ) ] pub fn eei17 ( & self ) -> EEI17_R { EEI17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Enable Error Interrupt 18" ] # [ inline ( always ) ] pub fn eei18 ( & self ) -> EEI18_R { EEI18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Enable Error Interrupt 19" ] # [ inline ( always ) ] pub fn eei19 ( & self ) -> EEI19_R { EEI19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enable Error Interrupt 20" ] # [ inline ( always ) ] pub fn eei20 ( & self ) -> EEI20_R { EEI20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Enable Error Interrupt 21" ] # [ inline ( always ) ] pub fn eei21 ( & self ) -> EEI21_R { EEI21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Enable Error Interrupt 22" ] # [ inline ( always ) ] pub fn eei22 ( & self ) -> EEI22_R { EEI22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Enable Error Interrupt 23" ] # [ inline ( always ) ] pub fn eei23 ( & self ) -> EEI23_R { EEI23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Enable Error Interrupt 24" ] # [ inline ( always ) ] pub fn eei24 ( & self ) -> EEI24_R { EEI24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Enable Error Interrupt 25" ] # [ inline ( always ) ] pub fn eei25 ( & self ) -> EEI25_R { EEI25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Enable Error Interrupt 26" ] # [ inline ( always ) ] pub fn eei26 ( & self ) -> EEI26_R { EEI26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Enable Error Interrupt 27" ] # [ inline ( always ) ] pub fn eei27 ( & self ) -> EEI27_R { EEI27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Enable Error Interrupt 28" ] # [ inline ( always ) ] pub fn eei28 ( & self ) -> EEI28_R { EEI28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Enable Error Interrupt 29" ] # [ inline ( always ) ] pub fn eei29 ( & self ) -> EEI29_R { EEI29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Enable Error Interrupt 30" ] # [ inline ( always ) ] pub fn eei30 ( & self ) -> EEI30_R { EEI30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Enable Error Interrupt 31" ] # [ inline ( always ) ] pub fn eei31 ( & self ) -> EEI31_R { EEI31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Enable Error Interrupt 0" ] # [ inline ( always ) ] pub fn eei0 ( & mut self ) -> EEI0_W { EEI0_W { w : self } } # [ doc = "Bit 1 - Enable Error Interrupt 1" ] # [ inline ( always ) ] pub fn eei1 ( & mut self ) -> EEI1_W { EEI1_W { w : self } } # [ doc = "Bit 2 - Enable Error Interrupt 2" ] # [ inline ( always ) ] pub fn eei2 ( & mut self ) -> EEI2_W { EEI2_W { w : self } } # [ doc = "Bit 3 - Enable Error Interrupt 3" ] # [ inline ( always ) ] pub fn eei3 ( & mut self ) -> EEI3_W { EEI3_W { w : self } } # [ doc = "Bit 4 - Enable Error Interrupt 4" ] # [ inline ( always ) ] pub fn eei4 ( & mut self ) -> EEI4_W { EEI4_W { w : self } } # [ doc = "Bit 5 - Enable Error Interrupt 5" ] # [ inline ( always ) ] pub fn eei5 ( & mut self ) -> EEI5_W { EEI5_W { w : self } } # [ doc = "Bit 6 - Enable Error Interrupt 6" ] # [ inline ( always ) ] pub fn eei6 ( & mut self ) -> EEI6_W { EEI6_W { w : self } } # [ doc = "Bit 7 - Enable Error Interrupt 7" ] # [ inline ( always ) ] pub fn eei7 ( & mut self ) -> EEI7_W { EEI7_W { w : self } } # [ doc = "Bit 8 - Enable Error Interrupt 8" ] # [ inline ( always ) ] pub fn eei8 ( & mut self ) -> EEI8_W { EEI8_W { w : self } } # [ doc = "Bit 9 - Enable Error Interrupt 9" ] # [ inline ( always ) ] pub fn eei9 ( & mut self ) -> EEI9_W { EEI9_W { w : self } } # [ doc = "Bit 10 - Enable Error Interrupt 10" ] # [ inline ( always ) ] pub fn eei10 ( & mut self ) -> EEI10_W { EEI10_W { w : self } } # [ doc = "Bit 11 - Enable Error Interrupt 11" ] # [ inline ( always ) ] pub fn eei11 ( & mut self ) -> EEI11_W { EEI11_W { w : self } } # [ doc = "Bit 12 - Enable Error Interrupt 12" ] # [ inline ( always ) ] pub fn eei12 ( & mut self ) -> EEI12_W { EEI12_W { w : self } } # [ doc = "Bit 13 - Enable Error Interrupt 13" ] # [ inline ( always ) ] pub fn eei13 ( & mut self ) -> EEI13_W { EEI13_W { w : self } } # [ doc = "Bit 14 - Enable Error Interrupt 14" ] # [ inline ( always ) ] pub fn eei14 ( & mut self ) -> EEI14_W { EEI14_W { w : self } } # [ doc = "Bit 15 - Enable Error Interrupt 15" ] # [ inline ( always ) ] pub fn eei15 ( & mut self ) -> EEI15_W { EEI15_W { w : self } } # [ doc = "Bit 16 - Enable Error Interrupt 16" ] # [ inline ( always ) ] pub fn eei16 ( & mut self ) -> EEI16_W { EEI16_W { w : self } } # [ doc = "Bit 17 - Enable Error Interrupt 17" ] # [ inline ( always ) ] pub fn eei17 ( & mut self ) -> EEI17_W { EEI17_W { w : self } } # [ doc = "Bit 18 - Enable Error Interrupt 18" ] # [ inline ( always ) ] pub fn eei18 ( & mut self ) -> EEI18_W { EEI18_W { w : self } } # [ doc = "Bit 19 - Enable Error Interrupt 19" ] # [ inline ( always ) ] pub fn eei19 ( & mut self ) -> EEI19_W { EEI19_W { w : self } } # [ doc = "Bit 20 - Enable Error Interrupt 20" ] # [ inline ( always ) ] pub fn eei20 ( & mut self ) -> EEI20_W { EEI20_W { w : self } } # [ doc = "Bit 21 - Enable Error Interrupt 21" ] # [ inline ( always ) ] pub fn eei21 ( & mut self ) -> EEI21_W { EEI21_W { w : self } } # [ doc = "Bit 22 - Enable Error Interrupt 22" ] # [ inline ( always ) ] pub fn eei22 ( & mut self ) -> EEI22_W { EEI22_W { w : self } } # [ doc = "Bit 23 - Enable Error Interrupt 23" ] # [ inline ( always ) ] pub fn eei23 ( & mut self ) -> EEI23_W { EEI23_W { w : self } } # [ doc = "Bit 24 - Enable Error Interrupt 24" ] # [ inline ( always ) ] pub fn eei24 ( & mut self ) -> EEI24_W { EEI24_W { w : self } } # [ doc = "Bit 25 - Enable Error Interrupt 25" ] # [ inline ( always ) ] pub fn eei25 ( & mut self ) -> EEI25_W { EEI25_W { w : self } } # [ doc = "Bit 26 - Enable Error Interrupt 26" ] # [ inline ( always ) ] pub fn eei26 ( & mut self ) -> EEI26_W { EEI26_W { w : self } } # [ doc = "Bit 27 - Enable Error Interrupt 27" ] # [ inline ( always ) ] pub fn eei27 ( & mut self ) -> EEI27_W { EEI27_W { w : self } } # [ doc = "Bit 28 - Enable Error Interrupt 28" ] # [ inline ( always ) ] pub fn eei28 ( & mut self ) -> EEI28_W { EEI28_W { w : self } } # [ doc = "Bit 29 - Enable Error Interrupt 29" ] # [ inline ( always ) ] pub fn eei29 ( & mut self ) -> EEI29_W { EEI29_W { w : self } } # [ doc = "Bit 30 - Enable Error Interrupt 30" ] # [ inline ( always ) ] pub fn eei30 ( & mut self ) -> EEI30_W { EEI30_W { w : self } } # [ doc = "Bit 31 - Enable Error Interrupt 31" ] # [ inline ( always ) ] pub fn eei31 ( & mut self ) -> EEI31_W { EEI31_W { w : self } } } } # [ doc = "Clear Enable Error Interrupt Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ceei](ceei) module" ] pub type CEEI = crate :: Reg < u8 , _CEEI > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CEEI ; # [ doc = "`write(|w| ..)` method takes [ceei::W](ceei::W) writer structure" ] impl crate :: Writable for CEEI { } # [ doc = "Clear Enable Error Interrupt Register" ] pub mod ceei { # [ doc = "Writer for register CEEI" ] pub type W = crate :: W < u8 , super :: CEEI > ; # [ doc = "Register CEEI `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CEEI { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CEEI`" ] pub struct CEEI_W < 'a > { w : & 'a mut W , } impl < 'a > CEEI_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Clear All Enable Error Interrupts\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAEE_AW { # [ doc = "0: Clear only the EEI bit specified in the CEEI field" ] _0 , # [ doc = "1: Clear all bits in EEI" ] _1 } impl From < CAEE_AW > for bool { # [ inline ( always ) ] fn from ( variant : CAEE_AW ) -> Self { match variant { CAEE_AW :: _0 => false , CAEE_AW :: _1 => true } } } # [ doc = "Write proxy for field `CAEE`" ] pub struct CAEE_W < 'a > { w : & 'a mut W , } impl < 'a > CAEE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAEE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clear only the EEI bit specified in the CEEI field" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAEE_AW :: _0 ) } # [ doc = "Clear all bits in EEI" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAEE_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "No Op enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOP_AW { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: No operation, ignore the other bits in this register" ] _1 } impl From < NOP_AW > for bool { # [ inline ( always ) ] fn from ( variant : NOP_AW ) -> Self { match variant { NOP_AW :: _0 => false , NOP_AW :: _1 => true } } } # [ doc = "Write proxy for field `NOP`" ] pub struct NOP_W < 'a > { w : & 'a mut W , } impl < 'a > NOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOP_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _0 ) } # [ doc = "No operation, ignore the other bits in this register" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl W { # [ doc = "Bits 0:4 - Clear Enable Error Interrupt" ] # [ inline ( always ) ] pub fn ceei ( & mut self ) -> CEEI_W { CEEI_W { w : self } } # [ doc = "Bit 6 - Clear All Enable Error Interrupts" ] # [ inline ( always ) ] pub fn caee ( & mut self ) -> CAEE_W { CAEE_W { w : self } } # [ doc = "Bit 7 - No Op enable" ] # [ inline ( always ) ] pub fn nop ( & mut self ) -> NOP_W { NOP_W { w : self } } } } # [ doc = "Set Enable Error Interrupt Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [seei](seei) module" ] pub type SEEI = crate :: Reg < u8 , _SEEI > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SEEI ; # [ doc = "`write(|w| ..)` method takes [seei::W](seei::W) writer structure" ] impl crate :: Writable for SEEI { } # [ doc = "Set Enable Error Interrupt Register" ] pub mod seei { # [ doc = "Writer for register SEEI" ] pub type W = crate :: W < u8 , super :: SEEI > ; # [ doc = "Register SEEI `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SEEI { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `SEEI`" ] pub struct SEEI_W < 'a > { w : & 'a mut W , } impl < 'a > SEEI_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Sets All Enable Error Interrupts\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAEE_AW { # [ doc = "0: Set only the EEI bit specified in the SEEI field." ] _0 , # [ doc = "1: Sets all bits in EEI" ] _1 } impl From < SAEE_AW > for bool { # [ inline ( always ) ] fn from ( variant : SAEE_AW ) -> Self { match variant { SAEE_AW :: _0 => false , SAEE_AW :: _1 => true } } } # [ doc = "Write proxy for field `SAEE`" ] pub struct SAEE_W < 'a > { w : & 'a mut W , } impl < 'a > SAEE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SAEE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Set only the EEI bit specified in the SEEI field." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SAEE_AW :: _0 ) } # [ doc = "Sets all bits in EEI" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SAEE_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "No Op enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOP_AW { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: No operation, ignore the other bits in this register" ] _1 } impl From < NOP_AW > for bool { # [ inline ( always ) ] fn from ( variant : NOP_AW ) -> Self { match variant { NOP_AW :: _0 => false , NOP_AW :: _1 => true } } } # [ doc = "Write proxy for field `NOP`" ] pub struct NOP_W < 'a > { w : & 'a mut W , } impl < 'a > NOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOP_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _0 ) } # [ doc = "No operation, ignore the other bits in this register" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl W { # [ doc = "Bits 0:4 - Set Enable Error Interrupt" ] # [ inline ( always ) ] pub fn seei ( & mut self ) -> SEEI_W { SEEI_W { w : self } } # [ doc = "Bit 6 - Sets All Enable Error Interrupts" ] # [ inline ( always ) ] pub fn saee ( & mut self ) -> SAEE_W { SAEE_W { w : self } } # [ doc = "Bit 7 - No Op enable" ] # [ inline ( always ) ] pub fn nop ( & mut self ) -> NOP_W { NOP_W { w : self } } } } # [ doc = "Clear Enable Request Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cerq](cerq) module" ] pub type CERQ = crate :: Reg < u8 , _CERQ > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CERQ ; # [ doc = "`write(|w| ..)` method takes [cerq::W](cerq::W) writer structure" ] impl crate :: Writable for CERQ { } # [ doc = "Clear Enable Request Register" ] pub mod cerq { # [ doc = "Writer for register CERQ" ] pub type W = crate :: W < u8 , super :: CERQ > ; # [ doc = "Register CERQ `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CERQ { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CERQ`" ] pub struct CERQ_W < 'a > { w : & 'a mut W , } impl < 'a > CERQ_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Clear All Enable Requests\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAER_AW { # [ doc = "0: Clear only the ERQ bit specified in the CERQ field" ] _0 , # [ doc = "1: Clear all bits in ERQ" ] _1 } impl From < CAER_AW > for bool { # [ inline ( always ) ] fn from ( variant : CAER_AW ) -> Self { match variant { CAER_AW :: _0 => false , CAER_AW :: _1 => true } } } # [ doc = "Write proxy for field `CAER`" ] pub struct CAER_W < 'a > { w : & 'a mut W , } impl < 'a > CAER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAER_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clear only the ERQ bit specified in the CERQ field" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAER_AW :: _0 ) } # [ doc = "Clear all bits in ERQ" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAER_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "No Op enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOP_AW { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: No operation, ignore the other bits in this register" ] _1 } impl From < NOP_AW > for bool { # [ inline ( always ) ] fn from ( variant : NOP_AW ) -> Self { match variant { NOP_AW :: _0 => false , NOP_AW :: _1 => true } } } # [ doc = "Write proxy for field `NOP`" ] pub struct NOP_W < 'a > { w : & 'a mut W , } impl < 'a > NOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOP_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _0 ) } # [ doc = "No operation, ignore the other bits in this register" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl W { # [ doc = "Bits 0:4 - Clear Enable Request" ] # [ inline ( always ) ] pub fn cerq ( & mut self ) -> CERQ_W { CERQ_W { w : self } } # [ doc = "Bit 6 - Clear All Enable Requests" ] # [ inline ( always ) ] pub fn caer ( & mut self ) -> CAER_W { CAER_W { w : self } } # [ doc = "Bit 7 - No Op enable" ] # [ inline ( always ) ] pub fn nop ( & mut self ) -> NOP_W { NOP_W { w : self } } } } # [ doc = "Set Enable Request Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [serq](serq) module" ] pub type SERQ = crate :: Reg < u8 , _SERQ > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SERQ ; # [ doc = "`write(|w| ..)` method takes [serq::W](serq::W) writer structure" ] impl crate :: Writable for SERQ { } # [ doc = "Set Enable Request Register" ] pub mod serq { # [ doc = "Writer for register SERQ" ] pub type W = crate :: W < u8 , super :: SERQ > ; # [ doc = "Register SERQ `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SERQ { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `SERQ`" ] pub struct SERQ_W < 'a > { w : & 'a mut W , } impl < 'a > SERQ_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Set All Enable Requests\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAER_AW { # [ doc = "0: Set only the ERQ bit specified in the SERQ field" ] _0 , # [ doc = "1: Set all bits in ERQ" ] _1 } impl From < SAER_AW > for bool { # [ inline ( always ) ] fn from ( variant : SAER_AW ) -> Self { match variant { SAER_AW :: _0 => false , SAER_AW :: _1 => true } } } # [ doc = "Write proxy for field `SAER`" ] pub struct SAER_W < 'a > { w : & 'a mut W , } impl < 'a > SAER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SAER_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Set only the ERQ bit specified in the SERQ field" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SAER_AW :: _0 ) } # [ doc = "Set all bits in ERQ" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SAER_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "No Op enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOP_AW { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: No operation, ignore the other bits in this register" ] _1 } impl From < NOP_AW > for bool { # [ inline ( always ) ] fn from ( variant : NOP_AW ) -> Self { match variant { NOP_AW :: _0 => false , NOP_AW :: _1 => true } } } # [ doc = "Write proxy for field `NOP`" ] pub struct NOP_W < 'a > { w : & 'a mut W , } impl < 'a > NOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOP_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _0 ) } # [ doc = "No operation, ignore the other bits in this register" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl W { # [ doc = "Bits 0:4 - Set Enable Request" ] # [ inline ( always ) ] pub fn serq ( & mut self ) -> SERQ_W { SERQ_W { w : self } } # [ doc = "Bit 6 - Set All Enable Requests" ] # [ inline ( always ) ] pub fn saer ( & mut self ) -> SAER_W { SAER_W { w : self } } # [ doc = "Bit 7 - No Op enable" ] # [ inline ( always ) ] pub fn nop ( & mut self ) -> NOP_W { NOP_W { w : self } } } } # [ doc = "Clear DONE Status Bit Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cdne](cdne) module" ] pub type CDNE = crate :: Reg < u8 , _CDNE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CDNE ; # [ doc = "`write(|w| ..)` method takes [cdne::W](cdne::W) writer structure" ] impl crate :: Writable for CDNE { } # [ doc = "Clear DONE Status Bit Register" ] pub mod cdne { # [ doc = "Writer for register CDNE" ] pub type W = crate :: W < u8 , super :: CDNE > ; # [ doc = "Register CDNE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CDNE { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CDNE`" ] pub struct CDNE_W < 'a > { w : & 'a mut W , } impl < 'a > CDNE_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Clears All DONE Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CADN_AW { # [ doc = "0: Clears only the TCDn_CSR\\[DONE\\] bit specified in the CDNE field" ] _0 , # [ doc = "1: Clears all bits in TCDn_CSR\\[DONE\\]" ] _1 } impl From < CADN_AW > for bool { # [ inline ( always ) ] fn from ( variant : CADN_AW ) -> Self { match variant { CADN_AW :: _0 => false , CADN_AW :: _1 => true } } } # [ doc = "Write proxy for field `CADN`" ] pub struct CADN_W < 'a > { w : & 'a mut W , } impl < 'a > CADN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CADN_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clears only the TCDn_CSR\\[DONE\\] bit specified in the CDNE field" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CADN_AW :: _0 ) } # [ doc = "Clears all bits in TCDn_CSR\\[DONE\\]" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CADN_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "No Op enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOP_AW { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: No operation, ignore the other bits in this register" ] _1 } impl From < NOP_AW > for bool { # [ inline ( always ) ] fn from ( variant : NOP_AW ) -> Self { match variant { NOP_AW :: _0 => false , NOP_AW :: _1 => true } } } # [ doc = "Write proxy for field `NOP`" ] pub struct NOP_W < 'a > { w : & 'a mut W , } impl < 'a > NOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOP_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _0 ) } # [ doc = "No operation, ignore the other bits in this register" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl W { # [ doc = "Bits 0:4 - Clear DONE Bit" ] # [ inline ( always ) ] pub fn cdne ( & mut self ) -> CDNE_W { CDNE_W { w : self } } # [ doc = "Bit 6 - Clears All DONE Bits" ] # [ inline ( always ) ] pub fn cadn ( & mut self ) -> CADN_W { CADN_W { w : self } } # [ doc = "Bit 7 - No Op enable" ] # [ inline ( always ) ] pub fn nop ( & mut self ) -> NOP_W { NOP_W { w : self } } } } # [ doc = "Set START Bit Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ssrt](ssrt) module" ] pub type SSRT = crate :: Reg < u8 , _SSRT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SSRT ; # [ doc = "`write(|w| ..)` method takes [ssrt::W](ssrt::W) writer structure" ] impl crate :: Writable for SSRT { } # [ doc = "Set START Bit Register" ] pub mod ssrt { # [ doc = "Writer for register SSRT" ] pub type W = crate :: W < u8 , super :: SSRT > ; # [ doc = "Register SSRT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SSRT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `SSRT`" ] pub struct SSRT_W < 'a > { w : & 'a mut W , } impl < 'a > SSRT_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Set All START Bits (activates all channels)\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAST_AW { # [ doc = "0: Set only the TCDn_CSR\\[START\\] bit specified in the SSRT field" ] _0 , # [ doc = "1: Set all bits in TCDn_CSR\\[START\\]" ] _1 } impl From < SAST_AW > for bool { # [ inline ( always ) ] fn from ( variant : SAST_AW ) -> Self { match variant { SAST_AW :: _0 => false , SAST_AW :: _1 => true } } } # [ doc = "Write proxy for field `SAST`" ] pub struct SAST_W < 'a > { w : & 'a mut W , } impl < 'a > SAST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SAST_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Set only the TCDn_CSR\\[START\\] bit specified in the SSRT field" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SAST_AW :: _0 ) } # [ doc = "Set all bits in TCDn_CSR\\[START\\]" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SAST_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "No Op enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOP_AW { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: No operation, ignore the other bits in this register" ] _1 } impl From < NOP_AW > for bool { # [ inline ( always ) ] fn from ( variant : NOP_AW ) -> Self { match variant { NOP_AW :: _0 => false , NOP_AW :: _1 => true } } } # [ doc = "Write proxy for field `NOP`" ] pub struct NOP_W < 'a > { w : & 'a mut W , } impl < 'a > NOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOP_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _0 ) } # [ doc = "No operation, ignore the other bits in this register" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl W { # [ doc = "Bits 0:4 - Set START Bit" ] # [ inline ( always ) ] pub fn ssrt ( & mut self ) -> SSRT_W { SSRT_W { w : self } } # [ doc = "Bit 6 - Set All START Bits (activates all channels)" ] # [ inline ( always ) ] pub fn sast ( & mut self ) -> SAST_W { SAST_W { w : self } } # [ doc = "Bit 7 - No Op enable" ] # [ inline ( always ) ] pub fn nop ( & mut self ) -> NOP_W { NOP_W { w : self } } } } # [ doc = "Clear Error Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cerr](cerr) module" ] pub type CERR = crate :: Reg < u8 , _CERR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CERR ; # [ doc = "`write(|w| ..)` method takes [cerr::W](cerr::W) writer structure" ] impl crate :: Writable for CERR { } # [ doc = "Clear Error Register" ] pub mod cerr { # [ doc = "Writer for register CERR" ] pub type W = crate :: W < u8 , super :: CERR > ; # [ doc = "Register CERR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CERR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CERR`" ] pub struct CERR_W < 'a > { w : & 'a mut W , } impl < 'a > CERR_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Clear All Error Indicators\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAEI_AW { # [ doc = "0: Clear only the ERR bit specified in the CERR field" ] _0 , # [ doc = "1: Clear all bits in ERR" ] _1 } impl From < CAEI_AW > for bool { # [ inline ( always ) ] fn from ( variant : CAEI_AW ) -> Self { match variant { CAEI_AW :: _0 => false , CAEI_AW :: _1 => true } } } # [ doc = "Write proxy for field `CAEI`" ] pub struct CAEI_W < 'a > { w : & 'a mut W , } impl < 'a > CAEI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAEI_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clear only the ERR bit specified in the CERR field" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAEI_AW :: _0 ) } # [ doc = "Clear all bits in ERR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAEI_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "No Op enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOP_AW { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: No operation, ignore the other bits in this register" ] _1 } impl From < NOP_AW > for bool { # [ inline ( always ) ] fn from ( variant : NOP_AW ) -> Self { match variant { NOP_AW :: _0 => false , NOP_AW :: _1 => true } } } # [ doc = "Write proxy for field `NOP`" ] pub struct NOP_W < 'a > { w : & 'a mut W , } impl < 'a > NOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOP_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _0 ) } # [ doc = "No operation, ignore the other bits in this register" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl W { # [ doc = "Bits 0:4 - Clear Error Indicator" ] # [ inline ( always ) ] pub fn cerr ( & mut self ) -> CERR_W { CERR_W { w : self } } # [ doc = "Bit 6 - Clear All Error Indicators" ] # [ inline ( always ) ] pub fn caei ( & mut self ) -> CAEI_W { CAEI_W { w : self } } # [ doc = "Bit 7 - No Op enable" ] # [ inline ( always ) ] pub fn nop ( & mut self ) -> NOP_W { NOP_W { w : self } } } } # [ doc = "Clear Interrupt Request Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cint](cint) module" ] pub type CINT = crate :: Reg < u8 , _CINT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CINT ; # [ doc = "`write(|w| ..)` method takes [cint::W](cint::W) writer structure" ] impl crate :: Writable for CINT { } # [ doc = "Clear Interrupt Request Register" ] pub mod cint { # [ doc = "Writer for register CINT" ] pub type W = crate :: W < u8 , super :: CINT > ; # [ doc = "Register CINT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CINT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CINT`" ] pub struct CINT_W < 'a > { w : & 'a mut W , } impl < 'a > CINT_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Clear All Interrupt Requests\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAIR_AW { # [ doc = "0: Clear only the INT bit specified in the CINT field" ] _0 , # [ doc = "1: Clear all bits in INT" ] _1 } impl From < CAIR_AW > for bool { # [ inline ( always ) ] fn from ( variant : CAIR_AW ) -> Self { match variant { CAIR_AW :: _0 => false , CAIR_AW :: _1 => true } } } # [ doc = "Write proxy for field `CAIR`" ] pub struct CAIR_W < 'a > { w : & 'a mut W , } impl < 'a > CAIR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAIR_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clear only the INT bit specified in the CINT field" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAIR_AW :: _0 ) } # [ doc = "Clear all bits in INT" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAIR_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "No Op enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOP_AW { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: No operation, ignore the other bits in this register" ] _1 } impl From < NOP_AW > for bool { # [ inline ( always ) ] fn from ( variant : NOP_AW ) -> Self { match variant { NOP_AW :: _0 => false , NOP_AW :: _1 => true } } } # [ doc = "Write proxy for field `NOP`" ] pub struct NOP_W < 'a > { w : & 'a mut W , } impl < 'a > NOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOP_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _0 ) } # [ doc = "No operation, ignore the other bits in this register" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOP_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl W { # [ doc = "Bits 0:4 - Clear Interrupt Request" ] # [ inline ( always ) ] pub fn cint ( & mut self ) -> CINT_W { CINT_W { w : self } } # [ doc = "Bit 6 - Clear All Interrupt Requests" ] # [ inline ( always ) ] pub fn cair ( & mut self ) -> CAIR_W { CAIR_W { w : self } } # [ doc = "Bit 7 - No Op enable" ] # [ inline ( always ) ] pub fn nop ( & mut self ) -> NOP_W { NOP_W { w : self } } } } # [ doc = "Interrupt Request Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [int](int) module" ] pub type INT = crate :: Reg < u32 , _INT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _INT ; # [ doc = "`read()` method returns [int::R](int::R) reader structure" ] impl crate :: Readable for INT { } # [ doc = "`write(|w| ..)` method takes [int::W](int::W) writer structure" ] impl crate :: Writable for INT { } # [ doc = "Interrupt Request Register" ] pub mod int { # [ doc = "Reader of register INT" ] pub type R = crate :: R < u32 , super :: INT > ; # [ doc = "Writer for register INT" ] pub type W = crate :: W < u32 , super :: INT > ; # [ doc = "Register INT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: INT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Interrupt Request 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT0_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT0_A > for bool { # [ inline ( always ) ] fn from ( variant : INT0_A ) -> Self { match variant { INT0_A :: _0 => false , INT0_A :: _1 => true } } } # [ doc = "Reader of field `INT0`" ] pub type INT0_R = crate :: R < bool , INT0_A > ; impl INT0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT0_A { match self . bits { false => INT0_A :: _0 , true => INT0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT0_A :: _1 } } # [ doc = "Write proxy for field `INT0`" ] pub struct INT0_W < 'a > { w : & 'a mut W , } impl < 'a > INT0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT0_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Interrupt Request 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT1_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT1_A > for bool { # [ inline ( always ) ] fn from ( variant : INT1_A ) -> Self { match variant { INT1_A :: _0 => false , INT1_A :: _1 => true } } } # [ doc = "Reader of field `INT1`" ] pub type INT1_R = crate :: R < bool , INT1_A > ; impl INT1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT1_A { match self . bits { false => INT1_A :: _0 , true => INT1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT1_A :: _1 } } # [ doc = "Write proxy for field `INT1`" ] pub struct INT1_W < 'a > { w : & 'a mut W , } impl < 'a > INT1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT1_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT1_A :: _1 ) } # [ 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 } } # [ doc = "Interrupt Request 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT2_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT2_A > for bool { # [ inline ( always ) ] fn from ( variant : INT2_A ) -> Self { match variant { INT2_A :: _0 => false , INT2_A :: _1 => true } } } # [ doc = "Reader of field `INT2`" ] pub type INT2_R = crate :: R < bool , INT2_A > ; impl INT2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT2_A { match self . bits { false => INT2_A :: _0 , true => INT2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT2_A :: _1 } } # [ doc = "Write proxy for field `INT2`" ] pub struct INT2_W < 'a > { w : & 'a mut W , } impl < 'a > INT2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT2_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT2_A :: _1 ) } # [ 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 = "Interrupt Request 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT3_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT3_A > for bool { # [ inline ( always ) ] fn from ( variant : INT3_A ) -> Self { match variant { INT3_A :: _0 => false , INT3_A :: _1 => true } } } # [ doc = "Reader of field `INT3`" ] pub type INT3_R = crate :: R < bool , INT3_A > ; impl INT3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT3_A { match self . bits { false => INT3_A :: _0 , true => INT3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT3_A :: _1 } } # [ doc = "Write proxy for field `INT3`" ] pub struct INT3_W < 'a > { w : & 'a mut W , } impl < 'a > INT3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT3_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Interrupt Request 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT4_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT4_A > for bool { # [ inline ( always ) ] fn from ( variant : INT4_A ) -> Self { match variant { INT4_A :: _0 => false , INT4_A :: _1 => true } } } # [ doc = "Reader of field `INT4`" ] pub type INT4_R = crate :: R < bool , INT4_A > ; impl INT4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT4_A { match self . bits { false => INT4_A :: _0 , true => INT4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT4_A :: _1 } } # [ doc = "Write proxy for field `INT4`" ] pub struct INT4_W < 'a > { w : & 'a mut W , } impl < 'a > INT4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT4_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Interrupt Request 5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT5_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT5_A > for bool { # [ inline ( always ) ] fn from ( variant : INT5_A ) -> Self { match variant { INT5_A :: _0 => false , INT5_A :: _1 => true } } } # [ doc = "Reader of field `INT5`" ] pub type INT5_R = crate :: R < bool , INT5_A > ; impl INT5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT5_A { match self . bits { false => INT5_A :: _0 , true => INT5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT5_A :: _1 } } # [ doc = "Write proxy for field `INT5`" ] pub struct INT5_W < 'a > { w : & 'a mut W , } impl < 'a > INT5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT5_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT5_A :: _1 ) } # [ 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 = "Interrupt Request 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT6_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT6_A > for bool { # [ inline ( always ) ] fn from ( variant : INT6_A ) -> Self { match variant { INT6_A :: _0 => false , INT6_A :: _1 => true } } } # [ doc = "Reader of field `INT6`" ] pub type INT6_R = crate :: R < bool , INT6_A > ; impl INT6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT6_A { match self . bits { false => INT6_A :: _0 , true => INT6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT6_A :: _1 } } # [ doc = "Write proxy for field `INT6`" ] pub struct INT6_W < 'a > { w : & 'a mut W , } impl < 'a > INT6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT6_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT6_A :: _1 ) } # [ 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 = "Interrupt Request 7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT7_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT7_A > for bool { # [ inline ( always ) ] fn from ( variant : INT7_A ) -> Self { match variant { INT7_A :: _0 => false , INT7_A :: _1 => true } } } # [ doc = "Reader of field `INT7`" ] pub type INT7_R = crate :: R < bool , INT7_A > ; impl INT7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT7_A { match self . bits { false => INT7_A :: _0 , true => INT7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT7_A :: _1 } } # [ doc = "Write proxy for field `INT7`" ] pub struct INT7_W < 'a > { w : & 'a mut W , } impl < 'a > INT7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT7_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT7_A :: _1 ) } # [ 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 = "Interrupt Request 8\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT8_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT8_A > for bool { # [ inline ( always ) ] fn from ( variant : INT8_A ) -> Self { match variant { INT8_A :: _0 => false , INT8_A :: _1 => true } } } # [ doc = "Reader of field `INT8`" ] pub type INT8_R = crate :: R < bool , INT8_A > ; impl INT8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT8_A { match self . bits { false => INT8_A :: _0 , true => INT8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT8_A :: _1 } } # [ doc = "Write proxy for field `INT8`" ] pub struct INT8_W < 'a > { w : & 'a mut W , } impl < 'a > INT8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT8_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Interrupt Request 9\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT9_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT9_A > for bool { # [ inline ( always ) ] fn from ( variant : INT9_A ) -> Self { match variant { INT9_A :: _0 => false , INT9_A :: _1 => true } } } # [ doc = "Reader of field `INT9`" ] pub type INT9_R = crate :: R < bool , INT9_A > ; impl INT9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT9_A { match self . bits { false => INT9_A :: _0 , true => INT9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT9_A :: _1 } } # [ doc = "Write proxy for field `INT9`" ] pub struct INT9_W < 'a > { w : & 'a mut W , } impl < 'a > INT9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT9_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Interrupt Request 10\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT10_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT10_A > for bool { # [ inline ( always ) ] fn from ( variant : INT10_A ) -> Self { match variant { INT10_A :: _0 => false , INT10_A :: _1 => true } } } # [ doc = "Reader of field `INT10`" ] pub type INT10_R = crate :: R < bool , INT10_A > ; impl INT10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT10_A { match self . bits { false => INT10_A :: _0 , true => INT10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT10_A :: _1 } } # [ doc = "Write proxy for field `INT10`" ] pub struct INT10_W < 'a > { w : & 'a mut W , } impl < 'a > INT10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT10_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Interrupt Request 11\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT11_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT11_A > for bool { # [ inline ( always ) ] fn from ( variant : INT11_A ) -> Self { match variant { INT11_A :: _0 => false , INT11_A :: _1 => true } } } # [ doc = "Reader of field `INT11`" ] pub type INT11_R = crate :: R < bool , INT11_A > ; impl INT11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT11_A { match self . bits { false => INT11_A :: _0 , true => INT11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT11_A :: _1 } } # [ doc = "Write proxy for field `INT11`" ] pub struct INT11_W < 'a > { w : & 'a mut W , } impl < 'a > INT11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT11_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Interrupt Request 12\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT12_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT12_A > for bool { # [ inline ( always ) ] fn from ( variant : INT12_A ) -> Self { match variant { INT12_A :: _0 => false , INT12_A :: _1 => true } } } # [ doc = "Reader of field `INT12`" ] pub type INT12_R = crate :: R < bool , INT12_A > ; impl INT12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT12_A { match self . bits { false => INT12_A :: _0 , true => INT12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT12_A :: _1 } } # [ doc = "Write proxy for field `INT12`" ] pub struct INT12_W < 'a > { w : & 'a mut W , } impl < 'a > INT12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT12_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Interrupt Request 13\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT13_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT13_A > for bool { # [ inline ( always ) ] fn from ( variant : INT13_A ) -> Self { match variant { INT13_A :: _0 => false , INT13_A :: _1 => true } } } # [ doc = "Reader of field `INT13`" ] pub type INT13_R = crate :: R < bool , INT13_A > ; impl INT13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT13_A { match self . bits { false => INT13_A :: _0 , true => INT13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT13_A :: _1 } } # [ doc = "Write proxy for field `INT13`" ] pub struct INT13_W < 'a > { w : & 'a mut W , } impl < 'a > INT13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT13_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT13_A :: _1 ) } # [ 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 = "Interrupt Request 14\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT14_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT14_A > for bool { # [ inline ( always ) ] fn from ( variant : INT14_A ) -> Self { match variant { INT14_A :: _0 => false , INT14_A :: _1 => true } } } # [ doc = "Reader of field `INT14`" ] pub type INT14_R = crate :: R < bool , INT14_A > ; impl INT14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT14_A { match self . bits { false => INT14_A :: _0 , true => INT14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT14_A :: _1 } } # [ doc = "Write proxy for field `INT14`" ] pub struct INT14_W < 'a > { w : & 'a mut W , } impl < 'a > INT14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT14_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Interrupt Request 15\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT15_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT15_A > for bool { # [ inline ( always ) ] fn from ( variant : INT15_A ) -> Self { match variant { INT15_A :: _0 => false , INT15_A :: _1 => true } } } # [ doc = "Reader of field `INT15`" ] pub type INT15_R = crate :: R < bool , INT15_A > ; impl INT15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT15_A { match self . bits { false => INT15_A :: _0 , true => INT15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT15_A :: _1 } } # [ doc = "Write proxy for field `INT15`" ] pub struct INT15_W < 'a > { w : & 'a mut W , } impl < 'a > INT15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT15_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Request 16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT16_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT16_A > for bool { # [ inline ( always ) ] fn from ( variant : INT16_A ) -> Self { match variant { INT16_A :: _0 => false , INT16_A :: _1 => true } } } # [ doc = "Reader of field `INT16`" ] pub type INT16_R = crate :: R < bool , INT16_A > ; impl INT16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT16_A { match self . bits { false => INT16_A :: _0 , true => INT16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT16_A :: _1 } } # [ doc = "Write proxy for field `INT16`" ] pub struct INT16_W < 'a > { w : & 'a mut W , } impl < 'a > INT16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT16_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Interrupt Request 17\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT17_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT17_A > for bool { # [ inline ( always ) ] fn from ( variant : INT17_A ) -> Self { match variant { INT17_A :: _0 => false , INT17_A :: _1 => true } } } # [ doc = "Reader of field `INT17`" ] pub type INT17_R = crate :: R < bool , INT17_A > ; impl INT17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT17_A { match self . bits { false => INT17_A :: _0 , true => INT17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT17_A :: _1 } } # [ doc = "Write proxy for field `INT17`" ] pub struct INT17_W < 'a > { w : & 'a mut W , } impl < 'a > INT17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT17_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Interrupt Request 18\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT18_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT18_A > for bool { # [ inline ( always ) ] fn from ( variant : INT18_A ) -> Self { match variant { INT18_A :: _0 => false , INT18_A :: _1 => true } } } # [ doc = "Reader of field `INT18`" ] pub type INT18_R = crate :: R < bool , INT18_A > ; impl INT18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT18_A { match self . bits { false => INT18_A :: _0 , true => INT18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT18_A :: _1 } } # [ doc = "Write proxy for field `INT18`" ] pub struct INT18_W < 'a > { w : & 'a mut W , } impl < 'a > INT18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT18_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Interrupt Request 19\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT19_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT19_A > for bool { # [ inline ( always ) ] fn from ( variant : INT19_A ) -> Self { match variant { INT19_A :: _0 => false , INT19_A :: _1 => true } } } # [ doc = "Reader of field `INT19`" ] pub type INT19_R = crate :: R < bool , INT19_A > ; impl INT19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT19_A { match self . bits { false => INT19_A :: _0 , true => INT19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT19_A :: _1 } } # [ doc = "Write proxy for field `INT19`" ] pub struct INT19_W < 'a > { w : & 'a mut W , } impl < 'a > INT19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT19_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Interrupt Request 20\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT20_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT20_A > for bool { # [ inline ( always ) ] fn from ( variant : INT20_A ) -> Self { match variant { INT20_A :: _0 => false , INT20_A :: _1 => true } } } # [ doc = "Reader of field `INT20`" ] pub type INT20_R = crate :: R < bool , INT20_A > ; impl INT20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT20_A { match self . bits { false => INT20_A :: _0 , true => INT20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT20_A :: _1 } } # [ doc = "Write proxy for field `INT20`" ] pub struct INT20_W < 'a > { w : & 'a mut W , } impl < 'a > INT20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT20_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT20_A :: _1 ) } # [ 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 = "Interrupt Request 21\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT21_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT21_A > for bool { # [ inline ( always ) ] fn from ( variant : INT21_A ) -> Self { match variant { INT21_A :: _0 => false , INT21_A :: _1 => true } } } # [ doc = "Reader of field `INT21`" ] pub type INT21_R = crate :: R < bool , INT21_A > ; impl INT21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT21_A { match self . bits { false => INT21_A :: _0 , true => INT21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT21_A :: _1 } } # [ doc = "Write proxy for field `INT21`" ] pub struct INT21_W < 'a > { w : & 'a mut W , } impl < 'a > INT21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT21_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT21_A :: _1 ) } # [ 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 = "Interrupt Request 22\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT22_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT22_A > for bool { # [ inline ( always ) ] fn from ( variant : INT22_A ) -> Self { match variant { INT22_A :: _0 => false , INT22_A :: _1 => true } } } # [ doc = "Reader of field `INT22`" ] pub type INT22_R = crate :: R < bool , INT22_A > ; impl INT22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT22_A { match self . bits { false => INT22_A :: _0 , true => INT22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT22_A :: _1 } } # [ doc = "Write proxy for field `INT22`" ] pub struct INT22_W < 'a > { w : & 'a mut W , } impl < 'a > INT22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT22_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Interrupt Request 23\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT23_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT23_A > for bool { # [ inline ( always ) ] fn from ( variant : INT23_A ) -> Self { match variant { INT23_A :: _0 => false , INT23_A :: _1 => true } } } # [ doc = "Reader of field `INT23`" ] pub type INT23_R = crate :: R < bool , INT23_A > ; impl INT23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT23_A { match self . bits { false => INT23_A :: _0 , true => INT23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT23_A :: _1 } } # [ doc = "Write proxy for field `INT23`" ] pub struct INT23_W < 'a > { w : & 'a mut W , } impl < 'a > INT23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT23_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Interrupt Request 24\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT24_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT24_A > for bool { # [ inline ( always ) ] fn from ( variant : INT24_A ) -> Self { match variant { INT24_A :: _0 => false , INT24_A :: _1 => true } } } # [ doc = "Reader of field `INT24`" ] pub type INT24_R = crate :: R < bool , INT24_A > ; impl INT24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT24_A { match self . bits { false => INT24_A :: _0 , true => INT24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT24_A :: _1 } } # [ doc = "Write proxy for field `INT24`" ] pub struct INT24_W < 'a > { w : & 'a mut W , } impl < 'a > INT24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT24_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT24_A :: _1 ) } # [ 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 = "Interrupt Request 25\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT25_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT25_A > for bool { # [ inline ( always ) ] fn from ( variant : INT25_A ) -> Self { match variant { INT25_A :: _0 => false , INT25_A :: _1 => true } } } # [ doc = "Reader of field `INT25`" ] pub type INT25_R = crate :: R < bool , INT25_A > ; impl INT25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT25_A { match self . bits { false => INT25_A :: _0 , true => INT25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT25_A :: _1 } } # [ doc = "Write proxy for field `INT25`" ] pub struct INT25_W < 'a > { w : & 'a mut W , } impl < 'a > INT25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT25_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT25_A :: _1 ) } # [ 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 = "Interrupt Request 26\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT26_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT26_A > for bool { # [ inline ( always ) ] fn from ( variant : INT26_A ) -> Self { match variant { INT26_A :: _0 => false , INT26_A :: _1 => true } } } # [ doc = "Reader of field `INT26`" ] pub type INT26_R = crate :: R < bool , INT26_A > ; impl INT26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT26_A { match self . bits { false => INT26_A :: _0 , true => INT26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT26_A :: _1 } } # [ doc = "Write proxy for field `INT26`" ] pub struct INT26_W < 'a > { w : & 'a mut W , } impl < 'a > INT26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT26_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT26_A :: _1 ) } # [ 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 = "Interrupt Request 27\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT27_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT27_A > for bool { # [ inline ( always ) ] fn from ( variant : INT27_A ) -> Self { match variant { INT27_A :: _0 => false , INT27_A :: _1 => true } } } # [ doc = "Reader of field `INT27`" ] pub type INT27_R = crate :: R < bool , INT27_A > ; impl INT27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT27_A { match self . bits { false => INT27_A :: _0 , true => INT27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT27_A :: _1 } } # [ doc = "Write proxy for field `INT27`" ] pub struct INT27_W < 'a > { w : & 'a mut W , } impl < 'a > INT27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT27_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Interrupt Request 28\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT28_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT28_A > for bool { # [ inline ( always ) ] fn from ( variant : INT28_A ) -> Self { match variant { INT28_A :: _0 => false , INT28_A :: _1 => true } } } # [ doc = "Reader of field `INT28`" ] pub type INT28_R = crate :: R < bool , INT28_A > ; impl INT28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT28_A { match self . bits { false => INT28_A :: _0 , true => INT28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT28_A :: _1 } } # [ doc = "Write proxy for field `INT28`" ] pub struct INT28_W < 'a > { w : & 'a mut W , } impl < 'a > INT28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT28_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Interrupt Request 29\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT29_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT29_A > for bool { # [ inline ( always ) ] fn from ( variant : INT29_A ) -> Self { match variant { INT29_A :: _0 => false , INT29_A :: _1 => true } } } # [ doc = "Reader of field `INT29`" ] pub type INT29_R = crate :: R < bool , INT29_A > ; impl INT29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT29_A { match self . bits { false => INT29_A :: _0 , true => INT29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT29_A :: _1 } } # [ doc = "Write proxy for field `INT29`" ] pub struct INT29_W < 'a > { w : & 'a mut W , } impl < 'a > INT29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT29_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Interrupt Request 30\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT30_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT30_A > for bool { # [ inline ( always ) ] fn from ( variant : INT30_A ) -> Self { match variant { INT30_A :: _0 => false , INT30_A :: _1 => true } } } # [ doc = "Reader of field `INT30`" ] pub type INT30_R = crate :: R < bool , INT30_A > ; impl INT30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT30_A { match self . bits { false => INT30_A :: _0 , true => INT30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT30_A :: _1 } } # [ doc = "Write proxy for field `INT30`" ] pub struct INT30_W < 'a > { w : & 'a mut W , } impl < 'a > INT30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT30_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Interrupt Request 31\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INT31_A { # [ doc = "0: The interrupt request for corresponding channel is cleared" ] _0 , # [ doc = "1: The interrupt request for corresponding channel is active" ] _1 } impl From < INT31_A > for bool { # [ inline ( always ) ] fn from ( variant : INT31_A ) -> Self { match variant { INT31_A :: _0 => false , INT31_A :: _1 => true } } } # [ doc = "Reader of field `INT31`" ] pub type INT31_R = crate :: R < bool , INT31_A > ; impl INT31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INT31_A { match self . bits { false => INT31_A :: _0 , true => INT31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INT31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INT31_A :: _1 } } # [ doc = "Write proxy for field `INT31`" ] pub struct INT31_W < 'a > { w : & 'a mut W , } impl < 'a > INT31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INT31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt request for corresponding channel is cleared" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INT31_A :: _0 ) } # [ doc = "The interrupt request for corresponding channel is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INT31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Interrupt Request 0" ] # [ inline ( always ) ] pub fn int0 ( & self ) -> INT0_R { INT0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Request 1" ] # [ inline ( always ) ] pub fn int1 ( & self ) -> INT1_R { INT1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Interrupt Request 2" ] # [ inline ( always ) ] pub fn int2 ( & self ) -> INT2_R { INT2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Interrupt Request 3" ] # [ inline ( always ) ] pub fn int3 ( & self ) -> INT3_R { INT3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Interrupt Request 4" ] # [ inline ( always ) ] pub fn int4 ( & self ) -> INT4_R { INT4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Interrupt Request 5" ] # [ inline ( always ) ] pub fn int5 ( & self ) -> INT5_R { INT5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt Request 6" ] # [ inline ( always ) ] pub fn int6 ( & self ) -> INT6_R { INT6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Interrupt Request 7" ] # [ inline ( always ) ] pub fn int7 ( & self ) -> INT7_R { INT7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Interrupt Request 8" ] # [ inline ( always ) ] pub fn int8 ( & self ) -> INT8_R { INT8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Interrupt Request 9" ] # [ inline ( always ) ] pub fn int9 ( & self ) -> INT9_R { INT9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Interrupt Request 10" ] # [ inline ( always ) ] pub fn int10 ( & self ) -> INT10_R { INT10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Interrupt Request 11" ] # [ inline ( always ) ] pub fn int11 ( & self ) -> INT11_R { INT11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Interrupt Request 12" ] # [ inline ( always ) ] pub fn int12 ( & self ) -> INT12_R { INT12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Interrupt Request 13" ] # [ inline ( always ) ] pub fn int13 ( & self ) -> INT13_R { INT13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Interrupt Request 14" ] # [ inline ( always ) ] pub fn int14 ( & self ) -> INT14_R { INT14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Interrupt Request 15" ] # [ inline ( always ) ] pub fn int15 ( & self ) -> INT15_R { INT15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Interrupt Request 16" ] # [ inline ( always ) ] pub fn int16 ( & self ) -> INT16_R { INT16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Interrupt Request 17" ] # [ inline ( always ) ] pub fn int17 ( & self ) -> INT17_R { INT17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Interrupt Request 18" ] # [ inline ( always ) ] pub fn int18 ( & self ) -> INT18_R { INT18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Interrupt Request 19" ] # [ inline ( always ) ] pub fn int19 ( & self ) -> INT19_R { INT19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Interrupt Request 20" ] # [ inline ( always ) ] pub fn int20 ( & self ) -> INT20_R { INT20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Interrupt Request 21" ] # [ inline ( always ) ] pub fn int21 ( & self ) -> INT21_R { INT21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Interrupt Request 22" ] # [ inline ( always ) ] pub fn int22 ( & self ) -> INT22_R { INT22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Interrupt Request 23" ] # [ inline ( always ) ] pub fn int23 ( & self ) -> INT23_R { INT23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Interrupt Request 24" ] # [ inline ( always ) ] pub fn int24 ( & self ) -> INT24_R { INT24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Interrupt Request 25" ] # [ inline ( always ) ] pub fn int25 ( & self ) -> INT25_R { INT25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Interrupt Request 26" ] # [ inline ( always ) ] pub fn int26 ( & self ) -> INT26_R { INT26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Interrupt Request 27" ] # [ inline ( always ) ] pub fn int27 ( & self ) -> INT27_R { INT27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Interrupt Request 28" ] # [ inline ( always ) ] pub fn int28 ( & self ) -> INT28_R { INT28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Interrupt Request 29" ] # [ inline ( always ) ] pub fn int29 ( & self ) -> INT29_R { INT29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Interrupt Request 30" ] # [ inline ( always ) ] pub fn int30 ( & self ) -> INT30_R { INT30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Interrupt Request 31" ] # [ inline ( always ) ] pub fn int31 ( & self ) -> INT31_R { INT31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Interrupt Request 0" ] # [ inline ( always ) ] pub fn int0 ( & mut self ) -> INT0_W { INT0_W { w : self } } # [ doc = "Bit 1 - Interrupt Request 1" ] # [ inline ( always ) ] pub fn int1 ( & mut self ) -> INT1_W { INT1_W { w : self } } # [ doc = "Bit 2 - Interrupt Request 2" ] # [ inline ( always ) ] pub fn int2 ( & mut self ) -> INT2_W { INT2_W { w : self } } # [ doc = "Bit 3 - Interrupt Request 3" ] # [ inline ( always ) ] pub fn int3 ( & mut self ) -> INT3_W { INT3_W { w : self } } # [ doc = "Bit 4 - Interrupt Request 4" ] # [ inline ( always ) ] pub fn int4 ( & mut self ) -> INT4_W { INT4_W { w : self } } # [ doc = "Bit 5 - Interrupt Request 5" ] # [ inline ( always ) ] pub fn int5 ( & mut self ) -> INT5_W { INT5_W { w : self } } # [ doc = "Bit 6 - Interrupt Request 6" ] # [ inline ( always ) ] pub fn int6 ( & mut self ) -> INT6_W { INT6_W { w : self } } # [ doc = "Bit 7 - Interrupt Request 7" ] # [ inline ( always ) ] pub fn int7 ( & mut self ) -> INT7_W { INT7_W { w : self } } # [ doc = "Bit 8 - Interrupt Request 8" ] # [ inline ( always ) ] pub fn int8 ( & mut self ) -> INT8_W { INT8_W { w : self } } # [ doc = "Bit 9 - Interrupt Request 9" ] # [ inline ( always ) ] pub fn int9 ( & mut self ) -> INT9_W { INT9_W { w : self } } # [ doc = "Bit 10 - Interrupt Request 10" ] # [ inline ( always ) ] pub fn int10 ( & mut self ) -> INT10_W { INT10_W { w : self } } # [ doc = "Bit 11 - Interrupt Request 11" ] # [ inline ( always ) ] pub fn int11 ( & mut self ) -> INT11_W { INT11_W { w : self } } # [ doc = "Bit 12 - Interrupt Request 12" ] # [ inline ( always ) ] pub fn int12 ( & mut self ) -> INT12_W { INT12_W { w : self } } # [ doc = "Bit 13 - Interrupt Request 13" ] # [ inline ( always ) ] pub fn int13 ( & mut self ) -> INT13_W { INT13_W { w : self } } # [ doc = "Bit 14 - Interrupt Request 14" ] # [ inline ( always ) ] pub fn int14 ( & mut self ) -> INT14_W { INT14_W { w : self } } # [ doc = "Bit 15 - Interrupt Request 15" ] # [ inline ( always ) ] pub fn int15 ( & mut self ) -> INT15_W { INT15_W { w : self } } # [ doc = "Bit 16 - Interrupt Request 16" ] # [ inline ( always ) ] pub fn int16 ( & mut self ) -> INT16_W { INT16_W { w : self } } # [ doc = "Bit 17 - Interrupt Request 17" ] # [ inline ( always ) ] pub fn int17 ( & mut self ) -> INT17_W { INT17_W { w : self } } # [ doc = "Bit 18 - Interrupt Request 18" ] # [ inline ( always ) ] pub fn int18 ( & mut self ) -> INT18_W { INT18_W { w : self } } # [ doc = "Bit 19 - Interrupt Request 19" ] # [ inline ( always ) ] pub fn int19 ( & mut self ) -> INT19_W { INT19_W { w : self } } # [ doc = "Bit 20 - Interrupt Request 20" ] # [ inline ( always ) ] pub fn int20 ( & mut self ) -> INT20_W { INT20_W { w : self } } # [ doc = "Bit 21 - Interrupt Request 21" ] # [ inline ( always ) ] pub fn int21 ( & mut self ) -> INT21_W { INT21_W { w : self } } # [ doc = "Bit 22 - Interrupt Request 22" ] # [ inline ( always ) ] pub fn int22 ( & mut self ) -> INT22_W { INT22_W { w : self } } # [ doc = "Bit 23 - Interrupt Request 23" ] # [ inline ( always ) ] pub fn int23 ( & mut self ) -> INT23_W { INT23_W { w : self } } # [ doc = "Bit 24 - Interrupt Request 24" ] # [ inline ( always ) ] pub fn int24 ( & mut self ) -> INT24_W { INT24_W { w : self } } # [ doc = "Bit 25 - Interrupt Request 25" ] # [ inline ( always ) ] pub fn int25 ( & mut self ) -> INT25_W { INT25_W { w : self } } # [ doc = "Bit 26 - Interrupt Request 26" ] # [ inline ( always ) ] pub fn int26 ( & mut self ) -> INT26_W { INT26_W { w : self } } # [ doc = "Bit 27 - Interrupt Request 27" ] # [ inline ( always ) ] pub fn int27 ( & mut self ) -> INT27_W { INT27_W { w : self } } # [ doc = "Bit 28 - Interrupt Request 28" ] # [ inline ( always ) ] pub fn int28 ( & mut self ) -> INT28_W { INT28_W { w : self } } # [ doc = "Bit 29 - Interrupt Request 29" ] # [ inline ( always ) ] pub fn int29 ( & mut self ) -> INT29_W { INT29_W { w : self } } # [ doc = "Bit 30 - Interrupt Request 30" ] # [ inline ( always ) ] pub fn int30 ( & mut self ) -> INT30_W { INT30_W { w : self } } # [ doc = "Bit 31 - Interrupt Request 31" ] # [ inline ( always ) ] pub fn int31 ( & mut self ) -> INT31_W { INT31_W { w : self } } } } # [ doc = "Error Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [err](err) module" ] pub type ERR = crate :: Reg < u32 , _ERR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ERR ; # [ doc = "`read()` method returns [err::R](err::R) reader structure" ] impl crate :: Readable for ERR { } # [ doc = "`write(|w| ..)` method takes [err::W](err::W) writer structure" ] impl crate :: Writable for ERR { } # [ doc = "Error Register" ] pub mod err { # [ doc = "Reader of register ERR" ] pub type R = crate :: R < u32 , super :: ERR > ; # [ doc = "Writer for register ERR" ] pub type W = crate :: W < u32 , super :: ERR > ; # [ doc = "Register ERR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ERR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Error In Channel 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR0_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR0_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR0_A ) -> Self { match variant { ERR0_A :: _0 => false , ERR0_A :: _1 => true } } } # [ doc = "Reader of field `ERR0`" ] pub type ERR0_R = crate :: R < bool , ERR0_A > ; impl ERR0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR0_A { match self . bits { false => ERR0_A :: _0 , true => ERR0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR0_A :: _1 } } # [ doc = "Write proxy for field `ERR0`" ] pub struct ERR0_W < 'a > { w : & 'a mut W , } impl < 'a > ERR0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR0_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Error In Channel 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR1_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR1_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR1_A ) -> Self { match variant { ERR1_A :: _0 => false , ERR1_A :: _1 => true } } } # [ doc = "Reader of field `ERR1`" ] pub type ERR1_R = crate :: R < bool , ERR1_A > ; impl ERR1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR1_A { match self . bits { false => ERR1_A :: _0 , true => ERR1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR1_A :: _1 } } # [ doc = "Write proxy for field `ERR1`" ] pub struct ERR1_W < 'a > { w : & 'a mut W , } impl < 'a > ERR1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR1_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR1_A :: _1 ) } # [ 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 } } # [ doc = "Error In Channel 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR2_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR2_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR2_A ) -> Self { match variant { ERR2_A :: _0 => false , ERR2_A :: _1 => true } } } # [ doc = "Reader of field `ERR2`" ] pub type ERR2_R = crate :: R < bool , ERR2_A > ; impl ERR2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR2_A { match self . bits { false => ERR2_A :: _0 , true => ERR2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR2_A :: _1 } } # [ doc = "Write proxy for field `ERR2`" ] pub struct ERR2_W < 'a > { w : & 'a mut W , } impl < 'a > ERR2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR2_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR2_A :: _1 ) } # [ 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 = "Error In Channel 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR3_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR3_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR3_A ) -> Self { match variant { ERR3_A :: _0 => false , ERR3_A :: _1 => true } } } # [ doc = "Reader of field `ERR3`" ] pub type ERR3_R = crate :: R < bool , ERR3_A > ; impl ERR3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR3_A { match self . bits { false => ERR3_A :: _0 , true => ERR3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR3_A :: _1 } } # [ doc = "Write proxy for field `ERR3`" ] pub struct ERR3_W < 'a > { w : & 'a mut W , } impl < 'a > ERR3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR3_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Error In Channel 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR4_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR4_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR4_A ) -> Self { match variant { ERR4_A :: _0 => false , ERR4_A :: _1 => true } } } # [ doc = "Reader of field `ERR4`" ] pub type ERR4_R = crate :: R < bool , ERR4_A > ; impl ERR4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR4_A { match self . bits { false => ERR4_A :: _0 , true => ERR4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR4_A :: _1 } } # [ doc = "Write proxy for field `ERR4`" ] pub struct ERR4_W < 'a > { w : & 'a mut W , } impl < 'a > ERR4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR4_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Error In Channel 5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR5_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR5_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR5_A ) -> Self { match variant { ERR5_A :: _0 => false , ERR5_A :: _1 => true } } } # [ doc = "Reader of field `ERR5`" ] pub type ERR5_R = crate :: R < bool , ERR5_A > ; impl ERR5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR5_A { match self . bits { false => ERR5_A :: _0 , true => ERR5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR5_A :: _1 } } # [ doc = "Write proxy for field `ERR5`" ] pub struct ERR5_W < 'a > { w : & 'a mut W , } impl < 'a > ERR5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR5_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR5_A :: _1 ) } # [ 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 = "Error In Channel 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR6_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR6_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR6_A ) -> Self { match variant { ERR6_A :: _0 => false , ERR6_A :: _1 => true } } } # [ doc = "Reader of field `ERR6`" ] pub type ERR6_R = crate :: R < bool , ERR6_A > ; impl ERR6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR6_A { match self . bits { false => ERR6_A :: _0 , true => ERR6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR6_A :: _1 } } # [ doc = "Write proxy for field `ERR6`" ] pub struct ERR6_W < 'a > { w : & 'a mut W , } impl < 'a > ERR6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR6_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR6_A :: _1 ) } # [ 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 = "Error In Channel 7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR7_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR7_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR7_A ) -> Self { match variant { ERR7_A :: _0 => false , ERR7_A :: _1 => true } } } # [ doc = "Reader of field `ERR7`" ] pub type ERR7_R = crate :: R < bool , ERR7_A > ; impl ERR7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR7_A { match self . bits { false => ERR7_A :: _0 , true => ERR7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR7_A :: _1 } } # [ doc = "Write proxy for field `ERR7`" ] pub struct ERR7_W < 'a > { w : & 'a mut W , } impl < 'a > ERR7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR7_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR7_A :: _1 ) } # [ 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 = "Error In Channel 8\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR8_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR8_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR8_A ) -> Self { match variant { ERR8_A :: _0 => false , ERR8_A :: _1 => true } } } # [ doc = "Reader of field `ERR8`" ] pub type ERR8_R = crate :: R < bool , ERR8_A > ; impl ERR8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR8_A { match self . bits { false => ERR8_A :: _0 , true => ERR8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR8_A :: _1 } } # [ doc = "Write proxy for field `ERR8`" ] pub struct ERR8_W < 'a > { w : & 'a mut W , } impl < 'a > ERR8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR8_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Error In Channel 9\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR9_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR9_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR9_A ) -> Self { match variant { ERR9_A :: _0 => false , ERR9_A :: _1 => true } } } # [ doc = "Reader of field `ERR9`" ] pub type ERR9_R = crate :: R < bool , ERR9_A > ; impl ERR9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR9_A { match self . bits { false => ERR9_A :: _0 , true => ERR9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR9_A :: _1 } } # [ doc = "Write proxy for field `ERR9`" ] pub struct ERR9_W < 'a > { w : & 'a mut W , } impl < 'a > ERR9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR9_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Error In Channel 10\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR10_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR10_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR10_A ) -> Self { match variant { ERR10_A :: _0 => false , ERR10_A :: _1 => true } } } # [ doc = "Reader of field `ERR10`" ] pub type ERR10_R = crate :: R < bool , ERR10_A > ; impl ERR10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR10_A { match self . bits { false => ERR10_A :: _0 , true => ERR10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR10_A :: _1 } } # [ doc = "Write proxy for field `ERR10`" ] pub struct ERR10_W < 'a > { w : & 'a mut W , } impl < 'a > ERR10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR10_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Error In Channel 11\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR11_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR11_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR11_A ) -> Self { match variant { ERR11_A :: _0 => false , ERR11_A :: _1 => true } } } # [ doc = "Reader of field `ERR11`" ] pub type ERR11_R = crate :: R < bool , ERR11_A > ; impl ERR11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR11_A { match self . bits { false => ERR11_A :: _0 , true => ERR11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR11_A :: _1 } } # [ doc = "Write proxy for field `ERR11`" ] pub struct ERR11_W < 'a > { w : & 'a mut W , } impl < 'a > ERR11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR11_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Error In Channel 12\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR12_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR12_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR12_A ) -> Self { match variant { ERR12_A :: _0 => false , ERR12_A :: _1 => true } } } # [ doc = "Reader of field `ERR12`" ] pub type ERR12_R = crate :: R < bool , ERR12_A > ; impl ERR12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR12_A { match self . bits { false => ERR12_A :: _0 , true => ERR12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR12_A :: _1 } } # [ doc = "Write proxy for field `ERR12`" ] pub struct ERR12_W < 'a > { w : & 'a mut W , } impl < 'a > ERR12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR12_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Error In Channel 13\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR13_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR13_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR13_A ) -> Self { match variant { ERR13_A :: _0 => false , ERR13_A :: _1 => true } } } # [ doc = "Reader of field `ERR13`" ] pub type ERR13_R = crate :: R < bool , ERR13_A > ; impl ERR13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR13_A { match self . bits { false => ERR13_A :: _0 , true => ERR13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR13_A :: _1 } } # [ doc = "Write proxy for field `ERR13`" ] pub struct ERR13_W < 'a > { w : & 'a mut W , } impl < 'a > ERR13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR13_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR13_A :: _1 ) } # [ 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 = "Error In Channel 14\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR14_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR14_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR14_A ) -> Self { match variant { ERR14_A :: _0 => false , ERR14_A :: _1 => true } } } # [ doc = "Reader of field `ERR14`" ] pub type ERR14_R = crate :: R < bool , ERR14_A > ; impl ERR14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR14_A { match self . bits { false => ERR14_A :: _0 , true => ERR14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR14_A :: _1 } } # [ doc = "Write proxy for field `ERR14`" ] pub struct ERR14_W < 'a > { w : & 'a mut W , } impl < 'a > ERR14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR14_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Error In Channel 15\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR15_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR15_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR15_A ) -> Self { match variant { ERR15_A :: _0 => false , ERR15_A :: _1 => true } } } # [ doc = "Reader of field `ERR15`" ] pub type ERR15_R = crate :: R < bool , ERR15_A > ; impl ERR15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR15_A { match self . bits { false => ERR15_A :: _0 , true => ERR15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR15_A :: _1 } } # [ doc = "Write proxy for field `ERR15`" ] pub struct ERR15_W < 'a > { w : & 'a mut W , } impl < 'a > ERR15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR15_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Error In Channel 16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR16_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR16_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR16_A ) -> Self { match variant { ERR16_A :: _0 => false , ERR16_A :: _1 => true } } } # [ doc = "Reader of field `ERR16`" ] pub type ERR16_R = crate :: R < bool , ERR16_A > ; impl ERR16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR16_A { match self . bits { false => ERR16_A :: _0 , true => ERR16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR16_A :: _1 } } # [ doc = "Write proxy for field `ERR16`" ] pub struct ERR16_W < 'a > { w : & 'a mut W , } impl < 'a > ERR16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR16_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Error In Channel 17\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR17_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR17_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR17_A ) -> Self { match variant { ERR17_A :: _0 => false , ERR17_A :: _1 => true } } } # [ doc = "Reader of field `ERR17`" ] pub type ERR17_R = crate :: R < bool , ERR17_A > ; impl ERR17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR17_A { match self . bits { false => ERR17_A :: _0 , true => ERR17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR17_A :: _1 } } # [ doc = "Write proxy for field `ERR17`" ] pub struct ERR17_W < 'a > { w : & 'a mut W , } impl < 'a > ERR17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR17_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Error In Channel 18\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR18_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR18_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR18_A ) -> Self { match variant { ERR18_A :: _0 => false , ERR18_A :: _1 => true } } } # [ doc = "Reader of field `ERR18`" ] pub type ERR18_R = crate :: R < bool , ERR18_A > ; impl ERR18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR18_A { match self . bits { false => ERR18_A :: _0 , true => ERR18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR18_A :: _1 } } # [ doc = "Write proxy for field `ERR18`" ] pub struct ERR18_W < 'a > { w : & 'a mut W , } impl < 'a > ERR18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR18_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Error In Channel 19\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR19_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR19_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR19_A ) -> Self { match variant { ERR19_A :: _0 => false , ERR19_A :: _1 => true } } } # [ doc = "Reader of field `ERR19`" ] pub type ERR19_R = crate :: R < bool , ERR19_A > ; impl ERR19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR19_A { match self . bits { false => ERR19_A :: _0 , true => ERR19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR19_A :: _1 } } # [ doc = "Write proxy for field `ERR19`" ] pub struct ERR19_W < 'a > { w : & 'a mut W , } impl < 'a > ERR19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR19_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Error In Channel 20\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR20_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR20_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR20_A ) -> Self { match variant { ERR20_A :: _0 => false , ERR20_A :: _1 => true } } } # [ doc = "Reader of field `ERR20`" ] pub type ERR20_R = crate :: R < bool , ERR20_A > ; impl ERR20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR20_A { match self . bits { false => ERR20_A :: _0 , true => ERR20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR20_A :: _1 } } # [ doc = "Write proxy for field `ERR20`" ] pub struct ERR20_W < 'a > { w : & 'a mut W , } impl < 'a > ERR20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR20_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR20_A :: _1 ) } # [ 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 = "Error In Channel 21\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR21_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR21_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR21_A ) -> Self { match variant { ERR21_A :: _0 => false , ERR21_A :: _1 => true } } } # [ doc = "Reader of field `ERR21`" ] pub type ERR21_R = crate :: R < bool , ERR21_A > ; impl ERR21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR21_A { match self . bits { false => ERR21_A :: _0 , true => ERR21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR21_A :: _1 } } # [ doc = "Write proxy for field `ERR21`" ] pub struct ERR21_W < 'a > { w : & 'a mut W , } impl < 'a > ERR21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR21_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR21_A :: _1 ) } # [ 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 = "Error In Channel 22\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR22_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR22_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR22_A ) -> Self { match variant { ERR22_A :: _0 => false , ERR22_A :: _1 => true } } } # [ doc = "Reader of field `ERR22`" ] pub type ERR22_R = crate :: R < bool , ERR22_A > ; impl ERR22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR22_A { match self . bits { false => ERR22_A :: _0 , true => ERR22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR22_A :: _1 } } # [ doc = "Write proxy for field `ERR22`" ] pub struct ERR22_W < 'a > { w : & 'a mut W , } impl < 'a > ERR22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR22_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Error In Channel 23\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR23_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR23_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR23_A ) -> Self { match variant { ERR23_A :: _0 => false , ERR23_A :: _1 => true } } } # [ doc = "Reader of field `ERR23`" ] pub type ERR23_R = crate :: R < bool , ERR23_A > ; impl ERR23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR23_A { match self . bits { false => ERR23_A :: _0 , true => ERR23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR23_A :: _1 } } # [ doc = "Write proxy for field `ERR23`" ] pub struct ERR23_W < 'a > { w : & 'a mut W , } impl < 'a > ERR23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR23_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Error In Channel 24\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR24_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR24_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR24_A ) -> Self { match variant { ERR24_A :: _0 => false , ERR24_A :: _1 => true } } } # [ doc = "Reader of field `ERR24`" ] pub type ERR24_R = crate :: R < bool , ERR24_A > ; impl ERR24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR24_A { match self . bits { false => ERR24_A :: _0 , true => ERR24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR24_A :: _1 } } # [ doc = "Write proxy for field `ERR24`" ] pub struct ERR24_W < 'a > { w : & 'a mut W , } impl < 'a > ERR24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR24_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR24_A :: _1 ) } # [ 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 = "Error In Channel 25\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR25_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR25_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR25_A ) -> Self { match variant { ERR25_A :: _0 => false , ERR25_A :: _1 => true } } } # [ doc = "Reader of field `ERR25`" ] pub type ERR25_R = crate :: R < bool , ERR25_A > ; impl ERR25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR25_A { match self . bits { false => ERR25_A :: _0 , true => ERR25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR25_A :: _1 } } # [ doc = "Write proxy for field `ERR25`" ] pub struct ERR25_W < 'a > { w : & 'a mut W , } impl < 'a > ERR25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR25_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR25_A :: _1 ) } # [ 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 = "Error In Channel 26\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR26_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR26_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR26_A ) -> Self { match variant { ERR26_A :: _0 => false , ERR26_A :: _1 => true } } } # [ doc = "Reader of field `ERR26`" ] pub type ERR26_R = crate :: R < bool , ERR26_A > ; impl ERR26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR26_A { match self . bits { false => ERR26_A :: _0 , true => ERR26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR26_A :: _1 } } # [ doc = "Write proxy for field `ERR26`" ] pub struct ERR26_W < 'a > { w : & 'a mut W , } impl < 'a > ERR26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR26_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR26_A :: _1 ) } # [ 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 = "Error In Channel 27\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR27_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR27_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR27_A ) -> Self { match variant { ERR27_A :: _0 => false , ERR27_A :: _1 => true } } } # [ doc = "Reader of field `ERR27`" ] pub type ERR27_R = crate :: R < bool , ERR27_A > ; impl ERR27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR27_A { match self . bits { false => ERR27_A :: _0 , true => ERR27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR27_A :: _1 } } # [ doc = "Write proxy for field `ERR27`" ] pub struct ERR27_W < 'a > { w : & 'a mut W , } impl < 'a > ERR27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR27_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Error In Channel 28\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR28_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR28_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR28_A ) -> Self { match variant { ERR28_A :: _0 => false , ERR28_A :: _1 => true } } } # [ doc = "Reader of field `ERR28`" ] pub type ERR28_R = crate :: R < bool , ERR28_A > ; impl ERR28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR28_A { match self . bits { false => ERR28_A :: _0 , true => ERR28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR28_A :: _1 } } # [ doc = "Write proxy for field `ERR28`" ] pub struct ERR28_W < 'a > { w : & 'a mut W , } impl < 'a > ERR28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR28_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Error In Channel 29\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR29_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR29_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR29_A ) -> Self { match variant { ERR29_A :: _0 => false , ERR29_A :: _1 => true } } } # [ doc = "Reader of field `ERR29`" ] pub type ERR29_R = crate :: R < bool , ERR29_A > ; impl ERR29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR29_A { match self . bits { false => ERR29_A :: _0 , true => ERR29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR29_A :: _1 } } # [ doc = "Write proxy for field `ERR29`" ] pub struct ERR29_W < 'a > { w : & 'a mut W , } impl < 'a > ERR29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR29_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Error In Channel 30\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR30_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR30_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR30_A ) -> Self { match variant { ERR30_A :: _0 => false , ERR30_A :: _1 => true } } } # [ doc = "Reader of field `ERR30`" ] pub type ERR30_R = crate :: R < bool , ERR30_A > ; impl ERR30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR30_A { match self . bits { false => ERR30_A :: _0 , true => ERR30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR30_A :: _1 } } # [ doc = "Write proxy for field `ERR30`" ] pub struct ERR30_W < 'a > { w : & 'a mut W , } impl < 'a > ERR30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR30_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Error In Channel 31\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR31_A { # [ doc = "0: An error in this channel has not occurred" ] _0 , # [ doc = "1: An error in this channel has occurred" ] _1 } impl From < ERR31_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR31_A ) -> Self { match variant { ERR31_A :: _0 => false , ERR31_A :: _1 => true } } } # [ doc = "Reader of field `ERR31`" ] pub type ERR31_R = crate :: R < bool , ERR31_A > ; impl ERR31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR31_A { match self . bits { false => ERR31_A :: _0 , true => ERR31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR31_A :: _1 } } # [ doc = "Write proxy for field `ERR31`" ] pub struct ERR31_W < 'a > { w : & 'a mut W , } impl < 'a > ERR31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An error in this channel has not occurred" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR31_A :: _0 ) } # [ doc = "An error in this channel has occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Error In Channel 0" ] # [ inline ( always ) ] pub fn err0 ( & self ) -> ERR0_R { ERR0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Error In Channel 1" ] # [ inline ( always ) ] pub fn err1 ( & self ) -> ERR1_R { ERR1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Error In Channel 2" ] # [ inline ( always ) ] pub fn err2 ( & self ) -> ERR2_R { ERR2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Error In Channel 3" ] # [ inline ( always ) ] pub fn err3 ( & self ) -> ERR3_R { ERR3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Error In Channel 4" ] # [ inline ( always ) ] pub fn err4 ( & self ) -> ERR4_R { ERR4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Error In Channel 5" ] # [ inline ( always ) ] pub fn err5 ( & self ) -> ERR5_R { ERR5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Error In Channel 6" ] # [ inline ( always ) ] pub fn err6 ( & self ) -> ERR6_R { ERR6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Error In Channel 7" ] # [ inline ( always ) ] pub fn err7 ( & self ) -> ERR7_R { ERR7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Error In Channel 8" ] # [ inline ( always ) ] pub fn err8 ( & self ) -> ERR8_R { ERR8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Error In Channel 9" ] # [ inline ( always ) ] pub fn err9 ( & self ) -> ERR9_R { ERR9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Error In Channel 10" ] # [ inline ( always ) ] pub fn err10 ( & self ) -> ERR10_R { ERR10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Error In Channel 11" ] # [ inline ( always ) ] pub fn err11 ( & self ) -> ERR11_R { ERR11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Error In Channel 12" ] # [ inline ( always ) ] pub fn err12 ( & self ) -> ERR12_R { ERR12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Error In Channel 13" ] # [ inline ( always ) ] pub fn err13 ( & self ) -> ERR13_R { ERR13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Error In Channel 14" ] # [ inline ( always ) ] pub fn err14 ( & self ) -> ERR14_R { ERR14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Error In Channel 15" ] # [ inline ( always ) ] pub fn err15 ( & self ) -> ERR15_R { ERR15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Error In Channel 16" ] # [ inline ( always ) ] pub fn err16 ( & self ) -> ERR16_R { ERR16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Error In Channel 17" ] # [ inline ( always ) ] pub fn err17 ( & self ) -> ERR17_R { ERR17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Error In Channel 18" ] # [ inline ( always ) ] pub fn err18 ( & self ) -> ERR18_R { ERR18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Error In Channel 19" ] # [ inline ( always ) ] pub fn err19 ( & self ) -> ERR19_R { ERR19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Error In Channel 20" ] # [ inline ( always ) ] pub fn err20 ( & self ) -> ERR20_R { ERR20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Error In Channel 21" ] # [ inline ( always ) ] pub fn err21 ( & self ) -> ERR21_R { ERR21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Error In Channel 22" ] # [ inline ( always ) ] pub fn err22 ( & self ) -> ERR22_R { ERR22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Error In Channel 23" ] # [ inline ( always ) ] pub fn err23 ( & self ) -> ERR23_R { ERR23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Error In Channel 24" ] # [ inline ( always ) ] pub fn err24 ( & self ) -> ERR24_R { ERR24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Error In Channel 25" ] # [ inline ( always ) ] pub fn err25 ( & self ) -> ERR25_R { ERR25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Error In Channel 26" ] # [ inline ( always ) ] pub fn err26 ( & self ) -> ERR26_R { ERR26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Error In Channel 27" ] # [ inline ( always ) ] pub fn err27 ( & self ) -> ERR27_R { ERR27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Error In Channel 28" ] # [ inline ( always ) ] pub fn err28 ( & self ) -> ERR28_R { ERR28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Error In Channel 29" ] # [ inline ( always ) ] pub fn err29 ( & self ) -> ERR29_R { ERR29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Error In Channel 30" ] # [ inline ( always ) ] pub fn err30 ( & self ) -> ERR30_R { ERR30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Error In Channel 31" ] # [ inline ( always ) ] pub fn err31 ( & self ) -> ERR31_R { ERR31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Error In Channel 0" ] # [ inline ( always ) ] pub fn err0 ( & mut self ) -> ERR0_W { ERR0_W { w : self } } # [ doc = "Bit 1 - Error In Channel 1" ] # [ inline ( always ) ] pub fn err1 ( & mut self ) -> ERR1_W { ERR1_W { w : self } } # [ doc = "Bit 2 - Error In Channel 2" ] # [ inline ( always ) ] pub fn err2 ( & mut self ) -> ERR2_W { ERR2_W { w : self } } # [ doc = "Bit 3 - Error In Channel 3" ] # [ inline ( always ) ] pub fn err3 ( & mut self ) -> ERR3_W { ERR3_W { w : self } } # [ doc = "Bit 4 - Error In Channel 4" ] # [ inline ( always ) ] pub fn err4 ( & mut self ) -> ERR4_W { ERR4_W { w : self } } # [ doc = "Bit 5 - Error In Channel 5" ] # [ inline ( always ) ] pub fn err5 ( & mut self ) -> ERR5_W { ERR5_W { w : self } } # [ doc = "Bit 6 - Error In Channel 6" ] # [ inline ( always ) ] pub fn err6 ( & mut self ) -> ERR6_W { ERR6_W { w : self } } # [ doc = "Bit 7 - Error In Channel 7" ] # [ inline ( always ) ] pub fn err7 ( & mut self ) -> ERR7_W { ERR7_W { w : self } } # [ doc = "Bit 8 - Error In Channel 8" ] # [ inline ( always ) ] pub fn err8 ( & mut self ) -> ERR8_W { ERR8_W { w : self } } # [ doc = "Bit 9 - Error In Channel 9" ] # [ inline ( always ) ] pub fn err9 ( & mut self ) -> ERR9_W { ERR9_W { w : self } } # [ doc = "Bit 10 - Error In Channel 10" ] # [ inline ( always ) ] pub fn err10 ( & mut self ) -> ERR10_W { ERR10_W { w : self } } # [ doc = "Bit 11 - Error In Channel 11" ] # [ inline ( always ) ] pub fn err11 ( & mut self ) -> ERR11_W { ERR11_W { w : self } } # [ doc = "Bit 12 - Error In Channel 12" ] # [ inline ( always ) ] pub fn err12 ( & mut self ) -> ERR12_W { ERR12_W { w : self } } # [ doc = "Bit 13 - Error In Channel 13" ] # [ inline ( always ) ] pub fn err13 ( & mut self ) -> ERR13_W { ERR13_W { w : self } } # [ doc = "Bit 14 - Error In Channel 14" ] # [ inline ( always ) ] pub fn err14 ( & mut self ) -> ERR14_W { ERR14_W { w : self } } # [ doc = "Bit 15 - Error In Channel 15" ] # [ inline ( always ) ] pub fn err15 ( & mut self ) -> ERR15_W { ERR15_W { w : self } } # [ doc = "Bit 16 - Error In Channel 16" ] # [ inline ( always ) ] pub fn err16 ( & mut self ) -> ERR16_W { ERR16_W { w : self } } # [ doc = "Bit 17 - Error In Channel 17" ] # [ inline ( always ) ] pub fn err17 ( & mut self ) -> ERR17_W { ERR17_W { w : self } } # [ doc = "Bit 18 - Error In Channel 18" ] # [ inline ( always ) ] pub fn err18 ( & mut self ) -> ERR18_W { ERR18_W { w : self } } # [ doc = "Bit 19 - Error In Channel 19" ] # [ inline ( always ) ] pub fn err19 ( & mut self ) -> ERR19_W { ERR19_W { w : self } } # [ doc = "Bit 20 - Error In Channel 20" ] # [ inline ( always ) ] pub fn err20 ( & mut self ) -> ERR20_W { ERR20_W { w : self } } # [ doc = "Bit 21 - Error In Channel 21" ] # [ inline ( always ) ] pub fn err21 ( & mut self ) -> ERR21_W { ERR21_W { w : self } } # [ doc = "Bit 22 - Error In Channel 22" ] # [ inline ( always ) ] pub fn err22 ( & mut self ) -> ERR22_W { ERR22_W { w : self } } # [ doc = "Bit 23 - Error In Channel 23" ] # [ inline ( always ) ] pub fn err23 ( & mut self ) -> ERR23_W { ERR23_W { w : self } } # [ doc = "Bit 24 - Error In Channel 24" ] # [ inline ( always ) ] pub fn err24 ( & mut self ) -> ERR24_W { ERR24_W { w : self } } # [ doc = "Bit 25 - Error In Channel 25" ] # [ inline ( always ) ] pub fn err25 ( & mut self ) -> ERR25_W { ERR25_W { w : self } } # [ doc = "Bit 26 - Error In Channel 26" ] # [ inline ( always ) ] pub fn err26 ( & mut self ) -> ERR26_W { ERR26_W { w : self } } # [ doc = "Bit 27 - Error In Channel 27" ] # [ inline ( always ) ] pub fn err27 ( & mut self ) -> ERR27_W { ERR27_W { w : self } } # [ doc = "Bit 28 - Error In Channel 28" ] # [ inline ( always ) ] pub fn err28 ( & mut self ) -> ERR28_W { ERR28_W { w : self } } # [ doc = "Bit 29 - Error In Channel 29" ] # [ inline ( always ) ] pub fn err29 ( & mut self ) -> ERR29_W { ERR29_W { w : self } } # [ doc = "Bit 30 - Error In Channel 30" ] # [ inline ( always ) ] pub fn err30 ( & mut self ) -> ERR30_W { ERR30_W { w : self } } # [ doc = "Bit 31 - Error In Channel 31" ] # [ inline ( always ) ] pub fn err31 ( & mut self ) -> ERR31_W { ERR31_W { w : self } } } } # [ doc = "Hardware Request Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hrs](hrs) module" ] pub type HRS = crate :: Reg < u32 , _HRS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HRS ; # [ doc = "`read()` method returns [hrs::R](hrs::R) reader structure" ] impl crate :: Readable for HRS { } # [ doc = "Hardware Request Status Register" ] pub mod hrs { # [ doc = "Reader of register HRS" ] pub type R = crate :: R < u32 , super :: HRS > ; # [ doc = "Hardware Request Status Channel 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS0_A { # [ doc = "0: A hardware service request for channel 0 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 0 is present" ] _1 } impl From < HRS0_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS0_A ) -> Self { match variant { HRS0_A :: _0 => false , HRS0_A :: _1 => true } } } # [ doc = "Reader of field `HRS0`" ] pub type HRS0_R = crate :: R < bool , HRS0_A > ; impl HRS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS0_A { match self . bits { false => HRS0_A :: _0 , true => HRS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS0_A :: _1 } } # [ doc = "Hardware Request Status Channel 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS1_A { # [ doc = "0: A hardware service request for channel 1 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 1 is present" ] _1 } impl From < HRS1_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS1_A ) -> Self { match variant { HRS1_A :: _0 => false , HRS1_A :: _1 => true } } } # [ doc = "Reader of field `HRS1`" ] pub type HRS1_R = crate :: R < bool , HRS1_A > ; impl HRS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS1_A { match self . bits { false => HRS1_A :: _0 , true => HRS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS1_A :: _1 } } # [ doc = "Hardware Request Status Channel 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS2_A { # [ doc = "0: A hardware service request for channel 2 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 2 is present" ] _1 } impl From < HRS2_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS2_A ) -> Self { match variant { HRS2_A :: _0 => false , HRS2_A :: _1 => true } } } # [ doc = "Reader of field `HRS2`" ] pub type HRS2_R = crate :: R < bool , HRS2_A > ; impl HRS2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS2_A { match self . bits { false => HRS2_A :: _0 , true => HRS2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS2_A :: _1 } } # [ doc = "Hardware Request Status Channel 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS3_A { # [ doc = "0: A hardware service request for channel 3 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 3 is present" ] _1 } impl From < HRS3_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS3_A ) -> Self { match variant { HRS3_A :: _0 => false , HRS3_A :: _1 => true } } } # [ doc = "Reader of field `HRS3`" ] pub type HRS3_R = crate :: R < bool , HRS3_A > ; impl HRS3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS3_A { match self . bits { false => HRS3_A :: _0 , true => HRS3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS3_A :: _1 } } # [ doc = "Hardware Request Status Channel 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS4_A { # [ doc = "0: A hardware service request for channel 4 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 4 is present" ] _1 } impl From < HRS4_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS4_A ) -> Self { match variant { HRS4_A :: _0 => false , HRS4_A :: _1 => true } } } # [ doc = "Reader of field `HRS4`" ] pub type HRS4_R = crate :: R < bool , HRS4_A > ; impl HRS4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS4_A { match self . bits { false => HRS4_A :: _0 , true => HRS4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS4_A :: _1 } } # [ doc = "Hardware Request Status Channel 5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS5_A { # [ doc = "0: A hardware service request for channel 5 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 5 is present" ] _1 } impl From < HRS5_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS5_A ) -> Self { match variant { HRS5_A :: _0 => false , HRS5_A :: _1 => true } } } # [ doc = "Reader of field `HRS5`" ] pub type HRS5_R = crate :: R < bool , HRS5_A > ; impl HRS5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS5_A { match self . bits { false => HRS5_A :: _0 , true => HRS5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS5_A :: _1 } } # [ doc = "Hardware Request Status Channel 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS6_A { # [ doc = "0: A hardware service request for channel 6 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 6 is present" ] _1 } impl From < HRS6_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS6_A ) -> Self { match variant { HRS6_A :: _0 => false , HRS6_A :: _1 => true } } } # [ doc = "Reader of field `HRS6`" ] pub type HRS6_R = crate :: R < bool , HRS6_A > ; impl HRS6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS6_A { match self . bits { false => HRS6_A :: _0 , true => HRS6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS6_A :: _1 } } # [ doc = "Hardware Request Status Channel 7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS7_A { # [ doc = "0: A hardware service request for channel 7 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 7 is present" ] _1 } impl From < HRS7_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS7_A ) -> Self { match variant { HRS7_A :: _0 => false , HRS7_A :: _1 => true } } } # [ doc = "Reader of field `HRS7`" ] pub type HRS7_R = crate :: R < bool , HRS7_A > ; impl HRS7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS7_A { match self . bits { false => HRS7_A :: _0 , true => HRS7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS7_A :: _1 } } # [ doc = "Hardware Request Status Channel 8\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS8_A { # [ doc = "0: A hardware service request for channel 8 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 8 is present" ] _1 } impl From < HRS8_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS8_A ) -> Self { match variant { HRS8_A :: _0 => false , HRS8_A :: _1 => true } } } # [ doc = "Reader of field `HRS8`" ] pub type HRS8_R = crate :: R < bool , HRS8_A > ; impl HRS8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS8_A { match self . bits { false => HRS8_A :: _0 , true => HRS8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS8_A :: _1 } } # [ doc = "Hardware Request Status Channel 9\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS9_A { # [ doc = "0: A hardware service request for channel 9 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 9 is present" ] _1 } impl From < HRS9_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS9_A ) -> Self { match variant { HRS9_A :: _0 => false , HRS9_A :: _1 => true } } } # [ doc = "Reader of field `HRS9`" ] pub type HRS9_R = crate :: R < bool , HRS9_A > ; impl HRS9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS9_A { match self . bits { false => HRS9_A :: _0 , true => HRS9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS9_A :: _1 } } # [ doc = "Hardware Request Status Channel 10\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS10_A { # [ doc = "0: A hardware service request for channel 10 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 10 is present" ] _1 } impl From < HRS10_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS10_A ) -> Self { match variant { HRS10_A :: _0 => false , HRS10_A :: _1 => true } } } # [ doc = "Reader of field `HRS10`" ] pub type HRS10_R = crate :: R < bool , HRS10_A > ; impl HRS10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS10_A { match self . bits { false => HRS10_A :: _0 , true => HRS10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS10_A :: _1 } } # [ doc = "Hardware Request Status Channel 11\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS11_A { # [ doc = "0: A hardware service request for channel 11 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 11 is present" ] _1 } impl From < HRS11_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS11_A ) -> Self { match variant { HRS11_A :: _0 => false , HRS11_A :: _1 => true } } } # [ doc = "Reader of field `HRS11`" ] pub type HRS11_R = crate :: R < bool , HRS11_A > ; impl HRS11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS11_A { match self . bits { false => HRS11_A :: _0 , true => HRS11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS11_A :: _1 } } # [ doc = "Hardware Request Status Channel 12\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS12_A { # [ doc = "0: A hardware service request for channel 12 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 12 is present" ] _1 } impl From < HRS12_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS12_A ) -> Self { match variant { HRS12_A :: _0 => false , HRS12_A :: _1 => true } } } # [ doc = "Reader of field `HRS12`" ] pub type HRS12_R = crate :: R < bool , HRS12_A > ; impl HRS12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS12_A { match self . bits { false => HRS12_A :: _0 , true => HRS12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS12_A :: _1 } } # [ doc = "Hardware Request Status Channel 13\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS13_A { # [ doc = "0: A hardware service request for channel 13 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 13 is present" ] _1 } impl From < HRS13_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS13_A ) -> Self { match variant { HRS13_A :: _0 => false , HRS13_A :: _1 => true } } } # [ doc = "Reader of field `HRS13`" ] pub type HRS13_R = crate :: R < bool , HRS13_A > ; impl HRS13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS13_A { match self . bits { false => HRS13_A :: _0 , true => HRS13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS13_A :: _1 } } # [ doc = "Hardware Request Status Channel 14\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS14_A { # [ doc = "0: A hardware service request for channel 14 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 14 is present" ] _1 } impl From < HRS14_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS14_A ) -> Self { match variant { HRS14_A :: _0 => false , HRS14_A :: _1 => true } } } # [ doc = "Reader of field `HRS14`" ] pub type HRS14_R = crate :: R < bool , HRS14_A > ; impl HRS14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS14_A { match self . bits { false => HRS14_A :: _0 , true => HRS14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS14_A :: _1 } } # [ doc = "Hardware Request Status Channel 15\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS15_A { # [ doc = "0: A hardware service request for channel 15 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 15 is present" ] _1 } impl From < HRS15_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS15_A ) -> Self { match variant { HRS15_A :: _0 => false , HRS15_A :: _1 => true } } } # [ doc = "Reader of field `HRS15`" ] pub type HRS15_R = crate :: R < bool , HRS15_A > ; impl HRS15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS15_A { match self . bits { false => HRS15_A :: _0 , true => HRS15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS15_A :: _1 } } # [ doc = "Hardware Request Status Channel 16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS16_A { # [ doc = "0: A hardware service request for channel 16 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 16 is present" ] _1 } impl From < HRS16_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS16_A ) -> Self { match variant { HRS16_A :: _0 => false , HRS16_A :: _1 => true } } } # [ doc = "Reader of field `HRS16`" ] pub type HRS16_R = crate :: R < bool , HRS16_A > ; impl HRS16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS16_A { match self . bits { false => HRS16_A :: _0 , true => HRS16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS16_A :: _1 } } # [ doc = "Hardware Request Status Channel 17\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS17_A { # [ doc = "0: A hardware service request for channel 17 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 17 is present" ] _1 } impl From < HRS17_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS17_A ) -> Self { match variant { HRS17_A :: _0 => false , HRS17_A :: _1 => true } } } # [ doc = "Reader of field `HRS17`" ] pub type HRS17_R = crate :: R < bool , HRS17_A > ; impl HRS17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS17_A { match self . bits { false => HRS17_A :: _0 , true => HRS17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS17_A :: _1 } } # [ doc = "Hardware Request Status Channel 18\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS18_A { # [ doc = "0: A hardware service request for channel 18 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 18 is present" ] _1 } impl From < HRS18_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS18_A ) -> Self { match variant { HRS18_A :: _0 => false , HRS18_A :: _1 => true } } } # [ doc = "Reader of field `HRS18`" ] pub type HRS18_R = crate :: R < bool , HRS18_A > ; impl HRS18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS18_A { match self . bits { false => HRS18_A :: _0 , true => HRS18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS18_A :: _1 } } # [ doc = "Hardware Request Status Channel 19\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS19_A { # [ doc = "0: A hardware service request for channel 19 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 19 is present" ] _1 } impl From < HRS19_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS19_A ) -> Self { match variant { HRS19_A :: _0 => false , HRS19_A :: _1 => true } } } # [ doc = "Reader of field `HRS19`" ] pub type HRS19_R = crate :: R < bool , HRS19_A > ; impl HRS19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS19_A { match self . bits { false => HRS19_A :: _0 , true => HRS19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS19_A :: _1 } } # [ doc = "Hardware Request Status Channel 20\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS20_A { # [ doc = "0: A hardware service request for channel 20 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 20 is present" ] _1 } impl From < HRS20_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS20_A ) -> Self { match variant { HRS20_A :: _0 => false , HRS20_A :: _1 => true } } } # [ doc = "Reader of field `HRS20`" ] pub type HRS20_R = crate :: R < bool , HRS20_A > ; impl HRS20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS20_A { match self . bits { false => HRS20_A :: _0 , true => HRS20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS20_A :: _1 } } # [ doc = "Hardware Request Status Channel 21\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS21_A { # [ doc = "0: A hardware service request for channel 21 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 21 is present" ] _1 } impl From < HRS21_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS21_A ) -> Self { match variant { HRS21_A :: _0 => false , HRS21_A :: _1 => true } } } # [ doc = "Reader of field `HRS21`" ] pub type HRS21_R = crate :: R < bool , HRS21_A > ; impl HRS21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS21_A { match self . bits { false => HRS21_A :: _0 , true => HRS21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS21_A :: _1 } } # [ doc = "Hardware Request Status Channel 22\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS22_A { # [ doc = "0: A hardware service request for channel 22 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 22 is present" ] _1 } impl From < HRS22_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS22_A ) -> Self { match variant { HRS22_A :: _0 => false , HRS22_A :: _1 => true } } } # [ doc = "Reader of field `HRS22`" ] pub type HRS22_R = crate :: R < bool , HRS22_A > ; impl HRS22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS22_A { match self . bits { false => HRS22_A :: _0 , true => HRS22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS22_A :: _1 } } # [ doc = "Hardware Request Status Channel 23\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS23_A { # [ doc = "0: A hardware service request for channel 23 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 23 is present" ] _1 } impl From < HRS23_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS23_A ) -> Self { match variant { HRS23_A :: _0 => false , HRS23_A :: _1 => true } } } # [ doc = "Reader of field `HRS23`" ] pub type HRS23_R = crate :: R < bool , HRS23_A > ; impl HRS23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS23_A { match self . bits { false => HRS23_A :: _0 , true => HRS23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS23_A :: _1 } } # [ doc = "Hardware Request Status Channel 24\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS24_A { # [ doc = "0: A hardware service request for channel 24 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 24 is present" ] _1 } impl From < HRS24_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS24_A ) -> Self { match variant { HRS24_A :: _0 => false , HRS24_A :: _1 => true } } } # [ doc = "Reader of field `HRS24`" ] pub type HRS24_R = crate :: R < bool , HRS24_A > ; impl HRS24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS24_A { match self . bits { false => HRS24_A :: _0 , true => HRS24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS24_A :: _1 } } # [ doc = "Hardware Request Status Channel 25\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS25_A { # [ doc = "0: A hardware service request for channel 25 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 25 is present" ] _1 } impl From < HRS25_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS25_A ) -> Self { match variant { HRS25_A :: _0 => false , HRS25_A :: _1 => true } } } # [ doc = "Reader of field `HRS25`" ] pub type HRS25_R = crate :: R < bool , HRS25_A > ; impl HRS25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS25_A { match self . bits { false => HRS25_A :: _0 , true => HRS25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS25_A :: _1 } } # [ doc = "Hardware Request Status Channel 26\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS26_A { # [ doc = "0: A hardware service request for channel 26 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 26 is present" ] _1 } impl From < HRS26_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS26_A ) -> Self { match variant { HRS26_A :: _0 => false , HRS26_A :: _1 => true } } } # [ doc = "Reader of field `HRS26`" ] pub type HRS26_R = crate :: R < bool , HRS26_A > ; impl HRS26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS26_A { match self . bits { false => HRS26_A :: _0 , true => HRS26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS26_A :: _1 } } # [ doc = "Hardware Request Status Channel 27\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS27_A { # [ doc = "0: A hardware service request for channel 27 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 27 is present" ] _1 } impl From < HRS27_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS27_A ) -> Self { match variant { HRS27_A :: _0 => false , HRS27_A :: _1 => true } } } # [ doc = "Reader of field `HRS27`" ] pub type HRS27_R = crate :: R < bool , HRS27_A > ; impl HRS27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS27_A { match self . bits { false => HRS27_A :: _0 , true => HRS27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS27_A :: _1 } } # [ doc = "Hardware Request Status Channel 28\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS28_A { # [ doc = "0: A hardware service request for channel 28 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 28 is present" ] _1 } impl From < HRS28_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS28_A ) -> Self { match variant { HRS28_A :: _0 => false , HRS28_A :: _1 => true } } } # [ doc = "Reader of field `HRS28`" ] pub type HRS28_R = crate :: R < bool , HRS28_A > ; impl HRS28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS28_A { match self . bits { false => HRS28_A :: _0 , true => HRS28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS28_A :: _1 } } # [ doc = "Hardware Request Status Channel 29\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS29_A { # [ doc = "0: A hardware service request for channel 29 is not preset" ] _0 , # [ doc = "1: A hardware service request for channel 29 is present" ] _1 } impl From < HRS29_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS29_A ) -> Self { match variant { HRS29_A :: _0 => false , HRS29_A :: _1 => true } } } # [ doc = "Reader of field `HRS29`" ] pub type HRS29_R = crate :: R < bool , HRS29_A > ; impl HRS29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS29_A { match self . bits { false => HRS29_A :: _0 , true => HRS29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS29_A :: _1 } } # [ doc = "Hardware Request Status Channel 30\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS30_A { # [ doc = "0: A hardware service request for channel 30 is not present" ] _0 , # [ doc = "1: A hardware service request for for channel 30 is present" ] _1 } impl From < HRS30_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS30_A ) -> Self { match variant { HRS30_A :: _0 => false , HRS30_A :: _1 => true } } } # [ doc = "Reader of field `HRS30`" ] pub type HRS30_R = crate :: R < bool , HRS30_A > ; impl HRS30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS30_A { match self . bits { false => HRS30_A :: _0 , true => HRS30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS30_A :: _1 } } # [ doc = "Hardware Request Status Channel 31\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HRS31_A { # [ doc = "0: A hardware service request for channel 31 is not present" ] _0 , # [ doc = "1: A hardware service request for channel 31 is present" ] _1 } impl From < HRS31_A > for bool { # [ inline ( always ) ] fn from ( variant : HRS31_A ) -> Self { match variant { HRS31_A :: _0 => false , HRS31_A :: _1 => true } } } # [ doc = "Reader of field `HRS31`" ] pub type HRS31_R = crate :: R < bool , HRS31_A > ; impl HRS31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HRS31_A { match self . bits { false => HRS31_A :: _0 , true => HRS31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HRS31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HRS31_A :: _1 } } impl R { # [ doc = "Bit 0 - Hardware Request Status Channel 0" ] # [ inline ( always ) ] pub fn hrs0 ( & self ) -> HRS0_R { HRS0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Hardware Request Status Channel 1" ] # [ inline ( always ) ] pub fn hrs1 ( & self ) -> HRS1_R { HRS1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Hardware Request Status Channel 2" ] # [ inline ( always ) ] pub fn hrs2 ( & self ) -> HRS2_R { HRS2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Hardware Request Status Channel 3" ] # [ inline ( always ) ] pub fn hrs3 ( & self ) -> HRS3_R { HRS3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Hardware Request Status Channel 4" ] # [ inline ( always ) ] pub fn hrs4 ( & self ) -> HRS4_R { HRS4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Hardware Request Status Channel 5" ] # [ inline ( always ) ] pub fn hrs5 ( & self ) -> HRS5_R { HRS5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Hardware Request Status Channel 6" ] # [ inline ( always ) ] pub fn hrs6 ( & self ) -> HRS6_R { HRS6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Hardware Request Status Channel 7" ] # [ inline ( always ) ] pub fn hrs7 ( & self ) -> HRS7_R { HRS7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Hardware Request Status Channel 8" ] # [ inline ( always ) ] pub fn hrs8 ( & self ) -> HRS8_R { HRS8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Hardware Request Status Channel 9" ] # [ inline ( always ) ] pub fn hrs9 ( & self ) -> HRS9_R { HRS9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Hardware Request Status Channel 10" ] # [ inline ( always ) ] pub fn hrs10 ( & self ) -> HRS10_R { HRS10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Hardware Request Status Channel 11" ] # [ inline ( always ) ] pub fn hrs11 ( & self ) -> HRS11_R { HRS11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Hardware Request Status Channel 12" ] # [ inline ( always ) ] pub fn hrs12 ( & self ) -> HRS12_R { HRS12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Hardware Request Status Channel 13" ] # [ inline ( always ) ] pub fn hrs13 ( & self ) -> HRS13_R { HRS13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Hardware Request Status Channel 14" ] # [ inline ( always ) ] pub fn hrs14 ( & self ) -> HRS14_R { HRS14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Hardware Request Status Channel 15" ] # [ inline ( always ) ] pub fn hrs15 ( & self ) -> HRS15_R { HRS15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Hardware Request Status Channel 16" ] # [ inline ( always ) ] pub fn hrs16 ( & self ) -> HRS16_R { HRS16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Hardware Request Status Channel 17" ] # [ inline ( always ) ] pub fn hrs17 ( & self ) -> HRS17_R { HRS17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Hardware Request Status Channel 18" ] # [ inline ( always ) ] pub fn hrs18 ( & self ) -> HRS18_R { HRS18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Hardware Request Status Channel 19" ] # [ inline ( always ) ] pub fn hrs19 ( & self ) -> HRS19_R { HRS19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Hardware Request Status Channel 20" ] # [ inline ( always ) ] pub fn hrs20 ( & self ) -> HRS20_R { HRS20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Hardware Request Status Channel 21" ] # [ inline ( always ) ] pub fn hrs21 ( & self ) -> HRS21_R { HRS21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Hardware Request Status Channel 22" ] # [ inline ( always ) ] pub fn hrs22 ( & self ) -> HRS22_R { HRS22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Hardware Request Status Channel 23" ] # [ inline ( always ) ] pub fn hrs23 ( & self ) -> HRS23_R { HRS23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Hardware Request Status Channel 24" ] # [ inline ( always ) ] pub fn hrs24 ( & self ) -> HRS24_R { HRS24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Hardware Request Status Channel 25" ] # [ inline ( always ) ] pub fn hrs25 ( & self ) -> HRS25_R { HRS25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Hardware Request Status Channel 26" ] # [ inline ( always ) ] pub fn hrs26 ( & self ) -> HRS26_R { HRS26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Hardware Request Status Channel 27" ] # [ inline ( always ) ] pub fn hrs27 ( & self ) -> HRS27_R { HRS27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Hardware Request Status Channel 28" ] # [ inline ( always ) ] pub fn hrs28 ( & self ) -> HRS28_R { HRS28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Hardware Request Status Channel 29" ] # [ inline ( always ) ] pub fn hrs29 ( & self ) -> HRS29_R { HRS29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Hardware Request Status Channel 30" ] # [ inline ( always ) ] pub fn hrs30 ( & self ) -> HRS30_R { HRS30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Hardware Request Status Channel 31" ] # [ inline ( always ) ] pub fn hrs31 ( & self ) -> HRS31_R { HRS31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Enable Asynchronous Request in Stop Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ears](ears) module" ] pub type EARS = crate :: Reg < u32 , _EARS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EARS ; # [ doc = "`read()` method returns [ears::R](ears::R) reader structure" ] impl crate :: Readable for EARS { } # [ doc = "`write(|w| ..)` method takes [ears::W](ears::W) writer structure" ] impl crate :: Writable for EARS { } # [ doc = "Enable Asynchronous Request in Stop Register" ] pub mod ears { # [ doc = "Reader of register EARS" ] pub type R = crate :: R < u32 , super :: EARS > ; # [ doc = "Writer for register EARS" ] pub type W = crate :: W < u32 , super :: EARS > ; # [ doc = "Register EARS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EARS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 0.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_0_A { # [ doc = "0: Disable asynchronous DMA request for channel 0." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 0." ] _1 } impl From < EDREQ_0_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_0_A ) -> Self { match variant { EDREQ_0_A :: _0 => false , EDREQ_0_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_0`" ] pub type EDREQ_0_R = crate :: R < bool , EDREQ_0_A > ; impl EDREQ_0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_0_A { match self . bits { false => EDREQ_0_A :: _0 , true => EDREQ_0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_0_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_0`" ] pub struct EDREQ_0_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_0_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 1.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_1_A { # [ doc = "0: Disable asynchronous DMA request for channel 1" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 1." ] _1 } impl From < EDREQ_1_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_1_A ) -> Self { match variant { EDREQ_1_A :: _0 => false , EDREQ_1_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_1`" ] pub type EDREQ_1_R = crate :: R < bool , EDREQ_1_A > ; impl EDREQ_1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_1_A { match self . bits { false => EDREQ_1_A :: _0 , true => EDREQ_1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_1_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_1`" ] pub struct EDREQ_1_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_1_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_1_A :: _1 ) } # [ 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 } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 2.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_2_A { # [ doc = "0: Disable asynchronous DMA request for channel 2." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 2." ] _1 } impl From < EDREQ_2_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_2_A ) -> Self { match variant { EDREQ_2_A :: _0 => false , EDREQ_2_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_2`" ] pub type EDREQ_2_R = crate :: R < bool , EDREQ_2_A > ; impl EDREQ_2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_2_A { match self . bits { false => EDREQ_2_A :: _0 , true => EDREQ_2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_2_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_2`" ] pub struct EDREQ_2_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 2." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_2_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_2_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 3.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_3_A { # [ doc = "0: Disable asynchronous DMA request for channel 3." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 3." ] _1 } impl From < EDREQ_3_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_3_A ) -> Self { match variant { EDREQ_3_A :: _0 => false , EDREQ_3_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_3`" ] pub type EDREQ_3_R = crate :: R < bool , EDREQ_3_A > ; impl EDREQ_3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_3_A { match self . bits { false => EDREQ_3_A :: _0 , true => EDREQ_3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_3_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_3`" ] pub struct EDREQ_3_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 3." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_3_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 3." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_4_A { # [ doc = "0: Disable asynchronous DMA request for channel 4." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 4." ] _1 } impl From < EDREQ_4_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_4_A ) -> Self { match variant { EDREQ_4_A :: _0 => false , EDREQ_4_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_4`" ] pub type EDREQ_4_R = crate :: R < bool , EDREQ_4_A > ; impl EDREQ_4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_4_A { match self . bits { false => EDREQ_4_A :: _0 , true => EDREQ_4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_4_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_4`" ] pub struct EDREQ_4_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 4." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_4_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 4." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_5_A { # [ doc = "0: Disable asynchronous DMA request for channel 5." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 5." ] _1 } impl From < EDREQ_5_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_5_A ) -> Self { match variant { EDREQ_5_A :: _0 => false , EDREQ_5_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_5`" ] pub type EDREQ_5_R = crate :: R < bool , EDREQ_5_A > ; impl EDREQ_5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_5_A { match self . bits { false => EDREQ_5_A :: _0 , true => EDREQ_5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_5_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_5`" ] pub struct EDREQ_5_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 5." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_5_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 5." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_5_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_6_A { # [ doc = "0: Disable asynchronous DMA request for channel 6." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 6." ] _1 } impl From < EDREQ_6_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_6_A ) -> Self { match variant { EDREQ_6_A :: _0 => false , EDREQ_6_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_6`" ] pub type EDREQ_6_R = crate :: R < bool , EDREQ_6_A > ; impl EDREQ_6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_6_A { match self . bits { false => EDREQ_6_A :: _0 , true => EDREQ_6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_6_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_6`" ] pub struct EDREQ_6_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 6." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_6_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 6." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_6_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_7_A { # [ doc = "0: Disable asynchronous DMA request for channel 7." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 7." ] _1 } impl From < EDREQ_7_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_7_A ) -> Self { match variant { EDREQ_7_A :: _0 => false , EDREQ_7_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_7`" ] pub type EDREQ_7_R = crate :: R < bool , EDREQ_7_A > ; impl EDREQ_7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_7_A { match self . bits { false => EDREQ_7_A :: _0 , true => EDREQ_7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_7_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_7`" ] pub struct EDREQ_7_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 7." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_7_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 7." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_7_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 8\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_8_A { # [ doc = "0: Disable asynchronous DMA request for channel 8." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 8." ] _1 } impl From < EDREQ_8_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_8_A ) -> Self { match variant { EDREQ_8_A :: _0 => false , EDREQ_8_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_8`" ] pub type EDREQ_8_R = crate :: R < bool , EDREQ_8_A > ; impl EDREQ_8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_8_A { match self . bits { false => EDREQ_8_A :: _0 , true => EDREQ_8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_8_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_8`" ] pub struct EDREQ_8_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 8." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_8_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 8." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 9\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_9_A { # [ doc = "0: Disable asynchronous DMA request for channel 9." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 9." ] _1 } impl From < EDREQ_9_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_9_A ) -> Self { match variant { EDREQ_9_A :: _0 => false , EDREQ_9_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_9`" ] pub type EDREQ_9_R = crate :: R < bool , EDREQ_9_A > ; impl EDREQ_9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_9_A { match self . bits { false => EDREQ_9_A :: _0 , true => EDREQ_9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_9_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_9`" ] pub struct EDREQ_9_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 9." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_9_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 9." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 10\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_10_A { # [ doc = "0: Disable asynchronous DMA request for channel 10." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 10." ] _1 } impl From < EDREQ_10_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_10_A ) -> Self { match variant { EDREQ_10_A :: _0 => false , EDREQ_10_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_10`" ] pub type EDREQ_10_R = crate :: R < bool , EDREQ_10_A > ; impl EDREQ_10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_10_A { match self . bits { false => EDREQ_10_A :: _0 , true => EDREQ_10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_10_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_10`" ] pub struct EDREQ_10_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 10." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_10_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 10." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 11\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_11_A { # [ doc = "0: Disable asynchronous DMA request for channel 11." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 11." ] _1 } impl From < EDREQ_11_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_11_A ) -> Self { match variant { EDREQ_11_A :: _0 => false , EDREQ_11_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_11`" ] pub type EDREQ_11_R = crate :: R < bool , EDREQ_11_A > ; impl EDREQ_11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_11_A { match self . bits { false => EDREQ_11_A :: _0 , true => EDREQ_11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_11_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_11`" ] pub struct EDREQ_11_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 11." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_11_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 11." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 12\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_12_A { # [ doc = "0: Disable asynchronous DMA request for channel 12." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 12." ] _1 } impl From < EDREQ_12_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_12_A ) -> Self { match variant { EDREQ_12_A :: _0 => false , EDREQ_12_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_12`" ] pub type EDREQ_12_R = crate :: R < bool , EDREQ_12_A > ; impl EDREQ_12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_12_A { match self . bits { false => EDREQ_12_A :: _0 , true => EDREQ_12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_12_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_12`" ] pub struct EDREQ_12_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 12." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_12_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 12." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 13\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_13_A { # [ doc = "0: Disable asynchronous DMA request for channel 13." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 13." ] _1 } impl From < EDREQ_13_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_13_A ) -> Self { match variant { EDREQ_13_A :: _0 => false , EDREQ_13_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_13`" ] pub type EDREQ_13_R = crate :: R < bool , EDREQ_13_A > ; impl EDREQ_13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_13_A { match self . bits { false => EDREQ_13_A :: _0 , true => EDREQ_13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_13_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_13`" ] pub struct EDREQ_13_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 13." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_13_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 13." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_13_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 14\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_14_A { # [ doc = "0: Disable asynchronous DMA request for channel 14." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 14." ] _1 } impl From < EDREQ_14_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_14_A ) -> Self { match variant { EDREQ_14_A :: _0 => false , EDREQ_14_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_14`" ] pub type EDREQ_14_R = crate :: R < bool , EDREQ_14_A > ; impl EDREQ_14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_14_A { match self . bits { false => EDREQ_14_A :: _0 , true => EDREQ_14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_14_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_14`" ] pub struct EDREQ_14_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 14." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_14_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 14." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 15\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_15_A { # [ doc = "0: Disable asynchronous DMA request for channel 15." ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 15." ] _1 } impl From < EDREQ_15_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_15_A ) -> Self { match variant { EDREQ_15_A :: _0 => false , EDREQ_15_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_15`" ] pub type EDREQ_15_R = crate :: R < bool , EDREQ_15_A > ; impl EDREQ_15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_15_A { match self . bits { false => EDREQ_15_A :: _0 , true => EDREQ_15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_15_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_15`" ] pub struct EDREQ_15_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 15." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_15_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 15." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_16_A { # [ doc = "0: Disable asynchronous DMA request for channel 16" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 16" ] _1 } impl From < EDREQ_16_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_16_A ) -> Self { match variant { EDREQ_16_A :: _0 => false , EDREQ_16_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_16`" ] pub type EDREQ_16_R = crate :: R < bool , EDREQ_16_A > ; impl EDREQ_16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_16_A { match self . bits { false => EDREQ_16_A :: _0 , true => EDREQ_16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_16_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_16`" ] pub struct EDREQ_16_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 16" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_16_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 16" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 17\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_17_A { # [ doc = "0: Disable asynchronous DMA request for channel 17" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 17" ] _1 } impl From < EDREQ_17_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_17_A ) -> Self { match variant { EDREQ_17_A :: _0 => false , EDREQ_17_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_17`" ] pub type EDREQ_17_R = crate :: R < bool , EDREQ_17_A > ; impl EDREQ_17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_17_A { match self . bits { false => EDREQ_17_A :: _0 , true => EDREQ_17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_17_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_17`" ] pub struct EDREQ_17_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 17" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_17_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 17" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 18\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_18_A { # [ doc = "0: Disable asynchronous DMA request for channel 18" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 18" ] _1 } impl From < EDREQ_18_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_18_A ) -> Self { match variant { EDREQ_18_A :: _0 => false , EDREQ_18_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_18`" ] pub type EDREQ_18_R = crate :: R < bool , EDREQ_18_A > ; impl EDREQ_18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_18_A { match self . bits { false => EDREQ_18_A :: _0 , true => EDREQ_18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_18_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_18`" ] pub struct EDREQ_18_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 18" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_18_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 18" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 19\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_19_A { # [ doc = "0: Disable asynchronous DMA request for channel 19" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 19" ] _1 } impl From < EDREQ_19_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_19_A ) -> Self { match variant { EDREQ_19_A :: _0 => false , EDREQ_19_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_19`" ] pub type EDREQ_19_R = crate :: R < bool , EDREQ_19_A > ; impl EDREQ_19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_19_A { match self . bits { false => EDREQ_19_A :: _0 , true => EDREQ_19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_19_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_19`" ] pub struct EDREQ_19_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 19" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_19_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 19" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 20\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_20_A { # [ doc = "0: Disable asynchronous DMA request for channel 20" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 20" ] _1 } impl From < EDREQ_20_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_20_A ) -> Self { match variant { EDREQ_20_A :: _0 => false , EDREQ_20_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_20`" ] pub type EDREQ_20_R = crate :: R < bool , EDREQ_20_A > ; impl EDREQ_20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_20_A { match self . bits { false => EDREQ_20_A :: _0 , true => EDREQ_20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_20_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_20`" ] pub struct EDREQ_20_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 20" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_20_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 20" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_20_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 21\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_21_A { # [ doc = "0: Disable asynchronous DMA request for channel 21" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 21" ] _1 } impl From < EDREQ_21_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_21_A ) -> Self { match variant { EDREQ_21_A :: _0 => false , EDREQ_21_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_21`" ] pub type EDREQ_21_R = crate :: R < bool , EDREQ_21_A > ; impl EDREQ_21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_21_A { match self . bits { false => EDREQ_21_A :: _0 , true => EDREQ_21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_21_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_21`" ] pub struct EDREQ_21_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 21" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_21_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 21" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_21_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 22\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_22_A { # [ doc = "0: Disable asynchronous DMA request for channel 22" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 22" ] _1 } impl From < EDREQ_22_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_22_A ) -> Self { match variant { EDREQ_22_A :: _0 => false , EDREQ_22_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_22`" ] pub type EDREQ_22_R = crate :: R < bool , EDREQ_22_A > ; impl EDREQ_22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_22_A { match self . bits { false => EDREQ_22_A :: _0 , true => EDREQ_22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_22_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_22`" ] pub struct EDREQ_22_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 22" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_22_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 22" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 23\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_23_A { # [ doc = "0: Disable asynchronous DMA request for channel 23" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 23" ] _1 } impl From < EDREQ_23_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_23_A ) -> Self { match variant { EDREQ_23_A :: _0 => false , EDREQ_23_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_23`" ] pub type EDREQ_23_R = crate :: R < bool , EDREQ_23_A > ; impl EDREQ_23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_23_A { match self . bits { false => EDREQ_23_A :: _0 , true => EDREQ_23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_23_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_23`" ] pub struct EDREQ_23_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 23" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_23_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 23" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 24\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_24_A { # [ doc = "0: Disable asynchronous DMA request for channel 24" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 24" ] _1 } impl From < EDREQ_24_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_24_A ) -> Self { match variant { EDREQ_24_A :: _0 => false , EDREQ_24_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_24`" ] pub type EDREQ_24_R = crate :: R < bool , EDREQ_24_A > ; impl EDREQ_24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_24_A { match self . bits { false => EDREQ_24_A :: _0 , true => EDREQ_24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_24_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_24`" ] pub struct EDREQ_24_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 24" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_24_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 24" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_24_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 25\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_25_A { # [ doc = "0: Disable asynchronous DMA request for channel 25" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 25" ] _1 } impl From < EDREQ_25_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_25_A ) -> Self { match variant { EDREQ_25_A :: _0 => false , EDREQ_25_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_25`" ] pub type EDREQ_25_R = crate :: R < bool , EDREQ_25_A > ; impl EDREQ_25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_25_A { match self . bits { false => EDREQ_25_A :: _0 , true => EDREQ_25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_25_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_25`" ] pub struct EDREQ_25_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 25" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_25_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 25" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_25_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 26\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_26_A { # [ doc = "0: Disable asynchronous DMA request for channel 26" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 26" ] _1 } impl From < EDREQ_26_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_26_A ) -> Self { match variant { EDREQ_26_A :: _0 => false , EDREQ_26_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_26`" ] pub type EDREQ_26_R = crate :: R < bool , EDREQ_26_A > ; impl EDREQ_26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_26_A { match self . bits { false => EDREQ_26_A :: _0 , true => EDREQ_26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_26_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_26`" ] pub struct EDREQ_26_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 26" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_26_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 26" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_26_A :: _1 ) } # [ 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 = "Enable asynchronous DMA request in stop mode for channel 27\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_27_A { # [ doc = "0: Disable asynchronous DMA request for channel 27" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 27" ] _1 } impl From < EDREQ_27_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_27_A ) -> Self { match variant { EDREQ_27_A :: _0 => false , EDREQ_27_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_27`" ] pub type EDREQ_27_R = crate :: R < bool , EDREQ_27_A > ; impl EDREQ_27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_27_A { match self . bits { false => EDREQ_27_A :: _0 , true => EDREQ_27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_27_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_27`" ] pub struct EDREQ_27_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 27" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_27_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 27" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 28\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_28_A { # [ doc = "0: Disable asynchronous DMA request for channel 28" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 28" ] _1 } impl From < EDREQ_28_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_28_A ) -> Self { match variant { EDREQ_28_A :: _0 => false , EDREQ_28_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_28`" ] pub type EDREQ_28_R = crate :: R < bool , EDREQ_28_A > ; impl EDREQ_28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_28_A { match self . bits { false => EDREQ_28_A :: _0 , true => EDREQ_28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_28_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_28`" ] pub struct EDREQ_28_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 28" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_28_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 28" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 29\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_29_A { # [ doc = "0: Disable asynchronous DMA request for channel 29" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 29" ] _1 } impl From < EDREQ_29_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_29_A ) -> Self { match variant { EDREQ_29_A :: _0 => false , EDREQ_29_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_29`" ] pub type EDREQ_29_R = crate :: R < bool , EDREQ_29_A > ; impl EDREQ_29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_29_A { match self . bits { false => EDREQ_29_A :: _0 , true => EDREQ_29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_29_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_29`" ] pub struct EDREQ_29_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 29" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_29_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 29" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 30\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_30_A { # [ doc = "0: Disable asynchronous DMA request for channel 30" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 30" ] _1 } impl From < EDREQ_30_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_30_A ) -> Self { match variant { EDREQ_30_A :: _0 => false , EDREQ_30_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_30`" ] pub type EDREQ_30_R = crate :: R < bool , EDREQ_30_A > ; impl EDREQ_30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_30_A { match self . bits { false => EDREQ_30_A :: _0 , true => EDREQ_30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_30_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_30`" ] pub struct EDREQ_30_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 30" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_30_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 30" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Enable asynchronous DMA request in stop mode for channel 31\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDREQ_31_A { # [ doc = "0: Disable asynchronous DMA request for channel 31" ] _0 , # [ doc = "1: Enable asynchronous DMA request for channel 31" ] _1 } impl From < EDREQ_31_A > for bool { # [ inline ( always ) ] fn from ( variant : EDREQ_31_A ) -> Self { match variant { EDREQ_31_A :: _0 => false , EDREQ_31_A :: _1 => true } } } # [ doc = "Reader of field `EDREQ_31`" ] pub type EDREQ_31_R = crate :: R < bool , EDREQ_31_A > ; impl EDREQ_31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EDREQ_31_A { match self . bits { false => EDREQ_31_A :: _0 , true => EDREQ_31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EDREQ_31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EDREQ_31_A :: _1 } } # [ doc = "Write proxy for field `EDREQ_31`" ] pub struct EDREQ_31_W < 'a > { w : & 'a mut W , } impl < 'a > EDREQ_31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EDREQ_31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable asynchronous DMA request for channel 31" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EDREQ_31_A :: _0 ) } # [ doc = "Enable asynchronous DMA request for channel 31" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EDREQ_31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Enable asynchronous DMA request in stop mode for channel 0." ] # [ inline ( always ) ] pub fn edreq_0 ( & self ) -> EDREQ_0_R { EDREQ_0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Enable asynchronous DMA request in stop mode for channel 1." ] # [ inline ( always ) ] pub fn edreq_1 ( & self ) -> EDREQ_1_R { EDREQ_1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Enable asynchronous DMA request in stop mode for channel 2." ] # [ inline ( always ) ] pub fn edreq_2 ( & self ) -> EDREQ_2_R { EDREQ_2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Enable asynchronous DMA request in stop mode for channel 3." ] # [ inline ( always ) ] pub fn edreq_3 ( & self ) -> EDREQ_3_R { EDREQ_3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enable asynchronous DMA request in stop mode for channel 4" ] # [ inline ( always ) ] pub fn edreq_4 ( & self ) -> EDREQ_4_R { EDREQ_4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enable asynchronous DMA request in stop mode for channel 5" ] # [ inline ( always ) ] pub fn edreq_5 ( & self ) -> EDREQ_5_R { EDREQ_5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Enable asynchronous DMA request in stop mode for channel 6" ] # [ inline ( always ) ] pub fn edreq_6 ( & self ) -> EDREQ_6_R { EDREQ_6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Enable asynchronous DMA request in stop mode for channel 7" ] # [ inline ( always ) ] pub fn edreq_7 ( & self ) -> EDREQ_7_R { EDREQ_7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Enable asynchronous DMA request in stop mode for channel 8" ] # [ inline ( always ) ] pub fn edreq_8 ( & self ) -> EDREQ_8_R { EDREQ_8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Enable asynchronous DMA request in stop mode for channel 9" ] # [ inline ( always ) ] pub fn edreq_9 ( & self ) -> EDREQ_9_R { EDREQ_9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Enable asynchronous DMA request in stop mode for channel 10" ] # [ inline ( always ) ] pub fn edreq_10 ( & self ) -> EDREQ_10_R { EDREQ_10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Enable asynchronous DMA request in stop mode for channel 11" ] # [ inline ( always ) ] pub fn edreq_11 ( & self ) -> EDREQ_11_R { EDREQ_11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Enable asynchronous DMA request in stop mode for channel 12" ] # [ inline ( always ) ] pub fn edreq_12 ( & self ) -> EDREQ_12_R { EDREQ_12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Enable asynchronous DMA request in stop mode for channel 13" ] # [ inline ( always ) ] pub fn edreq_13 ( & self ) -> EDREQ_13_R { EDREQ_13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Enable asynchronous DMA request in stop mode for channel 14" ] # [ inline ( always ) ] pub fn edreq_14 ( & self ) -> EDREQ_14_R { EDREQ_14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Enable asynchronous DMA request in stop mode for channel 15" ] # [ inline ( always ) ] pub fn edreq_15 ( & self ) -> EDREQ_15_R { EDREQ_15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Enable asynchronous DMA request in stop mode for channel 16" ] # [ inline ( always ) ] pub fn edreq_16 ( & self ) -> EDREQ_16_R { EDREQ_16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Enable asynchronous DMA request in stop mode for channel 17" ] # [ inline ( always ) ] pub fn edreq_17 ( & self ) -> EDREQ_17_R { EDREQ_17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Enable asynchronous DMA request in stop mode for channel 18" ] # [ inline ( always ) ] pub fn edreq_18 ( & self ) -> EDREQ_18_R { EDREQ_18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Enable asynchronous DMA request in stop mode for channel 19" ] # [ inline ( always ) ] pub fn edreq_19 ( & self ) -> EDREQ_19_R { EDREQ_19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enable asynchronous DMA request in stop mode for channel 20" ] # [ inline ( always ) ] pub fn edreq_20 ( & self ) -> EDREQ_20_R { EDREQ_20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Enable asynchronous DMA request in stop mode for channel 21" ] # [ inline ( always ) ] pub fn edreq_21 ( & self ) -> EDREQ_21_R { EDREQ_21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Enable asynchronous DMA request in stop mode for channel 22" ] # [ inline ( always ) ] pub fn edreq_22 ( & self ) -> EDREQ_22_R { EDREQ_22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Enable asynchronous DMA request in stop mode for channel 23" ] # [ inline ( always ) ] pub fn edreq_23 ( & self ) -> EDREQ_23_R { EDREQ_23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Enable asynchronous DMA request in stop mode for channel 24" ] # [ inline ( always ) ] pub fn edreq_24 ( & self ) -> EDREQ_24_R { EDREQ_24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Enable asynchronous DMA request in stop mode for channel 25" ] # [ inline ( always ) ] pub fn edreq_25 ( & self ) -> EDREQ_25_R { EDREQ_25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Enable asynchronous DMA request in stop mode for channel 26" ] # [ inline ( always ) ] pub fn edreq_26 ( & self ) -> EDREQ_26_R { EDREQ_26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Enable asynchronous DMA request in stop mode for channel 27" ] # [ inline ( always ) ] pub fn edreq_27 ( & self ) -> EDREQ_27_R { EDREQ_27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Enable asynchronous DMA request in stop mode for channel 28" ] # [ inline ( always ) ] pub fn edreq_28 ( & self ) -> EDREQ_28_R { EDREQ_28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Enable asynchronous DMA request in stop mode for channel 29" ] # [ inline ( always ) ] pub fn edreq_29 ( & self ) -> EDREQ_29_R { EDREQ_29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Enable asynchronous DMA request in stop mode for channel 30" ] # [ inline ( always ) ] pub fn edreq_30 ( & self ) -> EDREQ_30_R { EDREQ_30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Enable asynchronous DMA request in stop mode for channel 31" ] # [ inline ( always ) ] pub fn edreq_31 ( & self ) -> EDREQ_31_R { EDREQ_31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Enable asynchronous DMA request in stop mode for channel 0." ] # [ inline ( always ) ] pub fn edreq_0 ( & mut self ) -> EDREQ_0_W { EDREQ_0_W { w : self } } # [ doc = "Bit 1 - Enable asynchronous DMA request in stop mode for channel 1." ] # [ inline ( always ) ] pub fn edreq_1 ( & mut self ) -> EDREQ_1_W { EDREQ_1_W { w : self } } # [ doc = "Bit 2 - Enable asynchronous DMA request in stop mode for channel 2." ] # [ inline ( always ) ] pub fn edreq_2 ( & mut self ) -> EDREQ_2_W { EDREQ_2_W { w : self } } # [ doc = "Bit 3 - Enable asynchronous DMA request in stop mode for channel 3." ] # [ inline ( always ) ] pub fn edreq_3 ( & mut self ) -> EDREQ_3_W { EDREQ_3_W { w : self } } # [ doc = "Bit 4 - Enable asynchronous DMA request in stop mode for channel 4" ] # [ inline ( always ) ] pub fn edreq_4 ( & mut self ) -> EDREQ_4_W { EDREQ_4_W { w : self } } # [ doc = "Bit 5 - Enable asynchronous DMA request in stop mode for channel 5" ] # [ inline ( always ) ] pub fn edreq_5 ( & mut self ) -> EDREQ_5_W { EDREQ_5_W { w : self } } # [ doc = "Bit 6 - Enable asynchronous DMA request in stop mode for channel 6" ] # [ inline ( always ) ] pub fn edreq_6 ( & mut self ) -> EDREQ_6_W { EDREQ_6_W { w : self } } # [ doc = "Bit 7 - Enable asynchronous DMA request in stop mode for channel 7" ] # [ inline ( always ) ] pub fn edreq_7 ( & mut self ) -> EDREQ_7_W { EDREQ_7_W { w : self } } # [ doc = "Bit 8 - Enable asynchronous DMA request in stop mode for channel 8" ] # [ inline ( always ) ] pub fn edreq_8 ( & mut self ) -> EDREQ_8_W { EDREQ_8_W { w : self } } # [ doc = "Bit 9 - Enable asynchronous DMA request in stop mode for channel 9" ] # [ inline ( always ) ] pub fn edreq_9 ( & mut self ) -> EDREQ_9_W { EDREQ_9_W { w : self } } # [ doc = "Bit 10 - Enable asynchronous DMA request in stop mode for channel 10" ] # [ inline ( always ) ] pub fn edreq_10 ( & mut self ) -> EDREQ_10_W { EDREQ_10_W { w : self } } # [ doc = "Bit 11 - Enable asynchronous DMA request in stop mode for channel 11" ] # [ inline ( always ) ] pub fn edreq_11 ( & mut self ) -> EDREQ_11_W { EDREQ_11_W { w : self } } # [ doc = "Bit 12 - Enable asynchronous DMA request in stop mode for channel 12" ] # [ inline ( always ) ] pub fn edreq_12 ( & mut self ) -> EDREQ_12_W { EDREQ_12_W { w : self } } # [ doc = "Bit 13 - Enable asynchronous DMA request in stop mode for channel 13" ] # [ inline ( always ) ] pub fn edreq_13 ( & mut self ) -> EDREQ_13_W { EDREQ_13_W { w : self } } # [ doc = "Bit 14 - Enable asynchronous DMA request in stop mode for channel 14" ] # [ inline ( always ) ] pub fn edreq_14 ( & mut self ) -> EDREQ_14_W { EDREQ_14_W { w : self } } # [ doc = "Bit 15 - Enable asynchronous DMA request in stop mode for channel 15" ] # [ inline ( always ) ] pub fn edreq_15 ( & mut self ) -> EDREQ_15_W { EDREQ_15_W { w : self } } # [ doc = "Bit 16 - Enable asynchronous DMA request in stop mode for channel 16" ] # [ inline ( always ) ] pub fn edreq_16 ( & mut self ) -> EDREQ_16_W { EDREQ_16_W { w : self } } # [ doc = "Bit 17 - Enable asynchronous DMA request in stop mode for channel 17" ] # [ inline ( always ) ] pub fn edreq_17 ( & mut self ) -> EDREQ_17_W { EDREQ_17_W { w : self } } # [ doc = "Bit 18 - Enable asynchronous DMA request in stop mode for channel 18" ] # [ inline ( always ) ] pub fn edreq_18 ( & mut self ) -> EDREQ_18_W { EDREQ_18_W { w : self } } # [ doc = "Bit 19 - Enable asynchronous DMA request in stop mode for channel 19" ] # [ inline ( always ) ] pub fn edreq_19 ( & mut self ) -> EDREQ_19_W { EDREQ_19_W { w : self } } # [ doc = "Bit 20 - Enable asynchronous DMA request in stop mode for channel 20" ] # [ inline ( always ) ] pub fn edreq_20 ( & mut self ) -> EDREQ_20_W { EDREQ_20_W { w : self } } # [ doc = "Bit 21 - Enable asynchronous DMA request in stop mode for channel 21" ] # [ inline ( always ) ] pub fn edreq_21 ( & mut self ) -> EDREQ_21_W { EDREQ_21_W { w : self } } # [ doc = "Bit 22 - Enable asynchronous DMA request in stop mode for channel 22" ] # [ inline ( always ) ] pub fn edreq_22 ( & mut self ) -> EDREQ_22_W { EDREQ_22_W { w : self } } # [ doc = "Bit 23 - Enable asynchronous DMA request in stop mode for channel 23" ] # [ inline ( always ) ] pub fn edreq_23 ( & mut self ) -> EDREQ_23_W { EDREQ_23_W { w : self } } # [ doc = "Bit 24 - Enable asynchronous DMA request in stop mode for channel 24" ] # [ inline ( always ) ] pub fn edreq_24 ( & mut self ) -> EDREQ_24_W { EDREQ_24_W { w : self } } # [ doc = "Bit 25 - Enable asynchronous DMA request in stop mode for channel 25" ] # [ inline ( always ) ] pub fn edreq_25 ( & mut self ) -> EDREQ_25_W { EDREQ_25_W { w : self } } # [ doc = "Bit 26 - Enable asynchronous DMA request in stop mode for channel 26" ] # [ inline ( always ) ] pub fn edreq_26 ( & mut self ) -> EDREQ_26_W { EDREQ_26_W { w : self } } # [ doc = "Bit 27 - Enable asynchronous DMA request in stop mode for channel 27" ] # [ inline ( always ) ] pub fn edreq_27 ( & mut self ) -> EDREQ_27_W { EDREQ_27_W { w : self } } # [ doc = "Bit 28 - Enable asynchronous DMA request in stop mode for channel 28" ] # [ inline ( always ) ] pub fn edreq_28 ( & mut self ) -> EDREQ_28_W { EDREQ_28_W { w : self } } # [ doc = "Bit 29 - Enable asynchronous DMA request in stop mode for channel 29" ] # [ inline ( always ) ] pub fn edreq_29 ( & mut self ) -> EDREQ_29_W { EDREQ_29_W { w : self } } # [ doc = "Bit 30 - Enable asynchronous DMA request in stop mode for channel 30" ] # [ inline ( always ) ] pub fn edreq_30 ( & mut self ) -> EDREQ_30_W { EDREQ_30_W { w : self } } # [ doc = "Bit 31 - Enable asynchronous DMA request in stop mode for channel 31" ] # [ inline ( always ) ] pub fn edreq_31 ( & mut self ) -> EDREQ_31_W { EDREQ_31_W { w : self } } } } # [ doc = "Channel n Priority Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dchpri](dchpri) module" ] pub type DCHPRI = crate :: Reg < u8 , _DCHPRI > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DCHPRI ; # [ doc = "`read()` method returns [dchpri::R](dchpri::R) reader structure" ] impl crate :: Readable for DCHPRI { } # [ doc = "`write(|w| ..)` method takes [dchpri::W](dchpri::W) writer structure" ] impl crate :: Writable for DCHPRI { } # [ doc = "Channel n Priority Register" ] pub mod dchpri { # [ doc = "Reader of register DCHPRI%s" ] pub type R = crate :: R < u8 , super :: DCHPRI > ; # [ doc = "Writer for register DCHPRI%s" ] pub type W = crate :: W < u8 , super :: DCHPRI > ; # [ doc = "Register DCHPRI%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DCHPRI { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CHPRI`" ] pub type CHPRI_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CHPRI`" ] pub struct CHPRI_W < 'a > { w : & 'a mut W , } impl < 'a > CHPRI_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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `GRPPRI`" ] pub type GRPPRI_R = crate :: R < u8 , u8 > ; # [ doc = "Disable Preempt Ability.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPA_A { # [ doc = "0: Channel n can suspend a lower priority channel." ] _0 , # [ doc = "1: Channel n cannot suspend any channel, regardless of channel priority." ] _1 } impl From < DPA_A > for bool { # [ inline ( always ) ] fn from ( variant : DPA_A ) -> Self { match variant { DPA_A :: _0 => false , DPA_A :: _1 => true } } } # [ doc = "Reader of field `DPA`" ] pub type DPA_R = crate :: R < bool , DPA_A > ; impl DPA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPA_A { match self . bits { false => DPA_A :: _0 , true => DPA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPA_A :: _1 } } # [ doc = "Write proxy for field `DPA`" ] pub struct DPA_W < 'a > { w : & 'a mut W , } impl < 'a > DPA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel n can suspend a lower priority channel." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPA_A :: _0 ) } # [ doc = "Channel n cannot suspend any channel, regardless of channel priority." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPA_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Enable Channel Preemption.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ECP_A { # [ doc = "0: Channel n cannot be suspended by a higher priority channel's service request." ] _0 , # [ doc = "1: Channel n can be temporarily suspended by the service request of a higher priority channel." ] _1 } impl From < ECP_A > for bool { # [ inline ( always ) ] fn from ( variant : ECP_A ) -> Self { match variant { ECP_A :: _0 => false , ECP_A :: _1 => true } } } # [ doc = "Reader of field `ECP`" ] pub type ECP_R = crate :: R < bool , ECP_A > ; impl ECP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ECP_A { match self . bits { false => ECP_A :: _0 , true => ECP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ECP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ECP_A :: _1 } } # [ doc = "Write proxy for field `ECP`" ] pub struct ECP_W < 'a > { w : & 'a mut W , } impl < 'a > ECP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ECP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel n cannot be suspended by a higher priority channel's service request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ECP_A :: _0 ) } # [ doc = "Channel n can be temporarily suspended by the service request of a higher priority channel." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ECP_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Channel n Arbitration Priority" ] # [ inline ( always ) ] pub fn chpri ( & self ) -> CHPRI_R { CHPRI_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:5 - Channel n Current Group Priority" ] # [ inline ( always ) ] pub fn grppri ( & self ) -> GRPPRI_R { GRPPRI_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Disable Preempt Ability." ] # [ inline ( always ) ] pub fn dpa ( & self ) -> DPA_R { DPA_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Enable Channel Preemption." ] # [ inline ( always ) ] pub fn ecp ( & self ) -> ECP_R { ECP_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - Channel n Arbitration Priority" ] # [ inline ( always ) ] pub fn chpri ( & mut self ) -> CHPRI_W { CHPRI_W { w : self } } # [ doc = "Bit 6 - Disable Preempt Ability." ] # [ inline ( always ) ] pub fn dpa ( & mut self ) -> DPA_W { DPA_W { w : self } } # [ doc = "Bit 7 - Enable Channel Preemption." ] # [ inline ( always ) ] pub fn ecp ( & mut self ) -> ECP_W { ECP_W { w : self } } } } # [ doc = "TCD Source Address\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_saddr](tcd_saddr) module" ] pub type TCD_SADDR = crate :: Reg < u32 , _TCD_SADDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_SADDR ; # [ doc = "`read()` method returns [tcd_saddr::R](tcd_saddr::R) reader structure" ] impl crate :: Readable for TCD_SADDR { } # [ doc = "`write(|w| ..)` method takes [tcd_saddr::W](tcd_saddr::W) writer structure" ] impl crate :: Writable for TCD_SADDR { } # [ doc = "TCD Source Address" ] pub mod tcd_saddr { # [ doc = "Reader of register TCD%s_SADDR" ] pub type R = crate :: R < u32 , super :: TCD_SADDR > ; # [ doc = "Writer for register TCD%s_SADDR" ] pub type W = crate :: W < u32 , super :: TCD_SADDR > ; # [ doc = "Register TCD%s_SADDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_SADDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SADDR`" ] pub type SADDR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `SADDR`" ] pub struct SADDR_W < 'a > { w : & 'a mut W , } impl < 'a > SADDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Source Address" ] # [ inline ( always ) ] pub fn saddr ( & self ) -> SADDR_R { SADDR_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Source Address" ] # [ inline ( always ) ] pub fn saddr ( & mut self ) -> SADDR_W { SADDR_W { w : self } } } } # [ doc = "TCD Signed Source Address Offset\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_soff](tcd_soff) module" ] pub type TCD_SOFF = crate :: Reg < u16 , _TCD_SOFF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_SOFF ; # [ doc = "`read()` method returns [tcd_soff::R](tcd_soff::R) reader structure" ] impl crate :: Readable for TCD_SOFF { } # [ doc = "`write(|w| ..)` method takes [tcd_soff::W](tcd_soff::W) writer structure" ] impl crate :: Writable for TCD_SOFF { } # [ doc = "TCD Signed Source Address Offset" ] pub mod tcd_soff { # [ doc = "Reader of register TCD%s_SOFF" ] pub type R = crate :: R < u16 , super :: TCD_SOFF > ; # [ doc = "Writer for register TCD%s_SOFF" ] pub type W = crate :: W < u16 , super :: TCD_SOFF > ; # [ doc = "Register TCD%s_SOFF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_SOFF { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SOFF`" ] pub type SOFF_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `SOFF`" ] pub struct SOFF_W < 'a > { w : & 'a mut W , } impl < 'a > SOFF_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Source address signed offset" ] # [ inline ( always ) ] pub fn soff ( & self ) -> SOFF_R { SOFF_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Source address signed offset" ] # [ inline ( always ) ] pub fn soff ( & mut self ) -> SOFF_W { SOFF_W { w : self } } } } # [ doc = "TCD Transfer Attributes\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_attr](tcd_attr) module" ] pub type TCD_ATTR = crate :: Reg < u16 , _TCD_ATTR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_ATTR ; # [ doc = "`read()` method returns [tcd_attr::R](tcd_attr::R) reader structure" ] impl crate :: Readable for TCD_ATTR { } # [ doc = "`write(|w| ..)` method takes [tcd_attr::W](tcd_attr::W) writer structure" ] impl crate :: Writable for TCD_ATTR { } # [ doc = "TCD Transfer Attributes" ] pub mod tcd_attr { # [ doc = "Reader of register TCD%s_ATTR" ] pub type R = crate :: R < u16 , super :: TCD_ATTR > ; # [ doc = "Writer for register TCD%s_ATTR" ] pub type W = crate :: W < u16 , super :: TCD_ATTR > ; # [ doc = "Register TCD%s_ATTR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_ATTR { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DSIZE`" ] pub type DSIZE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DSIZE`" ] pub struct DSIZE_W < 'a > { w : & 'a mut W , } impl < 'a > DSIZE_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 ) | ( ( value as u16 ) & 0x07 ) ; self . w } } # [ doc = "Reader of field `DMOD`" ] pub type DMOD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DMOD`" ] pub struct DMOD_W < 'a > { w : & 'a mut W , } impl < 'a > DMOD_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 & ! ( 0x1f << 3 ) ) | ( ( ( value as u16 ) & 0x1f ) << 3 ) ; self . w } } # [ doc = "Source data transfer size\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SSIZE_A { # [ doc = "0: 8-bit" ] _000 , # [ doc = "1: 16-bit" ] _001 , # [ doc = "2: 32-bit" ] _010 , # [ doc = "4: 16-byte burst" ] _100 , # [ doc = "5: 32-byte burst" ] _101 } impl From < SSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : SSIZE_A ) -> Self { match variant { SSIZE_A :: _000 => 0 , SSIZE_A :: _001 => 1 , SSIZE_A :: _010 => 2 , SSIZE_A :: _100 => 4 , SSIZE_A :: _101 => 5 } } } # [ doc = "Reader of field `SSIZE`" ] pub type SSIZE_R = crate :: R < u8 , SSIZE_A > ; impl SSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SSIZE_A :: _000 ) , 1 => Val ( SSIZE_A :: _001 ) , 2 => Val ( SSIZE_A :: _010 ) , 4 => Val ( SSIZE_A :: _100 ) , 5 => Val ( SSIZE_A :: _101 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == SSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == SSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == SSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == SSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == SSIZE_A :: _101 } } # [ doc = "Write proxy for field `SSIZE`" ] pub struct SSIZE_W < 'a > { w : & 'a mut W , } impl < 'a > SSIZE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SSIZE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "8-bit" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( SSIZE_A :: _000 ) } # [ doc = "16-bit" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( SSIZE_A :: _001 ) } # [ doc = "32-bit" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( SSIZE_A :: _010 ) } # [ doc = "16-byte burst" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( SSIZE_A :: _100 ) } # [ doc = "32-byte burst" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( SSIZE_A :: _101 ) } # [ 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 << 8 ) ) | ( ( ( value as u16 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Source Address Modulo\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMOD_A { # [ doc = "0: Source address modulo feature is disabled" ] _0 } impl From < SMOD_A > for u8 { # [ inline ( always ) ] fn from ( variant : SMOD_A ) -> Self { match variant { SMOD_A :: _0 => 0 } } } # [ doc = "Reader of field `SMOD`" ] pub type SMOD_R = crate :: R < u8 , SMOD_A > ; impl SMOD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SMOD_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SMOD_A :: _0 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SMOD_A :: _0 } } # [ doc = "Write proxy for field `SMOD`" ] pub struct SMOD_W < 'a > { w : & 'a mut W , } impl < 'a > SMOD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMOD_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Source address modulo feature is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SMOD_A :: _0 ) } # [ 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 & ! ( 0x1f << 11 ) ) | ( ( ( value as u16 ) & 0x1f ) << 11 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Destination data transfer size" ] # [ inline ( always ) ] pub fn dsize ( & self ) -> DSIZE_R { DSIZE_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:7 - Destination Address Modulo" ] # [ inline ( always ) ] pub fn dmod ( & self ) -> DMOD_R { DMOD_R :: new ( ( ( self . bits >> 3 ) & 0x1f ) as u8 ) } # [ doc = "Bits 8:10 - Source data transfer size" ] # [ inline ( always ) ] pub fn ssize ( & self ) -> SSIZE_R { SSIZE_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bits 11:15 - Source Address Modulo" ] # [ inline ( always ) ] pub fn smod ( & self ) -> SMOD_R { SMOD_R :: new ( ( ( self . bits >> 11 ) & 0x1f ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Destination data transfer size" ] # [ inline ( always ) ] pub fn dsize ( & mut self ) -> DSIZE_W { DSIZE_W { w : self } } # [ doc = "Bits 3:7 - Destination Address Modulo" ] # [ inline ( always ) ] pub fn dmod ( & mut self ) -> DMOD_W { DMOD_W { w : self } } # [ doc = "Bits 8:10 - Source data transfer size" ] # [ inline ( always ) ] pub fn ssize ( & mut self ) -> SSIZE_W { SSIZE_W { w : self } } # [ doc = "Bits 11:15 - Source Address Modulo" ] # [ inline ( always ) ] pub fn smod ( & mut self ) -> SMOD_W { SMOD_W { w : self } } } } # [ doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_nbytes_mlno](tcd_nbytes_mlno) module" ] pub type TCD_NBYTES_MLNO = crate :: Reg < u32 , _TCD_NBYTES_MLNO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_NBYTES_MLNO ; # [ doc = "`read()` method returns [tcd_nbytes_mlno::R](tcd_nbytes_mlno::R) reader structure" ] impl crate :: Readable for TCD_NBYTES_MLNO { } # [ doc = "`write(|w| ..)` method takes [tcd_nbytes_mlno::W](tcd_nbytes_mlno::W) writer structure" ] impl crate :: Writable for TCD_NBYTES_MLNO { } # [ doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)" ] pub mod tcd_nbytes_mlno { # [ doc = "Reader of register TCD%s_NBYTES_MLNO" ] pub type R = crate :: R < u32 , super :: TCD_NBYTES_MLNO > ; # [ doc = "Writer for register TCD%s_NBYTES_MLNO" ] pub type W = crate :: W < u32 , super :: TCD_NBYTES_MLNO > ; # [ doc = "Register TCD%s_NBYTES_MLNO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_NBYTES_MLNO { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `NBYTES`" ] pub type NBYTES_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `NBYTES`" ] pub struct NBYTES_W < 'a > { w : & 'a mut W , } impl < 'a > NBYTES_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Minor Byte Transfer Count" ] # [ inline ( always ) ] pub fn nbytes ( & self ) -> NBYTES_R { NBYTES_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Minor Byte Transfer Count" ] # [ inline ( always ) ] pub fn nbytes ( & mut self ) -> NBYTES_W { NBYTES_W { w : self } } } } # [ doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_nbytes_mloffno](tcd_nbytes_mloffno) module" ] pub type TCD_NBYTES_MLOFFNO = crate :: Reg < u32 , _TCD_NBYTES_MLOFFNO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_NBYTES_MLOFFNO ; # [ doc = "`read()` method returns [tcd_nbytes_mloffno::R](tcd_nbytes_mloffno::R) reader structure" ] impl crate :: Readable for TCD_NBYTES_MLOFFNO { } # [ doc = "`write(|w| ..)` method takes [tcd_nbytes_mloffno::W](tcd_nbytes_mloffno::W) writer structure" ] impl crate :: Writable for TCD_NBYTES_MLOFFNO { } # [ doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)" ] pub mod tcd_nbytes_mloffno { # [ doc = "Reader of register TCD%s_NBYTES_MLOFFNO" ] pub type R = crate :: R < u32 , super :: TCD_NBYTES_MLOFFNO > ; # [ doc = "Writer for register TCD%s_NBYTES_MLOFFNO" ] pub type W = crate :: W < u32 , super :: TCD_NBYTES_MLOFFNO > ; # [ doc = "Register TCD%s_NBYTES_MLOFFNO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_NBYTES_MLOFFNO { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `NBYTES`" ] pub type NBYTES_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `NBYTES`" ] pub struct NBYTES_W < 'a > { w : & 'a mut W , } impl < 'a > NBYTES_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x3fff_ffff ) | ( ( value as u32 ) & 0x3fff_ffff ) ; self . w } } # [ doc = "Destination Minor Loop Offset enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMLOE_A { # [ doc = "0: The minor loop offset is not applied to the DADDR" ] _0 , # [ doc = "1: The minor loop offset is applied to the DADDR" ] _1 } impl From < DMLOE_A > for bool { # [ inline ( always ) ] fn from ( variant : DMLOE_A ) -> Self { match variant { DMLOE_A :: _0 => false , DMLOE_A :: _1 => true } } } # [ doc = "Reader of field `DMLOE`" ] pub type DMLOE_R = crate :: R < bool , DMLOE_A > ; impl DMLOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMLOE_A { match self . bits { false => DMLOE_A :: _0 , true => DMLOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMLOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMLOE_A :: _1 } } # [ doc = "Write proxy for field `DMLOE`" ] pub struct DMLOE_W < 'a > { w : & 'a mut W , } impl < 'a > DMLOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMLOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The minor loop offset is not applied to the DADDR" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMLOE_A :: _0 ) } # [ doc = "The minor loop offset is applied to the DADDR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMLOE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Source Minor Loop Offset Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMLOE_A { # [ doc = "0: The minor loop offset is not applied to the SADDR" ] _0 , # [ doc = "1: The minor loop offset is applied to the SADDR" ] _1 } impl From < SMLOE_A > for bool { # [ inline ( always ) ] fn from ( variant : SMLOE_A ) -> Self { match variant { SMLOE_A :: _0 => false , SMLOE_A :: _1 => true } } } # [ doc = "Reader of field `SMLOE`" ] pub type SMLOE_R = crate :: R < bool , SMLOE_A > ; impl SMLOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SMLOE_A { match self . bits { false => SMLOE_A :: _0 , true => SMLOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SMLOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SMLOE_A :: _1 } } # [ doc = "Write proxy for field `SMLOE`" ] pub struct SMLOE_W < 'a > { w : & 'a mut W , } impl < 'a > SMLOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMLOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The minor loop offset is not applied to the SADDR" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SMLOE_A :: _0 ) } # [ doc = "The minor loop offset is applied to the SADDR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SMLOE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:29 - Minor Byte Transfer Count" ] # [ inline ( always ) ] pub fn nbytes ( & self ) -> NBYTES_R { NBYTES_R :: new ( ( self . bits & 0x3fff_ffff ) as u32 ) } # [ doc = "Bit 30 - Destination Minor Loop Offset enable" ] # [ inline ( always ) ] pub fn dmloe ( & self ) -> DMLOE_R { DMLOE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Source Minor Loop Offset Enable" ] # [ inline ( always ) ] pub fn smloe ( & self ) -> SMLOE_R { SMLOE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:29 - Minor Byte Transfer Count" ] # [ inline ( always ) ] pub fn nbytes ( & mut self ) -> NBYTES_W { NBYTES_W { w : self } } # [ doc = "Bit 30 - Destination Minor Loop Offset enable" ] # [ inline ( always ) ] pub fn dmloe ( & mut self ) -> DMLOE_W { DMLOE_W { w : self } } # [ doc = "Bit 31 - Source Minor Loop Offset Enable" ] # [ inline ( always ) ] pub fn smloe ( & mut self ) -> SMLOE_W { SMLOE_W { w : self } } } } # [ doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_nbytes_mloffyes](tcd_nbytes_mloffyes) module" ] pub type TCD_NBYTES_MLOFFYES = crate :: Reg < u32 , _TCD_NBYTES_MLOFFYES > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_NBYTES_MLOFFYES ; # [ doc = "`read()` method returns [tcd_nbytes_mloffyes::R](tcd_nbytes_mloffyes::R) reader structure" ] impl crate :: Readable for TCD_NBYTES_MLOFFYES { } # [ doc = "`write(|w| ..)` method takes [tcd_nbytes_mloffyes::W](tcd_nbytes_mloffyes::W) writer structure" ] impl crate :: Writable for TCD_NBYTES_MLOFFYES { } # [ doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)" ] pub mod tcd_nbytes_mloffyes { # [ doc = "Reader of register TCD%s_NBYTES_MLOFFYES" ] pub type R = crate :: R < u32 , super :: TCD_NBYTES_MLOFFYES > ; # [ doc = "Writer for register TCD%s_NBYTES_MLOFFYES" ] pub type W = crate :: W < u32 , super :: TCD_NBYTES_MLOFFYES > ; # [ doc = "Register TCD%s_NBYTES_MLOFFYES `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_NBYTES_MLOFFYES { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `NBYTES`" ] pub type NBYTES_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `NBYTES`" ] pub struct NBYTES_W < 'a > { w : & 'a mut W , } impl < 'a > NBYTES_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } # [ doc = "Reader of field `MLOFF`" ] pub type MLOFF_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `MLOFF`" ] pub struct MLOFF_W < 'a > { w : & 'a mut W , } impl < 'a > MLOFF_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x000f_ffff << 10 ) ) | ( ( ( value as u32 ) & 0x000f_ffff ) << 10 ) ; self . w } } # [ doc = "Destination Minor Loop Offset enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMLOE_A { # [ doc = "0: The minor loop offset is not applied to the DADDR" ] _0 , # [ doc = "1: The minor loop offset is applied to the DADDR" ] _1 } impl From < DMLOE_A > for bool { # [ inline ( always ) ] fn from ( variant : DMLOE_A ) -> Self { match variant { DMLOE_A :: _0 => false , DMLOE_A :: _1 => true } } } # [ doc = "Reader of field `DMLOE`" ] pub type DMLOE_R = crate :: R < bool , DMLOE_A > ; impl DMLOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMLOE_A { match self . bits { false => DMLOE_A :: _0 , true => DMLOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMLOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMLOE_A :: _1 } } # [ doc = "Write proxy for field `DMLOE`" ] pub struct DMLOE_W < 'a > { w : & 'a mut W , } impl < 'a > DMLOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMLOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The minor loop offset is not applied to the DADDR" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMLOE_A :: _0 ) } # [ doc = "The minor loop offset is applied to the DADDR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMLOE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Source Minor Loop Offset Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMLOE_A { # [ doc = "0: The minor loop offset is not applied to the SADDR" ] _0 , # [ doc = "1: The minor loop offset is applied to the SADDR" ] _1 } impl From < SMLOE_A > for bool { # [ inline ( always ) ] fn from ( variant : SMLOE_A ) -> Self { match variant { SMLOE_A :: _0 => false , SMLOE_A :: _1 => true } } } # [ doc = "Reader of field `SMLOE`" ] pub type SMLOE_R = crate :: R < bool , SMLOE_A > ; impl SMLOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SMLOE_A { match self . bits { false => SMLOE_A :: _0 , true => SMLOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SMLOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SMLOE_A :: _1 } } # [ doc = "Write proxy for field `SMLOE`" ] pub struct SMLOE_W < 'a > { w : & 'a mut W , } impl < 'a > SMLOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMLOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The minor loop offset is not applied to the SADDR" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SMLOE_A :: _0 ) } # [ doc = "The minor loop offset is applied to the SADDR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SMLOE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Minor Byte Transfer Count" ] # [ inline ( always ) ] pub fn nbytes ( & self ) -> NBYTES_R { NBYTES_R :: new ( ( self . bits & 0x03ff ) as u16 ) } # [ doc = "Bits 10:29 - If SMLOE or DMLOE is set, this field represents a sign-extended offset applied to the source or destination address to form the next-state value after the minor loop completes." ] # [ inline ( always ) ] pub fn mloff ( & self ) -> MLOFF_R { MLOFF_R :: new ( ( ( self . bits >> 10 ) & 0x000f_ffff ) as u32 ) } # [ doc = "Bit 30 - Destination Minor Loop Offset enable" ] # [ inline ( always ) ] pub fn dmloe ( & self ) -> DMLOE_R { DMLOE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Source Minor Loop Offset Enable" ] # [ inline ( always ) ] pub fn smloe ( & self ) -> SMLOE_R { SMLOE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:9 - Minor Byte Transfer Count" ] # [ inline ( always ) ] pub fn nbytes ( & mut self ) -> NBYTES_W { NBYTES_W { w : self } } # [ doc = "Bits 10:29 - If SMLOE or DMLOE is set, this field represents a sign-extended offset applied to the source or destination address to form the next-state value after the minor loop completes." ] # [ inline ( always ) ] pub fn mloff ( & mut self ) -> MLOFF_W { MLOFF_W { w : self } } # [ doc = "Bit 30 - Destination Minor Loop Offset enable" ] # [ inline ( always ) ] pub fn dmloe ( & mut self ) -> DMLOE_W { DMLOE_W { w : self } } # [ doc = "Bit 31 - Source Minor Loop Offset Enable" ] # [ inline ( always ) ] pub fn smloe ( & mut self ) -> SMLOE_W { SMLOE_W { w : self } } } } # [ doc = "TCD Last Source Address Adjustment\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_slast](tcd_slast) module" ] pub type TCD_SLAST = crate :: Reg < u32 , _TCD_SLAST > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_SLAST ; # [ doc = "`read()` method returns [tcd_slast::R](tcd_slast::R) reader structure" ] impl crate :: Readable for TCD_SLAST { } # [ doc = "`write(|w| ..)` method takes [tcd_slast::W](tcd_slast::W) writer structure" ] impl crate :: Writable for TCD_SLAST { } # [ doc = "TCD Last Source Address Adjustment" ] pub mod tcd_slast { # [ doc = "Reader of register TCD%s_SLAST" ] pub type R = crate :: R < u32 , super :: TCD_SLAST > ; # [ doc = "Writer for register TCD%s_SLAST" ] pub type W = crate :: W < u32 , super :: TCD_SLAST > ; # [ doc = "Register TCD%s_SLAST `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_SLAST { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SLAST`" ] pub type SLAST_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `SLAST`" ] pub struct SLAST_W < 'a > { w : & 'a mut W , } impl < 'a > SLAST_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Last Source Address Adjustment" ] # [ inline ( always ) ] pub fn slast ( & self ) -> SLAST_R { SLAST_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Last Source Address Adjustment" ] # [ inline ( always ) ] pub fn slast ( & mut self ) -> SLAST_W { SLAST_W { w : self } } } } # [ doc = "TCD Destination Address\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_daddr](tcd_daddr) module" ] pub type TCD_DADDR = crate :: Reg < u32 , _TCD_DADDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_DADDR ; # [ doc = "`read()` method returns [tcd_daddr::R](tcd_daddr::R) reader structure" ] impl crate :: Readable for TCD_DADDR { } # [ doc = "`write(|w| ..)` method takes [tcd_daddr::W](tcd_daddr::W) writer structure" ] impl crate :: Writable for TCD_DADDR { } # [ doc = "TCD Destination Address" ] pub mod tcd_daddr { # [ doc = "Reader of register TCD%s_DADDR" ] pub type R = crate :: R < u32 , super :: TCD_DADDR > ; # [ doc = "Writer for register TCD%s_DADDR" ] pub type W = crate :: W < u32 , super :: TCD_DADDR > ; # [ doc = "Register TCD%s_DADDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_DADDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DADDR`" ] pub type DADDR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `DADDR`" ] pub struct DADDR_W < 'a > { w : & 'a mut W , } impl < 'a > DADDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Destination Address" ] # [ inline ( always ) ] pub fn daddr ( & self ) -> DADDR_R { DADDR_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Destination Address" ] # [ inline ( always ) ] pub fn daddr ( & mut self ) -> DADDR_W { DADDR_W { w : self } } } } # [ doc = "TCD Signed Destination Address Offset\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_doff](tcd_doff) module" ] pub type TCD_DOFF = crate :: Reg < u16 , _TCD_DOFF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_DOFF ; # [ doc = "`read()` method returns [tcd_doff::R](tcd_doff::R) reader structure" ] impl crate :: Readable for TCD_DOFF { } # [ doc = "`write(|w| ..)` method takes [tcd_doff::W](tcd_doff::W) writer structure" ] impl crate :: Writable for TCD_DOFF { } # [ doc = "TCD Signed Destination Address Offset" ] pub mod tcd_doff { # [ doc = "Reader of register TCD%s_DOFF" ] pub type R = crate :: R < u16 , super :: TCD_DOFF > ; # [ doc = "Writer for register TCD%s_DOFF" ] pub type W = crate :: W < u16 , super :: TCD_DOFF > ; # [ doc = "Register TCD%s_DOFF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_DOFF { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DOFF`" ] pub type DOFF_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DOFF`" ] pub struct DOFF_W < 'a > { w : & 'a mut W , } impl < 'a > DOFF_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Destination Address Signed Offset" ] # [ inline ( always ) ] pub fn doff ( & self ) -> DOFF_R { DOFF_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Destination Address Signed Offset" ] # [ inline ( always ) ] pub fn doff ( & mut self ) -> DOFF_W { DOFF_W { w : self } } } } # [ doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_citer_elinkno](tcd_citer_elinkno) module" ] pub type TCD_CITER_ELINKNO = crate :: Reg < u16 , _TCD_CITER_ELINKNO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_CITER_ELINKNO ; # [ doc = "`read()` method returns [tcd_citer_elinkno::R](tcd_citer_elinkno::R) reader structure" ] impl crate :: Readable for TCD_CITER_ELINKNO { } # [ doc = "`write(|w| ..)` method takes [tcd_citer_elinkno::W](tcd_citer_elinkno::W) writer structure" ] impl crate :: Writable for TCD_CITER_ELINKNO { } # [ doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] pub mod tcd_citer_elinkno { # [ doc = "Reader of register TCD%s_CITER_ELINKNO" ] pub type R = crate :: R < u16 , super :: TCD_CITER_ELINKNO > ; # [ doc = "Writer for register TCD%s_CITER_ELINKNO" ] pub type W = crate :: W < u16 , super :: TCD_CITER_ELINKNO > ; # [ doc = "Register TCD%s_CITER_ELINKNO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_CITER_ELINKNO { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CITER`" ] pub type CITER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CITER`" ] pub struct CITER_W < 'a > { w : & 'a mut W , } impl < 'a > CITER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x7fff ) | ( ( value as u16 ) & 0x7fff ) ; self . w } } # [ doc = "Enable channel-to-channel linking on minor-loop complete\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ELINK_A { # [ doc = "0: The channel-to-channel linking is disabled" ] _0 , # [ doc = "1: The channel-to-channel linking is enabled" ] _1 } impl From < ELINK_A > for bool { # [ inline ( always ) ] fn from ( variant : ELINK_A ) -> Self { match variant { ELINK_A :: _0 => false , ELINK_A :: _1 => true } } } # [ doc = "Reader of field `ELINK`" ] pub type ELINK_R = crate :: R < bool , ELINK_A > ; impl ELINK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ELINK_A { match self . bits { false => ELINK_A :: _0 , true => ELINK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ELINK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ELINK_A :: _1 } } # [ doc = "Write proxy for field `ELINK`" ] pub struct ELINK_W < 'a > { w : & 'a mut W , } impl < 'a > ELINK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ELINK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel-to-channel linking is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ELINK_A :: _0 ) } # [ doc = "The channel-to-channel linking is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ELINK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u16 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bits 0:14 - Current Major Iteration Count" ] # [ inline ( always ) ] pub fn citer ( & self ) -> CITER_R { CITER_R :: new ( ( self . bits & 0x7fff ) as u16 ) } # [ doc = "Bit 15 - Enable channel-to-channel linking on minor-loop complete" ] # [ inline ( always ) ] pub fn elink ( & self ) -> ELINK_R { ELINK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:14 - Current Major Iteration Count" ] # [ inline ( always ) ] pub fn citer ( & mut self ) -> CITER_W { CITER_W { w : self } } # [ doc = "Bit 15 - Enable channel-to-channel linking on minor-loop complete" ] # [ inline ( always ) ] pub fn elink ( & mut self ) -> ELINK_W { ELINK_W { w : self } } } } # [ doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_citer_elinkyes](tcd_citer_elinkyes) module" ] pub type TCD_CITER_ELINKYES = crate :: Reg < u16 , _TCD_CITER_ELINKYES > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_CITER_ELINKYES ; # [ doc = "`read()` method returns [tcd_citer_elinkyes::R](tcd_citer_elinkyes::R) reader structure" ] impl crate :: Readable for TCD_CITER_ELINKYES { } # [ doc = "`write(|w| ..)` method takes [tcd_citer_elinkyes::W](tcd_citer_elinkyes::W) writer structure" ] impl crate :: Writable for TCD_CITER_ELINKYES { } # [ doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] pub mod tcd_citer_elinkyes { # [ doc = "Reader of register TCD%s_CITER_ELINKYES" ] pub type R = crate :: R < u16 , super :: TCD_CITER_ELINKYES > ; # [ doc = "Writer for register TCD%s_CITER_ELINKYES" ] pub type W = crate :: W < u16 , super :: TCD_CITER_ELINKYES > ; # [ doc = "Register TCD%s_CITER_ELINKYES `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_CITER_ELINKYES { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CITER`" ] pub type CITER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CITER`" ] pub struct CITER_W < 'a > { w : & 'a mut W , } impl < 'a > CITER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x01ff ) | ( ( value as u16 ) & 0x01ff ) ; self . w } } # [ doc = "Reader of field `LINKCH`" ] pub type LINKCH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `LINKCH`" ] pub struct LINKCH_W < 'a > { w : & 'a mut W , } impl < 'a > LINKCH_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 & ! ( 0x1f << 9 ) ) | ( ( ( value as u16 ) & 0x1f ) << 9 ) ; self . w } } # [ doc = "Enable channel-to-channel linking on minor-loop complete\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ELINK_A { # [ doc = "0: The channel-to-channel linking is disabled" ] _0 , # [ doc = "1: The channel-to-channel linking is enabled" ] _1 } impl From < ELINK_A > for bool { # [ inline ( always ) ] fn from ( variant : ELINK_A ) -> Self { match variant { ELINK_A :: _0 => false , ELINK_A :: _1 => true } } } # [ doc = "Reader of field `ELINK`" ] pub type ELINK_R = crate :: R < bool , ELINK_A > ; impl ELINK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ELINK_A { match self . bits { false => ELINK_A :: _0 , true => ELINK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ELINK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ELINK_A :: _1 } } # [ doc = "Write proxy for field `ELINK`" ] pub struct ELINK_W < 'a > { w : & 'a mut W , } impl < 'a > ELINK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ELINK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel-to-channel linking is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ELINK_A :: _0 ) } # [ doc = "The channel-to-channel linking is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ELINK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u16 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bits 0:8 - Current Major Iteration Count" ] # [ inline ( always ) ] pub fn citer ( & self ) -> CITER_R { CITER_R :: new ( ( self . bits & 0x01ff ) as u16 ) } # [ doc = "Bits 9:13 - Minor Loop Link Channel Number" ] # [ inline ( always ) ] pub fn linkch ( & self ) -> LINKCH_R { LINKCH_R :: new ( ( ( self . bits >> 9 ) & 0x1f ) as u8 ) } # [ doc = "Bit 15 - Enable channel-to-channel linking on minor-loop complete" ] # [ inline ( always ) ] pub fn elink ( & self ) -> ELINK_R { ELINK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:8 - Current Major Iteration Count" ] # [ inline ( always ) ] pub fn citer ( & mut self ) -> CITER_W { CITER_W { w : self } } # [ doc = "Bits 9:13 - Minor Loop Link Channel Number" ] # [ inline ( always ) ] pub fn linkch ( & mut self ) -> LINKCH_W { LINKCH_W { w : self } } # [ doc = "Bit 15 - Enable channel-to-channel linking on minor-loop complete" ] # [ inline ( always ) ] pub fn elink ( & mut self ) -> ELINK_W { ELINK_W { w : self } } } } # [ doc = "TCD Last Destination Address Adjustment/Scatter Gather Address\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_dlastsga](tcd_dlastsga) module" ] pub type TCD_DLASTSGA = crate :: Reg < u32 , _TCD_DLASTSGA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_DLASTSGA ; # [ doc = "`read()` method returns [tcd_dlastsga::R](tcd_dlastsga::R) reader structure" ] impl crate :: Readable for TCD_DLASTSGA { } # [ doc = "`write(|w| ..)` method takes [tcd_dlastsga::W](tcd_dlastsga::W) writer structure" ] impl crate :: Writable for TCD_DLASTSGA { } # [ doc = "TCD Last Destination Address Adjustment/Scatter Gather Address" ] pub mod tcd_dlastsga { # [ doc = "Reader of register TCD%s_DLASTSGA" ] pub type R = crate :: R < u32 , super :: TCD_DLASTSGA > ; # [ doc = "Writer for register TCD%s_DLASTSGA" ] pub type W = crate :: W < u32 , super :: TCD_DLASTSGA > ; # [ doc = "Register TCD%s_DLASTSGA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_DLASTSGA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DLASTSGA`" ] pub type DLASTSGA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `DLASTSGA`" ] pub struct DLASTSGA_W < 'a > { w : & 'a mut W , } impl < 'a > DLASTSGA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Destination last address adjustment or the memory address for the next transfer control descriptor to be loaded into this channel (scatter/gather)" ] # [ inline ( always ) ] pub fn dlastsga ( & self ) -> DLASTSGA_R { DLASTSGA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Destination last address adjustment or the memory address for the next transfer control descriptor to be loaded into this channel (scatter/gather)" ] # [ inline ( always ) ] pub fn dlastsga ( & mut self ) -> DLASTSGA_W { DLASTSGA_W { w : self } } } } # [ doc = "TCD Control and Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_csr](tcd_csr) module" ] pub type TCD_CSR = crate :: Reg < u16 , _TCD_CSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_CSR ; # [ doc = "`read()` method returns [tcd_csr::R](tcd_csr::R) reader structure" ] impl crate :: Readable for TCD_CSR { } # [ doc = "`write(|w| ..)` method takes [tcd_csr::W](tcd_csr::W) writer structure" ] impl crate :: Writable for TCD_CSR { } # [ doc = "TCD Control and Status" ] pub mod tcd_csr { # [ doc = "Reader of register TCD%s_CSR" ] pub type R = crate :: R < u16 , super :: TCD_CSR > ; # [ doc = "Writer for register TCD%s_CSR" ] pub type W = crate :: W < u16 , super :: TCD_CSR > ; # [ doc = "Register TCD%s_CSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_CSR { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel Start\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum START_A { # [ doc = "0: The channel is not explicitly started." ] _0 , # [ doc = "1: The channel is explicitly started via a software initiated service request." ] _1 } impl From < START_A > for bool { # [ inline ( always ) ] fn from ( variant : START_A ) -> Self { match variant { START_A :: _0 => false , START_A :: _1 => true } } } # [ doc = "Reader of field `START`" ] pub type START_R = crate :: R < bool , START_A > ; impl START_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> START_A { match self . bits { false => START_A :: _0 , true => START_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == START_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == START_A :: _1 } } # [ doc = "Write proxy for field `START`" ] pub struct START_W < 'a > { w : & 'a mut W , } impl < 'a > START_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : START_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel is not explicitly started." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( START_A :: _0 ) } # [ doc = "The channel is explicitly started via a software initiated service request." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( START_A :: _1 ) } # [ 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 ) | ( ( value as u16 ) & 0x01 ) ; self . w } } # [ doc = "Enable an interrupt when major iteration count completes.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INTMAJOR_A { # [ doc = "0: The end-of-major loop interrupt is disabled." ] _0 , # [ doc = "1: The end-of-major loop interrupt is enabled." ] _1 } impl From < INTMAJOR_A > for bool { # [ inline ( always ) ] fn from ( variant : INTMAJOR_A ) -> Self { match variant { INTMAJOR_A :: _0 => false , INTMAJOR_A :: _1 => true } } } # [ doc = "Reader of field `INTMAJOR`" ] pub type INTMAJOR_R = crate :: R < bool , INTMAJOR_A > ; impl INTMAJOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INTMAJOR_A { match self . bits { false => INTMAJOR_A :: _0 , true => INTMAJOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INTMAJOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INTMAJOR_A :: _1 } } # [ doc = "Write proxy for field `INTMAJOR`" ] pub struct INTMAJOR_W < 'a > { w : & 'a mut W , } impl < 'a > INTMAJOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INTMAJOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The end-of-major loop interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INTMAJOR_A :: _0 ) } # [ doc = "The end-of-major loop interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INTMAJOR_A :: _1 ) } # [ 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 u16 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Enable an interrupt when major counter is half complete.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INTHALF_A { # [ doc = "0: The half-point interrupt is disabled." ] _0 , # [ doc = "1: The half-point interrupt is enabled." ] _1 } impl From < INTHALF_A > for bool { # [ inline ( always ) ] fn from ( variant : INTHALF_A ) -> Self { match variant { INTHALF_A :: _0 => false , INTHALF_A :: _1 => true } } } # [ doc = "Reader of field `INTHALF`" ] pub type INTHALF_R = crate :: R < bool , INTHALF_A > ; impl INTHALF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INTHALF_A { match self . bits { false => INTHALF_A :: _0 , true => INTHALF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INTHALF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INTHALF_A :: _1 } } # [ doc = "Write proxy for field `INTHALF`" ] pub struct INTHALF_W < 'a > { w : & 'a mut W , } impl < 'a > INTHALF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INTHALF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The half-point interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INTHALF_A :: _0 ) } # [ doc = "The half-point interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INTHALF_A :: _1 ) } # [ 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 u16 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Disable Request\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DREQ_A { # [ doc = "0: The channel's ERQ bit is not affected." ] _0 , # [ doc = "1: The channel's ERQ bit is cleared when the major loop is complete." ] _1 } impl From < DREQ_A > for bool { # [ inline ( always ) ] fn from ( variant : DREQ_A ) -> Self { match variant { DREQ_A :: _0 => false , DREQ_A :: _1 => true } } } # [ doc = "Reader of field `DREQ`" ] pub type DREQ_R = crate :: R < bool , DREQ_A > ; impl DREQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DREQ_A { match self . bits { false => DREQ_A :: _0 , true => DREQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DREQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DREQ_A :: _1 } } # [ doc = "Write proxy for field `DREQ`" ] pub struct DREQ_W < 'a > { w : & 'a mut W , } impl < 'a > DREQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DREQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel's ERQ bit is not affected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DREQ_A :: _0 ) } # [ doc = "The channel's ERQ bit is cleared when the major loop is complete." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DREQ_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u16 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enable Scatter/Gather Processing\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ESG_A { # [ doc = "0: The current channel's TCD is normal format." ] _0 , # [ doc = "1: The current channel's TCD specifies a scatter gather format. The DLASTSGA field provides a memory pointer to the next TCD to be loaded into this channel after the major loop completes its execution." ] _1 } impl From < ESG_A > for bool { # [ inline ( always ) ] fn from ( variant : ESG_A ) -> Self { match variant { ESG_A :: _0 => false , ESG_A :: _1 => true } } } # [ doc = "Reader of field `ESG`" ] pub type ESG_R = crate :: R < bool , ESG_A > ; impl ESG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ESG_A { match self . bits { false => ESG_A :: _0 , true => ESG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ESG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ESG_A :: _1 } } # [ doc = "Write proxy for field `ESG`" ] pub struct ESG_W < 'a > { w : & 'a mut W , } impl < 'a > ESG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ESG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The current channel's TCD is normal format." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ESG_A :: _0 ) } # [ doc = "The current channel's TCD specifies a scatter gather format. The DLASTSGA field provides a memory pointer to the next TCD to be loaded into this channel after the major loop completes its execution." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ESG_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u16 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Enable channel-to-channel linking on major loop complete\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAJORELINK_A { # [ doc = "0: The channel-to-channel linking is disabled." ] _0 , # [ doc = "1: The channel-to-channel linking is enabled." ] _1 } impl From < MAJORELINK_A > for bool { # [ inline ( always ) ] fn from ( variant : MAJORELINK_A ) -> Self { match variant { MAJORELINK_A :: _0 => false , MAJORELINK_A :: _1 => true } } } # [ doc = "Reader of field `MAJORELINK`" ] pub type MAJORELINK_R = crate :: R < bool , MAJORELINK_A > ; impl MAJORELINK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAJORELINK_A { match self . bits { false => MAJORELINK_A :: _0 , true => MAJORELINK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAJORELINK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAJORELINK_A :: _1 } } # [ doc = "Write proxy for field `MAJORELINK`" ] pub struct MAJORELINK_W < 'a > { w : & 'a mut W , } impl < 'a > MAJORELINK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAJORELINK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel-to-channel linking is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAJORELINK_A :: _0 ) } # [ doc = "The channel-to-channel linking is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAJORELINK_A :: _1 ) } # [ 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 u16 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `ACTIVE`" ] pub type ACTIVE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ACTIVE`" ] pub struct ACTIVE_W < 'a > { w : & 'a mut W , } impl < 'a > ACTIVE_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 u16 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `DONE`" ] pub type DONE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DONE`" ] pub struct DONE_W < 'a > { w : & 'a mut W , } impl < 'a > DONE_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 u16 ) & 0x01 ) << 7 ) ; self . w } } # [ doc = "Reader of field `MAJORLINKCH`" ] pub type MAJORLINKCH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MAJORLINKCH`" ] pub struct MAJORLINKCH_W < 'a > { w : & 'a mut W , } impl < 'a > MAJORLINKCH_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 & ! ( 0x1f << 8 ) ) | ( ( ( value as u16 ) & 0x1f ) << 8 ) ; self . w } } # [ doc = "Bandwidth Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BWC_A { # [ doc = "0: No eDMA engine stalls" ] _00 , # [ doc = "2: eDMA engine stalls for 4 cycles after each R/W." ] _10 , # [ doc = "3: eDMA engine stalls for 8 cycles after each R/W." ] _11 } impl From < BWC_A > for u8 { # [ inline ( always ) ] fn from ( variant : BWC_A ) -> Self { match variant { BWC_A :: _00 => 0 , BWC_A :: _10 => 2 , BWC_A :: _11 => 3 } } } # [ doc = "Reader of field `BWC`" ] pub type BWC_R = crate :: R < u8 , BWC_A > ; impl BWC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , BWC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( BWC_A :: _00 ) , 2 => Val ( BWC_A :: _10 ) , 3 => Val ( BWC_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == BWC_A :: _00 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == BWC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == BWC_A :: _11 } } # [ doc = "Write proxy for field `BWC`" ] pub struct BWC_W < 'a > { w : & 'a mut W , } impl < 'a > BWC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BWC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No eDMA engine stalls" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( BWC_A :: _00 ) } # [ doc = "eDMA engine stalls for 4 cycles after each R/W." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( BWC_A :: _10 ) } # [ doc = "eDMA engine stalls for 8 cycles after each R/W." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( BWC_A :: _11 ) } # [ 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 << 14 ) ) | ( ( ( value as u16 ) & 0x03 ) << 14 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel Start" ] # [ inline ( always ) ] pub fn start ( & self ) -> START_R { START_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Enable an interrupt when major iteration count completes." ] # [ inline ( always ) ] pub fn intmajor ( & self ) -> INTMAJOR_R { INTMAJOR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Enable an interrupt when major counter is half complete." ] # [ inline ( always ) ] pub fn inthalf ( & self ) -> INTHALF_R { INTHALF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Disable Request" ] # [ inline ( always ) ] pub fn dreq ( & self ) -> DREQ_R { DREQ_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enable Scatter/Gather Processing" ] # [ inline ( always ) ] pub fn esg ( & self ) -> ESG_R { ESG_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enable channel-to-channel linking on major loop complete" ] # [ inline ( always ) ] pub fn majorelink ( & self ) -> MAJORELINK_R { MAJORELINK_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel Active" ] # [ inline ( always ) ] pub fn active ( & self ) -> ACTIVE_R { ACTIVE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Done" ] # [ inline ( always ) ] pub fn done ( & self ) -> DONE_R { DONE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:12 - Major Loop Link Channel Number" ] # [ inline ( always ) ] pub fn majorlinkch ( & self ) -> MAJORLINKCH_R { MAJORLINKCH_R :: new ( ( ( self . bits >> 8 ) & 0x1f ) as u8 ) } # [ doc = "Bits 14:15 - Bandwidth Control" ] # [ inline ( always ) ] pub fn bwc ( & self ) -> BWC_R { BWC_R :: new ( ( ( self . bits >> 14 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bit 0 - Channel Start" ] # [ inline ( always ) ] pub fn start ( & mut self ) -> START_W { START_W { w : self } } # [ doc = "Bit 1 - Enable an interrupt when major iteration count completes." ] # [ inline ( always ) ] pub fn intmajor ( & mut self ) -> INTMAJOR_W { INTMAJOR_W { w : self } } # [ doc = "Bit 2 - Enable an interrupt when major counter is half complete." ] # [ inline ( always ) ] pub fn inthalf ( & mut self ) -> INTHALF_W { INTHALF_W { w : self } } # [ doc = "Bit 3 - Disable Request" ] # [ inline ( always ) ] pub fn dreq ( & mut self ) -> DREQ_W { DREQ_W { w : self } } # [ doc = "Bit 4 - Enable Scatter/Gather Processing" ] # [ inline ( always ) ] pub fn esg ( & mut self ) -> ESG_W { ESG_W { w : self } } # [ doc = "Bit 5 - Enable channel-to-channel linking on major loop complete" ] # [ inline ( always ) ] pub fn majorelink ( & mut self ) -> MAJORELINK_W { MAJORELINK_W { w : self } } # [ doc = "Bit 6 - Channel Active" ] # [ inline ( always ) ] pub fn active ( & mut self ) -> ACTIVE_W { ACTIVE_W { w : self } } # [ doc = "Bit 7 - Channel Done" ] # [ inline ( always ) ] pub fn done ( & mut self ) -> DONE_W { DONE_W { w : self } } # [ doc = "Bits 8:12 - Major Loop Link Channel Number" ] # [ inline ( always ) ] pub fn majorlinkch ( & mut self ) -> MAJORLINKCH_W { MAJORLINKCH_W { w : self } } # [ doc = "Bits 14:15 - Bandwidth Control" ] # [ inline ( always ) ] pub fn bwc ( & mut self ) -> BWC_W { BWC_W { w : self } } } } # [ doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_biter_elinkno](tcd_biter_elinkno) module" ] pub type TCD_BITER_ELINKNO = crate :: Reg < u16 , _TCD_BITER_ELINKNO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_BITER_ELINKNO ; # [ doc = "`read()` method returns [tcd_biter_elinkno::R](tcd_biter_elinkno::R) reader structure" ] impl crate :: Readable for TCD_BITER_ELINKNO { } # [ doc = "`write(|w| ..)` method takes [tcd_biter_elinkno::W](tcd_biter_elinkno::W) writer structure" ] impl crate :: Writable for TCD_BITER_ELINKNO { } # [ doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)" ] pub mod tcd_biter_elinkno { # [ doc = "Reader of register TCD%s_BITER_ELINKNO" ] pub type R = crate :: R < u16 , super :: TCD_BITER_ELINKNO > ; # [ doc = "Writer for register TCD%s_BITER_ELINKNO" ] pub type W = crate :: W < u16 , super :: TCD_BITER_ELINKNO > ; # [ doc = "Register TCD%s_BITER_ELINKNO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_BITER_ELINKNO { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BITER`" ] pub type BITER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `BITER`" ] pub struct BITER_W < 'a > { w : & 'a mut W , } impl < 'a > BITER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x7fff ) | ( ( value as u16 ) & 0x7fff ) ; self . w } } # [ doc = "Enables channel-to-channel linking on minor loop complete\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ELINK_A { # [ doc = "0: The channel-to-channel linking is disabled" ] _0 , # [ doc = "1: The channel-to-channel linking is enabled" ] _1 } impl From < ELINK_A > for bool { # [ inline ( always ) ] fn from ( variant : ELINK_A ) -> Self { match variant { ELINK_A :: _0 => false , ELINK_A :: _1 => true } } } # [ doc = "Reader of field `ELINK`" ] pub type ELINK_R = crate :: R < bool , ELINK_A > ; impl ELINK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ELINK_A { match self . bits { false => ELINK_A :: _0 , true => ELINK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ELINK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ELINK_A :: _1 } } # [ doc = "Write proxy for field `ELINK`" ] pub struct ELINK_W < 'a > { w : & 'a mut W , } impl < 'a > ELINK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ELINK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel-to-channel linking is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ELINK_A :: _0 ) } # [ doc = "The channel-to-channel linking is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ELINK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u16 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bits 0:14 - Starting Major Iteration Count" ] # [ inline ( always ) ] pub fn biter ( & self ) -> BITER_R { BITER_R :: new ( ( self . bits & 0x7fff ) as u16 ) } # [ doc = "Bit 15 - Enables channel-to-channel linking on minor loop complete" ] # [ inline ( always ) ] pub fn elink ( & self ) -> ELINK_R { ELINK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:14 - Starting Major Iteration Count" ] # [ inline ( always ) ] pub fn biter ( & mut self ) -> BITER_W { BITER_W { w : self } } # [ doc = "Bit 15 - Enables channel-to-channel linking on minor loop complete" ] # [ inline ( always ) ] pub fn elink ( & mut self ) -> ELINK_W { ELINK_W { w : self } } } } # [ doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcd_biter_elinkyes](tcd_biter_elinkyes) module" ] pub type TCD_BITER_ELINKYES = crate :: Reg < u16 , _TCD_BITER_ELINKYES > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCD_BITER_ELINKYES ; # [ doc = "`read()` method returns [tcd_biter_elinkyes::R](tcd_biter_elinkyes::R) reader structure" ] impl crate :: Readable for TCD_BITER_ELINKYES { } # [ doc = "`write(|w| ..)` method takes [tcd_biter_elinkyes::W](tcd_biter_elinkyes::W) writer structure" ] impl crate :: Writable for TCD_BITER_ELINKYES { } # [ doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)" ] pub mod tcd_biter_elinkyes { # [ doc = "Reader of register TCD%s_BITER_ELINKYES" ] pub type R = crate :: R < u16 , super :: TCD_BITER_ELINKYES > ; # [ doc = "Writer for register TCD%s_BITER_ELINKYES" ] pub type W = crate :: W < u16 , super :: TCD_BITER_ELINKYES > ; # [ doc = "Register TCD%s_BITER_ELINKYES `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCD_BITER_ELINKYES { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BITER`" ] pub type BITER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `BITER`" ] pub struct BITER_W < 'a > { w : & 'a mut W , } impl < 'a > BITER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x01ff ) | ( ( value as u16 ) & 0x01ff ) ; self . w } } # [ doc = "Reader of field `LINKCH`" ] pub type LINKCH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `LINKCH`" ] pub struct LINKCH_W < 'a > { w : & 'a mut W , } impl < 'a > LINKCH_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 & ! ( 0x1f << 9 ) ) | ( ( ( value as u16 ) & 0x1f ) << 9 ) ; self . w } } # [ doc = "Enables channel-to-channel linking on minor loop complete\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ELINK_A { # [ doc = "0: The channel-to-channel linking is disabled" ] _0 , # [ doc = "1: The channel-to-channel linking is enabled" ] _1 } impl From < ELINK_A > for bool { # [ inline ( always ) ] fn from ( variant : ELINK_A ) -> Self { match variant { ELINK_A :: _0 => false , ELINK_A :: _1 => true } } } # [ doc = "Reader of field `ELINK`" ] pub type ELINK_R = crate :: R < bool , ELINK_A > ; impl ELINK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ELINK_A { match self . bits { false => ELINK_A :: _0 , true => ELINK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ELINK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ELINK_A :: _1 } } # [ doc = "Write proxy for field `ELINK`" ] pub struct ELINK_W < 'a > { w : & 'a mut W , } impl < 'a > ELINK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ELINK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel-to-channel linking is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ELINK_A :: _0 ) } # [ doc = "The channel-to-channel linking is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ELINK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u16 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bits 0:8 - Starting major iteration count" ] # [ inline ( always ) ] pub fn biter ( & self ) -> BITER_R { BITER_R :: new ( ( self . bits & 0x01ff ) as u16 ) } # [ doc = "Bits 9:13 - Link Channel Number" ] # [ inline ( always ) ] pub fn linkch ( & self ) -> LINKCH_R { LINKCH_R :: new ( ( ( self . bits >> 9 ) & 0x1f ) as u8 ) } # [ doc = "Bit 15 - Enables channel-to-channel linking on minor loop complete" ] # [ inline ( always ) ] pub fn elink ( & self ) -> ELINK_R { ELINK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:8 - Starting major iteration count" ] # [ inline ( always ) ] pub fn biter ( & mut self ) -> BITER_W { BITER_W { w : self } } # [ doc = "Bits 9:13 - Link Channel Number" ] # [ inline ( always ) ] pub fn linkch ( & mut self ) -> LINKCH_W { LINKCH_W { w : self } } # [ doc = "Bit 15 - Enables channel-to-channel linking on minor loop complete" ] # [ inline ( always ) ] pub fn elink ( & mut self ) -> ELINK_W { ELINK_W { w : self } } } } } # [ doc = "FlexBus external bus interface" ] pub struct FB { _marker : PhantomData < * const ( ) > } unsafe impl Send for FB { } impl FB { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const fb :: RegisterBlock { 0x4000_c000 as * const _ } } impl Deref for FB { type Target = fb :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * FB :: ptr ( ) } } } # [ doc = "FlexBus external bus interface" ] pub mod fb { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Chip Select Address Register" ] pub csar0 : CSAR , # [ doc = "0x04 - Chip Select Mask Register" ] pub csmr0 : CSMR , # [ doc = "0x08 - Chip Select Control Register" ] pub cscr0 : CSCR , # [ doc = "0x0c - Chip Select Address Register" ] pub csar1 : CSAR , # [ doc = "0x10 - Chip Select Mask Register" ] pub csmr1 : CSMR , # [ doc = "0x14 - Chip Select Control Register" ] pub cscr1 : CSCR , # [ doc = "0x18 - Chip Select Address Register" ] pub csar2 : CSAR , # [ doc = "0x1c - Chip Select Mask Register" ] pub csmr2 : CSMR , # [ doc = "0x20 - Chip Select Control Register" ] pub cscr2 : CSCR , # [ doc = "0x24 - Chip Select Address Register" ] pub csar3 : CSAR , # [ doc = "0x28 - Chip Select Mask Register" ] pub csmr3 : CSMR , # [ doc = "0x2c - Chip Select Control Register" ] pub cscr3 : CSCR , # [ doc = "0x30 - Chip Select Address Register" ] pub csar4 : CSAR , # [ doc = "0x34 - Chip Select Mask Register" ] pub csmr4 : CSMR , # [ doc = "0x38 - Chip Select Control Register" ] pub cscr4 : CSCR , # [ doc = "0x3c - Chip Select Address Register" ] pub csar5 : CSAR , # [ doc = "0x40 - Chip Select Mask Register" ] pub csmr5 : CSMR , # [ doc = "0x44 - Chip Select Control Register" ] pub cscr5 : CSCR , _reserved18 : [ u8 ; 24usize ] , # [ doc = "0x60 - Chip Select port Multiplexing Control Register" ] pub cspmcr : CSPMCR , } # [ doc = "Chip Select Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csar](csar) module" ] pub type CSAR = crate :: Reg < u32 , _CSAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSAR ; # [ doc = "`read()` method returns [csar::R](csar::R) reader structure" ] impl crate :: Readable for CSAR { } # [ doc = "`write(|w| ..)` method takes [csar::W](csar::W) writer structure" ] impl crate :: Writable for CSAR { } # [ doc = "Chip Select Address Register" ] pub mod csar { # [ doc = "Reader of register CSAR%s" ] pub type R = crate :: R < u32 , super :: CSAR > ; # [ doc = "Writer for register CSAR%s" ] pub type W = crate :: W < u32 , super :: CSAR > ; # [ doc = "Register CSAR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BA`" ] pub type BA_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `BA`" ] pub struct BA_W < 'a > { w : & 'a mut W , } impl < 'a > BA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 16:31 - Base Address" ] # [ inline ( always ) ] pub fn ba ( & self ) -> BA_R { BA_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 16:31 - Base Address" ] # [ inline ( always ) ] pub fn ba ( & mut self ) -> BA_W { BA_W { w : self } } } } # [ doc = "Chip Select Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csmr](csmr) module" ] pub type CSMR = crate :: Reg < u32 , _CSMR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSMR ; # [ doc = "`read()` method returns [csmr::R](csmr::R) reader structure" ] impl crate :: Readable for CSMR { } # [ doc = "`write(|w| ..)` method takes [csmr::W](csmr::W) writer structure" ] impl crate :: Writable for CSMR { } # [ doc = "Chip Select Mask Register" ] pub mod csmr { # [ doc = "Reader of register CSMR%s" ] pub type R = crate :: R < u32 , super :: CSMR > ; # [ doc = "Writer for register CSMR%s" ] pub type W = crate :: W < u32 , super :: CSMR > ; # [ doc = "Register CSMR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSMR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Valid\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum V_A { # [ doc = "0: Chip-select is invalid." ] _0 , # [ doc = "1: Chip-select is valid." ] _1 } impl From < V_A > for bool { # [ inline ( always ) ] fn from ( variant : V_A ) -> Self { match variant { V_A :: _0 => false , V_A :: _1 => true } } } # [ doc = "Reader of field `V`" ] pub type V_R = crate :: R < bool , V_A > ; impl V_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> V_A { match self . bits { false => V_A :: _0 , true => V_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == V_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == V_A :: _1 } } # [ doc = "Write proxy for field `V`" ] pub struct V_W < 'a > { w : & 'a mut W , } impl < 'a > V_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : V_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Chip-select is invalid." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( V_A :: _0 ) } # [ doc = "Chip-select is valid." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( V_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP_A { # [ doc = "0: Write accesses are allowed." ] _0 , # [ doc = "1: Write accesses are not allowed. Attempting to write to the range of addresses for which the WP bit is set results in a bus error termination of the internal cycle and no external cycle." ] _1 } impl From < WP_A > for bool { # [ inline ( always ) ] fn from ( variant : WP_A ) -> Self { match variant { WP_A :: _0 => false , WP_A :: _1 => true } } } # [ doc = "Reader of field `WP`" ] pub type WP_R = crate :: R < bool , WP_A > ; impl WP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP_A { match self . bits { false => WP_A :: _0 , true => WP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP_A :: _1 } } # [ doc = "Write proxy for field `WP`" ] pub struct WP_W < 'a > { w : & 'a mut W , } impl < 'a > WP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write accesses are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP_A :: _0 ) } # [ doc = "Write accesses are not allowed. Attempting to write to the range of addresses for which the WP bit is set results in a bus error termination of the internal cycle and no external cycle." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Base Address Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BAM_A { # [ doc = "0: The corresponding address bit in CSAR is used in the chip-select decode." ] _0 , # [ doc = "1: The corresponding address bit in CSAR is a don't care in the chip-select decode." ] _1 } impl From < BAM_A > for u16 { # [ inline ( always ) ] fn from ( variant : BAM_A ) -> Self { match variant { BAM_A :: _0 => 0 , BAM_A :: _1 => 1 } } } # [ doc = "Reader of field `BAM`" ] pub type BAM_R = crate :: R < u16 , BAM_A > ; impl BAM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u16 , BAM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( BAM_A :: _0 ) , 1 => Val ( BAM_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BAM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BAM_A :: _1 } } # [ doc = "Write proxy for field `BAM`" ] pub struct BAM_W < 'a > { w : & 'a mut W , } impl < 'a > BAM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BAM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "The corresponding address bit in CSAR is used in the chip-select decode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BAM_A :: _0 ) } # [ doc = "The corresponding address bit in CSAR is a don't care in the chip-select decode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BAM_A :: _1 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bit 0 - Valid" ] # [ inline ( always ) ] pub fn v ( & self ) -> V_R { V_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Write Protect" ] # [ inline ( always ) ] pub fn wp ( & self ) -> WP_R { WP_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:31 - Base Address Mask" ] # [ inline ( always ) ] pub fn bam ( & self ) -> BAM_R { BAM_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bit 0 - Valid" ] # [ inline ( always ) ] pub fn v ( & mut self ) -> V_W { V_W { w : self } } # [ doc = "Bit 8 - Write Protect" ] # [ inline ( always ) ] pub fn wp ( & mut self ) -> WP_W { WP_W { w : self } } # [ doc = "Bits 16:31 - Base Address Mask" ] # [ inline ( always ) ] pub fn bam ( & mut self ) -> BAM_W { BAM_W { w : self } } } } # [ doc = "Chip Select Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cscr](cscr) module" ] pub type CSCR = crate :: Reg < u32 , _CSCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSCR ; # [ doc = "`read()` method returns [cscr::R](cscr::R) reader structure" ] impl crate :: Readable for CSCR { } # [ doc = "`write(|w| ..)` method takes [cscr::W](cscr::W) writer structure" ] impl crate :: Writable for CSCR { } # [ doc = "Chip Select Control Register" ] pub mod cscr { # [ doc = "Reader of register CSCR%s" ] pub type R = crate :: R < u32 , super :: CSCR > ; # [ doc = "Writer for register CSCR%s" ] pub type W = crate :: W < u32 , super :: CSCR > ; # [ doc = "Register CSCR%s `reset()`'s with value 0x003f_fc00" ] impl crate :: ResetValue for super :: CSCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x003f_fc00 } } # [ doc = "Burst-Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BSTW_A { # [ doc = "0: Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst writes. For example, a 32-bit write to an 8-bit port takes four byte writes." ] _0 , # [ doc = "1: Enabled. Enables burst write of data larger than the specified port size, including 32-bit writes to 8- and 16-bit ports, 16-bit writes to 8-bit ports, and line writes to 8-, 16-, and 32-bit ports." ] _1 } impl From < BSTW_A > for bool { # [ inline ( always ) ] fn from ( variant : BSTW_A ) -> Self { match variant { BSTW_A :: _0 => false , BSTW_A :: _1 => true } } } # [ doc = "Reader of field `BSTW`" ] pub type BSTW_R = crate :: R < bool , BSTW_A > ; impl BSTW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BSTW_A { match self . bits { false => BSTW_A :: _0 , true => BSTW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BSTW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BSTW_A :: _1 } } # [ doc = "Write proxy for field `BSTW`" ] pub struct BSTW_W < 'a > { w : & 'a mut W , } impl < 'a > BSTW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BSTW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst writes. For example, a 32-bit write to an 8-bit port takes four byte writes." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BSTW_A :: _0 ) } # [ doc = "Enabled. Enables burst write of data larger than the specified port size, including 32-bit writes to 8- and 16-bit ports, 16-bit writes to 8-bit ports, and line writes to 8-, 16-, and 32-bit ports." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BSTW_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Burst-Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BSTR_A { # [ doc = "0: Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst reads. For example, a 32-bit read from an 8-bit port is broken into four 8-bit reads." ] _0 , # [ doc = "1: Enabled. Enables data burst reads larger than the specified port size, including 32-bit reads from 8- and 16-bit ports, 16-bit reads from 8-bit ports, and line reads from 8-, 16-, and 32-bit ports." ] _1 } impl From < BSTR_A > for bool { # [ inline ( always ) ] fn from ( variant : BSTR_A ) -> Self { match variant { BSTR_A :: _0 => false , BSTR_A :: _1 => true } } } # [ doc = "Reader of field `BSTR`" ] pub type BSTR_R = crate :: R < bool , BSTR_A > ; impl BSTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BSTR_A { match self . bits { false => BSTR_A :: _0 , true => BSTR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BSTR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BSTR_A :: _1 } } # [ doc = "Write proxy for field `BSTR`" ] pub struct BSTR_W < 'a > { w : & 'a mut W , } impl < 'a > BSTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BSTR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst reads. For example, a 32-bit read from an 8-bit port is broken into four 8-bit reads." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BSTR_A :: _0 ) } # [ doc = "Enabled. Enables data burst reads larger than the specified port size, including 32-bit reads from 8- and 16-bit ports, 16-bit reads from 8-bit ports, and line reads from 8-, 16-, and 32-bit ports." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BSTR_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Byte-Enable Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BEM_A { # [ doc = "0: FB_BE is asserted for data write only." ] _0 , # [ doc = "1: FB_BE is asserted for data read and write accesses." ] _1 } impl From < BEM_A > for bool { # [ inline ( always ) ] fn from ( variant : BEM_A ) -> Self { match variant { BEM_A :: _0 => false , BEM_A :: _1 => true } } } # [ doc = "Reader of field `BEM`" ] pub type BEM_R = crate :: R < bool , BEM_A > ; impl BEM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BEM_A { match self . bits { false => BEM_A :: _0 , true => BEM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BEM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BEM_A :: _1 } } # [ doc = "Write proxy for field `BEM`" ] pub struct BEM_W < 'a > { w : & 'a mut W , } impl < 'a > BEM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BEM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FB_BE is asserted for data write only." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BEM_A :: _0 ) } # [ doc = "FB_BE is asserted for data read and write accesses." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BEM_A :: _1 ) } # [ 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 = "Port Size\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: 32-bit port size. Valid data is sampled and driven on FB_D\\[31:0\\]." ] _00 , # [ doc = "1: 8-bit port size. Valid data is sampled and driven on FB_D\\[31:24\\] when BLS is 0b, or FB_D\\[7:0\\] when BLS is 1b." ] _01 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _00 => 0 , PS_A :: _01 => 1 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PS_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PS_A :: _00 ) , 1 => Val ( PS_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PS_A :: _01 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "32-bit port size. Valid data is sampled and driven on FB_D\\[31:0\\]." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PS_A :: _00 ) } # [ doc = "8-bit port size. Valid data is sampled and driven on FB_D\\[31:24\\] when BLS is 0b, or FB_D\\[7:0\\] when BLS is 1b." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PS_A :: _01 ) } # [ 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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Auto-Acknowledge Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AA_A { # [ doc = "0: Disabled. No internal transfer acknowledge is asserted and the cycle is terminated externally." ] _0 , # [ doc = "1: Enabled. Internal transfer acknowledge is asserted as specified by WS." ] _1 } impl From < AA_A > for bool { # [ inline ( always ) ] fn from ( variant : AA_A ) -> Self { match variant { AA_A :: _0 => false , AA_A :: _1 => true } } } # [ doc = "Reader of field `AA`" ] pub type AA_R = crate :: R < bool , AA_A > ; impl AA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AA_A { match self . bits { false => AA_A :: _0 , true => AA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AA_A :: _1 } } # [ doc = "Write proxy for field `AA`" ] pub struct AA_W < 'a > { w : & 'a mut W , } impl < 'a > AA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled. No internal transfer acknowledge is asserted and the cycle is terminated externally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AA_A :: _0 ) } # [ doc = "Enabled. Internal transfer acknowledge is asserted as specified by WS." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AA_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Byte-Lane Shift\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BLS_A { # [ doc = "0: Not shifted. Data is left-aligned on FB_AD." ] _0 , # [ doc = "1: Shifted. Data is right-aligned on FB_AD." ] _1 } impl From < BLS_A > for bool { # [ inline ( always ) ] fn from ( variant : BLS_A ) -> Self { match variant { BLS_A :: _0 => false , BLS_A :: _1 => true } } } # [ doc = "Reader of field `BLS`" ] pub type BLS_R = crate :: R < bool , BLS_A > ; impl BLS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BLS_A { match self . bits { false => BLS_A :: _0 , true => BLS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BLS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BLS_A :: _1 } } # [ doc = "Write proxy for field `BLS`" ] pub struct BLS_W < 'a > { w : & 'a mut W , } impl < 'a > BLS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BLS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not shifted. Data is left-aligned on FB_AD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BLS_A :: _0 ) } # [ doc = "Shifted. Data is right-aligned on FB_AD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BLS_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Reader of field `WS`" ] pub type WS_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WS`" ] pub struct WS_W < 'a > { w : & 'a mut W , } impl < 'a > WS_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 & ! ( 0x3f << 10 ) ) | ( ( ( value as u32 ) & 0x3f ) << 10 ) ; self . w } } # [ doc = "Write Address Hold or Deselect\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRAH_A { # [ doc = "0: 1 cycle (default for all but FB_CS0 )" ] _00 , # [ doc = "1: 2 cycles" ] _01 , # [ doc = "2: 3 cycles" ] _10 , # [ doc = "3: 4 cycles (default for FB_CS0 )" ] _11 } impl From < WRAH_A > for u8 { # [ inline ( always ) ] fn from ( variant : WRAH_A ) -> Self { match variant { WRAH_A :: _00 => 0 , WRAH_A :: _01 => 1 , WRAH_A :: _10 => 2 , WRAH_A :: _11 => 3 } } } # [ doc = "Reader of field `WRAH`" ] pub type WRAH_R = crate :: R < u8 , WRAH_A > ; impl WRAH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WRAH_A { match self . bits { 0 => WRAH_A :: _00 , 1 => WRAH_A :: _01 , 2 => WRAH_A :: _10 , 3 => WRAH_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WRAH_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WRAH_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WRAH_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WRAH_A :: _11 } } # [ doc = "Write proxy for field `WRAH`" ] pub struct WRAH_W < 'a > { w : & 'a mut W , } impl < 'a > WRAH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WRAH_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "1 cycle (default for all but FB_CS0 )" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WRAH_A :: _00 ) } # [ doc = "2 cycles" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WRAH_A :: _01 ) } # [ doc = "3 cycles" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WRAH_A :: _10 ) } # [ doc = "4 cycles (default for FB_CS0 )" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WRAH_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "Read Address Hold or Deselect\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDAH_A { # [ doc = "0: When AA is 1b, 1 cycle. When AA is 0b, 0 cycles." ] _00 , # [ doc = "1: When AA is 1b, 2 cycles. When AA is 0b, 1 cycle." ] _01 , # [ doc = "2: When AA is 1b, 3 cycles. When AA is 0b, 2 cycles." ] _10 , # [ doc = "3: When AA is 1b, 4 cycles. When AA is 0b, 3 cycles." ] _11 } impl From < RDAH_A > for u8 { # [ inline ( always ) ] fn from ( variant : RDAH_A ) -> Self { match variant { RDAH_A :: _00 => 0 , RDAH_A :: _01 => 1 , RDAH_A :: _10 => 2 , RDAH_A :: _11 => 3 } } } # [ doc = "Reader of field `RDAH`" ] pub type RDAH_R = crate :: R < u8 , RDAH_A > ; impl RDAH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDAH_A { match self . bits { 0 => RDAH_A :: _00 , 1 => RDAH_A :: _01 , 2 => RDAH_A :: _10 , 3 => RDAH_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RDAH_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == RDAH_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == RDAH_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == RDAH_A :: _11 } } # [ doc = "Write proxy for field `RDAH`" ] pub struct RDAH_W < 'a > { w : & 'a mut W , } impl < 'a > RDAH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDAH_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "When AA is 1b, 1 cycle. When AA is 0b, 0 cycles." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RDAH_A :: _00 ) } # [ doc = "When AA is 1b, 2 cycles. When AA is 0b, 1 cycle." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( RDAH_A :: _01 ) } # [ doc = "When AA is 1b, 3 cycles. When AA is 0b, 2 cycles." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( RDAH_A :: _10 ) } # [ doc = "When AA is 1b, 4 cycles. When AA is 0b, 3 cycles." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( RDAH_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "Address Setup\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ASET_A { # [ doc = "0: Assert FB_CSn on the first rising clock edge after the address is asserted (default for all but FB_CS0 )." ] _00 , # [ doc = "1: Assert FB_CSn on the second rising clock edge after the address is asserted." ] _01 , # [ doc = "2: Assert FB_CSn on the third rising clock edge after the address is asserted." ] _10 , # [ doc = "3: Assert FB_CSn on the fourth rising clock edge after the address is asserted (default for FB_CS0 )." ] _11 } impl From < ASET_A > for u8 { # [ inline ( always ) ] fn from ( variant : ASET_A ) -> Self { match variant { ASET_A :: _00 => 0 , ASET_A :: _01 => 1 , ASET_A :: _10 => 2 , ASET_A :: _11 => 3 } } } # [ doc = "Reader of field `ASET`" ] pub type ASET_R = crate :: R < u8 , ASET_A > ; impl ASET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ASET_A { match self . bits { 0 => ASET_A :: _00 , 1 => ASET_A :: _01 , 2 => ASET_A :: _10 , 3 => ASET_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ASET_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ASET_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ASET_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ASET_A :: _11 } } # [ doc = "Write proxy for field `ASET`" ] pub struct ASET_W < 'a > { w : & 'a mut W , } impl < 'a > ASET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ASET_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Assert FB_CSn on the first rising clock edge after the address is asserted (default for all but FB_CS0 )." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ASET_A :: _00 ) } # [ doc = "Assert FB_CSn on the second rising clock edge after the address is asserted." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ASET_A :: _01 ) } # [ doc = "Assert FB_CSn on the third rising clock edge after the address is asserted." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ASET_A :: _10 ) } # [ doc = "Assert FB_CSn on the fourth rising clock edge after the address is asserted (default for FB_CS0 )." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ASET_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "Extended Transfer Start/Extended Address Latch Enable Controls how long FB_TS /FB_ALE is asserted.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXTS_A { # [ doc = "0: Disabled. FB_TS /FB_ALE asserts for one bus clock cycle." ] _0 , # [ doc = "1: Enabled. FB_TS /FB_ALE remains asserted until the first positive clock edge after FB_CSn asserts." ] _1 } impl From < EXTS_A > for bool { # [ inline ( always ) ] fn from ( variant : EXTS_A ) -> Self { match variant { EXTS_A :: _0 => false , EXTS_A :: _1 => true } } } # [ doc = "Reader of field `EXTS`" ] pub type EXTS_R = crate :: R < bool , EXTS_A > ; impl EXTS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EXTS_A { match self . bits { false => EXTS_A :: _0 , true => EXTS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EXTS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EXTS_A :: _1 } } # [ doc = "Write proxy for field `EXTS`" ] pub struct EXTS_W < 'a > { w : & 'a mut W , } impl < 'a > EXTS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EXTS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled. FB_TS /FB_ALE asserts for one bus clock cycle." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EXTS_A :: _0 ) } # [ doc = "Enabled. FB_TS /FB_ALE remains asserted until the first positive clock edge after FB_CSn asserts." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EXTS_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Secondary Wait State Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSEN_A { # [ doc = "0: Disabled. A number of wait states (specified by WS) are inserted before an internal transfer acknowledge is generated for all transfers." ] _0 , # [ doc = "1: Enabled. A number of wait states (specified by SWS) are inserted before an internal transfer acknowledge is generated for burst transfer secondary terminations." ] _1 } impl From < SWSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSEN_A ) -> Self { match variant { SWSEN_A :: _0 => false , SWSEN_A :: _1 => true } } } # [ doc = "Reader of field `SWSEN`" ] pub type SWSEN_R = crate :: R < bool , SWSEN_A > ; impl SWSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSEN_A { match self . bits { false => SWSEN_A :: _0 , true => SWSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSEN_A :: _1 } } # [ doc = "Write proxy for field `SWSEN`" ] pub struct SWSEN_W < 'a > { w : & 'a mut W , } impl < 'a > SWSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled. A number of wait states (specified by WS) are inserted before an internal transfer acknowledge is generated for all transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSEN_A :: _0 ) } # [ doc = "Enabled. A number of wait states (specified by SWS) are inserted before an internal transfer acknowledge is generated for burst transfer secondary terminations." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSEN_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Reader of field `SWS`" ] pub type SWS_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SWS`" ] pub struct SWS_W < 'a > { w : & 'a mut W , } impl < 'a > SWS_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 & ! ( 0x3f << 26 ) ) | ( ( ( value as u32 ) & 0x3f ) << 26 ) ; self . w } } impl R { # [ doc = "Bit 3 - Burst-Write Enable" ] # [ inline ( always ) ] pub fn bstw ( & self ) -> BSTW_R { BSTW_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Burst-Read Enable" ] # [ inline ( always ) ] pub fn bstr ( & self ) -> BSTR_R { BSTR_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Byte-Enable Mode" ] # [ inline ( always ) ] pub fn bem ( & self ) -> BEM_R { BEM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bits 6:7 - Port Size" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bit 8 - Auto-Acknowledge Enable" ] # [ inline ( always ) ] pub fn aa ( & self ) -> AA_R { AA_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Byte-Lane Shift" ] # [ inline ( always ) ] pub fn bls ( & self ) -> BLS_R { BLS_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bits 10:15 - Wait States" ] # [ inline ( always ) ] pub fn ws ( & self ) -> WS_R { WS_R :: new ( ( ( self . bits >> 10 ) & 0x3f ) as u8 ) } # [ doc = "Bits 16:17 - Write Address Hold or Deselect" ] # [ inline ( always ) ] pub fn wrah ( & self ) -> WRAH_R { WRAH_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - Read Address Hold or Deselect" ] # [ inline ( always ) ] pub fn rdah ( & self ) -> RDAH_R { RDAH_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:21 - Address Setup" ] # [ inline ( always ) ] pub fn aset ( & self ) -> ASET_R { ASET_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bit 22 - Extended Transfer Start/Extended Address Latch Enable Controls how long FB_TS /FB_ALE is asserted." ] # [ inline ( always ) ] pub fn exts ( & self ) -> EXTS_R { EXTS_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Secondary Wait State Enable" ] # [ inline ( always ) ] pub fn swsen ( & self ) -> SWSEN_R { SWSEN_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bits 26:31 - Secondary Wait States" ] # [ inline ( always ) ] pub fn sws ( & self ) -> SWS_R { SWS_R :: new ( ( ( self . bits >> 26 ) & 0x3f ) as u8 ) } } impl W { # [ doc = "Bit 3 - Burst-Write Enable" ] # [ inline ( always ) ] pub fn bstw ( & mut self ) -> BSTW_W { BSTW_W { w : self } } # [ doc = "Bit 4 - Burst-Read Enable" ] # [ inline ( always ) ] pub fn bstr ( & mut self ) -> BSTR_W { BSTR_W { w : self } } # [ doc = "Bit 5 - Byte-Enable Mode" ] # [ inline ( always ) ] pub fn bem ( & mut self ) -> BEM_W { BEM_W { w : self } } # [ doc = "Bits 6:7 - Port Size" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 8 - Auto-Acknowledge Enable" ] # [ inline ( always ) ] pub fn aa ( & mut self ) -> AA_W { AA_W { w : self } } # [ doc = "Bit 9 - Byte-Lane Shift" ] # [ inline ( always ) ] pub fn bls ( & mut self ) -> BLS_W { BLS_W { w : self } } # [ doc = "Bits 10:15 - Wait States" ] # [ inline ( always ) ] pub fn ws ( & mut self ) -> WS_W { WS_W { w : self } } # [ doc = "Bits 16:17 - Write Address Hold or Deselect" ] # [ inline ( always ) ] pub fn wrah ( & mut self ) -> WRAH_W { WRAH_W { w : self } } # [ doc = "Bits 18:19 - Read Address Hold or Deselect" ] # [ inline ( always ) ] pub fn rdah ( & mut self ) -> RDAH_W { RDAH_W { w : self } } # [ doc = "Bits 20:21 - Address Setup" ] # [ inline ( always ) ] pub fn aset ( & mut self ) -> ASET_W { ASET_W { w : self } } # [ doc = "Bit 22 - Extended Transfer Start/Extended Address Latch Enable Controls how long FB_TS /FB_ALE is asserted." ] # [ inline ( always ) ] pub fn exts ( & mut self ) -> EXTS_W { EXTS_W { w : self } } # [ doc = "Bit 23 - Secondary Wait State Enable" ] # [ inline ( always ) ] pub fn swsen ( & mut self ) -> SWSEN_W { SWSEN_W { w : self } } # [ doc = "Bits 26:31 - Secondary Wait States" ] # [ inline ( always ) ] pub fn sws ( & mut self ) -> SWS_W { SWS_W { w : self } } } } # [ doc = "Chip Select port Multiplexing Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cspmcr](cspmcr) module" ] pub type CSPMCR = crate :: Reg < u32 , _CSPMCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSPMCR ; # [ doc = "`read()` method returns [cspmcr::R](cspmcr::R) reader structure" ] impl crate :: Readable for CSPMCR { } # [ doc = "`write(|w| ..)` method takes [cspmcr::W](cspmcr::W) writer structure" ] impl crate :: Writable for CSPMCR { } # [ doc = "Chip Select port Multiplexing Control Register" ] pub mod cspmcr { # [ doc = "Reader of register CSPMCR" ] pub type R = crate :: R < u32 , super :: CSPMCR > ; # [ doc = "Writer for register CSPMCR" ] pub type W = crate :: W < u32 , super :: CSPMCR > ; # [ doc = "Register CSPMCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSPMCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "FlexBus Signal Group 5 Multiplex control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GROUP5_A { # [ doc = "0: FB_TA" ] _0000 , # [ doc = "1: FB_CS3 . You must also write 1b to CSCR\\[AA\\]." ] _0001 , # [ doc = "2: FB_BE_7_0 . You must also write 1b to CSCR\\[AA\\]." ] _0010 } impl From < GROUP5_A > for u8 { # [ inline ( always ) ] fn from ( variant : GROUP5_A ) -> Self { match variant { GROUP5_A :: _0000 => 0 , GROUP5_A :: _0001 => 1 , GROUP5_A :: _0010 => 2 } } } # [ doc = "Reader of field `GROUP5`" ] pub type GROUP5_R = crate :: R < u8 , GROUP5_A > ; impl GROUP5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , GROUP5_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( GROUP5_A :: _0000 ) , 1 => Val ( GROUP5_A :: _0001 ) , 2 => Val ( GROUP5_A :: _0010 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == GROUP5_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == GROUP5_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == GROUP5_A :: _0010 } } # [ doc = "Write proxy for field `GROUP5`" ] pub struct GROUP5_W < 'a > { w : & 'a mut W , } impl < 'a > GROUP5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GROUP5_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FB_TA" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( GROUP5_A :: _0000 ) } # [ doc = "FB_CS3 . You must also write 1b to CSCR\\[AA\\]." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( GROUP5_A :: _0001 ) } # [ doc = "FB_BE_7_0 . You must also write 1b to CSCR\\[AA\\]." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( GROUP5_A :: _0010 ) } # [ 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 & ! ( 0x0f << 12 ) ) | ( ( ( value as u32 ) & 0x0f ) << 12 ) ; self . w } } # [ doc = "FlexBus Signal Group 4 Multiplex control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GROUP4_A { # [ doc = "0: FB_TBST" ] _0000 , # [ doc = "1: FB_CS2" ] _0001 , # [ doc = "2: FB_BE_15_8" ] _0010 } impl From < GROUP4_A > for u8 { # [ inline ( always ) ] fn from ( variant : GROUP4_A ) -> Self { match variant { GROUP4_A :: _0000 => 0 , GROUP4_A :: _0001 => 1 , GROUP4_A :: _0010 => 2 } } } # [ doc = "Reader of field `GROUP4`" ] pub type GROUP4_R = crate :: R < u8 , GROUP4_A > ; impl GROUP4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , GROUP4_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( GROUP4_A :: _0000 ) , 1 => Val ( GROUP4_A :: _0001 ) , 2 => Val ( GROUP4_A :: _0010 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == GROUP4_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == GROUP4_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == GROUP4_A :: _0010 } } # [ doc = "Write proxy for field `GROUP4`" ] pub struct GROUP4_W < 'a > { w : & 'a mut W , } impl < 'a > GROUP4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GROUP4_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FB_TBST" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( GROUP4_A :: _0000 ) } # [ doc = "FB_CS2" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( GROUP4_A :: _0001 ) } # [ doc = "FB_BE_15_8" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( GROUP4_A :: _0010 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "FlexBus Signal Group 3 Multiplex control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GROUP3_A { # [ doc = "0: FB_CS5" ] _0000 , # [ doc = "1: FB_TSIZ1" ] _0001 , # [ doc = "2: FB_BE_23_16" ] _0010 } impl From < GROUP3_A > for u8 { # [ inline ( always ) ] fn from ( variant : GROUP3_A ) -> Self { match variant { GROUP3_A :: _0000 => 0 , GROUP3_A :: _0001 => 1 , GROUP3_A :: _0010 => 2 } } } # [ doc = "Reader of field `GROUP3`" ] pub type GROUP3_R = crate :: R < u8 , GROUP3_A > ; impl GROUP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , GROUP3_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( GROUP3_A :: _0000 ) , 1 => Val ( GROUP3_A :: _0001 ) , 2 => Val ( GROUP3_A :: _0010 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == GROUP3_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == GROUP3_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == GROUP3_A :: _0010 } } # [ doc = "Write proxy for field `GROUP3`" ] pub struct GROUP3_W < 'a > { w : & 'a mut W , } impl < 'a > GROUP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GROUP3_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FB_CS5" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( GROUP3_A :: _0000 ) } # [ doc = "FB_TSIZ1" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( GROUP3_A :: _0001 ) } # [ doc = "FB_BE_23_16" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( GROUP3_A :: _0010 ) } # [ 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 & ! ( 0x0f << 20 ) ) | ( ( ( value as u32 ) & 0x0f ) << 20 ) ; self . w } } # [ doc = "FlexBus Signal Group 2 Multiplex control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GROUP2_A { # [ doc = "0: FB_CS4" ] _0000 , # [ doc = "1: FB_TSIZ0" ] _0001 , # [ doc = "2: FB_BE_31_24" ] _0010 } impl From < GROUP2_A > for u8 { # [ inline ( always ) ] fn from ( variant : GROUP2_A ) -> Self { match variant { GROUP2_A :: _0000 => 0 , GROUP2_A :: _0001 => 1 , GROUP2_A :: _0010 => 2 } } } # [ doc = "Reader of field `GROUP2`" ] pub type GROUP2_R = crate :: R < u8 , GROUP2_A > ; impl GROUP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , GROUP2_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( GROUP2_A :: _0000 ) , 1 => Val ( GROUP2_A :: _0001 ) , 2 => Val ( GROUP2_A :: _0010 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == GROUP2_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == GROUP2_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == GROUP2_A :: _0010 } } # [ doc = "Write proxy for field `GROUP2`" ] pub struct GROUP2_W < 'a > { w : & 'a mut W , } impl < 'a > GROUP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GROUP2_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FB_CS4" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( GROUP2_A :: _0000 ) } # [ doc = "FB_TSIZ0" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( GROUP2_A :: _0001 ) } # [ doc = "FB_BE_31_24" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( GROUP2_A :: _0010 ) } # [ 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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } # [ doc = "FlexBus Signal Group 1 Multiplex control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GROUP1_A { # [ doc = "0: FB_ALE" ] _0000 , # [ doc = "1: FB_CS1" ] _0001 , # [ doc = "2: FB_TS" ] _0010 } impl From < GROUP1_A > for u8 { # [ inline ( always ) ] fn from ( variant : GROUP1_A ) -> Self { match variant { GROUP1_A :: _0000 => 0 , GROUP1_A :: _0001 => 1 , GROUP1_A :: _0010 => 2 } } } # [ doc = "Reader of field `GROUP1`" ] pub type GROUP1_R = crate :: R < u8 , GROUP1_A > ; impl GROUP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , GROUP1_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( GROUP1_A :: _0000 ) , 1 => Val ( GROUP1_A :: _0001 ) , 2 => Val ( GROUP1_A :: _0010 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == GROUP1_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == GROUP1_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == GROUP1_A :: _0010 } } # [ doc = "Write proxy for field `GROUP1`" ] pub struct GROUP1_W < 'a > { w : & 'a mut W , } impl < 'a > GROUP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GROUP1_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FB_ALE" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( GROUP1_A :: _0000 ) } # [ doc = "FB_CS1" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( GROUP1_A :: _0001 ) } # [ doc = "FB_TS" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( GROUP1_A :: _0010 ) } # [ 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 & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl R { # [ doc = "Bits 12:15 - FlexBus Signal Group 5 Multiplex control" ] # [ inline ( always ) ] pub fn group5 ( & self ) -> GROUP5_R { GROUP5_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - FlexBus Signal Group 4 Multiplex control" ] # [ inline ( always ) ] pub fn group4 ( & self ) -> GROUP4_R { GROUP4_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bits 20:23 - FlexBus Signal Group 3 Multiplex control" ] # [ inline ( always ) ] pub fn group3 ( & self ) -> GROUP3_R { GROUP3_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - FlexBus Signal Group 2 Multiplex control" ] # [ inline ( always ) ] pub fn group2 ( & self ) -> GROUP2_R { GROUP2_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - FlexBus Signal Group 1 Multiplex control" ] # [ inline ( always ) ] pub fn group1 ( & self ) -> GROUP1_R { GROUP1_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 12:15 - FlexBus Signal Group 5 Multiplex control" ] # [ inline ( always ) ] pub fn group5 ( & mut self ) -> GROUP5_W { GROUP5_W { w : self } } # [ doc = "Bits 16:19 - FlexBus Signal Group 4 Multiplex control" ] # [ inline ( always ) ] pub fn group4 ( & mut self ) -> GROUP4_W { GROUP4_W { w : self } } # [ doc = "Bits 20:23 - FlexBus Signal Group 3 Multiplex control" ] # [ inline ( always ) ] pub fn group3 ( & mut self ) -> GROUP3_W { GROUP3_W { w : self } } # [ doc = "Bits 24:27 - FlexBus Signal Group 2 Multiplex control" ] # [ inline ( always ) ] pub fn group2 ( & mut self ) -> GROUP2_W { GROUP2_W { w : self } } # [ doc = "Bits 28:31 - FlexBus Signal Group 1 Multiplex control" ] # [ inline ( always ) ] pub fn group1 ( & mut self ) -> GROUP1_W { GROUP1_W { w : self } } } } } # [ doc = "Memory protection unit" ] pub struct SYSMPU { _marker : PhantomData < * const ( ) > } unsafe impl Send for SYSMPU { } impl SYSMPU { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const sysmpu :: RegisterBlock { 0x4000_d000 as * const _ } } impl Deref for SYSMPU { type Target = sysmpu :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SYSMPU :: ptr ( ) } } } # [ doc = "Memory protection unit" ] pub mod sysmpu { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Control/Error Status Register" ] pub cesr : CESR , _reserved1 : [ u8 ; 12usize ] , # [ doc = "0x10 - Error Address Register, slave port n" ] pub ear0 : EAR , # [ doc = "0x14 - Error Detail Register, slave port n" ] pub edr0 : EDR , # [ doc = "0x18 - Error Address Register, slave port n" ] pub ear1 : EAR , # [ doc = "0x1c - Error Detail Register, slave port n" ] pub edr1 : EDR , # [ doc = "0x20 - Error Address Register, slave port n" ] pub ear2 : EAR , # [ doc = "0x24 - Error Detail Register, slave port n" ] pub edr2 : EDR , # [ doc = "0x28 - Error Address Register, slave port n" ] pub ear3 : EAR , # [ doc = "0x2c - Error Detail Register, slave port n" ] pub edr3 : EDR , # [ doc = "0x30 - Error Address Register, slave port n" ] pub ear4 : EAR , # [ doc = "0x34 - Error Detail Register, slave port n" ] pub edr4 : EDR , _reserved11 : [ u8 ; 968usize ] , # [ doc = "0x400 - Region Descriptor n, Word 0" ] pub rgd0_word0 : RGD_WORD0 , # [ doc = "0x404 - Region Descriptor n, Word 1" ] pub rgd0_word1 : RGD_WORD1 , # [ doc = "0x408 - Region Descriptor n, Word 2" ] pub rgd0_word2 : RGD_WORD2 , # [ doc = "0x40c - Region Descriptor n, Word 3" ] pub rgd0_word3 : RGD_WORD3 , # [ doc = "0x410 - Region Descriptor n, Word 0" ] pub rgd1_word0 : RGD_WORD0 , # [ doc = "0x414 - Region Descriptor n, Word 1" ] pub rgd1_word1 : RGD_WORD1 , # [ doc = "0x418 - Region Descriptor n, Word 2" ] pub rgd1_word2 : RGD_WORD2 , # [ doc = "0x41c - Region Descriptor n, Word 3" ] pub rgd1_word3 : RGD_WORD3 , # [ doc = "0x420 - Region Descriptor n, Word 0" ] pub rgd2_word0 : RGD_WORD0 , # [ doc = "0x424 - Region Descriptor n, Word 1" ] pub rgd2_word1 : RGD_WORD1 , # [ doc = "0x428 - Region Descriptor n, Word 2" ] pub rgd2_word2 : RGD_WORD2 , # [ doc = "0x42c - Region Descriptor n, Word 3" ] pub rgd2_word3 : RGD_WORD3 , # [ doc = "0x430 - Region Descriptor n, Word 0" ] pub rgd3_word0 : RGD_WORD0 , # [ doc = "0x434 - Region Descriptor n, Word 1" ] pub rgd3_word1 : RGD_WORD1 , # [ doc = "0x438 - Region Descriptor n, Word 2" ] pub rgd3_word2 : RGD_WORD2 , # [ doc = "0x43c - Region Descriptor n, Word 3" ] pub rgd3_word3 : RGD_WORD3 , # [ doc = "0x440 - Region Descriptor n, Word 0" ] pub rgd4_word0 : RGD_WORD0 , # [ doc = "0x444 - Region Descriptor n, Word 1" ] pub rgd4_word1 : RGD_WORD1 , # [ doc = "0x448 - Region Descriptor n, Word 2" ] pub rgd4_word2 : RGD_WORD2 , # [ doc = "0x44c - Region Descriptor n, Word 3" ] pub rgd4_word3 : RGD_WORD3 , # [ doc = "0x450 - Region Descriptor n, Word 0" ] pub rgd5_word0 : RGD_WORD0 , # [ doc = "0x454 - Region Descriptor n, Word 1" ] pub rgd5_word1 : RGD_WORD1 , # [ doc = "0x458 - Region Descriptor n, Word 2" ] pub rgd5_word2 : RGD_WORD2 , # [ doc = "0x45c - Region Descriptor n, Word 3" ] pub rgd5_word3 : RGD_WORD3 , # [ doc = "0x460 - Region Descriptor n, Word 0" ] pub rgd6_word0 : RGD_WORD0 , # [ doc = "0x464 - Region Descriptor n, Word 1" ] pub rgd6_word1 : RGD_WORD1 , # [ doc = "0x468 - Region Descriptor n, Word 2" ] pub rgd6_word2 : RGD_WORD2 , # [ doc = "0x46c - Region Descriptor n, Word 3" ] pub rgd6_word3 : RGD_WORD3 , # [ doc = "0x470 - Region Descriptor n, Word 0" ] pub rgd7_word0 : RGD_WORD0 , # [ doc = "0x474 - Region Descriptor n, Word 1" ] pub rgd7_word1 : RGD_WORD1 , # [ doc = "0x478 - Region Descriptor n, Word 2" ] pub rgd7_word2 : RGD_WORD2 , # [ doc = "0x47c - Region Descriptor n, Word 3" ] pub rgd7_word3 : RGD_WORD3 , # [ doc = "0x480 - Region Descriptor n, Word 0" ] pub rgd8_word0 : RGD_WORD0 , # [ doc = "0x484 - Region Descriptor n, Word 1" ] pub rgd8_word1 : RGD_WORD1 , # [ doc = "0x488 - Region Descriptor n, Word 2" ] pub rgd8_word2 : RGD_WORD2 , # [ doc = "0x48c - Region Descriptor n, Word 3" ] pub rgd8_word3 : RGD_WORD3 , # [ doc = "0x490 - Region Descriptor n, Word 0" ] pub rgd9_word0 : RGD_WORD0 , # [ doc = "0x494 - Region Descriptor n, Word 1" ] pub rgd9_word1 : RGD_WORD1 , # [ doc = "0x498 - Region Descriptor n, Word 2" ] pub rgd9_word2 : RGD_WORD2 , # [ doc = "0x49c - Region Descriptor n, Word 3" ] pub rgd9_word3 : RGD_WORD3 , # [ doc = "0x4a0 - Region Descriptor n, Word 0" ] pub rgd10_word0 : RGD_WORD0 , # [ doc = "0x4a4 - Region Descriptor n, Word 1" ] pub rgd10_word1 : RGD_WORD1 , # [ doc = "0x4a8 - Region Descriptor n, Word 2" ] pub rgd10_word2 : RGD_WORD2 , # [ doc = "0x4ac - Region Descriptor n, Word 3" ] pub rgd10_word3 : RGD_WORD3 , # [ doc = "0x4b0 - Region Descriptor n, Word 0" ] pub rgd11_word0 : RGD_WORD0 , # [ doc = "0x4b4 - Region Descriptor n, Word 1" ] pub rgd11_word1 : RGD_WORD1 , # [ doc = "0x4b8 - Region Descriptor n, Word 2" ] pub rgd11_word2 : RGD_WORD2 , # [ doc = "0x4bc - Region Descriptor n, Word 3" ] pub rgd11_word3 : RGD_WORD3 , _reserved59 : [ u8 ; 832usize ] , # [ doc = "0x800 - Region Descriptor Alternate Access Control n" ] pub rgdaac : [ RGDAAC ; 12 ] , } # [ doc = "Control/Error Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cesr](cesr) module" ] pub type CESR = crate :: Reg < u32 , _CESR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CESR ; # [ doc = "`read()` method returns [cesr::R](cesr::R) reader structure" ] impl crate :: Readable for CESR { } # [ doc = "`write(|w| ..)` method takes [cesr::W](cesr::W) writer structure" ] impl crate :: Writable for CESR { } # [ doc = "Control/Error Status Register" ] pub mod cesr { # [ doc = "Reader of register CESR" ] pub type R = crate :: R < u32 , super :: CESR > ; # [ doc = "Writer for register CESR" ] pub type W = crate :: W < u32 , super :: CESR > ; # [ doc = "Register CESR `reset()`'s with value 0x0081_5101" ] impl crate :: ResetValue for super :: CESR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0081_5101 } } # [ doc = "Valid\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VLD_A { # [ doc = "0: MPU is disabled. All accesses from all bus masters are allowed." ] _0 , # [ doc = "1: MPU is enabled" ] _1 } impl From < VLD_A > for bool { # [ inline ( always ) ] fn from ( variant : VLD_A ) -> Self { match variant { VLD_A :: _0 => false , VLD_A :: _1 => true } } } # [ doc = "Reader of field `VLD`" ] pub type VLD_R = crate :: R < bool , VLD_A > ; impl VLD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VLD_A { match self . bits { false => VLD_A :: _0 , true => VLD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VLD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VLD_A :: _1 } } # [ doc = "Write proxy for field `VLD`" ] pub struct VLD_W < 'a > { w : & 'a mut W , } impl < 'a > VLD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VLD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MPU is disabled. All accesses from all bus masters are allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VLD_A :: _0 ) } # [ doc = "MPU is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VLD_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Number Of Region Descriptors\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NRGD_A { # [ doc = "0: 8 region descriptors" ] _0000 , # [ doc = "1: 12 region descriptors" ] _0001 , # [ doc = "2: 16 region descriptors" ] _0010 } impl From < NRGD_A > for u8 { # [ inline ( always ) ] fn from ( variant : NRGD_A ) -> Self { match variant { NRGD_A :: _0000 => 0 , NRGD_A :: _0001 => 1 , NRGD_A :: _0010 => 2 } } } # [ doc = "Reader of field `NRGD`" ] pub type NRGD_R = crate :: R < u8 , NRGD_A > ; impl NRGD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , NRGD_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( NRGD_A :: _0000 ) , 1 => Val ( NRGD_A :: _0001 ) , 2 => Val ( NRGD_A :: _0010 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == NRGD_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == NRGD_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == NRGD_A :: _0010 } } # [ doc = "Reader of field `NSP`" ] pub type NSP_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `HRL`" ] pub type HRL_R = crate :: R < u8 , u8 > ; # [ doc = "Slave Port n Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SPERR_A { # [ doc = "0: No error has occurred for slave port n." ] _0 , # [ doc = "1: An error has occurred for slave port n." ] _1 } impl From < SPERR_A > for u8 { # [ inline ( always ) ] fn from ( variant : SPERR_A ) -> Self { match variant { SPERR_A :: _0 => 0 , SPERR_A :: _1 => 1 } } } # [ doc = "Reader of field `SPERR`" ] pub type SPERR_R = crate :: R < u8 , SPERR_A > ; impl SPERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SPERR_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SPERR_A :: _0 ) , 1 => Val ( SPERR_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SPERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SPERR_A :: _1 } } # [ doc = "Write proxy for field `SPERR`" ] pub struct SPERR_W < 'a > { w : & 'a mut W , } impl < 'a > SPERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SPERR_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No error has occurred for slave port n." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SPERR_A :: _0 ) } # [ doc = "An error has occurred for slave port n." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SPERR_A :: _1 ) } # [ 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 & ! ( 0x1f << 27 ) ) | ( ( ( value as u32 ) & 0x1f ) << 27 ) ; self . w } } impl R { # [ doc = "Bit 0 - Valid" ] # [ inline ( always ) ] pub fn vld ( & self ) -> VLD_R { VLD_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - Number Of Region Descriptors" ] # [ inline ( always ) ] pub fn nrgd ( & self ) -> NRGD_R { NRGD_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - Number Of Slave Ports" ] # [ inline ( always ) ] pub fn nsp ( & self ) -> NSP_R { NSP_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Hardware Revision Level" ] # [ inline ( always ) ] pub fn hrl ( & self ) -> HRL_R { HRL_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bits 27:31 - Slave Port n Error" ] # [ inline ( always ) ] pub fn sperr ( & self ) -> SPERR_R { SPERR_R :: new ( ( ( self . bits >> 27 ) & 0x1f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Valid" ] # [ inline ( always ) ] pub fn vld ( & mut self ) -> VLD_W { VLD_W { w : self } } # [ doc = "Bits 27:31 - Slave Port n Error" ] # [ inline ( always ) ] pub fn sperr ( & mut self ) -> SPERR_W { SPERR_W { w : self } } } } # [ doc = "Error Address Register, slave port n\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ear](ear) module" ] pub type EAR = crate :: Reg < u32 , _EAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EAR ; # [ doc = "`read()` method returns [ear::R](ear::R) reader structure" ] impl crate :: Readable for EAR { } # [ doc = "Error Address Register, slave port n" ] pub mod ear { # [ doc = "Reader of register EAR%s" ] pub type R = crate :: R < u32 , super :: EAR > ; # [ doc = "Reader of field `EADDR`" ] pub type EADDR_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Error Address" ] # [ inline ( always ) ] pub fn eaddr ( & self ) -> EADDR_R { EADDR_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Error Detail Register, slave port n\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [edr](edr) module" ] pub type EDR = crate :: Reg < u32 , _EDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EDR ; # [ doc = "`read()` method returns [edr::R](edr::R) reader structure" ] impl crate :: Readable for EDR { } # [ doc = "Error Detail Register, slave port n" ] pub mod edr { # [ doc = "Reader of register EDR%s" ] pub type R = crate :: R < u32 , super :: EDR > ; # [ doc = "Error Read/Write\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERW_A { # [ doc = "0: Read" ] _0 , # [ doc = "1: Write" ] _1 } impl From < ERW_A > for bool { # [ inline ( always ) ] fn from ( variant : ERW_A ) -> Self { match variant { ERW_A :: _0 => false , ERW_A :: _1 => true } } } # [ doc = "Reader of field `ERW`" ] pub type ERW_R = crate :: R < bool , ERW_A > ; impl ERW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERW_A { match self . bits { false => ERW_A :: _0 , true => ERW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERW_A :: _1 } } # [ doc = "Error Attributes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EATTR_A { # [ doc = "0: User mode, instruction access" ] _000 , # [ doc = "1: User mode, data access" ] _001 , # [ doc = "2: Supervisor mode, instruction access" ] _010 , # [ doc = "3: Supervisor mode, data access" ] _011 } impl From < EATTR_A > for u8 { # [ inline ( always ) ] fn from ( variant : EATTR_A ) -> Self { match variant { EATTR_A :: _000 => 0 , EATTR_A :: _001 => 1 , EATTR_A :: _010 => 2 , EATTR_A :: _011 => 3 } } } # [ doc = "Reader of field `EATTR`" ] pub type EATTR_R = crate :: R < u8 , EATTR_A > ; impl EATTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EATTR_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EATTR_A :: _000 ) , 1 => Val ( EATTR_A :: _001 ) , 2 => Val ( EATTR_A :: _010 ) , 3 => Val ( EATTR_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == EATTR_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == EATTR_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == EATTR_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == EATTR_A :: _011 } } # [ doc = "Reader of field `EMN`" ] pub type EMN_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `EPID`" ] pub type EPID_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `EACD`" ] pub type EACD_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bit 0 - Error Read/Write" ] # [ inline ( always ) ] pub fn erw ( & self ) -> ERW_R { ERW_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:3 - Error Attributes" ] # [ inline ( always ) ] pub fn eattr ( & self ) -> EATTR_R { EATTR_R :: new ( ( ( self . bits >> 1 ) & 0x07 ) as u8 ) } # [ doc = "Bits 4:7 - Error Master Number" ] # [ inline ( always ) ] pub fn emn ( & self ) -> EMN_R { EMN_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:15 - Error Process Identification" ] # [ inline ( always ) ] pub fn epid ( & self ) -> EPID_R { EPID_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:31 - Error Access Control Detail" ] # [ inline ( always ) ] pub fn eacd ( & self ) -> EACD_R { EACD_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } } # [ doc = "Region Descriptor n, Word 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rgd_word0](rgd_word0) module" ] pub type RGD_WORD0 = crate :: Reg < u32 , _RGD_WORD0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RGD_WORD0 ; # [ doc = "`read()` method returns [rgd_word0::R](rgd_word0::R) reader structure" ] impl crate :: Readable for RGD_WORD0 { } # [ doc = "`write(|w| ..)` method takes [rgd_word0::W](rgd_word0::W) writer structure" ] impl crate :: Writable for RGD_WORD0 { } # [ doc = "Region Descriptor n, Word 0" ] pub mod rgd_word0 { # [ doc = "Reader of register RGD%s_WORD0" ] pub type R = crate :: R < u32 , super :: RGD_WORD0 > ; # [ doc = "Writer for register RGD%s_WORD0" ] pub type W = crate :: W < u32 , super :: RGD_WORD0 > ; # [ doc = "Register RGD%s_WORD0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RGD_WORD0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SRTADDR`" ] pub type SRTADDR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `SRTADDR`" ] pub struct SRTADDR_W < 'a > { w : & 'a mut W , } impl < 'a > SRTADDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff_ffff << 5 ) ) | ( ( ( value as u32 ) & 0x07ff_ffff ) << 5 ) ; self . w } } impl R { # [ doc = "Bits 5:31 - Start Address" ] # [ inline ( always ) ] pub fn srtaddr ( & self ) -> SRTADDR_R { SRTADDR_R :: new ( ( ( self . bits >> 5 ) & 0x07ff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 5:31 - Start Address" ] # [ inline ( always ) ] pub fn srtaddr ( & mut self ) -> SRTADDR_W { SRTADDR_W { w : self } } } } # [ doc = "Region Descriptor n, Word 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rgd_word1](rgd_word1) module" ] pub type RGD_WORD1 = crate :: Reg < u32 , _RGD_WORD1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RGD_WORD1 ; # [ doc = "`read()` method returns [rgd_word1::R](rgd_word1::R) reader structure" ] impl crate :: Readable for RGD_WORD1 { } # [ doc = "`write(|w| ..)` method takes [rgd_word1::W](rgd_word1::W) writer structure" ] impl crate :: Writable for RGD_WORD1 { } # [ doc = "Region Descriptor n, Word 1" ] pub mod rgd_word1 { # [ doc = "Reader of register RGD%s_WORD1" ] pub type R = crate :: R < u32 , super :: RGD_WORD1 > ; # [ doc = "Writer for register RGD%s_WORD1" ] pub type W = crate :: W < u32 , super :: RGD_WORD1 > ; # [ doc = "Register RGD%s_WORD1 `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RGD_WORD1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Reader of field `ENDADDR`" ] pub type ENDADDR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `ENDADDR`" ] pub struct ENDADDR_W < 'a > { w : & 'a mut W , } impl < 'a > ENDADDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff_ffff << 5 ) ) | ( ( ( value as u32 ) & 0x07ff_ffff ) << 5 ) ; self . w } } impl R { # [ doc = "Bits 5:31 - End Address" ] # [ inline ( always ) ] pub fn endaddr ( & self ) -> ENDADDR_R { ENDADDR_R :: new ( ( ( self . bits >> 5 ) & 0x07ff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 5:31 - End Address" ] # [ inline ( always ) ] pub fn endaddr ( & mut self ) -> ENDADDR_W { ENDADDR_W { w : self } } } } # [ doc = "Region Descriptor n, Word 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rgd_word2](rgd_word2) module" ] pub type RGD_WORD2 = crate :: Reg < u32 , _RGD_WORD2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RGD_WORD2 ; # [ doc = "`read()` method returns [rgd_word2::R](rgd_word2::R) reader structure" ] impl crate :: Readable for RGD_WORD2 { } # [ doc = "`write(|w| ..)` method takes [rgd_word2::W](rgd_word2::W) writer structure" ] impl crate :: Writable for RGD_WORD2 { } # [ doc = "Region Descriptor n, Word 2" ] pub mod rgd_word2 { # [ doc = "Reader of register RGD%s_WORD2" ] pub type R = crate :: R < u32 , super :: RGD_WORD2 > ; # [ doc = "Writer for register RGD%s_WORD2" ] pub type W = crate :: W < u32 , super :: RGD_WORD2 > ; # [ doc = "Register RGD%s_WORD2 `reset()`'s with value 0x0061_f7df" ] impl crate :: ResetValue for super :: RGD_WORD2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0061_f7df } } # [ doc = "Reader of field `M0UM`" ] pub type M0UM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M0UM`" ] pub struct M0UM_W < 'a > { w : & 'a mut W , } impl < 'a > M0UM_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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Reader of field `M0SM`" ] pub type M0SM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M0SM`" ] pub struct M0SM_W < 'a > { w : & 'a mut W , } impl < 'a > M0SM_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 = "Reader of field `M0PE`" ] pub type M0PE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `M0PE`" ] pub struct M0PE_W < 'a > { w : & 'a mut W , } impl < 'a > M0PE_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 = "Reader of field `M1UM`" ] pub type M1UM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M1UM`" ] pub struct M1UM_W < 'a > { w : & 'a mut W , } impl < 'a > M1UM_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 << 6 ) ) | ( ( ( value as u32 ) & 0x07 ) << 6 ) ; self . w } } # [ doc = "Reader of field `M1SM`" ] pub type M1SM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M1SM`" ] pub struct M1SM_W < 'a > { w : & 'a mut W , } impl < 'a > M1SM_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 = "Reader of field `M1PE`" ] pub type M1PE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `M1PE`" ] pub struct M1PE_W < 'a > { w : & 'a mut W , } impl < 'a > M1PE_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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Reader of field `M2UM`" ] pub type M2UM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M2UM`" ] pub struct M2UM_W < 'a > { w : & 'a mut W , } impl < 'a > M2UM_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 << 12 ) ) | ( ( ( value as u32 ) & 0x07 ) << 12 ) ; self . w } } # [ doc = "Reader of field `M2SM`" ] pub type M2SM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M2SM`" ] pub struct M2SM_W < 'a > { w : & 'a mut W , } impl < 'a > M2SM_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 << 15 ) ) | ( ( ( value as u32 ) & 0x03 ) << 15 ) ; self . w } } # [ doc = "Reader of field `M2PE`" ] pub type M2PE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `M2PE`" ] pub struct M2PE_W < 'a > { w : & 'a mut W , } impl < 'a > M2PE_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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Bus Master 3 User Mode Access Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3UM_A { # [ doc = "0: An attempted access of that mode may be terminated with an access error (if not allowed by another descriptor) and the access not performed." ] _0 , # [ doc = "1: Allows the given access type to occur" ] _1 } impl From < M3UM_A > for u8 { # [ inline ( always ) ] fn from ( variant : M3UM_A ) -> Self { match variant { M3UM_A :: _0 => 0 , M3UM_A :: _1 => 1 } } } # [ doc = "Reader of field `M3UM`" ] pub type M3UM_R = crate :: R < u8 , M3UM_A > ; impl M3UM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , M3UM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( M3UM_A :: _0 ) , 1 => Val ( M3UM_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M3UM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M3UM_A :: _1 } } # [ doc = "Write proxy for field `M3UM`" ] pub struct M3UM_W < 'a > { w : & 'a mut W , } impl < 'a > M3UM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3UM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "An attempted access of that mode may be terminated with an access error (if not allowed by another descriptor) and the access not performed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M3UM_A :: _0 ) } # [ doc = "Allows the given access type to occur" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M3UM_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x07 ) << 18 ) ; self . w } } # [ doc = "Bus Master 3 Supervisor Mode Access Control\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3SM_A { # [ doc = "0: r/w/x; read, write and execute allowed" ] _00 , # [ doc = "1: r/x; read and execute allowed, but no write" ] _01 , # [ doc = "2: r/w; read and write allowed, but no execute" ] _10 , # [ doc = "3: Same as User mode defined in M3UM" ] _11 } impl From < M3SM_A > for u8 { # [ inline ( always ) ] fn from ( variant : M3SM_A ) -> Self { match variant { M3SM_A :: _00 => 0 , M3SM_A :: _01 => 1 , M3SM_A :: _10 => 2 , M3SM_A :: _11 => 3 } } } # [ doc = "Reader of field `M3SM`" ] pub type M3SM_R = crate :: R < u8 , M3SM_A > ; impl M3SM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M3SM_A { match self . bits { 0 => M3SM_A :: _00 , 1 => M3SM_A :: _01 , 2 => M3SM_A :: _10 , 3 => M3SM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M3SM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M3SM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M3SM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M3SM_A :: _11 } } # [ doc = "Write proxy for field `M3SM`" ] pub struct M3SM_W < 'a > { w : & 'a mut W , } impl < 'a > M3SM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3SM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "r/w/x; read, write and execute allowed" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M3SM_A :: _00 ) } # [ doc = "r/x; read and execute allowed, but no write" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M3SM_A :: _01 ) } # [ doc = "r/w; read and write allowed, but no execute" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M3SM_A :: _10 ) } # [ doc = "Same as User mode defined in M3UM" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M3SM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 21 ) ) | ( ( ( value as u32 ) & 0x03 ) << 21 ) ; self . w } } # [ doc = "Bus Master 3 Process Identifier Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3PE_A { # [ doc = "0: Do not include the process identifier in the evaluation" ] _0 , # [ doc = "1: Include the process identifier and mask (RGDn_WORD3) in the region hit evaluation" ] _1 } impl From < M3PE_A > for bool { # [ inline ( always ) ] fn from ( variant : M3PE_A ) -> Self { match variant { M3PE_A :: _0 => false , M3PE_A :: _1 => true } } } # [ doc = "Reader of field `M3PE`" ] pub type M3PE_R = crate :: R < bool , M3PE_A > ; impl M3PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M3PE_A { match self . bits { false => M3PE_A :: _0 , true => M3PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M3PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M3PE_A :: _1 } } # [ doc = "Write proxy for field `M3PE`" ] pub struct M3PE_W < 'a > { w : & 'a mut W , } impl < 'a > M3PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the process identifier in the evaluation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M3PE_A :: _0 ) } # [ doc = "Include the process identifier and mask (RGDn_WORD3) in the region hit evaluation" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M3PE_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Bus Master 4 Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M4WE_A { # [ doc = "0: Bus master 4 writes terminate with an access error and the write is not performed" ] _0 , # [ doc = "1: Bus master 4 writes allowed" ] _1 } impl From < M4WE_A > for bool { # [ inline ( always ) ] fn from ( variant : M4WE_A ) -> Self { match variant { M4WE_A :: _0 => false , M4WE_A :: _1 => true } } } # [ doc = "Reader of field `M4WE`" ] pub type M4WE_R = crate :: R < bool , M4WE_A > ; impl M4WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M4WE_A { match self . bits { false => M4WE_A :: _0 , true => M4WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M4WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M4WE_A :: _1 } } # [ doc = "Write proxy for field `M4WE`" ] pub struct M4WE_W < 'a > { w : & 'a mut W , } impl < 'a > M4WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M4WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 4 writes terminate with an access error and the write is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M4WE_A :: _0 ) } # [ doc = "Bus master 4 writes allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M4WE_A :: _1 ) } # [ 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 = "Bus Master 4 Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M4RE_A { # [ doc = "0: Bus master 4 reads terminate with an access error and the read is not performed" ] _0 , # [ doc = "1: Bus master 4 reads allowed" ] _1 } impl From < M4RE_A > for bool { # [ inline ( always ) ] fn from ( variant : M4RE_A ) -> Self { match variant { M4RE_A :: _0 => false , M4RE_A :: _1 => true } } } # [ doc = "Reader of field `M4RE`" ] pub type M4RE_R = crate :: R < bool , M4RE_A > ; impl M4RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M4RE_A { match self . bits { false => M4RE_A :: _0 , true => M4RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M4RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M4RE_A :: _1 } } # [ doc = "Write proxy for field `M4RE`" ] pub struct M4RE_W < 'a > { w : & 'a mut W , } impl < 'a > M4RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M4RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 4 reads terminate with an access error and the read is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M4RE_A :: _0 ) } # [ doc = "Bus master 4 reads allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M4RE_A :: _1 ) } # [ 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 = "Bus Master 5 Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M5WE_A { # [ doc = "0: Bus master 5 writes terminate with an access error and the write is not performed" ] _0 , # [ doc = "1: Bus master 5 writes allowed" ] _1 } impl From < M5WE_A > for bool { # [ inline ( always ) ] fn from ( variant : M5WE_A ) -> Self { match variant { M5WE_A :: _0 => false , M5WE_A :: _1 => true } } } # [ doc = "Reader of field `M5WE`" ] pub type M5WE_R = crate :: R < bool , M5WE_A > ; impl M5WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M5WE_A { match self . bits { false => M5WE_A :: _0 , true => M5WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M5WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M5WE_A :: _1 } } # [ doc = "Write proxy for field `M5WE`" ] pub struct M5WE_W < 'a > { w : & 'a mut W , } impl < 'a > M5WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M5WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 5 writes terminate with an access error and the write is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M5WE_A :: _0 ) } # [ doc = "Bus master 5 writes allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M5WE_A :: _1 ) } # [ 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 = "Bus Master 5 Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M5RE_A { # [ doc = "0: Bus master 5 reads terminate with an access error and the read is not performed" ] _0 , # [ doc = "1: Bus master 5 reads allowed" ] _1 } impl From < M5RE_A > for bool { # [ inline ( always ) ] fn from ( variant : M5RE_A ) -> Self { match variant { M5RE_A :: _0 => false , M5RE_A :: _1 => true } } } # [ doc = "Reader of field `M5RE`" ] pub type M5RE_R = crate :: R < bool , M5RE_A > ; impl M5RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M5RE_A { match self . bits { false => M5RE_A :: _0 , true => M5RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M5RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M5RE_A :: _1 } } # [ doc = "Write proxy for field `M5RE`" ] pub struct M5RE_W < 'a > { w : & 'a mut W , } impl < 'a > M5RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M5RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 5 reads terminate with an access error and the read is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M5RE_A :: _0 ) } # [ doc = "Bus master 5 reads allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M5RE_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Bus Master 6 Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M6WE_A { # [ doc = "0: Bus master 6 writes terminate with an access error and the write is not performed" ] _0 , # [ doc = "1: Bus master 6 writes allowed" ] _1 } impl From < M6WE_A > for bool { # [ inline ( always ) ] fn from ( variant : M6WE_A ) -> Self { match variant { M6WE_A :: _0 => false , M6WE_A :: _1 => true } } } # [ doc = "Reader of field `M6WE`" ] pub type M6WE_R = crate :: R < bool , M6WE_A > ; impl M6WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M6WE_A { match self . bits { false => M6WE_A :: _0 , true => M6WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M6WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M6WE_A :: _1 } } # [ doc = "Write proxy for field `M6WE`" ] pub struct M6WE_W < 'a > { w : & 'a mut W , } impl < 'a > M6WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M6WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 6 writes terminate with an access error and the write is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M6WE_A :: _0 ) } # [ doc = "Bus master 6 writes allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M6WE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Bus Master 6 Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M6RE_A { # [ doc = "0: Bus master 6 reads terminate with an access error and the read is not performed" ] _0 , # [ doc = "1: Bus master 6 reads allowed" ] _1 } impl From < M6RE_A > for bool { # [ inline ( always ) ] fn from ( variant : M6RE_A ) -> Self { match variant { M6RE_A :: _0 => false , M6RE_A :: _1 => true } } } # [ doc = "Reader of field `M6RE`" ] pub type M6RE_R = crate :: R < bool , M6RE_A > ; impl M6RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M6RE_A { match self . bits { false => M6RE_A :: _0 , true => M6RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M6RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M6RE_A :: _1 } } # [ doc = "Write proxy for field `M6RE`" ] pub struct M6RE_W < 'a > { w : & 'a mut W , } impl < 'a > M6RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M6RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 6 reads terminate with an access error and the read is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M6RE_A :: _0 ) } # [ doc = "Bus master 6 reads allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M6RE_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Bus Master 7 Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M7WE_A { # [ doc = "0: Bus master 7 writes terminate with an access error and the write is not performed" ] _0 , # [ doc = "1: Bus master 7 writes allowed" ] _1 } impl From < M7WE_A > for bool { # [ inline ( always ) ] fn from ( variant : M7WE_A ) -> Self { match variant { M7WE_A :: _0 => false , M7WE_A :: _1 => true } } } # [ doc = "Reader of field `M7WE`" ] pub type M7WE_R = crate :: R < bool , M7WE_A > ; impl M7WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M7WE_A { match self . bits { false => M7WE_A :: _0 , true => M7WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M7WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M7WE_A :: _1 } } # [ doc = "Write proxy for field `M7WE`" ] pub struct M7WE_W < 'a > { w : & 'a mut W , } impl < 'a > M7WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M7WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 7 writes terminate with an access error and the write is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M7WE_A :: _0 ) } # [ doc = "Bus master 7 writes allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M7WE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Bus Master 7 Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M7RE_A { # [ doc = "0: Bus master 7 reads terminate with an access error and the read is not performed" ] _0 , # [ doc = "1: Bus master 7 reads allowed" ] _1 } impl From < M7RE_A > for bool { # [ inline ( always ) ] fn from ( variant : M7RE_A ) -> Self { match variant { M7RE_A :: _0 => false , M7RE_A :: _1 => true } } } # [ doc = "Reader of field `M7RE`" ] pub type M7RE_R = crate :: R < bool , M7RE_A > ; impl M7RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M7RE_A { match self . bits { false => M7RE_A :: _0 , true => M7RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M7RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M7RE_A :: _1 } } # [ doc = "Write proxy for field `M7RE`" ] pub struct M7RE_W < 'a > { w : & 'a mut W , } impl < 'a > M7RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M7RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 7 reads terminate with an access error and the read is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M7RE_A :: _0 ) } # [ doc = "Bus master 7 reads allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M7RE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Bus Master 0 User Mode Access Control" ] # [ inline ( always ) ] pub fn m0um ( & self ) -> M0UM_R { M0UM_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:4 - Bus Master 0 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m0sm ( & self ) -> M0SM_R { M0SM_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Bus Master 0 Process Identifier enable" ] # [ inline ( always ) ] pub fn m0pe ( & self ) -> M0PE_R { M0PE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bits 6:8 - Bus Master 1 User Mode Access Control" ] # [ inline ( always ) ] pub fn m1um ( & self ) -> M1UM_R { M1UM_R :: new ( ( ( self . bits >> 6 ) & 0x07 ) as u8 ) } # [ doc = "Bits 9:10 - Bus Master 1 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m1sm ( & self ) -> M1SM_R { M1SM_R :: new ( ( ( self . bits >> 9 ) & 0x03 ) as u8 ) } # [ doc = "Bit 11 - Bus Master 1 Process Identifier enable" ] # [ inline ( always ) ] pub fn m1pe ( & self ) -> M1PE_R { M1PE_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bits 12:14 - Bus Master 2 User Mode Access control" ] # [ inline ( always ) ] pub fn m2um ( & self ) -> M2UM_R { M2UM_R :: new ( ( ( self . bits >> 12 ) & 0x07 ) as u8 ) } # [ doc = "Bits 15:16 - Bus Master 2 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m2sm ( & self ) -> M2SM_R { M2SM_R :: new ( ( ( self . bits >> 15 ) & 0x03 ) as u8 ) } # [ doc = "Bit 17 - Bus Master 2 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m2pe ( & self ) -> M2PE_R { M2PE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:20 - Bus Master 3 User Mode Access Control" ] # [ inline ( always ) ] pub fn m3um ( & self ) -> M3UM_R { M3UM_R :: new ( ( ( self . bits >> 18 ) & 0x07 ) as u8 ) } # [ doc = "Bits 21:22 - Bus Master 3 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m3sm ( & self ) -> M3SM_R { M3SM_R :: new ( ( ( self . bits >> 21 ) & 0x03 ) as u8 ) } # [ doc = "Bit 23 - Bus Master 3 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m3pe ( & self ) -> M3PE_R { M3PE_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Bus Master 4 Write Enable" ] # [ inline ( always ) ] pub fn m4we ( & self ) -> M4WE_R { M4WE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Bus Master 4 Read Enable" ] # [ inline ( always ) ] pub fn m4re ( & self ) -> M4RE_R { M4RE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Bus Master 5 Write Enable" ] # [ inline ( always ) ] pub fn m5we ( & self ) -> M5WE_R { M5WE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Bus Master 5 Read Enable" ] # [ inline ( always ) ] pub fn m5re ( & self ) -> M5RE_R { M5RE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Bus Master 6 Write Enable" ] # [ inline ( always ) ] pub fn m6we ( & self ) -> M6WE_R { M6WE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Bus Master 6 Read Enable" ] # [ inline ( always ) ] pub fn m6re ( & self ) -> M6RE_R { M6RE_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Bus Master 7 Write Enable" ] # [ inline ( always ) ] pub fn m7we ( & self ) -> M7WE_R { M7WE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Bus Master 7 Read Enable" ] # [ inline ( always ) ] pub fn m7re ( & self ) -> M7RE_R { M7RE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Bus Master 0 User Mode Access Control" ] # [ inline ( always ) ] pub fn m0um ( & mut self ) -> M0UM_W { M0UM_W { w : self } } # [ doc = "Bits 3:4 - Bus Master 0 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m0sm ( & mut self ) -> M0SM_W { M0SM_W { w : self } } # [ doc = "Bit 5 - Bus Master 0 Process Identifier enable" ] # [ inline ( always ) ] pub fn m0pe ( & mut self ) -> M0PE_W { M0PE_W { w : self } } # [ doc = "Bits 6:8 - Bus Master 1 User Mode Access Control" ] # [ inline ( always ) ] pub fn m1um ( & mut self ) -> M1UM_W { M1UM_W { w : self } } # [ doc = "Bits 9:10 - Bus Master 1 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m1sm ( & mut self ) -> M1SM_W { M1SM_W { w : self } } # [ doc = "Bit 11 - Bus Master 1 Process Identifier enable" ] # [ inline ( always ) ] pub fn m1pe ( & mut self ) -> M1PE_W { M1PE_W { w : self } } # [ doc = "Bits 12:14 - Bus Master 2 User Mode Access control" ] # [ inline ( always ) ] pub fn m2um ( & mut self ) -> M2UM_W { M2UM_W { w : self } } # [ doc = "Bits 15:16 - Bus Master 2 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m2sm ( & mut self ) -> M2SM_W { M2SM_W { w : self } } # [ doc = "Bit 17 - Bus Master 2 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m2pe ( & mut self ) -> M2PE_W { M2PE_W { w : self } } # [ doc = "Bits 18:20 - Bus Master 3 User Mode Access Control" ] # [ inline ( always ) ] pub fn m3um ( & mut self ) -> M3UM_W { M3UM_W { w : self } } # [ doc = "Bits 21:22 - Bus Master 3 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m3sm ( & mut self ) -> M3SM_W { M3SM_W { w : self } } # [ doc = "Bit 23 - Bus Master 3 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m3pe ( & mut self ) -> M3PE_W { M3PE_W { w : self } } # [ doc = "Bit 24 - Bus Master 4 Write Enable" ] # [ inline ( always ) ] pub fn m4we ( & mut self ) -> M4WE_W { M4WE_W { w : self } } # [ doc = "Bit 25 - Bus Master 4 Read Enable" ] # [ inline ( always ) ] pub fn m4re ( & mut self ) -> M4RE_W { M4RE_W { w : self } } # [ doc = "Bit 26 - Bus Master 5 Write Enable" ] # [ inline ( always ) ] pub fn m5we ( & mut self ) -> M5WE_W { M5WE_W { w : self } } # [ doc = "Bit 27 - Bus Master 5 Read Enable" ] # [ inline ( always ) ] pub fn m5re ( & mut self ) -> M5RE_W { M5RE_W { w : self } } # [ doc = "Bit 28 - Bus Master 6 Write Enable" ] # [ inline ( always ) ] pub fn m6we ( & mut self ) -> M6WE_W { M6WE_W { w : self } } # [ doc = "Bit 29 - Bus Master 6 Read Enable" ] # [ inline ( always ) ] pub fn m6re ( & mut self ) -> M6RE_W { M6RE_W { w : self } } # [ doc = "Bit 30 - Bus Master 7 Write Enable" ] # [ inline ( always ) ] pub fn m7we ( & mut self ) -> M7WE_W { M7WE_W { w : self } } # [ doc = "Bit 31 - Bus Master 7 Read Enable" ] # [ inline ( always ) ] pub fn m7re ( & mut self ) -> M7RE_W { M7RE_W { w : self } } } } # [ doc = "Region Descriptor n, Word 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rgd_word3](rgd_word3) module" ] pub type RGD_WORD3 = crate :: Reg < u32 , _RGD_WORD3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RGD_WORD3 ; # [ doc = "`read()` method returns [rgd_word3::R](rgd_word3::R) reader structure" ] impl crate :: Readable for RGD_WORD3 { } # [ doc = "`write(|w| ..)` method takes [rgd_word3::W](rgd_word3::W) writer structure" ] impl crate :: Writable for RGD_WORD3 { } # [ doc = "Region Descriptor n, Word 3" ] pub mod rgd_word3 { # [ doc = "Reader of register RGD%s_WORD3" ] pub type R = crate :: R < u32 , super :: RGD_WORD3 > ; # [ doc = "Writer for register RGD%s_WORD3" ] pub type W = crate :: W < u32 , super :: RGD_WORD3 > ; # [ doc = "Register RGD%s_WORD3 `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: RGD_WORD3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Valid\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VLD_A { # [ doc = "0: Region descriptor is invalid" ] _0 , # [ doc = "1: Region descriptor is valid" ] _1 } impl From < VLD_A > for bool { # [ inline ( always ) ] fn from ( variant : VLD_A ) -> Self { match variant { VLD_A :: _0 => false , VLD_A :: _1 => true } } } # [ doc = "Reader of field `VLD`" ] pub type VLD_R = crate :: R < bool , VLD_A > ; impl VLD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VLD_A { match self . bits { false => VLD_A :: _0 , true => VLD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VLD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VLD_A :: _1 } } # [ doc = "Write proxy for field `VLD`" ] pub struct VLD_W < 'a > { w : & 'a mut W , } impl < 'a > VLD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VLD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Region descriptor is invalid" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VLD_A :: _0 ) } # [ doc = "Region descriptor is valid" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VLD_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `PIDMASK`" ] pub type PIDMASK_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PIDMASK`" ] pub struct PIDMASK_W < 'a > { w : & 'a mut W , } impl < 'a > PIDMASK_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `PID`" ] pub type PID_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PID`" ] pub struct PID_W < 'a > { w : & 'a mut W , } impl < 'a > PID_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bit 0 - Valid" ] # [ inline ( always ) ] pub fn vld ( & self ) -> VLD_R { VLD_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 16:23 - Process Identifier Mask" ] # [ inline ( always ) ] pub fn pidmask ( & self ) -> PIDMASK_R { PIDMASK_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Process Identifier" ] # [ inline ( always ) ] pub fn pid ( & self ) -> PID_R { PID_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bit 0 - Valid" ] # [ inline ( always ) ] pub fn vld ( & mut self ) -> VLD_W { VLD_W { w : self } } # [ doc = "Bits 16:23 - Process Identifier Mask" ] # [ inline ( always ) ] pub fn pidmask ( & mut self ) -> PIDMASK_W { PIDMASK_W { w : self } } # [ doc = "Bits 24:31 - Process Identifier" ] # [ inline ( always ) ] pub fn pid ( & mut self ) -> PID_W { PID_W { w : self } } } } # [ doc = "Region Descriptor Alternate Access Control n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rgdaac](rgdaac) module" ] pub type RGDAAC = crate :: Reg < u32 , _RGDAAC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RGDAAC ; # [ doc = "`read()` method returns [rgdaac::R](rgdaac::R) reader structure" ] impl crate :: Readable for RGDAAC { } # [ doc = "`write(|w| ..)` method takes [rgdaac::W](rgdaac::W) writer structure" ] impl crate :: Writable for RGDAAC { } # [ doc = "Region Descriptor Alternate Access Control n" ] pub mod rgdaac { # [ doc = "Reader of register RGDAAC%s" ] pub type R = crate :: R < u32 , super :: RGDAAC > ; # [ doc = "Writer for register RGDAAC%s" ] pub type W = crate :: W < u32 , super :: RGDAAC > ; # [ doc = "Register RGDAAC%s `reset()`'s with value 0x0061_f7df" ] impl crate :: ResetValue for super :: RGDAAC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0061_f7df } } # [ doc = "Reader of field `M0UM`" ] pub type M0UM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M0UM`" ] pub struct M0UM_W < 'a > { w : & 'a mut W , } impl < 'a > M0UM_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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Reader of field `M0SM`" ] pub type M0SM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M0SM`" ] pub struct M0SM_W < 'a > { w : & 'a mut W , } impl < 'a > M0SM_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 = "Reader of field `M0PE`" ] pub type M0PE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `M0PE`" ] pub struct M0PE_W < 'a > { w : & 'a mut W , } impl < 'a > M0PE_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 = "Reader of field `M1UM`" ] pub type M1UM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M1UM`" ] pub struct M1UM_W < 'a > { w : & 'a mut W , } impl < 'a > M1UM_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 << 6 ) ) | ( ( ( value as u32 ) & 0x07 ) << 6 ) ; self . w } } # [ doc = "Reader of field `M1SM`" ] pub type M1SM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M1SM`" ] pub struct M1SM_W < 'a > { w : & 'a mut W , } impl < 'a > M1SM_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 = "Reader of field `M1PE`" ] pub type M1PE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `M1PE`" ] pub struct M1PE_W < 'a > { w : & 'a mut W , } impl < 'a > M1PE_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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Reader of field `M2UM`" ] pub type M2UM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M2UM`" ] pub struct M2UM_W < 'a > { w : & 'a mut W , } impl < 'a > M2UM_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 << 12 ) ) | ( ( ( value as u32 ) & 0x07 ) << 12 ) ; self . w } } # [ doc = "Reader of field `M2SM`" ] pub type M2SM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `M2SM`" ] pub struct M2SM_W < 'a > { w : & 'a mut W , } impl < 'a > M2SM_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 << 15 ) ) | ( ( ( value as u32 ) & 0x03 ) << 15 ) ; self . w } } # [ doc = "Reader of field `M2PE`" ] pub type M2PE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `M2PE`" ] pub struct M2PE_W < 'a > { w : & 'a mut W , } impl < 'a > M2PE_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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Bus Master 3 User Mode Access Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3UM_A { # [ doc = "0: An attempted access of that mode may be terminated with an access error (if not allowed by another descriptor) and the access not performed." ] _0 , # [ doc = "1: Allows the given access type to occur" ] _1 } impl From < M3UM_A > for u8 { # [ inline ( always ) ] fn from ( variant : M3UM_A ) -> Self { match variant { M3UM_A :: _0 => 0 , M3UM_A :: _1 => 1 } } } # [ doc = "Reader of field `M3UM`" ] pub type M3UM_R = crate :: R < u8 , M3UM_A > ; impl M3UM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , M3UM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( M3UM_A :: _0 ) , 1 => Val ( M3UM_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M3UM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M3UM_A :: _1 } } # [ doc = "Write proxy for field `M3UM`" ] pub struct M3UM_W < 'a > { w : & 'a mut W , } impl < 'a > M3UM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3UM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "An attempted access of that mode may be terminated with an access error (if not allowed by another descriptor) and the access not performed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M3UM_A :: _0 ) } # [ doc = "Allows the given access type to occur" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M3UM_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x07 ) << 18 ) ; self . w } } # [ doc = "Bus Master 3 Supervisor Mode Access Control\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3SM_A { # [ doc = "0: r/w/x; read, write and execute allowed" ] _00 , # [ doc = "1: r/x; read and execute allowed, but no write" ] _01 , # [ doc = "2: r/w; read and write allowed, but no execute" ] _10 , # [ doc = "3: Same as User mode defined in M3UM" ] _11 } impl From < M3SM_A > for u8 { # [ inline ( always ) ] fn from ( variant : M3SM_A ) -> Self { match variant { M3SM_A :: _00 => 0 , M3SM_A :: _01 => 1 , M3SM_A :: _10 => 2 , M3SM_A :: _11 => 3 } } } # [ doc = "Reader of field `M3SM`" ] pub type M3SM_R = crate :: R < u8 , M3SM_A > ; impl M3SM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M3SM_A { match self . bits { 0 => M3SM_A :: _00 , 1 => M3SM_A :: _01 , 2 => M3SM_A :: _10 , 3 => M3SM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M3SM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M3SM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M3SM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M3SM_A :: _11 } } # [ doc = "Write proxy for field `M3SM`" ] pub struct M3SM_W < 'a > { w : & 'a mut W , } impl < 'a > M3SM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3SM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "r/w/x; read, write and execute allowed" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M3SM_A :: _00 ) } # [ doc = "r/x; read and execute allowed, but no write" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M3SM_A :: _01 ) } # [ doc = "r/w; read and write allowed, but no execute" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M3SM_A :: _10 ) } # [ doc = "Same as User mode defined in M3UM" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M3SM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 21 ) ) | ( ( ( value as u32 ) & 0x03 ) << 21 ) ; self . w } } # [ doc = "Bus Master 3 Process Identifier Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3PE_A { # [ doc = "0: Do not include the process identifier in the evaluation" ] _0 , # [ doc = "1: Include the process identifier and mask (RGDn.RGDAAC) in the region hit evaluation" ] _1 } impl From < M3PE_A > for bool { # [ inline ( always ) ] fn from ( variant : M3PE_A ) -> Self { match variant { M3PE_A :: _0 => false , M3PE_A :: _1 => true } } } # [ doc = "Reader of field `M3PE`" ] pub type M3PE_R = crate :: R < bool , M3PE_A > ; impl M3PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M3PE_A { match self . bits { false => M3PE_A :: _0 , true => M3PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M3PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M3PE_A :: _1 } } # [ doc = "Write proxy for field `M3PE`" ] pub struct M3PE_W < 'a > { w : & 'a mut W , } impl < 'a > M3PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the process identifier in the evaluation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M3PE_A :: _0 ) } # [ doc = "Include the process identifier and mask (RGDn.RGDAAC) in the region hit evaluation" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M3PE_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Bus Master 4 Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M4WE_A { # [ doc = "0: Bus master 4 writes terminate with an access error and the write is not performed" ] _0 , # [ doc = "1: Bus master 4 writes allowed" ] _1 } impl From < M4WE_A > for bool { # [ inline ( always ) ] fn from ( variant : M4WE_A ) -> Self { match variant { M4WE_A :: _0 => false , M4WE_A :: _1 => true } } } # [ doc = "Reader of field `M4WE`" ] pub type M4WE_R = crate :: R < bool , M4WE_A > ; impl M4WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M4WE_A { match self . bits { false => M4WE_A :: _0 , true => M4WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M4WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M4WE_A :: _1 } } # [ doc = "Write proxy for field `M4WE`" ] pub struct M4WE_W < 'a > { w : & 'a mut W , } impl < 'a > M4WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M4WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 4 writes terminate with an access error and the write is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M4WE_A :: _0 ) } # [ doc = "Bus master 4 writes allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M4WE_A :: _1 ) } # [ 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 = "Bus Master 4 Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M4RE_A { # [ doc = "0: Bus master 4 reads terminate with an access error and the read is not performed" ] _0 , # [ doc = "1: Bus master 4 reads allowed" ] _1 } impl From < M4RE_A > for bool { # [ inline ( always ) ] fn from ( variant : M4RE_A ) -> Self { match variant { M4RE_A :: _0 => false , M4RE_A :: _1 => true } } } # [ doc = "Reader of field `M4RE`" ] pub type M4RE_R = crate :: R < bool , M4RE_A > ; impl M4RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M4RE_A { match self . bits { false => M4RE_A :: _0 , true => M4RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M4RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M4RE_A :: _1 } } # [ doc = "Write proxy for field `M4RE`" ] pub struct M4RE_W < 'a > { w : & 'a mut W , } impl < 'a > M4RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M4RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 4 reads terminate with an access error and the read is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M4RE_A :: _0 ) } # [ doc = "Bus master 4 reads allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M4RE_A :: _1 ) } # [ 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 = "Bus Master 5 Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M5WE_A { # [ doc = "0: Bus master 5 writes terminate with an access error and the write is not performed" ] _0 , # [ doc = "1: Bus master 5 writes allowed" ] _1 } impl From < M5WE_A > for bool { # [ inline ( always ) ] fn from ( variant : M5WE_A ) -> Self { match variant { M5WE_A :: _0 => false , M5WE_A :: _1 => true } } } # [ doc = "Reader of field `M5WE`" ] pub type M5WE_R = crate :: R < bool , M5WE_A > ; impl M5WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M5WE_A { match self . bits { false => M5WE_A :: _0 , true => M5WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M5WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M5WE_A :: _1 } } # [ doc = "Write proxy for field `M5WE`" ] pub struct M5WE_W < 'a > { w : & 'a mut W , } impl < 'a > M5WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M5WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 5 writes terminate with an access error and the write is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M5WE_A :: _0 ) } # [ doc = "Bus master 5 writes allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M5WE_A :: _1 ) } # [ 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 = "Bus Master 5 Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M5RE_A { # [ doc = "0: Bus master 5 reads terminate with an access error and the read is not performed" ] _0 , # [ doc = "1: Bus master 5 reads allowed" ] _1 } impl From < M5RE_A > for bool { # [ inline ( always ) ] fn from ( variant : M5RE_A ) -> Self { match variant { M5RE_A :: _0 => false , M5RE_A :: _1 => true } } } # [ doc = "Reader of field `M5RE`" ] pub type M5RE_R = crate :: R < bool , M5RE_A > ; impl M5RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M5RE_A { match self . bits { false => M5RE_A :: _0 , true => M5RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M5RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M5RE_A :: _1 } } # [ doc = "Write proxy for field `M5RE`" ] pub struct M5RE_W < 'a > { w : & 'a mut W , } impl < 'a > M5RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M5RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 5 reads terminate with an access error and the read is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M5RE_A :: _0 ) } # [ doc = "Bus master 5 reads allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M5RE_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Bus Master 6 Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M6WE_A { # [ doc = "0: Bus master 6 writes terminate with an access error and the write is not performed" ] _0 , # [ doc = "1: Bus master 6 writes allowed" ] _1 } impl From < M6WE_A > for bool { # [ inline ( always ) ] fn from ( variant : M6WE_A ) -> Self { match variant { M6WE_A :: _0 => false , M6WE_A :: _1 => true } } } # [ doc = "Reader of field `M6WE`" ] pub type M6WE_R = crate :: R < bool , M6WE_A > ; impl M6WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M6WE_A { match self . bits { false => M6WE_A :: _0 , true => M6WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M6WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M6WE_A :: _1 } } # [ doc = "Write proxy for field `M6WE`" ] pub struct M6WE_W < 'a > { w : & 'a mut W , } impl < 'a > M6WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M6WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 6 writes terminate with an access error and the write is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M6WE_A :: _0 ) } # [ doc = "Bus master 6 writes allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M6WE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Bus Master 6 Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M6RE_A { # [ doc = "0: Bus master 6 reads terminate with an access error and the read is not performed" ] _0 , # [ doc = "1: Bus master 6 reads allowed" ] _1 } impl From < M6RE_A > for bool { # [ inline ( always ) ] fn from ( variant : M6RE_A ) -> Self { match variant { M6RE_A :: _0 => false , M6RE_A :: _1 => true } } } # [ doc = "Reader of field `M6RE`" ] pub type M6RE_R = crate :: R < bool , M6RE_A > ; impl M6RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M6RE_A { match self . bits { false => M6RE_A :: _0 , true => M6RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M6RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M6RE_A :: _1 } } # [ doc = "Write proxy for field `M6RE`" ] pub struct M6RE_W < 'a > { w : & 'a mut W , } impl < 'a > M6RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M6RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 6 reads terminate with an access error and the read is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M6RE_A :: _0 ) } # [ doc = "Bus master 6 reads allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M6RE_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Bus Master 7 Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M7WE_A { # [ doc = "0: Bus master 7 writes terminate with an access error and the write is not performed" ] _0 , # [ doc = "1: Bus master 7 writes allowed" ] _1 } impl From < M7WE_A > for bool { # [ inline ( always ) ] fn from ( variant : M7WE_A ) -> Self { match variant { M7WE_A :: _0 => false , M7WE_A :: _1 => true } } } # [ doc = "Reader of field `M7WE`" ] pub type M7WE_R = crate :: R < bool , M7WE_A > ; impl M7WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M7WE_A { match self . bits { false => M7WE_A :: _0 , true => M7WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M7WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M7WE_A :: _1 } } # [ doc = "Write proxy for field `M7WE`" ] pub struct M7WE_W < 'a > { w : & 'a mut W , } impl < 'a > M7WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M7WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 7 writes terminate with an access error and the write is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M7WE_A :: _0 ) } # [ doc = "Bus master 7 writes allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M7WE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Bus Master 7 Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M7RE_A { # [ doc = "0: Bus master 7 reads terminate with an access error and the read is not performed" ] _0 , # [ doc = "1: Bus master 7 reads allowed" ] _1 } impl From < M7RE_A > for bool { # [ inline ( always ) ] fn from ( variant : M7RE_A ) -> Self { match variant { M7RE_A :: _0 => false , M7RE_A :: _1 => true } } } # [ doc = "Reader of field `M7RE`" ] pub type M7RE_R = crate :: R < bool , M7RE_A > ; impl M7RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M7RE_A { match self . bits { false => M7RE_A :: _0 , true => M7RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M7RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M7RE_A :: _1 } } # [ doc = "Write proxy for field `M7RE`" ] pub struct M7RE_W < 'a > { w : & 'a mut W , } impl < 'a > M7RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M7RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus master 7 reads terminate with an access error and the read is not performed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M7RE_A :: _0 ) } # [ doc = "Bus master 7 reads allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M7RE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Bus Master 0 User Mode Access Control" ] # [ inline ( always ) ] pub fn m0um ( & self ) -> M0UM_R { M0UM_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:4 - Bus Master 0 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m0sm ( & self ) -> M0SM_R { M0SM_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Bus Master 0 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m0pe ( & self ) -> M0PE_R { M0PE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bits 6:8 - Bus Master 1 User Mode Access Control" ] # [ inline ( always ) ] pub fn m1um ( & self ) -> M1UM_R { M1UM_R :: new ( ( ( self . bits >> 6 ) & 0x07 ) as u8 ) } # [ doc = "Bits 9:10 - Bus Master 1 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m1sm ( & self ) -> M1SM_R { M1SM_R :: new ( ( ( self . bits >> 9 ) & 0x03 ) as u8 ) } # [ doc = "Bit 11 - Bus Master 1 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m1pe ( & self ) -> M1PE_R { M1PE_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bits 12:14 - Bus Master 2 User Mode Access Control" ] # [ inline ( always ) ] pub fn m2um ( & self ) -> M2UM_R { M2UM_R :: new ( ( ( self . bits >> 12 ) & 0x07 ) as u8 ) } # [ doc = "Bits 15:16 - Bus Master 2 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m2sm ( & self ) -> M2SM_R { M2SM_R :: new ( ( ( self . bits >> 15 ) & 0x03 ) as u8 ) } # [ doc = "Bit 17 - Bus Master 2 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m2pe ( & self ) -> M2PE_R { M2PE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:20 - Bus Master 3 User Mode Access Control" ] # [ inline ( always ) ] pub fn m3um ( & self ) -> M3UM_R { M3UM_R :: new ( ( ( self . bits >> 18 ) & 0x07 ) as u8 ) } # [ doc = "Bits 21:22 - Bus Master 3 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m3sm ( & self ) -> M3SM_R { M3SM_R :: new ( ( ( self . bits >> 21 ) & 0x03 ) as u8 ) } # [ doc = "Bit 23 - Bus Master 3 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m3pe ( & self ) -> M3PE_R { M3PE_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Bus Master 4 Write Enable" ] # [ inline ( always ) ] pub fn m4we ( & self ) -> M4WE_R { M4WE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Bus Master 4 Read Enable" ] # [ inline ( always ) ] pub fn m4re ( & self ) -> M4RE_R { M4RE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Bus Master 5 Write Enable" ] # [ inline ( always ) ] pub fn m5we ( & self ) -> M5WE_R { M5WE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Bus Master 5 Read Enable" ] # [ inline ( always ) ] pub fn m5re ( & self ) -> M5RE_R { M5RE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Bus Master 6 Write Enable" ] # [ inline ( always ) ] pub fn m6we ( & self ) -> M6WE_R { M6WE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Bus Master 6 Read Enable" ] # [ inline ( always ) ] pub fn m6re ( & self ) -> M6RE_R { M6RE_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Bus Master 7 Write Enable" ] # [ inline ( always ) ] pub fn m7we ( & self ) -> M7WE_R { M7WE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Bus Master 7 Read Enable" ] # [ inline ( always ) ] pub fn m7re ( & self ) -> M7RE_R { M7RE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Bus Master 0 User Mode Access Control" ] # [ inline ( always ) ] pub fn m0um ( & mut self ) -> M0UM_W { M0UM_W { w : self } } # [ doc = "Bits 3:4 - Bus Master 0 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m0sm ( & mut self ) -> M0SM_W { M0SM_W { w : self } } # [ doc = "Bit 5 - Bus Master 0 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m0pe ( & mut self ) -> M0PE_W { M0PE_W { w : self } } # [ doc = "Bits 6:8 - Bus Master 1 User Mode Access Control" ] # [ inline ( always ) ] pub fn m1um ( & mut self ) -> M1UM_W { M1UM_W { w : self } } # [ doc = "Bits 9:10 - Bus Master 1 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m1sm ( & mut self ) -> M1SM_W { M1SM_W { w : self } } # [ doc = "Bit 11 - Bus Master 1 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m1pe ( & mut self ) -> M1PE_W { M1PE_W { w : self } } # [ doc = "Bits 12:14 - Bus Master 2 User Mode Access Control" ] # [ inline ( always ) ] pub fn m2um ( & mut self ) -> M2UM_W { M2UM_W { w : self } } # [ doc = "Bits 15:16 - Bus Master 2 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m2sm ( & mut self ) -> M2SM_W { M2SM_W { w : self } } # [ doc = "Bit 17 - Bus Master 2 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m2pe ( & mut self ) -> M2PE_W { M2PE_W { w : self } } # [ doc = "Bits 18:20 - Bus Master 3 User Mode Access Control" ] # [ inline ( always ) ] pub fn m3um ( & mut self ) -> M3UM_W { M3UM_W { w : self } } # [ doc = "Bits 21:22 - Bus Master 3 Supervisor Mode Access Control" ] # [ inline ( always ) ] pub fn m3sm ( & mut self ) -> M3SM_W { M3SM_W { w : self } } # [ doc = "Bit 23 - Bus Master 3 Process Identifier Enable" ] # [ inline ( always ) ] pub fn m3pe ( & mut self ) -> M3PE_W { M3PE_W { w : self } } # [ doc = "Bit 24 - Bus Master 4 Write Enable" ] # [ inline ( always ) ] pub fn m4we ( & mut self ) -> M4WE_W { M4WE_W { w : self } } # [ doc = "Bit 25 - Bus Master 4 Read Enable" ] # [ inline ( always ) ] pub fn m4re ( & mut self ) -> M4RE_W { M4RE_W { w : self } } # [ doc = "Bit 26 - Bus Master 5 Write Enable" ] # [ inline ( always ) ] pub fn m5we ( & mut self ) -> M5WE_W { M5WE_W { w : self } } # [ doc = "Bit 27 - Bus Master 5 Read Enable" ] # [ inline ( always ) ] pub fn m5re ( & mut self ) -> M5RE_W { M5RE_W { w : self } } # [ doc = "Bit 28 - Bus Master 6 Write Enable" ] # [ inline ( always ) ] pub fn m6we ( & mut self ) -> M6WE_W { M6WE_W { w : self } } # [ doc = "Bit 29 - Bus Master 6 Read Enable" ] # [ inline ( always ) ] pub fn m6re ( & mut self ) -> M6RE_W { M6RE_W { w : self } } # [ doc = "Bit 30 - Bus Master 7 Write Enable" ] # [ inline ( always ) ] pub fn m7we ( & mut self ) -> M7WE_W { M7WE_W { w : self } } # [ doc = "Bit 31 - Bus Master 7 Read Enable" ] # [ inline ( always ) ] pub fn m7re ( & mut self ) -> M7RE_W { M7RE_W { w : self } } } } } # [ doc = "Synchronous DRAM Controller" ] pub struct SDRAM { _marker : PhantomData < * const ( ) > } unsafe impl Send for SDRAM { } impl SDRAM { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const sdram :: RegisterBlock { 0x4000_f000 as * const _ } } impl Deref for SDRAM { type Target = sdram :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SDRAM :: ptr ( ) } } } # [ doc = "Synchronous DRAM Controller" ] pub mod sdram { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 66usize ] , # [ doc = "0x42 - Control Register" ] pub ctrl : CTRL , _reserved1 : [ u8 ; 4usize ] , # [ doc = "0x48 - Address and Control Register" ] pub ac0 : AC , # [ doc = "0x4c - Control Mask" ] pub cm0 : CM , # [ doc = "0x50 - Address and Control Register" ] pub ac1 : AC , # [ doc = "0x54 - Control Mask" ] pub cm1 : CM , } # [ doc = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl](ctrl) module" ] pub type CTRL = crate :: Reg < u16 , _CTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL ; # [ doc = "`read()` method returns [ctrl::R](ctrl::R) reader structure" ] impl crate :: Readable for CTRL { } # [ doc = "`write(|w| ..)` method takes [ctrl::W](ctrl::W) writer structure" ] impl crate :: Writable for CTRL { } # [ doc = "Control Register" ] pub mod ctrl { # [ doc = "Reader of register CTRL" ] pub type R = crate :: R < u16 , super :: CTRL > ; # [ doc = "Writer for register CTRL" ] pub type W = crate :: W < u16 , super :: CTRL > ; # [ doc = "Register CTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CTRL { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RC`" ] pub type RC_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `RC`" ] pub struct RC_W < 'a > { w : & 'a mut W , } impl < 'a > RC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x01ff ) | ( ( value as u16 ) & 0x01ff ) ; self . w } } # [ doc = "Refresh timing\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RTIM_A { # [ doc = "0: 3 clocks" ] _00 , # [ doc = "1: 6 clocks" ] _01 , # [ doc = "2: 9 clocks" ] _10 , # [ doc = "3: 9 clocks" ] _11 } impl From < RTIM_A > for u8 { # [ inline ( always ) ] fn from ( variant : RTIM_A ) -> Self { match variant { RTIM_A :: _00 => 0 , RTIM_A :: _01 => 1 , RTIM_A :: _10 => 2 , RTIM_A :: _11 => 3 } } } # [ doc = "Reader of field `RTIM`" ] pub type RTIM_R = crate :: R < u8 , RTIM_A > ; impl RTIM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RTIM_A { match self . bits { 0 => RTIM_A :: _00 , 1 => RTIM_A :: _01 , 2 => RTIM_A :: _10 , 3 => RTIM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RTIM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == RTIM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == RTIM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == RTIM_A :: _11 } } # [ doc = "Write proxy for field `RTIM`" ] pub struct RTIM_W < 'a > { w : & 'a mut W , } impl < 'a > RTIM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RTIM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "3 clocks" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RTIM_A :: _00 ) } # [ doc = "6 clocks" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( RTIM_A :: _01 ) } # [ doc = "9 clocks" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( RTIM_A :: _10 ) } # [ doc = "9 clocks" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( RTIM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 9 ) ) | ( ( ( value as u16 ) & 0x03 ) << 9 ) ; self . w } } # [ doc = "Initiate self-refresh command.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IS_A { # [ doc = "0: Take no action or issue a selfx command to exit self refresh." ] _0 , # [ doc = "1: SDRAM controller sends a self command to both SDRAM blocks to put them in low-power, self-refresh state where they remain until IS is cleared. When IS is cleared, the controller sends a selfx command for the SDRAMs to exit self-refresh. The refresh counter is suspended while the SDRAMs are in self-refresh; the SDRAM controls the refresh period." ] _1 } impl From < IS_A > for bool { # [ inline ( always ) ] fn from ( variant : IS_A ) -> Self { match variant { IS_A :: _0 => false , IS_A :: _1 => true } } } # [ doc = "Reader of field `IS`" ] pub type IS_R = crate :: R < bool , IS_A > ; impl IS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IS_A { match self . bits { false => IS_A :: _0 , true => IS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IS_A :: _1 } } # [ doc = "Write proxy for field `IS`" ] pub struct IS_W < 'a > { w : & 'a mut W , } impl < 'a > IS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Take no action or issue a selfx command to exit self refresh." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IS_A :: _0 ) } # [ doc = "SDRAM controller sends a self command to both SDRAM blocks to put them in low-power, self-refresh state where they remain until IS is cleared. When IS is cleared, the controller sends a selfx command for the SDRAMs to exit self-refresh. The refresh counter is suspended while the SDRAMs are in self-refresh; the SDRAM controls the refresh period." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IS_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u16 ) & 0x01 ) << 11 ) ; self . w } } impl R { # [ doc = "Bits 0:8 - Refresh count" ] # [ inline ( always ) ] pub fn rc ( & self ) -> RC_R { RC_R :: new ( ( self . bits & 0x01ff ) as u16 ) } # [ doc = "Bits 9:10 - Refresh timing" ] # [ inline ( always ) ] pub fn rtim ( & self ) -> RTIM_R { RTIM_R :: new ( ( ( self . bits >> 9 ) & 0x03 ) as u8 ) } # [ doc = "Bit 11 - Initiate self-refresh command." ] # [ inline ( always ) ] pub fn is ( & self ) -> IS_R { IS_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:8 - Refresh count" ] # [ inline ( always ) ] pub fn rc ( & mut self ) -> RC_W { RC_W { w : self } } # [ doc = "Bits 9:10 - Refresh timing" ] # [ inline ( always ) ] pub fn rtim ( & mut self ) -> RTIM_W { RTIM_W { w : self } } # [ doc = "Bit 11 - Initiate self-refresh command." ] # [ inline ( always ) ] pub fn is ( & mut self ) -> IS_W { IS_W { w : self } } } } # [ doc = "Address and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ac](ac) module" ] pub type AC = crate :: Reg < u32 , _AC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _AC ; # [ doc = "`read()` method returns [ac::R](ac::R) reader structure" ] impl crate :: Readable for AC { } # [ doc = "`write(|w| ..)` method takes [ac::W](ac::W) writer structure" ] impl crate :: Writable for AC { } # [ doc = "Address and Control Register" ] pub mod ac { # [ doc = "Reader of register AC%s" ] pub type R = crate :: R < u32 , super :: AC > ; # [ doc = "Writer for register AC%s" ] pub type W = crate :: W < u32 , super :: AC > ; # [ doc = "Register AC%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: AC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Initiate precharge all (pall) command.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IP_A { # [ doc = "0: Take no action." ] _0 , # [ doc = "1: A pall command is sent to the associated SDRAM block. During initialization, this command is executed after all DRAM controller registers are programmed. After IP is set, the next write to an appropriate SDRAM address generates the pall command to the SDRAM block." ] _1 } impl From < IP_A > for bool { # [ inline ( always ) ] fn from ( variant : IP_A ) -> Self { match variant { IP_A :: _0 => false , IP_A :: _1 => true } } } # [ doc = "Reader of field `IP`" ] pub type IP_R = crate :: R < bool , IP_A > ; impl IP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IP_A { match self . bits { false => IP_A :: _0 , true => IP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IP_A :: _1 } } # [ doc = "Write proxy for field `IP`" ] pub struct IP_W < 'a > { w : & 'a mut W , } impl < 'a > IP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Take no action." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IP_A :: _0 ) } # [ doc = "A pall command is sent to the associated SDRAM block. During initialization, this command is executed after all DRAM controller registers are programmed. After IP is set, the next write to an appropriate SDRAM address generates the pall command to the SDRAM block." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IP_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port size.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: 32-bit port" ] _00 , # [ doc = "1: 8-bit port" ] _01 , # [ doc = "2: 16-bit port" ] _10 , # [ doc = "3: 16-bit port" ] _11 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _00 => 0 , PS_A :: _01 => 1 , PS_A :: _10 => 2 , PS_A :: _11 => 3 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _00 , 1 => PS_A :: _01 , 2 => PS_A :: _10 , 3 => PS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PS_A :: _11 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "32-bit port" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PS_A :: _00 ) } # [ doc = "8-bit port" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PS_A :: _01 ) } # [ doc = "16-bit port" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PS_A :: _10 ) } # [ doc = "16-bit port" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Initiate mode register set (mrs) command.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IMRS_A { # [ doc = "0: Take no action" ] _0 , # [ doc = "1: Initiate mrs command" ] _1 } impl From < IMRS_A > for bool { # [ inline ( always ) ] fn from ( variant : IMRS_A ) -> Self { match variant { IMRS_A :: _0 => false , IMRS_A :: _1 => true } } } # [ doc = "Reader of field `IMRS`" ] pub type IMRS_R = crate :: R < bool , IMRS_A > ; impl IMRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IMRS_A { match self . bits { false => IMRS_A :: _0 , true => IMRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IMRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IMRS_A :: _1 } } # [ doc = "Write proxy for field `IMRS`" ] pub struct IMRS_W < 'a > { w : & 'a mut W , } impl < 'a > IMRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IMRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Take no action" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IMRS_A :: _0 ) } # [ doc = "Initiate mrs command" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IMRS_A :: _1 ) } # [ 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 = "Reader of field `CBM`" ] pub type CBM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CBM`" ] pub struct CBM_W < 'a > { w : & 'a mut W , } impl < 'a > CBM_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 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Reader of field `CASL`" ] pub type CASL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CASL`" ] pub struct CASL_W < 'a > { w : & 'a mut W , } impl < 'a > CASL_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 << 12 ) ) | ( ( ( value as u32 ) & 0x03 ) << 12 ) ; self . w } } # [ doc = "Refresh enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RE_A { # [ doc = "0: Do not refresh associated DRAM block" ] _0 , # [ doc = "1: Refresh associated DRAM block" ] _1 } impl From < RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RE_A ) -> Self { match variant { RE_A :: _0 => false , RE_A :: _1 => true } } } # [ doc = "Reader of field `RE`" ] pub type RE_R = crate :: R < bool , RE_A > ; impl RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RE_A { match self . bits { false => RE_A :: _0 , true => RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RE_A :: _1 } } # [ doc = "Write proxy for field `RE`" ] pub struct RE_W < 'a > { w : & 'a mut W , } impl < 'a > RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not refresh associated DRAM block" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RE_A :: _0 ) } # [ doc = "Refresh associated DRAM block" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RE_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `BA`" ] pub type BA_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `BA`" ] pub struct BA_W < 'a > { w : & 'a mut W , } impl < 'a > BA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x3fff << 18 ) ) | ( ( ( value as u32 ) & 0x3fff ) << 18 ) ; self . w } } impl R { # [ doc = "Bit 3 - Initiate precharge all (pall) command." ] # [ inline ( always ) ] pub fn ip ( & self ) -> IP_R { IP_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:5 - Port size." ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Initiate mode register set (mrs) command." ] # [ inline ( always ) ] pub fn imrs ( & self ) -> IMRS_R { IMRS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Command bit location" ] # [ inline ( always ) ] pub fn cbm ( & self ) -> CBM_R { CBM_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bits 12:13 - CAS Latency" ] # [ inline ( always ) ] pub fn casl ( & self ) -> CASL_R { CASL_R :: new ( ( ( self . bits >> 12 ) & 0x03 ) as u8 ) } # [ doc = "Bit 15 - Refresh enable" ] # [ inline ( always ) ] pub fn re ( & self ) -> RE_R { RE_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:31 - Base address register." ] # [ inline ( always ) ] pub fn ba ( & self ) -> BA_R { BA_R :: new ( ( ( self . bits >> 18 ) & 0x3fff ) as u16 ) } } impl W { # [ doc = "Bit 3 - Initiate precharge all (pall) command." ] # [ inline ( always ) ] pub fn ip ( & mut self ) -> IP_W { IP_W { w : self } } # [ doc = "Bits 4:5 - Port size." ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 6 - Initiate mode register set (mrs) command." ] # [ inline ( always ) ] pub fn imrs ( & mut self ) -> IMRS_W { IMRS_W { w : self } } # [ doc = "Bits 8:10 - Command bit location" ] # [ inline ( always ) ] pub fn cbm ( & mut self ) -> CBM_W { CBM_W { w : self } } # [ doc = "Bits 12:13 - CAS Latency" ] # [ inline ( always ) ] pub fn casl ( & mut self ) -> CASL_W { CASL_W { w : self } } # [ doc = "Bit 15 - Refresh enable" ] # [ inline ( always ) ] pub fn re ( & mut self ) -> RE_W { RE_W { w : self } } # [ doc = "Bits 18:31 - Base address register." ] # [ inline ( always ) ] pub fn ba ( & mut self ) -> BA_W { BA_W { w : self } } } } # [ doc = "Control Mask\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cm](cm) module" ] pub type CM = crate :: Reg < u32 , _CM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CM ; # [ doc = "`read()` method returns [cm::R](cm::R) reader structure" ] impl crate :: Readable for CM { } # [ doc = "`write(|w| ..)` method takes [cm::W](cm::W) writer structure" ] impl crate :: Writable for CM { } # [ doc = "Control Mask" ] pub mod cm { # [ doc = "Reader of register CM%s" ] pub type R = crate :: R < u32 , super :: CM > ; # [ doc = "Writer for register CM%s" ] pub type W = crate :: W < u32 , super :: CM > ; # [ doc = "Register CM%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Valid.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum V_A { # [ doc = "0: Do not decode DRAM accesses." ] _0 , # [ doc = "1: Registers controlling the DRAM block are initialized; DRAM accesses can be decoded" ] _1 } impl From < V_A > for bool { # [ inline ( always ) ] fn from ( variant : V_A ) -> Self { match variant { V_A :: _0 => false , V_A :: _1 => true } } } # [ doc = "Reader of field `V`" ] pub type V_R = crate :: R < bool , V_A > ; impl V_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> V_A { match self . bits { false => V_A :: _0 , true => V_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == V_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == V_A :: _1 } } # [ doc = "Write proxy for field `V`" ] pub struct V_W < 'a > { w : & 'a mut W , } impl < 'a > V_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : V_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not decode DRAM accesses." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( V_A :: _0 ) } # [ doc = "Registers controlling the DRAM block are initialized; DRAM accesses can be decoded" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( V_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write protect.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WP_A { # [ doc = "0: Allow write accesses" ] _0 , # [ doc = "1: Ignore write accesses. The DRAM controller ignores write accesses to the memory block and an address exception occurs. Write accesses to a write-protected DRAM region are compared in the chip select module for a hit. If no hit occurs, an external bus cycle is generated. If this external bus cycle is not acknowledged, an access exception occurs." ] _1 } impl From < WP_A > for bool { # [ inline ( always ) ] fn from ( variant : WP_A ) -> Self { match variant { WP_A :: _0 => false , WP_A :: _1 => true } } } # [ doc = "Reader of field `WP`" ] pub type WP_R = crate :: R < bool , WP_A > ; impl WP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WP_A { match self . bits { false => WP_A :: _0 , true => WP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WP_A :: _1 } } # [ doc = "Write proxy for field `WP`" ] pub struct WP_W < 'a > { w : & 'a mut W , } impl < 'a > WP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Allow write accesses" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WP_A :: _0 ) } # [ doc = "Ignore write accesses. The DRAM controller ignores write accesses to the memory block and an address exception occurs. Write accesses to a write-protected DRAM region are compared in the chip select module for a hit. If no hit occurs, an external bus cycle is generated. If this external bus cycle is not acknowledged, an access exception occurs." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WP_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Base address mask.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BAM_A { # [ doc = "0: The associated address bit is used in decoding the DRAM hit to a memory block" ] _0 , # [ doc = "1: The associated address bit is not used in the DRAM hit decode" ] _1 } impl From < BAM_A > for u16 { # [ inline ( always ) ] fn from ( variant : BAM_A ) -> Self { match variant { BAM_A :: _0 => 0 , BAM_A :: _1 => 1 } } } # [ doc = "Reader of field `BAM`" ] pub type BAM_R = crate :: R < u16 , BAM_A > ; impl BAM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u16 , BAM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( BAM_A :: _0 ) , 1 => Val ( BAM_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BAM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BAM_A :: _1 } } # [ doc = "Write proxy for field `BAM`" ] pub struct BAM_W < 'a > { w : & 'a mut W , } impl < 'a > BAM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BAM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "The associated address bit is used in decoding the DRAM hit to a memory block" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BAM_A :: _0 ) } # [ doc = "The associated address bit is not used in the DRAM hit decode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BAM_A :: _1 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x3fff << 18 ) ) | ( ( ( value as u32 ) & 0x3fff ) << 18 ) ; self . w } } impl R { # [ doc = "Bit 0 - Valid." ] # [ inline ( always ) ] pub fn v ( & self ) -> V_R { V_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Write protect." ] # [ inline ( always ) ] pub fn wp ( & self ) -> WP_R { WP_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:31 - Base address mask." ] # [ inline ( always ) ] pub fn bam ( & self ) -> BAM_R { BAM_R :: new ( ( ( self . bits >> 18 ) & 0x3fff ) as u16 ) } } impl W { # [ doc = "Bit 0 - Valid." ] # [ inline ( always ) ] pub fn v ( & mut self ) -> V_W { V_W { w : self } } # [ doc = "Bit 8 - Write protect." ] # [ inline ( always ) ] pub fn wp ( & mut self ) -> WP_W { WP_W { w : self } } # [ doc = "Bits 18:31 - Base address mask." ] # [ inline ( always ) ] pub fn bam ( & mut self ) -> BAM_W { BAM_W { w : self } } } } } # [ doc = "Flash Memory Controller-greg" ] pub struct FMC { _marker : PhantomData < * const ( ) > } unsafe impl Send for FMC { } impl FMC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const fmc :: RegisterBlock { 0x4001_f000 as * const _ } } impl Deref for FMC { type Target = fmc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * FMC :: ptr ( ) } } } # [ doc = "Flash Memory Controller-greg" ] pub mod fmc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Flash Access Protection Register" ] pub pfapr : PFAPR , # [ doc = "0x04 - Flash Bank 0-1 Control Register" ] pub pfb01cr : PFB01CR , # [ doc = "0x08 - Flash Bank 2-3 Control Register" ] pub pfb23cr : PFB23CR , _reserved3 : [ u8 ; 244usize ] , # [ doc = "0x100 - Cache Tag Storage" ] pub tagvdw0s : [ TAGVDW0S ; 4 ] , # [ doc = "0x110 - Cache Tag Storage" ] pub tagvdw1s : [ TAGVDW1S ; 4 ] , # [ doc = "0x120 - Cache Tag Storage" ] pub tagvdw2s : [ TAGVDW2S ; 4 ] , # [ doc = "0x130 - Cache Tag Storage" ] pub tagvdw3s : [ TAGVDW3S ; 4 ] , _reserved7 : [ u8 ; 192usize ] , # [ doc = "0x200 - Cache Data Storage (uppermost word)" ] pub dataw0s0um : DATAW0SUM , # [ doc = "0x204 - Cache Data Storage (mid-upper word)" ] pub dataw0s0mu : DATAW0SMU , # [ doc = "0x208 - Cache Data Storage (mid-lower word)" ] pub dataw0s0ml : DATAW0SML , # [ doc = "0x20c - Cache Data Storage (lowermost word)" ] pub dataw0s0lm : DATAW0SLM , # [ doc = "0x210 - Cache Data Storage (uppermost word)" ] pub dataw0s1um : DATAW0SUM , # [ doc = "0x214 - Cache Data Storage (mid-upper word)" ] pub dataw0s1mu : DATAW0SMU , # [ doc = "0x218 - Cache Data Storage (mid-lower word)" ] pub dataw0s1ml : DATAW0SML , # [ doc = "0x21c - Cache Data Storage (lowermost word)" ] pub dataw0s1lm : DATAW0SLM , # [ doc = "0x220 - Cache Data Storage (uppermost word)" ] pub dataw0s2um : DATAW0SUM , # [ doc = "0x224 - Cache Data Storage (mid-upper word)" ] pub dataw0s2mu : DATAW0SMU , # [ doc = "0x228 - Cache Data Storage (mid-lower word)" ] pub dataw0s2ml : DATAW0SML , # [ doc = "0x22c - Cache Data Storage (lowermost word)" ] pub dataw0s2lm : DATAW0SLM , # [ doc = "0x230 - Cache Data Storage (uppermost word)" ] pub dataw0s3um : DATAW0SUM , # [ doc = "0x234 - Cache Data Storage (mid-upper word)" ] pub dataw0s3mu : DATAW0SMU , # [ doc = "0x238 - Cache Data Storage (mid-lower word)" ] pub dataw0s3ml : DATAW0SML , # [ doc = "0x23c - Cache Data Storage (lowermost word)" ] pub dataw0s3lm : DATAW0SLM , # [ doc = "0x240 - Cache Data Storage (uppermost word)" ] pub dataw1s0um : DATAW1SUM , # [ doc = "0x244 - Cache Data Storage (mid-upper word)" ] pub dataw1s0mu : DATAW1SMU , # [ doc = "0x248 - Cache Data Storage (mid-lower word)" ] pub dataw1s0ml : DATAW1SML , # [ doc = "0x24c - Cache Data Storage (lowermost word)" ] pub dataw1s0lm : DATAW1SLM , # [ doc = "0x250 - Cache Data Storage (uppermost word)" ] pub dataw1s1um : DATAW1SUM , # [ doc = "0x254 - Cache Data Storage (mid-upper word)" ] pub dataw1s1mu : DATAW1SMU , # [ doc = "0x258 - Cache Data Storage (mid-lower word)" ] pub dataw1s1ml : DATAW1SML , # [ doc = "0x25c - Cache Data Storage (lowermost word)" ] pub dataw1s1lm : DATAW1SLM , # [ doc = "0x260 - Cache Data Storage (uppermost word)" ] pub dataw1s2um : DATAW1SUM , # [ doc = "0x264 - Cache Data Storage (mid-upper word)" ] pub dataw1s2mu : DATAW1SMU , # [ doc = "0x268 - Cache Data Storage (mid-lower word)" ] pub dataw1s2ml : DATAW1SML , # [ doc = "0x26c - Cache Data Storage (lowermost word)" ] pub dataw1s2lm : DATAW1SLM , # [ doc = "0x270 - Cache Data Storage (uppermost word)" ] pub dataw1s3um : DATAW1SUM , # [ doc = "0x274 - Cache Data Storage (mid-upper word)" ] pub dataw1s3mu : DATAW1SMU , # [ doc = "0x278 - Cache Data Storage (mid-lower word)" ] pub dataw1s3ml : DATAW1SML , # [ doc = "0x27c - Cache Data Storage (lowermost word)" ] pub dataw1s3lm : DATAW1SLM , # [ doc = "0x280 - Cache Data Storage (uppermost word)" ] pub dataw2s0um : DATAW2SUM , # [ doc = "0x284 - Cache Data Storage (mid-upper word)" ] pub dataw2s0mu : DATAW2SMU , # [ doc = "0x288 - Cache Data Storage (mid-lower word)" ] pub dataw2s0ml : DATAW2SML , # [ doc = "0x28c - Cache Data Storage (lowermost word)" ] pub dataw2s0lm : DATAW2SLM , # [ doc = "0x290 - Cache Data Storage (uppermost word)" ] pub dataw2s1um : DATAW2SUM , # [ doc = "0x294 - Cache Data Storage (mid-upper word)" ] pub dataw2s1mu : DATAW2SMU , # [ doc = "0x298 - Cache Data Storage (mid-lower word)" ] pub dataw2s1ml : DATAW2SML , # [ doc = "0x29c - Cache Data Storage (lowermost word)" ] pub dataw2s1lm : DATAW2SLM , # [ doc = "0x2a0 - Cache Data Storage (uppermost word)" ] pub dataw2s2um : DATAW2SUM , # [ doc = "0x2a4 - Cache Data Storage (mid-upper word)" ] pub dataw2s2mu : DATAW2SMU , # [ doc = "0x2a8 - Cache Data Storage (mid-lower word)" ] pub dataw2s2ml : DATAW2SML , # [ doc = "0x2ac - Cache Data Storage (lowermost word)" ] pub dataw2s2lm : DATAW2SLM , # [ doc = "0x2b0 - Cache Data Storage (uppermost word)" ] pub dataw2s3um : DATAW2SUM , # [ doc = "0x2b4 - Cache Data Storage (mid-upper word)" ] pub dataw2s3mu : DATAW2SMU , # [ doc = "0x2b8 - Cache Data Storage (mid-lower word)" ] pub dataw2s3ml : DATAW2SML , # [ doc = "0x2bc - Cache Data Storage (lowermost word)" ] pub dataw2s3lm : DATAW2SLM , # [ doc = "0x2c0 - Cache Data Storage (uppermost word)" ] pub dataw3s0um : DATAW3SUM , # [ doc = "0x2c4 - Cache Data Storage (mid-upper word)" ] pub dataw3s0mu : DATAW3SMU , # [ doc = "0x2c8 - Cache Data Storage (mid-lower word)" ] pub dataw3s0ml : DATAW3SML , # [ doc = "0x2cc - Cache Data Storage (lowermost word)" ] pub dataw3s0lm : DATAW3SLM , # [ doc = "0x2d0 - Cache Data Storage (uppermost word)" ] pub dataw3s1um : DATAW3SUM , # [ doc = "0x2d4 - Cache Data Storage (mid-upper word)" ] pub dataw3s1mu : DATAW3SMU , # [ doc = "0x2d8 - Cache Data Storage (mid-lower word)" ] pub dataw3s1ml : DATAW3SML , # [ doc = "0x2dc - Cache Data Storage (lowermost word)" ] pub dataw3s1lm : DATAW3SLM , # [ doc = "0x2e0 - Cache Data Storage (uppermost word)" ] pub dataw3s2um : DATAW3SUM , # [ doc = "0x2e4 - Cache Data Storage (mid-upper word)" ] pub dataw3s2mu : DATAW3SMU , # [ doc = "0x2e8 - Cache Data Storage (mid-lower word)" ] pub dataw3s2ml : DATAW3SML , # [ doc = "0x2ec - Cache Data Storage (lowermost word)" ] pub dataw3s2lm : DATAW3SLM , # [ doc = "0x2f0 - Cache Data Storage (uppermost word)" ] pub dataw3s3um : DATAW3SUM , # [ doc = "0x2f4 - Cache Data Storage (mid-upper word)" ] pub dataw3s3mu : DATAW3SMU , # [ doc = "0x2f8 - Cache Data Storage (mid-lower word)" ] pub dataw3s3ml : DATAW3SML , # [ doc = "0x2fc - Cache Data Storage (lowermost word)" ] pub dataw3s3lm : DATAW3SLM , } # [ doc = "Flash Access Protection Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pfapr](pfapr) module" ] pub type PFAPR = crate :: Reg < u32 , _PFAPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PFAPR ; # [ doc = "`read()` method returns [pfapr::R](pfapr::R) reader structure" ] impl crate :: Readable for PFAPR { } # [ doc = "`write(|w| ..)` method takes [pfapr::W](pfapr::W) writer structure" ] impl crate :: Writable for PFAPR { } # [ doc = "Flash Access Protection Register" ] pub mod pfapr { # [ doc = "Reader of register PFAPR" ] pub type R = crate :: R < u32 , super :: PFAPR > ; # [ doc = "Writer for register PFAPR" ] pub type W = crate :: W < u32 , super :: PFAPR > ; # [ doc = "Register PFAPR `reset()`'s with value 0x00f8_003f" ] impl crate :: ResetValue for super :: PFAPR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x00f8_003f } } # [ doc = "Master 0 Access Protection\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M0AP_A { # [ doc = "0: No access may be performed by this master" ] _00 , # [ doc = "1: Only read accesses may be performed by this master" ] _01 , # [ doc = "2: Only write accesses may be performed by this master" ] _10 , # [ doc = "3: Both read and write accesses may be performed by this master" ] _11 } impl From < M0AP_A > for u8 { # [ inline ( always ) ] fn from ( variant : M0AP_A ) -> Self { match variant { M0AP_A :: _00 => 0 , M0AP_A :: _01 => 1 , M0AP_A :: _10 => 2 , M0AP_A :: _11 => 3 } } } # [ doc = "Reader of field `M0AP`" ] pub type M0AP_R = crate :: R < u8 , M0AP_A > ; impl M0AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M0AP_A { match self . bits { 0 => M0AP_A :: _00 , 1 => M0AP_A :: _01 , 2 => M0AP_A :: _10 , 3 => M0AP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M0AP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M0AP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M0AP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M0AP_A :: _11 } } # [ doc = "Write proxy for field `M0AP`" ] pub struct M0AP_W < 'a > { w : & 'a mut W , } impl < 'a > M0AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M0AP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No access may be performed by this master" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M0AP_A :: _00 ) } # [ doc = "Only read accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M0AP_A :: _01 ) } # [ doc = "Only write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M0AP_A :: _10 ) } # [ doc = "Both read and write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M0AP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Master 1 Access Protection\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M1AP_A { # [ doc = "0: No access may be performed by this master" ] _00 , # [ doc = "1: Only read accesses may be performed by this master" ] _01 , # [ doc = "2: Only write accesses may be performed by this master" ] _10 , # [ doc = "3: Both read and write accesses may be performed by this master" ] _11 } impl From < M1AP_A > for u8 { # [ inline ( always ) ] fn from ( variant : M1AP_A ) -> Self { match variant { M1AP_A :: _00 => 0 , M1AP_A :: _01 => 1 , M1AP_A :: _10 => 2 , M1AP_A :: _11 => 3 } } } # [ doc = "Reader of field `M1AP`" ] pub type M1AP_R = crate :: R < u8 , M1AP_A > ; impl M1AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M1AP_A { match self . bits { 0 => M1AP_A :: _00 , 1 => M1AP_A :: _01 , 2 => M1AP_A :: _10 , 3 => M1AP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M1AP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M1AP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M1AP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M1AP_A :: _11 } } # [ doc = "Write proxy for field `M1AP`" ] pub struct M1AP_W < 'a > { w : & 'a mut W , } impl < 'a > M1AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M1AP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No access may be performed by this master" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M1AP_A :: _00 ) } # [ doc = "Only read accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M1AP_A :: _01 ) } # [ doc = "Only write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M1AP_A :: _10 ) } # [ doc = "Both read and write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M1AP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Master 2 Access Protection\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M2AP_A { # [ doc = "0: No access may be performed by this master" ] _00 , # [ doc = "1: Only read accesses may be performed by this master" ] _01 , # [ doc = "2: Only write accesses may be performed by this master" ] _10 , # [ doc = "3: Both read and write accesses may be performed by this master" ] _11 } impl From < M2AP_A > for u8 { # [ inline ( always ) ] fn from ( variant : M2AP_A ) -> Self { match variant { M2AP_A :: _00 => 0 , M2AP_A :: _01 => 1 , M2AP_A :: _10 => 2 , M2AP_A :: _11 => 3 } } } # [ doc = "Reader of field `M2AP`" ] pub type M2AP_R = crate :: R < u8 , M2AP_A > ; impl M2AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M2AP_A { match self . bits { 0 => M2AP_A :: _00 , 1 => M2AP_A :: _01 , 2 => M2AP_A :: _10 , 3 => M2AP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M2AP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M2AP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M2AP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M2AP_A :: _11 } } # [ doc = "Write proxy for field `M2AP`" ] pub struct M2AP_W < 'a > { w : & 'a mut W , } impl < 'a > M2AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M2AP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No access may be performed by this master" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M2AP_A :: _00 ) } # [ doc = "Only read accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M2AP_A :: _01 ) } # [ doc = "Only write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M2AP_A :: _10 ) } # [ doc = "Both read and write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M2AP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Master 3 Access Protection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3AP_A { # [ doc = "0: No access may be performed by this master" ] _00 , # [ doc = "1: Only read accesses may be performed by this master" ] _01 , # [ doc = "2: Only write accesses may be performed by this master" ] _10 , # [ doc = "3: Both read and write accesses may be performed by this master" ] _11 } impl From < M3AP_A > for u8 { # [ inline ( always ) ] fn from ( variant : M3AP_A ) -> Self { match variant { M3AP_A :: _00 => 0 , M3AP_A :: _01 => 1 , M3AP_A :: _10 => 2 , M3AP_A :: _11 => 3 } } } # [ doc = "Reader of field `M3AP`" ] pub type M3AP_R = crate :: R < u8 , M3AP_A > ; impl M3AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M3AP_A { match self . bits { 0 => M3AP_A :: _00 , 1 => M3AP_A :: _01 , 2 => M3AP_A :: _10 , 3 => M3AP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M3AP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M3AP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M3AP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M3AP_A :: _11 } } # [ doc = "Write proxy for field `M3AP`" ] pub struct M3AP_W < 'a > { w : & 'a mut W , } impl < 'a > M3AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3AP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No access may be performed by this master" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M3AP_A :: _00 ) } # [ doc = "Only read accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M3AP_A :: _01 ) } # [ doc = "Only write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M3AP_A :: _10 ) } # [ doc = "Both read and write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M3AP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Master 4 Access Protection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M4AP_A { # [ doc = "0: No access may be performed by this master" ] _00 , # [ doc = "1: Only read accesses may be performed by this master" ] _01 , # [ doc = "2: Only write accesses may be performed by this master" ] _10 , # [ doc = "3: Both read and write accesses may be performed by this master" ] _11 } impl From < M4AP_A > for u8 { # [ inline ( always ) ] fn from ( variant : M4AP_A ) -> Self { match variant { M4AP_A :: _00 => 0 , M4AP_A :: _01 => 1 , M4AP_A :: _10 => 2 , M4AP_A :: _11 => 3 } } } # [ doc = "Reader of field `M4AP`" ] pub type M4AP_R = crate :: R < u8 , M4AP_A > ; impl M4AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M4AP_A { match self . bits { 0 => M4AP_A :: _00 , 1 => M4AP_A :: _01 , 2 => M4AP_A :: _10 , 3 => M4AP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M4AP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M4AP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M4AP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M4AP_A :: _11 } } # [ doc = "Write proxy for field `M4AP`" ] pub struct M4AP_W < 'a > { w : & 'a mut W , } impl < 'a > M4AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M4AP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No access may be performed by this master" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M4AP_A :: _00 ) } # [ doc = "Only read accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M4AP_A :: _01 ) } # [ doc = "Only write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M4AP_A :: _10 ) } # [ doc = "Both read and write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M4AP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "Master 5 Access Protection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M5AP_A { # [ doc = "0: No access may be performed by this master" ] _00 , # [ doc = "1: Only read accesses may be performed by this master" ] _01 , # [ doc = "2: Only write accesses may be performed by this master" ] _10 , # [ doc = "3: Both read and write accesses may be performed by this master" ] _11 } impl From < M5AP_A > for u8 { # [ inline ( always ) ] fn from ( variant : M5AP_A ) -> Self { match variant { M5AP_A :: _00 => 0 , M5AP_A :: _01 => 1 , M5AP_A :: _10 => 2 , M5AP_A :: _11 => 3 } } } # [ doc = "Reader of field `M5AP`" ] pub type M5AP_R = crate :: R < u8 , M5AP_A > ; impl M5AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M5AP_A { match self . bits { 0 => M5AP_A :: _00 , 1 => M5AP_A :: _01 , 2 => M5AP_A :: _10 , 3 => M5AP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M5AP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M5AP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M5AP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M5AP_A :: _11 } } # [ doc = "Write proxy for field `M5AP`" ] pub struct M5AP_W < 'a > { w : & 'a mut W , } impl < 'a > M5AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M5AP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No access may be performed by this master" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M5AP_A :: _00 ) } # [ doc = "Only read accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M5AP_A :: _01 ) } # [ doc = "Only write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M5AP_A :: _10 ) } # [ doc = "Both read and write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M5AP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 10 ) ) | ( ( ( value as u32 ) & 0x03 ) << 10 ) ; self . w } } # [ doc = "Master 6 Access Protection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M6AP_A { # [ doc = "0: No access may be performed by this master" ] _00 , # [ doc = "1: Only read accesses may be performed by this master" ] _01 , # [ doc = "2: Only write accesses may be performed by this master" ] _10 , # [ doc = "3: Both read and write accesses may be performed by this master" ] _11 } impl From < M6AP_A > for u8 { # [ inline ( always ) ] fn from ( variant : M6AP_A ) -> Self { match variant { M6AP_A :: _00 => 0 , M6AP_A :: _01 => 1 , M6AP_A :: _10 => 2 , M6AP_A :: _11 => 3 } } } # [ doc = "Reader of field `M6AP`" ] pub type M6AP_R = crate :: R < u8 , M6AP_A > ; impl M6AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M6AP_A { match self . bits { 0 => M6AP_A :: _00 , 1 => M6AP_A :: _01 , 2 => M6AP_A :: _10 , 3 => M6AP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M6AP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M6AP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M6AP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M6AP_A :: _11 } } # [ doc = "Write proxy for field `M6AP`" ] pub struct M6AP_W < 'a > { w : & 'a mut W , } impl < 'a > M6AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M6AP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No access may be performed by this master" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M6AP_A :: _00 ) } # [ doc = "Only read accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M6AP_A :: _01 ) } # [ doc = "Only write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M6AP_A :: _10 ) } # [ doc = "Both read and write accesses may be performed by this master" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M6AP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 12 ) ) | ( ( ( value as u32 ) & 0x03 ) << 12 ) ; self . w } } # [ doc = "Master 7 Access Protection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M7AP_A { # [ doc = "0: No access may be performed by this master." ] _00 , # [ doc = "1: Only read accesses may be performed by this master." ] _01 , # [ doc = "2: Only write accesses may be performed by this master." ] _10 , # [ doc = "3: Both read and write accesses may be performed by this master." ] _11 } impl From < M7AP_A > for u8 { # [ inline ( always ) ] fn from ( variant : M7AP_A ) -> Self { match variant { M7AP_A :: _00 => 0 , M7AP_A :: _01 => 1 , M7AP_A :: _10 => 2 , M7AP_A :: _11 => 3 } } } # [ doc = "Reader of field `M7AP`" ] pub type M7AP_R = crate :: R < u8 , M7AP_A > ; impl M7AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M7AP_A { match self . bits { 0 => M7AP_A :: _00 , 1 => M7AP_A :: _01 , 2 => M7AP_A :: _10 , 3 => M7AP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == M7AP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == M7AP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == M7AP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == M7AP_A :: _11 } } # [ doc = "Write proxy for field `M7AP`" ] pub struct M7AP_W < 'a > { w : & 'a mut W , } impl < 'a > M7AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M7AP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No access may be performed by this master." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( M7AP_A :: _00 ) } # [ doc = "Only read accesses may be performed by this master." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( M7AP_A :: _01 ) } # [ doc = "Only write accesses may be performed by this master." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( M7AP_A :: _10 ) } # [ doc = "Both read and write accesses may be performed by this master." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( M7AP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 14 ) ) | ( ( ( value as u32 ) & 0x03 ) << 14 ) ; self . w } } # [ doc = "Master 0 Prefetch Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M0PFD_A { # [ doc = "0: Prefetching for this master is enabled." ] _0 , # [ doc = "1: Prefetching for this master is disabled." ] _1 } impl From < M0PFD_A > for bool { # [ inline ( always ) ] fn from ( variant : M0PFD_A ) -> Self { match variant { M0PFD_A :: _0 => false , M0PFD_A :: _1 => true } } } # [ doc = "Reader of field `M0PFD`" ] pub type M0PFD_R = crate :: R < bool , M0PFD_A > ; impl M0PFD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M0PFD_A { match self . bits { false => M0PFD_A :: _0 , true => M0PFD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M0PFD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M0PFD_A :: _1 } } # [ doc = "Write proxy for field `M0PFD`" ] pub struct M0PFD_W < 'a > { w : & 'a mut W , } impl < 'a > M0PFD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M0PFD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prefetching for this master is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M0PFD_A :: _0 ) } # [ doc = "Prefetching for this master is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M0PFD_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Master 1 Prefetch Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M1PFD_A { # [ doc = "0: Prefetching for this master is enabled." ] _0 , # [ doc = "1: Prefetching for this master is disabled." ] _1 } impl From < M1PFD_A > for bool { # [ inline ( always ) ] fn from ( variant : M1PFD_A ) -> Self { match variant { M1PFD_A :: _0 => false , M1PFD_A :: _1 => true } } } # [ doc = "Reader of field `M1PFD`" ] pub type M1PFD_R = crate :: R < bool , M1PFD_A > ; impl M1PFD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M1PFD_A { match self . bits { false => M1PFD_A :: _0 , true => M1PFD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M1PFD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M1PFD_A :: _1 } } # [ doc = "Write proxy for field `M1PFD`" ] pub struct M1PFD_W < 'a > { w : & 'a mut W , } impl < 'a > M1PFD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M1PFD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prefetching for this master is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M1PFD_A :: _0 ) } # [ doc = "Prefetching for this master is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M1PFD_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Master 2 Prefetch Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M2PFD_A { # [ doc = "0: Prefetching for this master is enabled." ] _0 , # [ doc = "1: Prefetching for this master is disabled." ] _1 } impl From < M2PFD_A > for bool { # [ inline ( always ) ] fn from ( variant : M2PFD_A ) -> Self { match variant { M2PFD_A :: _0 => false , M2PFD_A :: _1 => true } } } # [ doc = "Reader of field `M2PFD`" ] pub type M2PFD_R = crate :: R < bool , M2PFD_A > ; impl M2PFD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M2PFD_A { match self . bits { false => M2PFD_A :: _0 , true => M2PFD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M2PFD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M2PFD_A :: _1 } } # [ doc = "Write proxy for field `M2PFD`" ] pub struct M2PFD_W < 'a > { w : & 'a mut W , } impl < 'a > M2PFD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M2PFD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prefetching for this master is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M2PFD_A :: _0 ) } # [ doc = "Prefetching for this master is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M2PFD_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Master 3 Prefetch Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M3PFD_A { # [ doc = "0: Prefetching for this master is enabled." ] _0 , # [ doc = "1: Prefetching for this master is disabled." ] _1 } impl From < M3PFD_A > for bool { # [ inline ( always ) ] fn from ( variant : M3PFD_A ) -> Self { match variant { M3PFD_A :: _0 => false , M3PFD_A :: _1 => true } } } # [ doc = "Reader of field `M3PFD`" ] pub type M3PFD_R = crate :: R < bool , M3PFD_A > ; impl M3PFD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M3PFD_A { match self . bits { false => M3PFD_A :: _0 , true => M3PFD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M3PFD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M3PFD_A :: _1 } } # [ doc = "Write proxy for field `M3PFD`" ] pub struct M3PFD_W < 'a > { w : & 'a mut W , } impl < 'a > M3PFD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M3PFD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prefetching for this master is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M3PFD_A :: _0 ) } # [ doc = "Prefetching for this master is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M3PFD_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Master 4 Prefetch Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M4PFD_A { # [ doc = "0: Prefetching for this master is enabled." ] _0 , # [ doc = "1: Prefetching for this master is disabled." ] _1 } impl From < M4PFD_A > for bool { # [ inline ( always ) ] fn from ( variant : M4PFD_A ) -> Self { match variant { M4PFD_A :: _0 => false , M4PFD_A :: _1 => true } } } # [ doc = "Reader of field `M4PFD`" ] pub type M4PFD_R = crate :: R < bool , M4PFD_A > ; impl M4PFD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M4PFD_A { match self . bits { false => M4PFD_A :: _0 , true => M4PFD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M4PFD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M4PFD_A :: _1 } } # [ doc = "Write proxy for field `M4PFD`" ] pub struct M4PFD_W < 'a > { w : & 'a mut W , } impl < 'a > M4PFD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M4PFD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prefetching for this master is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M4PFD_A :: _0 ) } # [ doc = "Prefetching for this master is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M4PFD_A :: _1 ) } # [ 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 = "Master 5 Prefetch Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M5PFD_A { # [ doc = "0: Prefetching for this master is enabled." ] _0 , # [ doc = "1: Prefetching for this master is disabled." ] _1 } impl From < M5PFD_A > for bool { # [ inline ( always ) ] fn from ( variant : M5PFD_A ) -> Self { match variant { M5PFD_A :: _0 => false , M5PFD_A :: _1 => true } } } # [ doc = "Reader of field `M5PFD`" ] pub type M5PFD_R = crate :: R < bool , M5PFD_A > ; impl M5PFD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M5PFD_A { match self . bits { false => M5PFD_A :: _0 , true => M5PFD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M5PFD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M5PFD_A :: _1 } } # [ doc = "Write proxy for field `M5PFD`" ] pub struct M5PFD_W < 'a > { w : & 'a mut W , } impl < 'a > M5PFD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M5PFD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prefetching for this master is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M5PFD_A :: _0 ) } # [ doc = "Prefetching for this master is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M5PFD_A :: _1 ) } # [ 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 = "Master 6 Prefetch Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M6PFD_A { # [ doc = "0: Prefetching for this master is enabled." ] _0 , # [ doc = "1: Prefetching for this master is disabled." ] _1 } impl From < M6PFD_A > for bool { # [ inline ( always ) ] fn from ( variant : M6PFD_A ) -> Self { match variant { M6PFD_A :: _0 => false , M6PFD_A :: _1 => true } } } # [ doc = "Reader of field `M6PFD`" ] pub type M6PFD_R = crate :: R < bool , M6PFD_A > ; impl M6PFD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M6PFD_A { match self . bits { false => M6PFD_A :: _0 , true => M6PFD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M6PFD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M6PFD_A :: _1 } } # [ doc = "Write proxy for field `M6PFD`" ] pub struct M6PFD_W < 'a > { w : & 'a mut W , } impl < 'a > M6PFD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M6PFD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prefetching for this master is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M6PFD_A :: _0 ) } # [ doc = "Prefetching for this master is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M6PFD_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Master 7 Prefetch Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M7PFD_A { # [ doc = "0: Prefetching for this master is enabled." ] _0 , # [ doc = "1: Prefetching for this master is disabled." ] _1 } impl From < M7PFD_A > for bool { # [ inline ( always ) ] fn from ( variant : M7PFD_A ) -> Self { match variant { M7PFD_A :: _0 => false , M7PFD_A :: _1 => true } } } # [ doc = "Reader of field `M7PFD`" ] pub type M7PFD_R = crate :: R < bool , M7PFD_A > ; impl M7PFD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M7PFD_A { match self . bits { false => M7PFD_A :: _0 , true => M7PFD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M7PFD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M7PFD_A :: _1 } } # [ doc = "Write proxy for field `M7PFD`" ] pub struct M7PFD_W < 'a > { w : & 'a mut W , } impl < 'a > M7PFD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M7PFD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prefetching for this master is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M7PFD_A :: _0 ) } # [ doc = "Prefetching for this master is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M7PFD_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Master 0 Access Protection" ] # [ inline ( always ) ] pub fn m0ap ( & self ) -> M0AP_R { M0AP_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Master 1 Access Protection" ] # [ inline ( always ) ] pub fn m1ap ( & self ) -> M1AP_R { M1AP_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Master 2 Access Protection" ] # [ inline ( always ) ] pub fn m2ap ( & self ) -> M2AP_R { M2AP_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Master 3 Access Protection" ] # [ inline ( always ) ] pub fn m3ap ( & self ) -> M3AP_R { M3AP_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bits 8:9 - Master 4 Access Protection" ] # [ inline ( always ) ] pub fn m4ap ( & self ) -> M4AP_R { M4AP_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bits 10:11 - Master 5 Access Protection" ] # [ inline ( always ) ] pub fn m5ap ( & self ) -> M5AP_R { M5AP_R :: new ( ( ( self . bits >> 10 ) & 0x03 ) as u8 ) } # [ doc = "Bits 12:13 - Master 6 Access Protection" ] # [ inline ( always ) ] pub fn m6ap ( & self ) -> M6AP_R { M6AP_R :: new ( ( ( self . bits >> 12 ) & 0x03 ) as u8 ) } # [ doc = "Bits 14:15 - Master 7 Access Protection" ] # [ inline ( always ) ] pub fn m7ap ( & self ) -> M7AP_R { M7AP_R :: new ( ( ( self . bits >> 14 ) & 0x03 ) as u8 ) } # [ doc = "Bit 16 - Master 0 Prefetch Disable" ] # [ inline ( always ) ] pub fn m0pfd ( & self ) -> M0PFD_R { M0PFD_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Master 1 Prefetch Disable" ] # [ inline ( always ) ] pub fn m1pfd ( & self ) -> M1PFD_R { M1PFD_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Master 2 Prefetch Disable" ] # [ inline ( always ) ] pub fn m2pfd ( & self ) -> M2PFD_R { M2PFD_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Master 3 Prefetch Disable" ] # [ inline ( always ) ] pub fn m3pfd ( & self ) -> M3PFD_R { M3PFD_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Master 4 Prefetch Disable" ] # [ inline ( always ) ] pub fn m4pfd ( & self ) -> M4PFD_R { M4PFD_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Master 5 Prefetch Disable" ] # [ inline ( always ) ] pub fn m5pfd ( & self ) -> M5PFD_R { M5PFD_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Master 6 Prefetch Disable" ] # [ inline ( always ) ] pub fn m6pfd ( & self ) -> M6PFD_R { M6PFD_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Master 7 Prefetch Disable" ] # [ inline ( always ) ] pub fn m7pfd ( & self ) -> M7PFD_R { M7PFD_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Master 0 Access Protection" ] # [ inline ( always ) ] pub fn m0ap ( & mut self ) -> M0AP_W { M0AP_W { w : self } } # [ doc = "Bits 2:3 - Master 1 Access Protection" ] # [ inline ( always ) ] pub fn m1ap ( & mut self ) -> M1AP_W { M1AP_W { w : self } } # [ doc = "Bits 4:5 - Master 2 Access Protection" ] # [ inline ( always ) ] pub fn m2ap ( & mut self ) -> M2AP_W { M2AP_W { w : self } } # [ doc = "Bits 6:7 - Master 3 Access Protection" ] # [ inline ( always ) ] pub fn m3ap ( & mut self ) -> M3AP_W { M3AP_W { w : self } } # [ doc = "Bits 8:9 - Master 4 Access Protection" ] # [ inline ( always ) ] pub fn m4ap ( & mut self ) -> M4AP_W { M4AP_W { w : self } } # [ doc = "Bits 10:11 - Master 5 Access Protection" ] # [ inline ( always ) ] pub fn m5ap ( & mut self ) -> M5AP_W { M5AP_W { w : self } } # [ doc = "Bits 12:13 - Master 6 Access Protection" ] # [ inline ( always ) ] pub fn m6ap ( & mut self ) -> M6AP_W { M6AP_W { w : self } } # [ doc = "Bits 14:15 - Master 7 Access Protection" ] # [ inline ( always ) ] pub fn m7ap ( & mut self ) -> M7AP_W { M7AP_W { w : self } } # [ doc = "Bit 16 - Master 0 Prefetch Disable" ] # [ inline ( always ) ] pub fn m0pfd ( & mut self ) -> M0PFD_W { M0PFD_W { w : self } } # [ doc = "Bit 17 - Master 1 Prefetch Disable" ] # [ inline ( always ) ] pub fn m1pfd ( & mut self ) -> M1PFD_W { M1PFD_W { w : self } } # [ doc = "Bit 18 - Master 2 Prefetch Disable" ] # [ inline ( always ) ] pub fn m2pfd ( & mut self ) -> M2PFD_W { M2PFD_W { w : self } } # [ doc = "Bit 19 - Master 3 Prefetch Disable" ] # [ inline ( always ) ] pub fn m3pfd ( & mut self ) -> M3PFD_W { M3PFD_W { w : self } } # [ doc = "Bit 20 - Master 4 Prefetch Disable" ] # [ inline ( always ) ] pub fn m4pfd ( & mut self ) -> M4PFD_W { M4PFD_W { w : self } } # [ doc = "Bit 21 - Master 5 Prefetch Disable" ] # [ inline ( always ) ] pub fn m5pfd ( & mut self ) -> M5PFD_W { M5PFD_W { w : self } } # [ doc = "Bit 22 - Master 6 Prefetch Disable" ] # [ inline ( always ) ] pub fn m6pfd ( & mut self ) -> M6PFD_W { M6PFD_W { w : self } } # [ doc = "Bit 23 - Master 7 Prefetch Disable" ] # [ inline ( always ) ] pub fn m7pfd ( & mut self ) -> M7PFD_W { M7PFD_W { w : self } } } } # [ doc = "Flash Bank 0-1 Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pfb01cr](pfb01cr) module" ] pub type PFB01CR = crate :: Reg < u32 , _PFB01CR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PFB01CR ; # [ doc = "`read()` method returns [pfb01cr::R](pfb01cr::R) reader structure" ] impl crate :: Readable for PFB01CR { } # [ doc = "`write(|w| ..)` method takes [pfb01cr::W](pfb01cr::W) writer structure" ] impl crate :: Writable for PFB01CR { } # [ doc = "Flash Bank 0-1 Control Register" ] pub mod pfb01cr { # [ doc = "Reader of register PFB01CR" ] pub type R = crate :: R < u32 , super :: PFB01CR > ; # [ doc = "Writer for register PFB01CR" ] pub type W = crate :: W < u32 , super :: PFB01CR > ; # [ doc = "Register PFB01CR `reset()`'s with value 0x3004_001f" ] impl crate :: ResetValue for super :: PFB01CR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x3004_001f } } # [ doc = "Reader of field `RFU`" ] pub type RFU_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RFU`" ] pub struct RFU_W < 'a > { w : & 'a mut W , } impl < 'a > RFU_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Bank 0 Instruction Prefetch Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B0IPE_A { # [ doc = "0: Do not prefetch in response to instruction fetches." ] _0 , # [ doc = "1: Enable prefetches in response to instruction fetches." ] _1 } impl From < B0IPE_A > for bool { # [ inline ( always ) ] fn from ( variant : B0IPE_A ) -> Self { match variant { B0IPE_A :: _0 => false , B0IPE_A :: _1 => true } } } # [ doc = "Reader of field `B0IPE`" ] pub type B0IPE_R = crate :: R < bool , B0IPE_A > ; impl B0IPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> B0IPE_A { match self . bits { false => B0IPE_A :: _0 , true => B0IPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == B0IPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == B0IPE_A :: _1 } } # [ doc = "Write proxy for field `B0IPE`" ] pub struct B0IPE_W < 'a > { w : & 'a mut W , } impl < 'a > B0IPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : B0IPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not prefetch in response to instruction fetches." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( B0IPE_A :: _0 ) } # [ doc = "Enable prefetches in response to instruction fetches." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( B0IPE_A :: _1 ) } # [ 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 } } # [ doc = "Bank 0 Data Prefetch Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B0DPE_A { # [ doc = "0: Do not prefetch in response to data references." ] _0 , # [ doc = "1: Enable prefetches in response to data references." ] _1 } impl From < B0DPE_A > for bool { # [ inline ( always ) ] fn from ( variant : B0DPE_A ) -> Self { match variant { B0DPE_A :: _0 => false , B0DPE_A :: _1 => true } } } # [ doc = "Reader of field `B0DPE`" ] pub type B0DPE_R = crate :: R < bool , B0DPE_A > ; impl B0DPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> B0DPE_A { match self . bits { false => B0DPE_A :: _0 , true => B0DPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == B0DPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == B0DPE_A :: _1 } } # [ doc = "Write proxy for field `B0DPE`" ] pub struct B0DPE_W < 'a > { w : & 'a mut W , } impl < 'a > B0DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : B0DPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not prefetch in response to data references." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( B0DPE_A :: _0 ) } # [ doc = "Enable prefetches in response to data references." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( B0DPE_A :: _1 ) } # [ 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 = "Bank 0 Instruction Cache Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B0ICE_A { # [ doc = "0: Do not cache instruction fetches." ] _0 , # [ doc = "1: Cache instruction fetches." ] _1 } impl From < B0ICE_A > for bool { # [ inline ( always ) ] fn from ( variant : B0ICE_A ) -> Self { match variant { B0ICE_A :: _0 => false , B0ICE_A :: _1 => true } } } # [ doc = "Reader of field `B0ICE`" ] pub type B0ICE_R = crate :: R < bool , B0ICE_A > ; impl B0ICE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> B0ICE_A { match self . bits { false => B0ICE_A :: _0 , true => B0ICE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == B0ICE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == B0ICE_A :: _1 } } # [ doc = "Write proxy for field `B0ICE`" ] pub struct B0ICE_W < 'a > { w : & 'a mut W , } impl < 'a > B0ICE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : B0ICE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not cache instruction fetches." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( B0ICE_A :: _0 ) } # [ doc = "Cache instruction fetches." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( B0ICE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Bank 0 Data Cache Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B0DCE_A { # [ doc = "0: Do not cache data references." ] _0 , # [ doc = "1: Cache data references." ] _1 } impl From < B0DCE_A > for bool { # [ inline ( always ) ] fn from ( variant : B0DCE_A ) -> Self { match variant { B0DCE_A :: _0 => false , B0DCE_A :: _1 => true } } } # [ doc = "Reader of field `B0DCE`" ] pub type B0DCE_R = crate :: R < bool , B0DCE_A > ; impl B0DCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> B0DCE_A { match self . bits { false => B0DCE_A :: _0 , true => B0DCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == B0DCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == B0DCE_A :: _1 } } # [ doc = "Write proxy for field `B0DCE`" ] pub struct B0DCE_W < 'a > { w : & 'a mut W , } impl < 'a > B0DCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : B0DCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not cache data references." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( B0DCE_A :: _0 ) } # [ doc = "Cache data references." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( B0DCE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Cache Replacement Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRC_A { # [ doc = "0: LRU replacement algorithm per set across all four ways" ] _000 , # [ doc = "2: Independent LRU with ways \\[0-1\\] for ifetches, \\[2-3\\] for data" ] _010 , # [ doc = "3: Independent LRU with ways \\[0-2\\] for ifetches, \\[3\\] for data" ] _011 } impl From < CRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : CRC_A ) -> Self { match variant { CRC_A :: _000 => 0 , CRC_A :: _010 => 2 , CRC_A :: _011 => 3 } } } # [ doc = "Reader of field `CRC`" ] pub type CRC_R = crate :: R < u8 , CRC_A > ; impl CRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CRC_A :: _000 ) , 2 => Val ( CRC_A :: _010 ) , 3 => Val ( CRC_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == CRC_A :: _000 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == CRC_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == CRC_A :: _011 } } # [ doc = "Write proxy for field `CRC`" ] pub struct CRC_W < 'a > { w : & 'a mut W , } impl < 'a > CRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "LRU replacement algorithm per set across all four ways" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( CRC_A :: _000 ) } # [ doc = "Independent LRU with ways \\[0-1\\] for ifetches, \\[2-3\\] for data" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( CRC_A :: _010 ) } # [ doc = "Independent LRU with ways \\[0-2\\] for ifetches, \\[3\\] for data" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( CRC_A :: _011 ) } # [ 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 << 5 ) ) | ( ( ( value as u32 ) & 0x07 ) << 5 ) ; self . w } } # [ doc = "Bank 0 Memory Width\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B0MW_A { # [ doc = "0: 32 bits" ] _00 , # [ doc = "1: 64 bits" ] _01 , # [ doc = "2: 128 bits" ] _10 } impl From < B0MW_A > for u8 { # [ inline ( always ) ] fn from ( variant : B0MW_A ) -> Self { match variant { B0MW_A :: _00 => 0 , B0MW_A :: _01 => 1 , B0MW_A :: _10 => 2 } } } # [ doc = "Reader of field `B0MW`" ] pub type B0MW_R = crate :: R < u8 , B0MW_A > ; impl B0MW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , B0MW_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( B0MW_A :: _00 ) , 1 => Val ( B0MW_A :: _01 ) , 2 => Val ( B0MW_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == B0MW_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == B0MW_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == B0MW_A :: _10 } } # [ doc = "Invalidate Prefetch Speculation Buffer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum S_B_INV_AW { # [ doc = "0: Speculation buffer is not affected" ] _0 , # [ doc = "1: Invalidate (clear) speculation buffer" ] _1 } impl From < S_B_INV_AW > for bool { # [ inline ( always ) ] fn from ( variant : S_B_INV_AW ) -> Self { match variant { S_B_INV_AW :: _0 => false , S_B_INV_AW :: _1 => true } } } # [ doc = "Write proxy for field `S_B_INV`" ] pub struct S_B_INV_W < 'a > { w : & 'a mut W , } impl < 'a > S_B_INV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : S_B_INV_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Speculation buffer is not affected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( S_B_INV_AW :: _0 ) } # [ doc = "Invalidate (clear) speculation buffer" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( S_B_INV_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Cache Invalidate Way x\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CINV_WAY_AW { # [ doc = "0: No cache way invalidation for the corresponding cache" ] _0 , # [ doc = "1: Invalidate cache way for the corresponding cache: clear the tag, data, and vld bits of ways selected" ] _1 } impl From < CINV_WAY_AW > for u8 { # [ inline ( always ) ] fn from ( variant : CINV_WAY_AW ) -> Self { match variant { CINV_WAY_AW :: _0 => 0 , CINV_WAY_AW :: _1 => 1 } } } # [ doc = "Write proxy for field `CINV_WAY`" ] pub struct CINV_WAY_W < 'a > { w : & 'a mut W , } impl < 'a > CINV_WAY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CINV_WAY_AW ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No cache way invalidation for the corresponding cache" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CINV_WAY_AW :: _0 ) } # [ doc = "Invalidate cache way for the corresponding cache: clear the tag, data, and vld bits of ways selected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CINV_WAY_AW :: _1 ) } # [ 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 & ! ( 0x0f << 20 ) ) | ( ( ( value as u32 ) & 0x0f ) << 20 ) ; self . w } } # [ doc = "Cache Lock Way x\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLCK_WAY_A { # [ doc = "0: Cache way is unlocked and may be displaced" ] _0 , # [ doc = "1: Cache way is locked and its contents are not displaced" ] _1 } impl From < CLCK_WAY_A > for u8 { # [ inline ( always ) ] fn from ( variant : CLCK_WAY_A ) -> Self { match variant { CLCK_WAY_A :: _0 => 0 , CLCK_WAY_A :: _1 => 1 } } } # [ doc = "Reader of field `CLCK_WAY`" ] pub type CLCK_WAY_R = crate :: R < u8 , CLCK_WAY_A > ; impl CLCK_WAY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CLCK_WAY_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CLCK_WAY_A :: _0 ) , 1 => Val ( CLCK_WAY_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLCK_WAY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLCK_WAY_A :: _1 } } # [ doc = "Write proxy for field `CLCK_WAY`" ] pub struct CLCK_WAY_W < 'a > { w : & 'a mut W , } impl < 'a > CLCK_WAY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLCK_WAY_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Cache way is unlocked and may be displaced" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLCK_WAY_A :: _0 ) } # [ doc = "Cache way is locked and its contents are not displaced" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLCK_WAY_A :: _1 ) } # [ 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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } # [ doc = "Reader of field `B0RWSC`" ] pub type B0RWSC_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Reserved for future use" ] # [ inline ( always ) ] pub fn rfu ( & self ) -> RFU_R { RFU_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Bank 0 Instruction Prefetch Enable" ] # [ inline ( always ) ] pub fn b0ipe ( & self ) -> B0IPE_R { B0IPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Bank 0 Data Prefetch Enable" ] # [ inline ( always ) ] pub fn b0dpe ( & self ) -> B0DPE_R { B0DPE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Bank 0 Instruction Cache Enable" ] # [ inline ( always ) ] pub fn b0ice ( & self ) -> B0ICE_R { B0ICE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Bank 0 Data Cache Enable" ] # [ inline ( always ) ] pub fn b0dce ( & self ) -> B0DCE_R { B0DCE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:7 - Cache Replacement Control" ] # [ inline ( always ) ] pub fn crc ( & self ) -> CRC_R { CRC_R :: new ( ( ( self . bits >> 5 ) & 0x07 ) as u8 ) } # [ doc = "Bits 17:18 - Bank 0 Memory Width" ] # [ inline ( always ) ] pub fn b0mw ( & self ) -> B0MW_R { B0MW_R :: new ( ( ( self . bits >> 17 ) & 0x03 ) as u8 ) } # [ doc = "Bits 24:27 - Cache Lock Way x" ] # [ inline ( always ) ] pub fn clck_way ( & self ) -> CLCK_WAY_R { CLCK_WAY_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - Bank 0 Read Wait State Control" ] # [ inline ( always ) ] pub fn b0rwsc ( & self ) -> B0RWSC_R { B0RWSC_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Reserved for future use" ] # [ inline ( always ) ] pub fn rfu ( & mut self ) -> RFU_W { RFU_W { w : self } } # [ doc = "Bit 1 - Bank 0 Instruction Prefetch Enable" ] # [ inline ( always ) ] pub fn b0ipe ( & mut self ) -> B0IPE_W { B0IPE_W { w : self } } # [ doc = "Bit 2 - Bank 0 Data Prefetch Enable" ] # [ inline ( always ) ] pub fn b0dpe ( & mut self ) -> B0DPE_W { B0DPE_W { w : self } } # [ doc = "Bit 3 - Bank 0 Instruction Cache Enable" ] # [ inline ( always ) ] pub fn b0ice ( & mut self ) -> B0ICE_W { B0ICE_W { w : self } } # [ doc = "Bit 4 - Bank 0 Data Cache Enable" ] # [ inline ( always ) ] pub fn b0dce ( & mut self ) -> B0DCE_W { B0DCE_W { w : self } } # [ doc = "Bits 5:7 - Cache Replacement Control" ] # [ inline ( always ) ] pub fn crc ( & mut self ) -> CRC_W { CRC_W { w : self } } # [ doc = "Bit 19 - Invalidate Prefetch Speculation Buffer" ] # [ inline ( always ) ] pub fn s_b_inv ( & mut self ) -> S_B_INV_W { S_B_INV_W { w : self } } # [ doc = "Bits 20:23 - Cache Invalidate Way x" ] # [ inline ( always ) ] pub fn cinv_way ( & mut self ) -> CINV_WAY_W { CINV_WAY_W { w : self } } # [ doc = "Bits 24:27 - Cache Lock Way x" ] # [ inline ( always ) ] pub fn clck_way ( & mut self ) -> CLCK_WAY_W { CLCK_WAY_W { w : self } } } } # [ doc = "Flash Bank 2-3 Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pfb23cr](pfb23cr) module" ] pub type PFB23CR = crate :: Reg < u32 , _PFB23CR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PFB23CR ; # [ doc = "`read()` method returns [pfb23cr::R](pfb23cr::R) reader structure" ] impl crate :: Readable for PFB23CR { } # [ doc = "`write(|w| ..)` method takes [pfb23cr::W](pfb23cr::W) writer structure" ] impl crate :: Writable for PFB23CR { } # [ doc = "Flash Bank 2-3 Control Register" ] pub mod pfb23cr { # [ doc = "Reader of register PFB23CR" ] pub type R = crate :: R < u32 , super :: PFB23CR > ; # [ doc = "Writer for register PFB23CR" ] pub type W = crate :: W < u32 , super :: PFB23CR > ; # [ doc = "Register PFB23CR `reset()`'s with value 0x3004_001f" ] impl crate :: ResetValue for super :: PFB23CR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x3004_001f } } # [ doc = "Reader of field `RFU`" ] pub type RFU_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RFU`" ] pub struct RFU_W < 'a > { w : & 'a mut W , } impl < 'a > RFU_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Bank 1 Instruction Prefetch Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B1IPE_A { # [ doc = "0: Do not prefetch in response to instruction fetches." ] _0 , # [ doc = "1: Enable prefetches in response to instruction fetches." ] _1 } impl From < B1IPE_A > for bool { # [ inline ( always ) ] fn from ( variant : B1IPE_A ) -> Self { match variant { B1IPE_A :: _0 => false , B1IPE_A :: _1 => true } } } # [ doc = "Reader of field `B1IPE`" ] pub type B1IPE_R = crate :: R < bool , B1IPE_A > ; impl B1IPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> B1IPE_A { match self . bits { false => B1IPE_A :: _0 , true => B1IPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == B1IPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == B1IPE_A :: _1 } } # [ doc = "Write proxy for field `B1IPE`" ] pub struct B1IPE_W < 'a > { w : & 'a mut W , } impl < 'a > B1IPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : B1IPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not prefetch in response to instruction fetches." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( B1IPE_A :: _0 ) } # [ doc = "Enable prefetches in response to instruction fetches." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( B1IPE_A :: _1 ) } # [ 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 } } # [ doc = "Bank 1 Data Prefetch Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B1DPE_A { # [ doc = "0: Do not prefetch in response to data references." ] _0 , # [ doc = "1: Enable prefetches in response to data references." ] _1 } impl From < B1DPE_A > for bool { # [ inline ( always ) ] fn from ( variant : B1DPE_A ) -> Self { match variant { B1DPE_A :: _0 => false , B1DPE_A :: _1 => true } } } # [ doc = "Reader of field `B1DPE`" ] pub type B1DPE_R = crate :: R < bool , B1DPE_A > ; impl B1DPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> B1DPE_A { match self . bits { false => B1DPE_A :: _0 , true => B1DPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == B1DPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == B1DPE_A :: _1 } } # [ doc = "Write proxy for field `B1DPE`" ] pub struct B1DPE_W < 'a > { w : & 'a mut W , } impl < 'a > B1DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : B1DPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not prefetch in response to data references." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( B1DPE_A :: _0 ) } # [ doc = "Enable prefetches in response to data references." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( B1DPE_A :: _1 ) } # [ 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 = "Bank 1 Instruction Cache Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B1ICE_A { # [ doc = "0: Do not cache instruction fetches." ] _0 , # [ doc = "1: Cache instruction fetches." ] _1 } impl From < B1ICE_A > for bool { # [ inline ( always ) ] fn from ( variant : B1ICE_A ) -> Self { match variant { B1ICE_A :: _0 => false , B1ICE_A :: _1 => true } } } # [ doc = "Reader of field `B1ICE`" ] pub type B1ICE_R = crate :: R < bool , B1ICE_A > ; impl B1ICE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> B1ICE_A { match self . bits { false => B1ICE_A :: _0 , true => B1ICE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == B1ICE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == B1ICE_A :: _1 } } # [ doc = "Write proxy for field `B1ICE`" ] pub struct B1ICE_W < 'a > { w : & 'a mut W , } impl < 'a > B1ICE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : B1ICE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not cache instruction fetches." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( B1ICE_A :: _0 ) } # [ doc = "Cache instruction fetches." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( B1ICE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Bank 1 Data Cache Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B1DCE_A { # [ doc = "0: Do not cache data references." ] _0 , # [ doc = "1: Cache data references." ] _1 } impl From < B1DCE_A > for bool { # [ inline ( always ) ] fn from ( variant : B1DCE_A ) -> Self { match variant { B1DCE_A :: _0 => false , B1DCE_A :: _1 => true } } } # [ doc = "Reader of field `B1DCE`" ] pub type B1DCE_R = crate :: R < bool , B1DCE_A > ; impl B1DCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> B1DCE_A { match self . bits { false => B1DCE_A :: _0 , true => B1DCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == B1DCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == B1DCE_A :: _1 } } # [ doc = "Write proxy for field `B1DCE`" ] pub struct B1DCE_W < 'a > { w : & 'a mut W , } impl < 'a > B1DCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : B1DCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not cache data references." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( B1DCE_A :: _0 ) } # [ doc = "Cache data references." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( B1DCE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Bank 1 Memory Width\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum B1MW_A { # [ doc = "0: 32 bits" ] _00 , # [ doc = "1: 64 bits" ] _01 , # [ doc = "2: 128 bits" ] _10 } impl From < B1MW_A > for u8 { # [ inline ( always ) ] fn from ( variant : B1MW_A ) -> Self { match variant { B1MW_A :: _00 => 0 , B1MW_A :: _01 => 1 , B1MW_A :: _10 => 2 } } } # [ doc = "Reader of field `B1MW`" ] pub type B1MW_R = crate :: R < u8 , B1MW_A > ; impl B1MW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , B1MW_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( B1MW_A :: _00 ) , 1 => Val ( B1MW_A :: _01 ) , 2 => Val ( B1MW_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == B1MW_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == B1MW_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == B1MW_A :: _10 } } # [ doc = "Reader of field `B1RWSC`" ] pub type B1RWSC_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Reserved for future use" ] # [ inline ( always ) ] pub fn rfu ( & self ) -> RFU_R { RFU_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Bank 1 Instruction Prefetch Enable" ] # [ inline ( always ) ] pub fn b1ipe ( & self ) -> B1IPE_R { B1IPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Bank 1 Data Prefetch Enable" ] # [ inline ( always ) ] pub fn b1dpe ( & self ) -> B1DPE_R { B1DPE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Bank 1 Instruction Cache Enable" ] # [ inline ( always ) ] pub fn b1ice ( & self ) -> B1ICE_R { B1ICE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Bank 1 Data Cache Enable" ] # [ inline ( always ) ] pub fn b1dce ( & self ) -> B1DCE_R { B1DCE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 17:18 - Bank 1 Memory Width" ] # [ inline ( always ) ] pub fn b1mw ( & self ) -> B1MW_R { B1MW_R :: new ( ( ( self . bits >> 17 ) & 0x03 ) as u8 ) } # [ doc = "Bits 28:31 - Bank 1 Read Wait State Control" ] # [ inline ( always ) ] pub fn b1rwsc ( & self ) -> B1RWSC_R { B1RWSC_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Reserved for future use" ] # [ inline ( always ) ] pub fn rfu ( & mut self ) -> RFU_W { RFU_W { w : self } } # [ doc = "Bit 1 - Bank 1 Instruction Prefetch Enable" ] # [ inline ( always ) ] pub fn b1ipe ( & mut self ) -> B1IPE_W { B1IPE_W { w : self } } # [ doc = "Bit 2 - Bank 1 Data Prefetch Enable" ] # [ inline ( always ) ] pub fn b1dpe ( & mut self ) -> B1DPE_W { B1DPE_W { w : self } } # [ doc = "Bit 3 - Bank 1 Instruction Cache Enable" ] # [ inline ( always ) ] pub fn b1ice ( & mut self ) -> B1ICE_W { B1ICE_W { w : self } } # [ doc = "Bit 4 - Bank 1 Data Cache Enable" ] # [ inline ( always ) ] pub fn b1dce ( & mut self ) -> B1DCE_W { B1DCE_W { w : self } } } } # [ doc = "Cache Tag Storage\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tagvdw0s](tagvdw0s) module" ] pub type TAGVDW0S = crate :: Reg < u32 , _TAGVDW0S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TAGVDW0S ; # [ doc = "`read()` method returns [tagvdw0s::R](tagvdw0s::R) reader structure" ] impl crate :: Readable for TAGVDW0S { } # [ doc = "`write(|w| ..)` method takes [tagvdw0s::W](tagvdw0s::W) writer structure" ] impl crate :: Writable for TAGVDW0S { } # [ doc = "Cache Tag Storage" ] pub mod tagvdw0s { # [ doc = "Reader of register TAGVDW0S%s" ] pub type R = crate :: R < u32 , super :: TAGVDW0S > ; # [ doc = "Writer for register TAGVDW0S%s" ] pub type W = crate :: W < u32 , super :: TAGVDW0S > ; # [ doc = "Register TAGVDW0S%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TAGVDW0S { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `valid`" ] pub type VALID_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `valid`" ] pub struct VALID_W < 'a > { w : & 'a mut W , } impl < 'a > VALID_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `tag`" ] pub type TAG_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `tag`" ] pub struct TAG_W < 'a > { w : & 'a mut W , } impl < 'a > TAG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 6 ) ) | ( ( ( value as u32 ) & 0xffff ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - 1-bit valid for cache entry" ] # [ inline ( always ) ] pub fn valid ( & self ) -> VALID_R { VALID_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 6:21 - 16-bit tag for cache entry" ] # [ inline ( always ) ] pub fn tag ( & self ) -> TAG_R { TAG_R :: new ( ( ( self . bits >> 6 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bit 0 - 1-bit valid for cache entry" ] # [ inline ( always ) ] pub fn valid ( & mut self ) -> VALID_W { VALID_W { w : self } } # [ doc = "Bits 6:21 - 16-bit tag for cache entry" ] # [ inline ( always ) ] pub fn tag ( & mut self ) -> TAG_W { TAG_W { w : self } } } } # [ doc = "Cache Tag Storage\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tagvdw1s](tagvdw1s) module" ] pub type TAGVDW1S = crate :: Reg < u32 , _TAGVDW1S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TAGVDW1S ; # [ doc = "`read()` method returns [tagvdw1s::R](tagvdw1s::R) reader structure" ] impl crate :: Readable for TAGVDW1S { } # [ doc = "`write(|w| ..)` method takes [tagvdw1s::W](tagvdw1s::W) writer structure" ] impl crate :: Writable for TAGVDW1S { } # [ doc = "Cache Tag Storage" ] pub mod tagvdw1s { # [ doc = "Reader of register TAGVDW1S%s" ] pub type R = crate :: R < u32 , super :: TAGVDW1S > ; # [ doc = "Writer for register TAGVDW1S%s" ] pub type W = crate :: W < u32 , super :: TAGVDW1S > ; # [ doc = "Register TAGVDW1S%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TAGVDW1S { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `valid`" ] pub type VALID_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `valid`" ] pub struct VALID_W < 'a > { w : & 'a mut W , } impl < 'a > VALID_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `tag`" ] pub type TAG_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `tag`" ] pub struct TAG_W < 'a > { w : & 'a mut W , } impl < 'a > TAG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 6 ) ) | ( ( ( value as u32 ) & 0xffff ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - 1-bit valid for cache entry" ] # [ inline ( always ) ] pub fn valid ( & self ) -> VALID_R { VALID_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 6:21 - 16-bit tag for cache entry" ] # [ inline ( always ) ] pub fn tag ( & self ) -> TAG_R { TAG_R :: new ( ( ( self . bits >> 6 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bit 0 - 1-bit valid for cache entry" ] # [ inline ( always ) ] pub fn valid ( & mut self ) -> VALID_W { VALID_W { w : self } } # [ doc = "Bits 6:21 - 16-bit tag for cache entry" ] # [ inline ( always ) ] pub fn tag ( & mut self ) -> TAG_W { TAG_W { w : self } } } } # [ doc = "Cache Tag Storage\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tagvdw2s](tagvdw2s) module" ] pub type TAGVDW2S = crate :: Reg < u32 , _TAGVDW2S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TAGVDW2S ; # [ doc = "`read()` method returns [tagvdw2s::R](tagvdw2s::R) reader structure" ] impl crate :: Readable for TAGVDW2S { } # [ doc = "`write(|w| ..)` method takes [tagvdw2s::W](tagvdw2s::W) writer structure" ] impl crate :: Writable for TAGVDW2S { } # [ doc = "Cache Tag Storage" ] pub mod tagvdw2s { # [ doc = "Reader of register TAGVDW2S%s" ] pub type R = crate :: R < u32 , super :: TAGVDW2S > ; # [ doc = "Writer for register TAGVDW2S%s" ] pub type W = crate :: W < u32 , super :: TAGVDW2S > ; # [ doc = "Register TAGVDW2S%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TAGVDW2S { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `valid`" ] pub type VALID_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `valid`" ] pub struct VALID_W < 'a > { w : & 'a mut W , } impl < 'a > VALID_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `tag`" ] pub type TAG_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `tag`" ] pub struct TAG_W < 'a > { w : & 'a mut W , } impl < 'a > TAG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 6 ) ) | ( ( ( value as u32 ) & 0xffff ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - 1-bit valid for cache entry" ] # [ inline ( always ) ] pub fn valid ( & self ) -> VALID_R { VALID_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 6:21 - 16-bit tag for cache entry" ] # [ inline ( always ) ] pub fn tag ( & self ) -> TAG_R { TAG_R :: new ( ( ( self . bits >> 6 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bit 0 - 1-bit valid for cache entry" ] # [ inline ( always ) ] pub fn valid ( & mut self ) -> VALID_W { VALID_W { w : self } } # [ doc = "Bits 6:21 - 16-bit tag for cache entry" ] # [ inline ( always ) ] pub fn tag ( & mut self ) -> TAG_W { TAG_W { w : self } } } } # [ doc = "Cache Tag Storage\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tagvdw3s](tagvdw3s) module" ] pub type TAGVDW3S = crate :: Reg < u32 , _TAGVDW3S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TAGVDW3S ; # [ doc = "`read()` method returns [tagvdw3s::R](tagvdw3s::R) reader structure" ] impl crate :: Readable for TAGVDW3S { } # [ doc = "`write(|w| ..)` method takes [tagvdw3s::W](tagvdw3s::W) writer structure" ] impl crate :: Writable for TAGVDW3S { } # [ doc = "Cache Tag Storage" ] pub mod tagvdw3s { # [ doc = "Reader of register TAGVDW3S%s" ] pub type R = crate :: R < u32 , super :: TAGVDW3S > ; # [ doc = "Writer for register TAGVDW3S%s" ] pub type W = crate :: W < u32 , super :: TAGVDW3S > ; # [ doc = "Register TAGVDW3S%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TAGVDW3S { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `valid`" ] pub type VALID_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `valid`" ] pub struct VALID_W < 'a > { w : & 'a mut W , } impl < 'a > VALID_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `tag`" ] pub type TAG_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `tag`" ] pub struct TAG_W < 'a > { w : & 'a mut W , } impl < 'a > TAG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 6 ) ) | ( ( ( value as u32 ) & 0xffff ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - 1-bit valid for cache entry" ] # [ inline ( always ) ] pub fn valid ( & self ) -> VALID_R { VALID_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 6:21 - 16-bit tag for cache entry" ] # [ inline ( always ) ] pub fn tag ( & self ) -> TAG_R { TAG_R :: new ( ( ( self . bits >> 6 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bit 0 - 1-bit valid for cache entry" ] # [ inline ( always ) ] pub fn valid ( & mut self ) -> VALID_W { VALID_W { w : self } } # [ doc = "Bits 6:21 - 16-bit tag for cache entry" ] # [ inline ( always ) ] pub fn tag ( & mut self ) -> TAG_W { TAG_W { w : self } } } } # [ doc = "Cache Data Storage (uppermost word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw0sum](dataw0sum) module" ] pub type DATAW0SUM = crate :: Reg < u32 , _DATAW0SUM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW0SUM ; # [ doc = "`read()` method returns [dataw0sum::R](dataw0sum::R) reader structure" ] impl crate :: Readable for DATAW0SUM { } # [ doc = "`write(|w| ..)` method takes [dataw0sum::W](dataw0sum::W) writer structure" ] impl crate :: Writable for DATAW0SUM { } # [ doc = "Cache Data Storage (uppermost word)" ] pub mod dataw0sum { # [ doc = "Reader of register DATAW0S%sUM" ] pub type R = crate :: R < u32 , super :: DATAW0SUM > ; # [ doc = "Writer for register DATAW0S%sUM" ] pub type W = crate :: W < u32 , super :: DATAW0SUM > ; # [ doc = "Register DATAW0S%sUM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW0SUM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[127:96\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[127:96\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (mid-upper word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw0smu](dataw0smu) module" ] pub type DATAW0SMU = crate :: Reg < u32 , _DATAW0SMU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW0SMU ; # [ doc = "`read()` method returns [dataw0smu::R](dataw0smu::R) reader structure" ] impl crate :: Readable for DATAW0SMU { } # [ doc = "`write(|w| ..)` method takes [dataw0smu::W](dataw0smu::W) writer structure" ] impl crate :: Writable for DATAW0SMU { } # [ doc = "Cache Data Storage (mid-upper word)" ] pub mod dataw0smu { # [ doc = "Reader of register DATAW0S%sMU" ] pub type R = crate :: R < u32 , super :: DATAW0SMU > ; # [ doc = "Writer for register DATAW0S%sMU" ] pub type W = crate :: W < u32 , super :: DATAW0SMU > ; # [ doc = "Register DATAW0S%sMU `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW0SMU { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[95:64\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[95:64\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (mid-lower word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw0sml](dataw0sml) module" ] pub type DATAW0SML = crate :: Reg < u32 , _DATAW0SML > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW0SML ; # [ doc = "`read()` method returns [dataw0sml::R](dataw0sml::R) reader structure" ] impl crate :: Readable for DATAW0SML { } # [ doc = "`write(|w| ..)` method takes [dataw0sml::W](dataw0sml::W) writer structure" ] impl crate :: Writable for DATAW0SML { } # [ doc = "Cache Data Storage (mid-lower word)" ] pub mod dataw0sml { # [ doc = "Reader of register DATAW0S%sML" ] pub type R = crate :: R < u32 , super :: DATAW0SML > ; # [ doc = "Writer for register DATAW0S%sML" ] pub type W = crate :: W < u32 , super :: DATAW0SML > ; # [ doc = "Register DATAW0S%sML `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW0SML { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[63:32\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[63:32\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (lowermost word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw0slm](dataw0slm) module" ] pub type DATAW0SLM = crate :: Reg < u32 , _DATAW0SLM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW0SLM ; # [ doc = "`read()` method returns [dataw0slm::R](dataw0slm::R) reader structure" ] impl crate :: Readable for DATAW0SLM { } # [ doc = "`write(|w| ..)` method takes [dataw0slm::W](dataw0slm::W) writer structure" ] impl crate :: Writable for DATAW0SLM { } # [ doc = "Cache Data Storage (lowermost word)" ] pub mod dataw0slm { # [ doc = "Reader of register DATAW0S%sLM" ] pub type R = crate :: R < u32 , super :: DATAW0SLM > ; # [ doc = "Writer for register DATAW0S%sLM" ] pub type W = crate :: W < u32 , super :: DATAW0SLM > ; # [ doc = "Register DATAW0S%sLM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW0SLM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[31:0\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[31:0\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (uppermost word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw1sum](dataw1sum) module" ] pub type DATAW1SUM = crate :: Reg < u32 , _DATAW1SUM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW1SUM ; # [ doc = "`read()` method returns [dataw1sum::R](dataw1sum::R) reader structure" ] impl crate :: Readable for DATAW1SUM { } # [ doc = "`write(|w| ..)` method takes [dataw1sum::W](dataw1sum::W) writer structure" ] impl crate :: Writable for DATAW1SUM { } # [ doc = "Cache Data Storage (uppermost word)" ] pub mod dataw1sum { # [ doc = "Reader of register DATAW1S%sUM" ] pub type R = crate :: R < u32 , super :: DATAW1SUM > ; # [ doc = "Writer for register DATAW1S%sUM" ] pub type W = crate :: W < u32 , super :: DATAW1SUM > ; # [ doc = "Register DATAW1S%sUM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW1SUM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[127:96\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[127:96\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (mid-upper word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw1smu](dataw1smu) module" ] pub type DATAW1SMU = crate :: Reg < u32 , _DATAW1SMU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW1SMU ; # [ doc = "`read()` method returns [dataw1smu::R](dataw1smu::R) reader structure" ] impl crate :: Readable for DATAW1SMU { } # [ doc = "`write(|w| ..)` method takes [dataw1smu::W](dataw1smu::W) writer structure" ] impl crate :: Writable for DATAW1SMU { } # [ doc = "Cache Data Storage (mid-upper word)" ] pub mod dataw1smu { # [ doc = "Reader of register DATAW1S%sMU" ] pub type R = crate :: R < u32 , super :: DATAW1SMU > ; # [ doc = "Writer for register DATAW1S%sMU" ] pub type W = crate :: W < u32 , super :: DATAW1SMU > ; # [ doc = "Register DATAW1S%sMU `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW1SMU { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[95:64\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[95:64\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (mid-lower word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw1sml](dataw1sml) module" ] pub type DATAW1SML = crate :: Reg < u32 , _DATAW1SML > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW1SML ; # [ doc = "`read()` method returns [dataw1sml::R](dataw1sml::R) reader structure" ] impl crate :: Readable for DATAW1SML { } # [ doc = "`write(|w| ..)` method takes [dataw1sml::W](dataw1sml::W) writer structure" ] impl crate :: Writable for DATAW1SML { } # [ doc = "Cache Data Storage (mid-lower word)" ] pub mod dataw1sml { # [ doc = "Reader of register DATAW1S%sML" ] pub type R = crate :: R < u32 , super :: DATAW1SML > ; # [ doc = "Writer for register DATAW1S%sML" ] pub type W = crate :: W < u32 , super :: DATAW1SML > ; # [ doc = "Register DATAW1S%sML `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW1SML { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[63:32\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[63:32\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (lowermost word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw1slm](dataw1slm) module" ] pub type DATAW1SLM = crate :: Reg < u32 , _DATAW1SLM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW1SLM ; # [ doc = "`read()` method returns [dataw1slm::R](dataw1slm::R) reader structure" ] impl crate :: Readable for DATAW1SLM { } # [ doc = "`write(|w| ..)` method takes [dataw1slm::W](dataw1slm::W) writer structure" ] impl crate :: Writable for DATAW1SLM { } # [ doc = "Cache Data Storage (lowermost word)" ] pub mod dataw1slm { # [ doc = "Reader of register DATAW1S%sLM" ] pub type R = crate :: R < u32 , super :: DATAW1SLM > ; # [ doc = "Writer for register DATAW1S%sLM" ] pub type W = crate :: W < u32 , super :: DATAW1SLM > ; # [ doc = "Register DATAW1S%sLM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW1SLM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[31:0\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[31:0\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (uppermost word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw2sum](dataw2sum) module" ] pub type DATAW2SUM = crate :: Reg < u32 , _DATAW2SUM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW2SUM ; # [ doc = "`read()` method returns [dataw2sum::R](dataw2sum::R) reader structure" ] impl crate :: Readable for DATAW2SUM { } # [ doc = "`write(|w| ..)` method takes [dataw2sum::W](dataw2sum::W) writer structure" ] impl crate :: Writable for DATAW2SUM { } # [ doc = "Cache Data Storage (uppermost word)" ] pub mod dataw2sum { # [ doc = "Reader of register DATAW2S%sUM" ] pub type R = crate :: R < u32 , super :: DATAW2SUM > ; # [ doc = "Writer for register DATAW2S%sUM" ] pub type W = crate :: W < u32 , super :: DATAW2SUM > ; # [ doc = "Register DATAW2S%sUM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW2SUM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[127:96\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[127:96\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (mid-upper word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw2smu](dataw2smu) module" ] pub type DATAW2SMU = crate :: Reg < u32 , _DATAW2SMU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW2SMU ; # [ doc = "`read()` method returns [dataw2smu::R](dataw2smu::R) reader structure" ] impl crate :: Readable for DATAW2SMU { } # [ doc = "`write(|w| ..)` method takes [dataw2smu::W](dataw2smu::W) writer structure" ] impl crate :: Writable for DATAW2SMU { } # [ doc = "Cache Data Storage (mid-upper word)" ] pub mod dataw2smu { # [ doc = "Reader of register DATAW2S%sMU" ] pub type R = crate :: R < u32 , super :: DATAW2SMU > ; # [ doc = "Writer for register DATAW2S%sMU" ] pub type W = crate :: W < u32 , super :: DATAW2SMU > ; # [ doc = "Register DATAW2S%sMU `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW2SMU { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[95:64\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[95:64\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (mid-lower word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw2sml](dataw2sml) module" ] pub type DATAW2SML = crate :: Reg < u32 , _DATAW2SML > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW2SML ; # [ doc = "`read()` method returns [dataw2sml::R](dataw2sml::R) reader structure" ] impl crate :: Readable for DATAW2SML { } # [ doc = "`write(|w| ..)` method takes [dataw2sml::W](dataw2sml::W) writer structure" ] impl crate :: Writable for DATAW2SML { } # [ doc = "Cache Data Storage (mid-lower word)" ] pub mod dataw2sml { # [ doc = "Reader of register DATAW2S%sML" ] pub type R = crate :: R < u32 , super :: DATAW2SML > ; # [ doc = "Writer for register DATAW2S%sML" ] pub type W = crate :: W < u32 , super :: DATAW2SML > ; # [ doc = "Register DATAW2S%sML `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW2SML { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[63:32\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[63:32\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (lowermost word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw2slm](dataw2slm) module" ] pub type DATAW2SLM = crate :: Reg < u32 , _DATAW2SLM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW2SLM ; # [ doc = "`read()` method returns [dataw2slm::R](dataw2slm::R) reader structure" ] impl crate :: Readable for DATAW2SLM { } # [ doc = "`write(|w| ..)` method takes [dataw2slm::W](dataw2slm::W) writer structure" ] impl crate :: Writable for DATAW2SLM { } # [ doc = "Cache Data Storage (lowermost word)" ] pub mod dataw2slm { # [ doc = "Reader of register DATAW2S%sLM" ] pub type R = crate :: R < u32 , super :: DATAW2SLM > ; # [ doc = "Writer for register DATAW2S%sLM" ] pub type W = crate :: W < u32 , super :: DATAW2SLM > ; # [ doc = "Register DATAW2S%sLM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW2SLM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[31:0\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[31:0\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (uppermost word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw3sum](dataw3sum) module" ] pub type DATAW3SUM = crate :: Reg < u32 , _DATAW3SUM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW3SUM ; # [ doc = "`read()` method returns [dataw3sum::R](dataw3sum::R) reader structure" ] impl crate :: Readable for DATAW3SUM { } # [ doc = "`write(|w| ..)` method takes [dataw3sum::W](dataw3sum::W) writer structure" ] impl crate :: Writable for DATAW3SUM { } # [ doc = "Cache Data Storage (uppermost word)" ] pub mod dataw3sum { # [ doc = "Reader of register DATAW3S%sUM" ] pub type R = crate :: R < u32 , super :: DATAW3SUM > ; # [ doc = "Writer for register DATAW3S%sUM" ] pub type W = crate :: W < u32 , super :: DATAW3SUM > ; # [ doc = "Register DATAW3S%sUM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW3SUM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[127:96\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[127:96\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (mid-upper word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw3smu](dataw3smu) module" ] pub type DATAW3SMU = crate :: Reg < u32 , _DATAW3SMU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW3SMU ; # [ doc = "`read()` method returns [dataw3smu::R](dataw3smu::R) reader structure" ] impl crate :: Readable for DATAW3SMU { } # [ doc = "`write(|w| ..)` method takes [dataw3smu::W](dataw3smu::W) writer structure" ] impl crate :: Writable for DATAW3SMU { } # [ doc = "Cache Data Storage (mid-upper word)" ] pub mod dataw3smu { # [ doc = "Reader of register DATAW3S%sMU" ] pub type R = crate :: R < u32 , super :: DATAW3SMU > ; # [ doc = "Writer for register DATAW3S%sMU" ] pub type W = crate :: W < u32 , super :: DATAW3SMU > ; # [ doc = "Register DATAW3S%sMU `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW3SMU { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[95:64\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[95:64\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (mid-lower word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw3sml](dataw3sml) module" ] pub type DATAW3SML = crate :: Reg < u32 , _DATAW3SML > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW3SML ; # [ doc = "`read()` method returns [dataw3sml::R](dataw3sml::R) reader structure" ] impl crate :: Readable for DATAW3SML { } # [ doc = "`write(|w| ..)` method takes [dataw3sml::W](dataw3sml::W) writer structure" ] impl crate :: Writable for DATAW3SML { } # [ doc = "Cache Data Storage (mid-lower word)" ] pub mod dataw3sml { # [ doc = "Reader of register DATAW3S%sML" ] pub type R = crate :: R < u32 , super :: DATAW3SML > ; # [ doc = "Writer for register DATAW3S%sML" ] pub type W = crate :: W < u32 , super :: DATAW3SML > ; # [ doc = "Register DATAW3S%sML `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW3SML { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[63:32\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[63:32\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache Data Storage (lowermost word)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dataw3slm](dataw3slm) module" ] pub type DATAW3SLM = crate :: Reg < u32 , _DATAW3SLM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAW3SLM ; # [ doc = "`read()` method returns [dataw3slm::R](dataw3slm::R) reader structure" ] impl crate :: Readable for DATAW3SLM { } # [ doc = "`write(|w| ..)` method takes [dataw3slm::W](dataw3slm::W) writer structure" ] impl crate :: Writable for DATAW3SLM { } # [ doc = "Cache Data Storage (lowermost word)" ] pub mod dataw3slm { # [ doc = "Reader of register DATAW3S%sLM" ] pub type R = crate :: R < u32 , super :: DATAW3SLM > ; # [ doc = "Writer for register DATAW3S%sLM" ] pub type W = crate :: W < u32 , super :: DATAW3SLM > ; # [ doc = "Register DATAW3S%sLM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATAW3SLM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `data`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `data`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Bits \\[31:0\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Bits \\[31:0\\] of data entry" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } } # [ doc = "Flash Memory Interface" ] pub struct FTFE { _marker : PhantomData < * const ( ) > } unsafe impl Send for FTFE { } impl FTFE { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const ftfe :: RegisterBlock { 0x4002_0000 as * const _ } } impl Deref for FTFE { type Target = ftfe :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * FTFE :: ptr ( ) } } } # [ doc = "Flash Memory Interface" ] pub mod ftfe { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Flash Status Register" ] pub fstat : FSTAT , # [ doc = "0x01 - Flash Configuration Register" ] pub fcnfg : FCNFG , # [ doc = "0x02 - Flash Security Register" ] pub fsec : FSEC , # [ doc = "0x03 - Flash Option Register" ] pub fopt : FOPT , # [ doc = "0x04 - Flash Common Command Object Registers" ] pub fccob3 : FCCOB , # [ doc = "0x05 - Flash Common Command Object Registers" ] pub fccob2 : FCCOB , # [ doc = "0x06 - Flash Common Command Object Registers" ] pub fccob1 : FCCOB , # [ doc = "0x07 - Flash Common Command Object Registers" ] pub fccob0 : FCCOB , # [ doc = "0x08 - Flash Common Command Object Registers" ] pub fccob7 : FCCOB , # [ doc = "0x09 - Flash Common Command Object Registers" ] pub fccob6 : FCCOB , # [ doc = "0x0a - Flash Common Command Object Registers" ] pub fccob5 : FCCOB , # [ doc = "0x0b - Flash Common Command Object Registers" ] pub fccob4 : FCCOB , # [ doc = "0x0c - Flash Common Command Object Registers" ] pub fccobb : FCCOB , # [ doc = "0x0d - Flash Common Command Object Registers" ] pub fccoba : FCCOB , # [ doc = "0x0e - Flash Common Command Object Registers" ] pub fccob9 : FCCOB , # [ doc = "0x0f - Flash Common Command Object Registers" ] pub fccob8 : FCCOB , # [ doc = "0x10 - Program Flash Protection Registers" ] pub fprot3 : FPROT , # [ doc = "0x11 - Program Flash Protection Registers" ] pub fprot2 : FPROT , # [ doc = "0x12 - Program Flash Protection Registers" ] pub fprot1 : FPROT , # [ doc = "0x13 - Program Flash Protection Registers" ] pub fprot0 : FPROT , _reserved20 : [ u8 ; 2usize ] , # [ doc = "0x16 - EEPROM Protection Register" ] pub feprot : FEPROT , # [ doc = "0x17 - Data Flash Protection Register" ] pub fdprot : FDPROT , # [ doc = "0x18 - Execute-only Access Registers" ] pub xacch3 : XACC , # [ doc = "0x19 - Execute-only Access Registers" ] pub xacch2 : XACC , # [ doc = "0x1a - Execute-only Access Registers" ] pub xacch1 : XACC , # [ doc = "0x1b - Execute-only Access Registers" ] pub xacch0 : XACC , # [ doc = "0x1c - Execute-only Access Registers" ] pub xaccl3 : XACC , # [ doc = "0x1d - Execute-only Access Registers" ] pub xaccl2 : XACC , # [ doc = "0x1e - Execute-only Access Registers" ] pub xaccl1 : XACC , # [ doc = "0x1f - Execute-only Access Registers" ] pub xaccl0 : XACC , # [ doc = "0x20 - Supervisor-only Access Registers" ] pub sacch3 : SACC , # [ doc = "0x21 - Supervisor-only Access Registers" ] pub sacch2 : SACC , # [ doc = "0x22 - Supervisor-only Access Registers" ] pub sacch1 : SACC , # [ doc = "0x23 - Supervisor-only Access Registers" ] pub sacch0 : SACC , # [ doc = "0x24 - Supervisor-only Access Registers" ] pub saccl3 : SACC , # [ doc = "0x25 - Supervisor-only Access Registers" ] pub saccl2 : SACC , # [ doc = "0x26 - Supervisor-only Access Registers" ] pub saccl1 : SACC , # [ doc = "0x27 - Supervisor-only Access Registers" ] pub saccl0 : SACC , # [ doc = "0x28 - Flash Access Segment Size Register" ] pub facss : FACSS , _reserved39 : [ u8 ; 2usize ] , # [ doc = "0x2b - Flash Access Segment Number Register" ] pub facsn : FACSN , } # [ doc = "Flash Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fstat](fstat) module" ] pub type FSTAT = crate :: Reg < u8 , _FSTAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FSTAT ; # [ doc = "`read()` method returns [fstat::R](fstat::R) reader structure" ] impl crate :: Readable for FSTAT { } # [ doc = "`write(|w| ..)` method takes [fstat::W](fstat::W) writer structure" ] impl crate :: Writable for FSTAT { } # [ doc = "Flash Status Register" ] pub mod fstat { # [ doc = "Reader of register FSTAT" ] pub type R = crate :: R < u8 , super :: FSTAT > ; # [ doc = "Writer for register FSTAT" ] pub type W = crate :: W < u8 , super :: FSTAT > ; # [ doc = "Register FSTAT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FSTAT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MGSTAT0`" ] pub type MGSTAT0_R = crate :: R < bool , bool > ; # [ doc = "Flash Protection Violation Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FPVIOL_A { # [ doc = "0: No protection violation detected" ] _0 , # [ doc = "1: Protection violation detected" ] _1 } impl From < FPVIOL_A > for bool { # [ inline ( always ) ] fn from ( variant : FPVIOL_A ) -> Self { match variant { FPVIOL_A :: _0 => false , FPVIOL_A :: _1 => true } } } # [ doc = "Reader of field `FPVIOL`" ] pub type FPVIOL_R = crate :: R < bool , FPVIOL_A > ; impl FPVIOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FPVIOL_A { match self . bits { false => FPVIOL_A :: _0 , true => FPVIOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FPVIOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FPVIOL_A :: _1 } } # [ doc = "Write proxy for field `FPVIOL`" ] pub struct FPVIOL_W < 'a > { w : & 'a mut W , } impl < 'a > FPVIOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FPVIOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No protection violation detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FPVIOL_A :: _0 ) } # [ doc = "Protection violation detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FPVIOL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Flash Access Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACCERR_A { # [ doc = "0: No access error detected" ] _0 , # [ doc = "1: Access error detected" ] _1 } impl From < ACCERR_A > for bool { # [ inline ( always ) ] fn from ( variant : ACCERR_A ) -> Self { match variant { ACCERR_A :: _0 => false , ACCERR_A :: _1 => true } } } # [ doc = "Reader of field `ACCERR`" ] pub type ACCERR_R = crate :: R < bool , ACCERR_A > ; impl ACCERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACCERR_A { match self . bits { false => ACCERR_A :: _0 , true => ACCERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACCERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACCERR_A :: _1 } } # [ doc = "Write proxy for field `ACCERR`" ] pub struct ACCERR_W < 'a > { w : & 'a mut W , } impl < 'a > ACCERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ACCERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No access error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ACCERR_A :: _0 ) } # [ doc = "Access error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ACCERR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "FTFE Read Collision Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDCOLERR_A { # [ doc = "0: No collision error detected" ] _0 , # [ doc = "1: Collision error detected" ] _1 } impl From < RDCOLERR_A > for bool { # [ inline ( always ) ] fn from ( variant : RDCOLERR_A ) -> Self { match variant { RDCOLERR_A :: _0 => false , RDCOLERR_A :: _1 => true } } } # [ doc = "Reader of field `RDCOLERR`" ] pub type RDCOLERR_R = crate :: R < bool , RDCOLERR_A > ; impl RDCOLERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDCOLERR_A { match self . bits { false => RDCOLERR_A :: _0 , true => RDCOLERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDCOLERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDCOLERR_A :: _1 } } # [ doc = "Write proxy for field `RDCOLERR`" ] pub struct RDCOLERR_W < 'a > { w : & 'a mut W , } impl < 'a > RDCOLERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDCOLERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No collision error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RDCOLERR_A :: _0 ) } # [ doc = "Collision error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RDCOLERR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Command Complete Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCIF_A { # [ doc = "0: FTFE command or EEPROM file system operation in progress" ] _0 , # [ doc = "1: FTFE command or EEPROM file system operation has completed" ] _1 } impl From < CCIF_A > for bool { # [ inline ( always ) ] fn from ( variant : CCIF_A ) -> Self { match variant { CCIF_A :: _0 => false , CCIF_A :: _1 => true } } } # [ doc = "Reader of field `CCIF`" ] pub type CCIF_R = crate :: R < bool , CCIF_A > ; impl CCIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCIF_A { match self . bits { false => CCIF_A :: _0 , true => CCIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCIF_A :: _1 } } # [ doc = "Write proxy for field `CCIF`" ] pub struct CCIF_W < 'a > { w : & 'a mut W , } impl < 'a > CCIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CCIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTFE command or EEPROM file system operation in progress" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CCIF_A :: _0 ) } # [ doc = "FTFE command or EEPROM file system operation has completed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CCIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Memory Controller Command Completion Status Flag" ] # [ inline ( always ) ] pub fn mgstat0 ( & self ) -> MGSTAT0_R { MGSTAT0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Flash Protection Violation Flag" ] # [ inline ( always ) ] pub fn fpviol ( & self ) -> FPVIOL_R { FPVIOL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Flash Access Error Flag" ] # [ inline ( always ) ] pub fn accerr ( & self ) -> ACCERR_R { ACCERR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - FTFE Read Collision Error Flag" ] # [ inline ( always ) ] pub fn rdcolerr ( & self ) -> RDCOLERR_R { RDCOLERR_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Command Complete Interrupt Flag" ] # [ inline ( always ) ] pub fn ccif ( & self ) -> CCIF_R { CCIF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Flash Protection Violation Flag" ] # [ inline ( always ) ] pub fn fpviol ( & mut self ) -> FPVIOL_W { FPVIOL_W { w : self } } # [ doc = "Bit 5 - Flash Access Error Flag" ] # [ inline ( always ) ] pub fn accerr ( & mut self ) -> ACCERR_W { ACCERR_W { w : self } } # [ doc = "Bit 6 - FTFE Read Collision Error Flag" ] # [ inline ( always ) ] pub fn rdcolerr ( & mut self ) -> RDCOLERR_W { RDCOLERR_W { w : self } } # [ doc = "Bit 7 - Command Complete Interrupt Flag" ] # [ inline ( always ) ] pub fn ccif ( & mut self ) -> CCIF_W { CCIF_W { w : self } } } } # [ doc = "Flash Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fcnfg](fcnfg) module" ] pub type FCNFG = crate :: Reg < u8 , _FCNFG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FCNFG ; # [ doc = "`read()` method returns [fcnfg::R](fcnfg::R) reader structure" ] impl crate :: Readable for FCNFG { } # [ doc = "`write(|w| ..)` method takes [fcnfg::W](fcnfg::W) writer structure" ] impl crate :: Writable for FCNFG { } # [ doc = "Flash Configuration Register" ] pub mod fcnfg { # [ doc = "Reader of register FCNFG" ] pub type R = crate :: R < u8 , super :: FCNFG > ; # [ doc = "Writer for register FCNFG" ] pub type W = crate :: W < u8 , super :: FCNFG > ; # [ doc = "Register FCNFG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FCNFG { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "For devices with FlexNVM: This flag indicates if the EEPROM backup data has been copied to the FlexRAM and is therefore available for read access\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EEERDY_A { # [ doc = "0: For devices with FlexNVM: FlexRAM is not available for EEPROM operation For devices without FlexNVM: See RAMRDY for availability of programming acceleration RAM" ] _0 , # [ doc = "1: For devices with FlexNVM: FlexRAM is available for EEPROM operations where: reads from the FlexRAM return data previously written to the FlexRAM in EEPROM mode and writes launch an EEPROM operation to store the written data in the FlexRAM and EEPROM backup For devices without FlexNVM: Reserved" ] _1 } impl From < EEERDY_A > for bool { # [ inline ( always ) ] fn from ( variant : EEERDY_A ) -> Self { match variant { EEERDY_A :: _0 => false , EEERDY_A :: _1 => true } } } # [ doc = "Reader of field `EEERDY`" ] pub type EEERDY_R = crate :: R < bool , EEERDY_A > ; impl EEERDY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EEERDY_A { match self . bits { false => EEERDY_A :: _0 , true => EEERDY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EEERDY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EEERDY_A :: _1 } } # [ doc = "RAM Ready\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAMRDY_A { # [ doc = "0: For devices with FlexNVM: FlexRAM is not available for traditional RAM access For devices without FlexNVM: Programming acceleration RAM is not available" ] _0 , # [ doc = "1: For devices with FlexNVM: FlexRAM is available as traditional RAM only; writes to the FlexRAM do not trigger EEPROM operations For devices without FlexNVM: Programming acceleration RAM is available" ] _1 } impl From < RAMRDY_A > for bool { # [ inline ( always ) ] fn from ( variant : RAMRDY_A ) -> Self { match variant { RAMRDY_A :: _0 => false , RAMRDY_A :: _1 => true } } } # [ doc = "Reader of field `RAMRDY`" ] pub type RAMRDY_R = crate :: R < bool , RAMRDY_A > ; impl RAMRDY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAMRDY_A { match self . bits { false => RAMRDY_A :: _0 , true => RAMRDY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAMRDY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAMRDY_A :: _1 } } # [ doc = "FTFE configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFLSH_A { # [ doc = "0: For devices with FlexNVM: FTFE configuration supports two or three program flash blocks and two FlexNVM blocks For devices with program flash only: Reserved" ] _0 , # [ doc = "1: For devices with FlexNVM: Reserved For devices with program flash only: FTFE configuration supports four program flash blocks" ] _1 } impl From < PFLSH_A > for bool { # [ inline ( always ) ] fn from ( variant : PFLSH_A ) -> Self { match variant { PFLSH_A :: _0 => false , PFLSH_A :: _1 => true } } } # [ doc = "Reader of field `PFLSH`" ] pub type PFLSH_R = crate :: R < bool , PFLSH_A > ; impl PFLSH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFLSH_A { match self . bits { false => PFLSH_A :: _0 , true => PFLSH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFLSH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFLSH_A :: _1 } } # [ doc = "Swap\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWAP_A { # [ doc = "0: For devices with FlexNVM: Program flash 0 block is located at relative address 0x0000 For devices with program flash only: Program flash 0/1 blocks are located at relative address 0x0000" ] _0 , # [ doc = "1: For devices with FlexNVM: Reserved For devices with program flash only: Program flash 2/3 blocks are located at relative address 0x0000" ] _1 } impl From < SWAP_A > for bool { # [ inline ( always ) ] fn from ( variant : SWAP_A ) -> Self { match variant { SWAP_A :: _0 => false , SWAP_A :: _1 => true } } } # [ doc = "Reader of field `SWAP`" ] pub type SWAP_R = crate :: R < bool , SWAP_A > ; impl SWAP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWAP_A { match self . bits { false => SWAP_A :: _0 , true => SWAP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWAP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWAP_A :: _1 } } # [ doc = "Erase Suspend\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERSSUSP_A { # [ doc = "0: No suspend requested" ] _0 , # [ doc = "1: Suspend the current Erase Flash Sector command execution" ] _1 } impl From < ERSSUSP_A > for bool { # [ inline ( always ) ] fn from ( variant : ERSSUSP_A ) -> Self { match variant { ERSSUSP_A :: _0 => false , ERSSUSP_A :: _1 => true } } } # [ doc = "Reader of field `ERSSUSP`" ] pub type ERSSUSP_R = crate :: R < bool , ERSSUSP_A > ; impl ERSSUSP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERSSUSP_A { match self . bits { false => ERSSUSP_A :: _0 , true => ERSSUSP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERSSUSP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERSSUSP_A :: _1 } } # [ doc = "Write proxy for field `ERSSUSP`" ] pub struct ERSSUSP_W < 'a > { w : & 'a mut W , } impl < 'a > ERSSUSP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERSSUSP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No suspend requested" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERSSUSP_A :: _0 ) } # [ doc = "Suspend the current Erase Flash Sector command execution" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERSSUSP_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Erase All Request\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERSAREQ_A { # [ doc = "0: No request or request complete" ] _0 , # [ doc = "1: Request to: run the Erase All Blocks command, verify the erased state, program the security byte in the Flash Configuration Field to the unsecure state, and release MCU security by setting the FSEC\\[SEC\\] field to the unsecure state" ] _1 } impl From < ERSAREQ_A > for bool { # [ inline ( always ) ] fn from ( variant : ERSAREQ_A ) -> Self { match variant { ERSAREQ_A :: _0 => false , ERSAREQ_A :: _1 => true } } } # [ doc = "Reader of field `ERSAREQ`" ] pub type ERSAREQ_R = crate :: R < bool , ERSAREQ_A > ; impl ERSAREQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERSAREQ_A { match self . bits { false => ERSAREQ_A :: _0 , true => ERSAREQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERSAREQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERSAREQ_A :: _1 } } # [ doc = "Read Collision Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDCOLLIE_A { # [ doc = "0: Read collision error interrupt disabled" ] _0 , # [ doc = "1: Read collision error interrupt enabled. An interrupt request is generated whenever an FTFE read collision error is detected (see the description of FSTAT\\[RDCOLERR\\])." ] _1 } impl From < RDCOLLIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RDCOLLIE_A ) -> Self { match variant { RDCOLLIE_A :: _0 => false , RDCOLLIE_A :: _1 => true } } } # [ doc = "Reader of field `RDCOLLIE`" ] pub type RDCOLLIE_R = crate :: R < bool , RDCOLLIE_A > ; impl RDCOLLIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDCOLLIE_A { match self . bits { false => RDCOLLIE_A :: _0 , true => RDCOLLIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDCOLLIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDCOLLIE_A :: _1 } } # [ doc = "Write proxy for field `RDCOLLIE`" ] pub struct RDCOLLIE_W < 'a > { w : & 'a mut W , } impl < 'a > RDCOLLIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDCOLLIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Read collision error interrupt disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RDCOLLIE_A :: _0 ) } # [ doc = "Read collision error interrupt enabled. An interrupt request is generated whenever an FTFE read collision error is detected (see the description of FSTAT\\[RDCOLERR\\])." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RDCOLLIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Command Complete Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCIE_A { # [ doc = "0: Command complete interrupt disabled" ] _0 , # [ doc = "1: Command complete interrupt enabled. An interrupt request is generated whenever the FSTAT\\[CCIF\\] flag is set." ] _1 } impl From < CCIE_A > for bool { # [ inline ( always ) ] fn from ( variant : CCIE_A ) -> Self { match variant { CCIE_A :: _0 => false , CCIE_A :: _1 => true } } } # [ doc = "Reader of field `CCIE`" ] pub type CCIE_R = crate :: R < bool , CCIE_A > ; impl CCIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCIE_A { match self . bits { false => CCIE_A :: _0 , true => CCIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCIE_A :: _1 } } # [ doc = "Write proxy for field `CCIE`" ] pub struct CCIE_W < 'a > { w : & 'a mut W , } impl < 'a > CCIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CCIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Command complete interrupt disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CCIE_A :: _0 ) } # [ doc = "Command complete interrupt enabled. An interrupt request is generated whenever the FSTAT\\[CCIF\\] flag is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CCIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - For devices with FlexNVM: This flag indicates if the EEPROM backup data has been copied to the FlexRAM and is therefore available for read access" ] # [ inline ( always ) ] pub fn eeerdy ( & self ) -> EEERDY_R { EEERDY_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - RAM Ready" ] # [ inline ( always ) ] pub fn ramrdy ( & self ) -> RAMRDY_R { RAMRDY_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTFE configuration" ] # [ inline ( always ) ] pub fn pflsh ( & self ) -> PFLSH_R { PFLSH_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Swap" ] # [ inline ( always ) ] pub fn swap ( & self ) -> SWAP_R { SWAP_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Erase Suspend" ] # [ inline ( always ) ] pub fn erssusp ( & self ) -> ERSSUSP_R { ERSSUSP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Erase All Request" ] # [ inline ( always ) ] pub fn ersareq ( & self ) -> ERSAREQ_R { ERSAREQ_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Read Collision Error Interrupt Enable" ] # [ inline ( always ) ] pub fn rdcollie ( & self ) -> RDCOLLIE_R { RDCOLLIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Command Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn ccie ( & self ) -> CCIE_R { CCIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Erase Suspend" ] # [ inline ( always ) ] pub fn erssusp ( & mut self ) -> ERSSUSP_W { ERSSUSP_W { w : self } } # [ doc = "Bit 6 - Read Collision Error Interrupt Enable" ] # [ inline ( always ) ] pub fn rdcollie ( & mut self ) -> RDCOLLIE_W { RDCOLLIE_W { w : self } } # [ doc = "Bit 7 - Command Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn ccie ( & mut self ) -> CCIE_W { CCIE_W { w : self } } } } # [ doc = "Flash Security Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fsec](fsec) module" ] pub type FSEC = crate :: Reg < u8 , _FSEC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FSEC ; # [ doc = "`read()` method returns [fsec::R](fsec::R) reader structure" ] impl crate :: Readable for FSEC { } # [ doc = "Flash Security Register" ] pub mod fsec { # [ doc = "Reader of register FSEC" ] pub type R = crate :: R < u8 , super :: FSEC > ; # [ doc = "Flash Security\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEC_A { # [ doc = "0: MCU security status is secure" ] _00 , # [ doc = "1: MCU security status is secure" ] _01 , # [ doc = "2: MCU security status is unsecure (The standard shipping condition of the FTFE is unsecure.)" ] _10 , # [ doc = "3: MCU security status is secure" ] _11 } impl From < SEC_A > for u8 { # [ inline ( always ) ] fn from ( variant : SEC_A ) -> Self { match variant { SEC_A :: _00 => 0 , SEC_A :: _01 => 1 , SEC_A :: _10 => 2 , SEC_A :: _11 => 3 } } } # [ doc = "Reader of field `SEC`" ] pub type SEC_R = crate :: R < u8 , SEC_A > ; impl SEC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEC_A { match self . bits { 0 => SEC_A :: _00 , 1 => SEC_A :: _01 , 2 => SEC_A :: _10 , 3 => SEC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SEC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SEC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SEC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SEC_A :: _11 } } # [ doc = "Freescale Failure Analysis Access Code\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSLACC_A { # [ doc = "0: Freescale factory access granted" ] _00 , # [ doc = "1: Freescale factory access denied" ] _01 , # [ doc = "2: Freescale factory access denied" ] _10 , # [ doc = "3: Freescale factory access granted" ] _11 } impl From < FSLACC_A > for u8 { # [ inline ( always ) ] fn from ( variant : FSLACC_A ) -> Self { match variant { FSLACC_A :: _00 => 0 , FSLACC_A :: _01 => 1 , FSLACC_A :: _10 => 2 , FSLACC_A :: _11 => 3 } } } # [ doc = "Reader of field `FSLACC`" ] pub type FSLACC_R = crate :: R < u8 , FSLACC_A > ; impl FSLACC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FSLACC_A { match self . bits { 0 => FSLACC_A :: _00 , 1 => FSLACC_A :: _01 , 2 => FSLACC_A :: _10 , 3 => FSLACC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FSLACC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FSLACC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FSLACC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FSLACC_A :: _11 } } # [ doc = "Mass Erase Enable Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MEEN_A { # [ doc = "0: Mass erase is enabled" ] _00 , # [ doc = "1: Mass erase is enabled" ] _01 , # [ doc = "2: Mass erase is disabled" ] _10 , # [ doc = "3: Mass erase is enabled" ] _11 } impl From < MEEN_A > for u8 { # [ inline ( always ) ] fn from ( variant : MEEN_A ) -> Self { match variant { MEEN_A :: _00 => 0 , MEEN_A :: _01 => 1 , MEEN_A :: _10 => 2 , MEEN_A :: _11 => 3 } } } # [ doc = "Reader of field `MEEN`" ] pub type MEEN_R = crate :: R < u8 , MEEN_A > ; impl MEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MEEN_A { match self . bits { 0 => MEEN_A :: _00 , 1 => MEEN_A :: _01 , 2 => MEEN_A :: _10 , 3 => MEEN_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MEEN_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MEEN_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MEEN_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MEEN_A :: _11 } } # [ doc = "Backdoor Key Security Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum KEYEN_A { # [ doc = "0: Backdoor key access disabled" ] _00 , # [ doc = "1: Backdoor key access disabled (preferred KEYEN state to disable backdoor key access)" ] _01 , # [ doc = "2: Backdoor key access enabled" ] _10 , # [ doc = "3: Backdoor key access disabled" ] _11 } impl From < KEYEN_A > for u8 { # [ inline ( always ) ] fn from ( variant : KEYEN_A ) -> Self { match variant { KEYEN_A :: _00 => 0 , KEYEN_A :: _01 => 1 , KEYEN_A :: _10 => 2 , KEYEN_A :: _11 => 3 } } } # [ doc = "Reader of field `KEYEN`" ] pub type KEYEN_R = crate :: R < u8 , KEYEN_A > ; impl KEYEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> KEYEN_A { match self . bits { 0 => KEYEN_A :: _00 , 1 => KEYEN_A :: _01 , 2 => KEYEN_A :: _10 , 3 => KEYEN_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == KEYEN_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == KEYEN_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == KEYEN_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == KEYEN_A :: _11 } } impl R { # [ doc = "Bits 0:1 - Flash Security" ] # [ inline ( always ) ] pub fn sec ( & self ) -> SEC_R { SEC_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Freescale Failure Analysis Access Code" ] # [ inline ( always ) ] pub fn fslacc ( & self ) -> FSLACC_R { FSLACC_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Mass Erase Enable Bits" ] # [ inline ( always ) ] pub fn meen ( & self ) -> MEEN_R { MEEN_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Backdoor Key Security Enable" ] # [ inline ( always ) ] pub fn keyen ( & self ) -> KEYEN_R { KEYEN_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } } # [ doc = "Flash Option Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fopt](fopt) module" ] pub type FOPT = crate :: Reg < u8 , _FOPT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FOPT ; # [ doc = "`read()` method returns [fopt::R](fopt::R) reader structure" ] impl crate :: Readable for FOPT { } # [ doc = "Flash Option Register" ] pub mod fopt { # [ doc = "Reader of register FOPT" ] pub type R = crate :: R < u8 , super :: FOPT > ; # [ doc = "Reader of field `OPT`" ] pub type OPT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Nonvolatile Option" ] # [ inline ( always ) ] pub fn opt ( & self ) -> OPT_R { OPT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Flash Common Command Object Registers\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fccob](fccob) module" ] pub type FCCOB = crate :: Reg < u8 , _FCCOB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FCCOB ; # [ doc = "`read()` method returns [fccob::R](fccob::R) reader structure" ] impl crate :: Readable for FCCOB { } # [ doc = "`write(|w| ..)` method takes [fccob::W](fccob::W) writer structure" ] impl crate :: Writable for FCCOB { } # [ doc = "Flash Common Command Object Registers" ] pub mod fccob { # [ doc = "Reader of register FCCOB%s" ] pub type R = crate :: R < u8 , super :: FCCOB > ; # [ doc = "Writer for register FCCOB%s" ] pub type W = crate :: W < u8 , super :: FCCOB > ; # [ doc = "Register FCCOB%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FCCOB { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CCOBn`" ] pub type CCOBN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CCOBn`" ] pub struct CCOBN_W < 'a > { w : & 'a mut W , } impl < 'a > CCOBN_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - The FCCOB register provides a command code and relevant parameters to the memory controller" ] # [ inline ( always ) ] pub fn ccobn ( & self ) -> CCOBN_R { CCOBN_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - The FCCOB register provides a command code and relevant parameters to the memory controller" ] # [ inline ( always ) ] pub fn ccobn ( & mut self ) -> CCOBN_W { CCOBN_W { w : self } } } } # [ doc = "Program Flash Protection Registers\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fprot](fprot) module" ] pub type FPROT = crate :: Reg < u8 , _FPROT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPROT ; # [ doc = "`read()` method returns [fprot::R](fprot::R) reader structure" ] impl crate :: Readable for FPROT { } # [ doc = "`write(|w| ..)` method takes [fprot::W](fprot::W) writer structure" ] impl crate :: Writable for FPROT { } # [ doc = "Program Flash Protection Registers" ] pub mod fprot { # [ doc = "Reader of register FPROT%s" ] pub type R = crate :: R < u8 , super :: FPROT > ; # [ doc = "Writer for register FPROT%s" ] pub type W = crate :: W < u8 , super :: FPROT > ; # [ doc = "Register FPROT%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FPROT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Program Flash Region Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PROT_A { # [ doc = "0: Program flash region is protected." ] _0 , # [ doc = "1: Program flash region is not protected" ] _1 } impl From < PROT_A > for u8 { # [ inline ( always ) ] fn from ( variant : PROT_A ) -> Self { match variant { PROT_A :: _0 => 0 , PROT_A :: _1 => 1 } } } # [ doc = "Reader of field `PROT`" ] pub type PROT_R = crate :: R < u8 , PROT_A > ; impl PROT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PROT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PROT_A :: _0 ) , 1 => Val ( PROT_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PROT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PROT_A :: _1 } } # [ doc = "Write proxy for field `PROT`" ] pub struct PROT_W < 'a > { w : & 'a mut W , } impl < 'a > PROT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PROT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Program flash region is protected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PROT_A :: _0 ) } # [ doc = "Program flash region is not protected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PROT_A :: _1 ) } # [ 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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Program Flash Region Protect" ] # [ inline ( always ) ] pub fn prot ( & self ) -> PROT_R { PROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Program Flash Region Protect" ] # [ inline ( always ) ] pub fn prot ( & mut self ) -> PROT_W { PROT_W { w : self } } } } # [ doc = "EEPROM Protection Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [feprot](feprot) module" ] pub type FEPROT = crate :: Reg < u8 , _FEPROT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FEPROT ; # [ doc = "`read()` method returns [feprot::R](feprot::R) reader structure" ] impl crate :: Readable for FEPROT { } # [ doc = "`write(|w| ..)` method takes [feprot::W](feprot::W) writer structure" ] impl crate :: Writable for FEPROT { } # [ doc = "EEPROM Protection Register" ] pub mod feprot { # [ doc = "Reader of register FEPROT" ] pub type R = crate :: R < u8 , super :: FEPROT > ; # [ doc = "Writer for register FEPROT" ] pub type W = crate :: W < u8 , super :: FEPROT > ; # [ doc = "Register FEPROT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FEPROT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "EEPROM Region Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EPROT_A { # [ doc = "0: For devices with program flash only: Reserved For devices with FlexNVM: EEPROM region is protected" ] _0 , # [ doc = "1: For devices with program flash only: Reserved For devices with FlexNVM: EEPROM region is not protected" ] _1 } impl From < EPROT_A > for u8 { # [ inline ( always ) ] fn from ( variant : EPROT_A ) -> Self { match variant { EPROT_A :: _0 => 0 , EPROT_A :: _1 => 1 } } } # [ doc = "Reader of field `EPROT`" ] pub type EPROT_R = crate :: R < u8 , EPROT_A > ; impl EPROT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EPROT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EPROT_A :: _0 ) , 1 => Val ( EPROT_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EPROT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EPROT_A :: _1 } } # [ doc = "Write proxy for field `EPROT`" ] pub struct EPROT_W < 'a > { w : & 'a mut W , } impl < 'a > EPROT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EPROT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "For devices with program flash only: Reserved For devices with FlexNVM: EEPROM region is protected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EPROT_A :: _0 ) } # [ doc = "For devices with program flash only: Reserved For devices with FlexNVM: EEPROM region is not protected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EPROT_A :: _1 ) } # [ 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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - EEPROM Region Protect" ] # [ inline ( always ) ] pub fn eprot ( & self ) -> EPROT_R { EPROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - EEPROM Region Protect" ] # [ inline ( always ) ] pub fn eprot ( & mut self ) -> EPROT_W { EPROT_W { w : self } } } } # [ doc = "Data Flash Protection Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fdprot](fdprot) module" ] pub type FDPROT = crate :: Reg < u8 , _FDPROT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FDPROT ; # [ doc = "`read()` method returns [fdprot::R](fdprot::R) reader structure" ] impl crate :: Readable for FDPROT { } # [ doc = "`write(|w| ..)` method takes [fdprot::W](fdprot::W) writer structure" ] impl crate :: Writable for FDPROT { } # [ doc = "Data Flash Protection Register" ] pub mod fdprot { # [ doc = "Reader of register FDPROT" ] pub type R = crate :: R < u8 , super :: FDPROT > ; # [ doc = "Writer for register FDPROT" ] pub type W = crate :: W < u8 , super :: FDPROT > ; # [ doc = "Register FDPROT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FDPROT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Data Flash Region Protect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPROT_A { # [ doc = "0: Data Flash region is protected" ] _0 , # [ doc = "1: Data Flash region is not protected" ] _1 } impl From < DPROT_A > for u8 { # [ inline ( always ) ] fn from ( variant : DPROT_A ) -> Self { match variant { DPROT_A :: _0 => 0 , DPROT_A :: _1 => 1 } } } # [ doc = "Reader of field `DPROT`" ] pub type DPROT_R = crate :: R < u8 , DPROT_A > ; impl DPROT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DPROT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DPROT_A :: _0 ) , 1 => Val ( DPROT_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPROT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPROT_A :: _1 } } # [ doc = "Write proxy for field `DPROT`" ] pub struct DPROT_W < 'a > { w : & 'a mut W , } impl < 'a > DPROT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPROT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Data Flash region is protected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPROT_A :: _0 ) } # [ doc = "Data Flash region is not protected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPROT_A :: _1 ) } # [ 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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data Flash Region Protect" ] # [ inline ( always ) ] pub fn dprot ( & self ) -> DPROT_R { DPROT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data Flash Region Protect" ] # [ inline ( always ) ] pub fn dprot ( & mut self ) -> DPROT_W { DPROT_W { w : self } } } } # [ doc = "Execute-only Access Registers\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [xacc](xacc) module" ] pub type XACC = crate :: Reg < u8 , _XACC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _XACC ; # [ doc = "`read()` method returns [xacc::R](xacc::R) reader structure" ] impl crate :: Readable for XACC { } # [ doc = "Execute-only Access Registers" ] pub mod xacc { # [ doc = "Reader of register XACC%s" ] pub type R = crate :: R < u8 , super :: XACC > ; # [ doc = "Execute-only access control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum XA_A { # [ doc = "0: Associated segment is accessible in execute mode only (as an instruction fetch)" ] _0 , # [ doc = "1: Associated segment is accessible as data or in execute mode" ] _1 } impl From < XA_A > for u8 { # [ inline ( always ) ] fn from ( variant : XA_A ) -> Self { match variant { XA_A :: _0 => 0 , XA_A :: _1 => 1 } } } # [ doc = "Reader of field `XA`" ] pub type XA_R = crate :: R < u8 , XA_A > ; impl XA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , XA_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( XA_A :: _0 ) , 1 => Val ( XA_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == XA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == XA_A :: _1 } } impl R { # [ doc = "Bits 0:7 - Execute-only access control" ] # [ inline ( always ) ] pub fn xa ( & self ) -> XA_R { XA_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Supervisor-only Access Registers\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sacc](sacc) module" ] pub type SACC = crate :: Reg < u8 , _SACC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SACC ; # [ doc = "`read()` method returns [sacc::R](sacc::R) reader structure" ] impl crate :: Readable for SACC { } # [ doc = "Supervisor-only Access Registers" ] pub mod sacc { # [ doc = "Reader of register SACC%s" ] pub type R = crate :: R < u8 , super :: SACC > ; # [ doc = "Supervisor-only access control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SA_A { # [ doc = "0: Associated segment is accessible in supervisor mode only" ] _0 , # [ doc = "1: Associated segment is accessible in user or supervisor mode" ] _1 } impl From < SA_A > for u8 { # [ inline ( always ) ] fn from ( variant : SA_A ) -> Self { match variant { SA_A :: _0 => 0 , SA_A :: _1 => 1 } } } # [ doc = "Reader of field `SA`" ] pub type SA_R = crate :: R < u8 , SA_A > ; impl SA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SA_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SA_A :: _0 ) , 1 => Val ( SA_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SA_A :: _1 } } impl R { # [ doc = "Bits 0:7 - Supervisor-only access control" ] # [ inline ( always ) ] pub fn sa ( & self ) -> SA_R { SA_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Flash Access Segment Size Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [facss](facss) module" ] pub type FACSS = crate :: Reg < u8 , _FACSS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FACSS ; # [ doc = "`read()` method returns [facss::R](facss::R) reader structure" ] impl crate :: Readable for FACSS { } # [ doc = "Flash Access Segment Size Register" ] pub mod facss { # [ doc = "Reader of register FACSS" ] pub type R = crate :: R < u8 , super :: FACSS > ; # [ doc = "Reader of field `SGSIZE`" ] pub type SGSIZE_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Segment Size" ] # [ inline ( always ) ] pub fn sgsize ( & self ) -> SGSIZE_R { SGSIZE_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Flash Access Segment Number Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [facsn](facsn) module" ] pub type FACSN = crate :: Reg < u8 , _FACSN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FACSN ; # [ doc = "`read()` method returns [facsn::R](facsn::R) reader structure" ] impl crate :: Readable for FACSN { } # [ doc = "Flash Access Segment Number Register" ] pub mod facsn { # [ doc = "Reader of register FACSN" ] pub type R = crate :: R < u8 , super :: FACSN > ; # [ doc = "Number of Segments Indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NUMSG_A { # [ doc = "48: Program flash memory is divided into 48 segments (768 Kbytes, 1.5 Mbytes)" ] _110000 , # [ doc = "64: Program flash memory is divided into 64 segments (512 Kbytes, 1 Mbyte, 2 Mbytes)" ] _1000000 } impl From < NUMSG_A > for u8 { # [ inline ( always ) ] fn from ( variant : NUMSG_A ) -> Self { match variant { NUMSG_A :: _110000 => 48 , NUMSG_A :: _1000000 => 64 } } } # [ doc = "Reader of field `NUMSG`" ] pub type NUMSG_R = crate :: R < u8 , NUMSG_A > ; impl NUMSG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , NUMSG_A > { use crate :: Variant :: * ; match self . bits { 48 => Val ( NUMSG_A :: _110000 ) , 64 => Val ( NUMSG_A :: _1000000 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_110000`" ] # [ inline ( always ) ] pub fn is_110000 ( & self ) -> bool { * self == NUMSG_A :: _110000 } # [ doc = "Checks if the value of the field is `_1000000`" ] # [ inline ( always ) ] pub fn is_1000000 ( & self ) -> bool { * self == NUMSG_A :: _1000000 } } impl R { # [ doc = "Bits 0:7 - Number of Segments Indicator" ] # [ inline ( always ) ] pub fn numsg ( & self ) -> NUMSG_R { NUMSG_R :: new ( ( self . bits & 0xff ) as u8 ) } } } } # [ doc = "DMA channel multiplexor" ] pub struct DMAMUX { _marker : PhantomData < * const ( ) > } unsafe impl Send for DMAMUX { } impl DMAMUX { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const dmamux :: RegisterBlock { 0x4002_1000 as * const _ } } impl Deref for DMAMUX { type Target = dmamux :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * DMAMUX :: ptr ( ) } } } # [ doc = "DMA channel multiplexor" ] pub mod dmamux { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Channel Configuration register" ] pub chcfg : [ CHCFG ; 32 ] , } # [ doc = "Channel Configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chcfg](chcfg) module" ] pub type CHCFG = crate :: Reg < u8 , _CHCFG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CHCFG ; # [ doc = "`read()` method returns [chcfg::R](chcfg::R) reader structure" ] impl crate :: Readable for CHCFG { } # [ doc = "`write(|w| ..)` method takes [chcfg::W](chcfg::W) writer structure" ] impl crate :: Writable for CHCFG { } # [ doc = "Channel Configuration register" ] pub mod chcfg { # [ doc = "Reader of register CHCFG%s" ] pub type R = crate :: R < u8 , super :: CHCFG > ; # [ doc = "Writer for register CHCFG%s" ] pub type W = crate :: W < u8 , super :: CHCFG > ; # [ doc = "Register CHCFG%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CHCFG { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Channel Source (Slot)\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SOURCE_A { # [ doc = "0: Disable_Signal" ] _0 , # [ doc = "1: TSI0_Signal" ] _1 , # [ doc = "2: UART0_Rx_Signal" ] _2 , # [ doc = "3: UART0_Tx_Signal" ] _3 , # [ doc = "4: UART1_Rx_Signal" ] _4 , # [ doc = "5: UART1_Tx_Signal" ] _5 , # [ doc = "6: UART2_Rx_Signal" ] _6 , # [ doc = "7: UART2_Tx_Signal" ] _7 , # [ doc = "8: UART3_Rx_Signal" ] _8 , # [ doc = "9: UART3_Tx_Signal" ] _9 , # [ doc = "10: UART4_Signal" ] _10 , # [ doc = "12: I2S0_Rx_Signal" ] _12 , # [ doc = "13: I2S0_Tx_Signal" ] _13 , # [ doc = "14: SPI0_Rx_Signal" ] _14 , # [ doc = "15: SPI0_Tx_Signal" ] _15 , # [ doc = "16: SPI1_Rx_Signal" ] _16 , # [ doc = "17: SPI1_Tx_Signal" ] _17 , # [ doc = "18: I2C0_I2C3_Signal" ] _18 , # [ doc = "19: I2C1_I2C2_Signal" ] _19 , # [ doc = "20: FTM0_Channel0_Signal" ] _20 , # [ doc = "21: FTM0_Channel1_Signal" ] _21 , # [ doc = "22: FTM0_Channel2_Signal" ] _22 , # [ doc = "23: FTM0_Channel3_Signal" ] _23 , # [ doc = "24: FTM0_Channel4_Signal" ] _24 , # [ doc = "25: FTM0_Channel5_Signal" ] _25 , # [ doc = "26: FTM0_Channel6_Signal" ] _26 , # [ doc = "27: FTM0_Channel7_Signal" ] _27 , # [ doc = "28: FTM1_TPM1_Channel0_Signal" ] _28 , # [ doc = "29: FTM1_TPM1_Channel1_Signal" ] _29 , # [ doc = "30: FTM2_TPM2_Channel0_Signal" ] _30 , # [ doc = "31: FTM2_TPM2_Channel1_Signal" ] _31 , # [ doc = "32: FTM3_Channel0_Signal" ] _32 , # [ doc = "33: FTM3_Channel1_Signal" ] _33 , # [ doc = "34: FTM3_Channel2_Signal" ] _34 , # [ doc = "35: FTM3_Channel3_Signal" ] _35 , # [ doc = "36: FTM3_Channel4_Signal" ] _36 , # [ doc = "37: FTM3_Channel5_Signal" ] _37 , # [ doc = "38: FTM3_Channel6_SPI2_Rx_Signal" ] _38 , # [ doc = "39: FTM3_Channel7_SPI2_Tx_Signal" ] _39 , # [ doc = "40: ADC0_Signal" ] _40 , # [ doc = "41: ADC1_Signal" ] _41 , # [ doc = "42: CMP0_Signal" ] _42 , # [ doc = "43: CMP1_Signal" ] _43 , # [ doc = "44: CMP2_CMP3_Signal" ] _44 , # [ doc = "45: DAC0_Signal" ] _45 , # [ doc = "46: DAC1_Signal" ] _46 , # [ doc = "47: CMT_Signal" ] _47 , # [ doc = "48: PDB_Signal" ] _48 , # [ doc = "49: PortA_Signal" ] _49 , # [ doc = "50: PortB_Signal" ] _50 , # [ doc = "51: PortC_Signal" ] _51 , # [ doc = "52: PortD_Signal" ] _52 , # [ doc = "53: PortE_Signal" ] _53 , # [ doc = "54: IEEE1588Timer0_Signal" ] _54 , # [ doc = "55: IEEE1588Timer1_TPM1_Overflow_Signal" ] _55 , # [ doc = "56: IEEE1588Timer2_TPM2_Overflow_Signal" ] _56 , # [ doc = "57: IEEE1588Timer3_Signal" ] _57 , # [ doc = "58: LPUART0_Rx_Signal" ] _58 , # [ doc = "59: LPUART0_Tx_Signal" ] _59 , # [ doc = "60: AlwaysOn60_Signal" ] _60 , # [ doc = "61: AlwaysOn61_Signal" ] _61 , # [ doc = "62: AlwaysOn62_Signal" ] _62 , # [ doc = "63: AlwaysOn63_Signal" ] _63 } impl From < SOURCE_A > for u8 { # [ inline ( always ) ] fn from ( variant : SOURCE_A ) -> Self { match variant { SOURCE_A :: _0 => 0 , SOURCE_A :: _1 => 1 , SOURCE_A :: _2 => 2 , SOURCE_A :: _3 => 3 , SOURCE_A :: _4 => 4 , SOURCE_A :: _5 => 5 , SOURCE_A :: _6 => 6 , SOURCE_A :: _7 => 7 , SOURCE_A :: _8 => 8 , SOURCE_A :: _9 => 9 , SOURCE_A :: _10 => 10 , SOURCE_A :: _12 => 12 , SOURCE_A :: _13 => 13 , SOURCE_A :: _14 => 14 , SOURCE_A :: _15 => 15 , SOURCE_A :: _16 => 16 , SOURCE_A :: _17 => 17 , SOURCE_A :: _18 => 18 , SOURCE_A :: _19 => 19 , SOURCE_A :: _20 => 20 , SOURCE_A :: _21 => 21 , SOURCE_A :: _22 => 22 , SOURCE_A :: _23 => 23 , SOURCE_A :: _24 => 24 , SOURCE_A :: _25 => 25 , SOURCE_A :: _26 => 26 , SOURCE_A :: _27 => 27 , SOURCE_A :: _28 => 28 , SOURCE_A :: _29 => 29 , SOURCE_A :: _30 => 30 , SOURCE_A :: _31 => 31 , SOURCE_A :: _32 => 32 , SOURCE_A :: _33 => 33 , SOURCE_A :: _34 => 34 , SOURCE_A :: _35 => 35 , SOURCE_A :: _36 => 36 , SOURCE_A :: _37 => 37 , SOURCE_A :: _38 => 38 , SOURCE_A :: _39 => 39 , SOURCE_A :: _40 => 40 , SOURCE_A :: _41 => 41 , SOURCE_A :: _42 => 42 , SOURCE_A :: _43 => 43 , SOURCE_A :: _44 => 44 , SOURCE_A :: _45 => 45 , SOURCE_A :: _46 => 46 , SOURCE_A :: _47 => 47 , SOURCE_A :: _48 => 48 , SOURCE_A :: _49 => 49 , SOURCE_A :: _50 => 50 , SOURCE_A :: _51 => 51 , SOURCE_A :: _52 => 52 , SOURCE_A :: _53 => 53 , SOURCE_A :: _54 => 54 , SOURCE_A :: _55 => 55 , SOURCE_A :: _56 => 56 , SOURCE_A :: _57 => 57 , SOURCE_A :: _58 => 58 , SOURCE_A :: _59 => 59 , SOURCE_A :: _60 => 60 , SOURCE_A :: _61 => 61 , SOURCE_A :: _62 => 62 , SOURCE_A :: _63 => 63 } } } # [ doc = "Reader of field `SOURCE`" ] pub type SOURCE_R = crate :: R < u8 , SOURCE_A > ; impl SOURCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SOURCE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SOURCE_A :: _0 ) , 1 => Val ( SOURCE_A :: _1 ) , 2 => Val ( SOURCE_A :: _2 ) , 3 => Val ( SOURCE_A :: _3 ) , 4 => Val ( SOURCE_A :: _4 ) , 5 => Val ( SOURCE_A :: _5 ) , 6 => Val ( SOURCE_A :: _6 ) , 7 => Val ( SOURCE_A :: _7 ) , 8 => Val ( SOURCE_A :: _8 ) , 9 => Val ( SOURCE_A :: _9 ) , 10 => Val ( SOURCE_A :: _10 ) , 12 => Val ( SOURCE_A :: _12 ) , 13 => Val ( SOURCE_A :: _13 ) , 14 => Val ( SOURCE_A :: _14 ) , 15 => Val ( SOURCE_A :: _15 ) , 16 => Val ( SOURCE_A :: _16 ) , 17 => Val ( SOURCE_A :: _17 ) , 18 => Val ( SOURCE_A :: _18 ) , 19 => Val ( SOURCE_A :: _19 ) , 20 => Val ( SOURCE_A :: _20 ) , 21 => Val ( SOURCE_A :: _21 ) , 22 => Val ( SOURCE_A :: _22 ) , 23 => Val ( SOURCE_A :: _23 ) , 24 => Val ( SOURCE_A :: _24 ) , 25 => Val ( SOURCE_A :: _25 ) , 26 => Val ( SOURCE_A :: _26 ) , 27 => Val ( SOURCE_A :: _27 ) , 28 => Val ( SOURCE_A :: _28 ) , 29 => Val ( SOURCE_A :: _29 ) , 30 => Val ( SOURCE_A :: _30 ) , 31 => Val ( SOURCE_A :: _31 ) , 32 => Val ( SOURCE_A :: _32 ) , 33 => Val ( SOURCE_A :: _33 ) , 34 => Val ( SOURCE_A :: _34 ) , 35 => Val ( SOURCE_A :: _35 ) , 36 => Val ( SOURCE_A :: _36 ) , 37 => Val ( SOURCE_A :: _37 ) , 38 => Val ( SOURCE_A :: _38 ) , 39 => Val ( SOURCE_A :: _39 ) , 40 => Val ( SOURCE_A :: _40 ) , 41 => Val ( SOURCE_A :: _41 ) , 42 => Val ( SOURCE_A :: _42 ) , 43 => Val ( SOURCE_A :: _43 ) , 44 => Val ( SOURCE_A :: _44 ) , 45 => Val ( SOURCE_A :: _45 ) , 46 => Val ( SOURCE_A :: _46 ) , 47 => Val ( SOURCE_A :: _47 ) , 48 => Val ( SOURCE_A :: _48 ) , 49 => Val ( SOURCE_A :: _49 ) , 50 => Val ( SOURCE_A :: _50 ) , 51 => Val ( SOURCE_A :: _51 ) , 52 => Val ( SOURCE_A :: _52 ) , 53 => Val ( SOURCE_A :: _53 ) , 54 => Val ( SOURCE_A :: _54 ) , 55 => Val ( SOURCE_A :: _55 ) , 56 => Val ( SOURCE_A :: _56 ) , 57 => Val ( SOURCE_A :: _57 ) , 58 => Val ( SOURCE_A :: _58 ) , 59 => Val ( SOURCE_A :: _59 ) , 60 => Val ( SOURCE_A :: _60 ) , 61 => Val ( SOURCE_A :: _61 ) , 62 => Val ( SOURCE_A :: _62 ) , 63 => Val ( SOURCE_A :: _63 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SOURCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SOURCE_A :: _1 } # [ doc = "Checks if the value of the field is `_2`" ] # [ inline ( always ) ] pub fn is_2 ( & self ) -> bool { * self == SOURCE_A :: _2 } # [ doc = "Checks if the value of the field is `_3`" ] # [ inline ( always ) ] pub fn is_3 ( & self ) -> bool { * self == SOURCE_A :: _3 } # [ doc = "Checks if the value of the field is `_4`" ] # [ inline ( always ) ] pub fn is_4 ( & self ) -> bool { * self == SOURCE_A :: _4 } # [ doc = "Checks if the value of the field is `_5`" ] # [ inline ( always ) ] pub fn is_5 ( & self ) -> bool { * self == SOURCE_A :: _5 } # [ doc = "Checks if the value of the field is `_6`" ] # [ inline ( always ) ] pub fn is_6 ( & self ) -> bool { * self == SOURCE_A :: _6 } # [ doc = "Checks if the value of the field is `_7`" ] # [ inline ( always ) ] pub fn is_7 ( & self ) -> bool { * self == SOURCE_A :: _7 } # [ doc = "Checks if the value of the field is `_8`" ] # [ inline ( always ) ] pub fn is_8 ( & self ) -> bool { * self == SOURCE_A :: _8 } # [ doc = "Checks if the value of the field is `_9`" ] # [ inline ( always ) ] pub fn is_9 ( & self ) -> bool { * self == SOURCE_A :: _9 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SOURCE_A :: _10 } # [ doc = "Checks if the value of the field is `_12`" ] # [ inline ( always ) ] pub fn is_12 ( & self ) -> bool { * self == SOURCE_A :: _12 } # [ doc = "Checks if the value of the field is `_13`" ] # [ inline ( always ) ] pub fn is_13 ( & self ) -> bool { * self == SOURCE_A :: _13 } # [ doc = "Checks if the value of the field is `_14`" ] # [ inline ( always ) ] pub fn is_14 ( & self ) -> bool { * self == SOURCE_A :: _14 } # [ doc = "Checks if the value of the field is `_15`" ] # [ inline ( always ) ] pub fn is_15 ( & self ) -> bool { * self == SOURCE_A :: _15 } # [ doc = "Checks if the value of the field is `_16`" ] # [ inline ( always ) ] pub fn is_16 ( & self ) -> bool { * self == SOURCE_A :: _16 } # [ doc = "Checks if the value of the field is `_17`" ] # [ inline ( always ) ] pub fn is_17 ( & self ) -> bool { * self == SOURCE_A :: _17 } # [ doc = "Checks if the value of the field is `_18`" ] # [ inline ( always ) ] pub fn is_18 ( & self ) -> bool { * self == SOURCE_A :: _18 } # [ doc = "Checks if the value of the field is `_19`" ] # [ inline ( always ) ] pub fn is_19 ( & self ) -> bool { * self == SOURCE_A :: _19 } # [ doc = "Checks if the value of the field is `_20`" ] # [ inline ( always ) ] pub fn is_20 ( & self ) -> bool { * self == SOURCE_A :: _20 } # [ doc = "Checks if the value of the field is `_21`" ] # [ inline ( always ) ] pub fn is_21 ( & self ) -> bool { * self == SOURCE_A :: _21 } # [ doc = "Checks if the value of the field is `_22`" ] # [ inline ( always ) ] pub fn is_22 ( & self ) -> bool { * self == SOURCE_A :: _22 } # [ doc = "Checks if the value of the field is `_23`" ] # [ inline ( always ) ] pub fn is_23 ( & self ) -> bool { * self == SOURCE_A :: _23 } # [ doc = "Checks if the value of the field is `_24`" ] # [ inline ( always ) ] pub fn is_24 ( & self ) -> bool { * self == SOURCE_A :: _24 } # [ doc = "Checks if the value of the field is `_25`" ] # [ inline ( always ) ] pub fn is_25 ( & self ) -> bool { * self == SOURCE_A :: _25 } # [ doc = "Checks if the value of the field is `_26`" ] # [ inline ( always ) ] pub fn is_26 ( & self ) -> bool { * self == SOURCE_A :: _26 } # [ doc = "Checks if the value of the field is `_27`" ] # [ inline ( always ) ] pub fn is_27 ( & self ) -> bool { * self == SOURCE_A :: _27 } # [ doc = "Checks if the value of the field is `_28`" ] # [ inline ( always ) ] pub fn is_28 ( & self ) -> bool { * self == SOURCE_A :: _28 } # [ doc = "Checks if the value of the field is `_29`" ] # [ inline ( always ) ] pub fn is_29 ( & self ) -> bool { * self == SOURCE_A :: _29 } # [ doc = "Checks if the value of the field is `_30`" ] # [ inline ( always ) ] pub fn is_30 ( & self ) -> bool { * self == SOURCE_A :: _30 } # [ doc = "Checks if the value of the field is `_31`" ] # [ inline ( always ) ] pub fn is_31 ( & self ) -> bool { * self == SOURCE_A :: _31 } # [ doc = "Checks if the value of the field is `_32`" ] # [ inline ( always ) ] pub fn is_32 ( & self ) -> bool { * self == SOURCE_A :: _32 } # [ doc = "Checks if the value of the field is `_33`" ] # [ inline ( always ) ] pub fn is_33 ( & self ) -> bool { * self == SOURCE_A :: _33 } # [ doc = "Checks if the value of the field is `_34`" ] # [ inline ( always ) ] pub fn is_34 ( & self ) -> bool { * self == SOURCE_A :: _34 } # [ doc = "Checks if the value of the field is `_35`" ] # [ inline ( always ) ] pub fn is_35 ( & self ) -> bool { * self == SOURCE_A :: _35 } # [ doc = "Checks if the value of the field is `_36`" ] # [ inline ( always ) ] pub fn is_36 ( & self ) -> bool { * self == SOURCE_A :: _36 } # [ doc = "Checks if the value of the field is `_37`" ] # [ inline ( always ) ] pub fn is_37 ( & self ) -> bool { * self == SOURCE_A :: _37 } # [ doc = "Checks if the value of the field is `_38`" ] # [ inline ( always ) ] pub fn is_38 ( & self ) -> bool { * self == SOURCE_A :: _38 } # [ doc = "Checks if the value of the field is `_39`" ] # [ inline ( always ) ] pub fn is_39 ( & self ) -> bool { * self == SOURCE_A :: _39 } # [ doc = "Checks if the value of the field is `_40`" ] # [ inline ( always ) ] pub fn is_40 ( & self ) -> bool { * self == SOURCE_A :: _40 } # [ doc = "Checks if the value of the field is `_41`" ] # [ inline ( always ) ] pub fn is_41 ( & self ) -> bool { * self == SOURCE_A :: _41 } # [ doc = "Checks if the value of the field is `_42`" ] # [ inline ( always ) ] pub fn is_42 ( & self ) -> bool { * self == SOURCE_A :: _42 } # [ doc = "Checks if the value of the field is `_43`" ] # [ inline ( always ) ] pub fn is_43 ( & self ) -> bool { * self == SOURCE_A :: _43 } # [ doc = "Checks if the value of the field is `_44`" ] # [ inline ( always ) ] pub fn is_44 ( & self ) -> bool { * self == SOURCE_A :: _44 } # [ doc = "Checks if the value of the field is `_45`" ] # [ inline ( always ) ] pub fn is_45 ( & self ) -> bool { * self == SOURCE_A :: _45 } # [ doc = "Checks if the value of the field is `_46`" ] # [ inline ( always ) ] pub fn is_46 ( & self ) -> bool { * self == SOURCE_A :: _46 } # [ doc = "Checks if the value of the field is `_47`" ] # [ inline ( always ) ] pub fn is_47 ( & self ) -> bool { * self == SOURCE_A :: _47 } # [ doc = "Checks if the value of the field is `_48`" ] # [ inline ( always ) ] pub fn is_48 ( & self ) -> bool { * self == SOURCE_A :: _48 } # [ doc = "Checks if the value of the field is `_49`" ] # [ inline ( always ) ] pub fn is_49 ( & self ) -> bool { * self == SOURCE_A :: _49 } # [ doc = "Checks if the value of the field is `_50`" ] # [ inline ( always ) ] pub fn is_50 ( & self ) -> bool { * self == SOURCE_A :: _50 } # [ doc = "Checks if the value of the field is `_51`" ] # [ inline ( always ) ] pub fn is_51 ( & self ) -> bool { * self == SOURCE_A :: _51 } # [ doc = "Checks if the value of the field is `_52`" ] # [ inline ( always ) ] pub fn is_52 ( & self ) -> bool { * self == SOURCE_A :: _52 } # [ doc = "Checks if the value of the field is `_53`" ] # [ inline ( always ) ] pub fn is_53 ( & self ) -> bool { * self == SOURCE_A :: _53 } # [ doc = "Checks if the value of the field is `_54`" ] # [ inline ( always ) ] pub fn is_54 ( & self ) -> bool { * self == SOURCE_A :: _54 } # [ doc = "Checks if the value of the field is `_55`" ] # [ inline ( always ) ] pub fn is_55 ( & self ) -> bool { * self == SOURCE_A :: _55 } # [ doc = "Checks if the value of the field is `_56`" ] # [ inline ( always ) ] pub fn is_56 ( & self ) -> bool { * self == SOURCE_A :: _56 } # [ doc = "Checks if the value of the field is `_57`" ] # [ inline ( always ) ] pub fn is_57 ( & self ) -> bool { * self == SOURCE_A :: _57 } # [ doc = "Checks if the value of the field is `_58`" ] # [ inline ( always ) ] pub fn is_58 ( & self ) -> bool { * self == SOURCE_A :: _58 } # [ doc = "Checks if the value of the field is `_59`" ] # [ inline ( always ) ] pub fn is_59 ( & self ) -> bool { * self == SOURCE_A :: _59 } # [ doc = "Checks if the value of the field is `_60`" ] # [ inline ( always ) ] pub fn is_60 ( & self ) -> bool { * self == SOURCE_A :: _60 } # [ doc = "Checks if the value of the field is `_61`" ] # [ inline ( always ) ] pub fn is_61 ( & self ) -> bool { * self == SOURCE_A :: _61 } # [ doc = "Checks if the value of the field is `_62`" ] # [ inline ( always ) ] pub fn is_62 ( & self ) -> bool { * self == SOURCE_A :: _62 } # [ doc = "Checks if the value of the field is `_63`" ] # [ inline ( always ) ] pub fn is_63 ( & self ) -> bool { * self == SOURCE_A :: _63 } } # [ doc = "Write proxy for field `SOURCE`" ] pub struct SOURCE_W < 'a > { w : & 'a mut W , } impl < 'a > SOURCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SOURCE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Disable_Signal" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _0 ) } # [ doc = "TSI0_Signal" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _1 ) } # [ doc = "UART0_Rx_Signal" ] # [ inline ( always ) ] pub fn _2 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _2 ) } # [ doc = "UART0_Tx_Signal" ] # [ inline ( always ) ] pub fn _3 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _3 ) } # [ doc = "UART1_Rx_Signal" ] # [ inline ( always ) ] pub fn _4 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _4 ) } # [ doc = "UART1_Tx_Signal" ] # [ inline ( always ) ] pub fn _5 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _5 ) } # [ doc = "UART2_Rx_Signal" ] # [ inline ( always ) ] pub fn _6 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _6 ) } # [ doc = "UART2_Tx_Signal" ] # [ inline ( always ) ] pub fn _7 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _7 ) } # [ doc = "UART3_Rx_Signal" ] # [ inline ( always ) ] pub fn _8 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _8 ) } # [ doc = "UART3_Tx_Signal" ] # [ inline ( always ) ] pub fn _9 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _9 ) } # [ doc = "UART4_Signal" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _10 ) } # [ doc = "I2S0_Rx_Signal" ] # [ inline ( always ) ] pub fn _12 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _12 ) } # [ doc = "I2S0_Tx_Signal" ] # [ inline ( always ) ] pub fn _13 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _13 ) } # [ doc = "SPI0_Rx_Signal" ] # [ inline ( always ) ] pub fn _14 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _14 ) } # [ doc = "SPI0_Tx_Signal" ] # [ inline ( always ) ] pub fn _15 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _15 ) } # [ doc = "SPI1_Rx_Signal" ] # [ inline ( always ) ] pub fn _16 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _16 ) } # [ doc = "SPI1_Tx_Signal" ] # [ inline ( always ) ] pub fn _17 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _17 ) } # [ doc = "I2C0_I2C3_Signal" ] # [ inline ( always ) ] pub fn _18 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _18 ) } # [ doc = "I2C1_I2C2_Signal" ] # [ inline ( always ) ] pub fn _19 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _19 ) } # [ doc = "FTM0_Channel0_Signal" ] # [ inline ( always ) ] pub fn _20 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _20 ) } # [ doc = "FTM0_Channel1_Signal" ] # [ inline ( always ) ] pub fn _21 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _21 ) } # [ doc = "FTM0_Channel2_Signal" ] # [ inline ( always ) ] pub fn _22 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _22 ) } # [ doc = "FTM0_Channel3_Signal" ] # [ inline ( always ) ] pub fn _23 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _23 ) } # [ doc = "FTM0_Channel4_Signal" ] # [ inline ( always ) ] pub fn _24 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _24 ) } # [ doc = "FTM0_Channel5_Signal" ] # [ inline ( always ) ] pub fn _25 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _25 ) } # [ doc = "FTM0_Channel6_Signal" ] # [ inline ( always ) ] pub fn _26 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _26 ) } # [ doc = "FTM0_Channel7_Signal" ] # [ inline ( always ) ] pub fn _27 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _27 ) } # [ doc = "FTM1_TPM1_Channel0_Signal" ] # [ inline ( always ) ] pub fn _28 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _28 ) } # [ doc = "FTM1_TPM1_Channel1_Signal" ] # [ inline ( always ) ] pub fn _29 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _29 ) } # [ doc = "FTM2_TPM2_Channel0_Signal" ] # [ inline ( always ) ] pub fn _30 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _30 ) } # [ doc = "FTM2_TPM2_Channel1_Signal" ] # [ inline ( always ) ] pub fn _31 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _31 ) } # [ doc = "FTM3_Channel0_Signal" ] # [ inline ( always ) ] pub fn _32 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _32 ) } # [ doc = "FTM3_Channel1_Signal" ] # [ inline ( always ) ] pub fn _33 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _33 ) } # [ doc = "FTM3_Channel2_Signal" ] # [ inline ( always ) ] pub fn _34 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _34 ) } # [ doc = "FTM3_Channel3_Signal" ] # [ inline ( always ) ] pub fn _35 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _35 ) } # [ doc = "FTM3_Channel4_Signal" ] # [ inline ( always ) ] pub fn _36 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _36 ) } # [ doc = "FTM3_Channel5_Signal" ] # [ inline ( always ) ] pub fn _37 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _37 ) } # [ doc = "FTM3_Channel6_SPI2_Rx_Signal" ] # [ inline ( always ) ] pub fn _38 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _38 ) } # [ doc = "FTM3_Channel7_SPI2_Tx_Signal" ] # [ inline ( always ) ] pub fn _39 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _39 ) } # [ doc = "ADC0_Signal" ] # [ inline ( always ) ] pub fn _40 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _40 ) } # [ doc = "ADC1_Signal" ] # [ inline ( always ) ] pub fn _41 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _41 ) } # [ doc = "CMP0_Signal" ] # [ inline ( always ) ] pub fn _42 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _42 ) } # [ doc = "CMP1_Signal" ] # [ inline ( always ) ] pub fn _43 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _43 ) } # [ doc = "CMP2_CMP3_Signal" ] # [ inline ( always ) ] pub fn _44 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _44 ) } # [ doc = "DAC0_Signal" ] # [ inline ( always ) ] pub fn _45 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _45 ) } # [ doc = "DAC1_Signal" ] # [ inline ( always ) ] pub fn _46 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _46 ) } # [ doc = "CMT_Signal" ] # [ inline ( always ) ] pub fn _47 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _47 ) } # [ doc = "PDB_Signal" ] # [ inline ( always ) ] pub fn _48 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _48 ) } # [ doc = "PortA_Signal" ] # [ inline ( always ) ] pub fn _49 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _49 ) } # [ doc = "PortB_Signal" ] # [ inline ( always ) ] pub fn _50 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _50 ) } # [ doc = "PortC_Signal" ] # [ inline ( always ) ] pub fn _51 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _51 ) } # [ doc = "PortD_Signal" ] # [ inline ( always ) ] pub fn _52 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _52 ) } # [ doc = "PortE_Signal" ] # [ inline ( always ) ] pub fn _53 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _53 ) } # [ doc = "IEEE1588Timer0_Signal" ] # [ inline ( always ) ] pub fn _54 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _54 ) } # [ doc = "IEEE1588Timer1_TPM1_Overflow_Signal" ] # [ inline ( always ) ] pub fn _55 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _55 ) } # [ doc = "IEEE1588Timer2_TPM2_Overflow_Signal" ] # [ inline ( always ) ] pub fn _56 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _56 ) } # [ doc = "IEEE1588Timer3_Signal" ] # [ inline ( always ) ] pub fn _57 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _57 ) } # [ doc = "LPUART0_Rx_Signal" ] # [ inline ( always ) ] pub fn _58 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _58 ) } # [ doc = "LPUART0_Tx_Signal" ] # [ inline ( always ) ] pub fn _59 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _59 ) } # [ doc = "AlwaysOn60_Signal" ] # [ inline ( always ) ] pub fn _60 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _60 ) } # [ doc = "AlwaysOn61_Signal" ] # [ inline ( always ) ] pub fn _61 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _61 ) } # [ doc = "AlwaysOn62_Signal" ] # [ inline ( always ) ] pub fn _62 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _62 ) } # [ doc = "AlwaysOn63_Signal" ] # [ inline ( always ) ] pub fn _63 ( self ) -> & 'a mut W { self . variant ( SOURCE_A :: _63 ) } # [ 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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "DMA Channel Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG_A { # [ doc = "0: Triggering is disabled. If triggering is disabled and ENBL is set, the DMA Channel will simply route the specified source to the DMA channel. (Normal mode)" ] _0 , # [ doc = "1: Triggering is enabled. If triggering is enabled and ENBL is set, the DMAMUX is in Periodic Trigger mode." ] _1 } impl From < TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG_A ) -> Self { match variant { TRIG_A :: _0 => false , TRIG_A :: _1 => true } } } # [ doc = "Reader of field `TRIG`" ] pub type TRIG_R = crate :: R < bool , TRIG_A > ; impl TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG_A { match self . bits { false => TRIG_A :: _0 , true => TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG_A :: _1 } } # [ doc = "Write proxy for field `TRIG`" ] pub struct TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Triggering is disabled. If triggering is disabled and ENBL is set, the DMA Channel will simply route the specified source to the DMA channel. (Normal mode)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG_A :: _0 ) } # [ doc = "Triggering is enabled. If triggering is enabled and ENBL is set, the DMAMUX is in Periodic Trigger mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "DMA Channel Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENBL_A { # [ doc = "0: DMA channel is disabled. This mode is primarily used during configuration of the DMAMux. The DMA has separate channel enables/disables, which should be used to disable or reconfigure a DMA channel." ] _0 , # [ doc = "1: DMA channel is enabled" ] _1 } impl From < ENBL_A > for bool { # [ inline ( always ) ] fn from ( variant : ENBL_A ) -> Self { match variant { ENBL_A :: _0 => false , ENBL_A :: _1 => true } } } # [ doc = "Reader of field `ENBL`" ] pub type ENBL_R = crate :: R < bool , ENBL_A > ; impl ENBL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENBL_A { match self . bits { false => ENBL_A :: _0 , true => ENBL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENBL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENBL_A :: _1 } } # [ doc = "Write proxy for field `ENBL`" ] pub struct ENBL_W < 'a > { w : & 'a mut W , } impl < 'a > ENBL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENBL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA channel is disabled. This mode is primarily used during configuration of the DMAMux. The DMA has separate channel enables/disables, which should be used to disable or reconfigure a DMA channel." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENBL_A :: _0 ) } # [ doc = "DMA channel is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENBL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - DMA Channel Source (Slot)" ] # [ inline ( always ) ] pub fn source ( & self ) -> SOURCE_R { SOURCE_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bit 6 - DMA Channel Trigger Enable" ] # [ inline ( always ) ] pub fn trig ( & self ) -> TRIG_R { TRIG_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - DMA Channel Enable" ] # [ inline ( always ) ] pub fn enbl ( & self ) -> ENBL_R { ENBL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:5 - DMA Channel Source (Slot)" ] # [ inline ( always ) ] pub fn source ( & mut self ) -> SOURCE_W { SOURCE_W { w : self } } # [ doc = "Bit 6 - DMA Channel Trigger Enable" ] # [ inline ( always ) ] pub fn trig ( & mut self ) -> TRIG_W { TRIG_W { w : self } } # [ doc = "Bit 7 - DMA Channel Enable" ] # [ inline ( always ) ] pub fn enbl ( & mut self ) -> ENBL_W { ENBL_W { w : self } } } } } # [ doc = "Flex Controller Area Network module" ] pub struct CAN0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for CAN0 { } impl CAN0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const can0 :: RegisterBlock { 0x4002_4000 as * const _ } } impl Deref for CAN0 { type Target = can0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CAN0 :: ptr ( ) } } } # [ doc = "Flex Controller Area Network module" ] pub mod can0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Module Configuration Register" ] pub mcr : MCR , # [ doc = "0x04 - Control 1 register" ] pub ctrl1 : CTRL1 , # [ doc = "0x08 - Free Running Timer" ] pub timer : TIMER , _reserved3 : [ u8 ; 4usize ] , # [ doc = "0x10 - Rx Mailboxes Global Mask Register" ] pub rxmgmask : RXMGMASK , # [ doc = "0x14 - Rx 14 Mask register" ] pub rx14mask : RX14MASK , # [ doc = "0x18 - Rx 15 Mask register" ] pub rx15mask : RX15MASK , # [ doc = "0x1c - Error Counter" ] pub ecr : ECR , # [ doc = "0x20 - Error and Status 1 register" ] pub esr1 : ESR1 , _reserved8 : [ u8 ; 4usize ] , # [ doc = "0x28 - Interrupt Masks 1 register" ] pub imask1 : IMASK1 , _reserved9 : [ u8 ; 4usize ] , # [ doc = "0x30 - Interrupt Flags 1 register" ] pub iflag1 : IFLAG1 , # [ doc = "0x34 - Control 2 register" ] pub ctrl2 : CTRL2 , # [ doc = "0x38 - Error and Status 2 register" ] pub esr2 : ESR2 , _reserved12 : [ u8 ; 8usize ] , # [ doc = "0x44 - CRC Register" ] pub crcr : CRCR , # [ doc = "0x48 - Rx FIFO Global Mask register" ] pub rxfgmask : RXFGMASK , # [ doc = "0x4c - Rx FIFO Information Register" ] pub rxfir : RXFIR , _reserved15 : [ u8 ; 48usize ] , # [ doc = "0x80 - Message Buffer 0 CS Register" ] pub cs0 : CS0 , # [ doc = "0x84 - Message Buffer 0 ID Register" ] pub id0 : ID0 , # [ doc = "0x88 - Message Buffer 0 WORD0 Register" ] pub word00 : WORD00 , # [ doc = "0x8c - Message Buffer 0 WORD1 Register" ] pub word10 : WORD10 , # [ doc = "0x90 - Message Buffer 1 CS Register" ] pub cs1 : CS1 , # [ doc = "0x94 - Message Buffer 1 ID Register" ] pub id1 : ID1 , # [ doc = "0x98 - Message Buffer 1 WORD0 Register" ] pub word01 : WORD01 , # [ doc = "0x9c - Message Buffer 1 WORD1 Register" ] pub word11 : WORD11 , # [ doc = "0xa0 - Message Buffer 2 CS Register" ] pub cs2 : CS2 , # [ doc = "0xa4 - Message Buffer 2 ID Register" ] pub id2 : ID2 , # [ doc = "0xa8 - Message Buffer 2 WORD0 Register" ] pub word02 : WORD02 , # [ doc = "0xac - Message Buffer 2 WORD1 Register" ] pub word12 : WORD12 , # [ doc = "0xb0 - Message Buffer 3 CS Register" ] pub cs3 : CS3 , # [ doc = "0xb4 - Message Buffer 3 ID Register" ] pub id3 : ID3 , # [ doc = "0xb8 - Message Buffer 3 WORD0 Register" ] pub word03 : WORD03 , # [ doc = "0xbc - Message Buffer 3 WORD1 Register" ] pub word13 : WORD13 , # [ doc = "0xc0 - Message Buffer 4 CS Register" ] pub cs4 : CS4 , # [ doc = "0xc4 - Message Buffer 4 ID Register" ] pub id4 : ID4 , # [ doc = "0xc8 - Message Buffer 4 WORD0 Register" ] pub word04 : WORD04 , # [ doc = "0xcc - Message Buffer 4 WORD1 Register" ] pub word14 : WORD14 , # [ doc = "0xd0 - Message Buffer 5 CS Register" ] pub cs5 : CS5 , # [ doc = "0xd4 - Message Buffer 5 ID Register" ] pub id5 : ID5 , # [ doc = "0xd8 - Message Buffer 5 WORD0 Register" ] pub word05 : WORD05 , # [ doc = "0xdc - Message Buffer 5 WORD1 Register" ] pub word15 : WORD15 , # [ doc = "0xe0 - Message Buffer 6 CS Register" ] pub cs6 : CS6 , # [ doc = "0xe4 - Message Buffer 6 ID Register" ] pub id6 : ID6 , # [ doc = "0xe8 - Message Buffer 6 WORD0 Register" ] pub word06 : WORD06 , # [ doc = "0xec - Message Buffer 6 WORD1 Register" ] pub word16 : WORD16 , # [ doc = "0xf0 - Message Buffer 7 CS Register" ] pub cs7 : CS7 , # [ doc = "0xf4 - Message Buffer 7 ID Register" ] pub id7 : ID7 , # [ doc = "0xf8 - Message Buffer 7 WORD0 Register" ] pub word07 : WORD07 , # [ doc = "0xfc - Message Buffer 7 WORD1 Register" ] pub word17 : WORD17 , # [ doc = "0x100 - Message Buffer 8 CS Register" ] pub cs8 : CS8 , # [ doc = "0x104 - Message Buffer 8 ID Register" ] pub id8 : ID8 , # [ doc = "0x108 - Message Buffer 8 WORD0 Register" ] pub word08 : WORD08 , # [ doc = "0x10c - Message Buffer 8 WORD1 Register" ] pub word18 : WORD18 , # [ doc = "0x110 - Message Buffer 9 CS Register" ] pub cs9 : CS9 , # [ doc = "0x114 - Message Buffer 9 ID Register" ] pub id9 : ID9 , # [ doc = "0x118 - Message Buffer 9 WORD0 Register" ] pub word09 : WORD09 , # [ doc = "0x11c - Message Buffer 9 WORD1 Register" ] pub word19 : WORD19 , # [ doc = "0x120 - Message Buffer 10 CS Register" ] pub cs10 : CS10 , # [ doc = "0x124 - Message Buffer 10 ID Register" ] pub id10 : ID10 , # [ doc = "0x128 - Message Buffer 10 WORD0 Register" ] pub word010 : WORD010 , # [ doc = "0x12c - Message Buffer 10 WORD1 Register" ] pub word110 : WORD110 , # [ doc = "0x130 - Message Buffer 11 CS Register" ] pub cs11 : CS11 , # [ doc = "0x134 - Message Buffer 11 ID Register" ] pub id11 : ID11 , # [ doc = "0x138 - Message Buffer 11 WORD0 Register" ] pub word011 : WORD011 , # [ doc = "0x13c - Message Buffer 11 WORD1 Register" ] pub word111 : WORD111 , # [ doc = "0x140 - Message Buffer 12 CS Register" ] pub cs12 : CS12 , # [ doc = "0x144 - Message Buffer 12 ID Register" ] pub id12 : ID12 , # [ doc = "0x148 - Message Buffer 12 WORD0 Register" ] pub word012 : WORD012 , # [ doc = "0x14c - Message Buffer 12 WORD1 Register" ] pub word112 : WORD112 , # [ doc = "0x150 - Message Buffer 13 CS Register" ] pub cs13 : CS13 , # [ doc = "0x154 - Message Buffer 13 ID Register" ] pub id13 : ID13 , # [ doc = "0x158 - Message Buffer 13 WORD0 Register" ] pub word013 : WORD013 , # [ doc = "0x15c - Message Buffer 13 WORD1 Register" ] pub word113 : WORD113 , # [ doc = "0x160 - Message Buffer 14 CS Register" ] pub cs14 : CS14 , # [ doc = "0x164 - Message Buffer 14 ID Register" ] pub id14 : ID14 , # [ doc = "0x168 - Message Buffer 14 WORD0 Register" ] pub word014 : WORD014 , # [ doc = "0x16c - Message Buffer 14 WORD1 Register" ] pub word114 : WORD114 , # [ doc = "0x170 - Message Buffer 15 CS Register" ] pub cs15 : CS15 , # [ doc = "0x174 - Message Buffer 15 ID Register" ] pub id15 : ID15 , # [ doc = "0x178 - Message Buffer 15 WORD0 Register" ] pub word015 : WORD015 , # [ doc = "0x17c - Message Buffer 15 WORD1 Register" ] pub word115 : WORD115 , _reserved79 : [ u8 ; 1792usize ] , # [ doc = "0x880 - Rx Individual Mask Registers" ] pub rximr : [ RXIMR ; 16 ] , } # [ doc = "Module Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mcr](mcr) module" ] pub type MCR = crate :: Reg < u32 , _MCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCR ; # [ doc = "`read()` method returns [mcr::R](mcr::R) reader structure" ] impl crate :: Readable for MCR { } # [ doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure" ] impl crate :: Writable for MCR { } # [ doc = "Module Configuration Register" ] pub mod mcr { # [ doc = "Reader of register MCR" ] pub type R = crate :: R < u32 , super :: MCR > ; # [ doc = "Writer for register MCR" ] pub type W = crate :: W < u32 , super :: MCR > ; # [ doc = "Register MCR `reset()`'s with value 0xd890_000f" ] impl crate :: ResetValue for super :: MCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xd890_000f } } # [ doc = "Reader of field `MAXMB`" ] pub type MAXMB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MAXMB`" ] pub struct MAXMB_W < 'a > { w : & 'a mut W , } impl < 'a > MAXMB_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 & ! 0x7f ) | ( ( value as u32 ) & 0x7f ) ; self . w } } # [ doc = "ID Acceptance Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDAM_A { # [ doc = "0: Format A: One full ID (standard and extended) per ID Filter Table element." ] _00 , # [ doc = "1: Format B: Two full standard IDs or two partial 14-bit (standard and extended) IDs per ID Filter Table element." ] _01 , # [ doc = "2: Format C: Four partial 8-bit Standard IDs per ID Filter Table element." ] _10 , # [ doc = "3: Format D: All frames rejected." ] _11 } impl From < IDAM_A > for u8 { # [ inline ( always ) ] fn from ( variant : IDAM_A ) -> Self { match variant { IDAM_A :: _00 => 0 , IDAM_A :: _01 => 1 , IDAM_A :: _10 => 2 , IDAM_A :: _11 => 3 } } } # [ doc = "Reader of field `IDAM`" ] pub type IDAM_R = crate :: R < u8 , IDAM_A > ; impl IDAM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDAM_A { match self . bits { 0 => IDAM_A :: _00 , 1 => IDAM_A :: _01 , 2 => IDAM_A :: _10 , 3 => IDAM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == IDAM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == IDAM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == IDAM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == IDAM_A :: _11 } } # [ doc = "Write proxy for field `IDAM`" ] pub struct IDAM_W < 'a > { w : & 'a mut W , } impl < 'a > IDAM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IDAM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Format A: One full ID (standard and extended) per ID Filter Table element." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( IDAM_A :: _00 ) } # [ doc = "Format B: Two full standard IDs or two partial 14-bit (standard and extended) IDs per ID Filter Table element." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( IDAM_A :: _01 ) } # [ doc = "Format C: Four partial 8-bit Standard IDs per ID Filter Table element." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( IDAM_A :: _10 ) } # [ doc = "Format D: All frames rejected." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( IDAM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "Abort Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AEN_A { # [ doc = "0: Abort disabled." ] _0 , # [ doc = "1: Abort enabled." ] _1 } impl From < AEN_A > for bool { # [ inline ( always ) ] fn from ( variant : AEN_A ) -> Self { match variant { AEN_A :: _0 => false , AEN_A :: _1 => true } } } # [ doc = "Reader of field `AEN`" ] pub type AEN_R = crate :: R < bool , AEN_A > ; impl AEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AEN_A { match self . bits { false => AEN_A :: _0 , true => AEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AEN_A :: _1 } } # [ doc = "Write proxy for field `AEN`" ] pub struct AEN_W < 'a > { w : & 'a mut W , } impl < 'a > AEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Abort disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AEN_A :: _0 ) } # [ doc = "Abort enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AEN_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Local Priority Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPRIOEN_A { # [ doc = "0: Local Priority disabled." ] _0 , # [ doc = "1: Local Priority enabled." ] _1 } impl From < LPRIOEN_A > for bool { # [ inline ( always ) ] fn from ( variant : LPRIOEN_A ) -> Self { match variant { LPRIOEN_A :: _0 => false , LPRIOEN_A :: _1 => true } } } # [ doc = "Reader of field `LPRIOEN`" ] pub type LPRIOEN_R = crate :: R < bool , LPRIOEN_A > ; impl LPRIOEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPRIOEN_A { match self . bits { false => LPRIOEN_A :: _0 , true => LPRIOEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPRIOEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPRIOEN_A :: _1 } } # [ doc = "Write proxy for field `LPRIOEN`" ] pub struct LPRIOEN_W < 'a > { w : & 'a mut W , } impl < 'a > LPRIOEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPRIOEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Local Priority disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LPRIOEN_A :: _0 ) } # [ doc = "Local Priority enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LPRIOEN_A :: _1 ) } # [ 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 = "Individual Rx Masking And Queue Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRMQ_A { # [ doc = "0: Individual Rx masking and queue feature are disabled. For backward compatibility with legacy applications, the reading of C/S word locks the MB even if it is EMPTY." ] _0 , # [ doc = "1: Individual Rx masking and queue feature are enabled." ] _1 } impl From < IRMQ_A > for bool { # [ inline ( always ) ] fn from ( variant : IRMQ_A ) -> Self { match variant { IRMQ_A :: _0 => false , IRMQ_A :: _1 => true } } } # [ doc = "Reader of field `IRMQ`" ] pub type IRMQ_R = crate :: R < bool , IRMQ_A > ; impl IRMQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IRMQ_A { match self . bits { false => IRMQ_A :: _0 , true => IRMQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IRMQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IRMQ_A :: _1 } } # [ doc = "Write proxy for field `IRMQ`" ] pub struct IRMQ_W < 'a > { w : & 'a mut W , } impl < 'a > IRMQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRMQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Individual Rx masking and queue feature are disabled. For backward compatibility with legacy applications, the reading of C/S word locks the MB even if it is EMPTY." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IRMQ_A :: _0 ) } # [ doc = "Individual Rx masking and queue feature are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IRMQ_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Self Reception Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRXDIS_A { # [ doc = "0: Self reception enabled." ] _0 , # [ doc = "1: Self reception disabled." ] _1 } impl From < SRXDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : SRXDIS_A ) -> Self { match variant { SRXDIS_A :: _0 => false , SRXDIS_A :: _1 => true } } } # [ doc = "Reader of field `SRXDIS`" ] pub type SRXDIS_R = crate :: R < bool , SRXDIS_A > ; impl SRXDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRXDIS_A { match self . bits { false => SRXDIS_A :: _0 , true => SRXDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRXDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRXDIS_A :: _1 } } # [ doc = "Write proxy for field `SRXDIS`" ] pub struct SRXDIS_W < 'a > { w : & 'a mut W , } impl < 'a > SRXDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRXDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Self reception enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRXDIS_A :: _0 ) } # [ doc = "Self reception disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRXDIS_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Wake Up Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKSRC_A { # [ doc = "0: FlexCAN uses the unfiltered Rx input to detect recessive to dominant edges on the CAN bus." ] _0 , # [ doc = "1: FlexCAN uses the filtered Rx input to detect recessive to dominant edges on the CAN bus." ] _1 } impl From < WAKSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKSRC_A ) -> Self { match variant { WAKSRC_A :: _0 => false , WAKSRC_A :: _1 => true } } } # [ doc = "Reader of field `WAKSRC`" ] pub type WAKSRC_R = crate :: R < bool , WAKSRC_A > ; impl WAKSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKSRC_A { match self . bits { false => WAKSRC_A :: _0 , true => WAKSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKSRC_A :: _1 } } # [ doc = "Write proxy for field `WAKSRC`" ] pub struct WAKSRC_W < 'a > { w : & 'a mut W , } impl < 'a > WAKSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FlexCAN uses the unfiltered Rx input to detect recessive to dominant edges on the CAN bus." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKSRC_A :: _0 ) } # [ doc = "FlexCAN uses the filtered Rx input to detect recessive to dominant edges on the CAN bus." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKSRC_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Low-Power Mode Acknowledge\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPMACK_A { # [ doc = "0: FlexCAN is not in a low-power mode." ] _0 , # [ doc = "1: FlexCAN is in a low-power mode." ] _1 } impl From < LPMACK_A > for bool { # [ inline ( always ) ] fn from ( variant : LPMACK_A ) -> Self { match variant { LPMACK_A :: _0 => false , LPMACK_A :: _1 => true } } } # [ doc = "Reader of field `LPMACK`" ] pub type LPMACK_R = crate :: R < bool , LPMACK_A > ; impl LPMACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPMACK_A { match self . bits { false => LPMACK_A :: _0 , true => LPMACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPMACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPMACK_A :: _1 } } # [ doc = "Warning Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRNEN_A { # [ doc = "0: TWRNINT and RWRNINT bits are zero, independent of the values in the error counters." ] _0 , # [ doc = "1: TWRNINT and RWRNINT bits are set when the respective error counter transitions from less than 96 to greater than or equal to 96." ] _1 } impl From < WRNEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WRNEN_A ) -> Self { match variant { WRNEN_A :: _0 => false , WRNEN_A :: _1 => true } } } # [ doc = "Reader of field `WRNEN`" ] pub type WRNEN_R = crate :: R < bool , WRNEN_A > ; impl WRNEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WRNEN_A { match self . bits { false => WRNEN_A :: _0 , true => WRNEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WRNEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WRNEN_A :: _1 } } # [ doc = "Write proxy for field `WRNEN`" ] pub struct WRNEN_W < 'a > { w : & 'a mut W , } impl < 'a > WRNEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WRNEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TWRNINT and RWRNINT bits are zero, independent of the values in the error counters." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WRNEN_A :: _0 ) } # [ doc = "TWRNINT and RWRNINT bits are set when the respective error counter transitions from less than 96 to greater than or equal to 96." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WRNEN_A :: _1 ) } # [ 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 = "Self Wake Up\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLFWAK_A { # [ doc = "0: FlexCAN Self Wake Up feature is disabled." ] _0 , # [ doc = "1: FlexCAN Self Wake Up feature is enabled." ] _1 } impl From < SLFWAK_A > for bool { # [ inline ( always ) ] fn from ( variant : SLFWAK_A ) -> Self { match variant { SLFWAK_A :: _0 => false , SLFWAK_A :: _1 => true } } } # [ doc = "Reader of field `SLFWAK`" ] pub type SLFWAK_R = crate :: R < bool , SLFWAK_A > ; impl SLFWAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLFWAK_A { match self . bits { false => SLFWAK_A :: _0 , true => SLFWAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLFWAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLFWAK_A :: _1 } } # [ doc = "Write proxy for field `SLFWAK`" ] pub struct SLFWAK_W < 'a > { w : & 'a mut W , } impl < 'a > SLFWAK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLFWAK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FlexCAN Self Wake Up feature is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLFWAK_A :: _0 ) } # [ doc = "FlexCAN Self Wake Up feature is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLFWAK_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Supervisor Mode\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUPV_A { # [ doc = "0: FlexCAN is in User mode. Affected registers allow both Supervisor and Unrestricted accesses ." ] _0 , # [ doc = "1: FlexCAN is in Supervisor mode. Affected registers allow only Supervisor access. Unrestricted access behaves as though the access was done to an unimplemented register location ." ] _1 } impl From < SUPV_A > for bool { # [ inline ( always ) ] fn from ( variant : SUPV_A ) -> Self { match variant { SUPV_A :: _0 => false , SUPV_A :: _1 => true } } } # [ doc = "Reader of field `SUPV`" ] pub type SUPV_R = crate :: R < bool , SUPV_A > ; impl SUPV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SUPV_A { match self . bits { false => SUPV_A :: _0 , true => SUPV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SUPV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SUPV_A :: _1 } } # [ doc = "Write proxy for field `SUPV`" ] pub struct SUPV_W < 'a > { w : & 'a mut W , } impl < 'a > SUPV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SUPV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FlexCAN is in User mode. Affected registers allow both Supervisor and Unrestricted accesses ." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SUPV_A :: _0 ) } # [ doc = "FlexCAN is in Supervisor mode. Affected registers allow only Supervisor access. Unrestricted access behaves as though the access was done to an unimplemented register location ." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SUPV_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Freeze Mode Acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRZACK_A { # [ doc = "0: FlexCAN not in Freeze mode, prescaler running." ] _0 , # [ doc = "1: FlexCAN in Freeze mode, prescaler stopped." ] _1 } impl From < FRZACK_A > for bool { # [ inline ( always ) ] fn from ( variant : FRZACK_A ) -> Self { match variant { FRZACK_A :: _0 => false , FRZACK_A :: _1 => true } } } # [ doc = "Reader of field `FRZACK`" ] pub type FRZACK_R = crate :: R < bool , FRZACK_A > ; impl FRZACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRZACK_A { match self . bits { false => FRZACK_A :: _0 , true => FRZACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRZACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRZACK_A :: _1 } } # [ doc = "Soft Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SOFTRST_A { # [ doc = "0: No reset request." ] _0 , # [ doc = "1: Resets the registers affected by soft reset." ] _1 } impl From < SOFTRST_A > for bool { # [ inline ( always ) ] fn from ( variant : SOFTRST_A ) -> Self { match variant { SOFTRST_A :: _0 => false , SOFTRST_A :: _1 => true } } } # [ doc = "Reader of field `SOFTRST`" ] pub type SOFTRST_R = crate :: R < bool , SOFTRST_A > ; impl SOFTRST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SOFTRST_A { match self . bits { false => SOFTRST_A :: _0 , true => SOFTRST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SOFTRST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SOFTRST_A :: _1 } } # [ doc = "Write proxy for field `SOFTRST`" ] pub struct SOFTRST_W < 'a > { w : & 'a mut W , } impl < 'a > SOFTRST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SOFTRST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No reset request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SOFTRST_A :: _0 ) } # [ doc = "Resets the registers affected by soft reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SOFTRST_A :: _1 ) } # [ 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 = "Wake Up Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKMSK_A { # [ doc = "0: Wake Up Interrupt is disabled." ] _0 , # [ doc = "1: Wake Up Interrupt is enabled." ] _1 } impl From < WAKMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKMSK_A ) -> Self { match variant { WAKMSK_A :: _0 => false , WAKMSK_A :: _1 => true } } } # [ doc = "Reader of field `WAKMSK`" ] pub type WAKMSK_R = crate :: R < bool , WAKMSK_A > ; impl WAKMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKMSK_A { match self . bits { false => WAKMSK_A :: _0 , true => WAKMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKMSK_A :: _1 } } # [ doc = "Write proxy for field `WAKMSK`" ] pub struct WAKMSK_W < 'a > { w : & 'a mut W , } impl < 'a > WAKMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Wake Up Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKMSK_A :: _0 ) } # [ doc = "Wake Up Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKMSK_A :: _1 ) } # [ 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 = "FlexCAN Not Ready\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOTRDY_A { # [ doc = "0: FlexCAN module is either in Normal mode, Listen-Only mode or Loop-Back mode." ] _0 , # [ doc = "1: FlexCAN module is either in Disable mode , Stop mode or Freeze mode." ] _1 } impl From < NOTRDY_A > for bool { # [ inline ( always ) ] fn from ( variant : NOTRDY_A ) -> Self { match variant { NOTRDY_A :: _0 => false , NOTRDY_A :: _1 => true } } } # [ doc = "Reader of field `NOTRDY`" ] pub type NOTRDY_R = crate :: R < bool , NOTRDY_A > ; impl NOTRDY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOTRDY_A { match self . bits { false => NOTRDY_A :: _0 , true => NOTRDY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOTRDY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOTRDY_A :: _1 } } # [ doc = "Halt FlexCAN\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HALT_A { # [ doc = "0: No Freeze mode request." ] _0 , # [ doc = "1: Enters Freeze mode if the FRZ bit is asserted." ] _1 } impl From < HALT_A > for bool { # [ inline ( always ) ] fn from ( variant : HALT_A ) -> Self { match variant { HALT_A :: _0 => false , HALT_A :: _1 => true } } } # [ doc = "Reader of field `HALT`" ] pub type HALT_R = crate :: R < bool , HALT_A > ; impl HALT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HALT_A { match self . bits { false => HALT_A :: _0 , true => HALT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HALT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HALT_A :: _1 } } # [ doc = "Write proxy for field `HALT`" ] pub struct HALT_W < 'a > { w : & 'a mut W , } impl < 'a > HALT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HALT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No Freeze mode request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _0 ) } # [ doc = "Enters Freeze mode if the FRZ bit is asserted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFEN_A { # [ doc = "0: Rx FIFO not enabled." ] _0 , # [ doc = "1: Rx FIFO enabled." ] _1 } impl From < RFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : RFEN_A ) -> Self { match variant { RFEN_A :: _0 => false , RFEN_A :: _1 => true } } } # [ doc = "Reader of field `RFEN`" ] pub type RFEN_R = crate :: R < bool , RFEN_A > ; impl RFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFEN_A { match self . bits { false => RFEN_A :: _0 , true => RFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFEN_A :: _1 } } # [ doc = "Write proxy for field `RFEN`" ] pub struct RFEN_W < 'a > { w : & 'a mut W , } impl < 'a > RFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rx FIFO not enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFEN_A :: _0 ) } # [ doc = "Rx FIFO enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFEN_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Freeze Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRZ_A { # [ doc = "0: Not enabled to enter Freeze mode." ] _0 , # [ doc = "1: Enabled to enter Freeze mode." ] _1 } impl From < FRZ_A > for bool { # [ inline ( always ) ] fn from ( variant : FRZ_A ) -> Self { match variant { FRZ_A :: _0 => false , FRZ_A :: _1 => true } } } # [ doc = "Reader of field `FRZ`" ] pub type FRZ_R = crate :: R < bool , FRZ_A > ; impl FRZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRZ_A { match self . bits { false => FRZ_A :: _0 , true => FRZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRZ_A :: _1 } } # [ doc = "Write proxy for field `FRZ`" ] pub struct FRZ_W < 'a > { w : & 'a mut W , } impl < 'a > FRZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not enabled to enter Freeze mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _0 ) } # [ doc = "Enabled to enter Freeze mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Module Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MDIS_A { # [ doc = "0: Enable the FlexCAN module." ] _0 , # [ doc = "1: Disable the FlexCAN module." ] _1 } impl From < MDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : MDIS_A ) -> Self { match variant { MDIS_A :: _0 => false , MDIS_A :: _1 => true } } } # [ doc = "Reader of field `MDIS`" ] pub type MDIS_R = crate :: R < bool , MDIS_A > ; impl MDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MDIS_A { match self . bits { false => MDIS_A :: _0 , true => MDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MDIS_A :: _1 } } # [ doc = "Write proxy for field `MDIS`" ] pub struct MDIS_W < 'a > { w : & 'a mut W , } impl < 'a > MDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Enable the FlexCAN module." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _0 ) } # [ doc = "Disable the FlexCAN module." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:6 - Number Of The Last Message Buffer" ] # [ inline ( always ) ] pub fn maxmb ( & self ) -> MAXMB_R { MAXMB_R :: new ( ( self . bits & 0x7f ) as u8 ) } # [ doc = "Bits 8:9 - ID Acceptance Mode" ] # [ inline ( always ) ] pub fn idam ( & self ) -> IDAM_R { IDAM_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 12 - Abort Enable" ] # [ inline ( always ) ] pub fn aen ( & self ) -> AEN_R { AEN_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Local Priority Enable" ] # [ inline ( always ) ] pub fn lprioen ( & self ) -> LPRIOEN_R { LPRIOEN_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Individual Rx Masking And Queue Enable" ] # [ inline ( always ) ] pub fn irmq ( & self ) -> IRMQ_R { IRMQ_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Self Reception Disable" ] # [ inline ( always ) ] pub fn srxdis ( & self ) -> SRXDIS_R { SRXDIS_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Wake Up Source" ] # [ inline ( always ) ] pub fn waksrc ( & self ) -> WAKSRC_R { WAKSRC_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Low-Power Mode Acknowledge" ] # [ inline ( always ) ] pub fn lpmack ( & self ) -> LPMACK_R { LPMACK_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn wrnen ( & self ) -> WRNEN_R { WRNEN_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Self Wake Up" ] # [ inline ( always ) ] pub fn slfwak ( & self ) -> SLFWAK_R { SLFWAK_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Supervisor Mode" ] # [ inline ( always ) ] pub fn supv ( & self ) -> SUPV_R { SUPV_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Freeze Mode Acknowledge" ] # [ inline ( always ) ] pub fn frzack ( & self ) -> FRZACK_R { FRZACK_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Soft Reset" ] # [ inline ( always ) ] pub fn softrst ( & self ) -> SOFTRST_R { SOFTRST_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Wake Up Interrupt Mask" ] # [ inline ( always ) ] pub fn wakmsk ( & self ) -> WAKMSK_R { WAKMSK_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - FlexCAN Not Ready" ] # [ inline ( always ) ] pub fn notrdy ( & self ) -> NOTRDY_R { NOTRDY_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Halt FlexCAN" ] # [ inline ( always ) ] pub fn halt ( & self ) -> HALT_R { HALT_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx FIFO Enable" ] # [ inline ( always ) ] pub fn rfen ( & self ) -> RFEN_R { RFEN_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Freeze Enable" ] # [ inline ( always ) ] pub fn frz ( & self ) -> FRZ_R { FRZ_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & self ) -> MDIS_R { MDIS_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:6 - Number Of The Last Message Buffer" ] # [ inline ( always ) ] pub fn maxmb ( & mut self ) -> MAXMB_W { MAXMB_W { w : self } } # [ doc = "Bits 8:9 - ID Acceptance Mode" ] # [ inline ( always ) ] pub fn idam ( & mut self ) -> IDAM_W { IDAM_W { w : self } } # [ doc = "Bit 12 - Abort Enable" ] # [ inline ( always ) ] pub fn aen ( & mut self ) -> AEN_W { AEN_W { w : self } } # [ doc = "Bit 13 - Local Priority Enable" ] # [ inline ( always ) ] pub fn lprioen ( & mut self ) -> LPRIOEN_W { LPRIOEN_W { w : self } } # [ doc = "Bit 16 - Individual Rx Masking And Queue Enable" ] # [ inline ( always ) ] pub fn irmq ( & mut self ) -> IRMQ_W { IRMQ_W { w : self } } # [ doc = "Bit 17 - Self Reception Disable" ] # [ inline ( always ) ] pub fn srxdis ( & mut self ) -> SRXDIS_W { SRXDIS_W { w : self } } # [ doc = "Bit 19 - Wake Up Source" ] # [ inline ( always ) ] pub fn waksrc ( & mut self ) -> WAKSRC_W { WAKSRC_W { w : self } } # [ doc = "Bit 21 - Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn wrnen ( & mut self ) -> WRNEN_W { WRNEN_W { w : self } } # [ doc = "Bit 22 - Self Wake Up" ] # [ inline ( always ) ] pub fn slfwak ( & mut self ) -> SLFWAK_W { SLFWAK_W { w : self } } # [ doc = "Bit 23 - Supervisor Mode" ] # [ inline ( always ) ] pub fn supv ( & mut self ) -> SUPV_W { SUPV_W { w : self } } # [ doc = "Bit 25 - Soft Reset" ] # [ inline ( always ) ] pub fn softrst ( & mut self ) -> SOFTRST_W { SOFTRST_W { w : self } } # [ doc = "Bit 26 - Wake Up Interrupt Mask" ] # [ inline ( always ) ] pub fn wakmsk ( & mut self ) -> WAKMSK_W { WAKMSK_W { w : self } } # [ doc = "Bit 28 - Halt FlexCAN" ] # [ inline ( always ) ] pub fn halt ( & mut self ) -> HALT_W { HALT_W { w : self } } # [ doc = "Bit 29 - Rx FIFO Enable" ] # [ inline ( always ) ] pub fn rfen ( & mut self ) -> RFEN_W { RFEN_W { w : self } } # [ doc = "Bit 30 - Freeze Enable" ] # [ inline ( always ) ] pub fn frz ( & mut self ) -> FRZ_W { FRZ_W { w : self } } # [ doc = "Bit 31 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & mut self ) -> MDIS_W { MDIS_W { w : self } } } } # [ doc = "Control 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl1](ctrl1) module" ] pub type CTRL1 = crate :: Reg < u32 , _CTRL1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL1 ; # [ doc = "`read()` method returns [ctrl1::R](ctrl1::R) reader structure" ] impl crate :: Readable for CTRL1 { } # [ doc = "`write(|w| ..)` method takes [ctrl1::W](ctrl1::W) writer structure" ] impl crate :: Writable for CTRL1 { } # [ doc = "Control 1 register" ] pub mod ctrl1 { # [ doc = "Reader of register CTRL1" ] pub type R = crate :: R < u32 , super :: CTRL1 > ; # [ doc = "Writer for register CTRL1" ] pub type W = crate :: W < u32 , super :: CTRL1 > ; # [ doc = "Register CTRL1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CTRL1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PROPSEG`" ] pub type PROPSEG_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PROPSEG`" ] pub struct PROPSEG_W < 'a > { w : & 'a mut W , } impl < 'a > PROPSEG_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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Listen-Only Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOM_A { # [ doc = "0: Listen-Only mode is deactivated." ] _0 , # [ doc = "1: FlexCAN module operates in Listen-Only mode." ] _1 } impl From < LOM_A > for bool { # [ inline ( always ) ] fn from ( variant : LOM_A ) -> Self { match variant { LOM_A :: _0 => false , LOM_A :: _1 => true } } } # [ doc = "Reader of field `LOM`" ] pub type LOM_R = crate :: R < bool , LOM_A > ; impl LOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOM_A { match self . bits { false => LOM_A :: _0 , true => LOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOM_A :: _1 } } # [ doc = "Write proxy for field `LOM`" ] pub struct LOM_W < 'a > { w : & 'a mut W , } impl < 'a > LOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Listen-Only mode is deactivated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOM_A :: _0 ) } # [ doc = "FlexCAN module operates in Listen-Only mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Lowest Buffer Transmitted First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBUF_A { # [ doc = "0: Buffer with highest priority is transmitted first." ] _0 , # [ doc = "1: Lowest number buffer is transmitted first." ] _1 } impl From < LBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : LBUF_A ) -> Self { match variant { LBUF_A :: _0 => false , LBUF_A :: _1 => true } } } # [ doc = "Reader of field `LBUF`" ] pub type LBUF_R = crate :: R < bool , LBUF_A > ; impl LBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBUF_A { match self . bits { false => LBUF_A :: _0 , true => LBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBUF_A :: _1 } } # [ doc = "Write proxy for field `LBUF`" ] pub struct LBUF_W < 'a > { w : & 'a mut W , } impl < 'a > LBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Buffer with highest priority is transmitted first." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBUF_A :: _0 ) } # [ doc = "Lowest number buffer is transmitted first." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBUF_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Timer Sync\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSYN_A { # [ doc = "0: Timer Sync feature disabled" ] _0 , # [ doc = "1: Timer Sync feature enabled" ] _1 } impl From < TSYN_A > for bool { # [ inline ( always ) ] fn from ( variant : TSYN_A ) -> Self { match variant { TSYN_A :: _0 => false , TSYN_A :: _1 => true } } } # [ doc = "Reader of field `TSYN`" ] pub type TSYN_R = crate :: R < bool , TSYN_A > ; impl TSYN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSYN_A { match self . bits { false => TSYN_A :: _0 , true => TSYN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TSYN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TSYN_A :: _1 } } # [ doc = "Write proxy for field `TSYN`" ] pub struct TSYN_W < 'a > { w : & 'a mut W , } impl < 'a > TSYN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSYN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer Sync feature disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TSYN_A :: _0 ) } # [ doc = "Timer Sync feature enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TSYN_A :: _1 ) } # [ 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 = "Bus Off Recovery\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOFFREC_A { # [ doc = "0: Automatic recovering from Bus Off state enabled, according to CAN Spec 2.0 part B." ] _0 , # [ doc = "1: Automatic recovering from Bus Off state disabled." ] _1 } impl From < BOFFREC_A > for bool { # [ inline ( always ) ] fn from ( variant : BOFFREC_A ) -> Self { match variant { BOFFREC_A :: _0 => false , BOFFREC_A :: _1 => true } } } # [ doc = "Reader of field `BOFFREC`" ] pub type BOFFREC_R = crate :: R < bool , BOFFREC_A > ; impl BOFFREC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOFFREC_A { match self . bits { false => BOFFREC_A :: _0 , true => BOFFREC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOFFREC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOFFREC_A :: _1 } } # [ doc = "Write proxy for field `BOFFREC`" ] pub struct BOFFREC_W < 'a > { w : & 'a mut W , } impl < 'a > BOFFREC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOFFREC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Automatic recovering from Bus Off state enabled, according to CAN Spec 2.0 part B." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOFFREC_A :: _0 ) } # [ doc = "Automatic recovering from Bus Off state disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOFFREC_A :: _1 ) } # [ 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 = "CAN Bit Sampling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMP_A { # [ doc = "0: Just one sample is used to determine the bit value." ] _0 , # [ doc = "1: Three samples are used to determine the value of the received bit: the regular one (sample point) and 2 preceding samples; a majority rule is used." ] _1 } impl From < SMP_A > for bool { # [ inline ( always ) ] fn from ( variant : SMP_A ) -> Self { match variant { SMP_A :: _0 => false , SMP_A :: _1 => true } } } # [ doc = "Reader of field `SMP`" ] pub type SMP_R = crate :: R < bool , SMP_A > ; impl SMP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SMP_A { match self . bits { false => SMP_A :: _0 , true => SMP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SMP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SMP_A :: _1 } } # [ doc = "Write proxy for field `SMP`" ] pub struct SMP_W < 'a > { w : & 'a mut W , } impl < 'a > SMP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Just one sample is used to determine the bit value." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SMP_A :: _0 ) } # [ doc = "Three samples are used to determine the value of the received bit: the regular one (sample point) and 2 preceding samples; a majority rule is used." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SMP_A :: _1 ) } # [ 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 = "Rx Warning Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWRNMSK_A { # [ doc = "0: Rx Warning Interrupt disabled." ] _0 , # [ doc = "1: Rx Warning Interrupt enabled." ] _1 } impl From < RWRNMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : RWRNMSK_A ) -> Self { match variant { RWRNMSK_A :: _0 => false , RWRNMSK_A :: _1 => true } } } # [ doc = "Reader of field `RWRNMSK`" ] pub type RWRNMSK_R = crate :: R < bool , RWRNMSK_A > ; impl RWRNMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWRNMSK_A { match self . bits { false => RWRNMSK_A :: _0 , true => RWRNMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWRNMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWRNMSK_A :: _1 } } # [ doc = "Write proxy for field `RWRNMSK`" ] pub struct RWRNMSK_W < 'a > { w : & 'a mut W , } impl < 'a > RWRNMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWRNMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rx Warning Interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWRNMSK_A :: _0 ) } # [ doc = "Rx Warning Interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWRNMSK_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Tx Warning Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWRNMSK_A { # [ doc = "0: Tx Warning Interrupt disabled." ] _0 , # [ doc = "1: Tx Warning Interrupt enabled." ] _1 } impl From < TWRNMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : TWRNMSK_A ) -> Self { match variant { TWRNMSK_A :: _0 => false , TWRNMSK_A :: _1 => true } } } # [ doc = "Reader of field `TWRNMSK`" ] pub type TWRNMSK_R = crate :: R < bool , TWRNMSK_A > ; impl TWRNMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWRNMSK_A { match self . bits { false => TWRNMSK_A :: _0 , true => TWRNMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWRNMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWRNMSK_A :: _1 } } # [ doc = "Write proxy for field `TWRNMSK`" ] pub struct TWRNMSK_W < 'a > { w : & 'a mut W , } impl < 'a > TWRNMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWRNMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Tx Warning Interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWRNMSK_A :: _0 ) } # [ doc = "Tx Warning Interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWRNMSK_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Loop Back Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPB_A { # [ doc = "0: Loop Back disabled." ] _0 , # [ doc = "1: Loop Back enabled." ] _1 } impl From < LPB_A > for bool { # [ inline ( always ) ] fn from ( variant : LPB_A ) -> Self { match variant { LPB_A :: _0 => false , LPB_A :: _1 => true } } } # [ doc = "Reader of field `LPB`" ] pub type LPB_R = crate :: R < bool , LPB_A > ; impl LPB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPB_A { match self . bits { false => LPB_A :: _0 , true => LPB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPB_A :: _1 } } # [ doc = "Write proxy for field `LPB`" ] pub struct LPB_W < 'a > { w : & 'a mut W , } impl < 'a > LPB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPB_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loop Back disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LPB_A :: _0 ) } # [ doc = "Loop Back enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LPB_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "CAN Engine Clock Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKSRC_A { # [ doc = "0: The CAN engine clock source is the oscillator clock. Under this condition, the oscillator clock frequency must be lower than the bus clock." ] _0 , # [ doc = "1: The CAN engine clock source is the peripheral clock." ] _1 } impl From < CLKSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : CLKSRC_A ) -> Self { match variant { CLKSRC_A :: _0 => false , CLKSRC_A :: _1 => true } } } # [ doc = "Reader of field `CLKSRC`" ] pub type CLKSRC_R = crate :: R < bool , CLKSRC_A > ; impl CLKSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKSRC_A { match self . bits { false => CLKSRC_A :: _0 , true => CLKSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLKSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLKSRC_A :: _1 } } # [ doc = "Write proxy for field `CLKSRC`" ] pub struct CLKSRC_W < 'a > { w : & 'a mut W , } impl < 'a > CLKSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The CAN engine clock source is the oscillator clock. Under this condition, the oscillator clock frequency must be lower than the bus clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLKSRC_A :: _0 ) } # [ doc = "The CAN engine clock source is the peripheral clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLKSRC_A :: _1 ) } # [ 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 = "Error Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRMSK_A { # [ doc = "0: Error interrupt disabled." ] _0 , # [ doc = "1: Error interrupt enabled." ] _1 } impl From < ERRMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : ERRMSK_A ) -> Self { match variant { ERRMSK_A :: _0 => false , ERRMSK_A :: _1 => true } } } # [ doc = "Reader of field `ERRMSK`" ] pub type ERRMSK_R = crate :: R < bool , ERRMSK_A > ; impl ERRMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERRMSK_A { match self . bits { false => ERRMSK_A :: _0 , true => ERRMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERRMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERRMSK_A :: _1 } } # [ doc = "Write proxy for field `ERRMSK`" ] pub struct ERRMSK_W < 'a > { w : & 'a mut W , } impl < 'a > ERRMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERRMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Error interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERRMSK_A :: _0 ) } # [ doc = "Error interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERRMSK_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Bus Off Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOFFMSK_A { # [ doc = "0: Bus Off interrupt disabled." ] _0 , # [ doc = "1: Bus Off interrupt enabled." ] _1 } impl From < BOFFMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : BOFFMSK_A ) -> Self { match variant { BOFFMSK_A :: _0 => false , BOFFMSK_A :: _1 => true } } } # [ doc = "Reader of field `BOFFMSK`" ] pub type BOFFMSK_R = crate :: R < bool , BOFFMSK_A > ; impl BOFFMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOFFMSK_A { match self . bits { false => BOFFMSK_A :: _0 , true => BOFFMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOFFMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOFFMSK_A :: _1 } } # [ doc = "Write proxy for field `BOFFMSK`" ] pub struct BOFFMSK_W < 'a > { w : & 'a mut W , } impl < 'a > BOFFMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOFFMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus Off interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOFFMSK_A :: _0 ) } # [ doc = "Bus Off interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOFFMSK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `PSEG2`" ] pub type PSEG2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PSEG2`" ] pub struct PSEG2_W < 'a > { w : & 'a mut W , } impl < 'a > PSEG2_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 << 16 ) ) | ( ( ( value as u32 ) & 0x07 ) << 16 ) ; self . w } } # [ doc = "Reader of field `PSEG1`" ] pub type PSEG1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PSEG1`" ] pub struct PSEG1_W < 'a > { w : & 'a mut W , } impl < 'a > PSEG1_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 << 19 ) ) | ( ( ( value as u32 ) & 0x07 ) << 19 ) ; self . w } } # [ doc = "Reader of field `RJW`" ] pub type RJW_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RJW`" ] pub struct RJW_W < 'a > { w : & 'a mut W , } impl < 'a > RJW_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 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } # [ doc = "Reader of field `PRESDIV`" ] pub type PRESDIV_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRESDIV`" ] pub struct PRESDIV_W < 'a > { w : & 'a mut W , } impl < 'a > PRESDIV_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Propagation Segment" ] # [ inline ( always ) ] pub fn propseg ( & self ) -> PROPSEG_R { PROPSEG_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Listen-Only Mode" ] # [ inline ( always ) ] pub fn lom ( & self ) -> LOM_R { LOM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Lowest Buffer Transmitted First" ] # [ inline ( always ) ] pub fn lbuf ( & self ) -> LBUF_R { LBUF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Timer Sync" ] # [ inline ( always ) ] pub fn tsyn ( & self ) -> TSYN_R { TSYN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Bus Off Recovery" ] # [ inline ( always ) ] pub fn boffrec ( & self ) -> BOFFREC_R { BOFFREC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - CAN Bit Sampling" ] # [ inline ( always ) ] pub fn smp ( & self ) -> SMP_R { SMP_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx Warning Interrupt Mask" ] # [ inline ( always ) ] pub fn rwrnmsk ( & self ) -> RWRNMSK_R { RWRNMSK_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Tx Warning Interrupt Mask" ] # [ inline ( always ) ] pub fn twrnmsk ( & self ) -> TWRNMSK_R { TWRNMSK_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Loop Back Mode" ] # [ inline ( always ) ] pub fn lpb ( & self ) -> LPB_R { LPB_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - CAN Engine Clock Source" ] # [ inline ( always ) ] pub fn clksrc ( & self ) -> CLKSRC_R { CLKSRC_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Error Mask" ] # [ inline ( always ) ] pub fn errmsk ( & self ) -> ERRMSK_R { ERRMSK_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Bus Off Mask" ] # [ inline ( always ) ] pub fn boffmsk ( & self ) -> BOFFMSK_R { BOFFMSK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:18 - Phase Segment 2" ] # [ inline ( always ) ] pub fn pseg2 ( & self ) -> PSEG2_R { PSEG2_R :: new ( ( ( self . bits >> 16 ) & 0x07 ) as u8 ) } # [ doc = "Bits 19:21 - Phase Segment 1" ] # [ inline ( always ) ] pub fn pseg1 ( & self ) -> PSEG1_R { PSEG1_R :: new ( ( ( self . bits >> 19 ) & 0x07 ) as u8 ) } # [ doc = "Bits 22:23 - Resync Jump Width" ] # [ inline ( always ) ] pub fn rjw ( & self ) -> RJW_R { RJW_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } # [ doc = "Bits 24:31 - Prescaler Division Factor" ] # [ inline ( always ) ] pub fn presdiv ( & self ) -> PRESDIV_R { PRESDIV_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Propagation Segment" ] # [ inline ( always ) ] pub fn propseg ( & mut self ) -> PROPSEG_W { PROPSEG_W { w : self } } # [ doc = "Bit 3 - Listen-Only Mode" ] # [ inline ( always ) ] pub fn lom ( & mut self ) -> LOM_W { LOM_W { w : self } } # [ doc = "Bit 4 - Lowest Buffer Transmitted First" ] # [ inline ( always ) ] pub fn lbuf ( & mut self ) -> LBUF_W { LBUF_W { w : self } } # [ doc = "Bit 5 - Timer Sync" ] # [ inline ( always ) ] pub fn tsyn ( & mut self ) -> TSYN_W { TSYN_W { w : self } } # [ doc = "Bit 6 - Bus Off Recovery" ] # [ inline ( always ) ] pub fn boffrec ( & mut self ) -> BOFFREC_W { BOFFREC_W { w : self } } # [ doc = "Bit 7 - CAN Bit Sampling" ] # [ inline ( always ) ] pub fn smp ( & mut self ) -> SMP_W { SMP_W { w : self } } # [ doc = "Bit 10 - Rx Warning Interrupt Mask" ] # [ inline ( always ) ] pub fn rwrnmsk ( & mut self ) -> RWRNMSK_W { RWRNMSK_W { w : self } } # [ doc = "Bit 11 - Tx Warning Interrupt Mask" ] # [ inline ( always ) ] pub fn twrnmsk ( & mut self ) -> TWRNMSK_W { TWRNMSK_W { w : self } } # [ doc = "Bit 12 - Loop Back Mode" ] # [ inline ( always ) ] pub fn lpb ( & mut self ) -> LPB_W { LPB_W { w : self } } # [ doc = "Bit 13 - CAN Engine Clock Source" ] # [ inline ( always ) ] pub fn clksrc ( & mut self ) -> CLKSRC_W { CLKSRC_W { w : self } } # [ doc = "Bit 14 - Error Mask" ] # [ inline ( always ) ] pub fn errmsk ( & mut self ) -> ERRMSK_W { ERRMSK_W { w : self } } # [ doc = "Bit 15 - Bus Off Mask" ] # [ inline ( always ) ] pub fn boffmsk ( & mut self ) -> BOFFMSK_W { BOFFMSK_W { w : self } } # [ doc = "Bits 16:18 - Phase Segment 2" ] # [ inline ( always ) ] pub fn pseg2 ( & mut self ) -> PSEG2_W { PSEG2_W { w : self } } # [ doc = "Bits 19:21 - Phase Segment 1" ] # [ inline ( always ) ] pub fn pseg1 ( & mut self ) -> PSEG1_W { PSEG1_W { w : self } } # [ doc = "Bits 22:23 - Resync Jump Width" ] # [ inline ( always ) ] pub fn rjw ( & mut self ) -> RJW_W { RJW_W { w : self } } # [ doc = "Bits 24:31 - Prescaler Division Factor" ] # [ inline ( always ) ] pub fn presdiv ( & mut self ) -> PRESDIV_W { PRESDIV_W { w : self } } } } # [ doc = "Free Running Timer\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer](timer) module" ] pub type TIMER = crate :: Reg < u32 , _TIMER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER ; # [ doc = "`read()` method returns [timer::R](timer::R) reader structure" ] impl crate :: Readable for TIMER { } # [ doc = "`write(|w| ..)` method takes [timer::W](timer::W) writer structure" ] impl crate :: Writable for TIMER { } # [ doc = "Free Running Timer" ] pub mod timer { # [ doc = "Reader of register TIMER" ] pub type R = crate :: R < u32 , super :: TIMER > ; # [ doc = "Writer for register TIMER" ] pub type W = crate :: W < u32 , super :: TIMER > ; # [ doc = "Register TIMER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TIMER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIMER`" ] pub type TIMER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIMER`" ] pub struct TIMER_W < 'a > { w : & 'a mut W , } impl < 'a > TIMER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Timer Value" ] # [ inline ( always ) ] pub fn timer ( & self ) -> TIMER_R { TIMER_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Timer Value" ] # [ inline ( always ) ] pub fn timer ( & mut self ) -> TIMER_W { TIMER_W { w : self } } } } # [ doc = "Rx Mailboxes Global Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxmgmask](rxmgmask) module" ] pub type RXMGMASK = crate :: Reg < u32 , _RXMGMASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXMGMASK ; # [ doc = "`read()` method returns [rxmgmask::R](rxmgmask::R) reader structure" ] impl crate :: Readable for RXMGMASK { } # [ doc = "`write(|w| ..)` method takes [rxmgmask::W](rxmgmask::W) writer structure" ] impl crate :: Writable for RXMGMASK { } # [ doc = "Rx Mailboxes Global Mask Register" ] pub mod rxmgmask { # [ doc = "Reader of register RXMGMASK" ] pub type R = crate :: R < u32 , super :: RXMGMASK > ; # [ doc = "Writer for register RXMGMASK" ] pub type W = crate :: W < u32 , super :: RXMGMASK > ; # [ doc = "Register RXMGMASK `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RXMGMASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG0_A > for bool { # [ inline ( always ) ] fn from ( variant : MG0_A ) -> Self { match variant { MG0_A :: _0 => false , MG0_A :: _1 => true } } } # [ doc = "Reader of field `MG0`" ] pub type MG0_R = crate :: R < bool , MG0_A > ; impl MG0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG0_A { match self . bits { false => MG0_A :: _0 , true => MG0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG0_A :: _1 } } # [ doc = "Write proxy for field `MG0`" ] pub struct MG0_W < 'a > { w : & 'a mut W , } impl < 'a > MG0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG1_A > for bool { # [ inline ( always ) ] fn from ( variant : MG1_A ) -> Self { match variant { MG1_A :: _0 => false , MG1_A :: _1 => true } } } # [ doc = "Reader of field `MG1`" ] pub type MG1_R = crate :: R < bool , MG1_A > ; impl MG1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG1_A { match self . bits { false => MG1_A :: _0 , true => MG1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG1_A :: _1 } } # [ doc = "Write proxy for field `MG1`" ] pub struct MG1_W < 'a > { w : & 'a mut W , } impl < 'a > MG1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG1_A :: _1 ) } # [ 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 } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG2_A > for bool { # [ inline ( always ) ] fn from ( variant : MG2_A ) -> Self { match variant { MG2_A :: _0 => false , MG2_A :: _1 => true } } } # [ doc = "Reader of field `MG2`" ] pub type MG2_R = crate :: R < bool , MG2_A > ; impl MG2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG2_A { match self . bits { false => MG2_A :: _0 , true => MG2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG2_A :: _1 } } # [ doc = "Write proxy for field `MG2`" ] pub struct MG2_W < 'a > { w : & 'a mut W , } impl < 'a > MG2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG2_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG3_A > for bool { # [ inline ( always ) ] fn from ( variant : MG3_A ) -> Self { match variant { MG3_A :: _0 => false , MG3_A :: _1 => true } } } # [ doc = "Reader of field `MG3`" ] pub type MG3_R = crate :: R < bool , MG3_A > ; impl MG3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG3_A { match self . bits { false => MG3_A :: _0 , true => MG3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG3_A :: _1 } } # [ doc = "Write proxy for field `MG3`" ] pub struct MG3_W < 'a > { w : & 'a mut W , } impl < 'a > MG3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG4_A > for bool { # [ inline ( always ) ] fn from ( variant : MG4_A ) -> Self { match variant { MG4_A :: _0 => false , MG4_A :: _1 => true } } } # [ doc = "Reader of field `MG4`" ] pub type MG4_R = crate :: R < bool , MG4_A > ; impl MG4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG4_A { match self . bits { false => MG4_A :: _0 , true => MG4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG4_A :: _1 } } # [ doc = "Write proxy for field `MG4`" ] pub struct MG4_W < 'a > { w : & 'a mut W , } impl < 'a > MG4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG5_A > for bool { # [ inline ( always ) ] fn from ( variant : MG5_A ) -> Self { match variant { MG5_A :: _0 => false , MG5_A :: _1 => true } } } # [ doc = "Reader of field `MG5`" ] pub type MG5_R = crate :: R < bool , MG5_A > ; impl MG5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG5_A { match self . bits { false => MG5_A :: _0 , true => MG5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG5_A :: _1 } } # [ doc = "Write proxy for field `MG5`" ] pub struct MG5_W < 'a > { w : & 'a mut W , } impl < 'a > MG5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG5_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG6_A > for bool { # [ inline ( always ) ] fn from ( variant : MG6_A ) -> Self { match variant { MG6_A :: _0 => false , MG6_A :: _1 => true } } } # [ doc = "Reader of field `MG6`" ] pub type MG6_R = crate :: R < bool , MG6_A > ; impl MG6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG6_A { match self . bits { false => MG6_A :: _0 , true => MG6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG6_A :: _1 } } # [ doc = "Write proxy for field `MG6`" ] pub struct MG6_W < 'a > { w : & 'a mut W , } impl < 'a > MG6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG6_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG7_A > for bool { # [ inline ( always ) ] fn from ( variant : MG7_A ) -> Self { match variant { MG7_A :: _0 => false , MG7_A :: _1 => true } } } # [ doc = "Reader of field `MG7`" ] pub type MG7_R = crate :: R < bool , MG7_A > ; impl MG7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG7_A { match self . bits { false => MG7_A :: _0 , true => MG7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG7_A :: _1 } } # [ doc = "Write proxy for field `MG7`" ] pub struct MG7_W < 'a > { w : & 'a mut W , } impl < 'a > MG7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG7_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG8_A > for bool { # [ inline ( always ) ] fn from ( variant : MG8_A ) -> Self { match variant { MG8_A :: _0 => false , MG8_A :: _1 => true } } } # [ doc = "Reader of field `MG8`" ] pub type MG8_R = crate :: R < bool , MG8_A > ; impl MG8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG8_A { match self . bits { false => MG8_A :: _0 , true => MG8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG8_A :: _1 } } # [ doc = "Write proxy for field `MG8`" ] pub struct MG8_W < 'a > { w : & 'a mut W , } impl < 'a > MG8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG9_A > for bool { # [ inline ( always ) ] fn from ( variant : MG9_A ) -> Self { match variant { MG9_A :: _0 => false , MG9_A :: _1 => true } } } # [ doc = "Reader of field `MG9`" ] pub type MG9_R = crate :: R < bool , MG9_A > ; impl MG9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG9_A { match self . bits { false => MG9_A :: _0 , true => MG9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG9_A :: _1 } } # [ doc = "Write proxy for field `MG9`" ] pub struct MG9_W < 'a > { w : & 'a mut W , } impl < 'a > MG9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG10_A > for bool { # [ inline ( always ) ] fn from ( variant : MG10_A ) -> Self { match variant { MG10_A :: _0 => false , MG10_A :: _1 => true } } } # [ doc = "Reader of field `MG10`" ] pub type MG10_R = crate :: R < bool , MG10_A > ; impl MG10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG10_A { match self . bits { false => MG10_A :: _0 , true => MG10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG10_A :: _1 } } # [ doc = "Write proxy for field `MG10`" ] pub struct MG10_W < 'a > { w : & 'a mut W , } impl < 'a > MG10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG11_A > for bool { # [ inline ( always ) ] fn from ( variant : MG11_A ) -> Self { match variant { MG11_A :: _0 => false , MG11_A :: _1 => true } } } # [ doc = "Reader of field `MG11`" ] pub type MG11_R = crate :: R < bool , MG11_A > ; impl MG11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG11_A { match self . bits { false => MG11_A :: _0 , true => MG11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG11_A :: _1 } } # [ doc = "Write proxy for field `MG11`" ] pub struct MG11_W < 'a > { w : & 'a mut W , } impl < 'a > MG11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG12_A > for bool { # [ inline ( always ) ] fn from ( variant : MG12_A ) -> Self { match variant { MG12_A :: _0 => false , MG12_A :: _1 => true } } } # [ doc = "Reader of field `MG12`" ] pub type MG12_R = crate :: R < bool , MG12_A > ; impl MG12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG12_A { match self . bits { false => MG12_A :: _0 , true => MG12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG12_A :: _1 } } # [ doc = "Write proxy for field `MG12`" ] pub struct MG12_W < 'a > { w : & 'a mut W , } impl < 'a > MG12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG13_A > for bool { # [ inline ( always ) ] fn from ( variant : MG13_A ) -> Self { match variant { MG13_A :: _0 => false , MG13_A :: _1 => true } } } # [ doc = "Reader of field `MG13`" ] pub type MG13_R = crate :: R < bool , MG13_A > ; impl MG13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG13_A { match self . bits { false => MG13_A :: _0 , true => MG13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG13_A :: _1 } } # [ doc = "Write proxy for field `MG13`" ] pub struct MG13_W < 'a > { w : & 'a mut W , } impl < 'a > MG13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG13_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG14_A > for bool { # [ inline ( always ) ] fn from ( variant : MG14_A ) -> Self { match variant { MG14_A :: _0 => false , MG14_A :: _1 => true } } } # [ doc = "Reader of field `MG14`" ] pub type MG14_R = crate :: R < bool , MG14_A > ; impl MG14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG14_A { match self . bits { false => MG14_A :: _0 , true => MG14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG14_A :: _1 } } # [ doc = "Write proxy for field `MG14`" ] pub struct MG14_W < 'a > { w : & 'a mut W , } impl < 'a > MG14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG15_A > for bool { # [ inline ( always ) ] fn from ( variant : MG15_A ) -> Self { match variant { MG15_A :: _0 => false , MG15_A :: _1 => true } } } # [ doc = "Reader of field `MG15`" ] pub type MG15_R = crate :: R < bool , MG15_A > ; impl MG15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG15_A { match self . bits { false => MG15_A :: _0 , true => MG15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG15_A :: _1 } } # [ doc = "Write proxy for field `MG15`" ] pub struct MG15_W < 'a > { w : & 'a mut W , } impl < 'a > MG15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG16_A > for bool { # [ inline ( always ) ] fn from ( variant : MG16_A ) -> Self { match variant { MG16_A :: _0 => false , MG16_A :: _1 => true } } } # [ doc = "Reader of field `MG16`" ] pub type MG16_R = crate :: R < bool , MG16_A > ; impl MG16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG16_A { match self . bits { false => MG16_A :: _0 , true => MG16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG16_A :: _1 } } # [ doc = "Write proxy for field `MG16`" ] pub struct MG16_W < 'a > { w : & 'a mut W , } impl < 'a > MG16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG17_A > for bool { # [ inline ( always ) ] fn from ( variant : MG17_A ) -> Self { match variant { MG17_A :: _0 => false , MG17_A :: _1 => true } } } # [ doc = "Reader of field `MG17`" ] pub type MG17_R = crate :: R < bool , MG17_A > ; impl MG17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG17_A { match self . bits { false => MG17_A :: _0 , true => MG17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG17_A :: _1 } } # [ doc = "Write proxy for field `MG17`" ] pub struct MG17_W < 'a > { w : & 'a mut W , } impl < 'a > MG17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG18_A > for bool { # [ inline ( always ) ] fn from ( variant : MG18_A ) -> Self { match variant { MG18_A :: _0 => false , MG18_A :: _1 => true } } } # [ doc = "Reader of field `MG18`" ] pub type MG18_R = crate :: R < bool , MG18_A > ; impl MG18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG18_A { match self . bits { false => MG18_A :: _0 , true => MG18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG18_A :: _1 } } # [ doc = "Write proxy for field `MG18`" ] pub struct MG18_W < 'a > { w : & 'a mut W , } impl < 'a > MG18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG19_A > for bool { # [ inline ( always ) ] fn from ( variant : MG19_A ) -> Self { match variant { MG19_A :: _0 => false , MG19_A :: _1 => true } } } # [ doc = "Reader of field `MG19`" ] pub type MG19_R = crate :: R < bool , MG19_A > ; impl MG19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG19_A { match self . bits { false => MG19_A :: _0 , true => MG19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG19_A :: _1 } } # [ doc = "Write proxy for field `MG19`" ] pub struct MG19_W < 'a > { w : & 'a mut W , } impl < 'a > MG19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG20_A > for bool { # [ inline ( always ) ] fn from ( variant : MG20_A ) -> Self { match variant { MG20_A :: _0 => false , MG20_A :: _1 => true } } } # [ doc = "Reader of field `MG20`" ] pub type MG20_R = crate :: R < bool , MG20_A > ; impl MG20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG20_A { match self . bits { false => MG20_A :: _0 , true => MG20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG20_A :: _1 } } # [ doc = "Write proxy for field `MG20`" ] pub struct MG20_W < 'a > { w : & 'a mut W , } impl < 'a > MG20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG20_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG21_A > for bool { # [ inline ( always ) ] fn from ( variant : MG21_A ) -> Self { match variant { MG21_A :: _0 => false , MG21_A :: _1 => true } } } # [ doc = "Reader of field `MG21`" ] pub type MG21_R = crate :: R < bool , MG21_A > ; impl MG21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG21_A { match self . bits { false => MG21_A :: _0 , true => MG21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG21_A :: _1 } } # [ doc = "Write proxy for field `MG21`" ] pub struct MG21_W < 'a > { w : & 'a mut W , } impl < 'a > MG21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG21_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG22_A > for bool { # [ inline ( always ) ] fn from ( variant : MG22_A ) -> Self { match variant { MG22_A :: _0 => false , MG22_A :: _1 => true } } } # [ doc = "Reader of field `MG22`" ] pub type MG22_R = crate :: R < bool , MG22_A > ; impl MG22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG22_A { match self . bits { false => MG22_A :: _0 , true => MG22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG22_A :: _1 } } # [ doc = "Write proxy for field `MG22`" ] pub struct MG22_W < 'a > { w : & 'a mut W , } impl < 'a > MG22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG23_A > for bool { # [ inline ( always ) ] fn from ( variant : MG23_A ) -> Self { match variant { MG23_A :: _0 => false , MG23_A :: _1 => true } } } # [ doc = "Reader of field `MG23`" ] pub type MG23_R = crate :: R < bool , MG23_A > ; impl MG23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG23_A { match self . bits { false => MG23_A :: _0 , true => MG23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG23_A :: _1 } } # [ doc = "Write proxy for field `MG23`" ] pub struct MG23_W < 'a > { w : & 'a mut W , } impl < 'a > MG23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG24_A > for bool { # [ inline ( always ) ] fn from ( variant : MG24_A ) -> Self { match variant { MG24_A :: _0 => false , MG24_A :: _1 => true } } } # [ doc = "Reader of field `MG24`" ] pub type MG24_R = crate :: R < bool , MG24_A > ; impl MG24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG24_A { match self . bits { false => MG24_A :: _0 , true => MG24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG24_A :: _1 } } # [ doc = "Write proxy for field `MG24`" ] pub struct MG24_W < 'a > { w : & 'a mut W , } impl < 'a > MG24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG24_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG25_A > for bool { # [ inline ( always ) ] fn from ( variant : MG25_A ) -> Self { match variant { MG25_A :: _0 => false , MG25_A :: _1 => true } } } # [ doc = "Reader of field `MG25`" ] pub type MG25_R = crate :: R < bool , MG25_A > ; impl MG25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG25_A { match self . bits { false => MG25_A :: _0 , true => MG25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG25_A :: _1 } } # [ doc = "Write proxy for field `MG25`" ] pub struct MG25_W < 'a > { w : & 'a mut W , } impl < 'a > MG25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG25_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG26_A > for bool { # [ inline ( always ) ] fn from ( variant : MG26_A ) -> Self { match variant { MG26_A :: _0 => false , MG26_A :: _1 => true } } } # [ doc = "Reader of field `MG26`" ] pub type MG26_R = crate :: R < bool , MG26_A > ; impl MG26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG26_A { match self . bits { false => MG26_A :: _0 , true => MG26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG26_A :: _1 } } # [ doc = "Write proxy for field `MG26`" ] pub struct MG26_W < 'a > { w : & 'a mut W , } impl < 'a > MG26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG26_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG27_A > for bool { # [ inline ( always ) ] fn from ( variant : MG27_A ) -> Self { match variant { MG27_A :: _0 => false , MG27_A :: _1 => true } } } # [ doc = "Reader of field `MG27`" ] pub type MG27_R = crate :: R < bool , MG27_A > ; impl MG27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG27_A { match self . bits { false => MG27_A :: _0 , true => MG27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG27_A :: _1 } } # [ doc = "Write proxy for field `MG27`" ] pub struct MG27_W < 'a > { w : & 'a mut W , } impl < 'a > MG27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG28_A > for bool { # [ inline ( always ) ] fn from ( variant : MG28_A ) -> Self { match variant { MG28_A :: _0 => false , MG28_A :: _1 => true } } } # [ doc = "Reader of field `MG28`" ] pub type MG28_R = crate :: R < bool , MG28_A > ; impl MG28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG28_A { match self . bits { false => MG28_A :: _0 , true => MG28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG28_A :: _1 } } # [ doc = "Write proxy for field `MG28`" ] pub struct MG28_W < 'a > { w : & 'a mut W , } impl < 'a > MG28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG29_A > for bool { # [ inline ( always ) ] fn from ( variant : MG29_A ) -> Self { match variant { MG29_A :: _0 => false , MG29_A :: _1 => true } } } # [ doc = "Reader of field `MG29`" ] pub type MG29_R = crate :: R < bool , MG29_A > ; impl MG29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG29_A { match self . bits { false => MG29_A :: _0 , true => MG29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG29_A :: _1 } } # [ doc = "Write proxy for field `MG29`" ] pub struct MG29_W < 'a > { w : & 'a mut W , } impl < 'a > MG29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG30_A > for bool { # [ inline ( always ) ] fn from ( variant : MG30_A ) -> Self { match variant { MG30_A :: _0 => false , MG30_A :: _1 => true } } } # [ doc = "Reader of field `MG30`" ] pub type MG30_R = crate :: R < bool , MG30_A > ; impl MG30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG30_A { match self . bits { false => MG30_A :: _0 , true => MG30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG30_A :: _1 } } # [ doc = "Write proxy for field `MG30`" ] pub struct MG30_W < 'a > { w : & 'a mut W , } impl < 'a > MG30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG31_A > for bool { # [ inline ( always ) ] fn from ( variant : MG31_A ) -> Self { match variant { MG31_A :: _0 => false , MG31_A :: _1 => true } } } # [ doc = "Reader of field `MG31`" ] pub type MG31_R = crate :: R < bool , MG31_A > ; impl MG31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG31_A { match self . bits { false => MG31_A :: _0 , true => MG31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG31_A :: _1 } } # [ doc = "Write proxy for field `MG31`" ] pub struct MG31_W < 'a > { w : & 'a mut W , } impl < 'a > MG31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg0 ( & self ) -> MG0_R { MG0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg1 ( & self ) -> MG1_R { MG1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg2 ( & self ) -> MG2_R { MG2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg3 ( & self ) -> MG3_R { MG3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg4 ( & self ) -> MG4_R { MG4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg5 ( & self ) -> MG5_R { MG5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg6 ( & self ) -> MG6_R { MG6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg7 ( & self ) -> MG7_R { MG7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg8 ( & self ) -> MG8_R { MG8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg9 ( & self ) -> MG9_R { MG9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg10 ( & self ) -> MG10_R { MG10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg11 ( & self ) -> MG11_R { MG11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg12 ( & self ) -> MG12_R { MG12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg13 ( & self ) -> MG13_R { MG13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg14 ( & self ) -> MG14_R { MG14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg15 ( & self ) -> MG15_R { MG15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg16 ( & self ) -> MG16_R { MG16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg17 ( & self ) -> MG17_R { MG17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg18 ( & self ) -> MG18_R { MG18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg19 ( & self ) -> MG19_R { MG19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg20 ( & self ) -> MG20_R { MG20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg21 ( & self ) -> MG21_R { MG21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg22 ( & self ) -> MG22_R { MG22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg23 ( & self ) -> MG23_R { MG23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg24 ( & self ) -> MG24_R { MG24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg25 ( & self ) -> MG25_R { MG25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg26 ( & self ) -> MG26_R { MG26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg27 ( & self ) -> MG27_R { MG27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg28 ( & self ) -> MG28_R { MG28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg29 ( & self ) -> MG29_R { MG29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg30 ( & self ) -> MG30_R { MG30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg31 ( & self ) -> MG31_R { MG31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg0 ( & mut self ) -> MG0_W { MG0_W { w : self } } # [ doc = "Bit 1 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg1 ( & mut self ) -> MG1_W { MG1_W { w : self } } # [ doc = "Bit 2 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg2 ( & mut self ) -> MG2_W { MG2_W { w : self } } # [ doc = "Bit 3 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg3 ( & mut self ) -> MG3_W { MG3_W { w : self } } # [ doc = "Bit 4 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg4 ( & mut self ) -> MG4_W { MG4_W { w : self } } # [ doc = "Bit 5 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg5 ( & mut self ) -> MG5_W { MG5_W { w : self } } # [ doc = "Bit 6 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg6 ( & mut self ) -> MG6_W { MG6_W { w : self } } # [ doc = "Bit 7 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg7 ( & mut self ) -> MG7_W { MG7_W { w : self } } # [ doc = "Bit 8 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg8 ( & mut self ) -> MG8_W { MG8_W { w : self } } # [ doc = "Bit 9 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg9 ( & mut self ) -> MG9_W { MG9_W { w : self } } # [ doc = "Bit 10 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg10 ( & mut self ) -> MG10_W { MG10_W { w : self } } # [ doc = "Bit 11 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg11 ( & mut self ) -> MG11_W { MG11_W { w : self } } # [ doc = "Bit 12 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg12 ( & mut self ) -> MG12_W { MG12_W { w : self } } # [ doc = "Bit 13 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg13 ( & mut self ) -> MG13_W { MG13_W { w : self } } # [ doc = "Bit 14 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg14 ( & mut self ) -> MG14_W { MG14_W { w : self } } # [ doc = "Bit 15 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg15 ( & mut self ) -> MG15_W { MG15_W { w : self } } # [ doc = "Bit 16 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg16 ( & mut self ) -> MG16_W { MG16_W { w : self } } # [ doc = "Bit 17 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg17 ( & mut self ) -> MG17_W { MG17_W { w : self } } # [ doc = "Bit 18 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg18 ( & mut self ) -> MG18_W { MG18_W { w : self } } # [ doc = "Bit 19 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg19 ( & mut self ) -> MG19_W { MG19_W { w : self } } # [ doc = "Bit 20 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg20 ( & mut self ) -> MG20_W { MG20_W { w : self } } # [ doc = "Bit 21 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg21 ( & mut self ) -> MG21_W { MG21_W { w : self } } # [ doc = "Bit 22 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg22 ( & mut self ) -> MG22_W { MG22_W { w : self } } # [ doc = "Bit 23 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg23 ( & mut self ) -> MG23_W { MG23_W { w : self } } # [ doc = "Bit 24 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg24 ( & mut self ) -> MG24_W { MG24_W { w : self } } # [ doc = "Bit 25 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg25 ( & mut self ) -> MG25_W { MG25_W { w : self } } # [ doc = "Bit 26 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg26 ( & mut self ) -> MG26_W { MG26_W { w : self } } # [ doc = "Bit 27 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg27 ( & mut self ) -> MG27_W { MG27_W { w : self } } # [ doc = "Bit 28 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg28 ( & mut self ) -> MG28_W { MG28_W { w : self } } # [ doc = "Bit 29 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg29 ( & mut self ) -> MG29_W { MG29_W { w : self } } # [ doc = "Bit 30 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg30 ( & mut self ) -> MG30_W { MG30_W { w : self } } # [ doc = "Bit 31 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg31 ( & mut self ) -> MG31_W { MG31_W { w : self } } } } # [ doc = "Rx 14 Mask register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rx14mask](rx14mask) module" ] pub type RX14MASK = crate :: Reg < u32 , _RX14MASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RX14MASK ; # [ doc = "`read()` method returns [rx14mask::R](rx14mask::R) reader structure" ] impl crate :: Readable for RX14MASK { } # [ doc = "`write(|w| ..)` method takes [rx14mask::W](rx14mask::W) writer structure" ] impl crate :: Writable for RX14MASK { } # [ doc = "Rx 14 Mask register" ] pub mod rx14mask { # [ doc = "Reader of register RX14MASK" ] pub type R = crate :: R < u32 , super :: RX14MASK > ; # [ doc = "Writer for register RX14MASK" ] pub type W = crate :: W < u32 , super :: RX14MASK > ; # [ doc = "Register RX14MASK `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RX14MASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M0_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M0_A ) -> Self { match variant { RX14M0_A :: _0 => false , RX14M0_A :: _1 => true } } } # [ doc = "Reader of field `RX14M0`" ] pub type RX14M0_R = crate :: R < bool , RX14M0_A > ; impl RX14M0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M0_A { match self . bits { false => RX14M0_A :: _0 , true => RX14M0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M0_A :: _1 } } # [ doc = "Write proxy for field `RX14M0`" ] pub struct RX14M0_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M1_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M1_A ) -> Self { match variant { RX14M1_A :: _0 => false , RX14M1_A :: _1 => true } } } # [ doc = "Reader of field `RX14M1`" ] pub type RX14M1_R = crate :: R < bool , RX14M1_A > ; impl RX14M1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M1_A { match self . bits { false => RX14M1_A :: _0 , true => RX14M1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M1_A :: _1 } } # [ doc = "Write proxy for field `RX14M1`" ] pub struct RX14M1_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M1_A :: _1 ) } # [ 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 } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M2_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M2_A ) -> Self { match variant { RX14M2_A :: _0 => false , RX14M2_A :: _1 => true } } } # [ doc = "Reader of field `RX14M2`" ] pub type RX14M2_R = crate :: R < bool , RX14M2_A > ; impl RX14M2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M2_A { match self . bits { false => RX14M2_A :: _0 , true => RX14M2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M2_A :: _1 } } # [ doc = "Write proxy for field `RX14M2`" ] pub struct RX14M2_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M2_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M3_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M3_A ) -> Self { match variant { RX14M3_A :: _0 => false , RX14M3_A :: _1 => true } } } # [ doc = "Reader of field `RX14M3`" ] pub type RX14M3_R = crate :: R < bool , RX14M3_A > ; impl RX14M3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M3_A { match self . bits { false => RX14M3_A :: _0 , true => RX14M3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M3_A :: _1 } } # [ doc = "Write proxy for field `RX14M3`" ] pub struct RX14M3_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M4_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M4_A ) -> Self { match variant { RX14M4_A :: _0 => false , RX14M4_A :: _1 => true } } } # [ doc = "Reader of field `RX14M4`" ] pub type RX14M4_R = crate :: R < bool , RX14M4_A > ; impl RX14M4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M4_A { match self . bits { false => RX14M4_A :: _0 , true => RX14M4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M4_A :: _1 } } # [ doc = "Write proxy for field `RX14M4`" ] pub struct RX14M4_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M5_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M5_A ) -> Self { match variant { RX14M5_A :: _0 => false , RX14M5_A :: _1 => true } } } # [ doc = "Reader of field `RX14M5`" ] pub type RX14M5_R = crate :: R < bool , RX14M5_A > ; impl RX14M5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M5_A { match self . bits { false => RX14M5_A :: _0 , true => RX14M5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M5_A :: _1 } } # [ doc = "Write proxy for field `RX14M5`" ] pub struct RX14M5_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M5_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M6_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M6_A ) -> Self { match variant { RX14M6_A :: _0 => false , RX14M6_A :: _1 => true } } } # [ doc = "Reader of field `RX14M6`" ] pub type RX14M6_R = crate :: R < bool , RX14M6_A > ; impl RX14M6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M6_A { match self . bits { false => RX14M6_A :: _0 , true => RX14M6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M6_A :: _1 } } # [ doc = "Write proxy for field `RX14M6`" ] pub struct RX14M6_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M6_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M7_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M7_A ) -> Self { match variant { RX14M7_A :: _0 => false , RX14M7_A :: _1 => true } } } # [ doc = "Reader of field `RX14M7`" ] pub type RX14M7_R = crate :: R < bool , RX14M7_A > ; impl RX14M7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M7_A { match self . bits { false => RX14M7_A :: _0 , true => RX14M7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M7_A :: _1 } } # [ doc = "Write proxy for field `RX14M7`" ] pub struct RX14M7_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M7_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M8_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M8_A ) -> Self { match variant { RX14M8_A :: _0 => false , RX14M8_A :: _1 => true } } } # [ doc = "Reader of field `RX14M8`" ] pub type RX14M8_R = crate :: R < bool , RX14M8_A > ; impl RX14M8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M8_A { match self . bits { false => RX14M8_A :: _0 , true => RX14M8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M8_A :: _1 } } # [ doc = "Write proxy for field `RX14M8`" ] pub struct RX14M8_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M9_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M9_A ) -> Self { match variant { RX14M9_A :: _0 => false , RX14M9_A :: _1 => true } } } # [ doc = "Reader of field `RX14M9`" ] pub type RX14M9_R = crate :: R < bool , RX14M9_A > ; impl RX14M9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M9_A { match self . bits { false => RX14M9_A :: _0 , true => RX14M9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M9_A :: _1 } } # [ doc = "Write proxy for field `RX14M9`" ] pub struct RX14M9_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M10_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M10_A ) -> Self { match variant { RX14M10_A :: _0 => false , RX14M10_A :: _1 => true } } } # [ doc = "Reader of field `RX14M10`" ] pub type RX14M10_R = crate :: R < bool , RX14M10_A > ; impl RX14M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M10_A { match self . bits { false => RX14M10_A :: _0 , true => RX14M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M10_A :: _1 } } # [ doc = "Write proxy for field `RX14M10`" ] pub struct RX14M10_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M11_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M11_A ) -> Self { match variant { RX14M11_A :: _0 => false , RX14M11_A :: _1 => true } } } # [ doc = "Reader of field `RX14M11`" ] pub type RX14M11_R = crate :: R < bool , RX14M11_A > ; impl RX14M11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M11_A { match self . bits { false => RX14M11_A :: _0 , true => RX14M11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M11_A :: _1 } } # [ doc = "Write proxy for field `RX14M11`" ] pub struct RX14M11_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M12_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M12_A ) -> Self { match variant { RX14M12_A :: _0 => false , RX14M12_A :: _1 => true } } } # [ doc = "Reader of field `RX14M12`" ] pub type RX14M12_R = crate :: R < bool , RX14M12_A > ; impl RX14M12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M12_A { match self . bits { false => RX14M12_A :: _0 , true => RX14M12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M12_A :: _1 } } # [ doc = "Write proxy for field `RX14M12`" ] pub struct RX14M12_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M13_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M13_A ) -> Self { match variant { RX14M13_A :: _0 => false , RX14M13_A :: _1 => true } } } # [ doc = "Reader of field `RX14M13`" ] pub type RX14M13_R = crate :: R < bool , RX14M13_A > ; impl RX14M13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M13_A { match self . bits { false => RX14M13_A :: _0 , true => RX14M13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M13_A :: _1 } } # [ doc = "Write proxy for field `RX14M13`" ] pub struct RX14M13_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M13_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M14_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M14_A ) -> Self { match variant { RX14M14_A :: _0 => false , RX14M14_A :: _1 => true } } } # [ doc = "Reader of field `RX14M14`" ] pub type RX14M14_R = crate :: R < bool , RX14M14_A > ; impl RX14M14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M14_A { match self . bits { false => RX14M14_A :: _0 , true => RX14M14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M14_A :: _1 } } # [ doc = "Write proxy for field `RX14M14`" ] pub struct RX14M14_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M15_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M15_A ) -> Self { match variant { RX14M15_A :: _0 => false , RX14M15_A :: _1 => true } } } # [ doc = "Reader of field `RX14M15`" ] pub type RX14M15_R = crate :: R < bool , RX14M15_A > ; impl RX14M15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M15_A { match self . bits { false => RX14M15_A :: _0 , true => RX14M15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M15_A :: _1 } } # [ doc = "Write proxy for field `RX14M15`" ] pub struct RX14M15_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M16_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M16_A ) -> Self { match variant { RX14M16_A :: _0 => false , RX14M16_A :: _1 => true } } } # [ doc = "Reader of field `RX14M16`" ] pub type RX14M16_R = crate :: R < bool , RX14M16_A > ; impl RX14M16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M16_A { match self . bits { false => RX14M16_A :: _0 , true => RX14M16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M16_A :: _1 } } # [ doc = "Write proxy for field `RX14M16`" ] pub struct RX14M16_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M17_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M17_A ) -> Self { match variant { RX14M17_A :: _0 => false , RX14M17_A :: _1 => true } } } # [ doc = "Reader of field `RX14M17`" ] pub type RX14M17_R = crate :: R < bool , RX14M17_A > ; impl RX14M17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M17_A { match self . bits { false => RX14M17_A :: _0 , true => RX14M17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M17_A :: _1 } } # [ doc = "Write proxy for field `RX14M17`" ] pub struct RX14M17_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M18_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M18_A ) -> Self { match variant { RX14M18_A :: _0 => false , RX14M18_A :: _1 => true } } } # [ doc = "Reader of field `RX14M18`" ] pub type RX14M18_R = crate :: R < bool , RX14M18_A > ; impl RX14M18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M18_A { match self . bits { false => RX14M18_A :: _0 , true => RX14M18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M18_A :: _1 } } # [ doc = "Write proxy for field `RX14M18`" ] pub struct RX14M18_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M19_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M19_A ) -> Self { match variant { RX14M19_A :: _0 => false , RX14M19_A :: _1 => true } } } # [ doc = "Reader of field `RX14M19`" ] pub type RX14M19_R = crate :: R < bool , RX14M19_A > ; impl RX14M19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M19_A { match self . bits { false => RX14M19_A :: _0 , true => RX14M19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M19_A :: _1 } } # [ doc = "Write proxy for field `RX14M19`" ] pub struct RX14M19_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M20_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M20_A ) -> Self { match variant { RX14M20_A :: _0 => false , RX14M20_A :: _1 => true } } } # [ doc = "Reader of field `RX14M20`" ] pub type RX14M20_R = crate :: R < bool , RX14M20_A > ; impl RX14M20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M20_A { match self . bits { false => RX14M20_A :: _0 , true => RX14M20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M20_A :: _1 } } # [ doc = "Write proxy for field `RX14M20`" ] pub struct RX14M20_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M20_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M21_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M21_A ) -> Self { match variant { RX14M21_A :: _0 => false , RX14M21_A :: _1 => true } } } # [ doc = "Reader of field `RX14M21`" ] pub type RX14M21_R = crate :: R < bool , RX14M21_A > ; impl RX14M21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M21_A { match self . bits { false => RX14M21_A :: _0 , true => RX14M21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M21_A :: _1 } } # [ doc = "Write proxy for field `RX14M21`" ] pub struct RX14M21_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M21_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M22_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M22_A ) -> Self { match variant { RX14M22_A :: _0 => false , RX14M22_A :: _1 => true } } } # [ doc = "Reader of field `RX14M22`" ] pub type RX14M22_R = crate :: R < bool , RX14M22_A > ; impl RX14M22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M22_A { match self . bits { false => RX14M22_A :: _0 , true => RX14M22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M22_A :: _1 } } # [ doc = "Write proxy for field `RX14M22`" ] pub struct RX14M22_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M23_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M23_A ) -> Self { match variant { RX14M23_A :: _0 => false , RX14M23_A :: _1 => true } } } # [ doc = "Reader of field `RX14M23`" ] pub type RX14M23_R = crate :: R < bool , RX14M23_A > ; impl RX14M23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M23_A { match self . bits { false => RX14M23_A :: _0 , true => RX14M23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M23_A :: _1 } } # [ doc = "Write proxy for field `RX14M23`" ] pub struct RX14M23_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M24_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M24_A ) -> Self { match variant { RX14M24_A :: _0 => false , RX14M24_A :: _1 => true } } } # [ doc = "Reader of field `RX14M24`" ] pub type RX14M24_R = crate :: R < bool , RX14M24_A > ; impl RX14M24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M24_A { match self . bits { false => RX14M24_A :: _0 , true => RX14M24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M24_A :: _1 } } # [ doc = "Write proxy for field `RX14M24`" ] pub struct RX14M24_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M24_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M25_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M25_A ) -> Self { match variant { RX14M25_A :: _0 => false , RX14M25_A :: _1 => true } } } # [ doc = "Reader of field `RX14M25`" ] pub type RX14M25_R = crate :: R < bool , RX14M25_A > ; impl RX14M25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M25_A { match self . bits { false => RX14M25_A :: _0 , true => RX14M25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M25_A :: _1 } } # [ doc = "Write proxy for field `RX14M25`" ] pub struct RX14M25_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M25_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M26_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M26_A ) -> Self { match variant { RX14M26_A :: _0 => false , RX14M26_A :: _1 => true } } } # [ doc = "Reader of field `RX14M26`" ] pub type RX14M26_R = crate :: R < bool , RX14M26_A > ; impl RX14M26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M26_A { match self . bits { false => RX14M26_A :: _0 , true => RX14M26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M26_A :: _1 } } # [ doc = "Write proxy for field `RX14M26`" ] pub struct RX14M26_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M26_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M27_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M27_A ) -> Self { match variant { RX14M27_A :: _0 => false , RX14M27_A :: _1 => true } } } # [ doc = "Reader of field `RX14M27`" ] pub type RX14M27_R = crate :: R < bool , RX14M27_A > ; impl RX14M27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M27_A { match self . bits { false => RX14M27_A :: _0 , true => RX14M27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M27_A :: _1 } } # [ doc = "Write proxy for field `RX14M27`" ] pub struct RX14M27_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M28_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M28_A ) -> Self { match variant { RX14M28_A :: _0 => false , RX14M28_A :: _1 => true } } } # [ doc = "Reader of field `RX14M28`" ] pub type RX14M28_R = crate :: R < bool , RX14M28_A > ; impl RX14M28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M28_A { match self . bits { false => RX14M28_A :: _0 , true => RX14M28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M28_A :: _1 } } # [ doc = "Write proxy for field `RX14M28`" ] pub struct RX14M28_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M29_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M29_A ) -> Self { match variant { RX14M29_A :: _0 => false , RX14M29_A :: _1 => true } } } # [ doc = "Reader of field `RX14M29`" ] pub type RX14M29_R = crate :: R < bool , RX14M29_A > ; impl RX14M29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M29_A { match self . bits { false => RX14M29_A :: _0 , true => RX14M29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M29_A :: _1 } } # [ doc = "Write proxy for field `RX14M29`" ] pub struct RX14M29_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M30_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M30_A ) -> Self { match variant { RX14M30_A :: _0 => false , RX14M30_A :: _1 => true } } } # [ doc = "Reader of field `RX14M30`" ] pub type RX14M30_R = crate :: R < bool , RX14M30_A > ; impl RX14M30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M30_A { match self . bits { false => RX14M30_A :: _0 , true => RX14M30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M30_A :: _1 } } # [ doc = "Write proxy for field `RX14M30`" ] pub struct RX14M30_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M31_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M31_A ) -> Self { match variant { RX14M31_A :: _0 => false , RX14M31_A :: _1 => true } } } # [ doc = "Reader of field `RX14M31`" ] pub type RX14M31_R = crate :: R < bool , RX14M31_A > ; impl RX14M31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M31_A { match self . bits { false => RX14M31_A :: _0 , true => RX14M31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M31_A :: _1 } } # [ doc = "Write proxy for field `RX14M31`" ] pub struct RX14M31_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m0 ( & self ) -> RX14M0_R { RX14M0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m1 ( & self ) -> RX14M1_R { RX14M1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m2 ( & self ) -> RX14M2_R { RX14M2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m3 ( & self ) -> RX14M3_R { RX14M3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m4 ( & self ) -> RX14M4_R { RX14M4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m5 ( & self ) -> RX14M5_R { RX14M5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m6 ( & self ) -> RX14M6_R { RX14M6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m7 ( & self ) -> RX14M7_R { RX14M7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m8 ( & self ) -> RX14M8_R { RX14M8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m9 ( & self ) -> RX14M9_R { RX14M9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m10 ( & self ) -> RX14M10_R { RX14M10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m11 ( & self ) -> RX14M11_R { RX14M11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m12 ( & self ) -> RX14M12_R { RX14M12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m13 ( & self ) -> RX14M13_R { RX14M13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m14 ( & self ) -> RX14M14_R { RX14M14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m15 ( & self ) -> RX14M15_R { RX14M15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m16 ( & self ) -> RX14M16_R { RX14M16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m17 ( & self ) -> RX14M17_R { RX14M17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m18 ( & self ) -> RX14M18_R { RX14M18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m19 ( & self ) -> RX14M19_R { RX14M19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m20 ( & self ) -> RX14M20_R { RX14M20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m21 ( & self ) -> RX14M21_R { RX14M21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m22 ( & self ) -> RX14M22_R { RX14M22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m23 ( & self ) -> RX14M23_R { RX14M23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m24 ( & self ) -> RX14M24_R { RX14M24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m25 ( & self ) -> RX14M25_R { RX14M25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m26 ( & self ) -> RX14M26_R { RX14M26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m27 ( & self ) -> RX14M27_R { RX14M27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m28 ( & self ) -> RX14M28_R { RX14M28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m29 ( & self ) -> RX14M29_R { RX14M29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m30 ( & self ) -> RX14M30_R { RX14M30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m31 ( & self ) -> RX14M31_R { RX14M31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m0 ( & mut self ) -> RX14M0_W { RX14M0_W { w : self } } # [ doc = "Bit 1 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m1 ( & mut self ) -> RX14M1_W { RX14M1_W { w : self } } # [ doc = "Bit 2 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m2 ( & mut self ) -> RX14M2_W { RX14M2_W { w : self } } # [ doc = "Bit 3 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m3 ( & mut self ) -> RX14M3_W { RX14M3_W { w : self } } # [ doc = "Bit 4 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m4 ( & mut self ) -> RX14M4_W { RX14M4_W { w : self } } # [ doc = "Bit 5 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m5 ( & mut self ) -> RX14M5_W { RX14M5_W { w : self } } # [ doc = "Bit 6 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m6 ( & mut self ) -> RX14M6_W { RX14M6_W { w : self } } # [ doc = "Bit 7 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m7 ( & mut self ) -> RX14M7_W { RX14M7_W { w : self } } # [ doc = "Bit 8 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m8 ( & mut self ) -> RX14M8_W { RX14M8_W { w : self } } # [ doc = "Bit 9 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m9 ( & mut self ) -> RX14M9_W { RX14M9_W { w : self } } # [ doc = "Bit 10 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m10 ( & mut self ) -> RX14M10_W { RX14M10_W { w : self } } # [ doc = "Bit 11 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m11 ( & mut self ) -> RX14M11_W { RX14M11_W { w : self } } # [ doc = "Bit 12 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m12 ( & mut self ) -> RX14M12_W { RX14M12_W { w : self } } # [ doc = "Bit 13 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m13 ( & mut self ) -> RX14M13_W { RX14M13_W { w : self } } # [ doc = "Bit 14 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m14 ( & mut self ) -> RX14M14_W { RX14M14_W { w : self } } # [ doc = "Bit 15 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m15 ( & mut self ) -> RX14M15_W { RX14M15_W { w : self } } # [ doc = "Bit 16 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m16 ( & mut self ) -> RX14M16_W { RX14M16_W { w : self } } # [ doc = "Bit 17 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m17 ( & mut self ) -> RX14M17_W { RX14M17_W { w : self } } # [ doc = "Bit 18 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m18 ( & mut self ) -> RX14M18_W { RX14M18_W { w : self } } # [ doc = "Bit 19 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m19 ( & mut self ) -> RX14M19_W { RX14M19_W { w : self } } # [ doc = "Bit 20 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m20 ( & mut self ) -> RX14M20_W { RX14M20_W { w : self } } # [ doc = "Bit 21 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m21 ( & mut self ) -> RX14M21_W { RX14M21_W { w : self } } # [ doc = "Bit 22 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m22 ( & mut self ) -> RX14M22_W { RX14M22_W { w : self } } # [ doc = "Bit 23 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m23 ( & mut self ) -> RX14M23_W { RX14M23_W { w : self } } # [ doc = "Bit 24 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m24 ( & mut self ) -> RX14M24_W { RX14M24_W { w : self } } # [ doc = "Bit 25 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m25 ( & mut self ) -> RX14M25_W { RX14M25_W { w : self } } # [ doc = "Bit 26 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m26 ( & mut self ) -> RX14M26_W { RX14M26_W { w : self } } # [ doc = "Bit 27 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m27 ( & mut self ) -> RX14M27_W { RX14M27_W { w : self } } # [ doc = "Bit 28 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m28 ( & mut self ) -> RX14M28_W { RX14M28_W { w : self } } # [ doc = "Bit 29 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m29 ( & mut self ) -> RX14M29_W { RX14M29_W { w : self } } # [ doc = "Bit 30 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m30 ( & mut self ) -> RX14M30_W { RX14M30_W { w : self } } # [ doc = "Bit 31 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m31 ( & mut self ) -> RX14M31_W { RX14M31_W { w : self } } } } # [ doc = "Rx 15 Mask register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rx15mask](rx15mask) module" ] pub type RX15MASK = crate :: Reg < u32 , _RX15MASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RX15MASK ; # [ doc = "`read()` method returns [rx15mask::R](rx15mask::R) reader structure" ] impl crate :: Readable for RX15MASK { } # [ doc = "`write(|w| ..)` method takes [rx15mask::W](rx15mask::W) writer structure" ] impl crate :: Writable for RX15MASK { } # [ doc = "Rx 15 Mask register" ] pub mod rx15mask { # [ doc = "Reader of register RX15MASK" ] pub type R = crate :: R < u32 , super :: RX15MASK > ; # [ doc = "Writer for register RX15MASK" ] pub type W = crate :: W < u32 , super :: RX15MASK > ; # [ doc = "Register RX15MASK `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RX15MASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M0_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M0_A ) -> Self { match variant { RX15M0_A :: _0 => false , RX15M0_A :: _1 => true } } } # [ doc = "Reader of field `RX15M0`" ] pub type RX15M0_R = crate :: R < bool , RX15M0_A > ; impl RX15M0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M0_A { match self . bits { false => RX15M0_A :: _0 , true => RX15M0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M0_A :: _1 } } # [ doc = "Write proxy for field `RX15M0`" ] pub struct RX15M0_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M1_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M1_A ) -> Self { match variant { RX15M1_A :: _0 => false , RX15M1_A :: _1 => true } } } # [ doc = "Reader of field `RX15M1`" ] pub type RX15M1_R = crate :: R < bool , RX15M1_A > ; impl RX15M1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M1_A { match self . bits { false => RX15M1_A :: _0 , true => RX15M1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M1_A :: _1 } } # [ doc = "Write proxy for field `RX15M1`" ] pub struct RX15M1_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M1_A :: _1 ) } # [ 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 } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M2_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M2_A ) -> Self { match variant { RX15M2_A :: _0 => false , RX15M2_A :: _1 => true } } } # [ doc = "Reader of field `RX15M2`" ] pub type RX15M2_R = crate :: R < bool , RX15M2_A > ; impl RX15M2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M2_A { match self . bits { false => RX15M2_A :: _0 , true => RX15M2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M2_A :: _1 } } # [ doc = "Write proxy for field `RX15M2`" ] pub struct RX15M2_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M2_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M3_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M3_A ) -> Self { match variant { RX15M3_A :: _0 => false , RX15M3_A :: _1 => true } } } # [ doc = "Reader of field `RX15M3`" ] pub type RX15M3_R = crate :: R < bool , RX15M3_A > ; impl RX15M3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M3_A { match self . bits { false => RX15M3_A :: _0 , true => RX15M3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M3_A :: _1 } } # [ doc = "Write proxy for field `RX15M3`" ] pub struct RX15M3_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M4_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M4_A ) -> Self { match variant { RX15M4_A :: _0 => false , RX15M4_A :: _1 => true } } } # [ doc = "Reader of field `RX15M4`" ] pub type RX15M4_R = crate :: R < bool , RX15M4_A > ; impl RX15M4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M4_A { match self . bits { false => RX15M4_A :: _0 , true => RX15M4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M4_A :: _1 } } # [ doc = "Write proxy for field `RX15M4`" ] pub struct RX15M4_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M5_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M5_A ) -> Self { match variant { RX15M5_A :: _0 => false , RX15M5_A :: _1 => true } } } # [ doc = "Reader of field `RX15M5`" ] pub type RX15M5_R = crate :: R < bool , RX15M5_A > ; impl RX15M5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M5_A { match self . bits { false => RX15M5_A :: _0 , true => RX15M5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M5_A :: _1 } } # [ doc = "Write proxy for field `RX15M5`" ] pub struct RX15M5_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M5_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M6_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M6_A ) -> Self { match variant { RX15M6_A :: _0 => false , RX15M6_A :: _1 => true } } } # [ doc = "Reader of field `RX15M6`" ] pub type RX15M6_R = crate :: R < bool , RX15M6_A > ; impl RX15M6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M6_A { match self . bits { false => RX15M6_A :: _0 , true => RX15M6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M6_A :: _1 } } # [ doc = "Write proxy for field `RX15M6`" ] pub struct RX15M6_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M6_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M7_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M7_A ) -> Self { match variant { RX15M7_A :: _0 => false , RX15M7_A :: _1 => true } } } # [ doc = "Reader of field `RX15M7`" ] pub type RX15M7_R = crate :: R < bool , RX15M7_A > ; impl RX15M7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M7_A { match self . bits { false => RX15M7_A :: _0 , true => RX15M7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M7_A :: _1 } } # [ doc = "Write proxy for field `RX15M7`" ] pub struct RX15M7_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M7_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M8_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M8_A ) -> Self { match variant { RX15M8_A :: _0 => false , RX15M8_A :: _1 => true } } } # [ doc = "Reader of field `RX15M8`" ] pub type RX15M8_R = crate :: R < bool , RX15M8_A > ; impl RX15M8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M8_A { match self . bits { false => RX15M8_A :: _0 , true => RX15M8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M8_A :: _1 } } # [ doc = "Write proxy for field `RX15M8`" ] pub struct RX15M8_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M9_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M9_A ) -> Self { match variant { RX15M9_A :: _0 => false , RX15M9_A :: _1 => true } } } # [ doc = "Reader of field `RX15M9`" ] pub type RX15M9_R = crate :: R < bool , RX15M9_A > ; impl RX15M9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M9_A { match self . bits { false => RX15M9_A :: _0 , true => RX15M9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M9_A :: _1 } } # [ doc = "Write proxy for field `RX15M9`" ] pub struct RX15M9_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M10_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M10_A ) -> Self { match variant { RX15M10_A :: _0 => false , RX15M10_A :: _1 => true } } } # [ doc = "Reader of field `RX15M10`" ] pub type RX15M10_R = crate :: R < bool , RX15M10_A > ; impl RX15M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M10_A { match self . bits { false => RX15M10_A :: _0 , true => RX15M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M10_A :: _1 } } # [ doc = "Write proxy for field `RX15M10`" ] pub struct RX15M10_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M11_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M11_A ) -> Self { match variant { RX15M11_A :: _0 => false , RX15M11_A :: _1 => true } } } # [ doc = "Reader of field `RX15M11`" ] pub type RX15M11_R = crate :: R < bool , RX15M11_A > ; impl RX15M11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M11_A { match self . bits { false => RX15M11_A :: _0 , true => RX15M11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M11_A :: _1 } } # [ doc = "Write proxy for field `RX15M11`" ] pub struct RX15M11_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M12_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M12_A ) -> Self { match variant { RX15M12_A :: _0 => false , RX15M12_A :: _1 => true } } } # [ doc = "Reader of field `RX15M12`" ] pub type RX15M12_R = crate :: R < bool , RX15M12_A > ; impl RX15M12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M12_A { match self . bits { false => RX15M12_A :: _0 , true => RX15M12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M12_A :: _1 } } # [ doc = "Write proxy for field `RX15M12`" ] pub struct RX15M12_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M13_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M13_A ) -> Self { match variant { RX15M13_A :: _0 => false , RX15M13_A :: _1 => true } } } # [ doc = "Reader of field `RX15M13`" ] pub type RX15M13_R = crate :: R < bool , RX15M13_A > ; impl RX15M13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M13_A { match self . bits { false => RX15M13_A :: _0 , true => RX15M13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M13_A :: _1 } } # [ doc = "Write proxy for field `RX15M13`" ] pub struct RX15M13_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M13_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M14_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M14_A ) -> Self { match variant { RX15M14_A :: _0 => false , RX15M14_A :: _1 => true } } } # [ doc = "Reader of field `RX15M14`" ] pub type RX15M14_R = crate :: R < bool , RX15M14_A > ; impl RX15M14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M14_A { match self . bits { false => RX15M14_A :: _0 , true => RX15M14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M14_A :: _1 } } # [ doc = "Write proxy for field `RX15M14`" ] pub struct RX15M14_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M15_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M15_A ) -> Self { match variant { RX15M15_A :: _0 => false , RX15M15_A :: _1 => true } } } # [ doc = "Reader of field `RX15M15`" ] pub type RX15M15_R = crate :: R < bool , RX15M15_A > ; impl RX15M15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M15_A { match self . bits { false => RX15M15_A :: _0 , true => RX15M15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M15_A :: _1 } } # [ doc = "Write proxy for field `RX15M15`" ] pub struct RX15M15_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M16_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M16_A ) -> Self { match variant { RX15M16_A :: _0 => false , RX15M16_A :: _1 => true } } } # [ doc = "Reader of field `RX15M16`" ] pub type RX15M16_R = crate :: R < bool , RX15M16_A > ; impl RX15M16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M16_A { match self . bits { false => RX15M16_A :: _0 , true => RX15M16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M16_A :: _1 } } # [ doc = "Write proxy for field `RX15M16`" ] pub struct RX15M16_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M17_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M17_A ) -> Self { match variant { RX15M17_A :: _0 => false , RX15M17_A :: _1 => true } } } # [ doc = "Reader of field `RX15M17`" ] pub type RX15M17_R = crate :: R < bool , RX15M17_A > ; impl RX15M17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M17_A { match self . bits { false => RX15M17_A :: _0 , true => RX15M17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M17_A :: _1 } } # [ doc = "Write proxy for field `RX15M17`" ] pub struct RX15M17_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M18_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M18_A ) -> Self { match variant { RX15M18_A :: _0 => false , RX15M18_A :: _1 => true } } } # [ doc = "Reader of field `RX15M18`" ] pub type RX15M18_R = crate :: R < bool , RX15M18_A > ; impl RX15M18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M18_A { match self . bits { false => RX15M18_A :: _0 , true => RX15M18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M18_A :: _1 } } # [ doc = "Write proxy for field `RX15M18`" ] pub struct RX15M18_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M19_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M19_A ) -> Self { match variant { RX15M19_A :: _0 => false , RX15M19_A :: _1 => true } } } # [ doc = "Reader of field `RX15M19`" ] pub type RX15M19_R = crate :: R < bool , RX15M19_A > ; impl RX15M19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M19_A { match self . bits { false => RX15M19_A :: _0 , true => RX15M19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M19_A :: _1 } } # [ doc = "Write proxy for field `RX15M19`" ] pub struct RX15M19_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M20_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M20_A ) -> Self { match variant { RX15M20_A :: _0 => false , RX15M20_A :: _1 => true } } } # [ doc = "Reader of field `RX15M20`" ] pub type RX15M20_R = crate :: R < bool , RX15M20_A > ; impl RX15M20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M20_A { match self . bits { false => RX15M20_A :: _0 , true => RX15M20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M20_A :: _1 } } # [ doc = "Write proxy for field `RX15M20`" ] pub struct RX15M20_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M20_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M21_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M21_A ) -> Self { match variant { RX15M21_A :: _0 => false , RX15M21_A :: _1 => true } } } # [ doc = "Reader of field `RX15M21`" ] pub type RX15M21_R = crate :: R < bool , RX15M21_A > ; impl RX15M21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M21_A { match self . bits { false => RX15M21_A :: _0 , true => RX15M21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M21_A :: _1 } } # [ doc = "Write proxy for field `RX15M21`" ] pub struct RX15M21_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M21_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M22_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M22_A ) -> Self { match variant { RX15M22_A :: _0 => false , RX15M22_A :: _1 => true } } } # [ doc = "Reader of field `RX15M22`" ] pub type RX15M22_R = crate :: R < bool , RX15M22_A > ; impl RX15M22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M22_A { match self . bits { false => RX15M22_A :: _0 , true => RX15M22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M22_A :: _1 } } # [ doc = "Write proxy for field `RX15M22`" ] pub struct RX15M22_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M23_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M23_A ) -> Self { match variant { RX15M23_A :: _0 => false , RX15M23_A :: _1 => true } } } # [ doc = "Reader of field `RX15M23`" ] pub type RX15M23_R = crate :: R < bool , RX15M23_A > ; impl RX15M23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M23_A { match self . bits { false => RX15M23_A :: _0 , true => RX15M23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M23_A :: _1 } } # [ doc = "Write proxy for field `RX15M23`" ] pub struct RX15M23_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M24_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M24_A ) -> Self { match variant { RX15M24_A :: _0 => false , RX15M24_A :: _1 => true } } } # [ doc = "Reader of field `RX15M24`" ] pub type RX15M24_R = crate :: R < bool , RX15M24_A > ; impl RX15M24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M24_A { match self . bits { false => RX15M24_A :: _0 , true => RX15M24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M24_A :: _1 } } # [ doc = "Write proxy for field `RX15M24`" ] pub struct RX15M24_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M24_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M25_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M25_A ) -> Self { match variant { RX15M25_A :: _0 => false , RX15M25_A :: _1 => true } } } # [ doc = "Reader of field `RX15M25`" ] pub type RX15M25_R = crate :: R < bool , RX15M25_A > ; impl RX15M25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M25_A { match self . bits { false => RX15M25_A :: _0 , true => RX15M25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M25_A :: _1 } } # [ doc = "Write proxy for field `RX15M25`" ] pub struct RX15M25_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M25_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M26_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M26_A ) -> Self { match variant { RX15M26_A :: _0 => false , RX15M26_A :: _1 => true } } } # [ doc = "Reader of field `RX15M26`" ] pub type RX15M26_R = crate :: R < bool , RX15M26_A > ; impl RX15M26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M26_A { match self . bits { false => RX15M26_A :: _0 , true => RX15M26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M26_A :: _1 } } # [ doc = "Write proxy for field `RX15M26`" ] pub struct RX15M26_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M26_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M27_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M27_A ) -> Self { match variant { RX15M27_A :: _0 => false , RX15M27_A :: _1 => true } } } # [ doc = "Reader of field `RX15M27`" ] pub type RX15M27_R = crate :: R < bool , RX15M27_A > ; impl RX15M27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M27_A { match self . bits { false => RX15M27_A :: _0 , true => RX15M27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M27_A :: _1 } } # [ doc = "Write proxy for field `RX15M27`" ] pub struct RX15M27_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M28_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M28_A ) -> Self { match variant { RX15M28_A :: _0 => false , RX15M28_A :: _1 => true } } } # [ doc = "Reader of field `RX15M28`" ] pub type RX15M28_R = crate :: R < bool , RX15M28_A > ; impl RX15M28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M28_A { match self . bits { false => RX15M28_A :: _0 , true => RX15M28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M28_A :: _1 } } # [ doc = "Write proxy for field `RX15M28`" ] pub struct RX15M28_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M29_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M29_A ) -> Self { match variant { RX15M29_A :: _0 => false , RX15M29_A :: _1 => true } } } # [ doc = "Reader of field `RX15M29`" ] pub type RX15M29_R = crate :: R < bool , RX15M29_A > ; impl RX15M29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M29_A { match self . bits { false => RX15M29_A :: _0 , true => RX15M29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M29_A :: _1 } } # [ doc = "Write proxy for field `RX15M29`" ] pub struct RX15M29_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M30_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M30_A ) -> Self { match variant { RX15M30_A :: _0 => false , RX15M30_A :: _1 => true } } } # [ doc = "Reader of field `RX15M30`" ] pub type RX15M30_R = crate :: R < bool , RX15M30_A > ; impl RX15M30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M30_A { match self . bits { false => RX15M30_A :: _0 , true => RX15M30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M30_A :: _1 } } # [ doc = "Write proxy for field `RX15M30`" ] pub struct RX15M30_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M31_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M31_A ) -> Self { match variant { RX15M31_A :: _0 => false , RX15M31_A :: _1 => true } } } # [ doc = "Reader of field `RX15M31`" ] pub type RX15M31_R = crate :: R < bool , RX15M31_A > ; impl RX15M31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M31_A { match self . bits { false => RX15M31_A :: _0 , true => RX15M31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M31_A :: _1 } } # [ doc = "Write proxy for field `RX15M31`" ] pub struct RX15M31_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m0 ( & self ) -> RX15M0_R { RX15M0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m1 ( & self ) -> RX15M1_R { RX15M1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m2 ( & self ) -> RX15M2_R { RX15M2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m3 ( & self ) -> RX15M3_R { RX15M3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m4 ( & self ) -> RX15M4_R { RX15M4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m5 ( & self ) -> RX15M5_R { RX15M5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m6 ( & self ) -> RX15M6_R { RX15M6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m7 ( & self ) -> RX15M7_R { RX15M7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m8 ( & self ) -> RX15M8_R { RX15M8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m9 ( & self ) -> RX15M9_R { RX15M9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m10 ( & self ) -> RX15M10_R { RX15M10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m11 ( & self ) -> RX15M11_R { RX15M11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m12 ( & self ) -> RX15M12_R { RX15M12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m13 ( & self ) -> RX15M13_R { RX15M13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m14 ( & self ) -> RX15M14_R { RX15M14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m15 ( & self ) -> RX15M15_R { RX15M15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m16 ( & self ) -> RX15M16_R { RX15M16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m17 ( & self ) -> RX15M17_R { RX15M17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m18 ( & self ) -> RX15M18_R { RX15M18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m19 ( & self ) -> RX15M19_R { RX15M19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m20 ( & self ) -> RX15M20_R { RX15M20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m21 ( & self ) -> RX15M21_R { RX15M21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m22 ( & self ) -> RX15M22_R { RX15M22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m23 ( & self ) -> RX15M23_R { RX15M23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m24 ( & self ) -> RX15M24_R { RX15M24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m25 ( & self ) -> RX15M25_R { RX15M25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m26 ( & self ) -> RX15M26_R { RX15M26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m27 ( & self ) -> RX15M27_R { RX15M27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m28 ( & self ) -> RX15M28_R { RX15M28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m29 ( & self ) -> RX15M29_R { RX15M29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m30 ( & self ) -> RX15M30_R { RX15M30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m31 ( & self ) -> RX15M31_R { RX15M31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m0 ( & mut self ) -> RX15M0_W { RX15M0_W { w : self } } # [ doc = "Bit 1 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m1 ( & mut self ) -> RX15M1_W { RX15M1_W { w : self } } # [ doc = "Bit 2 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m2 ( & mut self ) -> RX15M2_W { RX15M2_W { w : self } } # [ doc = "Bit 3 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m3 ( & mut self ) -> RX15M3_W { RX15M3_W { w : self } } # [ doc = "Bit 4 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m4 ( & mut self ) -> RX15M4_W { RX15M4_W { w : self } } # [ doc = "Bit 5 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m5 ( & mut self ) -> RX15M5_W { RX15M5_W { w : self } } # [ doc = "Bit 6 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m6 ( & mut self ) -> RX15M6_W { RX15M6_W { w : self } } # [ doc = "Bit 7 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m7 ( & mut self ) -> RX15M7_W { RX15M7_W { w : self } } # [ doc = "Bit 8 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m8 ( & mut self ) -> RX15M8_W { RX15M8_W { w : self } } # [ doc = "Bit 9 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m9 ( & mut self ) -> RX15M9_W { RX15M9_W { w : self } } # [ doc = "Bit 10 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m10 ( & mut self ) -> RX15M10_W { RX15M10_W { w : self } } # [ doc = "Bit 11 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m11 ( & mut self ) -> RX15M11_W { RX15M11_W { w : self } } # [ doc = "Bit 12 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m12 ( & mut self ) -> RX15M12_W { RX15M12_W { w : self } } # [ doc = "Bit 13 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m13 ( & mut self ) -> RX15M13_W { RX15M13_W { w : self } } # [ doc = "Bit 14 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m14 ( & mut self ) -> RX15M14_W { RX15M14_W { w : self } } # [ doc = "Bit 15 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m15 ( & mut self ) -> RX15M15_W { RX15M15_W { w : self } } # [ doc = "Bit 16 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m16 ( & mut self ) -> RX15M16_W { RX15M16_W { w : self } } # [ doc = "Bit 17 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m17 ( & mut self ) -> RX15M17_W { RX15M17_W { w : self } } # [ doc = "Bit 18 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m18 ( & mut self ) -> RX15M18_W { RX15M18_W { w : self } } # [ doc = "Bit 19 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m19 ( & mut self ) -> RX15M19_W { RX15M19_W { w : self } } # [ doc = "Bit 20 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m20 ( & mut self ) -> RX15M20_W { RX15M20_W { w : self } } # [ doc = "Bit 21 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m21 ( & mut self ) -> RX15M21_W { RX15M21_W { w : self } } # [ doc = "Bit 22 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m22 ( & mut self ) -> RX15M22_W { RX15M22_W { w : self } } # [ doc = "Bit 23 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m23 ( & mut self ) -> RX15M23_W { RX15M23_W { w : self } } # [ doc = "Bit 24 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m24 ( & mut self ) -> RX15M24_W { RX15M24_W { w : self } } # [ doc = "Bit 25 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m25 ( & mut self ) -> RX15M25_W { RX15M25_W { w : self } } # [ doc = "Bit 26 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m26 ( & mut self ) -> RX15M26_W { RX15M26_W { w : self } } # [ doc = "Bit 27 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m27 ( & mut self ) -> RX15M27_W { RX15M27_W { w : self } } # [ doc = "Bit 28 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m28 ( & mut self ) -> RX15M28_W { RX15M28_W { w : self } } # [ doc = "Bit 29 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m29 ( & mut self ) -> RX15M29_W { RX15M29_W { w : self } } # [ doc = "Bit 30 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m30 ( & mut self ) -> RX15M30_W { RX15M30_W { w : self } } # [ doc = "Bit 31 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m31 ( & mut self ) -> RX15M31_W { RX15M31_W { w : self } } } } # [ doc = "Error Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ecr](ecr) module" ] pub type ECR = crate :: Reg < u32 , _ECR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ECR ; # [ doc = "`read()` method returns [ecr::R](ecr::R) reader structure" ] impl crate :: Readable for ECR { } # [ doc = "`write(|w| ..)` method takes [ecr::W](ecr::W) writer structure" ] impl crate :: Writable for ECR { } # [ doc = "Error Counter" ] pub mod ecr { # [ doc = "Reader of register ECR" ] pub type R = crate :: R < u32 , super :: ECR > ; # [ doc = "Writer for register ECR" ] pub type W = crate :: W < u32 , super :: ECR > ; # [ doc = "Register ECR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ECR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXERRCNT`" ] pub type TXERRCNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXERRCNT`" ] pub struct TXERRCNT_W < 'a > { w : & 'a mut W , } impl < 'a > TXERRCNT_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `RXERRCNT`" ] pub type RXERRCNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXERRCNT`" ] pub struct RXERRCNT_W < 'a > { w : & 'a mut W , } impl < 'a > RXERRCNT_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Transmit Error Counter" ] # [ inline ( always ) ] pub fn txerrcnt ( & self ) -> TXERRCNT_R { TXERRCNT_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Receive Error Counter" ] # [ inline ( always ) ] pub fn rxerrcnt ( & self ) -> RXERRCNT_R { RXERRCNT_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Transmit Error Counter" ] # [ inline ( always ) ] pub fn txerrcnt ( & mut self ) -> TXERRCNT_W { TXERRCNT_W { w : self } } # [ doc = "Bits 8:15 - Receive Error Counter" ] # [ inline ( always ) ] pub fn rxerrcnt ( & mut self ) -> RXERRCNT_W { RXERRCNT_W { w : self } } } } # [ doc = "Error and Status 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [esr1](esr1) module" ] pub type ESR1 = crate :: Reg < u32 , _ESR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ESR1 ; # [ doc = "`read()` method returns [esr1::R](esr1::R) reader structure" ] impl crate :: Readable for ESR1 { } # [ doc = "`write(|w| ..)` method takes [esr1::W](esr1::W) writer structure" ] impl crate :: Writable for ESR1 { } # [ doc = "Error and Status 1 register" ] pub mod esr1 { # [ doc = "Reader of register ESR1" ] pub type R = crate :: R < u32 , super :: ESR1 > ; # [ doc = "Writer for register ESR1" ] pub type W = crate :: W < u32 , super :: ESR1 > ; # [ doc = "Register ESR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ESR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wake-Up Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: Indicates a recessive to dominant transition was received on the CAN bus." ] _1 } impl From < WAKINT_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKINT_A ) -> Self { match variant { WAKINT_A :: _0 => false , WAKINT_A :: _1 => true } } } # [ doc = "Reader of field `WAKINT`" ] pub type WAKINT_R = crate :: R < bool , WAKINT_A > ; impl WAKINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKINT_A { match self . bits { false => WAKINT_A :: _0 , true => WAKINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKINT_A :: _1 } } # [ doc = "Write proxy for field `WAKINT`" ] pub struct WAKINT_W < 'a > { w : & 'a mut W , } impl < 'a > WAKINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKINT_A :: _0 ) } # [ doc = "Indicates a recessive to dominant transition was received on the CAN bus." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKINT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Error Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: Indicates setting of any Error Bit in the Error and Status Register." ] _1 } impl From < ERRINT_A > for bool { # [ inline ( always ) ] fn from ( variant : ERRINT_A ) -> Self { match variant { ERRINT_A :: _0 => false , ERRINT_A :: _1 => true } } } # [ doc = "Reader of field `ERRINT`" ] pub type ERRINT_R = crate :: R < bool , ERRINT_A > ; impl ERRINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERRINT_A { match self . bits { false => ERRINT_A :: _0 , true => ERRINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERRINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERRINT_A :: _1 } } # [ doc = "Write proxy for field `ERRINT`" ] pub struct ERRINT_W < 'a > { w : & 'a mut W , } impl < 'a > ERRINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERRINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERRINT_A :: _0 ) } # [ doc = "Indicates setting of any Error Bit in the Error and Status Register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERRINT_A :: _1 ) } # [ 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 } } # [ doc = "Bus Off Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOFFINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: FlexCAN module entered Bus Off state." ] _1 } impl From < BOFFINT_A > for bool { # [ inline ( always ) ] fn from ( variant : BOFFINT_A ) -> Self { match variant { BOFFINT_A :: _0 => false , BOFFINT_A :: _1 => true } } } # [ doc = "Reader of field `BOFFINT`" ] pub type BOFFINT_R = crate :: R < bool , BOFFINT_A > ; impl BOFFINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOFFINT_A { match self . bits { false => BOFFINT_A :: _0 , true => BOFFINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOFFINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOFFINT_A :: _1 } } # [ doc = "Write proxy for field `BOFFINT`" ] pub struct BOFFINT_W < 'a > { w : & 'a mut W , } impl < 'a > BOFFINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOFFINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOFFINT_A :: _0 ) } # [ doc = "FlexCAN module entered Bus Off state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOFFINT_A :: _1 ) } # [ 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 = "FlexCAN In Reception\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX_A { # [ doc = "0: FlexCAN is not receiving a message." ] _0 , # [ doc = "1: FlexCAN is receiving a message." ] _1 } impl From < RX_A > for bool { # [ inline ( always ) ] fn from ( variant : RX_A ) -> Self { match variant { RX_A :: _0 => false , RX_A :: _1 => true } } } # [ doc = "Reader of field `RX`" ] pub type RX_R = crate :: R < bool , RX_A > ; impl RX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX_A { match self . bits { false => RX_A :: _0 , true => RX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX_A :: _1 } } # [ doc = "Fault Confinement State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLTCONF_A { # [ doc = "0: Error Active" ] _00 , # [ doc = "1: Error Passive" ] _01 } impl From < FLTCONF_A > for u8 { # [ inline ( always ) ] fn from ( variant : FLTCONF_A ) -> Self { match variant { FLTCONF_A :: _00 => 0 , FLTCONF_A :: _01 => 1 } } } # [ doc = "Reader of field `FLTCONF`" ] pub type FLTCONF_R = crate :: R < u8 , FLTCONF_A > ; impl FLTCONF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FLTCONF_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FLTCONF_A :: _00 ) , 1 => Val ( FLTCONF_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FLTCONF_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FLTCONF_A :: _01 } } # [ doc = "FlexCAN In Transmission\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TX_A { # [ doc = "0: FlexCAN is not transmitting a message." ] _0 , # [ doc = "1: FlexCAN is transmitting a message." ] _1 } impl From < TX_A > for bool { # [ inline ( always ) ] fn from ( variant : TX_A ) -> Self { match variant { TX_A :: _0 => false , TX_A :: _1 => true } } } # [ doc = "Reader of field `TX`" ] pub type TX_R = crate :: R < bool , TX_A > ; impl TX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TX_A { match self . bits { false => TX_A :: _0 , true => TX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TX_A :: _1 } } # [ doc = "This bit indicates when CAN bus is in IDLE state\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLE_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: CAN bus is now IDLE." ] _1 } impl From < IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLE_A ) -> Self { match variant { IDLE_A :: _0 => false , IDLE_A :: _1 => true } } } # [ doc = "Reader of field `IDLE`" ] pub type IDLE_R = crate :: R < bool , IDLE_A > ; impl IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLE_A { match self . bits { false => IDLE_A :: _0 , true => IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLE_A :: _1 } } # [ doc = "Rx Error Warning\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXWRN_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: RXERRCNT is greater than or equal to 96." ] _1 } impl From < RXWRN_A > for bool { # [ inline ( always ) ] fn from ( variant : RXWRN_A ) -> Self { match variant { RXWRN_A :: _0 => false , RXWRN_A :: _1 => true } } } # [ doc = "Reader of field `RXWRN`" ] pub type RXWRN_R = crate :: R < bool , RXWRN_A > ; impl RXWRN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXWRN_A { match self . bits { false => RXWRN_A :: _0 , true => RXWRN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXWRN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXWRN_A :: _1 } } # [ doc = "TX Error Warning\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXWRN_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: TXERRCNT is greater than or equal to 96." ] _1 } impl From < TXWRN_A > for bool { # [ inline ( always ) ] fn from ( variant : TXWRN_A ) -> Self { match variant { TXWRN_A :: _0 => false , TXWRN_A :: _1 => true } } } # [ doc = "Reader of field `TXWRN`" ] pub type TXWRN_R = crate :: R < bool , TXWRN_A > ; impl TXWRN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXWRN_A { match self . bits { false => TXWRN_A :: _0 , true => TXWRN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXWRN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXWRN_A :: _1 } } # [ doc = "Stuffing Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STFERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: A Stuffing Error occurred since last read of this register." ] _1 } impl From < STFERR_A > for bool { # [ inline ( always ) ] fn from ( variant : STFERR_A ) -> Self { match variant { STFERR_A :: _0 => false , STFERR_A :: _1 => true } } } # [ doc = "Reader of field `STFERR`" ] pub type STFERR_R = crate :: R < bool , STFERR_A > ; impl STFERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STFERR_A { match self . bits { false => STFERR_A :: _0 , true => STFERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STFERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STFERR_A :: _1 } } # [ doc = "Form Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRMERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: A Form Error occurred since last read of this register." ] _1 } impl From < FRMERR_A > for bool { # [ inline ( always ) ] fn from ( variant : FRMERR_A ) -> Self { match variant { FRMERR_A :: _0 => false , FRMERR_A :: _1 => true } } } # [ doc = "Reader of field `FRMERR`" ] pub type FRMERR_R = crate :: R < bool , FRMERR_A > ; impl FRMERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRMERR_A { match self . bits { false => FRMERR_A :: _0 , true => FRMERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRMERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRMERR_A :: _1 } } # [ doc = "Cyclic Redundancy Check Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: A CRC error occurred since last read of this register." ] _1 } impl From < CRCERR_A > for bool { # [ inline ( always ) ] fn from ( variant : CRCERR_A ) -> Self { match variant { CRCERR_A :: _0 => false , CRCERR_A :: _1 => true } } } # [ doc = "Reader of field `CRCERR`" ] pub type CRCERR_R = crate :: R < bool , CRCERR_A > ; impl CRCERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRCERR_A { match self . bits { false => CRCERR_A :: _0 , true => CRCERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRCERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRCERR_A :: _1 } } # [ doc = "Acknowledge Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACKERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: An ACK error occurred since last read of this register." ] _1 } impl From < ACKERR_A > for bool { # [ inline ( always ) ] fn from ( variant : ACKERR_A ) -> Self { match variant { ACKERR_A :: _0 => false , ACKERR_A :: _1 => true } } } # [ doc = "Reader of field `ACKERR`" ] pub type ACKERR_R = crate :: R < bool , ACKERR_A > ; impl ACKERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACKERR_A { match self . bits { false => ACKERR_A :: _0 , true => ACKERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACKERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACKERR_A :: _1 } } # [ doc = "Bit0 Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BIT0ERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: At least one bit sent as dominant is received as recessive." ] _1 } impl From < BIT0ERR_A > for bool { # [ inline ( always ) ] fn from ( variant : BIT0ERR_A ) -> Self { match variant { BIT0ERR_A :: _0 => false , BIT0ERR_A :: _1 => true } } } # [ doc = "Reader of field `BIT0ERR`" ] pub type BIT0ERR_R = crate :: R < bool , BIT0ERR_A > ; impl BIT0ERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BIT0ERR_A { match self . bits { false => BIT0ERR_A :: _0 , true => BIT0ERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BIT0ERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BIT0ERR_A :: _1 } } # [ doc = "Bit1 Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BIT1ERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: At least one bit sent as recessive is received as dominant." ] _1 } impl From < BIT1ERR_A > for bool { # [ inline ( always ) ] fn from ( variant : BIT1ERR_A ) -> Self { match variant { BIT1ERR_A :: _0 => false , BIT1ERR_A :: _1 => true } } } # [ doc = "Reader of field `BIT1ERR`" ] pub type BIT1ERR_R = crate :: R < bool , BIT1ERR_A > ; impl BIT1ERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BIT1ERR_A { match self . bits { false => BIT1ERR_A :: _0 , true => BIT1ERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BIT1ERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BIT1ERR_A :: _1 } } # [ doc = "Rx Warning Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWRNINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: The Rx error counter transitioned from less than 96 to greater than or equal to 96." ] _1 } impl From < RWRNINT_A > for bool { # [ inline ( always ) ] fn from ( variant : RWRNINT_A ) -> Self { match variant { RWRNINT_A :: _0 => false , RWRNINT_A :: _1 => true } } } # [ doc = "Reader of field `RWRNINT`" ] pub type RWRNINT_R = crate :: R < bool , RWRNINT_A > ; impl RWRNINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWRNINT_A { match self . bits { false => RWRNINT_A :: _0 , true => RWRNINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWRNINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWRNINT_A :: _1 } } # [ doc = "Write proxy for field `RWRNINT`" ] pub struct RWRNINT_W < 'a > { w : & 'a mut W , } impl < 'a > RWRNINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWRNINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWRNINT_A :: _0 ) } # [ doc = "The Rx error counter transitioned from less than 96 to greater than or equal to 96." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWRNINT_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Tx Warning Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWRNINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: The Tx error counter transitioned from less than 96 to greater than or equal to 96." ] _1 } impl From < TWRNINT_A > for bool { # [ inline ( always ) ] fn from ( variant : TWRNINT_A ) -> Self { match variant { TWRNINT_A :: _0 => false , TWRNINT_A :: _1 => true } } } # [ doc = "Reader of field `TWRNINT`" ] pub type TWRNINT_R = crate :: R < bool , TWRNINT_A > ; impl TWRNINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWRNINT_A { match self . bits { false => TWRNINT_A :: _0 , true => TWRNINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWRNINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWRNINT_A :: _1 } } # [ doc = "Write proxy for field `TWRNINT`" ] pub struct TWRNINT_W < 'a > { w : & 'a mut W , } impl < 'a > TWRNINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWRNINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWRNINT_A :: _0 ) } # [ doc = "The Tx error counter transitioned from less than 96 to greater than or equal to 96." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWRNINT_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "CAN Synchronization Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCH_A { # [ doc = "0: FlexCAN is not synchronized to the CAN bus." ] _0 , # [ doc = "1: FlexCAN is synchronized to the CAN bus." ] _1 } impl From < SYNCH_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCH_A ) -> Self { match variant { SYNCH_A :: _0 => false , SYNCH_A :: _1 => true } } } # [ doc = "Reader of field `SYNCH`" ] pub type SYNCH_R = crate :: R < bool , SYNCH_A > ; impl SYNCH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCH_A { match self . bits { false => SYNCH_A :: _0 , true => SYNCH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCH_A :: _1 } } impl R { # [ doc = "Bit 0 - Wake-Up Interrupt" ] # [ inline ( always ) ] pub fn wakint ( & self ) -> WAKINT_R { WAKINT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Error Interrupt" ] # [ inline ( always ) ] pub fn errint ( & self ) -> ERRINT_R { ERRINT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Bus Off Interrupt" ] # [ inline ( always ) ] pub fn boffint ( & self ) -> BOFFINT_R { BOFFINT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - FlexCAN In Reception" ] # [ inline ( always ) ] pub fn rx ( & self ) -> RX_R { RX_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:5 - Fault Confinement State" ] # [ inline ( always ) ] pub fn fltconf ( & self ) -> FLTCONF_R { FLTCONF_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bit 6 - FlexCAN In Transmission" ] # [ inline ( always ) ] pub fn tx ( & self ) -> TX_R { TX_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - This bit indicates when CAN bus is in IDLE state" ] # [ inline ( always ) ] pub fn idle ( & self ) -> IDLE_R { IDLE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx Error Warning" ] # [ inline ( always ) ] pub fn rxwrn ( & self ) -> RXWRN_R { RXWRN_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - TX Error Warning" ] # [ inline ( always ) ] pub fn txwrn ( & self ) -> TXWRN_R { TXWRN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Stuffing Error" ] # [ inline ( always ) ] pub fn stferr ( & self ) -> STFERR_R { STFERR_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Form Error" ] # [ inline ( always ) ] pub fn frmerr ( & self ) -> FRMERR_R { FRMERR_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Cyclic Redundancy Check Error" ] # [ inline ( always ) ] pub fn crcerr ( & self ) -> CRCERR_R { CRCERR_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Acknowledge Error" ] # [ inline ( always ) ] pub fn ackerr ( & self ) -> ACKERR_R { ACKERR_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Bit0 Error" ] # [ inline ( always ) ] pub fn bit0err ( & self ) -> BIT0ERR_R { BIT0ERR_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Bit1 Error" ] # [ inline ( always ) ] pub fn bit1err ( & self ) -> BIT1ERR_R { BIT1ERR_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx Warning Interrupt Flag" ] # [ inline ( always ) ] pub fn rwrnint ( & self ) -> RWRNINT_R { RWRNINT_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Tx Warning Interrupt Flag" ] # [ inline ( always ) ] pub fn twrnint ( & self ) -> TWRNINT_R { TWRNINT_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - CAN Synchronization Status" ] # [ inline ( always ) ] pub fn synch ( & self ) -> SYNCH_R { SYNCH_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Wake-Up Interrupt" ] # [ inline ( always ) ] pub fn wakint ( & mut self ) -> WAKINT_W { WAKINT_W { w : self } } # [ doc = "Bit 1 - Error Interrupt" ] # [ inline ( always ) ] pub fn errint ( & mut self ) -> ERRINT_W { ERRINT_W { w : self } } # [ doc = "Bit 2 - Bus Off Interrupt" ] # [ inline ( always ) ] pub fn boffint ( & mut self ) -> BOFFINT_W { BOFFINT_W { w : self } } # [ doc = "Bit 16 - Rx Warning Interrupt Flag" ] # [ inline ( always ) ] pub fn rwrnint ( & mut self ) -> RWRNINT_W { RWRNINT_W { w : self } } # [ doc = "Bit 17 - Tx Warning Interrupt Flag" ] # [ inline ( always ) ] pub fn twrnint ( & mut self ) -> TWRNINT_W { TWRNINT_W { w : self } } } } # [ doc = "Interrupt Masks 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [imask1](imask1) module" ] pub type IMASK1 = crate :: Reg < u32 , _IMASK1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IMASK1 ; # [ doc = "`read()` method returns [imask1::R](imask1::R) reader structure" ] impl crate :: Readable for IMASK1 { } # [ doc = "`write(|w| ..)` method takes [imask1::W](imask1::W) writer structure" ] impl crate :: Writable for IMASK1 { } # [ doc = "Interrupt Masks 1 register" ] pub mod imask1 { # [ doc = "Reader of register IMASK1" ] pub type R = crate :: R < u32 , super :: IMASK1 > ; # [ doc = "Writer for register IMASK1" ] pub type W = crate :: W < u32 , super :: IMASK1 > ; # [ doc = "Register IMASK1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IMASK1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM0_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM0_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM0_A ) -> Self { match variant { BUFLM0_A :: _0 => false , BUFLM0_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM0`" ] pub type BUFLM0_R = crate :: R < bool , BUFLM0_A > ; impl BUFLM0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM0_A { match self . bits { false => BUFLM0_A :: _0 , true => BUFLM0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM0_A :: _1 } } # [ doc = "Write proxy for field `BUFLM0`" ] pub struct BUFLM0_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM0_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM1_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM1_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM1_A ) -> Self { match variant { BUFLM1_A :: _0 => false , BUFLM1_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM1`" ] pub type BUFLM1_R = crate :: R < bool , BUFLM1_A > ; impl BUFLM1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM1_A { match self . bits { false => BUFLM1_A :: _0 , true => BUFLM1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM1_A :: _1 } } # [ doc = "Write proxy for field `BUFLM1`" ] pub struct BUFLM1_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM1_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM1_A :: _1 ) } # [ 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 } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM2_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM2_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM2_A ) -> Self { match variant { BUFLM2_A :: _0 => false , BUFLM2_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM2`" ] pub type BUFLM2_R = crate :: R < bool , BUFLM2_A > ; impl BUFLM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM2_A { match self . bits { false => BUFLM2_A :: _0 , true => BUFLM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM2_A :: _1 } } # [ doc = "Write proxy for field `BUFLM2`" ] pub struct BUFLM2_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM2_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM2_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM3_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM3_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM3_A ) -> Self { match variant { BUFLM3_A :: _0 => false , BUFLM3_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM3`" ] pub type BUFLM3_R = crate :: R < bool , BUFLM3_A > ; impl BUFLM3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM3_A { match self . bits { false => BUFLM3_A :: _0 , true => BUFLM3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM3_A :: _1 } } # [ doc = "Write proxy for field `BUFLM3`" ] pub struct BUFLM3_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM3_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM4_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM4_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM4_A ) -> Self { match variant { BUFLM4_A :: _0 => false , BUFLM4_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM4`" ] pub type BUFLM4_R = crate :: R < bool , BUFLM4_A > ; impl BUFLM4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM4_A { match self . bits { false => BUFLM4_A :: _0 , true => BUFLM4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM4_A :: _1 } } # [ doc = "Write proxy for field `BUFLM4`" ] pub struct BUFLM4_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM4_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM5_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM5_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM5_A ) -> Self { match variant { BUFLM5_A :: _0 => false , BUFLM5_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM5`" ] pub type BUFLM5_R = crate :: R < bool , BUFLM5_A > ; impl BUFLM5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM5_A { match self . bits { false => BUFLM5_A :: _0 , true => BUFLM5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM5_A :: _1 } } # [ doc = "Write proxy for field `BUFLM5`" ] pub struct BUFLM5_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM5_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM5_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM6_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM6_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM6_A ) -> Self { match variant { BUFLM6_A :: _0 => false , BUFLM6_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM6`" ] pub type BUFLM6_R = crate :: R < bool , BUFLM6_A > ; impl BUFLM6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM6_A { match self . bits { false => BUFLM6_A :: _0 , true => BUFLM6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM6_A :: _1 } } # [ doc = "Write proxy for field `BUFLM6`" ] pub struct BUFLM6_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM6_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM6_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM7_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM7_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM7_A ) -> Self { match variant { BUFLM7_A :: _0 => false , BUFLM7_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM7`" ] pub type BUFLM7_R = crate :: R < bool , BUFLM7_A > ; impl BUFLM7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM7_A { match self . bits { false => BUFLM7_A :: _0 , true => BUFLM7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM7_A :: _1 } } # [ doc = "Write proxy for field `BUFLM7`" ] pub struct BUFLM7_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM7_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM7_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM8_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM8_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM8_A ) -> Self { match variant { BUFLM8_A :: _0 => false , BUFLM8_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM8`" ] pub type BUFLM8_R = crate :: R < bool , BUFLM8_A > ; impl BUFLM8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM8_A { match self . bits { false => BUFLM8_A :: _0 , true => BUFLM8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM8_A :: _1 } } # [ doc = "Write proxy for field `BUFLM8`" ] pub struct BUFLM8_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM8_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM9_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM9_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM9_A ) -> Self { match variant { BUFLM9_A :: _0 => false , BUFLM9_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM9`" ] pub type BUFLM9_R = crate :: R < bool , BUFLM9_A > ; impl BUFLM9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM9_A { match self . bits { false => BUFLM9_A :: _0 , true => BUFLM9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM9_A :: _1 } } # [ doc = "Write proxy for field `BUFLM9`" ] pub struct BUFLM9_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM9_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM10_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM10_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM10_A ) -> Self { match variant { BUFLM10_A :: _0 => false , BUFLM10_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM10`" ] pub type BUFLM10_R = crate :: R < bool , BUFLM10_A > ; impl BUFLM10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM10_A { match self . bits { false => BUFLM10_A :: _0 , true => BUFLM10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM10_A :: _1 } } # [ doc = "Write proxy for field `BUFLM10`" ] pub struct BUFLM10_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM10_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM11_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM11_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM11_A ) -> Self { match variant { BUFLM11_A :: _0 => false , BUFLM11_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM11`" ] pub type BUFLM11_R = crate :: R < bool , BUFLM11_A > ; impl BUFLM11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM11_A { match self . bits { false => BUFLM11_A :: _0 , true => BUFLM11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM11_A :: _1 } } # [ doc = "Write proxy for field `BUFLM11`" ] pub struct BUFLM11_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM11_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM12_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM12_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM12_A ) -> Self { match variant { BUFLM12_A :: _0 => false , BUFLM12_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM12`" ] pub type BUFLM12_R = crate :: R < bool , BUFLM12_A > ; impl BUFLM12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM12_A { match self . bits { false => BUFLM12_A :: _0 , true => BUFLM12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM12_A :: _1 } } # [ doc = "Write proxy for field `BUFLM12`" ] pub struct BUFLM12_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM12_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM13_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM13_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM13_A ) -> Self { match variant { BUFLM13_A :: _0 => false , BUFLM13_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM13`" ] pub type BUFLM13_R = crate :: R < bool , BUFLM13_A > ; impl BUFLM13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM13_A { match self . bits { false => BUFLM13_A :: _0 , true => BUFLM13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM13_A :: _1 } } # [ doc = "Write proxy for field `BUFLM13`" ] pub struct BUFLM13_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM13_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM13_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM14_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM14_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM14_A ) -> Self { match variant { BUFLM14_A :: _0 => false , BUFLM14_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM14`" ] pub type BUFLM14_R = crate :: R < bool , BUFLM14_A > ; impl BUFLM14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM14_A { match self . bits { false => BUFLM14_A :: _0 , true => BUFLM14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM14_A :: _1 } } # [ doc = "Write proxy for field `BUFLM14`" ] pub struct BUFLM14_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM14_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM15_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM15_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM15_A ) -> Self { match variant { BUFLM15_A :: _0 => false , BUFLM15_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM15`" ] pub type BUFLM15_R = crate :: R < bool , BUFLM15_A > ; impl BUFLM15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM15_A { match self . bits { false => BUFLM15_A :: _0 , true => BUFLM15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM15_A :: _1 } } # [ doc = "Write proxy for field `BUFLM15`" ] pub struct BUFLM15_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM15_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM16_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM16_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM16_A ) -> Self { match variant { BUFLM16_A :: _0 => false , BUFLM16_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM16`" ] pub type BUFLM16_R = crate :: R < bool , BUFLM16_A > ; impl BUFLM16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM16_A { match self . bits { false => BUFLM16_A :: _0 , true => BUFLM16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM16_A :: _1 } } # [ doc = "Write proxy for field `BUFLM16`" ] pub struct BUFLM16_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM16_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM17_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM17_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM17_A ) -> Self { match variant { BUFLM17_A :: _0 => false , BUFLM17_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM17`" ] pub type BUFLM17_R = crate :: R < bool , BUFLM17_A > ; impl BUFLM17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM17_A { match self . bits { false => BUFLM17_A :: _0 , true => BUFLM17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM17_A :: _1 } } # [ doc = "Write proxy for field `BUFLM17`" ] pub struct BUFLM17_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM17_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM18_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM18_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM18_A ) -> Self { match variant { BUFLM18_A :: _0 => false , BUFLM18_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM18`" ] pub type BUFLM18_R = crate :: R < bool , BUFLM18_A > ; impl BUFLM18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM18_A { match self . bits { false => BUFLM18_A :: _0 , true => BUFLM18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM18_A :: _1 } } # [ doc = "Write proxy for field `BUFLM18`" ] pub struct BUFLM18_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM18_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM19_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM19_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM19_A ) -> Self { match variant { BUFLM19_A :: _0 => false , BUFLM19_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM19`" ] pub type BUFLM19_R = crate :: R < bool , BUFLM19_A > ; impl BUFLM19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM19_A { match self . bits { false => BUFLM19_A :: _0 , true => BUFLM19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM19_A :: _1 } } # [ doc = "Write proxy for field `BUFLM19`" ] pub struct BUFLM19_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM19_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM20_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM20_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM20_A ) -> Self { match variant { BUFLM20_A :: _0 => false , BUFLM20_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM20`" ] pub type BUFLM20_R = crate :: R < bool , BUFLM20_A > ; impl BUFLM20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM20_A { match self . bits { false => BUFLM20_A :: _0 , true => BUFLM20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM20_A :: _1 } } # [ doc = "Write proxy for field `BUFLM20`" ] pub struct BUFLM20_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM20_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM20_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM21_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM21_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM21_A ) -> Self { match variant { BUFLM21_A :: _0 => false , BUFLM21_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM21`" ] pub type BUFLM21_R = crate :: R < bool , BUFLM21_A > ; impl BUFLM21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM21_A { match self . bits { false => BUFLM21_A :: _0 , true => BUFLM21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM21_A :: _1 } } # [ doc = "Write proxy for field `BUFLM21`" ] pub struct BUFLM21_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM21_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM21_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM22_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM22_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM22_A ) -> Self { match variant { BUFLM22_A :: _0 => false , BUFLM22_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM22`" ] pub type BUFLM22_R = crate :: R < bool , BUFLM22_A > ; impl BUFLM22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM22_A { match self . bits { false => BUFLM22_A :: _0 , true => BUFLM22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM22_A :: _1 } } # [ doc = "Write proxy for field `BUFLM22`" ] pub struct BUFLM22_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM22_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM23_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM23_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM23_A ) -> Self { match variant { BUFLM23_A :: _0 => false , BUFLM23_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM23`" ] pub type BUFLM23_R = crate :: R < bool , BUFLM23_A > ; impl BUFLM23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM23_A { match self . bits { false => BUFLM23_A :: _0 , true => BUFLM23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM23_A :: _1 } } # [ doc = "Write proxy for field `BUFLM23`" ] pub struct BUFLM23_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM23_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM24_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM24_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM24_A ) -> Self { match variant { BUFLM24_A :: _0 => false , BUFLM24_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM24`" ] pub type BUFLM24_R = crate :: R < bool , BUFLM24_A > ; impl BUFLM24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM24_A { match self . bits { false => BUFLM24_A :: _0 , true => BUFLM24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM24_A :: _1 } } # [ doc = "Write proxy for field `BUFLM24`" ] pub struct BUFLM24_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM24_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM24_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM25_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM25_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM25_A ) -> Self { match variant { BUFLM25_A :: _0 => false , BUFLM25_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM25`" ] pub type BUFLM25_R = crate :: R < bool , BUFLM25_A > ; impl BUFLM25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM25_A { match self . bits { false => BUFLM25_A :: _0 , true => BUFLM25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM25_A :: _1 } } # [ doc = "Write proxy for field `BUFLM25`" ] pub struct BUFLM25_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM25_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM25_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM26_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM26_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM26_A ) -> Self { match variant { BUFLM26_A :: _0 => false , BUFLM26_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM26`" ] pub type BUFLM26_R = crate :: R < bool , BUFLM26_A > ; impl BUFLM26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM26_A { match self . bits { false => BUFLM26_A :: _0 , true => BUFLM26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM26_A :: _1 } } # [ doc = "Write proxy for field `BUFLM26`" ] pub struct BUFLM26_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM26_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM26_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM27_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM27_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM27_A ) -> Self { match variant { BUFLM27_A :: _0 => false , BUFLM27_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM27`" ] pub type BUFLM27_R = crate :: R < bool , BUFLM27_A > ; impl BUFLM27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM27_A { match self . bits { false => BUFLM27_A :: _0 , true => BUFLM27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM27_A :: _1 } } # [ doc = "Write proxy for field `BUFLM27`" ] pub struct BUFLM27_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM27_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM28_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM28_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM28_A ) -> Self { match variant { BUFLM28_A :: _0 => false , BUFLM28_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM28`" ] pub type BUFLM28_R = crate :: R < bool , BUFLM28_A > ; impl BUFLM28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM28_A { match self . bits { false => BUFLM28_A :: _0 , true => BUFLM28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM28_A :: _1 } } # [ doc = "Write proxy for field `BUFLM28`" ] pub struct BUFLM28_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM28_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM29_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM29_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM29_A ) -> Self { match variant { BUFLM29_A :: _0 => false , BUFLM29_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM29`" ] pub type BUFLM29_R = crate :: R < bool , BUFLM29_A > ; impl BUFLM29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM29_A { match self . bits { false => BUFLM29_A :: _0 , true => BUFLM29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM29_A :: _1 } } # [ doc = "Write proxy for field `BUFLM29`" ] pub struct BUFLM29_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM29_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM30_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM30_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM30_A ) -> Self { match variant { BUFLM30_A :: _0 => false , BUFLM30_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM30`" ] pub type BUFLM30_R = crate :: R < bool , BUFLM30_A > ; impl BUFLM30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM30_A { match self . bits { false => BUFLM30_A :: _0 , true => BUFLM30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM30_A :: _1 } } # [ doc = "Write proxy for field `BUFLM30`" ] pub struct BUFLM30_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM30_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM31_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM31_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM31_A ) -> Self { match variant { BUFLM31_A :: _0 => false , BUFLM31_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM31`" ] pub type BUFLM31_R = crate :: R < bool , BUFLM31_A > ; impl BUFLM31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM31_A { match self . bits { false => BUFLM31_A :: _0 , true => BUFLM31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM31_A :: _1 } } # [ doc = "Write proxy for field `BUFLM31`" ] pub struct BUFLM31_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM31_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm0 ( & self ) -> BUFLM0_R { BUFLM0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm1 ( & self ) -> BUFLM1_R { BUFLM1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm2 ( & self ) -> BUFLM2_R { BUFLM2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm3 ( & self ) -> BUFLM3_R { BUFLM3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm4 ( & self ) -> BUFLM4_R { BUFLM4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm5 ( & self ) -> BUFLM5_R { BUFLM5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm6 ( & self ) -> BUFLM6_R { BUFLM6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm7 ( & self ) -> BUFLM7_R { BUFLM7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm8 ( & self ) -> BUFLM8_R { BUFLM8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm9 ( & self ) -> BUFLM9_R { BUFLM9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm10 ( & self ) -> BUFLM10_R { BUFLM10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm11 ( & self ) -> BUFLM11_R { BUFLM11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm12 ( & self ) -> BUFLM12_R { BUFLM12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm13 ( & self ) -> BUFLM13_R { BUFLM13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm14 ( & self ) -> BUFLM14_R { BUFLM14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm15 ( & self ) -> BUFLM15_R { BUFLM15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm16 ( & self ) -> BUFLM16_R { BUFLM16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm17 ( & self ) -> BUFLM17_R { BUFLM17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm18 ( & self ) -> BUFLM18_R { BUFLM18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm19 ( & self ) -> BUFLM19_R { BUFLM19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm20 ( & self ) -> BUFLM20_R { BUFLM20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm21 ( & self ) -> BUFLM21_R { BUFLM21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm22 ( & self ) -> BUFLM22_R { BUFLM22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm23 ( & self ) -> BUFLM23_R { BUFLM23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm24 ( & self ) -> BUFLM24_R { BUFLM24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm25 ( & self ) -> BUFLM25_R { BUFLM25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm26 ( & self ) -> BUFLM26_R { BUFLM26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm27 ( & self ) -> BUFLM27_R { BUFLM27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm28 ( & self ) -> BUFLM28_R { BUFLM28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm29 ( & self ) -> BUFLM29_R { BUFLM29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm30 ( & self ) -> BUFLM30_R { BUFLM30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm31 ( & self ) -> BUFLM31_R { BUFLM31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm0 ( & mut self ) -> BUFLM0_W { BUFLM0_W { w : self } } # [ doc = "Bit 1 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm1 ( & mut self ) -> BUFLM1_W { BUFLM1_W { w : self } } # [ doc = "Bit 2 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm2 ( & mut self ) -> BUFLM2_W { BUFLM2_W { w : self } } # [ doc = "Bit 3 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm3 ( & mut self ) -> BUFLM3_W { BUFLM3_W { w : self } } # [ doc = "Bit 4 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm4 ( & mut self ) -> BUFLM4_W { BUFLM4_W { w : self } } # [ doc = "Bit 5 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm5 ( & mut self ) -> BUFLM5_W { BUFLM5_W { w : self } } # [ doc = "Bit 6 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm6 ( & mut self ) -> BUFLM6_W { BUFLM6_W { w : self } } # [ doc = "Bit 7 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm7 ( & mut self ) -> BUFLM7_W { BUFLM7_W { w : self } } # [ doc = "Bit 8 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm8 ( & mut self ) -> BUFLM8_W { BUFLM8_W { w : self } } # [ doc = "Bit 9 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm9 ( & mut self ) -> BUFLM9_W { BUFLM9_W { w : self } } # [ doc = "Bit 10 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm10 ( & mut self ) -> BUFLM10_W { BUFLM10_W { w : self } } # [ doc = "Bit 11 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm11 ( & mut self ) -> BUFLM11_W { BUFLM11_W { w : self } } # [ doc = "Bit 12 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm12 ( & mut self ) -> BUFLM12_W { BUFLM12_W { w : self } } # [ doc = "Bit 13 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm13 ( & mut self ) -> BUFLM13_W { BUFLM13_W { w : self } } # [ doc = "Bit 14 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm14 ( & mut self ) -> BUFLM14_W { BUFLM14_W { w : self } } # [ doc = "Bit 15 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm15 ( & mut self ) -> BUFLM15_W { BUFLM15_W { w : self } } # [ doc = "Bit 16 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm16 ( & mut self ) -> BUFLM16_W { BUFLM16_W { w : self } } # [ doc = "Bit 17 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm17 ( & mut self ) -> BUFLM17_W { BUFLM17_W { w : self } } # [ doc = "Bit 18 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm18 ( & mut self ) -> BUFLM18_W { BUFLM18_W { w : self } } # [ doc = "Bit 19 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm19 ( & mut self ) -> BUFLM19_W { BUFLM19_W { w : self } } # [ doc = "Bit 20 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm20 ( & mut self ) -> BUFLM20_W { BUFLM20_W { w : self } } # [ doc = "Bit 21 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm21 ( & mut self ) -> BUFLM21_W { BUFLM21_W { w : self } } # [ doc = "Bit 22 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm22 ( & mut self ) -> BUFLM22_W { BUFLM22_W { w : self } } # [ doc = "Bit 23 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm23 ( & mut self ) -> BUFLM23_W { BUFLM23_W { w : self } } # [ doc = "Bit 24 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm24 ( & mut self ) -> BUFLM24_W { BUFLM24_W { w : self } } # [ doc = "Bit 25 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm25 ( & mut self ) -> BUFLM25_W { BUFLM25_W { w : self } } # [ doc = "Bit 26 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm26 ( & mut self ) -> BUFLM26_W { BUFLM26_W { w : self } } # [ doc = "Bit 27 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm27 ( & mut self ) -> BUFLM27_W { BUFLM27_W { w : self } } # [ doc = "Bit 28 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm28 ( & mut self ) -> BUFLM28_W { BUFLM28_W { w : self } } # [ doc = "Bit 29 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm29 ( & mut self ) -> BUFLM29_W { BUFLM29_W { w : self } } # [ doc = "Bit 30 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm30 ( & mut self ) -> BUFLM30_W { BUFLM30_W { w : self } } # [ doc = "Bit 31 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm31 ( & mut self ) -> BUFLM31_W { BUFLM31_W { w : self } } } } # [ doc = "Interrupt Flags 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [iflag1](iflag1) module" ] pub type IFLAG1 = crate :: Reg < u32 , _IFLAG1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IFLAG1 ; # [ doc = "`read()` method returns [iflag1::R](iflag1::R) reader structure" ] impl crate :: Readable for IFLAG1 { } # [ doc = "`write(|w| ..)` method takes [iflag1::W](iflag1::W) writer structure" ] impl crate :: Writable for IFLAG1 { } # [ doc = "Interrupt Flags 1 register" ] pub mod iflag1 { # [ doc = "Reader of register IFLAG1" ] pub type R = crate :: R < u32 , super :: IFLAG1 > ; # [ doc = "Writer for register IFLAG1" ] pub type W = crate :: W < u32 , super :: IFLAG1 > ; # [ doc = "Register IFLAG1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IFLAG1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Buffer MB0 Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF0I_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF0I_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF0I_A ) -> Self { match variant { BUF0I_A :: _0 => false , BUF0I_A :: _1 => true } } } # [ doc = "Reader of field `BUF0I`" ] pub type BUF0I_R = crate :: R < bool , BUF0I_A > ; impl BUF0I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF0I_A { match self . bits { false => BUF0I_A :: _0 , true => BUF0I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF0I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF0I_A :: _1 } } # [ doc = "Write proxy for field `BUF0I`" ] pub struct BUF0I_W < 'a > { w : & 'a mut W , } impl < 'a > BUF0I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF0I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF0I_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF0I_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Buffer MB i Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF4TO1I0_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF4TO1I0_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF4TO1I0_A ) -> Self { match variant { BUF4TO1I0_A :: _0 => false , BUF4TO1I0_A :: _1 => true } } } # [ doc = "Reader of field `BUF4TO1I0`" ] pub type BUF4TO1I0_R = crate :: R < bool , BUF4TO1I0_A > ; impl BUF4TO1I0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF4TO1I0_A { match self . bits { false => BUF4TO1I0_A :: _0 , true => BUF4TO1I0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF4TO1I0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF4TO1I0_A :: _1 } } # [ doc = "Write proxy for field `BUF4TO1I0`" ] pub struct BUF4TO1I0_W < 'a > { w : & 'a mut W , } impl < 'a > BUF4TO1I0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF4TO1I0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I0_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I0_A :: _1 ) } # [ 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 } } # [ doc = "Buffer MB i Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF4TO1I1_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF4TO1I1_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF4TO1I1_A ) -> Self { match variant { BUF4TO1I1_A :: _0 => false , BUF4TO1I1_A :: _1 => true } } } # [ doc = "Reader of field `BUF4TO1I1`" ] pub type BUF4TO1I1_R = crate :: R < bool , BUF4TO1I1_A > ; impl BUF4TO1I1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF4TO1I1_A { match self . bits { false => BUF4TO1I1_A :: _0 , true => BUF4TO1I1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF4TO1I1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF4TO1I1_A :: _1 } } # [ doc = "Write proxy for field `BUF4TO1I1`" ] pub struct BUF4TO1I1_W < 'a > { w : & 'a mut W , } impl < 'a > BUF4TO1I1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF4TO1I1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I1_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I1_A :: _1 ) } # [ 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 = "Buffer MB i Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF4TO1I2_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF4TO1I2_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF4TO1I2_A ) -> Self { match variant { BUF4TO1I2_A :: _0 => false , BUF4TO1I2_A :: _1 => true } } } # [ doc = "Reader of field `BUF4TO1I2`" ] pub type BUF4TO1I2_R = crate :: R < bool , BUF4TO1I2_A > ; impl BUF4TO1I2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF4TO1I2_A { match self . bits { false => BUF4TO1I2_A :: _0 , true => BUF4TO1I2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF4TO1I2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF4TO1I2_A :: _1 } } # [ doc = "Write proxy for field `BUF4TO1I2`" ] pub struct BUF4TO1I2_W < 'a > { w : & 'a mut W , } impl < 'a > BUF4TO1I2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF4TO1I2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I2_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I2_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Buffer MB i Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF4TO1I3_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF4TO1I3_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF4TO1I3_A ) -> Self { match variant { BUF4TO1I3_A :: _0 => false , BUF4TO1I3_A :: _1 => true } } } # [ doc = "Reader of field `BUF4TO1I3`" ] pub type BUF4TO1I3_R = crate :: R < bool , BUF4TO1I3_A > ; impl BUF4TO1I3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF4TO1I3_A { match self . bits { false => BUF4TO1I3_A :: _0 , true => BUF4TO1I3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF4TO1I3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF4TO1I3_A :: _1 } } # [ doc = "Write proxy for field `BUF4TO1I3`" ] pub struct BUF4TO1I3_W < 'a > { w : & 'a mut W , } impl < 'a > BUF4TO1I3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF4TO1I3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I3_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I3_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Buffer MB5 Interrupt Or \"Frames available in Rx FIFO\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF5I_A { # [ doc = "0: No occurrence of MB5 completing transmission/reception when MCR\\[RFEN\\]=0, or of frame(s) available in the FIFO, when MCR\\[RFEN\\]=1" ] _0 , # [ doc = "1: MB5 completed transmission/reception when MCR\\[RFEN\\]=0, or frame(s) available in the Rx FIFO when MCR\\[RFEN\\]=1" ] _1 } impl From < BUF5I_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF5I_A ) -> Self { match variant { BUF5I_A :: _0 => false , BUF5I_A :: _1 => true } } } # [ doc = "Reader of field `BUF5I`" ] pub type BUF5I_R = crate :: R < bool , BUF5I_A > ; impl BUF5I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF5I_A { match self . bits { false => BUF5I_A :: _0 , true => BUF5I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF5I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF5I_A :: _1 } } # [ doc = "Write proxy for field `BUF5I`" ] pub struct BUF5I_W < 'a > { w : & 'a mut W , } impl < 'a > BUF5I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF5I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No occurrence of MB5 completing transmission/reception when MCR\\[RFEN\\]=0, or of frame(s) available in the FIFO, when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF5I_A :: _0 ) } # [ doc = "MB5 completed transmission/reception when MCR\\[RFEN\\]=0, or frame(s) available in the Rx FIFO when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF5I_A :: _1 ) } # [ 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 = "Buffer MB6 Interrupt Or \"Rx FIFO Warning\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF6I_A { # [ doc = "0: No occurrence of MB6 completing transmission/reception when MCR\\[RFEN\\]=0, or of Rx FIFO almost full when MCR\\[RFEN\\]=1" ] _0 , # [ doc = "1: MB6 completed transmission/reception when MCR\\[RFEN\\]=0, or Rx FIFO almost full when MCR\\[RFEN\\]=1" ] _1 } impl From < BUF6I_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF6I_A ) -> Self { match variant { BUF6I_A :: _0 => false , BUF6I_A :: _1 => true } } } # [ doc = "Reader of field `BUF6I`" ] pub type BUF6I_R = crate :: R < bool , BUF6I_A > ; impl BUF6I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF6I_A { match self . bits { false => BUF6I_A :: _0 , true => BUF6I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF6I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF6I_A :: _1 } } # [ doc = "Write proxy for field `BUF6I`" ] pub struct BUF6I_W < 'a > { w : & 'a mut W , } impl < 'a > BUF6I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF6I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No occurrence of MB6 completing transmission/reception when MCR\\[RFEN\\]=0, or of Rx FIFO almost full when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF6I_A :: _0 ) } # [ doc = "MB6 completed transmission/reception when MCR\\[RFEN\\]=0, or Rx FIFO almost full when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF6I_A :: _1 ) } # [ 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 = "Buffer MB7 Interrupt Or \"Rx FIFO Overflow\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF7I_A { # [ doc = "0: No occurrence of MB7 completing transmission/reception when MCR\\[RFEN\\]=0, or of Rx FIFO overflow when MCR\\[RFEN\\]=1" ] _0 , # [ doc = "1: MB7 completed transmission/reception when MCR\\[RFEN\\]=0, or Rx FIFO overflow when MCR\\[RFEN\\]=1" ] _1 } impl From < BUF7I_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF7I_A ) -> Self { match variant { BUF7I_A :: _0 => false , BUF7I_A :: _1 => true } } } # [ doc = "Reader of field `BUF7I`" ] pub type BUF7I_R = crate :: R < bool , BUF7I_A > ; impl BUF7I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF7I_A { match self . bits { false => BUF7I_A :: _0 , true => BUF7I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF7I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF7I_A :: _1 } } # [ doc = "Write proxy for field `BUF7I`" ] pub struct BUF7I_W < 'a > { w : & 'a mut W , } impl < 'a > BUF7I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF7I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No occurrence of MB7 completing transmission/reception when MCR\\[RFEN\\]=0, or of Rx FIFO overflow when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF7I_A :: _0 ) } # [ doc = "MB7 completed transmission/reception when MCR\\[RFEN\\]=0, or Rx FIFO overflow when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF7I_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I0_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I0_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I0_A ) -> Self { match variant { BUF31TO8I0_A :: _0 => false , BUF31TO8I0_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I0`" ] pub type BUF31TO8I0_R = crate :: R < bool , BUF31TO8I0_A > ; impl BUF31TO8I0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I0_A { match self . bits { false => BUF31TO8I0_A :: _0 , true => BUF31TO8I0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I0_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I0`" ] pub struct BUF31TO8I0_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I0_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I0_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I1_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I1_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I1_A ) -> Self { match variant { BUF31TO8I1_A :: _0 => false , BUF31TO8I1_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I1`" ] pub type BUF31TO8I1_R = crate :: R < bool , BUF31TO8I1_A > ; impl BUF31TO8I1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I1_A { match self . bits { false => BUF31TO8I1_A :: _0 , true => BUF31TO8I1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I1_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I1`" ] pub struct BUF31TO8I1_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I1_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I1_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I2_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I2_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I2_A ) -> Self { match variant { BUF31TO8I2_A :: _0 => false , BUF31TO8I2_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I2`" ] pub type BUF31TO8I2_R = crate :: R < bool , BUF31TO8I2_A > ; impl BUF31TO8I2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I2_A { match self . bits { false => BUF31TO8I2_A :: _0 , true => BUF31TO8I2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I2_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I2`" ] pub struct BUF31TO8I2_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I2_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I2_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I3_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I3_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I3_A ) -> Self { match variant { BUF31TO8I3_A :: _0 => false , BUF31TO8I3_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I3`" ] pub type BUF31TO8I3_R = crate :: R < bool , BUF31TO8I3_A > ; impl BUF31TO8I3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I3_A { match self . bits { false => BUF31TO8I3_A :: _0 , true => BUF31TO8I3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I3_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I3`" ] pub struct BUF31TO8I3_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I3_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I3_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I4_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I4_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I4_A ) -> Self { match variant { BUF31TO8I4_A :: _0 => false , BUF31TO8I4_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I4`" ] pub type BUF31TO8I4_R = crate :: R < bool , BUF31TO8I4_A > ; impl BUF31TO8I4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I4_A { match self . bits { false => BUF31TO8I4_A :: _0 , true => BUF31TO8I4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I4_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I4`" ] pub struct BUF31TO8I4_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I4_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I5_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I5_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I5_A ) -> Self { match variant { BUF31TO8I5_A :: _0 => false , BUF31TO8I5_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I5`" ] pub type BUF31TO8I5_R = crate :: R < bool , BUF31TO8I5_A > ; impl BUF31TO8I5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I5_A { match self . bits { false => BUF31TO8I5_A :: _0 , true => BUF31TO8I5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I5_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I5`" ] pub struct BUF31TO8I5_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I5_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I5_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I6_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I6_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I6_A ) -> Self { match variant { BUF31TO8I6_A :: _0 => false , BUF31TO8I6_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I6`" ] pub type BUF31TO8I6_R = crate :: R < bool , BUF31TO8I6_A > ; impl BUF31TO8I6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I6_A { match self . bits { false => BUF31TO8I6_A :: _0 , true => BUF31TO8I6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I6_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I6`" ] pub struct BUF31TO8I6_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I6_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I6_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I7_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I7_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I7_A ) -> Self { match variant { BUF31TO8I7_A :: _0 => false , BUF31TO8I7_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I7`" ] pub type BUF31TO8I7_R = crate :: R < bool , BUF31TO8I7_A > ; impl BUF31TO8I7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I7_A { match self . bits { false => BUF31TO8I7_A :: _0 , true => BUF31TO8I7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I7_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I7`" ] pub struct BUF31TO8I7_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I7_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I7_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I8_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I8_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I8_A ) -> Self { match variant { BUF31TO8I8_A :: _0 => false , BUF31TO8I8_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I8`" ] pub type BUF31TO8I8_R = crate :: R < bool , BUF31TO8I8_A > ; impl BUF31TO8I8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I8_A { match self . bits { false => BUF31TO8I8_A :: _0 , true => BUF31TO8I8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I8_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I8`" ] pub struct BUF31TO8I8_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I8_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I8_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I9_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I9_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I9_A ) -> Self { match variant { BUF31TO8I9_A :: _0 => false , BUF31TO8I9_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I9`" ] pub type BUF31TO8I9_R = crate :: R < bool , BUF31TO8I9_A > ; impl BUF31TO8I9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I9_A { match self . bits { false => BUF31TO8I9_A :: _0 , true => BUF31TO8I9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I9_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I9`" ] pub struct BUF31TO8I9_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I9_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I9_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I10_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I10_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I10_A ) -> Self { match variant { BUF31TO8I10_A :: _0 => false , BUF31TO8I10_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I10`" ] pub type BUF31TO8I10_R = crate :: R < bool , BUF31TO8I10_A > ; impl BUF31TO8I10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I10_A { match self . bits { false => BUF31TO8I10_A :: _0 , true => BUF31TO8I10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I10_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I10`" ] pub struct BUF31TO8I10_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I10_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I10_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I11_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I11_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I11_A ) -> Self { match variant { BUF31TO8I11_A :: _0 => false , BUF31TO8I11_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I11`" ] pub type BUF31TO8I11_R = crate :: R < bool , BUF31TO8I11_A > ; impl BUF31TO8I11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I11_A { match self . bits { false => BUF31TO8I11_A :: _0 , true => BUF31TO8I11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I11_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I11`" ] pub struct BUF31TO8I11_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I11_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I11_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I12_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I12_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I12_A ) -> Self { match variant { BUF31TO8I12_A :: _0 => false , BUF31TO8I12_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I12`" ] pub type BUF31TO8I12_R = crate :: R < bool , BUF31TO8I12_A > ; impl BUF31TO8I12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I12_A { match self . bits { false => BUF31TO8I12_A :: _0 , true => BUF31TO8I12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I12_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I12`" ] pub struct BUF31TO8I12_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I12_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I12_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I13_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I13_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I13_A ) -> Self { match variant { BUF31TO8I13_A :: _0 => false , BUF31TO8I13_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I13`" ] pub type BUF31TO8I13_R = crate :: R < bool , BUF31TO8I13_A > ; impl BUF31TO8I13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I13_A { match self . bits { false => BUF31TO8I13_A :: _0 , true => BUF31TO8I13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I13_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I13`" ] pub struct BUF31TO8I13_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I13_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I13_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I14_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I14_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I14_A ) -> Self { match variant { BUF31TO8I14_A :: _0 => false , BUF31TO8I14_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I14`" ] pub type BUF31TO8I14_R = crate :: R < bool , BUF31TO8I14_A > ; impl BUF31TO8I14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I14_A { match self . bits { false => BUF31TO8I14_A :: _0 , true => BUF31TO8I14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I14_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I14`" ] pub struct BUF31TO8I14_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I14_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I14_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I15_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I15_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I15_A ) -> Self { match variant { BUF31TO8I15_A :: _0 => false , BUF31TO8I15_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I15`" ] pub type BUF31TO8I15_R = crate :: R < bool , BUF31TO8I15_A > ; impl BUF31TO8I15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I15_A { match self . bits { false => BUF31TO8I15_A :: _0 , true => BUF31TO8I15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I15_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I15`" ] pub struct BUF31TO8I15_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I15_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I15_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I16_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I16_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I16_A ) -> Self { match variant { BUF31TO8I16_A :: _0 => false , BUF31TO8I16_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I16`" ] pub type BUF31TO8I16_R = crate :: R < bool , BUF31TO8I16_A > ; impl BUF31TO8I16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I16_A { match self . bits { false => BUF31TO8I16_A :: _0 , true => BUF31TO8I16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I16_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I16`" ] pub struct BUF31TO8I16_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I16_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I16_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I17_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I17_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I17_A ) -> Self { match variant { BUF31TO8I17_A :: _0 => false , BUF31TO8I17_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I17`" ] pub type BUF31TO8I17_R = crate :: R < bool , BUF31TO8I17_A > ; impl BUF31TO8I17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I17_A { match self . bits { false => BUF31TO8I17_A :: _0 , true => BUF31TO8I17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I17_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I17`" ] pub struct BUF31TO8I17_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I17_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I17_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I18_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I18_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I18_A ) -> Self { match variant { BUF31TO8I18_A :: _0 => false , BUF31TO8I18_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I18`" ] pub type BUF31TO8I18_R = crate :: R < bool , BUF31TO8I18_A > ; impl BUF31TO8I18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I18_A { match self . bits { false => BUF31TO8I18_A :: _0 , true => BUF31TO8I18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I18_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I18`" ] pub struct BUF31TO8I18_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I18_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I18_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I19_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I19_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I19_A ) -> Self { match variant { BUF31TO8I19_A :: _0 => false , BUF31TO8I19_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I19`" ] pub type BUF31TO8I19_R = crate :: R < bool , BUF31TO8I19_A > ; impl BUF31TO8I19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I19_A { match self . bits { false => BUF31TO8I19_A :: _0 , true => BUF31TO8I19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I19_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I19`" ] pub struct BUF31TO8I19_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I19_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I19_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I20_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I20_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I20_A ) -> Self { match variant { BUF31TO8I20_A :: _0 => false , BUF31TO8I20_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I20`" ] pub type BUF31TO8I20_R = crate :: R < bool , BUF31TO8I20_A > ; impl BUF31TO8I20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I20_A { match self . bits { false => BUF31TO8I20_A :: _0 , true => BUF31TO8I20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I20_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I20`" ] pub struct BUF31TO8I20_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I20_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I20_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I21_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I21_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I21_A ) -> Self { match variant { BUF31TO8I21_A :: _0 => false , BUF31TO8I21_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I21`" ] pub type BUF31TO8I21_R = crate :: R < bool , BUF31TO8I21_A > ; impl BUF31TO8I21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I21_A { match self . bits { false => BUF31TO8I21_A :: _0 , true => BUF31TO8I21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I21_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I21`" ] pub struct BUF31TO8I21_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I21_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I21_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I22_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I22_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I22_A ) -> Self { match variant { BUF31TO8I22_A :: _0 => false , BUF31TO8I22_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I22`" ] pub type BUF31TO8I22_R = crate :: R < bool , BUF31TO8I22_A > ; impl BUF31TO8I22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I22_A { match self . bits { false => BUF31TO8I22_A :: _0 , true => BUF31TO8I22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I22_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I22`" ] pub struct BUF31TO8I22_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I22_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I22_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I23_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I23_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I23_A ) -> Self { match variant { BUF31TO8I23_A :: _0 => false , BUF31TO8I23_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I23`" ] pub type BUF31TO8I23_R = crate :: R < bool , BUF31TO8I23_A > ; impl BUF31TO8I23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I23_A { match self . bits { false => BUF31TO8I23_A :: _0 , true => BUF31TO8I23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I23_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I23`" ] pub struct BUF31TO8I23_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I23_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I23_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Buffer MB0 Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf0i ( & self ) -> BUF0I_R { BUF0I_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i0 ( & self ) -> BUF4TO1I0_R { BUF4TO1I0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i1 ( & self ) -> BUF4TO1I1_R { BUF4TO1I1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i2 ( & self ) -> BUF4TO1I2_R { BUF4TO1I2_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i3 ( & self ) -> BUF4TO1I3_R { BUF4TO1I3_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Buffer MB5 Interrupt Or \"Frames available in Rx FIFO\"" ] # [ inline ( always ) ] pub fn buf5i ( & self ) -> BUF5I_R { BUF5I_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Buffer MB6 Interrupt Or \"Rx FIFO Warning\"" ] # [ inline ( always ) ] pub fn buf6i ( & self ) -> BUF6I_R { BUF6I_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Buffer MB7 Interrupt Or \"Rx FIFO Overflow\"" ] # [ inline ( always ) ] pub fn buf7i ( & self ) -> BUF7I_R { BUF7I_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i0 ( & self ) -> BUF31TO8I0_R { BUF31TO8I0_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i1 ( & self ) -> BUF31TO8I1_R { BUF31TO8I1_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i2 ( & self ) -> BUF31TO8I2_R { BUF31TO8I2_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i3 ( & self ) -> BUF31TO8I3_R { BUF31TO8I3_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i4 ( & self ) -> BUF31TO8I4_R { BUF31TO8I4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i5 ( & self ) -> BUF31TO8I5_R { BUF31TO8I5_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i6 ( & self ) -> BUF31TO8I6_R { BUF31TO8I6_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i7 ( & self ) -> BUF31TO8I7_R { BUF31TO8I7_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i8 ( & self ) -> BUF31TO8I8_R { BUF31TO8I8_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i9 ( & self ) -> BUF31TO8I9_R { BUF31TO8I9_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i10 ( & self ) -> BUF31TO8I10_R { BUF31TO8I10_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i11 ( & self ) -> BUF31TO8I11_R { BUF31TO8I11_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i12 ( & self ) -> BUF31TO8I12_R { BUF31TO8I12_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i13 ( & self ) -> BUF31TO8I13_R { BUF31TO8I13_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i14 ( & self ) -> BUF31TO8I14_R { BUF31TO8I14_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i15 ( & self ) -> BUF31TO8I15_R { BUF31TO8I15_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i16 ( & self ) -> BUF31TO8I16_R { BUF31TO8I16_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i17 ( & self ) -> BUF31TO8I17_R { BUF31TO8I17_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i18 ( & self ) -> BUF31TO8I18_R { BUF31TO8I18_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i19 ( & self ) -> BUF31TO8I19_R { BUF31TO8I19_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i20 ( & self ) -> BUF31TO8I20_R { BUF31TO8I20_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i21 ( & self ) -> BUF31TO8I21_R { BUF31TO8I21_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i22 ( & self ) -> BUF31TO8I22_R { BUF31TO8I22_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i23 ( & self ) -> BUF31TO8I23_R { BUF31TO8I23_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Buffer MB0 Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf0i ( & mut self ) -> BUF0I_W { BUF0I_W { w : self } } # [ doc = "Bit 1 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i0 ( & mut self ) -> BUF4TO1I0_W { BUF4TO1I0_W { w : self } } # [ doc = "Bit 2 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i1 ( & mut self ) -> BUF4TO1I1_W { BUF4TO1I1_W { w : self } } # [ doc = "Bit 3 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i2 ( & mut self ) -> BUF4TO1I2_W { BUF4TO1I2_W { w : self } } # [ doc = "Bit 4 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i3 ( & mut self ) -> BUF4TO1I3_W { BUF4TO1I3_W { w : self } } # [ doc = "Bit 5 - Buffer MB5 Interrupt Or \"Frames available in Rx FIFO\"" ] # [ inline ( always ) ] pub fn buf5i ( & mut self ) -> BUF5I_W { BUF5I_W { w : self } } # [ doc = "Bit 6 - Buffer MB6 Interrupt Or \"Rx FIFO Warning\"" ] # [ inline ( always ) ] pub fn buf6i ( & mut self ) -> BUF6I_W { BUF6I_W { w : self } } # [ doc = "Bit 7 - Buffer MB7 Interrupt Or \"Rx FIFO Overflow\"" ] # [ inline ( always ) ] pub fn buf7i ( & mut self ) -> BUF7I_W { BUF7I_W { w : self } } # [ doc = "Bit 8 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i0 ( & mut self ) -> BUF31TO8I0_W { BUF31TO8I0_W { w : self } } # [ doc = "Bit 9 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i1 ( & mut self ) -> BUF31TO8I1_W { BUF31TO8I1_W { w : self } } # [ doc = "Bit 10 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i2 ( & mut self ) -> BUF31TO8I2_W { BUF31TO8I2_W { w : self } } # [ doc = "Bit 11 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i3 ( & mut self ) -> BUF31TO8I3_W { BUF31TO8I3_W { w : self } } # [ doc = "Bit 12 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i4 ( & mut self ) -> BUF31TO8I4_W { BUF31TO8I4_W { w : self } } # [ doc = "Bit 13 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i5 ( & mut self ) -> BUF31TO8I5_W { BUF31TO8I5_W { w : self } } # [ doc = "Bit 14 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i6 ( & mut self ) -> BUF31TO8I6_W { BUF31TO8I6_W { w : self } } # [ doc = "Bit 15 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i7 ( & mut self ) -> BUF31TO8I7_W { BUF31TO8I7_W { w : self } } # [ doc = "Bit 16 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i8 ( & mut self ) -> BUF31TO8I8_W { BUF31TO8I8_W { w : self } } # [ doc = "Bit 17 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i9 ( & mut self ) -> BUF31TO8I9_W { BUF31TO8I9_W { w : self } } # [ doc = "Bit 18 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i10 ( & mut self ) -> BUF31TO8I10_W { BUF31TO8I10_W { w : self } } # [ doc = "Bit 19 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i11 ( & mut self ) -> BUF31TO8I11_W { BUF31TO8I11_W { w : self } } # [ doc = "Bit 20 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i12 ( & mut self ) -> BUF31TO8I12_W { BUF31TO8I12_W { w : self } } # [ doc = "Bit 21 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i13 ( & mut self ) -> BUF31TO8I13_W { BUF31TO8I13_W { w : self } } # [ doc = "Bit 22 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i14 ( & mut self ) -> BUF31TO8I14_W { BUF31TO8I14_W { w : self } } # [ doc = "Bit 23 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i15 ( & mut self ) -> BUF31TO8I15_W { BUF31TO8I15_W { w : self } } # [ doc = "Bit 24 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i16 ( & mut self ) -> BUF31TO8I16_W { BUF31TO8I16_W { w : self } } # [ doc = "Bit 25 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i17 ( & mut self ) -> BUF31TO8I17_W { BUF31TO8I17_W { w : self } } # [ doc = "Bit 26 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i18 ( & mut self ) -> BUF31TO8I18_W { BUF31TO8I18_W { w : self } } # [ doc = "Bit 27 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i19 ( & mut self ) -> BUF31TO8I19_W { BUF31TO8I19_W { w : self } } # [ doc = "Bit 28 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i20 ( & mut self ) -> BUF31TO8I20_W { BUF31TO8I20_W { w : self } } # [ doc = "Bit 29 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i21 ( & mut self ) -> BUF31TO8I21_W { BUF31TO8I21_W { w : self } } # [ doc = "Bit 30 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i22 ( & mut self ) -> BUF31TO8I22_W { BUF31TO8I22_W { w : self } } # [ doc = "Bit 31 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i23 ( & mut self ) -> BUF31TO8I23_W { BUF31TO8I23_W { w : self } } } } # [ doc = "Control 2 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl2](ctrl2) module" ] pub type CTRL2 = crate :: Reg < u32 , _CTRL2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL2 ; # [ doc = "`read()` method returns [ctrl2::R](ctrl2::R) reader structure" ] impl crate :: Readable for CTRL2 { } # [ doc = "`write(|w| ..)` method takes [ctrl2::W](ctrl2::W) writer structure" ] impl crate :: Writable for CTRL2 { } # [ doc = "Control 2 register" ] pub mod ctrl2 { # [ doc = "Reader of register CTRL2" ] pub type R = crate :: R < u32 , super :: CTRL2 > ; # [ doc = "Writer for register CTRL2" ] pub type W = crate :: W < u32 , super :: CTRL2 > ; # [ doc = "Register CTRL2 `reset()`'s with value 0x00b0_0000" ] impl crate :: ResetValue for super :: CTRL2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x00b0_0000 } } # [ doc = "Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EACEN_A { # [ doc = "0: Rx Mailbox filter's IDE bit is always compared and RTR is never compared despite mask bits." ] _0 , # [ doc = "1: Enables the comparison of both Rx Mailbox filter's IDE and RTR bit with their corresponding bits within the incoming frame. Mask bits do apply." ] _1 } impl From < EACEN_A > for bool { # [ inline ( always ) ] fn from ( variant : EACEN_A ) -> Self { match variant { EACEN_A :: _0 => false , EACEN_A :: _1 => true } } } # [ doc = "Reader of field `EACEN`" ] pub type EACEN_R = crate :: R < bool , EACEN_A > ; impl EACEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EACEN_A { match self . bits { false => EACEN_A :: _0 , true => EACEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EACEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EACEN_A :: _1 } } # [ doc = "Write proxy for field `EACEN`" ] pub struct EACEN_W < 'a > { w : & 'a mut W , } impl < 'a > EACEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EACEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rx Mailbox filter's IDE bit is always compared and RTR is never compared despite mask bits." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EACEN_A :: _0 ) } # [ doc = "Enables the comparison of both Rx Mailbox filter's IDE and RTR bit with their corresponding bits within the incoming frame. Mask bits do apply." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EACEN_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Remote Request Storing\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RRS_A { # [ doc = "0: Remote Response Frame is generated." ] _0 , # [ doc = "1: Remote Request Frame is stored." ] _1 } impl From < RRS_A > for bool { # [ inline ( always ) ] fn from ( variant : RRS_A ) -> Self { match variant { RRS_A :: _0 => false , RRS_A :: _1 => true } } } # [ doc = "Reader of field `RRS`" ] pub type RRS_R = crate :: R < bool , RRS_A > ; impl RRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RRS_A { match self . bits { false => RRS_A :: _0 , true => RRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RRS_A :: _1 } } # [ doc = "Write proxy for field `RRS`" ] pub struct RRS_W < 'a > { w : & 'a mut W , } impl < 'a > RRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Remote Response Frame is generated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RRS_A :: _0 ) } # [ doc = "Remote Request Frame is stored." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RRS_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Mailboxes Reception Priority\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MRP_A { # [ doc = "0: Matching starts from Rx FIFO and continues on Mailboxes." ] _0 , # [ doc = "1: Matching starts from Mailboxes and continues on Rx FIFO." ] _1 } impl From < MRP_A > for bool { # [ inline ( always ) ] fn from ( variant : MRP_A ) -> Self { match variant { MRP_A :: _0 => false , MRP_A :: _1 => true } } } # [ doc = "Reader of field `MRP`" ] pub type MRP_R = crate :: R < bool , MRP_A > ; impl MRP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MRP_A { match self . bits { false => MRP_A :: _0 , true => MRP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MRP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MRP_A :: _1 } } # [ doc = "Write proxy for field `MRP`" ] pub struct MRP_W < 'a > { w : & 'a mut W , } impl < 'a > MRP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MRP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Matching starts from Rx FIFO and continues on Mailboxes." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MRP_A :: _0 ) } # [ doc = "Matching starts from Mailboxes and continues on Rx FIFO." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MRP_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `TASD`" ] pub type TASD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TASD`" ] pub struct TASD_W < 'a > { w : & 'a mut W , } impl < 'a > TASD_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 & ! ( 0x1f << 19 ) ) | ( ( ( value as u32 ) & 0x1f ) << 19 ) ; self . w } } # [ doc = "Reader of field `RFFN`" ] pub type RFFN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RFFN`" ] pub struct RFFN_W < 'a > { w : & 'a mut W , } impl < 'a > RFFN_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } # [ doc = "Write-Access To Memory In Freeze Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRMFRZ_A { # [ doc = "0: Maintain the write access restrictions." ] _0 , # [ doc = "1: Enable unrestricted write access to FlexCAN memory." ] _1 } impl From < WRMFRZ_A > for bool { # [ inline ( always ) ] fn from ( variant : WRMFRZ_A ) -> Self { match variant { WRMFRZ_A :: _0 => false , WRMFRZ_A :: _1 => true } } } # [ doc = "Reader of field `WRMFRZ`" ] pub type WRMFRZ_R = crate :: R < bool , WRMFRZ_A > ; impl WRMFRZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WRMFRZ_A { match self . bits { false => WRMFRZ_A :: _0 , true => WRMFRZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WRMFRZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WRMFRZ_A :: _1 } } # [ doc = "Write proxy for field `WRMFRZ`" ] pub struct WRMFRZ_W < 'a > { w : & 'a mut W , } impl < 'a > WRMFRZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WRMFRZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Maintain the write access restrictions." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WRMFRZ_A :: _0 ) } # [ doc = "Enable unrestricted write access to FlexCAN memory." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WRMFRZ_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } impl R { # [ doc = "Bit 16 - Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes" ] # [ inline ( always ) ] pub fn eacen ( & self ) -> EACEN_R { EACEN_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Remote Request Storing" ] # [ inline ( always ) ] pub fn rrs ( & self ) -> RRS_R { RRS_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Mailboxes Reception Priority" ] # [ inline ( always ) ] pub fn mrp ( & self ) -> MRP_R { MRP_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bits 19:23 - Tx Arbitration Start Delay" ] # [ inline ( always ) ] pub fn tasd ( & self ) -> TASD_R { TASD_R :: new ( ( ( self . bits >> 19 ) & 0x1f ) as u8 ) } # [ doc = "Bits 24:27 - Number Of Rx FIFO Filters" ] # [ inline ( always ) ] pub fn rffn ( & self ) -> RFFN_R { RFFN_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bit 28 - Write-Access To Memory In Freeze Mode" ] # [ inline ( always ) ] pub fn wrmfrz ( & self ) -> WRMFRZ_R { WRMFRZ_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 16 - Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes" ] # [ inline ( always ) ] pub fn eacen ( & mut self ) -> EACEN_W { EACEN_W { w : self } } # [ doc = "Bit 17 - Remote Request Storing" ] # [ inline ( always ) ] pub fn rrs ( & mut self ) -> RRS_W { RRS_W { w : self } } # [ doc = "Bit 18 - Mailboxes Reception Priority" ] # [ inline ( always ) ] pub fn mrp ( & mut self ) -> MRP_W { MRP_W { w : self } } # [ doc = "Bits 19:23 - Tx Arbitration Start Delay" ] # [ inline ( always ) ] pub fn tasd ( & mut self ) -> TASD_W { TASD_W { w : self } } # [ doc = "Bits 24:27 - Number Of Rx FIFO Filters" ] # [ inline ( always ) ] pub fn rffn ( & mut self ) -> RFFN_W { RFFN_W { w : self } } # [ doc = "Bit 28 - Write-Access To Memory In Freeze Mode" ] # [ inline ( always ) ] pub fn wrmfrz ( & mut self ) -> WRMFRZ_W { WRMFRZ_W { w : self } } } } # [ doc = "Error and Status 2 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [esr2](esr2) module" ] pub type ESR2 = crate :: Reg < u32 , _ESR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ESR2 ; # [ doc = "`read()` method returns [esr2::R](esr2::R) reader structure" ] impl crate :: Readable for ESR2 { } # [ doc = "Error and Status 2 register" ] pub mod esr2 { # [ doc = "Reader of register ESR2" ] pub type R = crate :: R < u32 , super :: ESR2 > ; # [ doc = "Inactive Mailbox\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IMB_A { # [ doc = "0: If ESR2\\[VPS\\] is asserted, the ESR2\\[LPTM\\] is not an inactive Mailbox." ] _0 , # [ doc = "1: If ESR2\\[VPS\\] is asserted, there is at least one inactive Mailbox. LPTM content is the number of the first one." ] _1 } impl From < IMB_A > for bool { # [ inline ( always ) ] fn from ( variant : IMB_A ) -> Self { match variant { IMB_A :: _0 => false , IMB_A :: _1 => true } } } # [ doc = "Reader of field `IMB`" ] pub type IMB_R = crate :: R < bool , IMB_A > ; impl IMB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IMB_A { match self . bits { false => IMB_A :: _0 , true => IMB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IMB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IMB_A :: _1 } } # [ doc = "Valid Priority Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VPS_A { # [ doc = "0: Contents of IMB and LPTM are invalid." ] _0 , # [ doc = "1: Contents of IMB and LPTM are valid." ] _1 } impl From < VPS_A > for bool { # [ inline ( always ) ] fn from ( variant : VPS_A ) -> Self { match variant { VPS_A :: _0 => false , VPS_A :: _1 => true } } } # [ doc = "Reader of field `VPS`" ] pub type VPS_R = crate :: R < bool , VPS_A > ; impl VPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VPS_A { match self . bits { false => VPS_A :: _0 , true => VPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VPS_A :: _1 } } # [ doc = "Reader of field `LPTM`" ] pub type LPTM_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 13 - Inactive Mailbox" ] # [ inline ( always ) ] pub fn imb ( & self ) -> IMB_R { IMB_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Valid Priority Status" ] # [ inline ( always ) ] pub fn vps ( & self ) -> VPS_R { VPS_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:22 - Lowest Priority Tx Mailbox" ] # [ inline ( always ) ] pub fn lptm ( & self ) -> LPTM_R { LPTM_R :: new ( ( ( self . bits >> 16 ) & 0x7f ) as u8 ) } } } # [ doc = "CRC Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [crcr](crcr) module" ] pub type CRCR = crate :: Reg < u32 , _CRCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CRCR ; # [ doc = "`read()` method returns [crcr::R](crcr::R) reader structure" ] impl crate :: Readable for CRCR { } # [ doc = "CRC Register" ] pub mod crcr { # [ doc = "Reader of register CRCR" ] pub type R = crate :: R < u32 , super :: CRCR > ; # [ doc = "Reader of field `TXCRC`" ] pub type TXCRC_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `MBCRC`" ] pub type MBCRC_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:14 - CRC Transmitted" ] # [ inline ( always ) ] pub fn txcrc ( & self ) -> TXCRC_R { TXCRC_R :: new ( ( self . bits & 0x7fff ) as u16 ) } # [ doc = "Bits 16:22 - CRC Mailbox" ] # [ inline ( always ) ] pub fn mbcrc ( & self ) -> MBCRC_R { MBCRC_R :: new ( ( ( self . bits >> 16 ) & 0x7f ) as u8 ) } } } # [ doc = "Rx FIFO Global Mask register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxfgmask](rxfgmask) module" ] pub type RXFGMASK = crate :: Reg < u32 , _RXFGMASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXFGMASK ; # [ doc = "`read()` method returns [rxfgmask::R](rxfgmask::R) reader structure" ] impl crate :: Readable for RXFGMASK { } # [ doc = "`write(|w| ..)` method takes [rxfgmask::W](rxfgmask::W) writer structure" ] impl crate :: Writable for RXFGMASK { } # [ doc = "Rx FIFO Global Mask register" ] pub mod rxfgmask { # [ doc = "Reader of register RXFGMASK" ] pub type R = crate :: R < u32 , super :: RXFGMASK > ; # [ doc = "Writer for register RXFGMASK" ] pub type W = crate :: W < u32 , super :: RXFGMASK > ; # [ doc = "Register RXFGMASK `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RXFGMASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM0_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM0_A ) -> Self { match variant { FGM0_A :: _0 => false , FGM0_A :: _1 => true } } } # [ doc = "Reader of field `FGM0`" ] pub type FGM0_R = crate :: R < bool , FGM0_A > ; impl FGM0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM0_A { match self . bits { false => FGM0_A :: _0 , true => FGM0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM0_A :: _1 } } # [ doc = "Write proxy for field `FGM0`" ] pub struct FGM0_W < 'a > { w : & 'a mut W , } impl < 'a > FGM0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM1_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM1_A ) -> Self { match variant { FGM1_A :: _0 => false , FGM1_A :: _1 => true } } } # [ doc = "Reader of field `FGM1`" ] pub type FGM1_R = crate :: R < bool , FGM1_A > ; impl FGM1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM1_A { match self . bits { false => FGM1_A :: _0 , true => FGM1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM1_A :: _1 } } # [ doc = "Write proxy for field `FGM1`" ] pub struct FGM1_W < 'a > { w : & 'a mut W , } impl < 'a > FGM1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM1_A :: _1 ) } # [ 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 } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM2_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM2_A ) -> Self { match variant { FGM2_A :: _0 => false , FGM2_A :: _1 => true } } } # [ doc = "Reader of field `FGM2`" ] pub type FGM2_R = crate :: R < bool , FGM2_A > ; impl FGM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM2_A { match self . bits { false => FGM2_A :: _0 , true => FGM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM2_A :: _1 } } # [ doc = "Write proxy for field `FGM2`" ] pub struct FGM2_W < 'a > { w : & 'a mut W , } impl < 'a > FGM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM2_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM3_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM3_A ) -> Self { match variant { FGM3_A :: _0 => false , FGM3_A :: _1 => true } } } # [ doc = "Reader of field `FGM3`" ] pub type FGM3_R = crate :: R < bool , FGM3_A > ; impl FGM3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM3_A { match self . bits { false => FGM3_A :: _0 , true => FGM3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM3_A :: _1 } } # [ doc = "Write proxy for field `FGM3`" ] pub struct FGM3_W < 'a > { w : & 'a mut W , } impl < 'a > FGM3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM4_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM4_A ) -> Self { match variant { FGM4_A :: _0 => false , FGM4_A :: _1 => true } } } # [ doc = "Reader of field `FGM4`" ] pub type FGM4_R = crate :: R < bool , FGM4_A > ; impl FGM4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM4_A { match self . bits { false => FGM4_A :: _0 , true => FGM4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM4_A :: _1 } } # [ doc = "Write proxy for field `FGM4`" ] pub struct FGM4_W < 'a > { w : & 'a mut W , } impl < 'a > FGM4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM5_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM5_A ) -> Self { match variant { FGM5_A :: _0 => false , FGM5_A :: _1 => true } } } # [ doc = "Reader of field `FGM5`" ] pub type FGM5_R = crate :: R < bool , FGM5_A > ; impl FGM5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM5_A { match self . bits { false => FGM5_A :: _0 , true => FGM5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM5_A :: _1 } } # [ doc = "Write proxy for field `FGM5`" ] pub struct FGM5_W < 'a > { w : & 'a mut W , } impl < 'a > FGM5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM5_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM6_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM6_A ) -> Self { match variant { FGM6_A :: _0 => false , FGM6_A :: _1 => true } } } # [ doc = "Reader of field `FGM6`" ] pub type FGM6_R = crate :: R < bool , FGM6_A > ; impl FGM6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM6_A { match self . bits { false => FGM6_A :: _0 , true => FGM6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM6_A :: _1 } } # [ doc = "Write proxy for field `FGM6`" ] pub struct FGM6_W < 'a > { w : & 'a mut W , } impl < 'a > FGM6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM6_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM7_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM7_A ) -> Self { match variant { FGM7_A :: _0 => false , FGM7_A :: _1 => true } } } # [ doc = "Reader of field `FGM7`" ] pub type FGM7_R = crate :: R < bool , FGM7_A > ; impl FGM7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM7_A { match self . bits { false => FGM7_A :: _0 , true => FGM7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM7_A :: _1 } } # [ doc = "Write proxy for field `FGM7`" ] pub struct FGM7_W < 'a > { w : & 'a mut W , } impl < 'a > FGM7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM7_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM8_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM8_A ) -> Self { match variant { FGM8_A :: _0 => false , FGM8_A :: _1 => true } } } # [ doc = "Reader of field `FGM8`" ] pub type FGM8_R = crate :: R < bool , FGM8_A > ; impl FGM8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM8_A { match self . bits { false => FGM8_A :: _0 , true => FGM8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM8_A :: _1 } } # [ doc = "Write proxy for field `FGM8`" ] pub struct FGM8_W < 'a > { w : & 'a mut W , } impl < 'a > FGM8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM9_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM9_A ) -> Self { match variant { FGM9_A :: _0 => false , FGM9_A :: _1 => true } } } # [ doc = "Reader of field `FGM9`" ] pub type FGM9_R = crate :: R < bool , FGM9_A > ; impl FGM9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM9_A { match self . bits { false => FGM9_A :: _0 , true => FGM9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM9_A :: _1 } } # [ doc = "Write proxy for field `FGM9`" ] pub struct FGM9_W < 'a > { w : & 'a mut W , } impl < 'a > FGM9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM10_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM10_A ) -> Self { match variant { FGM10_A :: _0 => false , FGM10_A :: _1 => true } } } # [ doc = "Reader of field `FGM10`" ] pub type FGM10_R = crate :: R < bool , FGM10_A > ; impl FGM10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM10_A { match self . bits { false => FGM10_A :: _0 , true => FGM10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM10_A :: _1 } } # [ doc = "Write proxy for field `FGM10`" ] pub struct FGM10_W < 'a > { w : & 'a mut W , } impl < 'a > FGM10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM11_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM11_A ) -> Self { match variant { FGM11_A :: _0 => false , FGM11_A :: _1 => true } } } # [ doc = "Reader of field `FGM11`" ] pub type FGM11_R = crate :: R < bool , FGM11_A > ; impl FGM11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM11_A { match self . bits { false => FGM11_A :: _0 , true => FGM11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM11_A :: _1 } } # [ doc = "Write proxy for field `FGM11`" ] pub struct FGM11_W < 'a > { w : & 'a mut W , } impl < 'a > FGM11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM12_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM12_A ) -> Self { match variant { FGM12_A :: _0 => false , FGM12_A :: _1 => true } } } # [ doc = "Reader of field `FGM12`" ] pub type FGM12_R = crate :: R < bool , FGM12_A > ; impl FGM12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM12_A { match self . bits { false => FGM12_A :: _0 , true => FGM12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM12_A :: _1 } } # [ doc = "Write proxy for field `FGM12`" ] pub struct FGM12_W < 'a > { w : & 'a mut W , } impl < 'a > FGM12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM13_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM13_A ) -> Self { match variant { FGM13_A :: _0 => false , FGM13_A :: _1 => true } } } # [ doc = "Reader of field `FGM13`" ] pub type FGM13_R = crate :: R < bool , FGM13_A > ; impl FGM13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM13_A { match self . bits { false => FGM13_A :: _0 , true => FGM13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM13_A :: _1 } } # [ doc = "Write proxy for field `FGM13`" ] pub struct FGM13_W < 'a > { w : & 'a mut W , } impl < 'a > FGM13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM13_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM14_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM14_A ) -> Self { match variant { FGM14_A :: _0 => false , FGM14_A :: _1 => true } } } # [ doc = "Reader of field `FGM14`" ] pub type FGM14_R = crate :: R < bool , FGM14_A > ; impl FGM14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM14_A { match self . bits { false => FGM14_A :: _0 , true => FGM14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM14_A :: _1 } } # [ doc = "Write proxy for field `FGM14`" ] pub struct FGM14_W < 'a > { w : & 'a mut W , } impl < 'a > FGM14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM15_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM15_A ) -> Self { match variant { FGM15_A :: _0 => false , FGM15_A :: _1 => true } } } # [ doc = "Reader of field `FGM15`" ] pub type FGM15_R = crate :: R < bool , FGM15_A > ; impl FGM15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM15_A { match self . bits { false => FGM15_A :: _0 , true => FGM15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM15_A :: _1 } } # [ doc = "Write proxy for field `FGM15`" ] pub struct FGM15_W < 'a > { w : & 'a mut W , } impl < 'a > FGM15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM16_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM16_A ) -> Self { match variant { FGM16_A :: _0 => false , FGM16_A :: _1 => true } } } # [ doc = "Reader of field `FGM16`" ] pub type FGM16_R = crate :: R < bool , FGM16_A > ; impl FGM16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM16_A { match self . bits { false => FGM16_A :: _0 , true => FGM16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM16_A :: _1 } } # [ doc = "Write proxy for field `FGM16`" ] pub struct FGM16_W < 'a > { w : & 'a mut W , } impl < 'a > FGM16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM17_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM17_A ) -> Self { match variant { FGM17_A :: _0 => false , FGM17_A :: _1 => true } } } # [ doc = "Reader of field `FGM17`" ] pub type FGM17_R = crate :: R < bool , FGM17_A > ; impl FGM17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM17_A { match self . bits { false => FGM17_A :: _0 , true => FGM17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM17_A :: _1 } } # [ doc = "Write proxy for field `FGM17`" ] pub struct FGM17_W < 'a > { w : & 'a mut W , } impl < 'a > FGM17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM18_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM18_A ) -> Self { match variant { FGM18_A :: _0 => false , FGM18_A :: _1 => true } } } # [ doc = "Reader of field `FGM18`" ] pub type FGM18_R = crate :: R < bool , FGM18_A > ; impl FGM18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM18_A { match self . bits { false => FGM18_A :: _0 , true => FGM18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM18_A :: _1 } } # [ doc = "Write proxy for field `FGM18`" ] pub struct FGM18_W < 'a > { w : & 'a mut W , } impl < 'a > FGM18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM19_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM19_A ) -> Self { match variant { FGM19_A :: _0 => false , FGM19_A :: _1 => true } } } # [ doc = "Reader of field `FGM19`" ] pub type FGM19_R = crate :: R < bool , FGM19_A > ; impl FGM19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM19_A { match self . bits { false => FGM19_A :: _0 , true => FGM19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM19_A :: _1 } } # [ doc = "Write proxy for field `FGM19`" ] pub struct FGM19_W < 'a > { w : & 'a mut W , } impl < 'a > FGM19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM20_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM20_A ) -> Self { match variant { FGM20_A :: _0 => false , FGM20_A :: _1 => true } } } # [ doc = "Reader of field `FGM20`" ] pub type FGM20_R = crate :: R < bool , FGM20_A > ; impl FGM20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM20_A { match self . bits { false => FGM20_A :: _0 , true => FGM20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM20_A :: _1 } } # [ doc = "Write proxy for field `FGM20`" ] pub struct FGM20_W < 'a > { w : & 'a mut W , } impl < 'a > FGM20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM20_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM21_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM21_A ) -> Self { match variant { FGM21_A :: _0 => false , FGM21_A :: _1 => true } } } # [ doc = "Reader of field `FGM21`" ] pub type FGM21_R = crate :: R < bool , FGM21_A > ; impl FGM21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM21_A { match self . bits { false => FGM21_A :: _0 , true => FGM21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM21_A :: _1 } } # [ doc = "Write proxy for field `FGM21`" ] pub struct FGM21_W < 'a > { w : & 'a mut W , } impl < 'a > FGM21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM21_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM22_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM22_A ) -> Self { match variant { FGM22_A :: _0 => false , FGM22_A :: _1 => true } } } # [ doc = "Reader of field `FGM22`" ] pub type FGM22_R = crate :: R < bool , FGM22_A > ; impl FGM22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM22_A { match self . bits { false => FGM22_A :: _0 , true => FGM22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM22_A :: _1 } } # [ doc = "Write proxy for field `FGM22`" ] pub struct FGM22_W < 'a > { w : & 'a mut W , } impl < 'a > FGM22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM23_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM23_A ) -> Self { match variant { FGM23_A :: _0 => false , FGM23_A :: _1 => true } } } # [ doc = "Reader of field `FGM23`" ] pub type FGM23_R = crate :: R < bool , FGM23_A > ; impl FGM23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM23_A { match self . bits { false => FGM23_A :: _0 , true => FGM23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM23_A :: _1 } } # [ doc = "Write proxy for field `FGM23`" ] pub struct FGM23_W < 'a > { w : & 'a mut W , } impl < 'a > FGM23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM24_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM24_A ) -> Self { match variant { FGM24_A :: _0 => false , FGM24_A :: _1 => true } } } # [ doc = "Reader of field `FGM24`" ] pub type FGM24_R = crate :: R < bool , FGM24_A > ; impl FGM24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM24_A { match self . bits { false => FGM24_A :: _0 , true => FGM24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM24_A :: _1 } } # [ doc = "Write proxy for field `FGM24`" ] pub struct FGM24_W < 'a > { w : & 'a mut W , } impl < 'a > FGM24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM24_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM25_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM25_A ) -> Self { match variant { FGM25_A :: _0 => false , FGM25_A :: _1 => true } } } # [ doc = "Reader of field `FGM25`" ] pub type FGM25_R = crate :: R < bool , FGM25_A > ; impl FGM25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM25_A { match self . bits { false => FGM25_A :: _0 , true => FGM25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM25_A :: _1 } } # [ doc = "Write proxy for field `FGM25`" ] pub struct FGM25_W < 'a > { w : & 'a mut W , } impl < 'a > FGM25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM25_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM26_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM26_A ) -> Self { match variant { FGM26_A :: _0 => false , FGM26_A :: _1 => true } } } # [ doc = "Reader of field `FGM26`" ] pub type FGM26_R = crate :: R < bool , FGM26_A > ; impl FGM26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM26_A { match self . bits { false => FGM26_A :: _0 , true => FGM26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM26_A :: _1 } } # [ doc = "Write proxy for field `FGM26`" ] pub struct FGM26_W < 'a > { w : & 'a mut W , } impl < 'a > FGM26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM26_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM27_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM27_A ) -> Self { match variant { FGM27_A :: _0 => false , FGM27_A :: _1 => true } } } # [ doc = "Reader of field `FGM27`" ] pub type FGM27_R = crate :: R < bool , FGM27_A > ; impl FGM27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM27_A { match self . bits { false => FGM27_A :: _0 , true => FGM27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM27_A :: _1 } } # [ doc = "Write proxy for field `FGM27`" ] pub struct FGM27_W < 'a > { w : & 'a mut W , } impl < 'a > FGM27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM28_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM28_A ) -> Self { match variant { FGM28_A :: _0 => false , FGM28_A :: _1 => true } } } # [ doc = "Reader of field `FGM28`" ] pub type FGM28_R = crate :: R < bool , FGM28_A > ; impl FGM28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM28_A { match self . bits { false => FGM28_A :: _0 , true => FGM28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM28_A :: _1 } } # [ doc = "Write proxy for field `FGM28`" ] pub struct FGM28_W < 'a > { w : & 'a mut W , } impl < 'a > FGM28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM29_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM29_A ) -> Self { match variant { FGM29_A :: _0 => false , FGM29_A :: _1 => true } } } # [ doc = "Reader of field `FGM29`" ] pub type FGM29_R = crate :: R < bool , FGM29_A > ; impl FGM29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM29_A { match self . bits { false => FGM29_A :: _0 , true => FGM29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM29_A :: _1 } } # [ doc = "Write proxy for field `FGM29`" ] pub struct FGM29_W < 'a > { w : & 'a mut W , } impl < 'a > FGM29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM30_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM30_A ) -> Self { match variant { FGM30_A :: _0 => false , FGM30_A :: _1 => true } } } # [ doc = "Reader of field `FGM30`" ] pub type FGM30_R = crate :: R < bool , FGM30_A > ; impl FGM30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM30_A { match self . bits { false => FGM30_A :: _0 , true => FGM30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM30_A :: _1 } } # [ doc = "Write proxy for field `FGM30`" ] pub struct FGM30_W < 'a > { w : & 'a mut W , } impl < 'a > FGM30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM31_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM31_A ) -> Self { match variant { FGM31_A :: _0 => false , FGM31_A :: _1 => true } } } # [ doc = "Reader of field `FGM31`" ] pub type FGM31_R = crate :: R < bool , FGM31_A > ; impl FGM31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM31_A { match self . bits { false => FGM31_A :: _0 , true => FGM31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM31_A :: _1 } } # [ doc = "Write proxy for field `FGM31`" ] pub struct FGM31_W < 'a > { w : & 'a mut W , } impl < 'a > FGM31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm0 ( & self ) -> FGM0_R { FGM0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm1 ( & self ) -> FGM1_R { FGM1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm2 ( & self ) -> FGM2_R { FGM2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm3 ( & self ) -> FGM3_R { FGM3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm4 ( & self ) -> FGM4_R { FGM4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm5 ( & self ) -> FGM5_R { FGM5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm6 ( & self ) -> FGM6_R { FGM6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm7 ( & self ) -> FGM7_R { FGM7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm8 ( & self ) -> FGM8_R { FGM8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm9 ( & self ) -> FGM9_R { FGM9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm10 ( & self ) -> FGM10_R { FGM10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm11 ( & self ) -> FGM11_R { FGM11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm12 ( & self ) -> FGM12_R { FGM12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm13 ( & self ) -> FGM13_R { FGM13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm14 ( & self ) -> FGM14_R { FGM14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm15 ( & self ) -> FGM15_R { FGM15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm16 ( & self ) -> FGM16_R { FGM16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm17 ( & self ) -> FGM17_R { FGM17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm18 ( & self ) -> FGM18_R { FGM18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm19 ( & self ) -> FGM19_R { FGM19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm20 ( & self ) -> FGM20_R { FGM20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm21 ( & self ) -> FGM21_R { FGM21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm22 ( & self ) -> FGM22_R { FGM22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm23 ( & self ) -> FGM23_R { FGM23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm24 ( & self ) -> FGM24_R { FGM24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm25 ( & self ) -> FGM25_R { FGM25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm26 ( & self ) -> FGM26_R { FGM26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm27 ( & self ) -> FGM27_R { FGM27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm28 ( & self ) -> FGM28_R { FGM28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm29 ( & self ) -> FGM29_R { FGM29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm30 ( & self ) -> FGM30_R { FGM30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm31 ( & self ) -> FGM31_R { FGM31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm0 ( & mut self ) -> FGM0_W { FGM0_W { w : self } } # [ doc = "Bit 1 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm1 ( & mut self ) -> FGM1_W { FGM1_W { w : self } } # [ doc = "Bit 2 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm2 ( & mut self ) -> FGM2_W { FGM2_W { w : self } } # [ doc = "Bit 3 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm3 ( & mut self ) -> FGM3_W { FGM3_W { w : self } } # [ doc = "Bit 4 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm4 ( & mut self ) -> FGM4_W { FGM4_W { w : self } } # [ doc = "Bit 5 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm5 ( & mut self ) -> FGM5_W { FGM5_W { w : self } } # [ doc = "Bit 6 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm6 ( & mut self ) -> FGM6_W { FGM6_W { w : self } } # [ doc = "Bit 7 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm7 ( & mut self ) -> FGM7_W { FGM7_W { w : self } } # [ doc = "Bit 8 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm8 ( & mut self ) -> FGM8_W { FGM8_W { w : self } } # [ doc = "Bit 9 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm9 ( & mut self ) -> FGM9_W { FGM9_W { w : self } } # [ doc = "Bit 10 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm10 ( & mut self ) -> FGM10_W { FGM10_W { w : self } } # [ doc = "Bit 11 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm11 ( & mut self ) -> FGM11_W { FGM11_W { w : self } } # [ doc = "Bit 12 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm12 ( & mut self ) -> FGM12_W { FGM12_W { w : self } } # [ doc = "Bit 13 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm13 ( & mut self ) -> FGM13_W { FGM13_W { w : self } } # [ doc = "Bit 14 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm14 ( & mut self ) -> FGM14_W { FGM14_W { w : self } } # [ doc = "Bit 15 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm15 ( & mut self ) -> FGM15_W { FGM15_W { w : self } } # [ doc = "Bit 16 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm16 ( & mut self ) -> FGM16_W { FGM16_W { w : self } } # [ doc = "Bit 17 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm17 ( & mut self ) -> FGM17_W { FGM17_W { w : self } } # [ doc = "Bit 18 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm18 ( & mut self ) -> FGM18_W { FGM18_W { w : self } } # [ doc = "Bit 19 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm19 ( & mut self ) -> FGM19_W { FGM19_W { w : self } } # [ doc = "Bit 20 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm20 ( & mut self ) -> FGM20_W { FGM20_W { w : self } } # [ doc = "Bit 21 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm21 ( & mut self ) -> FGM21_W { FGM21_W { w : self } } # [ doc = "Bit 22 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm22 ( & mut self ) -> FGM22_W { FGM22_W { w : self } } # [ doc = "Bit 23 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm23 ( & mut self ) -> FGM23_W { FGM23_W { w : self } } # [ doc = "Bit 24 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm24 ( & mut self ) -> FGM24_W { FGM24_W { w : self } } # [ doc = "Bit 25 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm25 ( & mut self ) -> FGM25_W { FGM25_W { w : self } } # [ doc = "Bit 26 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm26 ( & mut self ) -> FGM26_W { FGM26_W { w : self } } # [ doc = "Bit 27 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm27 ( & mut self ) -> FGM27_W { FGM27_W { w : self } } # [ doc = "Bit 28 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm28 ( & mut self ) -> FGM28_W { FGM28_W { w : self } } # [ doc = "Bit 29 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm29 ( & mut self ) -> FGM29_W { FGM29_W { w : self } } # [ doc = "Bit 30 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm30 ( & mut self ) -> FGM30_W { FGM30_W { w : self } } # [ doc = "Bit 31 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm31 ( & mut self ) -> FGM31_W { FGM31_W { w : self } } } } # [ doc = "Rx FIFO Information Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxfir](rxfir) module" ] pub type RXFIR = crate :: Reg < u32 , _RXFIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXFIR ; # [ doc = "`read()` method returns [rxfir::R](rxfir::R) reader structure" ] impl crate :: Readable for RXFIR { } # [ doc = "Rx FIFO Information Register" ] pub mod rxfir { # [ doc = "Reader of register RXFIR" ] pub type R = crate :: R < u32 , super :: RXFIR > ; # [ doc = "Reader of field `IDHIT`" ] pub type IDHIT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:8 - Identifier Acceptance Filter Hit Indicator" ] # [ inline ( always ) ] pub fn idhit ( & self ) -> IDHIT_R { IDHIT_R :: new ( ( self . bits & 0x01ff ) as u16 ) } } } # [ doc = "Message Buffer 0 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs0](cs0) module" ] pub type CS0 = crate :: Reg < u32 , _CS0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS0 ; # [ doc = "`read()` method returns [cs0::R](cs0::R) reader structure" ] impl crate :: Readable for CS0 { } # [ doc = "`write(|w| ..)` method takes [cs0::W](cs0::W) writer structure" ] impl crate :: Writable for CS0 { } # [ doc = "Message Buffer 0 CS Register" ] pub mod cs0 { # [ doc = "Reader of register CS0" ] pub type R = crate :: R < u32 , super :: CS0 > ; # [ doc = "Writer for register CS0" ] pub type W = crate :: W < u32 , super :: CS0 > ; # [ doc = "Register CS0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 0 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id0](id0) module" ] pub type ID0 = crate :: Reg < u32 , _ID0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID0 ; # [ doc = "`read()` method returns [id0::R](id0::R) reader structure" ] impl crate :: Readable for ID0 { } # [ doc = "`write(|w| ..)` method takes [id0::W](id0::W) writer structure" ] impl crate :: Writable for ID0 { } # [ doc = "Message Buffer 0 ID Register" ] pub mod id0 { # [ doc = "Reader of register ID0" ] pub type R = crate :: R < u32 , super :: ID0 > ; # [ doc = "Writer for register ID0" ] pub type W = crate :: W < u32 , super :: ID0 > ; # [ doc = "Register ID0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 0 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word00](word00) module" ] pub type WORD00 = crate :: Reg < u32 , _WORD00 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD00 ; # [ doc = "`read()` method returns [word00::R](word00::R) reader structure" ] impl crate :: Readable for WORD00 { } # [ doc = "`write(|w| ..)` method takes [word00::W](word00::W) writer structure" ] impl crate :: Writable for WORD00 { } # [ doc = "Message Buffer 0 WORD0 Register" ] pub mod word00 { # [ doc = "Reader of register WORD00" ] pub type R = crate :: R < u32 , super :: WORD00 > ; # [ doc = "Writer for register WORD00" ] pub type W = crate :: W < u32 , super :: WORD00 > ; # [ doc = "Register WORD00 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD00 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 0 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word10](word10) module" ] pub type WORD10 = crate :: Reg < u32 , _WORD10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD10 ; # [ doc = "`read()` method returns [word10::R](word10::R) reader structure" ] impl crate :: Readable for WORD10 { } # [ doc = "`write(|w| ..)` method takes [word10::W](word10::W) writer structure" ] impl crate :: Writable for WORD10 { } # [ doc = "Message Buffer 0 WORD1 Register" ] pub mod word10 { # [ doc = "Reader of register WORD10" ] pub type R = crate :: R < u32 , super :: WORD10 > ; # [ doc = "Writer for register WORD10" ] pub type W = crate :: W < u32 , super :: WORD10 > ; # [ doc = "Register WORD10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 1 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs1](cs1) module" ] pub type CS1 = crate :: Reg < u32 , _CS1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS1 ; # [ doc = "`read()` method returns [cs1::R](cs1::R) reader structure" ] impl crate :: Readable for CS1 { } # [ doc = "`write(|w| ..)` method takes [cs1::W](cs1::W) writer structure" ] impl crate :: Writable for CS1 { } # [ doc = "Message Buffer 1 CS Register" ] pub mod cs1 { # [ doc = "Reader of register CS1" ] pub type R = crate :: R < u32 , super :: CS1 > ; # [ doc = "Writer for register CS1" ] pub type W = crate :: W < u32 , super :: CS1 > ; # [ doc = "Register CS1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 1 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id1](id1) module" ] pub type ID1 = crate :: Reg < u32 , _ID1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID1 ; # [ doc = "`read()` method returns [id1::R](id1::R) reader structure" ] impl crate :: Readable for ID1 { } # [ doc = "`write(|w| ..)` method takes [id1::W](id1::W) writer structure" ] impl crate :: Writable for ID1 { } # [ doc = "Message Buffer 1 ID Register" ] pub mod id1 { # [ doc = "Reader of register ID1" ] pub type R = crate :: R < u32 , super :: ID1 > ; # [ doc = "Writer for register ID1" ] pub type W = crate :: W < u32 , super :: ID1 > ; # [ doc = "Register ID1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 1 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word01](word01) module" ] pub type WORD01 = crate :: Reg < u32 , _WORD01 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD01 ; # [ doc = "`read()` method returns [word01::R](word01::R) reader structure" ] impl crate :: Readable for WORD01 { } # [ doc = "`write(|w| ..)` method takes [word01::W](word01::W) writer structure" ] impl crate :: Writable for WORD01 { } # [ doc = "Message Buffer 1 WORD0 Register" ] pub mod word01 { # [ doc = "Reader of register WORD01" ] pub type R = crate :: R < u32 , super :: WORD01 > ; # [ doc = "Writer for register WORD01" ] pub type W = crate :: W < u32 , super :: WORD01 > ; # [ doc = "Register WORD01 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD01 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 1 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word11](word11) module" ] pub type WORD11 = crate :: Reg < u32 , _WORD11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD11 ; # [ doc = "`read()` method returns [word11::R](word11::R) reader structure" ] impl crate :: Readable for WORD11 { } # [ doc = "`write(|w| ..)` method takes [word11::W](word11::W) writer structure" ] impl crate :: Writable for WORD11 { } # [ doc = "Message Buffer 1 WORD1 Register" ] pub mod word11 { # [ doc = "Reader of register WORD11" ] pub type R = crate :: R < u32 , super :: WORD11 > ; # [ doc = "Writer for register WORD11" ] pub type W = crate :: W < u32 , super :: WORD11 > ; # [ doc = "Register WORD11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 2 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs2](cs2) module" ] pub type CS2 = crate :: Reg < u32 , _CS2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS2 ; # [ doc = "`read()` method returns [cs2::R](cs2::R) reader structure" ] impl crate :: Readable for CS2 { } # [ doc = "`write(|w| ..)` method takes [cs2::W](cs2::W) writer structure" ] impl crate :: Writable for CS2 { } # [ doc = "Message Buffer 2 CS Register" ] pub mod cs2 { # [ doc = "Reader of register CS2" ] pub type R = crate :: R < u32 , super :: CS2 > ; # [ doc = "Writer for register CS2" ] pub type W = crate :: W < u32 , super :: CS2 > ; # [ doc = "Register CS2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 2 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id2](id2) module" ] pub type ID2 = crate :: Reg < u32 , _ID2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID2 ; # [ doc = "`read()` method returns [id2::R](id2::R) reader structure" ] impl crate :: Readable for ID2 { } # [ doc = "`write(|w| ..)` method takes [id2::W](id2::W) writer structure" ] impl crate :: Writable for ID2 { } # [ doc = "Message Buffer 2 ID Register" ] pub mod id2 { # [ doc = "Reader of register ID2" ] pub type R = crate :: R < u32 , super :: ID2 > ; # [ doc = "Writer for register ID2" ] pub type W = crate :: W < u32 , super :: ID2 > ; # [ doc = "Register ID2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 2 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word02](word02) module" ] pub type WORD02 = crate :: Reg < u32 , _WORD02 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD02 ; # [ doc = "`read()` method returns [word02::R](word02::R) reader structure" ] impl crate :: Readable for WORD02 { } # [ doc = "`write(|w| ..)` method takes [word02::W](word02::W) writer structure" ] impl crate :: Writable for WORD02 { } # [ doc = "Message Buffer 2 WORD0 Register" ] pub mod word02 { # [ doc = "Reader of register WORD02" ] pub type R = crate :: R < u32 , super :: WORD02 > ; # [ doc = "Writer for register WORD02" ] pub type W = crate :: W < u32 , super :: WORD02 > ; # [ doc = "Register WORD02 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD02 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 2 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word12](word12) module" ] pub type WORD12 = crate :: Reg < u32 , _WORD12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD12 ; # [ doc = "`read()` method returns [word12::R](word12::R) reader structure" ] impl crate :: Readable for WORD12 { } # [ doc = "`write(|w| ..)` method takes [word12::W](word12::W) writer structure" ] impl crate :: Writable for WORD12 { } # [ doc = "Message Buffer 2 WORD1 Register" ] pub mod word12 { # [ doc = "Reader of register WORD12" ] pub type R = crate :: R < u32 , super :: WORD12 > ; # [ doc = "Writer for register WORD12" ] pub type W = crate :: W < u32 , super :: WORD12 > ; # [ doc = "Register WORD12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 3 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs3](cs3) module" ] pub type CS3 = crate :: Reg < u32 , _CS3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS3 ; # [ doc = "`read()` method returns [cs3::R](cs3::R) reader structure" ] impl crate :: Readable for CS3 { } # [ doc = "`write(|w| ..)` method takes [cs3::W](cs3::W) writer structure" ] impl crate :: Writable for CS3 { } # [ doc = "Message Buffer 3 CS Register" ] pub mod cs3 { # [ doc = "Reader of register CS3" ] pub type R = crate :: R < u32 , super :: CS3 > ; # [ doc = "Writer for register CS3" ] pub type W = crate :: W < u32 , super :: CS3 > ; # [ doc = "Register CS3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 3 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id3](id3) module" ] pub type ID3 = crate :: Reg < u32 , _ID3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID3 ; # [ doc = "`read()` method returns [id3::R](id3::R) reader structure" ] impl crate :: Readable for ID3 { } # [ doc = "`write(|w| ..)` method takes [id3::W](id3::W) writer structure" ] impl crate :: Writable for ID3 { } # [ doc = "Message Buffer 3 ID Register" ] pub mod id3 { # [ doc = "Reader of register ID3" ] pub type R = crate :: R < u32 , super :: ID3 > ; # [ doc = "Writer for register ID3" ] pub type W = crate :: W < u32 , super :: ID3 > ; # [ doc = "Register ID3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 3 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word03](word03) module" ] pub type WORD03 = crate :: Reg < u32 , _WORD03 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD03 ; # [ doc = "`read()` method returns [word03::R](word03::R) reader structure" ] impl crate :: Readable for WORD03 { } # [ doc = "`write(|w| ..)` method takes [word03::W](word03::W) writer structure" ] impl crate :: Writable for WORD03 { } # [ doc = "Message Buffer 3 WORD0 Register" ] pub mod word03 { # [ doc = "Reader of register WORD03" ] pub type R = crate :: R < u32 , super :: WORD03 > ; # [ doc = "Writer for register WORD03" ] pub type W = crate :: W < u32 , super :: WORD03 > ; # [ doc = "Register WORD03 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD03 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 3 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word13](word13) module" ] pub type WORD13 = crate :: Reg < u32 , _WORD13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD13 ; # [ doc = "`read()` method returns [word13::R](word13::R) reader structure" ] impl crate :: Readable for WORD13 { } # [ doc = "`write(|w| ..)` method takes [word13::W](word13::W) writer structure" ] impl crate :: Writable for WORD13 { } # [ doc = "Message Buffer 3 WORD1 Register" ] pub mod word13 { # [ doc = "Reader of register WORD13" ] pub type R = crate :: R < u32 , super :: WORD13 > ; # [ doc = "Writer for register WORD13" ] pub type W = crate :: W < u32 , super :: WORD13 > ; # [ doc = "Register WORD13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 4 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs4](cs4) module" ] pub type CS4 = crate :: Reg < u32 , _CS4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS4 ; # [ doc = "`read()` method returns [cs4::R](cs4::R) reader structure" ] impl crate :: Readable for CS4 { } # [ doc = "`write(|w| ..)` method takes [cs4::W](cs4::W) writer structure" ] impl crate :: Writable for CS4 { } # [ doc = "Message Buffer 4 CS Register" ] pub mod cs4 { # [ doc = "Reader of register CS4" ] pub type R = crate :: R < u32 , super :: CS4 > ; # [ doc = "Writer for register CS4" ] pub type W = crate :: W < u32 , super :: CS4 > ; # [ doc = "Register CS4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 4 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id4](id4) module" ] pub type ID4 = crate :: Reg < u32 , _ID4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID4 ; # [ doc = "`read()` method returns [id4::R](id4::R) reader structure" ] impl crate :: Readable for ID4 { } # [ doc = "`write(|w| ..)` method takes [id4::W](id4::W) writer structure" ] impl crate :: Writable for ID4 { } # [ doc = "Message Buffer 4 ID Register" ] pub mod id4 { # [ doc = "Reader of register ID4" ] pub type R = crate :: R < u32 , super :: ID4 > ; # [ doc = "Writer for register ID4" ] pub type W = crate :: W < u32 , super :: ID4 > ; # [ doc = "Register ID4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 4 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word04](word04) module" ] pub type WORD04 = crate :: Reg < u32 , _WORD04 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD04 ; # [ doc = "`read()` method returns [word04::R](word04::R) reader structure" ] impl crate :: Readable for WORD04 { } # [ doc = "`write(|w| ..)` method takes [word04::W](word04::W) writer structure" ] impl crate :: Writable for WORD04 { } # [ doc = "Message Buffer 4 WORD0 Register" ] pub mod word04 { # [ doc = "Reader of register WORD04" ] pub type R = crate :: R < u32 , super :: WORD04 > ; # [ doc = "Writer for register WORD04" ] pub type W = crate :: W < u32 , super :: WORD04 > ; # [ doc = "Register WORD04 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD04 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 4 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word14](word14) module" ] pub type WORD14 = crate :: Reg < u32 , _WORD14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD14 ; # [ doc = "`read()` method returns [word14::R](word14::R) reader structure" ] impl crate :: Readable for WORD14 { } # [ doc = "`write(|w| ..)` method takes [word14::W](word14::W) writer structure" ] impl crate :: Writable for WORD14 { } # [ doc = "Message Buffer 4 WORD1 Register" ] pub mod word14 { # [ doc = "Reader of register WORD14" ] pub type R = crate :: R < u32 , super :: WORD14 > ; # [ doc = "Writer for register WORD14" ] pub type W = crate :: W < u32 , super :: WORD14 > ; # [ doc = "Register WORD14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 5 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs5](cs5) module" ] pub type CS5 = crate :: Reg < u32 , _CS5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS5 ; # [ doc = "`read()` method returns [cs5::R](cs5::R) reader structure" ] impl crate :: Readable for CS5 { } # [ doc = "`write(|w| ..)` method takes [cs5::W](cs5::W) writer structure" ] impl crate :: Writable for CS5 { } # [ doc = "Message Buffer 5 CS Register" ] pub mod cs5 { # [ doc = "Reader of register CS5" ] pub type R = crate :: R < u32 , super :: CS5 > ; # [ doc = "Writer for register CS5" ] pub type W = crate :: W < u32 , super :: CS5 > ; # [ doc = "Register CS5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 5 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id5](id5) module" ] pub type ID5 = crate :: Reg < u32 , _ID5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID5 ; # [ doc = "`read()` method returns [id5::R](id5::R) reader structure" ] impl crate :: Readable for ID5 { } # [ doc = "`write(|w| ..)` method takes [id5::W](id5::W) writer structure" ] impl crate :: Writable for ID5 { } # [ doc = "Message Buffer 5 ID Register" ] pub mod id5 { # [ doc = "Reader of register ID5" ] pub type R = crate :: R < u32 , super :: ID5 > ; # [ doc = "Writer for register ID5" ] pub type W = crate :: W < u32 , super :: ID5 > ; # [ doc = "Register ID5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 5 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word05](word05) module" ] pub type WORD05 = crate :: Reg < u32 , _WORD05 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD05 ; # [ doc = "`read()` method returns [word05::R](word05::R) reader structure" ] impl crate :: Readable for WORD05 { } # [ doc = "`write(|w| ..)` method takes [word05::W](word05::W) writer structure" ] impl crate :: Writable for WORD05 { } # [ doc = "Message Buffer 5 WORD0 Register" ] pub mod word05 { # [ doc = "Reader of register WORD05" ] pub type R = crate :: R < u32 , super :: WORD05 > ; # [ doc = "Writer for register WORD05" ] pub type W = crate :: W < u32 , super :: WORD05 > ; # [ doc = "Register WORD05 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD05 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 5 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word15](word15) module" ] pub type WORD15 = crate :: Reg < u32 , _WORD15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD15 ; # [ doc = "`read()` method returns [word15::R](word15::R) reader structure" ] impl crate :: Readable for WORD15 { } # [ doc = "`write(|w| ..)` method takes [word15::W](word15::W) writer structure" ] impl crate :: Writable for WORD15 { } # [ doc = "Message Buffer 5 WORD1 Register" ] pub mod word15 { # [ doc = "Reader of register WORD15" ] pub type R = crate :: R < u32 , super :: WORD15 > ; # [ doc = "Writer for register WORD15" ] pub type W = crate :: W < u32 , super :: WORD15 > ; # [ doc = "Register WORD15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 6 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs6](cs6) module" ] pub type CS6 = crate :: Reg < u32 , _CS6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS6 ; # [ doc = "`read()` method returns [cs6::R](cs6::R) reader structure" ] impl crate :: Readable for CS6 { } # [ doc = "`write(|w| ..)` method takes [cs6::W](cs6::W) writer structure" ] impl crate :: Writable for CS6 { } # [ doc = "Message Buffer 6 CS Register" ] pub mod cs6 { # [ doc = "Reader of register CS6" ] pub type R = crate :: R < u32 , super :: CS6 > ; # [ doc = "Writer for register CS6" ] pub type W = crate :: W < u32 , super :: CS6 > ; # [ doc = "Register CS6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 6 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id6](id6) module" ] pub type ID6 = crate :: Reg < u32 , _ID6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID6 ; # [ doc = "`read()` method returns [id6::R](id6::R) reader structure" ] impl crate :: Readable for ID6 { } # [ doc = "`write(|w| ..)` method takes [id6::W](id6::W) writer structure" ] impl crate :: Writable for ID6 { } # [ doc = "Message Buffer 6 ID Register" ] pub mod id6 { # [ doc = "Reader of register ID6" ] pub type R = crate :: R < u32 , super :: ID6 > ; # [ doc = "Writer for register ID6" ] pub type W = crate :: W < u32 , super :: ID6 > ; # [ doc = "Register ID6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 6 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word06](word06) module" ] pub type WORD06 = crate :: Reg < u32 , _WORD06 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD06 ; # [ doc = "`read()` method returns [word06::R](word06::R) reader structure" ] impl crate :: Readable for WORD06 { } # [ doc = "`write(|w| ..)` method takes [word06::W](word06::W) writer structure" ] impl crate :: Writable for WORD06 { } # [ doc = "Message Buffer 6 WORD0 Register" ] pub mod word06 { # [ doc = "Reader of register WORD06" ] pub type R = crate :: R < u32 , super :: WORD06 > ; # [ doc = "Writer for register WORD06" ] pub type W = crate :: W < u32 , super :: WORD06 > ; # [ doc = "Register WORD06 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD06 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 6 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word16](word16) module" ] pub type WORD16 = crate :: Reg < u32 , _WORD16 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD16 ; # [ doc = "`read()` method returns [word16::R](word16::R) reader structure" ] impl crate :: Readable for WORD16 { } # [ doc = "`write(|w| ..)` method takes [word16::W](word16::W) writer structure" ] impl crate :: Writable for WORD16 { } # [ doc = "Message Buffer 6 WORD1 Register" ] pub mod word16 { # [ doc = "Reader of register WORD16" ] pub type R = crate :: R < u32 , super :: WORD16 > ; # [ doc = "Writer for register WORD16" ] pub type W = crate :: W < u32 , super :: WORD16 > ; # [ doc = "Register WORD16 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD16 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 7 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs7](cs7) module" ] pub type CS7 = crate :: Reg < u32 , _CS7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS7 ; # [ doc = "`read()` method returns [cs7::R](cs7::R) reader structure" ] impl crate :: Readable for CS7 { } # [ doc = "`write(|w| ..)` method takes [cs7::W](cs7::W) writer structure" ] impl crate :: Writable for CS7 { } # [ doc = "Message Buffer 7 CS Register" ] pub mod cs7 { # [ doc = "Reader of register CS7" ] pub type R = crate :: R < u32 , super :: CS7 > ; # [ doc = "Writer for register CS7" ] pub type W = crate :: W < u32 , super :: CS7 > ; # [ doc = "Register CS7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 7 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id7](id7) module" ] pub type ID7 = crate :: Reg < u32 , _ID7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID7 ; # [ doc = "`read()` method returns [id7::R](id7::R) reader structure" ] impl crate :: Readable for ID7 { } # [ doc = "`write(|w| ..)` method takes [id7::W](id7::W) writer structure" ] impl crate :: Writable for ID7 { } # [ doc = "Message Buffer 7 ID Register" ] pub mod id7 { # [ doc = "Reader of register ID7" ] pub type R = crate :: R < u32 , super :: ID7 > ; # [ doc = "Writer for register ID7" ] pub type W = crate :: W < u32 , super :: ID7 > ; # [ doc = "Register ID7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 7 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word07](word07) module" ] pub type WORD07 = crate :: Reg < u32 , _WORD07 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD07 ; # [ doc = "`read()` method returns [word07::R](word07::R) reader structure" ] impl crate :: Readable for WORD07 { } # [ doc = "`write(|w| ..)` method takes [word07::W](word07::W) writer structure" ] impl crate :: Writable for WORD07 { } # [ doc = "Message Buffer 7 WORD0 Register" ] pub mod word07 { # [ doc = "Reader of register WORD07" ] pub type R = crate :: R < u32 , super :: WORD07 > ; # [ doc = "Writer for register WORD07" ] pub type W = crate :: W < u32 , super :: WORD07 > ; # [ doc = "Register WORD07 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD07 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 7 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word17](word17) module" ] pub type WORD17 = crate :: Reg < u32 , _WORD17 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD17 ; # [ doc = "`read()` method returns [word17::R](word17::R) reader structure" ] impl crate :: Readable for WORD17 { } # [ doc = "`write(|w| ..)` method takes [word17::W](word17::W) writer structure" ] impl crate :: Writable for WORD17 { } # [ doc = "Message Buffer 7 WORD1 Register" ] pub mod word17 { # [ doc = "Reader of register WORD17" ] pub type R = crate :: R < u32 , super :: WORD17 > ; # [ doc = "Writer for register WORD17" ] pub type W = crate :: W < u32 , super :: WORD17 > ; # [ doc = "Register WORD17 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD17 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 8 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs8](cs8) module" ] pub type CS8 = crate :: Reg < u32 , _CS8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS8 ; # [ doc = "`read()` method returns [cs8::R](cs8::R) reader structure" ] impl crate :: Readable for CS8 { } # [ doc = "`write(|w| ..)` method takes [cs8::W](cs8::W) writer structure" ] impl crate :: Writable for CS8 { } # [ doc = "Message Buffer 8 CS Register" ] pub mod cs8 { # [ doc = "Reader of register CS8" ] pub type R = crate :: R < u32 , super :: CS8 > ; # [ doc = "Writer for register CS8" ] pub type W = crate :: W < u32 , super :: CS8 > ; # [ doc = "Register CS8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 8 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id8](id8) module" ] pub type ID8 = crate :: Reg < u32 , _ID8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID8 ; # [ doc = "`read()` method returns [id8::R](id8::R) reader structure" ] impl crate :: Readable for ID8 { } # [ doc = "`write(|w| ..)` method takes [id8::W](id8::W) writer structure" ] impl crate :: Writable for ID8 { } # [ doc = "Message Buffer 8 ID Register" ] pub mod id8 { # [ doc = "Reader of register ID8" ] pub type R = crate :: R < u32 , super :: ID8 > ; # [ doc = "Writer for register ID8" ] pub type W = crate :: W < u32 , super :: ID8 > ; # [ doc = "Register ID8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 8 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word08](word08) module" ] pub type WORD08 = crate :: Reg < u32 , _WORD08 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD08 ; # [ doc = "`read()` method returns [word08::R](word08::R) reader structure" ] impl crate :: Readable for WORD08 { } # [ doc = "`write(|w| ..)` method takes [word08::W](word08::W) writer structure" ] impl crate :: Writable for WORD08 { } # [ doc = "Message Buffer 8 WORD0 Register" ] pub mod word08 { # [ doc = "Reader of register WORD08" ] pub type R = crate :: R < u32 , super :: WORD08 > ; # [ doc = "Writer for register WORD08" ] pub type W = crate :: W < u32 , super :: WORD08 > ; # [ doc = "Register WORD08 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD08 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 8 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word18](word18) module" ] pub type WORD18 = crate :: Reg < u32 , _WORD18 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD18 ; # [ doc = "`read()` method returns [word18::R](word18::R) reader structure" ] impl crate :: Readable for WORD18 { } # [ doc = "`write(|w| ..)` method takes [word18::W](word18::W) writer structure" ] impl crate :: Writable for WORD18 { } # [ doc = "Message Buffer 8 WORD1 Register" ] pub mod word18 { # [ doc = "Reader of register WORD18" ] pub type R = crate :: R < u32 , super :: WORD18 > ; # [ doc = "Writer for register WORD18" ] pub type W = crate :: W < u32 , super :: WORD18 > ; # [ doc = "Register WORD18 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD18 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 9 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs9](cs9) module" ] pub type CS9 = crate :: Reg < u32 , _CS9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS9 ; # [ doc = "`read()` method returns [cs9::R](cs9::R) reader structure" ] impl crate :: Readable for CS9 { } # [ doc = "`write(|w| ..)` method takes [cs9::W](cs9::W) writer structure" ] impl crate :: Writable for CS9 { } # [ doc = "Message Buffer 9 CS Register" ] pub mod cs9 { # [ doc = "Reader of register CS9" ] pub type R = crate :: R < u32 , super :: CS9 > ; # [ doc = "Writer for register CS9" ] pub type W = crate :: W < u32 , super :: CS9 > ; # [ doc = "Register CS9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 9 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id9](id9) module" ] pub type ID9 = crate :: Reg < u32 , _ID9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID9 ; # [ doc = "`read()` method returns [id9::R](id9::R) reader structure" ] impl crate :: Readable for ID9 { } # [ doc = "`write(|w| ..)` method takes [id9::W](id9::W) writer structure" ] impl crate :: Writable for ID9 { } # [ doc = "Message Buffer 9 ID Register" ] pub mod id9 { # [ doc = "Reader of register ID9" ] pub type R = crate :: R < u32 , super :: ID9 > ; # [ doc = "Writer for register ID9" ] pub type W = crate :: W < u32 , super :: ID9 > ; # [ doc = "Register ID9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 9 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word09](word09) module" ] pub type WORD09 = crate :: Reg < u32 , _WORD09 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD09 ; # [ doc = "`read()` method returns [word09::R](word09::R) reader structure" ] impl crate :: Readable for WORD09 { } # [ doc = "`write(|w| ..)` method takes [word09::W](word09::W) writer structure" ] impl crate :: Writable for WORD09 { } # [ doc = "Message Buffer 9 WORD0 Register" ] pub mod word09 { # [ doc = "Reader of register WORD09" ] pub type R = crate :: R < u32 , super :: WORD09 > ; # [ doc = "Writer for register WORD09" ] pub type W = crate :: W < u32 , super :: WORD09 > ; # [ doc = "Register WORD09 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD09 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 9 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word19](word19) module" ] pub type WORD19 = crate :: Reg < u32 , _WORD19 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD19 ; # [ doc = "`read()` method returns [word19::R](word19::R) reader structure" ] impl crate :: Readable for WORD19 { } # [ doc = "`write(|w| ..)` method takes [word19::W](word19::W) writer structure" ] impl crate :: Writable for WORD19 { } # [ doc = "Message Buffer 9 WORD1 Register" ] pub mod word19 { # [ doc = "Reader of register WORD19" ] pub type R = crate :: R < u32 , super :: WORD19 > ; # [ doc = "Writer for register WORD19" ] pub type W = crate :: W < u32 , super :: WORD19 > ; # [ doc = "Register WORD19 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD19 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 10 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs10](cs10) module" ] pub type CS10 = crate :: Reg < u32 , _CS10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS10 ; # [ doc = "`read()` method returns [cs10::R](cs10::R) reader structure" ] impl crate :: Readable for CS10 { } # [ doc = "`write(|w| ..)` method takes [cs10::W](cs10::W) writer structure" ] impl crate :: Writable for CS10 { } # [ doc = "Message Buffer 10 CS Register" ] pub mod cs10 { # [ doc = "Reader of register CS10" ] pub type R = crate :: R < u32 , super :: CS10 > ; # [ doc = "Writer for register CS10" ] pub type W = crate :: W < u32 , super :: CS10 > ; # [ doc = "Register CS10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 10 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id10](id10) module" ] pub type ID10 = crate :: Reg < u32 , _ID10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID10 ; # [ doc = "`read()` method returns [id10::R](id10::R) reader structure" ] impl crate :: Readable for ID10 { } # [ doc = "`write(|w| ..)` method takes [id10::W](id10::W) writer structure" ] impl crate :: Writable for ID10 { } # [ doc = "Message Buffer 10 ID Register" ] pub mod id10 { # [ doc = "Reader of register ID10" ] pub type R = crate :: R < u32 , super :: ID10 > ; # [ doc = "Writer for register ID10" ] pub type W = crate :: W < u32 , super :: ID10 > ; # [ doc = "Register ID10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 10 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word010](word010) module" ] pub type WORD010 = crate :: Reg < u32 , _WORD010 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD010 ; # [ doc = "`read()` method returns [word010::R](word010::R) reader structure" ] impl crate :: Readable for WORD010 { } # [ doc = "`write(|w| ..)` method takes [word010::W](word010::W) writer structure" ] impl crate :: Writable for WORD010 { } # [ doc = "Message Buffer 10 WORD0 Register" ] pub mod word010 { # [ doc = "Reader of register WORD010" ] pub type R = crate :: R < u32 , super :: WORD010 > ; # [ doc = "Writer for register WORD010" ] pub type W = crate :: W < u32 , super :: WORD010 > ; # [ doc = "Register WORD010 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD010 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 10 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word110](word110) module" ] pub type WORD110 = crate :: Reg < u32 , _WORD110 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD110 ; # [ doc = "`read()` method returns [word110::R](word110::R) reader structure" ] impl crate :: Readable for WORD110 { } # [ doc = "`write(|w| ..)` method takes [word110::W](word110::W) writer structure" ] impl crate :: Writable for WORD110 { } # [ doc = "Message Buffer 10 WORD1 Register" ] pub mod word110 { # [ doc = "Reader of register WORD110" ] pub type R = crate :: R < u32 , super :: WORD110 > ; # [ doc = "Writer for register WORD110" ] pub type W = crate :: W < u32 , super :: WORD110 > ; # [ doc = "Register WORD110 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD110 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 11 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs11](cs11) module" ] pub type CS11 = crate :: Reg < u32 , _CS11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS11 ; # [ doc = "`read()` method returns [cs11::R](cs11::R) reader structure" ] impl crate :: Readable for CS11 { } # [ doc = "`write(|w| ..)` method takes [cs11::W](cs11::W) writer structure" ] impl crate :: Writable for CS11 { } # [ doc = "Message Buffer 11 CS Register" ] pub mod cs11 { # [ doc = "Reader of register CS11" ] pub type R = crate :: R < u32 , super :: CS11 > ; # [ doc = "Writer for register CS11" ] pub type W = crate :: W < u32 , super :: CS11 > ; # [ doc = "Register CS11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 11 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id11](id11) module" ] pub type ID11 = crate :: Reg < u32 , _ID11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID11 ; # [ doc = "`read()` method returns [id11::R](id11::R) reader structure" ] impl crate :: Readable for ID11 { } # [ doc = "`write(|w| ..)` method takes [id11::W](id11::W) writer structure" ] impl crate :: Writable for ID11 { } # [ doc = "Message Buffer 11 ID Register" ] pub mod id11 { # [ doc = "Reader of register ID11" ] pub type R = crate :: R < u32 , super :: ID11 > ; # [ doc = "Writer for register ID11" ] pub type W = crate :: W < u32 , super :: ID11 > ; # [ doc = "Register ID11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 11 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word011](word011) module" ] pub type WORD011 = crate :: Reg < u32 , _WORD011 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD011 ; # [ doc = "`read()` method returns [word011::R](word011::R) reader structure" ] impl crate :: Readable for WORD011 { } # [ doc = "`write(|w| ..)` method takes [word011::W](word011::W) writer structure" ] impl crate :: Writable for WORD011 { } # [ doc = "Message Buffer 11 WORD0 Register" ] pub mod word011 { # [ doc = "Reader of register WORD011" ] pub type R = crate :: R < u32 , super :: WORD011 > ; # [ doc = "Writer for register WORD011" ] pub type W = crate :: W < u32 , super :: WORD011 > ; # [ doc = "Register WORD011 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD011 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 11 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word111](word111) module" ] pub type WORD111 = crate :: Reg < u32 , _WORD111 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD111 ; # [ doc = "`read()` method returns [word111::R](word111::R) reader structure" ] impl crate :: Readable for WORD111 { } # [ doc = "`write(|w| ..)` method takes [word111::W](word111::W) writer structure" ] impl crate :: Writable for WORD111 { } # [ doc = "Message Buffer 11 WORD1 Register" ] pub mod word111 { # [ doc = "Reader of register WORD111" ] pub type R = crate :: R < u32 , super :: WORD111 > ; # [ doc = "Writer for register WORD111" ] pub type W = crate :: W < u32 , super :: WORD111 > ; # [ doc = "Register WORD111 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD111 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 12 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs12](cs12) module" ] pub type CS12 = crate :: Reg < u32 , _CS12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS12 ; # [ doc = "`read()` method returns [cs12::R](cs12::R) reader structure" ] impl crate :: Readable for CS12 { } # [ doc = "`write(|w| ..)` method takes [cs12::W](cs12::W) writer structure" ] impl crate :: Writable for CS12 { } # [ doc = "Message Buffer 12 CS Register" ] pub mod cs12 { # [ doc = "Reader of register CS12" ] pub type R = crate :: R < u32 , super :: CS12 > ; # [ doc = "Writer for register CS12" ] pub type W = crate :: W < u32 , super :: CS12 > ; # [ doc = "Register CS12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 12 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id12](id12) module" ] pub type ID12 = crate :: Reg < u32 , _ID12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID12 ; # [ doc = "`read()` method returns [id12::R](id12::R) reader structure" ] impl crate :: Readable for ID12 { } # [ doc = "`write(|w| ..)` method takes [id12::W](id12::W) writer structure" ] impl crate :: Writable for ID12 { } # [ doc = "Message Buffer 12 ID Register" ] pub mod id12 { # [ doc = "Reader of register ID12" ] pub type R = crate :: R < u32 , super :: ID12 > ; # [ doc = "Writer for register ID12" ] pub type W = crate :: W < u32 , super :: ID12 > ; # [ doc = "Register ID12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 12 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word012](word012) module" ] pub type WORD012 = crate :: Reg < u32 , _WORD012 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD012 ; # [ doc = "`read()` method returns [word012::R](word012::R) reader structure" ] impl crate :: Readable for WORD012 { } # [ doc = "`write(|w| ..)` method takes [word012::W](word012::W) writer structure" ] impl crate :: Writable for WORD012 { } # [ doc = "Message Buffer 12 WORD0 Register" ] pub mod word012 { # [ doc = "Reader of register WORD012" ] pub type R = crate :: R < u32 , super :: WORD012 > ; # [ doc = "Writer for register WORD012" ] pub type W = crate :: W < u32 , super :: WORD012 > ; # [ doc = "Register WORD012 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD012 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 12 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word112](word112) module" ] pub type WORD112 = crate :: Reg < u32 , _WORD112 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD112 ; # [ doc = "`read()` method returns [word112::R](word112::R) reader structure" ] impl crate :: Readable for WORD112 { } # [ doc = "`write(|w| ..)` method takes [word112::W](word112::W) writer structure" ] impl crate :: Writable for WORD112 { } # [ doc = "Message Buffer 12 WORD1 Register" ] pub mod word112 { # [ doc = "Reader of register WORD112" ] pub type R = crate :: R < u32 , super :: WORD112 > ; # [ doc = "Writer for register WORD112" ] pub type W = crate :: W < u32 , super :: WORD112 > ; # [ doc = "Register WORD112 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD112 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 13 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs13](cs13) module" ] pub type CS13 = crate :: Reg < u32 , _CS13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS13 ; # [ doc = "`read()` method returns [cs13::R](cs13::R) reader structure" ] impl crate :: Readable for CS13 { } # [ doc = "`write(|w| ..)` method takes [cs13::W](cs13::W) writer structure" ] impl crate :: Writable for CS13 { } # [ doc = "Message Buffer 13 CS Register" ] pub mod cs13 { # [ doc = "Reader of register CS13" ] pub type R = crate :: R < u32 , super :: CS13 > ; # [ doc = "Writer for register CS13" ] pub type W = crate :: W < u32 , super :: CS13 > ; # [ doc = "Register CS13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 13 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id13](id13) module" ] pub type ID13 = crate :: Reg < u32 , _ID13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID13 ; # [ doc = "`read()` method returns [id13::R](id13::R) reader structure" ] impl crate :: Readable for ID13 { } # [ doc = "`write(|w| ..)` method takes [id13::W](id13::W) writer structure" ] impl crate :: Writable for ID13 { } # [ doc = "Message Buffer 13 ID Register" ] pub mod id13 { # [ doc = "Reader of register ID13" ] pub type R = crate :: R < u32 , super :: ID13 > ; # [ doc = "Writer for register ID13" ] pub type W = crate :: W < u32 , super :: ID13 > ; # [ doc = "Register ID13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 13 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word013](word013) module" ] pub type WORD013 = crate :: Reg < u32 , _WORD013 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD013 ; # [ doc = "`read()` method returns [word013::R](word013::R) reader structure" ] impl crate :: Readable for WORD013 { } # [ doc = "`write(|w| ..)` method takes [word013::W](word013::W) writer structure" ] impl crate :: Writable for WORD013 { } # [ doc = "Message Buffer 13 WORD0 Register" ] pub mod word013 { # [ doc = "Reader of register WORD013" ] pub type R = crate :: R < u32 , super :: WORD013 > ; # [ doc = "Writer for register WORD013" ] pub type W = crate :: W < u32 , super :: WORD013 > ; # [ doc = "Register WORD013 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD013 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 13 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word113](word113) module" ] pub type WORD113 = crate :: Reg < u32 , _WORD113 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD113 ; # [ doc = "`read()` method returns [word113::R](word113::R) reader structure" ] impl crate :: Readable for WORD113 { } # [ doc = "`write(|w| ..)` method takes [word113::W](word113::W) writer structure" ] impl crate :: Writable for WORD113 { } # [ doc = "Message Buffer 13 WORD1 Register" ] pub mod word113 { # [ doc = "Reader of register WORD113" ] pub type R = crate :: R < u32 , super :: WORD113 > ; # [ doc = "Writer for register WORD113" ] pub type W = crate :: W < u32 , super :: WORD113 > ; # [ doc = "Register WORD113 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD113 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 14 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs14](cs14) module" ] pub type CS14 = crate :: Reg < u32 , _CS14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS14 ; # [ doc = "`read()` method returns [cs14::R](cs14::R) reader structure" ] impl crate :: Readable for CS14 { } # [ doc = "`write(|w| ..)` method takes [cs14::W](cs14::W) writer structure" ] impl crate :: Writable for CS14 { } # [ doc = "Message Buffer 14 CS Register" ] pub mod cs14 { # [ doc = "Reader of register CS14" ] pub type R = crate :: R < u32 , super :: CS14 > ; # [ doc = "Writer for register CS14" ] pub type W = crate :: W < u32 , super :: CS14 > ; # [ doc = "Register CS14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 14 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id14](id14) module" ] pub type ID14 = crate :: Reg < u32 , _ID14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID14 ; # [ doc = "`read()` method returns [id14::R](id14::R) reader structure" ] impl crate :: Readable for ID14 { } # [ doc = "`write(|w| ..)` method takes [id14::W](id14::W) writer structure" ] impl crate :: Writable for ID14 { } # [ doc = "Message Buffer 14 ID Register" ] pub mod id14 { # [ doc = "Reader of register ID14" ] pub type R = crate :: R < u32 , super :: ID14 > ; # [ doc = "Writer for register ID14" ] pub type W = crate :: W < u32 , super :: ID14 > ; # [ doc = "Register ID14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 14 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word014](word014) module" ] pub type WORD014 = crate :: Reg < u32 , _WORD014 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD014 ; # [ doc = "`read()` method returns [word014::R](word014::R) reader structure" ] impl crate :: Readable for WORD014 { } # [ doc = "`write(|w| ..)` method takes [word014::W](word014::W) writer structure" ] impl crate :: Writable for WORD014 { } # [ doc = "Message Buffer 14 WORD0 Register" ] pub mod word014 { # [ doc = "Reader of register WORD014" ] pub type R = crate :: R < u32 , super :: WORD014 > ; # [ doc = "Writer for register WORD014" ] pub type W = crate :: W < u32 , super :: WORD014 > ; # [ doc = "Register WORD014 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD014 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 14 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word114](word114) module" ] pub type WORD114 = crate :: Reg < u32 , _WORD114 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD114 ; # [ doc = "`read()` method returns [word114::R](word114::R) reader structure" ] impl crate :: Readable for WORD114 { } # [ doc = "`write(|w| ..)` method takes [word114::W](word114::W) writer structure" ] impl crate :: Writable for WORD114 { } # [ doc = "Message Buffer 14 WORD1 Register" ] pub mod word114 { # [ doc = "Reader of register WORD114" ] pub type R = crate :: R < u32 , super :: WORD114 > ; # [ doc = "Writer for register WORD114" ] pub type W = crate :: W < u32 , super :: WORD114 > ; # [ doc = "Register WORD114 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD114 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 15 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs15](cs15) module" ] pub type CS15 = crate :: Reg < u32 , _CS15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS15 ; # [ doc = "`read()` method returns [cs15::R](cs15::R) reader structure" ] impl crate :: Readable for CS15 { } # [ doc = "`write(|w| ..)` method takes [cs15::W](cs15::W) writer structure" ] impl crate :: Writable for CS15 { } # [ doc = "Message Buffer 15 CS Register" ] pub mod cs15 { # [ doc = "Reader of register CS15" ] pub type R = crate :: R < u32 , super :: CS15 > ; # [ doc = "Writer for register CS15" ] pub type W = crate :: W < u32 , super :: CS15 > ; # [ doc = "Register CS15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 15 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id15](id15) module" ] pub type ID15 = crate :: Reg < u32 , _ID15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID15 ; # [ doc = "`read()` method returns [id15::R](id15::R) reader structure" ] impl crate :: Readable for ID15 { } # [ doc = "`write(|w| ..)` method takes [id15::W](id15::W) writer structure" ] impl crate :: Writable for ID15 { } # [ doc = "Message Buffer 15 ID Register" ] pub mod id15 { # [ doc = "Reader of register ID15" ] pub type R = crate :: R < u32 , super :: ID15 > ; # [ doc = "Writer for register ID15" ] pub type W = crate :: W < u32 , super :: ID15 > ; # [ doc = "Register ID15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 15 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word015](word015) module" ] pub type WORD015 = crate :: Reg < u32 , _WORD015 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD015 ; # [ doc = "`read()` method returns [word015::R](word015::R) reader structure" ] impl crate :: Readable for WORD015 { } # [ doc = "`write(|w| ..)` method takes [word015::W](word015::W) writer structure" ] impl crate :: Writable for WORD015 { } # [ doc = "Message Buffer 15 WORD0 Register" ] pub mod word015 { # [ doc = "Reader of register WORD015" ] pub type R = crate :: R < u32 , super :: WORD015 > ; # [ doc = "Writer for register WORD015" ] pub type W = crate :: W < u32 , super :: WORD015 > ; # [ doc = "Register WORD015 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD015 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 15 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word115](word115) module" ] pub type WORD115 = crate :: Reg < u32 , _WORD115 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD115 ; # [ doc = "`read()` method returns [word115::R](word115::R) reader structure" ] impl crate :: Readable for WORD115 { } # [ doc = "`write(|w| ..)` method takes [word115::W](word115::W) writer structure" ] impl crate :: Writable for WORD115 { } # [ doc = "Message Buffer 15 WORD1 Register" ] pub mod word115 { # [ doc = "Reader of register WORD115" ] pub type R = crate :: R < u32 , super :: WORD115 > ; # [ doc = "Writer for register WORD115" ] pub type W = crate :: W < u32 , super :: WORD115 > ; # [ doc = "Register WORD115 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD115 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Rx Individual Mask Registers\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rximr](rximr) module" ] pub type RXIMR = crate :: Reg < u32 , _RXIMR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXIMR ; # [ doc = "`read()` method returns [rximr::R](rximr::R) reader structure" ] impl crate :: Readable for RXIMR { } # [ doc = "`write(|w| ..)` method takes [rximr::W](rximr::W) writer structure" ] impl crate :: Writable for RXIMR { } # [ doc = "Rx Individual Mask Registers" ] pub mod rximr { # [ doc = "Reader of register RXIMR%s" ] pub type R = crate :: R < u32 , super :: RXIMR > ; # [ doc = "Writer for register RXIMR%s" ] pub type W = crate :: W < u32 , super :: RXIMR > ; # [ doc = "Register RXIMR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RXIMR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI0_A > for bool { # [ inline ( always ) ] fn from ( variant : MI0_A ) -> Self { match variant { MI0_A :: _0 => false , MI0_A :: _1 => true } } } # [ doc = "Reader of field `MI0`" ] pub type MI0_R = crate :: R < bool , MI0_A > ; impl MI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI0_A { match self . bits { false => MI0_A :: _0 , true => MI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI0_A :: _1 } } # [ doc = "Write proxy for field `MI0`" ] pub struct MI0_W < 'a > { w : & 'a mut W , } impl < 'a > MI0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI1_A > for bool { # [ inline ( always ) ] fn from ( variant : MI1_A ) -> Self { match variant { MI1_A :: _0 => false , MI1_A :: _1 => true } } } # [ doc = "Reader of field `MI1`" ] pub type MI1_R = crate :: R < bool , MI1_A > ; impl MI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI1_A { match self . bits { false => MI1_A :: _0 , true => MI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI1_A :: _1 } } # [ doc = "Write proxy for field `MI1`" ] pub struct MI1_W < 'a > { w : & 'a mut W , } impl < 'a > MI1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI1_A :: _1 ) } # [ 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 } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI2_A > for bool { # [ inline ( always ) ] fn from ( variant : MI2_A ) -> Self { match variant { MI2_A :: _0 => false , MI2_A :: _1 => true } } } # [ doc = "Reader of field `MI2`" ] pub type MI2_R = crate :: R < bool , MI2_A > ; impl MI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI2_A { match self . bits { false => MI2_A :: _0 , true => MI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI2_A :: _1 } } # [ doc = "Write proxy for field `MI2`" ] pub struct MI2_W < 'a > { w : & 'a mut W , } impl < 'a > MI2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI2_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI3_A > for bool { # [ inline ( always ) ] fn from ( variant : MI3_A ) -> Self { match variant { MI3_A :: _0 => false , MI3_A :: _1 => true } } } # [ doc = "Reader of field `MI3`" ] pub type MI3_R = crate :: R < bool , MI3_A > ; impl MI3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI3_A { match self . bits { false => MI3_A :: _0 , true => MI3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI3_A :: _1 } } # [ doc = "Write proxy for field `MI3`" ] pub struct MI3_W < 'a > { w : & 'a mut W , } impl < 'a > MI3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI4_A > for bool { # [ inline ( always ) ] fn from ( variant : MI4_A ) -> Self { match variant { MI4_A :: _0 => false , MI4_A :: _1 => true } } } # [ doc = "Reader of field `MI4`" ] pub type MI4_R = crate :: R < bool , MI4_A > ; impl MI4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI4_A { match self . bits { false => MI4_A :: _0 , true => MI4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI4_A :: _1 } } # [ doc = "Write proxy for field `MI4`" ] pub struct MI4_W < 'a > { w : & 'a mut W , } impl < 'a > MI4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI5_A > for bool { # [ inline ( always ) ] fn from ( variant : MI5_A ) -> Self { match variant { MI5_A :: _0 => false , MI5_A :: _1 => true } } } # [ doc = "Reader of field `MI5`" ] pub type MI5_R = crate :: R < bool , MI5_A > ; impl MI5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI5_A { match self . bits { false => MI5_A :: _0 , true => MI5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI5_A :: _1 } } # [ doc = "Write proxy for field `MI5`" ] pub struct MI5_W < 'a > { w : & 'a mut W , } impl < 'a > MI5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI5_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI6_A > for bool { # [ inline ( always ) ] fn from ( variant : MI6_A ) -> Self { match variant { MI6_A :: _0 => false , MI6_A :: _1 => true } } } # [ doc = "Reader of field `MI6`" ] pub type MI6_R = crate :: R < bool , MI6_A > ; impl MI6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI6_A { match self . bits { false => MI6_A :: _0 , true => MI6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI6_A :: _1 } } # [ doc = "Write proxy for field `MI6`" ] pub struct MI6_W < 'a > { w : & 'a mut W , } impl < 'a > MI6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI6_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI7_A > for bool { # [ inline ( always ) ] fn from ( variant : MI7_A ) -> Self { match variant { MI7_A :: _0 => false , MI7_A :: _1 => true } } } # [ doc = "Reader of field `MI7`" ] pub type MI7_R = crate :: R < bool , MI7_A > ; impl MI7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI7_A { match self . bits { false => MI7_A :: _0 , true => MI7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI7_A :: _1 } } # [ doc = "Write proxy for field `MI7`" ] pub struct MI7_W < 'a > { w : & 'a mut W , } impl < 'a > MI7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI7_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI8_A > for bool { # [ inline ( always ) ] fn from ( variant : MI8_A ) -> Self { match variant { MI8_A :: _0 => false , MI8_A :: _1 => true } } } # [ doc = "Reader of field `MI8`" ] pub type MI8_R = crate :: R < bool , MI8_A > ; impl MI8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI8_A { match self . bits { false => MI8_A :: _0 , true => MI8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI8_A :: _1 } } # [ doc = "Write proxy for field `MI8`" ] pub struct MI8_W < 'a > { w : & 'a mut W , } impl < 'a > MI8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI9_A > for bool { # [ inline ( always ) ] fn from ( variant : MI9_A ) -> Self { match variant { MI9_A :: _0 => false , MI9_A :: _1 => true } } } # [ doc = "Reader of field `MI9`" ] pub type MI9_R = crate :: R < bool , MI9_A > ; impl MI9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI9_A { match self . bits { false => MI9_A :: _0 , true => MI9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI9_A :: _1 } } # [ doc = "Write proxy for field `MI9`" ] pub struct MI9_W < 'a > { w : & 'a mut W , } impl < 'a > MI9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI10_A > for bool { # [ inline ( always ) ] fn from ( variant : MI10_A ) -> Self { match variant { MI10_A :: _0 => false , MI10_A :: _1 => true } } } # [ doc = "Reader of field `MI10`" ] pub type MI10_R = crate :: R < bool , MI10_A > ; impl MI10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI10_A { match self . bits { false => MI10_A :: _0 , true => MI10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI10_A :: _1 } } # [ doc = "Write proxy for field `MI10`" ] pub struct MI10_W < 'a > { w : & 'a mut W , } impl < 'a > MI10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI11_A > for bool { # [ inline ( always ) ] fn from ( variant : MI11_A ) -> Self { match variant { MI11_A :: _0 => false , MI11_A :: _1 => true } } } # [ doc = "Reader of field `MI11`" ] pub type MI11_R = crate :: R < bool , MI11_A > ; impl MI11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI11_A { match self . bits { false => MI11_A :: _0 , true => MI11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI11_A :: _1 } } # [ doc = "Write proxy for field `MI11`" ] pub struct MI11_W < 'a > { w : & 'a mut W , } impl < 'a > MI11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI12_A > for bool { # [ inline ( always ) ] fn from ( variant : MI12_A ) -> Self { match variant { MI12_A :: _0 => false , MI12_A :: _1 => true } } } # [ doc = "Reader of field `MI12`" ] pub type MI12_R = crate :: R < bool , MI12_A > ; impl MI12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI12_A { match self . bits { false => MI12_A :: _0 , true => MI12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI12_A :: _1 } } # [ doc = "Write proxy for field `MI12`" ] pub struct MI12_W < 'a > { w : & 'a mut W , } impl < 'a > MI12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI13_A > for bool { # [ inline ( always ) ] fn from ( variant : MI13_A ) -> Self { match variant { MI13_A :: _0 => false , MI13_A :: _1 => true } } } # [ doc = "Reader of field `MI13`" ] pub type MI13_R = crate :: R < bool , MI13_A > ; impl MI13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI13_A { match self . bits { false => MI13_A :: _0 , true => MI13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI13_A :: _1 } } # [ doc = "Write proxy for field `MI13`" ] pub struct MI13_W < 'a > { w : & 'a mut W , } impl < 'a > MI13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI13_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI14_A > for bool { # [ inline ( always ) ] fn from ( variant : MI14_A ) -> Self { match variant { MI14_A :: _0 => false , MI14_A :: _1 => true } } } # [ doc = "Reader of field `MI14`" ] pub type MI14_R = crate :: R < bool , MI14_A > ; impl MI14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI14_A { match self . bits { false => MI14_A :: _0 , true => MI14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI14_A :: _1 } } # [ doc = "Write proxy for field `MI14`" ] pub struct MI14_W < 'a > { w : & 'a mut W , } impl < 'a > MI14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI15_A > for bool { # [ inline ( always ) ] fn from ( variant : MI15_A ) -> Self { match variant { MI15_A :: _0 => false , MI15_A :: _1 => true } } } # [ doc = "Reader of field `MI15`" ] pub type MI15_R = crate :: R < bool , MI15_A > ; impl MI15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI15_A { match self . bits { false => MI15_A :: _0 , true => MI15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI15_A :: _1 } } # [ doc = "Write proxy for field `MI15`" ] pub struct MI15_W < 'a > { w : & 'a mut W , } impl < 'a > MI15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI16_A > for bool { # [ inline ( always ) ] fn from ( variant : MI16_A ) -> Self { match variant { MI16_A :: _0 => false , MI16_A :: _1 => true } } } # [ doc = "Reader of field `MI16`" ] pub type MI16_R = crate :: R < bool , MI16_A > ; impl MI16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI16_A { match self . bits { false => MI16_A :: _0 , true => MI16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI16_A :: _1 } } # [ doc = "Write proxy for field `MI16`" ] pub struct MI16_W < 'a > { w : & 'a mut W , } impl < 'a > MI16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI17_A > for bool { # [ inline ( always ) ] fn from ( variant : MI17_A ) -> Self { match variant { MI17_A :: _0 => false , MI17_A :: _1 => true } } } # [ doc = "Reader of field `MI17`" ] pub type MI17_R = crate :: R < bool , MI17_A > ; impl MI17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI17_A { match self . bits { false => MI17_A :: _0 , true => MI17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI17_A :: _1 } } # [ doc = "Write proxy for field `MI17`" ] pub struct MI17_W < 'a > { w : & 'a mut W , } impl < 'a > MI17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI18_A > for bool { # [ inline ( always ) ] fn from ( variant : MI18_A ) -> Self { match variant { MI18_A :: _0 => false , MI18_A :: _1 => true } } } # [ doc = "Reader of field `MI18`" ] pub type MI18_R = crate :: R < bool , MI18_A > ; impl MI18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI18_A { match self . bits { false => MI18_A :: _0 , true => MI18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI18_A :: _1 } } # [ doc = "Write proxy for field `MI18`" ] pub struct MI18_W < 'a > { w : & 'a mut W , } impl < 'a > MI18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI19_A > for bool { # [ inline ( always ) ] fn from ( variant : MI19_A ) -> Self { match variant { MI19_A :: _0 => false , MI19_A :: _1 => true } } } # [ doc = "Reader of field `MI19`" ] pub type MI19_R = crate :: R < bool , MI19_A > ; impl MI19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI19_A { match self . bits { false => MI19_A :: _0 , true => MI19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI19_A :: _1 } } # [ doc = "Write proxy for field `MI19`" ] pub struct MI19_W < 'a > { w : & 'a mut W , } impl < 'a > MI19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI20_A > for bool { # [ inline ( always ) ] fn from ( variant : MI20_A ) -> Self { match variant { MI20_A :: _0 => false , MI20_A :: _1 => true } } } # [ doc = "Reader of field `MI20`" ] pub type MI20_R = crate :: R < bool , MI20_A > ; impl MI20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI20_A { match self . bits { false => MI20_A :: _0 , true => MI20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI20_A :: _1 } } # [ doc = "Write proxy for field `MI20`" ] pub struct MI20_W < 'a > { w : & 'a mut W , } impl < 'a > MI20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI20_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI21_A > for bool { # [ inline ( always ) ] fn from ( variant : MI21_A ) -> Self { match variant { MI21_A :: _0 => false , MI21_A :: _1 => true } } } # [ doc = "Reader of field `MI21`" ] pub type MI21_R = crate :: R < bool , MI21_A > ; impl MI21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI21_A { match self . bits { false => MI21_A :: _0 , true => MI21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI21_A :: _1 } } # [ doc = "Write proxy for field `MI21`" ] pub struct MI21_W < 'a > { w : & 'a mut W , } impl < 'a > MI21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI21_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI22_A > for bool { # [ inline ( always ) ] fn from ( variant : MI22_A ) -> Self { match variant { MI22_A :: _0 => false , MI22_A :: _1 => true } } } # [ doc = "Reader of field `MI22`" ] pub type MI22_R = crate :: R < bool , MI22_A > ; impl MI22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI22_A { match self . bits { false => MI22_A :: _0 , true => MI22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI22_A :: _1 } } # [ doc = "Write proxy for field `MI22`" ] pub struct MI22_W < 'a > { w : & 'a mut W , } impl < 'a > MI22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI23_A > for bool { # [ inline ( always ) ] fn from ( variant : MI23_A ) -> Self { match variant { MI23_A :: _0 => false , MI23_A :: _1 => true } } } # [ doc = "Reader of field `MI23`" ] pub type MI23_R = crate :: R < bool , MI23_A > ; impl MI23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI23_A { match self . bits { false => MI23_A :: _0 , true => MI23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI23_A :: _1 } } # [ doc = "Write proxy for field `MI23`" ] pub struct MI23_W < 'a > { w : & 'a mut W , } impl < 'a > MI23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI24_A > for bool { # [ inline ( always ) ] fn from ( variant : MI24_A ) -> Self { match variant { MI24_A :: _0 => false , MI24_A :: _1 => true } } } # [ doc = "Reader of field `MI24`" ] pub type MI24_R = crate :: R < bool , MI24_A > ; impl MI24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI24_A { match self . bits { false => MI24_A :: _0 , true => MI24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI24_A :: _1 } } # [ doc = "Write proxy for field `MI24`" ] pub struct MI24_W < 'a > { w : & 'a mut W , } impl < 'a > MI24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI24_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI25_A > for bool { # [ inline ( always ) ] fn from ( variant : MI25_A ) -> Self { match variant { MI25_A :: _0 => false , MI25_A :: _1 => true } } } # [ doc = "Reader of field `MI25`" ] pub type MI25_R = crate :: R < bool , MI25_A > ; impl MI25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI25_A { match self . bits { false => MI25_A :: _0 , true => MI25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI25_A :: _1 } } # [ doc = "Write proxy for field `MI25`" ] pub struct MI25_W < 'a > { w : & 'a mut W , } impl < 'a > MI25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI25_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI26_A > for bool { # [ inline ( always ) ] fn from ( variant : MI26_A ) -> Self { match variant { MI26_A :: _0 => false , MI26_A :: _1 => true } } } # [ doc = "Reader of field `MI26`" ] pub type MI26_R = crate :: R < bool , MI26_A > ; impl MI26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI26_A { match self . bits { false => MI26_A :: _0 , true => MI26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI26_A :: _1 } } # [ doc = "Write proxy for field `MI26`" ] pub struct MI26_W < 'a > { w : & 'a mut W , } impl < 'a > MI26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI26_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI27_A > for bool { # [ inline ( always ) ] fn from ( variant : MI27_A ) -> Self { match variant { MI27_A :: _0 => false , MI27_A :: _1 => true } } } # [ doc = "Reader of field `MI27`" ] pub type MI27_R = crate :: R < bool , MI27_A > ; impl MI27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI27_A { match self . bits { false => MI27_A :: _0 , true => MI27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI27_A :: _1 } } # [ doc = "Write proxy for field `MI27`" ] pub struct MI27_W < 'a > { w : & 'a mut W , } impl < 'a > MI27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI28_A > for bool { # [ inline ( always ) ] fn from ( variant : MI28_A ) -> Self { match variant { MI28_A :: _0 => false , MI28_A :: _1 => true } } } # [ doc = "Reader of field `MI28`" ] pub type MI28_R = crate :: R < bool , MI28_A > ; impl MI28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI28_A { match self . bits { false => MI28_A :: _0 , true => MI28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI28_A :: _1 } } # [ doc = "Write proxy for field `MI28`" ] pub struct MI28_W < 'a > { w : & 'a mut W , } impl < 'a > MI28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI29_A > for bool { # [ inline ( always ) ] fn from ( variant : MI29_A ) -> Self { match variant { MI29_A :: _0 => false , MI29_A :: _1 => true } } } # [ doc = "Reader of field `MI29`" ] pub type MI29_R = crate :: R < bool , MI29_A > ; impl MI29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI29_A { match self . bits { false => MI29_A :: _0 , true => MI29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI29_A :: _1 } } # [ doc = "Write proxy for field `MI29`" ] pub struct MI29_W < 'a > { w : & 'a mut W , } impl < 'a > MI29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI30_A > for bool { # [ inline ( always ) ] fn from ( variant : MI30_A ) -> Self { match variant { MI30_A :: _0 => false , MI30_A :: _1 => true } } } # [ doc = "Reader of field `MI30`" ] pub type MI30_R = crate :: R < bool , MI30_A > ; impl MI30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI30_A { match self . bits { false => MI30_A :: _0 , true => MI30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI30_A :: _1 } } # [ doc = "Write proxy for field `MI30`" ] pub struct MI30_W < 'a > { w : & 'a mut W , } impl < 'a > MI30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI31_A > for bool { # [ inline ( always ) ] fn from ( variant : MI31_A ) -> Self { match variant { MI31_A :: _0 => false , MI31_A :: _1 => true } } } # [ doc = "Reader of field `MI31`" ] pub type MI31_R = crate :: R < bool , MI31_A > ; impl MI31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI31_A { match self . bits { false => MI31_A :: _0 , true => MI31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI31_A :: _1 } } # [ doc = "Write proxy for field `MI31`" ] pub struct MI31_W < 'a > { w : & 'a mut W , } impl < 'a > MI31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi0 ( & self ) -> MI0_R { MI0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi1 ( & self ) -> MI1_R { MI1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi2 ( & self ) -> MI2_R { MI2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi3 ( & self ) -> MI3_R { MI3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi4 ( & self ) -> MI4_R { MI4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi5 ( & self ) -> MI5_R { MI5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi6 ( & self ) -> MI6_R { MI6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi7 ( & self ) -> MI7_R { MI7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi8 ( & self ) -> MI8_R { MI8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi9 ( & self ) -> MI9_R { MI9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi10 ( & self ) -> MI10_R { MI10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi11 ( & self ) -> MI11_R { MI11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi12 ( & self ) -> MI12_R { MI12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi13 ( & self ) -> MI13_R { MI13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi14 ( & self ) -> MI14_R { MI14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi15 ( & self ) -> MI15_R { MI15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi16 ( & self ) -> MI16_R { MI16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi17 ( & self ) -> MI17_R { MI17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi18 ( & self ) -> MI18_R { MI18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi19 ( & self ) -> MI19_R { MI19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi20 ( & self ) -> MI20_R { MI20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi21 ( & self ) -> MI21_R { MI21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi22 ( & self ) -> MI22_R { MI22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi23 ( & self ) -> MI23_R { MI23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi24 ( & self ) -> MI24_R { MI24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi25 ( & self ) -> MI25_R { MI25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi26 ( & self ) -> MI26_R { MI26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi27 ( & self ) -> MI27_R { MI27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi28 ( & self ) -> MI28_R { MI28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi29 ( & self ) -> MI29_R { MI29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi30 ( & self ) -> MI30_R { MI30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi31 ( & self ) -> MI31_R { MI31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi0 ( & mut self ) -> MI0_W { MI0_W { w : self } } # [ doc = "Bit 1 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi1 ( & mut self ) -> MI1_W { MI1_W { w : self } } # [ doc = "Bit 2 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi2 ( & mut self ) -> MI2_W { MI2_W { w : self } } # [ doc = "Bit 3 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi3 ( & mut self ) -> MI3_W { MI3_W { w : self } } # [ doc = "Bit 4 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi4 ( & mut self ) -> MI4_W { MI4_W { w : self } } # [ doc = "Bit 5 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi5 ( & mut self ) -> MI5_W { MI5_W { w : self } } # [ doc = "Bit 6 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi6 ( & mut self ) -> MI6_W { MI6_W { w : self } } # [ doc = "Bit 7 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi7 ( & mut self ) -> MI7_W { MI7_W { w : self } } # [ doc = "Bit 8 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi8 ( & mut self ) -> MI8_W { MI8_W { w : self } } # [ doc = "Bit 9 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi9 ( & mut self ) -> MI9_W { MI9_W { w : self } } # [ doc = "Bit 10 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi10 ( & mut self ) -> MI10_W { MI10_W { w : self } } # [ doc = "Bit 11 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi11 ( & mut self ) -> MI11_W { MI11_W { w : self } } # [ doc = "Bit 12 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi12 ( & mut self ) -> MI12_W { MI12_W { w : self } } # [ doc = "Bit 13 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi13 ( & mut self ) -> MI13_W { MI13_W { w : self } } # [ doc = "Bit 14 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi14 ( & mut self ) -> MI14_W { MI14_W { w : self } } # [ doc = "Bit 15 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi15 ( & mut self ) -> MI15_W { MI15_W { w : self } } # [ doc = "Bit 16 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi16 ( & mut self ) -> MI16_W { MI16_W { w : self } } # [ doc = "Bit 17 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi17 ( & mut self ) -> MI17_W { MI17_W { w : self } } # [ doc = "Bit 18 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi18 ( & mut self ) -> MI18_W { MI18_W { w : self } } # [ doc = "Bit 19 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi19 ( & mut self ) -> MI19_W { MI19_W { w : self } } # [ doc = "Bit 20 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi20 ( & mut self ) -> MI20_W { MI20_W { w : self } } # [ doc = "Bit 21 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi21 ( & mut self ) -> MI21_W { MI21_W { w : self } } # [ doc = "Bit 22 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi22 ( & mut self ) -> MI22_W { MI22_W { w : self } } # [ doc = "Bit 23 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi23 ( & mut self ) -> MI23_W { MI23_W { w : self } } # [ doc = "Bit 24 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi24 ( & mut self ) -> MI24_W { MI24_W { w : self } } # [ doc = "Bit 25 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi25 ( & mut self ) -> MI25_W { MI25_W { w : self } } # [ doc = "Bit 26 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi26 ( & mut self ) -> MI26_W { MI26_W { w : self } } # [ doc = "Bit 27 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi27 ( & mut self ) -> MI27_W { MI27_W { w : self } } # [ doc = "Bit 28 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi28 ( & mut self ) -> MI28_W { MI28_W { w : self } } # [ doc = "Bit 29 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi29 ( & mut self ) -> MI29_W { MI29_W { w : self } } # [ doc = "Bit 30 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi30 ( & mut self ) -> MI30_W { MI30_W { w : self } } # [ doc = "Bit 31 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi31 ( & mut self ) -> MI31_W { MI31_W { w : self } } } } } # [ doc = "Flex Controller Area Network module" ] pub struct CAN1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for CAN1 { } impl CAN1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const can1 :: RegisterBlock { 0x400a_4000 as * const _ } } impl Deref for CAN1 { type Target = can1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CAN1 :: ptr ( ) } } } # [ doc = "Flex Controller Area Network module" ] pub mod can1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Module Configuration Register" ] pub mcr : MCR , # [ doc = "0x04 - Control 1 register" ] pub ctrl1 : CTRL1 , # [ doc = "0x08 - Free Running Timer" ] pub timer : TIMER , _reserved3 : [ u8 ; 4usize ] , # [ doc = "0x10 - Rx Mailboxes Global Mask Register" ] pub rxmgmask : RXMGMASK , # [ doc = "0x14 - Rx 14 Mask register" ] pub rx14mask : RX14MASK , # [ doc = "0x18 - Rx 15 Mask register" ] pub rx15mask : RX15MASK , # [ doc = "0x1c - Error Counter" ] pub ecr : ECR , # [ doc = "0x20 - Error and Status 1 register" ] pub esr1 : ESR1 , _reserved8 : [ u8 ; 4usize ] , # [ doc = "0x28 - Interrupt Masks 1 register" ] pub imask1 : IMASK1 , _reserved9 : [ u8 ; 4usize ] , # [ doc = "0x30 - Interrupt Flags 1 register" ] pub iflag1 : IFLAG1 , # [ doc = "0x34 - Control 2 register" ] pub ctrl2 : CTRL2 , # [ doc = "0x38 - Error and Status 2 register" ] pub esr2 : ESR2 , _reserved12 : [ u8 ; 8usize ] , # [ doc = "0x44 - CRC Register" ] pub crcr : CRCR , # [ doc = "0x48 - Rx FIFO Global Mask register" ] pub rxfgmask : RXFGMASK , # [ doc = "0x4c - Rx FIFO Information Register" ] pub rxfir : RXFIR , _reserved15 : [ u8 ; 48usize ] , # [ doc = "0x80 - Message Buffer 0 CS Register" ] pub cs0 : CS0 , # [ doc = "0x84 - Message Buffer 0 ID Register" ] pub id0 : ID0 , # [ doc = "0x88 - Message Buffer 0 WORD0 Register" ] pub word00 : WORD00 , # [ doc = "0x8c - Message Buffer 0 WORD1 Register" ] pub word10 : WORD10 , # [ doc = "0x90 - Message Buffer 1 CS Register" ] pub cs1 : CS1 , # [ doc = "0x94 - Message Buffer 1 ID Register" ] pub id1 : ID1 , # [ doc = "0x98 - Message Buffer 1 WORD0 Register" ] pub word01 : WORD01 , # [ doc = "0x9c - Message Buffer 1 WORD1 Register" ] pub word11 : WORD11 , # [ doc = "0xa0 - Message Buffer 2 CS Register" ] pub cs2 : CS2 , # [ doc = "0xa4 - Message Buffer 2 ID Register" ] pub id2 : ID2 , # [ doc = "0xa8 - Message Buffer 2 WORD0 Register" ] pub word02 : WORD02 , # [ doc = "0xac - Message Buffer 2 WORD1 Register" ] pub word12 : WORD12 , # [ doc = "0xb0 - Message Buffer 3 CS Register" ] pub cs3 : CS3 , # [ doc = "0xb4 - Message Buffer 3 ID Register" ] pub id3 : ID3 , # [ doc = "0xb8 - Message Buffer 3 WORD0 Register" ] pub word03 : WORD03 , # [ doc = "0xbc - Message Buffer 3 WORD1 Register" ] pub word13 : WORD13 , # [ doc = "0xc0 - Message Buffer 4 CS Register" ] pub cs4 : CS4 , # [ doc = "0xc4 - Message Buffer 4 ID Register" ] pub id4 : ID4 , # [ doc = "0xc8 - Message Buffer 4 WORD0 Register" ] pub word04 : WORD04 , # [ doc = "0xcc - Message Buffer 4 WORD1 Register" ] pub word14 : WORD14 , # [ doc = "0xd0 - Message Buffer 5 CS Register" ] pub cs5 : CS5 , # [ doc = "0xd4 - Message Buffer 5 ID Register" ] pub id5 : ID5 , # [ doc = "0xd8 - Message Buffer 5 WORD0 Register" ] pub word05 : WORD05 , # [ doc = "0xdc - Message Buffer 5 WORD1 Register" ] pub word15 : WORD15 , # [ doc = "0xe0 - Message Buffer 6 CS Register" ] pub cs6 : CS6 , # [ doc = "0xe4 - Message Buffer 6 ID Register" ] pub id6 : ID6 , # [ doc = "0xe8 - Message Buffer 6 WORD0 Register" ] pub word06 : WORD06 , # [ doc = "0xec - Message Buffer 6 WORD1 Register" ] pub word16 : WORD16 , # [ doc = "0xf0 - Message Buffer 7 CS Register" ] pub cs7 : CS7 , # [ doc = "0xf4 - Message Buffer 7 ID Register" ] pub id7 : ID7 , # [ doc = "0xf8 - Message Buffer 7 WORD0 Register" ] pub word07 : WORD07 , # [ doc = "0xfc - Message Buffer 7 WORD1 Register" ] pub word17 : WORD17 , # [ doc = "0x100 - Message Buffer 8 CS Register" ] pub cs8 : CS8 , # [ doc = "0x104 - Message Buffer 8 ID Register" ] pub id8 : ID8 , # [ doc = "0x108 - Message Buffer 8 WORD0 Register" ] pub word08 : WORD08 , # [ doc = "0x10c - Message Buffer 8 WORD1 Register" ] pub word18 : WORD18 , # [ doc = "0x110 - Message Buffer 9 CS Register" ] pub cs9 : CS9 , # [ doc = "0x114 - Message Buffer 9 ID Register" ] pub id9 : ID9 , # [ doc = "0x118 - Message Buffer 9 WORD0 Register" ] pub word09 : WORD09 , # [ doc = "0x11c - Message Buffer 9 WORD1 Register" ] pub word19 : WORD19 , # [ doc = "0x120 - Message Buffer 10 CS Register" ] pub cs10 : CS10 , # [ doc = "0x124 - Message Buffer 10 ID Register" ] pub id10 : ID10 , # [ doc = "0x128 - Message Buffer 10 WORD0 Register" ] pub word010 : WORD010 , # [ doc = "0x12c - Message Buffer 10 WORD1 Register" ] pub word110 : WORD110 , # [ doc = "0x130 - Message Buffer 11 CS Register" ] pub cs11 : CS11 , # [ doc = "0x134 - Message Buffer 11 ID Register" ] pub id11 : ID11 , # [ doc = "0x138 - Message Buffer 11 WORD0 Register" ] pub word011 : WORD011 , # [ doc = "0x13c - Message Buffer 11 WORD1 Register" ] pub word111 : WORD111 , # [ doc = "0x140 - Message Buffer 12 CS Register" ] pub cs12 : CS12 , # [ doc = "0x144 - Message Buffer 12 ID Register" ] pub id12 : ID12 , # [ doc = "0x148 - Message Buffer 12 WORD0 Register" ] pub word012 : WORD012 , # [ doc = "0x14c - Message Buffer 12 WORD1 Register" ] pub word112 : WORD112 , # [ doc = "0x150 - Message Buffer 13 CS Register" ] pub cs13 : CS13 , # [ doc = "0x154 - Message Buffer 13 ID Register" ] pub id13 : ID13 , # [ doc = "0x158 - Message Buffer 13 WORD0 Register" ] pub word013 : WORD013 , # [ doc = "0x15c - Message Buffer 13 WORD1 Register" ] pub word113 : WORD113 , # [ doc = "0x160 - Message Buffer 14 CS Register" ] pub cs14 : CS14 , # [ doc = "0x164 - Message Buffer 14 ID Register" ] pub id14 : ID14 , # [ doc = "0x168 - Message Buffer 14 WORD0 Register" ] pub word014 : WORD014 , # [ doc = "0x16c - Message Buffer 14 WORD1 Register" ] pub word114 : WORD114 , # [ doc = "0x170 - Message Buffer 15 CS Register" ] pub cs15 : CS15 , # [ doc = "0x174 - Message Buffer 15 ID Register" ] pub id15 : ID15 , # [ doc = "0x178 - Message Buffer 15 WORD0 Register" ] pub word015 : WORD015 , # [ doc = "0x17c - Message Buffer 15 WORD1 Register" ] pub word115 : WORD115 , _reserved79 : [ u8 ; 1792usize ] , # [ doc = "0x880 - Rx Individual Mask Registers" ] pub rximr : [ RXIMR ; 16 ] , } # [ doc = "Module Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mcr](mcr) module" ] pub type MCR = crate :: Reg < u32 , _MCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCR ; # [ doc = "`read()` method returns [mcr::R](mcr::R) reader structure" ] impl crate :: Readable for MCR { } # [ doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure" ] impl crate :: Writable for MCR { } # [ doc = "Module Configuration Register" ] pub mod mcr { # [ doc = "Reader of register MCR" ] pub type R = crate :: R < u32 , super :: MCR > ; # [ doc = "Writer for register MCR" ] pub type W = crate :: W < u32 , super :: MCR > ; # [ doc = "Register MCR `reset()`'s with value 0xd890_000f" ] impl crate :: ResetValue for super :: MCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xd890_000f } } # [ doc = "Reader of field `MAXMB`" ] pub type MAXMB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MAXMB`" ] pub struct MAXMB_W < 'a > { w : & 'a mut W , } impl < 'a > MAXMB_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 & ! 0x7f ) | ( ( value as u32 ) & 0x7f ) ; self . w } } # [ doc = "ID Acceptance Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDAM_A { # [ doc = "0: Format A: One full ID (standard and extended) per ID Filter Table element." ] _00 , # [ doc = "1: Format B: Two full standard IDs or two partial 14-bit (standard and extended) IDs per ID Filter Table element." ] _01 , # [ doc = "2: Format C: Four partial 8-bit Standard IDs per ID Filter Table element." ] _10 , # [ doc = "3: Format D: All frames rejected." ] _11 } impl From < IDAM_A > for u8 { # [ inline ( always ) ] fn from ( variant : IDAM_A ) -> Self { match variant { IDAM_A :: _00 => 0 , IDAM_A :: _01 => 1 , IDAM_A :: _10 => 2 , IDAM_A :: _11 => 3 } } } # [ doc = "Reader of field `IDAM`" ] pub type IDAM_R = crate :: R < u8 , IDAM_A > ; impl IDAM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDAM_A { match self . bits { 0 => IDAM_A :: _00 , 1 => IDAM_A :: _01 , 2 => IDAM_A :: _10 , 3 => IDAM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == IDAM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == IDAM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == IDAM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == IDAM_A :: _11 } } # [ doc = "Write proxy for field `IDAM`" ] pub struct IDAM_W < 'a > { w : & 'a mut W , } impl < 'a > IDAM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IDAM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Format A: One full ID (standard and extended) per ID Filter Table element." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( IDAM_A :: _00 ) } # [ doc = "Format B: Two full standard IDs or two partial 14-bit (standard and extended) IDs per ID Filter Table element." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( IDAM_A :: _01 ) } # [ doc = "Format C: Four partial 8-bit Standard IDs per ID Filter Table element." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( IDAM_A :: _10 ) } # [ doc = "Format D: All frames rejected." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( IDAM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "Abort Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AEN_A { # [ doc = "0: Abort disabled." ] _0 , # [ doc = "1: Abort enabled." ] _1 } impl From < AEN_A > for bool { # [ inline ( always ) ] fn from ( variant : AEN_A ) -> Self { match variant { AEN_A :: _0 => false , AEN_A :: _1 => true } } } # [ doc = "Reader of field `AEN`" ] pub type AEN_R = crate :: R < bool , AEN_A > ; impl AEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AEN_A { match self . bits { false => AEN_A :: _0 , true => AEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AEN_A :: _1 } } # [ doc = "Write proxy for field `AEN`" ] pub struct AEN_W < 'a > { w : & 'a mut W , } impl < 'a > AEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Abort disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AEN_A :: _0 ) } # [ doc = "Abort enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AEN_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Local Priority Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPRIOEN_A { # [ doc = "0: Local Priority disabled." ] _0 , # [ doc = "1: Local Priority enabled." ] _1 } impl From < LPRIOEN_A > for bool { # [ inline ( always ) ] fn from ( variant : LPRIOEN_A ) -> Self { match variant { LPRIOEN_A :: _0 => false , LPRIOEN_A :: _1 => true } } } # [ doc = "Reader of field `LPRIOEN`" ] pub type LPRIOEN_R = crate :: R < bool , LPRIOEN_A > ; impl LPRIOEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPRIOEN_A { match self . bits { false => LPRIOEN_A :: _0 , true => LPRIOEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPRIOEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPRIOEN_A :: _1 } } # [ doc = "Write proxy for field `LPRIOEN`" ] pub struct LPRIOEN_W < 'a > { w : & 'a mut W , } impl < 'a > LPRIOEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPRIOEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Local Priority disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LPRIOEN_A :: _0 ) } # [ doc = "Local Priority enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LPRIOEN_A :: _1 ) } # [ 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 = "Individual Rx Masking And Queue Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRMQ_A { # [ doc = "0: Individual Rx masking and queue feature are disabled. For backward compatibility with legacy applications, the reading of C/S word locks the MB even if it is EMPTY." ] _0 , # [ doc = "1: Individual Rx masking and queue feature are enabled." ] _1 } impl From < IRMQ_A > for bool { # [ inline ( always ) ] fn from ( variant : IRMQ_A ) -> Self { match variant { IRMQ_A :: _0 => false , IRMQ_A :: _1 => true } } } # [ doc = "Reader of field `IRMQ`" ] pub type IRMQ_R = crate :: R < bool , IRMQ_A > ; impl IRMQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IRMQ_A { match self . bits { false => IRMQ_A :: _0 , true => IRMQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IRMQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IRMQ_A :: _1 } } # [ doc = "Write proxy for field `IRMQ`" ] pub struct IRMQ_W < 'a > { w : & 'a mut W , } impl < 'a > IRMQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRMQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Individual Rx masking and queue feature are disabled. For backward compatibility with legacy applications, the reading of C/S word locks the MB even if it is EMPTY." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IRMQ_A :: _0 ) } # [ doc = "Individual Rx masking and queue feature are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IRMQ_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Self Reception Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRXDIS_A { # [ doc = "0: Self reception enabled." ] _0 , # [ doc = "1: Self reception disabled." ] _1 } impl From < SRXDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : SRXDIS_A ) -> Self { match variant { SRXDIS_A :: _0 => false , SRXDIS_A :: _1 => true } } } # [ doc = "Reader of field `SRXDIS`" ] pub type SRXDIS_R = crate :: R < bool , SRXDIS_A > ; impl SRXDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRXDIS_A { match self . bits { false => SRXDIS_A :: _0 , true => SRXDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRXDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRXDIS_A :: _1 } } # [ doc = "Write proxy for field `SRXDIS`" ] pub struct SRXDIS_W < 'a > { w : & 'a mut W , } impl < 'a > SRXDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRXDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Self reception enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRXDIS_A :: _0 ) } # [ doc = "Self reception disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRXDIS_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Wake Up Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKSRC_A { # [ doc = "0: FlexCAN uses the unfiltered Rx input to detect recessive to dominant edges on the CAN bus." ] _0 , # [ doc = "1: FlexCAN uses the filtered Rx input to detect recessive to dominant edges on the CAN bus." ] _1 } impl From < WAKSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKSRC_A ) -> Self { match variant { WAKSRC_A :: _0 => false , WAKSRC_A :: _1 => true } } } # [ doc = "Reader of field `WAKSRC`" ] pub type WAKSRC_R = crate :: R < bool , WAKSRC_A > ; impl WAKSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKSRC_A { match self . bits { false => WAKSRC_A :: _0 , true => WAKSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKSRC_A :: _1 } } # [ doc = "Write proxy for field `WAKSRC`" ] pub struct WAKSRC_W < 'a > { w : & 'a mut W , } impl < 'a > WAKSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FlexCAN uses the unfiltered Rx input to detect recessive to dominant edges on the CAN bus." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKSRC_A :: _0 ) } # [ doc = "FlexCAN uses the filtered Rx input to detect recessive to dominant edges on the CAN bus." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKSRC_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Low-Power Mode Acknowledge\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPMACK_A { # [ doc = "0: FlexCAN is not in a low-power mode." ] _0 , # [ doc = "1: FlexCAN is in a low-power mode." ] _1 } impl From < LPMACK_A > for bool { # [ inline ( always ) ] fn from ( variant : LPMACK_A ) -> Self { match variant { LPMACK_A :: _0 => false , LPMACK_A :: _1 => true } } } # [ doc = "Reader of field `LPMACK`" ] pub type LPMACK_R = crate :: R < bool , LPMACK_A > ; impl LPMACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPMACK_A { match self . bits { false => LPMACK_A :: _0 , true => LPMACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPMACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPMACK_A :: _1 } } # [ doc = "Warning Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRNEN_A { # [ doc = "0: TWRNINT and RWRNINT bits are zero, independent of the values in the error counters." ] _0 , # [ doc = "1: TWRNINT and RWRNINT bits are set when the respective error counter transitions from less than 96 to greater than or equal to 96." ] _1 } impl From < WRNEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WRNEN_A ) -> Self { match variant { WRNEN_A :: _0 => false , WRNEN_A :: _1 => true } } } # [ doc = "Reader of field `WRNEN`" ] pub type WRNEN_R = crate :: R < bool , WRNEN_A > ; impl WRNEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WRNEN_A { match self . bits { false => WRNEN_A :: _0 , true => WRNEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WRNEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WRNEN_A :: _1 } } # [ doc = "Write proxy for field `WRNEN`" ] pub struct WRNEN_W < 'a > { w : & 'a mut W , } impl < 'a > WRNEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WRNEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TWRNINT and RWRNINT bits are zero, independent of the values in the error counters." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WRNEN_A :: _0 ) } # [ doc = "TWRNINT and RWRNINT bits are set when the respective error counter transitions from less than 96 to greater than or equal to 96." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WRNEN_A :: _1 ) } # [ 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 = "Self Wake Up\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLFWAK_A { # [ doc = "0: FlexCAN Self Wake Up feature is disabled." ] _0 , # [ doc = "1: FlexCAN Self Wake Up feature is enabled." ] _1 } impl From < SLFWAK_A > for bool { # [ inline ( always ) ] fn from ( variant : SLFWAK_A ) -> Self { match variant { SLFWAK_A :: _0 => false , SLFWAK_A :: _1 => true } } } # [ doc = "Reader of field `SLFWAK`" ] pub type SLFWAK_R = crate :: R < bool , SLFWAK_A > ; impl SLFWAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLFWAK_A { match self . bits { false => SLFWAK_A :: _0 , true => SLFWAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLFWAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLFWAK_A :: _1 } } # [ doc = "Write proxy for field `SLFWAK`" ] pub struct SLFWAK_W < 'a > { w : & 'a mut W , } impl < 'a > SLFWAK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLFWAK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FlexCAN Self Wake Up feature is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLFWAK_A :: _0 ) } # [ doc = "FlexCAN Self Wake Up feature is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLFWAK_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Supervisor Mode\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUPV_A { # [ doc = "0: FlexCAN is in User mode. Affected registers allow both Supervisor and Unrestricted accesses ." ] _0 , # [ doc = "1: FlexCAN is in Supervisor mode. Affected registers allow only Supervisor access. Unrestricted access behaves as though the access was done to an unimplemented register location ." ] _1 } impl From < SUPV_A > for bool { # [ inline ( always ) ] fn from ( variant : SUPV_A ) -> Self { match variant { SUPV_A :: _0 => false , SUPV_A :: _1 => true } } } # [ doc = "Reader of field `SUPV`" ] pub type SUPV_R = crate :: R < bool , SUPV_A > ; impl SUPV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SUPV_A { match self . bits { false => SUPV_A :: _0 , true => SUPV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SUPV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SUPV_A :: _1 } } # [ doc = "Write proxy for field `SUPV`" ] pub struct SUPV_W < 'a > { w : & 'a mut W , } impl < 'a > SUPV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SUPV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FlexCAN is in User mode. Affected registers allow both Supervisor and Unrestricted accesses ." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SUPV_A :: _0 ) } # [ doc = "FlexCAN is in Supervisor mode. Affected registers allow only Supervisor access. Unrestricted access behaves as though the access was done to an unimplemented register location ." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SUPV_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Freeze Mode Acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRZACK_A { # [ doc = "0: FlexCAN not in Freeze mode, prescaler running." ] _0 , # [ doc = "1: FlexCAN in Freeze mode, prescaler stopped." ] _1 } impl From < FRZACK_A > for bool { # [ inline ( always ) ] fn from ( variant : FRZACK_A ) -> Self { match variant { FRZACK_A :: _0 => false , FRZACK_A :: _1 => true } } } # [ doc = "Reader of field `FRZACK`" ] pub type FRZACK_R = crate :: R < bool , FRZACK_A > ; impl FRZACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRZACK_A { match self . bits { false => FRZACK_A :: _0 , true => FRZACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRZACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRZACK_A :: _1 } } # [ doc = "Soft Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SOFTRST_A { # [ doc = "0: No reset request." ] _0 , # [ doc = "1: Resets the registers affected by soft reset." ] _1 } impl From < SOFTRST_A > for bool { # [ inline ( always ) ] fn from ( variant : SOFTRST_A ) -> Self { match variant { SOFTRST_A :: _0 => false , SOFTRST_A :: _1 => true } } } # [ doc = "Reader of field `SOFTRST`" ] pub type SOFTRST_R = crate :: R < bool , SOFTRST_A > ; impl SOFTRST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SOFTRST_A { match self . bits { false => SOFTRST_A :: _0 , true => SOFTRST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SOFTRST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SOFTRST_A :: _1 } } # [ doc = "Write proxy for field `SOFTRST`" ] pub struct SOFTRST_W < 'a > { w : & 'a mut W , } impl < 'a > SOFTRST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SOFTRST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No reset request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SOFTRST_A :: _0 ) } # [ doc = "Resets the registers affected by soft reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SOFTRST_A :: _1 ) } # [ 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 = "Wake Up Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKMSK_A { # [ doc = "0: Wake Up Interrupt is disabled." ] _0 , # [ doc = "1: Wake Up Interrupt is enabled." ] _1 } impl From < WAKMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKMSK_A ) -> Self { match variant { WAKMSK_A :: _0 => false , WAKMSK_A :: _1 => true } } } # [ doc = "Reader of field `WAKMSK`" ] pub type WAKMSK_R = crate :: R < bool , WAKMSK_A > ; impl WAKMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKMSK_A { match self . bits { false => WAKMSK_A :: _0 , true => WAKMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKMSK_A :: _1 } } # [ doc = "Write proxy for field `WAKMSK`" ] pub struct WAKMSK_W < 'a > { w : & 'a mut W , } impl < 'a > WAKMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Wake Up Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKMSK_A :: _0 ) } # [ doc = "Wake Up Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKMSK_A :: _1 ) } # [ 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 = "FlexCAN Not Ready\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOTRDY_A { # [ doc = "0: FlexCAN module is either in Normal mode, Listen-Only mode or Loop-Back mode." ] _0 , # [ doc = "1: FlexCAN module is either in Disable mode , Stop mode or Freeze mode." ] _1 } impl From < NOTRDY_A > for bool { # [ inline ( always ) ] fn from ( variant : NOTRDY_A ) -> Self { match variant { NOTRDY_A :: _0 => false , NOTRDY_A :: _1 => true } } } # [ doc = "Reader of field `NOTRDY`" ] pub type NOTRDY_R = crate :: R < bool , NOTRDY_A > ; impl NOTRDY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOTRDY_A { match self . bits { false => NOTRDY_A :: _0 , true => NOTRDY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOTRDY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOTRDY_A :: _1 } } # [ doc = "Halt FlexCAN\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HALT_A { # [ doc = "0: No Freeze mode request." ] _0 , # [ doc = "1: Enters Freeze mode if the FRZ bit is asserted." ] _1 } impl From < HALT_A > for bool { # [ inline ( always ) ] fn from ( variant : HALT_A ) -> Self { match variant { HALT_A :: _0 => false , HALT_A :: _1 => true } } } # [ doc = "Reader of field `HALT`" ] pub type HALT_R = crate :: R < bool , HALT_A > ; impl HALT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HALT_A { match self . bits { false => HALT_A :: _0 , true => HALT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HALT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HALT_A :: _1 } } # [ doc = "Write proxy for field `HALT`" ] pub struct HALT_W < 'a > { w : & 'a mut W , } impl < 'a > HALT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HALT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No Freeze mode request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _0 ) } # [ doc = "Enters Freeze mode if the FRZ bit is asserted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFEN_A { # [ doc = "0: Rx FIFO not enabled." ] _0 , # [ doc = "1: Rx FIFO enabled." ] _1 } impl From < RFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : RFEN_A ) -> Self { match variant { RFEN_A :: _0 => false , RFEN_A :: _1 => true } } } # [ doc = "Reader of field `RFEN`" ] pub type RFEN_R = crate :: R < bool , RFEN_A > ; impl RFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFEN_A { match self . bits { false => RFEN_A :: _0 , true => RFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFEN_A :: _1 } } # [ doc = "Write proxy for field `RFEN`" ] pub struct RFEN_W < 'a > { w : & 'a mut W , } impl < 'a > RFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rx FIFO not enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFEN_A :: _0 ) } # [ doc = "Rx FIFO enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFEN_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Freeze Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRZ_A { # [ doc = "0: Not enabled to enter Freeze mode." ] _0 , # [ doc = "1: Enabled to enter Freeze mode." ] _1 } impl From < FRZ_A > for bool { # [ inline ( always ) ] fn from ( variant : FRZ_A ) -> Self { match variant { FRZ_A :: _0 => false , FRZ_A :: _1 => true } } } # [ doc = "Reader of field `FRZ`" ] pub type FRZ_R = crate :: R < bool , FRZ_A > ; impl FRZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRZ_A { match self . bits { false => FRZ_A :: _0 , true => FRZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRZ_A :: _1 } } # [ doc = "Write proxy for field `FRZ`" ] pub struct FRZ_W < 'a > { w : & 'a mut W , } impl < 'a > FRZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not enabled to enter Freeze mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _0 ) } # [ doc = "Enabled to enter Freeze mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Module Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MDIS_A { # [ doc = "0: Enable the FlexCAN module." ] _0 , # [ doc = "1: Disable the FlexCAN module." ] _1 } impl From < MDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : MDIS_A ) -> Self { match variant { MDIS_A :: _0 => false , MDIS_A :: _1 => true } } } # [ doc = "Reader of field `MDIS`" ] pub type MDIS_R = crate :: R < bool , MDIS_A > ; impl MDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MDIS_A { match self . bits { false => MDIS_A :: _0 , true => MDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MDIS_A :: _1 } } # [ doc = "Write proxy for field `MDIS`" ] pub struct MDIS_W < 'a > { w : & 'a mut W , } impl < 'a > MDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Enable the FlexCAN module." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _0 ) } # [ doc = "Disable the FlexCAN module." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:6 - Number Of The Last Message Buffer" ] # [ inline ( always ) ] pub fn maxmb ( & self ) -> MAXMB_R { MAXMB_R :: new ( ( self . bits & 0x7f ) as u8 ) } # [ doc = "Bits 8:9 - ID Acceptance Mode" ] # [ inline ( always ) ] pub fn idam ( & self ) -> IDAM_R { IDAM_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 12 - Abort Enable" ] # [ inline ( always ) ] pub fn aen ( & self ) -> AEN_R { AEN_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Local Priority Enable" ] # [ inline ( always ) ] pub fn lprioen ( & self ) -> LPRIOEN_R { LPRIOEN_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Individual Rx Masking And Queue Enable" ] # [ inline ( always ) ] pub fn irmq ( & self ) -> IRMQ_R { IRMQ_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Self Reception Disable" ] # [ inline ( always ) ] pub fn srxdis ( & self ) -> SRXDIS_R { SRXDIS_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Wake Up Source" ] # [ inline ( always ) ] pub fn waksrc ( & self ) -> WAKSRC_R { WAKSRC_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Low-Power Mode Acknowledge" ] # [ inline ( always ) ] pub fn lpmack ( & self ) -> LPMACK_R { LPMACK_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn wrnen ( & self ) -> WRNEN_R { WRNEN_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Self Wake Up" ] # [ inline ( always ) ] pub fn slfwak ( & self ) -> SLFWAK_R { SLFWAK_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Supervisor Mode" ] # [ inline ( always ) ] pub fn supv ( & self ) -> SUPV_R { SUPV_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Freeze Mode Acknowledge" ] # [ inline ( always ) ] pub fn frzack ( & self ) -> FRZACK_R { FRZACK_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Soft Reset" ] # [ inline ( always ) ] pub fn softrst ( & self ) -> SOFTRST_R { SOFTRST_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Wake Up Interrupt Mask" ] # [ inline ( always ) ] pub fn wakmsk ( & self ) -> WAKMSK_R { WAKMSK_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - FlexCAN Not Ready" ] # [ inline ( always ) ] pub fn notrdy ( & self ) -> NOTRDY_R { NOTRDY_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Halt FlexCAN" ] # [ inline ( always ) ] pub fn halt ( & self ) -> HALT_R { HALT_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx FIFO Enable" ] # [ inline ( always ) ] pub fn rfen ( & self ) -> RFEN_R { RFEN_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Freeze Enable" ] # [ inline ( always ) ] pub fn frz ( & self ) -> FRZ_R { FRZ_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & self ) -> MDIS_R { MDIS_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:6 - Number Of The Last Message Buffer" ] # [ inline ( always ) ] pub fn maxmb ( & mut self ) -> MAXMB_W { MAXMB_W { w : self } } # [ doc = "Bits 8:9 - ID Acceptance Mode" ] # [ inline ( always ) ] pub fn idam ( & mut self ) -> IDAM_W { IDAM_W { w : self } } # [ doc = "Bit 12 - Abort Enable" ] # [ inline ( always ) ] pub fn aen ( & mut self ) -> AEN_W { AEN_W { w : self } } # [ doc = "Bit 13 - Local Priority Enable" ] # [ inline ( always ) ] pub fn lprioen ( & mut self ) -> LPRIOEN_W { LPRIOEN_W { w : self } } # [ doc = "Bit 16 - Individual Rx Masking And Queue Enable" ] # [ inline ( always ) ] pub fn irmq ( & mut self ) -> IRMQ_W { IRMQ_W { w : self } } # [ doc = "Bit 17 - Self Reception Disable" ] # [ inline ( always ) ] pub fn srxdis ( & mut self ) -> SRXDIS_W { SRXDIS_W { w : self } } # [ doc = "Bit 19 - Wake Up Source" ] # [ inline ( always ) ] pub fn waksrc ( & mut self ) -> WAKSRC_W { WAKSRC_W { w : self } } # [ doc = "Bit 21 - Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn wrnen ( & mut self ) -> WRNEN_W { WRNEN_W { w : self } } # [ doc = "Bit 22 - Self Wake Up" ] # [ inline ( always ) ] pub fn slfwak ( & mut self ) -> SLFWAK_W { SLFWAK_W { w : self } } # [ doc = "Bit 23 - Supervisor Mode" ] # [ inline ( always ) ] pub fn supv ( & mut self ) -> SUPV_W { SUPV_W { w : self } } # [ doc = "Bit 25 - Soft Reset" ] # [ inline ( always ) ] pub fn softrst ( & mut self ) -> SOFTRST_W { SOFTRST_W { w : self } } # [ doc = "Bit 26 - Wake Up Interrupt Mask" ] # [ inline ( always ) ] pub fn wakmsk ( & mut self ) -> WAKMSK_W { WAKMSK_W { w : self } } # [ doc = "Bit 28 - Halt FlexCAN" ] # [ inline ( always ) ] pub fn halt ( & mut self ) -> HALT_W { HALT_W { w : self } } # [ doc = "Bit 29 - Rx FIFO Enable" ] # [ inline ( always ) ] pub fn rfen ( & mut self ) -> RFEN_W { RFEN_W { w : self } } # [ doc = "Bit 30 - Freeze Enable" ] # [ inline ( always ) ] pub fn frz ( & mut self ) -> FRZ_W { FRZ_W { w : self } } # [ doc = "Bit 31 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & mut self ) -> MDIS_W { MDIS_W { w : self } } } } # [ doc = "Control 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl1](ctrl1) module" ] pub type CTRL1 = crate :: Reg < u32 , _CTRL1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL1 ; # [ doc = "`read()` method returns [ctrl1::R](ctrl1::R) reader structure" ] impl crate :: Readable for CTRL1 { } # [ doc = "`write(|w| ..)` method takes [ctrl1::W](ctrl1::W) writer structure" ] impl crate :: Writable for CTRL1 { } # [ doc = "Control 1 register" ] pub mod ctrl1 { # [ doc = "Reader of register CTRL1" ] pub type R = crate :: R < u32 , super :: CTRL1 > ; # [ doc = "Writer for register CTRL1" ] pub type W = crate :: W < u32 , super :: CTRL1 > ; # [ doc = "Register CTRL1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CTRL1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PROPSEG`" ] pub type PROPSEG_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PROPSEG`" ] pub struct PROPSEG_W < 'a > { w : & 'a mut W , } impl < 'a > PROPSEG_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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Listen-Only Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOM_A { # [ doc = "0: Listen-Only mode is deactivated." ] _0 , # [ doc = "1: FlexCAN module operates in Listen-Only mode." ] _1 } impl From < LOM_A > for bool { # [ inline ( always ) ] fn from ( variant : LOM_A ) -> Self { match variant { LOM_A :: _0 => false , LOM_A :: _1 => true } } } # [ doc = "Reader of field `LOM`" ] pub type LOM_R = crate :: R < bool , LOM_A > ; impl LOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOM_A { match self . bits { false => LOM_A :: _0 , true => LOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOM_A :: _1 } } # [ doc = "Write proxy for field `LOM`" ] pub struct LOM_W < 'a > { w : & 'a mut W , } impl < 'a > LOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Listen-Only mode is deactivated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOM_A :: _0 ) } # [ doc = "FlexCAN module operates in Listen-Only mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Lowest Buffer Transmitted First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBUF_A { # [ doc = "0: Buffer with highest priority is transmitted first." ] _0 , # [ doc = "1: Lowest number buffer is transmitted first." ] _1 } impl From < LBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : LBUF_A ) -> Self { match variant { LBUF_A :: _0 => false , LBUF_A :: _1 => true } } } # [ doc = "Reader of field `LBUF`" ] pub type LBUF_R = crate :: R < bool , LBUF_A > ; impl LBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBUF_A { match self . bits { false => LBUF_A :: _0 , true => LBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBUF_A :: _1 } } # [ doc = "Write proxy for field `LBUF`" ] pub struct LBUF_W < 'a > { w : & 'a mut W , } impl < 'a > LBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Buffer with highest priority is transmitted first." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBUF_A :: _0 ) } # [ doc = "Lowest number buffer is transmitted first." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBUF_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Timer Sync\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSYN_A { # [ doc = "0: Timer Sync feature disabled" ] _0 , # [ doc = "1: Timer Sync feature enabled" ] _1 } impl From < TSYN_A > for bool { # [ inline ( always ) ] fn from ( variant : TSYN_A ) -> Self { match variant { TSYN_A :: _0 => false , TSYN_A :: _1 => true } } } # [ doc = "Reader of field `TSYN`" ] pub type TSYN_R = crate :: R < bool , TSYN_A > ; impl TSYN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSYN_A { match self . bits { false => TSYN_A :: _0 , true => TSYN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TSYN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TSYN_A :: _1 } } # [ doc = "Write proxy for field `TSYN`" ] pub struct TSYN_W < 'a > { w : & 'a mut W , } impl < 'a > TSYN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSYN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer Sync feature disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TSYN_A :: _0 ) } # [ doc = "Timer Sync feature enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TSYN_A :: _1 ) } # [ 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 = "Bus Off Recovery\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOFFREC_A { # [ doc = "0: Automatic recovering from Bus Off state enabled, according to CAN Spec 2.0 part B." ] _0 , # [ doc = "1: Automatic recovering from Bus Off state disabled." ] _1 } impl From < BOFFREC_A > for bool { # [ inline ( always ) ] fn from ( variant : BOFFREC_A ) -> Self { match variant { BOFFREC_A :: _0 => false , BOFFREC_A :: _1 => true } } } # [ doc = "Reader of field `BOFFREC`" ] pub type BOFFREC_R = crate :: R < bool , BOFFREC_A > ; impl BOFFREC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOFFREC_A { match self . bits { false => BOFFREC_A :: _0 , true => BOFFREC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOFFREC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOFFREC_A :: _1 } } # [ doc = "Write proxy for field `BOFFREC`" ] pub struct BOFFREC_W < 'a > { w : & 'a mut W , } impl < 'a > BOFFREC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOFFREC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Automatic recovering from Bus Off state enabled, according to CAN Spec 2.0 part B." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOFFREC_A :: _0 ) } # [ doc = "Automatic recovering from Bus Off state disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOFFREC_A :: _1 ) } # [ 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 = "CAN Bit Sampling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMP_A { # [ doc = "0: Just one sample is used to determine the bit value." ] _0 , # [ doc = "1: Three samples are used to determine the value of the received bit: the regular one (sample point) and 2 preceding samples; a majority rule is used." ] _1 } impl From < SMP_A > for bool { # [ inline ( always ) ] fn from ( variant : SMP_A ) -> Self { match variant { SMP_A :: _0 => false , SMP_A :: _1 => true } } } # [ doc = "Reader of field `SMP`" ] pub type SMP_R = crate :: R < bool , SMP_A > ; impl SMP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SMP_A { match self . bits { false => SMP_A :: _0 , true => SMP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SMP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SMP_A :: _1 } } # [ doc = "Write proxy for field `SMP`" ] pub struct SMP_W < 'a > { w : & 'a mut W , } impl < 'a > SMP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Just one sample is used to determine the bit value." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SMP_A :: _0 ) } # [ doc = "Three samples are used to determine the value of the received bit: the regular one (sample point) and 2 preceding samples; a majority rule is used." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SMP_A :: _1 ) } # [ 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 = "Rx Warning Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWRNMSK_A { # [ doc = "0: Rx Warning Interrupt disabled." ] _0 , # [ doc = "1: Rx Warning Interrupt enabled." ] _1 } impl From < RWRNMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : RWRNMSK_A ) -> Self { match variant { RWRNMSK_A :: _0 => false , RWRNMSK_A :: _1 => true } } } # [ doc = "Reader of field `RWRNMSK`" ] pub type RWRNMSK_R = crate :: R < bool , RWRNMSK_A > ; impl RWRNMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWRNMSK_A { match self . bits { false => RWRNMSK_A :: _0 , true => RWRNMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWRNMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWRNMSK_A :: _1 } } # [ doc = "Write proxy for field `RWRNMSK`" ] pub struct RWRNMSK_W < 'a > { w : & 'a mut W , } impl < 'a > RWRNMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWRNMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rx Warning Interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWRNMSK_A :: _0 ) } # [ doc = "Rx Warning Interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWRNMSK_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Tx Warning Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWRNMSK_A { # [ doc = "0: Tx Warning Interrupt disabled." ] _0 , # [ doc = "1: Tx Warning Interrupt enabled." ] _1 } impl From < TWRNMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : TWRNMSK_A ) -> Self { match variant { TWRNMSK_A :: _0 => false , TWRNMSK_A :: _1 => true } } } # [ doc = "Reader of field `TWRNMSK`" ] pub type TWRNMSK_R = crate :: R < bool , TWRNMSK_A > ; impl TWRNMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWRNMSK_A { match self . bits { false => TWRNMSK_A :: _0 , true => TWRNMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWRNMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWRNMSK_A :: _1 } } # [ doc = "Write proxy for field `TWRNMSK`" ] pub struct TWRNMSK_W < 'a > { w : & 'a mut W , } impl < 'a > TWRNMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWRNMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Tx Warning Interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWRNMSK_A :: _0 ) } # [ doc = "Tx Warning Interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWRNMSK_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Loop Back Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPB_A { # [ doc = "0: Loop Back disabled." ] _0 , # [ doc = "1: Loop Back enabled." ] _1 } impl From < LPB_A > for bool { # [ inline ( always ) ] fn from ( variant : LPB_A ) -> Self { match variant { LPB_A :: _0 => false , LPB_A :: _1 => true } } } # [ doc = "Reader of field `LPB`" ] pub type LPB_R = crate :: R < bool , LPB_A > ; impl LPB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPB_A { match self . bits { false => LPB_A :: _0 , true => LPB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPB_A :: _1 } } # [ doc = "Write proxy for field `LPB`" ] pub struct LPB_W < 'a > { w : & 'a mut W , } impl < 'a > LPB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPB_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loop Back disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LPB_A :: _0 ) } # [ doc = "Loop Back enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LPB_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "CAN Engine Clock Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKSRC_A { # [ doc = "0: The CAN engine clock source is the oscillator clock. Under this condition, the oscillator clock frequency must be lower than the bus clock." ] _0 , # [ doc = "1: The CAN engine clock source is the peripheral clock." ] _1 } impl From < CLKSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : CLKSRC_A ) -> Self { match variant { CLKSRC_A :: _0 => false , CLKSRC_A :: _1 => true } } } # [ doc = "Reader of field `CLKSRC`" ] pub type CLKSRC_R = crate :: R < bool , CLKSRC_A > ; impl CLKSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKSRC_A { match self . bits { false => CLKSRC_A :: _0 , true => CLKSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLKSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLKSRC_A :: _1 } } # [ doc = "Write proxy for field `CLKSRC`" ] pub struct CLKSRC_W < 'a > { w : & 'a mut W , } impl < 'a > CLKSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The CAN engine clock source is the oscillator clock. Under this condition, the oscillator clock frequency must be lower than the bus clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLKSRC_A :: _0 ) } # [ doc = "The CAN engine clock source is the peripheral clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLKSRC_A :: _1 ) } # [ 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 = "Error Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRMSK_A { # [ doc = "0: Error interrupt disabled." ] _0 , # [ doc = "1: Error interrupt enabled." ] _1 } impl From < ERRMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : ERRMSK_A ) -> Self { match variant { ERRMSK_A :: _0 => false , ERRMSK_A :: _1 => true } } } # [ doc = "Reader of field `ERRMSK`" ] pub type ERRMSK_R = crate :: R < bool , ERRMSK_A > ; impl ERRMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERRMSK_A { match self . bits { false => ERRMSK_A :: _0 , true => ERRMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERRMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERRMSK_A :: _1 } } # [ doc = "Write proxy for field `ERRMSK`" ] pub struct ERRMSK_W < 'a > { w : & 'a mut W , } impl < 'a > ERRMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERRMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Error interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERRMSK_A :: _0 ) } # [ doc = "Error interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERRMSK_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Bus Off Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOFFMSK_A { # [ doc = "0: Bus Off interrupt disabled." ] _0 , # [ doc = "1: Bus Off interrupt enabled." ] _1 } impl From < BOFFMSK_A > for bool { # [ inline ( always ) ] fn from ( variant : BOFFMSK_A ) -> Self { match variant { BOFFMSK_A :: _0 => false , BOFFMSK_A :: _1 => true } } } # [ doc = "Reader of field `BOFFMSK`" ] pub type BOFFMSK_R = crate :: R < bool , BOFFMSK_A > ; impl BOFFMSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOFFMSK_A { match self . bits { false => BOFFMSK_A :: _0 , true => BOFFMSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOFFMSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOFFMSK_A :: _1 } } # [ doc = "Write proxy for field `BOFFMSK`" ] pub struct BOFFMSK_W < 'a > { w : & 'a mut W , } impl < 'a > BOFFMSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOFFMSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus Off interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOFFMSK_A :: _0 ) } # [ doc = "Bus Off interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOFFMSK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `PSEG2`" ] pub type PSEG2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PSEG2`" ] pub struct PSEG2_W < 'a > { w : & 'a mut W , } impl < 'a > PSEG2_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 << 16 ) ) | ( ( ( value as u32 ) & 0x07 ) << 16 ) ; self . w } } # [ doc = "Reader of field `PSEG1`" ] pub type PSEG1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PSEG1`" ] pub struct PSEG1_W < 'a > { w : & 'a mut W , } impl < 'a > PSEG1_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 << 19 ) ) | ( ( ( value as u32 ) & 0x07 ) << 19 ) ; self . w } } # [ doc = "Reader of field `RJW`" ] pub type RJW_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RJW`" ] pub struct RJW_W < 'a > { w : & 'a mut W , } impl < 'a > RJW_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 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } # [ doc = "Reader of field `PRESDIV`" ] pub type PRESDIV_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRESDIV`" ] pub struct PRESDIV_W < 'a > { w : & 'a mut W , } impl < 'a > PRESDIV_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Propagation Segment" ] # [ inline ( always ) ] pub fn propseg ( & self ) -> PROPSEG_R { PROPSEG_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Listen-Only Mode" ] # [ inline ( always ) ] pub fn lom ( & self ) -> LOM_R { LOM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Lowest Buffer Transmitted First" ] # [ inline ( always ) ] pub fn lbuf ( & self ) -> LBUF_R { LBUF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Timer Sync" ] # [ inline ( always ) ] pub fn tsyn ( & self ) -> TSYN_R { TSYN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Bus Off Recovery" ] # [ inline ( always ) ] pub fn boffrec ( & self ) -> BOFFREC_R { BOFFREC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - CAN Bit Sampling" ] # [ inline ( always ) ] pub fn smp ( & self ) -> SMP_R { SMP_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx Warning Interrupt Mask" ] # [ inline ( always ) ] pub fn rwrnmsk ( & self ) -> RWRNMSK_R { RWRNMSK_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Tx Warning Interrupt Mask" ] # [ inline ( always ) ] pub fn twrnmsk ( & self ) -> TWRNMSK_R { TWRNMSK_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Loop Back Mode" ] # [ inline ( always ) ] pub fn lpb ( & self ) -> LPB_R { LPB_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - CAN Engine Clock Source" ] # [ inline ( always ) ] pub fn clksrc ( & self ) -> CLKSRC_R { CLKSRC_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Error Mask" ] # [ inline ( always ) ] pub fn errmsk ( & self ) -> ERRMSK_R { ERRMSK_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Bus Off Mask" ] # [ inline ( always ) ] pub fn boffmsk ( & self ) -> BOFFMSK_R { BOFFMSK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:18 - Phase Segment 2" ] # [ inline ( always ) ] pub fn pseg2 ( & self ) -> PSEG2_R { PSEG2_R :: new ( ( ( self . bits >> 16 ) & 0x07 ) as u8 ) } # [ doc = "Bits 19:21 - Phase Segment 1" ] # [ inline ( always ) ] pub fn pseg1 ( & self ) -> PSEG1_R { PSEG1_R :: new ( ( ( self . bits >> 19 ) & 0x07 ) as u8 ) } # [ doc = "Bits 22:23 - Resync Jump Width" ] # [ inline ( always ) ] pub fn rjw ( & self ) -> RJW_R { RJW_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } # [ doc = "Bits 24:31 - Prescaler Division Factor" ] # [ inline ( always ) ] pub fn presdiv ( & self ) -> PRESDIV_R { PRESDIV_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Propagation Segment" ] # [ inline ( always ) ] pub fn propseg ( & mut self ) -> PROPSEG_W { PROPSEG_W { w : self } } # [ doc = "Bit 3 - Listen-Only Mode" ] # [ inline ( always ) ] pub fn lom ( & mut self ) -> LOM_W { LOM_W { w : self } } # [ doc = "Bit 4 - Lowest Buffer Transmitted First" ] # [ inline ( always ) ] pub fn lbuf ( & mut self ) -> LBUF_W { LBUF_W { w : self } } # [ doc = "Bit 5 - Timer Sync" ] # [ inline ( always ) ] pub fn tsyn ( & mut self ) -> TSYN_W { TSYN_W { w : self } } # [ doc = "Bit 6 - Bus Off Recovery" ] # [ inline ( always ) ] pub fn boffrec ( & mut self ) -> BOFFREC_W { BOFFREC_W { w : self } } # [ doc = "Bit 7 - CAN Bit Sampling" ] # [ inline ( always ) ] pub fn smp ( & mut self ) -> SMP_W { SMP_W { w : self } } # [ doc = "Bit 10 - Rx Warning Interrupt Mask" ] # [ inline ( always ) ] pub fn rwrnmsk ( & mut self ) -> RWRNMSK_W { RWRNMSK_W { w : self } } # [ doc = "Bit 11 - Tx Warning Interrupt Mask" ] # [ inline ( always ) ] pub fn twrnmsk ( & mut self ) -> TWRNMSK_W { TWRNMSK_W { w : self } } # [ doc = "Bit 12 - Loop Back Mode" ] # [ inline ( always ) ] pub fn lpb ( & mut self ) -> LPB_W { LPB_W { w : self } } # [ doc = "Bit 13 - CAN Engine Clock Source" ] # [ inline ( always ) ] pub fn clksrc ( & mut self ) -> CLKSRC_W { CLKSRC_W { w : self } } # [ doc = "Bit 14 - Error Mask" ] # [ inline ( always ) ] pub fn errmsk ( & mut self ) -> ERRMSK_W { ERRMSK_W { w : self } } # [ doc = "Bit 15 - Bus Off Mask" ] # [ inline ( always ) ] pub fn boffmsk ( & mut self ) -> BOFFMSK_W { BOFFMSK_W { w : self } } # [ doc = "Bits 16:18 - Phase Segment 2" ] # [ inline ( always ) ] pub fn pseg2 ( & mut self ) -> PSEG2_W { PSEG2_W { w : self } } # [ doc = "Bits 19:21 - Phase Segment 1" ] # [ inline ( always ) ] pub fn pseg1 ( & mut self ) -> PSEG1_W { PSEG1_W { w : self } } # [ doc = "Bits 22:23 - Resync Jump Width" ] # [ inline ( always ) ] pub fn rjw ( & mut self ) -> RJW_W { RJW_W { w : self } } # [ doc = "Bits 24:31 - Prescaler Division Factor" ] # [ inline ( always ) ] pub fn presdiv ( & mut self ) -> PRESDIV_W { PRESDIV_W { w : self } } } } # [ doc = "Free Running Timer\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer](timer) module" ] pub type TIMER = crate :: Reg < u32 , _TIMER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER ; # [ doc = "`read()` method returns [timer::R](timer::R) reader structure" ] impl crate :: Readable for TIMER { } # [ doc = "`write(|w| ..)` method takes [timer::W](timer::W) writer structure" ] impl crate :: Writable for TIMER { } # [ doc = "Free Running Timer" ] pub mod timer { # [ doc = "Reader of register TIMER" ] pub type R = crate :: R < u32 , super :: TIMER > ; # [ doc = "Writer for register TIMER" ] pub type W = crate :: W < u32 , super :: TIMER > ; # [ doc = "Register TIMER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TIMER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIMER`" ] pub type TIMER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIMER`" ] pub struct TIMER_W < 'a > { w : & 'a mut W , } impl < 'a > TIMER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Timer Value" ] # [ inline ( always ) ] pub fn timer ( & self ) -> TIMER_R { TIMER_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Timer Value" ] # [ inline ( always ) ] pub fn timer ( & mut self ) -> TIMER_W { TIMER_W { w : self } } } } # [ doc = "Rx Mailboxes Global Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxmgmask](rxmgmask) module" ] pub type RXMGMASK = crate :: Reg < u32 , _RXMGMASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXMGMASK ; # [ doc = "`read()` method returns [rxmgmask::R](rxmgmask::R) reader structure" ] impl crate :: Readable for RXMGMASK { } # [ doc = "`write(|w| ..)` method takes [rxmgmask::W](rxmgmask::W) writer structure" ] impl crate :: Writable for RXMGMASK { } # [ doc = "Rx Mailboxes Global Mask Register" ] pub mod rxmgmask { # [ doc = "Reader of register RXMGMASK" ] pub type R = crate :: R < u32 , super :: RXMGMASK > ; # [ doc = "Writer for register RXMGMASK" ] pub type W = crate :: W < u32 , super :: RXMGMASK > ; # [ doc = "Register RXMGMASK `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RXMGMASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG0_A > for bool { # [ inline ( always ) ] fn from ( variant : MG0_A ) -> Self { match variant { MG0_A :: _0 => false , MG0_A :: _1 => true } } } # [ doc = "Reader of field `MG0`" ] pub type MG0_R = crate :: R < bool , MG0_A > ; impl MG0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG0_A { match self . bits { false => MG0_A :: _0 , true => MG0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG0_A :: _1 } } # [ doc = "Write proxy for field `MG0`" ] pub struct MG0_W < 'a > { w : & 'a mut W , } impl < 'a > MG0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG1_A > for bool { # [ inline ( always ) ] fn from ( variant : MG1_A ) -> Self { match variant { MG1_A :: _0 => false , MG1_A :: _1 => true } } } # [ doc = "Reader of field `MG1`" ] pub type MG1_R = crate :: R < bool , MG1_A > ; impl MG1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG1_A { match self . bits { false => MG1_A :: _0 , true => MG1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG1_A :: _1 } } # [ doc = "Write proxy for field `MG1`" ] pub struct MG1_W < 'a > { w : & 'a mut W , } impl < 'a > MG1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG1_A :: _1 ) } # [ 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 } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG2_A > for bool { # [ inline ( always ) ] fn from ( variant : MG2_A ) -> Self { match variant { MG2_A :: _0 => false , MG2_A :: _1 => true } } } # [ doc = "Reader of field `MG2`" ] pub type MG2_R = crate :: R < bool , MG2_A > ; impl MG2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG2_A { match self . bits { false => MG2_A :: _0 , true => MG2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG2_A :: _1 } } # [ doc = "Write proxy for field `MG2`" ] pub struct MG2_W < 'a > { w : & 'a mut W , } impl < 'a > MG2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG2_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG3_A > for bool { # [ inline ( always ) ] fn from ( variant : MG3_A ) -> Self { match variant { MG3_A :: _0 => false , MG3_A :: _1 => true } } } # [ doc = "Reader of field `MG3`" ] pub type MG3_R = crate :: R < bool , MG3_A > ; impl MG3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG3_A { match self . bits { false => MG3_A :: _0 , true => MG3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG3_A :: _1 } } # [ doc = "Write proxy for field `MG3`" ] pub struct MG3_W < 'a > { w : & 'a mut W , } impl < 'a > MG3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG4_A > for bool { # [ inline ( always ) ] fn from ( variant : MG4_A ) -> Self { match variant { MG4_A :: _0 => false , MG4_A :: _1 => true } } } # [ doc = "Reader of field `MG4`" ] pub type MG4_R = crate :: R < bool , MG4_A > ; impl MG4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG4_A { match self . bits { false => MG4_A :: _0 , true => MG4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG4_A :: _1 } } # [ doc = "Write proxy for field `MG4`" ] pub struct MG4_W < 'a > { w : & 'a mut W , } impl < 'a > MG4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG5_A > for bool { # [ inline ( always ) ] fn from ( variant : MG5_A ) -> Self { match variant { MG5_A :: _0 => false , MG5_A :: _1 => true } } } # [ doc = "Reader of field `MG5`" ] pub type MG5_R = crate :: R < bool , MG5_A > ; impl MG5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG5_A { match self . bits { false => MG5_A :: _0 , true => MG5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG5_A :: _1 } } # [ doc = "Write proxy for field `MG5`" ] pub struct MG5_W < 'a > { w : & 'a mut W , } impl < 'a > MG5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG5_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG6_A > for bool { # [ inline ( always ) ] fn from ( variant : MG6_A ) -> Self { match variant { MG6_A :: _0 => false , MG6_A :: _1 => true } } } # [ doc = "Reader of field `MG6`" ] pub type MG6_R = crate :: R < bool , MG6_A > ; impl MG6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG6_A { match self . bits { false => MG6_A :: _0 , true => MG6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG6_A :: _1 } } # [ doc = "Write proxy for field `MG6`" ] pub struct MG6_W < 'a > { w : & 'a mut W , } impl < 'a > MG6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG6_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG7_A > for bool { # [ inline ( always ) ] fn from ( variant : MG7_A ) -> Self { match variant { MG7_A :: _0 => false , MG7_A :: _1 => true } } } # [ doc = "Reader of field `MG7`" ] pub type MG7_R = crate :: R < bool , MG7_A > ; impl MG7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG7_A { match self . bits { false => MG7_A :: _0 , true => MG7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG7_A :: _1 } } # [ doc = "Write proxy for field `MG7`" ] pub struct MG7_W < 'a > { w : & 'a mut W , } impl < 'a > MG7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG7_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG8_A > for bool { # [ inline ( always ) ] fn from ( variant : MG8_A ) -> Self { match variant { MG8_A :: _0 => false , MG8_A :: _1 => true } } } # [ doc = "Reader of field `MG8`" ] pub type MG8_R = crate :: R < bool , MG8_A > ; impl MG8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG8_A { match self . bits { false => MG8_A :: _0 , true => MG8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG8_A :: _1 } } # [ doc = "Write proxy for field `MG8`" ] pub struct MG8_W < 'a > { w : & 'a mut W , } impl < 'a > MG8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG9_A > for bool { # [ inline ( always ) ] fn from ( variant : MG9_A ) -> Self { match variant { MG9_A :: _0 => false , MG9_A :: _1 => true } } } # [ doc = "Reader of field `MG9`" ] pub type MG9_R = crate :: R < bool , MG9_A > ; impl MG9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG9_A { match self . bits { false => MG9_A :: _0 , true => MG9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG9_A :: _1 } } # [ doc = "Write proxy for field `MG9`" ] pub struct MG9_W < 'a > { w : & 'a mut W , } impl < 'a > MG9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG10_A > for bool { # [ inline ( always ) ] fn from ( variant : MG10_A ) -> Self { match variant { MG10_A :: _0 => false , MG10_A :: _1 => true } } } # [ doc = "Reader of field `MG10`" ] pub type MG10_R = crate :: R < bool , MG10_A > ; impl MG10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG10_A { match self . bits { false => MG10_A :: _0 , true => MG10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG10_A :: _1 } } # [ doc = "Write proxy for field `MG10`" ] pub struct MG10_W < 'a > { w : & 'a mut W , } impl < 'a > MG10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG11_A > for bool { # [ inline ( always ) ] fn from ( variant : MG11_A ) -> Self { match variant { MG11_A :: _0 => false , MG11_A :: _1 => true } } } # [ doc = "Reader of field `MG11`" ] pub type MG11_R = crate :: R < bool , MG11_A > ; impl MG11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG11_A { match self . bits { false => MG11_A :: _0 , true => MG11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG11_A :: _1 } } # [ doc = "Write proxy for field `MG11`" ] pub struct MG11_W < 'a > { w : & 'a mut W , } impl < 'a > MG11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG12_A > for bool { # [ inline ( always ) ] fn from ( variant : MG12_A ) -> Self { match variant { MG12_A :: _0 => false , MG12_A :: _1 => true } } } # [ doc = "Reader of field `MG12`" ] pub type MG12_R = crate :: R < bool , MG12_A > ; impl MG12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG12_A { match self . bits { false => MG12_A :: _0 , true => MG12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG12_A :: _1 } } # [ doc = "Write proxy for field `MG12`" ] pub struct MG12_W < 'a > { w : & 'a mut W , } impl < 'a > MG12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG13_A > for bool { # [ inline ( always ) ] fn from ( variant : MG13_A ) -> Self { match variant { MG13_A :: _0 => false , MG13_A :: _1 => true } } } # [ doc = "Reader of field `MG13`" ] pub type MG13_R = crate :: R < bool , MG13_A > ; impl MG13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG13_A { match self . bits { false => MG13_A :: _0 , true => MG13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG13_A :: _1 } } # [ doc = "Write proxy for field `MG13`" ] pub struct MG13_W < 'a > { w : & 'a mut W , } impl < 'a > MG13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG13_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG14_A > for bool { # [ inline ( always ) ] fn from ( variant : MG14_A ) -> Self { match variant { MG14_A :: _0 => false , MG14_A :: _1 => true } } } # [ doc = "Reader of field `MG14`" ] pub type MG14_R = crate :: R < bool , MG14_A > ; impl MG14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG14_A { match self . bits { false => MG14_A :: _0 , true => MG14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG14_A :: _1 } } # [ doc = "Write proxy for field `MG14`" ] pub struct MG14_W < 'a > { w : & 'a mut W , } impl < 'a > MG14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG15_A > for bool { # [ inline ( always ) ] fn from ( variant : MG15_A ) -> Self { match variant { MG15_A :: _0 => false , MG15_A :: _1 => true } } } # [ doc = "Reader of field `MG15`" ] pub type MG15_R = crate :: R < bool , MG15_A > ; impl MG15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG15_A { match self . bits { false => MG15_A :: _0 , true => MG15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG15_A :: _1 } } # [ doc = "Write proxy for field `MG15`" ] pub struct MG15_W < 'a > { w : & 'a mut W , } impl < 'a > MG15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG16_A > for bool { # [ inline ( always ) ] fn from ( variant : MG16_A ) -> Self { match variant { MG16_A :: _0 => false , MG16_A :: _1 => true } } } # [ doc = "Reader of field `MG16`" ] pub type MG16_R = crate :: R < bool , MG16_A > ; impl MG16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG16_A { match self . bits { false => MG16_A :: _0 , true => MG16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG16_A :: _1 } } # [ doc = "Write proxy for field `MG16`" ] pub struct MG16_W < 'a > { w : & 'a mut W , } impl < 'a > MG16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG17_A > for bool { # [ inline ( always ) ] fn from ( variant : MG17_A ) -> Self { match variant { MG17_A :: _0 => false , MG17_A :: _1 => true } } } # [ doc = "Reader of field `MG17`" ] pub type MG17_R = crate :: R < bool , MG17_A > ; impl MG17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG17_A { match self . bits { false => MG17_A :: _0 , true => MG17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG17_A :: _1 } } # [ doc = "Write proxy for field `MG17`" ] pub struct MG17_W < 'a > { w : & 'a mut W , } impl < 'a > MG17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG18_A > for bool { # [ inline ( always ) ] fn from ( variant : MG18_A ) -> Self { match variant { MG18_A :: _0 => false , MG18_A :: _1 => true } } } # [ doc = "Reader of field `MG18`" ] pub type MG18_R = crate :: R < bool , MG18_A > ; impl MG18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG18_A { match self . bits { false => MG18_A :: _0 , true => MG18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG18_A :: _1 } } # [ doc = "Write proxy for field `MG18`" ] pub struct MG18_W < 'a > { w : & 'a mut W , } impl < 'a > MG18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG19_A > for bool { # [ inline ( always ) ] fn from ( variant : MG19_A ) -> Self { match variant { MG19_A :: _0 => false , MG19_A :: _1 => true } } } # [ doc = "Reader of field `MG19`" ] pub type MG19_R = crate :: R < bool , MG19_A > ; impl MG19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG19_A { match self . bits { false => MG19_A :: _0 , true => MG19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG19_A :: _1 } } # [ doc = "Write proxy for field `MG19`" ] pub struct MG19_W < 'a > { w : & 'a mut W , } impl < 'a > MG19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG20_A > for bool { # [ inline ( always ) ] fn from ( variant : MG20_A ) -> Self { match variant { MG20_A :: _0 => false , MG20_A :: _1 => true } } } # [ doc = "Reader of field `MG20`" ] pub type MG20_R = crate :: R < bool , MG20_A > ; impl MG20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG20_A { match self . bits { false => MG20_A :: _0 , true => MG20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG20_A :: _1 } } # [ doc = "Write proxy for field `MG20`" ] pub struct MG20_W < 'a > { w : & 'a mut W , } impl < 'a > MG20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG20_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG21_A > for bool { # [ inline ( always ) ] fn from ( variant : MG21_A ) -> Self { match variant { MG21_A :: _0 => false , MG21_A :: _1 => true } } } # [ doc = "Reader of field `MG21`" ] pub type MG21_R = crate :: R < bool , MG21_A > ; impl MG21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG21_A { match self . bits { false => MG21_A :: _0 , true => MG21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG21_A :: _1 } } # [ doc = "Write proxy for field `MG21`" ] pub struct MG21_W < 'a > { w : & 'a mut W , } impl < 'a > MG21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG21_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG22_A > for bool { # [ inline ( always ) ] fn from ( variant : MG22_A ) -> Self { match variant { MG22_A :: _0 => false , MG22_A :: _1 => true } } } # [ doc = "Reader of field `MG22`" ] pub type MG22_R = crate :: R < bool , MG22_A > ; impl MG22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG22_A { match self . bits { false => MG22_A :: _0 , true => MG22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG22_A :: _1 } } # [ doc = "Write proxy for field `MG22`" ] pub struct MG22_W < 'a > { w : & 'a mut W , } impl < 'a > MG22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG23_A > for bool { # [ inline ( always ) ] fn from ( variant : MG23_A ) -> Self { match variant { MG23_A :: _0 => false , MG23_A :: _1 => true } } } # [ doc = "Reader of field `MG23`" ] pub type MG23_R = crate :: R < bool , MG23_A > ; impl MG23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG23_A { match self . bits { false => MG23_A :: _0 , true => MG23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG23_A :: _1 } } # [ doc = "Write proxy for field `MG23`" ] pub struct MG23_W < 'a > { w : & 'a mut W , } impl < 'a > MG23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG24_A > for bool { # [ inline ( always ) ] fn from ( variant : MG24_A ) -> Self { match variant { MG24_A :: _0 => false , MG24_A :: _1 => true } } } # [ doc = "Reader of field `MG24`" ] pub type MG24_R = crate :: R < bool , MG24_A > ; impl MG24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG24_A { match self . bits { false => MG24_A :: _0 , true => MG24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG24_A :: _1 } } # [ doc = "Write proxy for field `MG24`" ] pub struct MG24_W < 'a > { w : & 'a mut W , } impl < 'a > MG24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG24_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG25_A > for bool { # [ inline ( always ) ] fn from ( variant : MG25_A ) -> Self { match variant { MG25_A :: _0 => false , MG25_A :: _1 => true } } } # [ doc = "Reader of field `MG25`" ] pub type MG25_R = crate :: R < bool , MG25_A > ; impl MG25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG25_A { match self . bits { false => MG25_A :: _0 , true => MG25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG25_A :: _1 } } # [ doc = "Write proxy for field `MG25`" ] pub struct MG25_W < 'a > { w : & 'a mut W , } impl < 'a > MG25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG25_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG26_A > for bool { # [ inline ( always ) ] fn from ( variant : MG26_A ) -> Self { match variant { MG26_A :: _0 => false , MG26_A :: _1 => true } } } # [ doc = "Reader of field `MG26`" ] pub type MG26_R = crate :: R < bool , MG26_A > ; impl MG26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG26_A { match self . bits { false => MG26_A :: _0 , true => MG26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG26_A :: _1 } } # [ doc = "Write proxy for field `MG26`" ] pub struct MG26_W < 'a > { w : & 'a mut W , } impl < 'a > MG26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG26_A :: _1 ) } # [ 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 = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG27_A > for bool { # [ inline ( always ) ] fn from ( variant : MG27_A ) -> Self { match variant { MG27_A :: _0 => false , MG27_A :: _1 => true } } } # [ doc = "Reader of field `MG27`" ] pub type MG27_R = crate :: R < bool , MG27_A > ; impl MG27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG27_A { match self . bits { false => MG27_A :: _0 , true => MG27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG27_A :: _1 } } # [ doc = "Write proxy for field `MG27`" ] pub struct MG27_W < 'a > { w : & 'a mut W , } impl < 'a > MG27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG28_A > for bool { # [ inline ( always ) ] fn from ( variant : MG28_A ) -> Self { match variant { MG28_A :: _0 => false , MG28_A :: _1 => true } } } # [ doc = "Reader of field `MG28`" ] pub type MG28_R = crate :: R < bool , MG28_A > ; impl MG28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG28_A { match self . bits { false => MG28_A :: _0 , true => MG28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG28_A :: _1 } } # [ doc = "Write proxy for field `MG28`" ] pub struct MG28_W < 'a > { w : & 'a mut W , } impl < 'a > MG28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG29_A > for bool { # [ inline ( always ) ] fn from ( variant : MG29_A ) -> Self { match variant { MG29_A :: _0 => false , MG29_A :: _1 => true } } } # [ doc = "Reader of field `MG29`" ] pub type MG29_R = crate :: R < bool , MG29_A > ; impl MG29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG29_A { match self . bits { false => MG29_A :: _0 , true => MG29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG29_A :: _1 } } # [ doc = "Write proxy for field `MG29`" ] pub struct MG29_W < 'a > { w : & 'a mut W , } impl < 'a > MG29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG30_A > for bool { # [ inline ( always ) ] fn from ( variant : MG30_A ) -> Self { match variant { MG30_A :: _0 => false , MG30_A :: _1 => true } } } # [ doc = "Reader of field `MG30`" ] pub type MG30_R = crate :: R < bool , MG30_A > ; impl MG30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG30_A { match self . bits { false => MG30_A :: _0 , true => MG30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG30_A :: _1 } } # [ doc = "Write proxy for field `MG30`" ] pub struct MG30_W < 'a > { w : & 'a mut W , } impl < 'a > MG30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Rx Mailboxes Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MG31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MG31_A > for bool { # [ inline ( always ) ] fn from ( variant : MG31_A ) -> Self { match variant { MG31_A :: _0 => false , MG31_A :: _1 => true } } } # [ doc = "Reader of field `MG31`" ] pub type MG31_R = crate :: R < bool , MG31_A > ; impl MG31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MG31_A { match self . bits { false => MG31_A :: _0 , true => MG31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MG31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MG31_A :: _1 } } # [ doc = "Write proxy for field `MG31`" ] pub struct MG31_W < 'a > { w : & 'a mut W , } impl < 'a > MG31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MG31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MG31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MG31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg0 ( & self ) -> MG0_R { MG0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg1 ( & self ) -> MG1_R { MG1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg2 ( & self ) -> MG2_R { MG2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg3 ( & self ) -> MG3_R { MG3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg4 ( & self ) -> MG4_R { MG4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg5 ( & self ) -> MG5_R { MG5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg6 ( & self ) -> MG6_R { MG6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg7 ( & self ) -> MG7_R { MG7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg8 ( & self ) -> MG8_R { MG8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg9 ( & self ) -> MG9_R { MG9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg10 ( & self ) -> MG10_R { MG10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg11 ( & self ) -> MG11_R { MG11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg12 ( & self ) -> MG12_R { MG12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg13 ( & self ) -> MG13_R { MG13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg14 ( & self ) -> MG14_R { MG14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg15 ( & self ) -> MG15_R { MG15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg16 ( & self ) -> MG16_R { MG16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg17 ( & self ) -> MG17_R { MG17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg18 ( & self ) -> MG18_R { MG18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg19 ( & self ) -> MG19_R { MG19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg20 ( & self ) -> MG20_R { MG20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg21 ( & self ) -> MG21_R { MG21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg22 ( & self ) -> MG22_R { MG22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg23 ( & self ) -> MG23_R { MG23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg24 ( & self ) -> MG24_R { MG24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg25 ( & self ) -> MG25_R { MG25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg26 ( & self ) -> MG26_R { MG26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg27 ( & self ) -> MG27_R { MG27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg28 ( & self ) -> MG28_R { MG28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg29 ( & self ) -> MG29_R { MG29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg30 ( & self ) -> MG30_R { MG30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg31 ( & self ) -> MG31_R { MG31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg0 ( & mut self ) -> MG0_W { MG0_W { w : self } } # [ doc = "Bit 1 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg1 ( & mut self ) -> MG1_W { MG1_W { w : self } } # [ doc = "Bit 2 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg2 ( & mut self ) -> MG2_W { MG2_W { w : self } } # [ doc = "Bit 3 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg3 ( & mut self ) -> MG3_W { MG3_W { w : self } } # [ doc = "Bit 4 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg4 ( & mut self ) -> MG4_W { MG4_W { w : self } } # [ doc = "Bit 5 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg5 ( & mut self ) -> MG5_W { MG5_W { w : self } } # [ doc = "Bit 6 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg6 ( & mut self ) -> MG6_W { MG6_W { w : self } } # [ doc = "Bit 7 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg7 ( & mut self ) -> MG7_W { MG7_W { w : self } } # [ doc = "Bit 8 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg8 ( & mut self ) -> MG8_W { MG8_W { w : self } } # [ doc = "Bit 9 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg9 ( & mut self ) -> MG9_W { MG9_W { w : self } } # [ doc = "Bit 10 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg10 ( & mut self ) -> MG10_W { MG10_W { w : self } } # [ doc = "Bit 11 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg11 ( & mut self ) -> MG11_W { MG11_W { w : self } } # [ doc = "Bit 12 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg12 ( & mut self ) -> MG12_W { MG12_W { w : self } } # [ doc = "Bit 13 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg13 ( & mut self ) -> MG13_W { MG13_W { w : self } } # [ doc = "Bit 14 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg14 ( & mut self ) -> MG14_W { MG14_W { w : self } } # [ doc = "Bit 15 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg15 ( & mut self ) -> MG15_W { MG15_W { w : self } } # [ doc = "Bit 16 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg16 ( & mut self ) -> MG16_W { MG16_W { w : self } } # [ doc = "Bit 17 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg17 ( & mut self ) -> MG17_W { MG17_W { w : self } } # [ doc = "Bit 18 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg18 ( & mut self ) -> MG18_W { MG18_W { w : self } } # [ doc = "Bit 19 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg19 ( & mut self ) -> MG19_W { MG19_W { w : self } } # [ doc = "Bit 20 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg20 ( & mut self ) -> MG20_W { MG20_W { w : self } } # [ doc = "Bit 21 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg21 ( & mut self ) -> MG21_W { MG21_W { w : self } } # [ doc = "Bit 22 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg22 ( & mut self ) -> MG22_W { MG22_W { w : self } } # [ doc = "Bit 23 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg23 ( & mut self ) -> MG23_W { MG23_W { w : self } } # [ doc = "Bit 24 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg24 ( & mut self ) -> MG24_W { MG24_W { w : self } } # [ doc = "Bit 25 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg25 ( & mut self ) -> MG25_W { MG25_W { w : self } } # [ doc = "Bit 26 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg26 ( & mut self ) -> MG26_W { MG26_W { w : self } } # [ doc = "Bit 27 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg27 ( & mut self ) -> MG27_W { MG27_W { w : self } } # [ doc = "Bit 28 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg28 ( & mut self ) -> MG28_W { MG28_W { w : self } } # [ doc = "Bit 29 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg29 ( & mut self ) -> MG29_W { MG29_W { w : self } } # [ doc = "Bit 30 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg30 ( & mut self ) -> MG30_W { MG30_W { w : self } } # [ doc = "Bit 31 - Rx Mailboxes Global Mask Bits" ] # [ inline ( always ) ] pub fn mg31 ( & mut self ) -> MG31_W { MG31_W { w : self } } } } # [ doc = "Rx 14 Mask register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rx14mask](rx14mask) module" ] pub type RX14MASK = crate :: Reg < u32 , _RX14MASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RX14MASK ; # [ doc = "`read()` method returns [rx14mask::R](rx14mask::R) reader structure" ] impl crate :: Readable for RX14MASK { } # [ doc = "`write(|w| ..)` method takes [rx14mask::W](rx14mask::W) writer structure" ] impl crate :: Writable for RX14MASK { } # [ doc = "Rx 14 Mask register" ] pub mod rx14mask { # [ doc = "Reader of register RX14MASK" ] pub type R = crate :: R < u32 , super :: RX14MASK > ; # [ doc = "Writer for register RX14MASK" ] pub type W = crate :: W < u32 , super :: RX14MASK > ; # [ doc = "Register RX14MASK `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RX14MASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M0_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M0_A ) -> Self { match variant { RX14M0_A :: _0 => false , RX14M0_A :: _1 => true } } } # [ doc = "Reader of field `RX14M0`" ] pub type RX14M0_R = crate :: R < bool , RX14M0_A > ; impl RX14M0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M0_A { match self . bits { false => RX14M0_A :: _0 , true => RX14M0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M0_A :: _1 } } # [ doc = "Write proxy for field `RX14M0`" ] pub struct RX14M0_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M1_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M1_A ) -> Self { match variant { RX14M1_A :: _0 => false , RX14M1_A :: _1 => true } } } # [ doc = "Reader of field `RX14M1`" ] pub type RX14M1_R = crate :: R < bool , RX14M1_A > ; impl RX14M1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M1_A { match self . bits { false => RX14M1_A :: _0 , true => RX14M1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M1_A :: _1 } } # [ doc = "Write proxy for field `RX14M1`" ] pub struct RX14M1_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M1_A :: _1 ) } # [ 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 } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M2_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M2_A ) -> Self { match variant { RX14M2_A :: _0 => false , RX14M2_A :: _1 => true } } } # [ doc = "Reader of field `RX14M2`" ] pub type RX14M2_R = crate :: R < bool , RX14M2_A > ; impl RX14M2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M2_A { match self . bits { false => RX14M2_A :: _0 , true => RX14M2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M2_A :: _1 } } # [ doc = "Write proxy for field `RX14M2`" ] pub struct RX14M2_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M2_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M3_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M3_A ) -> Self { match variant { RX14M3_A :: _0 => false , RX14M3_A :: _1 => true } } } # [ doc = "Reader of field `RX14M3`" ] pub type RX14M3_R = crate :: R < bool , RX14M3_A > ; impl RX14M3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M3_A { match self . bits { false => RX14M3_A :: _0 , true => RX14M3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M3_A :: _1 } } # [ doc = "Write proxy for field `RX14M3`" ] pub struct RX14M3_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M4_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M4_A ) -> Self { match variant { RX14M4_A :: _0 => false , RX14M4_A :: _1 => true } } } # [ doc = "Reader of field `RX14M4`" ] pub type RX14M4_R = crate :: R < bool , RX14M4_A > ; impl RX14M4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M4_A { match self . bits { false => RX14M4_A :: _0 , true => RX14M4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M4_A :: _1 } } # [ doc = "Write proxy for field `RX14M4`" ] pub struct RX14M4_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M5_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M5_A ) -> Self { match variant { RX14M5_A :: _0 => false , RX14M5_A :: _1 => true } } } # [ doc = "Reader of field `RX14M5`" ] pub type RX14M5_R = crate :: R < bool , RX14M5_A > ; impl RX14M5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M5_A { match self . bits { false => RX14M5_A :: _0 , true => RX14M5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M5_A :: _1 } } # [ doc = "Write proxy for field `RX14M5`" ] pub struct RX14M5_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M5_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M6_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M6_A ) -> Self { match variant { RX14M6_A :: _0 => false , RX14M6_A :: _1 => true } } } # [ doc = "Reader of field `RX14M6`" ] pub type RX14M6_R = crate :: R < bool , RX14M6_A > ; impl RX14M6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M6_A { match self . bits { false => RX14M6_A :: _0 , true => RX14M6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M6_A :: _1 } } # [ doc = "Write proxy for field `RX14M6`" ] pub struct RX14M6_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M6_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M7_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M7_A ) -> Self { match variant { RX14M7_A :: _0 => false , RX14M7_A :: _1 => true } } } # [ doc = "Reader of field `RX14M7`" ] pub type RX14M7_R = crate :: R < bool , RX14M7_A > ; impl RX14M7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M7_A { match self . bits { false => RX14M7_A :: _0 , true => RX14M7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M7_A :: _1 } } # [ doc = "Write proxy for field `RX14M7`" ] pub struct RX14M7_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M7_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M8_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M8_A ) -> Self { match variant { RX14M8_A :: _0 => false , RX14M8_A :: _1 => true } } } # [ doc = "Reader of field `RX14M8`" ] pub type RX14M8_R = crate :: R < bool , RX14M8_A > ; impl RX14M8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M8_A { match self . bits { false => RX14M8_A :: _0 , true => RX14M8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M8_A :: _1 } } # [ doc = "Write proxy for field `RX14M8`" ] pub struct RX14M8_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M9_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M9_A ) -> Self { match variant { RX14M9_A :: _0 => false , RX14M9_A :: _1 => true } } } # [ doc = "Reader of field `RX14M9`" ] pub type RX14M9_R = crate :: R < bool , RX14M9_A > ; impl RX14M9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M9_A { match self . bits { false => RX14M9_A :: _0 , true => RX14M9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M9_A :: _1 } } # [ doc = "Write proxy for field `RX14M9`" ] pub struct RX14M9_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M10_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M10_A ) -> Self { match variant { RX14M10_A :: _0 => false , RX14M10_A :: _1 => true } } } # [ doc = "Reader of field `RX14M10`" ] pub type RX14M10_R = crate :: R < bool , RX14M10_A > ; impl RX14M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M10_A { match self . bits { false => RX14M10_A :: _0 , true => RX14M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M10_A :: _1 } } # [ doc = "Write proxy for field `RX14M10`" ] pub struct RX14M10_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M11_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M11_A ) -> Self { match variant { RX14M11_A :: _0 => false , RX14M11_A :: _1 => true } } } # [ doc = "Reader of field `RX14M11`" ] pub type RX14M11_R = crate :: R < bool , RX14M11_A > ; impl RX14M11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M11_A { match self . bits { false => RX14M11_A :: _0 , true => RX14M11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M11_A :: _1 } } # [ doc = "Write proxy for field `RX14M11`" ] pub struct RX14M11_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M12_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M12_A ) -> Self { match variant { RX14M12_A :: _0 => false , RX14M12_A :: _1 => true } } } # [ doc = "Reader of field `RX14M12`" ] pub type RX14M12_R = crate :: R < bool , RX14M12_A > ; impl RX14M12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M12_A { match self . bits { false => RX14M12_A :: _0 , true => RX14M12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M12_A :: _1 } } # [ doc = "Write proxy for field `RX14M12`" ] pub struct RX14M12_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M13_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M13_A ) -> Self { match variant { RX14M13_A :: _0 => false , RX14M13_A :: _1 => true } } } # [ doc = "Reader of field `RX14M13`" ] pub type RX14M13_R = crate :: R < bool , RX14M13_A > ; impl RX14M13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M13_A { match self . bits { false => RX14M13_A :: _0 , true => RX14M13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M13_A :: _1 } } # [ doc = "Write proxy for field `RX14M13`" ] pub struct RX14M13_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M13_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M14_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M14_A ) -> Self { match variant { RX14M14_A :: _0 => false , RX14M14_A :: _1 => true } } } # [ doc = "Reader of field `RX14M14`" ] pub type RX14M14_R = crate :: R < bool , RX14M14_A > ; impl RX14M14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M14_A { match self . bits { false => RX14M14_A :: _0 , true => RX14M14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M14_A :: _1 } } # [ doc = "Write proxy for field `RX14M14`" ] pub struct RX14M14_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M15_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M15_A ) -> Self { match variant { RX14M15_A :: _0 => false , RX14M15_A :: _1 => true } } } # [ doc = "Reader of field `RX14M15`" ] pub type RX14M15_R = crate :: R < bool , RX14M15_A > ; impl RX14M15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M15_A { match self . bits { false => RX14M15_A :: _0 , true => RX14M15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M15_A :: _1 } } # [ doc = "Write proxy for field `RX14M15`" ] pub struct RX14M15_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M16_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M16_A ) -> Self { match variant { RX14M16_A :: _0 => false , RX14M16_A :: _1 => true } } } # [ doc = "Reader of field `RX14M16`" ] pub type RX14M16_R = crate :: R < bool , RX14M16_A > ; impl RX14M16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M16_A { match self . bits { false => RX14M16_A :: _0 , true => RX14M16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M16_A :: _1 } } # [ doc = "Write proxy for field `RX14M16`" ] pub struct RX14M16_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M17_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M17_A ) -> Self { match variant { RX14M17_A :: _0 => false , RX14M17_A :: _1 => true } } } # [ doc = "Reader of field `RX14M17`" ] pub type RX14M17_R = crate :: R < bool , RX14M17_A > ; impl RX14M17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M17_A { match self . bits { false => RX14M17_A :: _0 , true => RX14M17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M17_A :: _1 } } # [ doc = "Write proxy for field `RX14M17`" ] pub struct RX14M17_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M18_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M18_A ) -> Self { match variant { RX14M18_A :: _0 => false , RX14M18_A :: _1 => true } } } # [ doc = "Reader of field `RX14M18`" ] pub type RX14M18_R = crate :: R < bool , RX14M18_A > ; impl RX14M18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M18_A { match self . bits { false => RX14M18_A :: _0 , true => RX14M18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M18_A :: _1 } } # [ doc = "Write proxy for field `RX14M18`" ] pub struct RX14M18_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M19_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M19_A ) -> Self { match variant { RX14M19_A :: _0 => false , RX14M19_A :: _1 => true } } } # [ doc = "Reader of field `RX14M19`" ] pub type RX14M19_R = crate :: R < bool , RX14M19_A > ; impl RX14M19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M19_A { match self . bits { false => RX14M19_A :: _0 , true => RX14M19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M19_A :: _1 } } # [ doc = "Write proxy for field `RX14M19`" ] pub struct RX14M19_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M20_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M20_A ) -> Self { match variant { RX14M20_A :: _0 => false , RX14M20_A :: _1 => true } } } # [ doc = "Reader of field `RX14M20`" ] pub type RX14M20_R = crate :: R < bool , RX14M20_A > ; impl RX14M20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M20_A { match self . bits { false => RX14M20_A :: _0 , true => RX14M20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M20_A :: _1 } } # [ doc = "Write proxy for field `RX14M20`" ] pub struct RX14M20_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M20_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M21_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M21_A ) -> Self { match variant { RX14M21_A :: _0 => false , RX14M21_A :: _1 => true } } } # [ doc = "Reader of field `RX14M21`" ] pub type RX14M21_R = crate :: R < bool , RX14M21_A > ; impl RX14M21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M21_A { match self . bits { false => RX14M21_A :: _0 , true => RX14M21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M21_A :: _1 } } # [ doc = "Write proxy for field `RX14M21`" ] pub struct RX14M21_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M21_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M22_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M22_A ) -> Self { match variant { RX14M22_A :: _0 => false , RX14M22_A :: _1 => true } } } # [ doc = "Reader of field `RX14M22`" ] pub type RX14M22_R = crate :: R < bool , RX14M22_A > ; impl RX14M22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M22_A { match self . bits { false => RX14M22_A :: _0 , true => RX14M22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M22_A :: _1 } } # [ doc = "Write proxy for field `RX14M22`" ] pub struct RX14M22_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M23_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M23_A ) -> Self { match variant { RX14M23_A :: _0 => false , RX14M23_A :: _1 => true } } } # [ doc = "Reader of field `RX14M23`" ] pub type RX14M23_R = crate :: R < bool , RX14M23_A > ; impl RX14M23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M23_A { match self . bits { false => RX14M23_A :: _0 , true => RX14M23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M23_A :: _1 } } # [ doc = "Write proxy for field `RX14M23`" ] pub struct RX14M23_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M24_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M24_A ) -> Self { match variant { RX14M24_A :: _0 => false , RX14M24_A :: _1 => true } } } # [ doc = "Reader of field `RX14M24`" ] pub type RX14M24_R = crate :: R < bool , RX14M24_A > ; impl RX14M24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M24_A { match self . bits { false => RX14M24_A :: _0 , true => RX14M24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M24_A :: _1 } } # [ doc = "Write proxy for field `RX14M24`" ] pub struct RX14M24_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M24_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M25_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M25_A ) -> Self { match variant { RX14M25_A :: _0 => false , RX14M25_A :: _1 => true } } } # [ doc = "Reader of field `RX14M25`" ] pub type RX14M25_R = crate :: R < bool , RX14M25_A > ; impl RX14M25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M25_A { match self . bits { false => RX14M25_A :: _0 , true => RX14M25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M25_A :: _1 } } # [ doc = "Write proxy for field `RX14M25`" ] pub struct RX14M25_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M25_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M26_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M26_A ) -> Self { match variant { RX14M26_A :: _0 => false , RX14M26_A :: _1 => true } } } # [ doc = "Reader of field `RX14M26`" ] pub type RX14M26_R = crate :: R < bool , RX14M26_A > ; impl RX14M26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M26_A { match self . bits { false => RX14M26_A :: _0 , true => RX14M26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M26_A :: _1 } } # [ doc = "Write proxy for field `RX14M26`" ] pub struct RX14M26_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M26_A :: _1 ) } # [ 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 = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M27_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M27_A ) -> Self { match variant { RX14M27_A :: _0 => false , RX14M27_A :: _1 => true } } } # [ doc = "Reader of field `RX14M27`" ] pub type RX14M27_R = crate :: R < bool , RX14M27_A > ; impl RX14M27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M27_A { match self . bits { false => RX14M27_A :: _0 , true => RX14M27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M27_A :: _1 } } # [ doc = "Write proxy for field `RX14M27`" ] pub struct RX14M27_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M28_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M28_A ) -> Self { match variant { RX14M28_A :: _0 => false , RX14M28_A :: _1 => true } } } # [ doc = "Reader of field `RX14M28`" ] pub type RX14M28_R = crate :: R < bool , RX14M28_A > ; impl RX14M28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M28_A { match self . bits { false => RX14M28_A :: _0 , true => RX14M28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M28_A :: _1 } } # [ doc = "Write proxy for field `RX14M28`" ] pub struct RX14M28_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M29_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M29_A ) -> Self { match variant { RX14M29_A :: _0 => false , RX14M29_A :: _1 => true } } } # [ doc = "Reader of field `RX14M29`" ] pub type RX14M29_R = crate :: R < bool , RX14M29_A > ; impl RX14M29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M29_A { match self . bits { false => RX14M29_A :: _0 , true => RX14M29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M29_A :: _1 } } # [ doc = "Write proxy for field `RX14M29`" ] pub struct RX14M29_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M30_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M30_A ) -> Self { match variant { RX14M30_A :: _0 => false , RX14M30_A :: _1 => true } } } # [ doc = "Reader of field `RX14M30`" ] pub type RX14M30_R = crate :: R < bool , RX14M30_A > ; impl RX14M30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M30_A { match self . bits { false => RX14M30_A :: _0 , true => RX14M30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M30_A :: _1 } } # [ doc = "Write proxy for field `RX14M30`" ] pub struct RX14M30_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Rx Buffer 14 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX14M31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX14M31_A > for bool { # [ inline ( always ) ] fn from ( variant : RX14M31_A ) -> Self { match variant { RX14M31_A :: _0 => false , RX14M31_A :: _1 => true } } } # [ doc = "Reader of field `RX14M31`" ] pub type RX14M31_R = crate :: R < bool , RX14M31_A > ; impl RX14M31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX14M31_A { match self . bits { false => RX14M31_A :: _0 , true => RX14M31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX14M31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX14M31_A :: _1 } } # [ doc = "Write proxy for field `RX14M31`" ] pub struct RX14M31_W < 'a > { w : & 'a mut W , } impl < 'a > RX14M31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX14M31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX14M31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX14M31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m0 ( & self ) -> RX14M0_R { RX14M0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m1 ( & self ) -> RX14M1_R { RX14M1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m2 ( & self ) -> RX14M2_R { RX14M2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m3 ( & self ) -> RX14M3_R { RX14M3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m4 ( & self ) -> RX14M4_R { RX14M4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m5 ( & self ) -> RX14M5_R { RX14M5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m6 ( & self ) -> RX14M6_R { RX14M6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m7 ( & self ) -> RX14M7_R { RX14M7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m8 ( & self ) -> RX14M8_R { RX14M8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m9 ( & self ) -> RX14M9_R { RX14M9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m10 ( & self ) -> RX14M10_R { RX14M10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m11 ( & self ) -> RX14M11_R { RX14M11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m12 ( & self ) -> RX14M12_R { RX14M12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m13 ( & self ) -> RX14M13_R { RX14M13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m14 ( & self ) -> RX14M14_R { RX14M14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m15 ( & self ) -> RX14M15_R { RX14M15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m16 ( & self ) -> RX14M16_R { RX14M16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m17 ( & self ) -> RX14M17_R { RX14M17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m18 ( & self ) -> RX14M18_R { RX14M18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m19 ( & self ) -> RX14M19_R { RX14M19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m20 ( & self ) -> RX14M20_R { RX14M20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m21 ( & self ) -> RX14M21_R { RX14M21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m22 ( & self ) -> RX14M22_R { RX14M22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m23 ( & self ) -> RX14M23_R { RX14M23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m24 ( & self ) -> RX14M24_R { RX14M24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m25 ( & self ) -> RX14M25_R { RX14M25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m26 ( & self ) -> RX14M26_R { RX14M26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m27 ( & self ) -> RX14M27_R { RX14M27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m28 ( & self ) -> RX14M28_R { RX14M28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m29 ( & self ) -> RX14M29_R { RX14M29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m30 ( & self ) -> RX14M30_R { RX14M30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m31 ( & self ) -> RX14M31_R { RX14M31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m0 ( & mut self ) -> RX14M0_W { RX14M0_W { w : self } } # [ doc = "Bit 1 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m1 ( & mut self ) -> RX14M1_W { RX14M1_W { w : self } } # [ doc = "Bit 2 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m2 ( & mut self ) -> RX14M2_W { RX14M2_W { w : self } } # [ doc = "Bit 3 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m3 ( & mut self ) -> RX14M3_W { RX14M3_W { w : self } } # [ doc = "Bit 4 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m4 ( & mut self ) -> RX14M4_W { RX14M4_W { w : self } } # [ doc = "Bit 5 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m5 ( & mut self ) -> RX14M5_W { RX14M5_W { w : self } } # [ doc = "Bit 6 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m6 ( & mut self ) -> RX14M6_W { RX14M6_W { w : self } } # [ doc = "Bit 7 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m7 ( & mut self ) -> RX14M7_W { RX14M7_W { w : self } } # [ doc = "Bit 8 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m8 ( & mut self ) -> RX14M8_W { RX14M8_W { w : self } } # [ doc = "Bit 9 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m9 ( & mut self ) -> RX14M9_W { RX14M9_W { w : self } } # [ doc = "Bit 10 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m10 ( & mut self ) -> RX14M10_W { RX14M10_W { w : self } } # [ doc = "Bit 11 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m11 ( & mut self ) -> RX14M11_W { RX14M11_W { w : self } } # [ doc = "Bit 12 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m12 ( & mut self ) -> RX14M12_W { RX14M12_W { w : self } } # [ doc = "Bit 13 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m13 ( & mut self ) -> RX14M13_W { RX14M13_W { w : self } } # [ doc = "Bit 14 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m14 ( & mut self ) -> RX14M14_W { RX14M14_W { w : self } } # [ doc = "Bit 15 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m15 ( & mut self ) -> RX14M15_W { RX14M15_W { w : self } } # [ doc = "Bit 16 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m16 ( & mut self ) -> RX14M16_W { RX14M16_W { w : self } } # [ doc = "Bit 17 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m17 ( & mut self ) -> RX14M17_W { RX14M17_W { w : self } } # [ doc = "Bit 18 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m18 ( & mut self ) -> RX14M18_W { RX14M18_W { w : self } } # [ doc = "Bit 19 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m19 ( & mut self ) -> RX14M19_W { RX14M19_W { w : self } } # [ doc = "Bit 20 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m20 ( & mut self ) -> RX14M20_W { RX14M20_W { w : self } } # [ doc = "Bit 21 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m21 ( & mut self ) -> RX14M21_W { RX14M21_W { w : self } } # [ doc = "Bit 22 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m22 ( & mut self ) -> RX14M22_W { RX14M22_W { w : self } } # [ doc = "Bit 23 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m23 ( & mut self ) -> RX14M23_W { RX14M23_W { w : self } } # [ doc = "Bit 24 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m24 ( & mut self ) -> RX14M24_W { RX14M24_W { w : self } } # [ doc = "Bit 25 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m25 ( & mut self ) -> RX14M25_W { RX14M25_W { w : self } } # [ doc = "Bit 26 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m26 ( & mut self ) -> RX14M26_W { RX14M26_W { w : self } } # [ doc = "Bit 27 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m27 ( & mut self ) -> RX14M27_W { RX14M27_W { w : self } } # [ doc = "Bit 28 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m28 ( & mut self ) -> RX14M28_W { RX14M28_W { w : self } } # [ doc = "Bit 29 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m29 ( & mut self ) -> RX14M29_W { RX14M29_W { w : self } } # [ doc = "Bit 30 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m30 ( & mut self ) -> RX14M30_W { RX14M30_W { w : self } } # [ doc = "Bit 31 - Rx Buffer 14 Mask Bits" ] # [ inline ( always ) ] pub fn rx14m31 ( & mut self ) -> RX14M31_W { RX14M31_W { w : self } } } } # [ doc = "Rx 15 Mask register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rx15mask](rx15mask) module" ] pub type RX15MASK = crate :: Reg < u32 , _RX15MASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RX15MASK ; # [ doc = "`read()` method returns [rx15mask::R](rx15mask::R) reader structure" ] impl crate :: Readable for RX15MASK { } # [ doc = "`write(|w| ..)` method takes [rx15mask::W](rx15mask::W) writer structure" ] impl crate :: Writable for RX15MASK { } # [ doc = "Rx 15 Mask register" ] pub mod rx15mask { # [ doc = "Reader of register RX15MASK" ] pub type R = crate :: R < u32 , super :: RX15MASK > ; # [ doc = "Writer for register RX15MASK" ] pub type W = crate :: W < u32 , super :: RX15MASK > ; # [ doc = "Register RX15MASK `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RX15MASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M0_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M0_A ) -> Self { match variant { RX15M0_A :: _0 => false , RX15M0_A :: _1 => true } } } # [ doc = "Reader of field `RX15M0`" ] pub type RX15M0_R = crate :: R < bool , RX15M0_A > ; impl RX15M0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M0_A { match self . bits { false => RX15M0_A :: _0 , true => RX15M0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M0_A :: _1 } } # [ doc = "Write proxy for field `RX15M0`" ] pub struct RX15M0_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M1_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M1_A ) -> Self { match variant { RX15M1_A :: _0 => false , RX15M1_A :: _1 => true } } } # [ doc = "Reader of field `RX15M1`" ] pub type RX15M1_R = crate :: R < bool , RX15M1_A > ; impl RX15M1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M1_A { match self . bits { false => RX15M1_A :: _0 , true => RX15M1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M1_A :: _1 } } # [ doc = "Write proxy for field `RX15M1`" ] pub struct RX15M1_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M1_A :: _1 ) } # [ 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 } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M2_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M2_A ) -> Self { match variant { RX15M2_A :: _0 => false , RX15M2_A :: _1 => true } } } # [ doc = "Reader of field `RX15M2`" ] pub type RX15M2_R = crate :: R < bool , RX15M2_A > ; impl RX15M2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M2_A { match self . bits { false => RX15M2_A :: _0 , true => RX15M2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M2_A :: _1 } } # [ doc = "Write proxy for field `RX15M2`" ] pub struct RX15M2_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M2_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M3_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M3_A ) -> Self { match variant { RX15M3_A :: _0 => false , RX15M3_A :: _1 => true } } } # [ doc = "Reader of field `RX15M3`" ] pub type RX15M3_R = crate :: R < bool , RX15M3_A > ; impl RX15M3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M3_A { match self . bits { false => RX15M3_A :: _0 , true => RX15M3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M3_A :: _1 } } # [ doc = "Write proxy for field `RX15M3`" ] pub struct RX15M3_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M4_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M4_A ) -> Self { match variant { RX15M4_A :: _0 => false , RX15M4_A :: _1 => true } } } # [ doc = "Reader of field `RX15M4`" ] pub type RX15M4_R = crate :: R < bool , RX15M4_A > ; impl RX15M4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M4_A { match self . bits { false => RX15M4_A :: _0 , true => RX15M4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M4_A :: _1 } } # [ doc = "Write proxy for field `RX15M4`" ] pub struct RX15M4_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M5_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M5_A ) -> Self { match variant { RX15M5_A :: _0 => false , RX15M5_A :: _1 => true } } } # [ doc = "Reader of field `RX15M5`" ] pub type RX15M5_R = crate :: R < bool , RX15M5_A > ; impl RX15M5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M5_A { match self . bits { false => RX15M5_A :: _0 , true => RX15M5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M5_A :: _1 } } # [ doc = "Write proxy for field `RX15M5`" ] pub struct RX15M5_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M5_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M6_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M6_A ) -> Self { match variant { RX15M6_A :: _0 => false , RX15M6_A :: _1 => true } } } # [ doc = "Reader of field `RX15M6`" ] pub type RX15M6_R = crate :: R < bool , RX15M6_A > ; impl RX15M6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M6_A { match self . bits { false => RX15M6_A :: _0 , true => RX15M6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M6_A :: _1 } } # [ doc = "Write proxy for field `RX15M6`" ] pub struct RX15M6_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M6_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M7_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M7_A ) -> Self { match variant { RX15M7_A :: _0 => false , RX15M7_A :: _1 => true } } } # [ doc = "Reader of field `RX15M7`" ] pub type RX15M7_R = crate :: R < bool , RX15M7_A > ; impl RX15M7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M7_A { match self . bits { false => RX15M7_A :: _0 , true => RX15M7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M7_A :: _1 } } # [ doc = "Write proxy for field `RX15M7`" ] pub struct RX15M7_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M7_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M8_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M8_A ) -> Self { match variant { RX15M8_A :: _0 => false , RX15M8_A :: _1 => true } } } # [ doc = "Reader of field `RX15M8`" ] pub type RX15M8_R = crate :: R < bool , RX15M8_A > ; impl RX15M8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M8_A { match self . bits { false => RX15M8_A :: _0 , true => RX15M8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M8_A :: _1 } } # [ doc = "Write proxy for field `RX15M8`" ] pub struct RX15M8_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M9_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M9_A ) -> Self { match variant { RX15M9_A :: _0 => false , RX15M9_A :: _1 => true } } } # [ doc = "Reader of field `RX15M9`" ] pub type RX15M9_R = crate :: R < bool , RX15M9_A > ; impl RX15M9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M9_A { match self . bits { false => RX15M9_A :: _0 , true => RX15M9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M9_A :: _1 } } # [ doc = "Write proxy for field `RX15M9`" ] pub struct RX15M9_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M10_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M10_A ) -> Self { match variant { RX15M10_A :: _0 => false , RX15M10_A :: _1 => true } } } # [ doc = "Reader of field `RX15M10`" ] pub type RX15M10_R = crate :: R < bool , RX15M10_A > ; impl RX15M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M10_A { match self . bits { false => RX15M10_A :: _0 , true => RX15M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M10_A :: _1 } } # [ doc = "Write proxy for field `RX15M10`" ] pub struct RX15M10_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M11_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M11_A ) -> Self { match variant { RX15M11_A :: _0 => false , RX15M11_A :: _1 => true } } } # [ doc = "Reader of field `RX15M11`" ] pub type RX15M11_R = crate :: R < bool , RX15M11_A > ; impl RX15M11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M11_A { match self . bits { false => RX15M11_A :: _0 , true => RX15M11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M11_A :: _1 } } # [ doc = "Write proxy for field `RX15M11`" ] pub struct RX15M11_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M12_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M12_A ) -> Self { match variant { RX15M12_A :: _0 => false , RX15M12_A :: _1 => true } } } # [ doc = "Reader of field `RX15M12`" ] pub type RX15M12_R = crate :: R < bool , RX15M12_A > ; impl RX15M12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M12_A { match self . bits { false => RX15M12_A :: _0 , true => RX15M12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M12_A :: _1 } } # [ doc = "Write proxy for field `RX15M12`" ] pub struct RX15M12_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M13_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M13_A ) -> Self { match variant { RX15M13_A :: _0 => false , RX15M13_A :: _1 => true } } } # [ doc = "Reader of field `RX15M13`" ] pub type RX15M13_R = crate :: R < bool , RX15M13_A > ; impl RX15M13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M13_A { match self . bits { false => RX15M13_A :: _0 , true => RX15M13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M13_A :: _1 } } # [ doc = "Write proxy for field `RX15M13`" ] pub struct RX15M13_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M13_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M14_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M14_A ) -> Self { match variant { RX15M14_A :: _0 => false , RX15M14_A :: _1 => true } } } # [ doc = "Reader of field `RX15M14`" ] pub type RX15M14_R = crate :: R < bool , RX15M14_A > ; impl RX15M14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M14_A { match self . bits { false => RX15M14_A :: _0 , true => RX15M14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M14_A :: _1 } } # [ doc = "Write proxy for field `RX15M14`" ] pub struct RX15M14_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M15_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M15_A ) -> Self { match variant { RX15M15_A :: _0 => false , RX15M15_A :: _1 => true } } } # [ doc = "Reader of field `RX15M15`" ] pub type RX15M15_R = crate :: R < bool , RX15M15_A > ; impl RX15M15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M15_A { match self . bits { false => RX15M15_A :: _0 , true => RX15M15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M15_A :: _1 } } # [ doc = "Write proxy for field `RX15M15`" ] pub struct RX15M15_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M16_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M16_A ) -> Self { match variant { RX15M16_A :: _0 => false , RX15M16_A :: _1 => true } } } # [ doc = "Reader of field `RX15M16`" ] pub type RX15M16_R = crate :: R < bool , RX15M16_A > ; impl RX15M16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M16_A { match self . bits { false => RX15M16_A :: _0 , true => RX15M16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M16_A :: _1 } } # [ doc = "Write proxy for field `RX15M16`" ] pub struct RX15M16_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M17_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M17_A ) -> Self { match variant { RX15M17_A :: _0 => false , RX15M17_A :: _1 => true } } } # [ doc = "Reader of field `RX15M17`" ] pub type RX15M17_R = crate :: R < bool , RX15M17_A > ; impl RX15M17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M17_A { match self . bits { false => RX15M17_A :: _0 , true => RX15M17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M17_A :: _1 } } # [ doc = "Write proxy for field `RX15M17`" ] pub struct RX15M17_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M18_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M18_A ) -> Self { match variant { RX15M18_A :: _0 => false , RX15M18_A :: _1 => true } } } # [ doc = "Reader of field `RX15M18`" ] pub type RX15M18_R = crate :: R < bool , RX15M18_A > ; impl RX15M18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M18_A { match self . bits { false => RX15M18_A :: _0 , true => RX15M18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M18_A :: _1 } } # [ doc = "Write proxy for field `RX15M18`" ] pub struct RX15M18_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M19_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M19_A ) -> Self { match variant { RX15M19_A :: _0 => false , RX15M19_A :: _1 => true } } } # [ doc = "Reader of field `RX15M19`" ] pub type RX15M19_R = crate :: R < bool , RX15M19_A > ; impl RX15M19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M19_A { match self . bits { false => RX15M19_A :: _0 , true => RX15M19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M19_A :: _1 } } # [ doc = "Write proxy for field `RX15M19`" ] pub struct RX15M19_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M20_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M20_A ) -> Self { match variant { RX15M20_A :: _0 => false , RX15M20_A :: _1 => true } } } # [ doc = "Reader of field `RX15M20`" ] pub type RX15M20_R = crate :: R < bool , RX15M20_A > ; impl RX15M20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M20_A { match self . bits { false => RX15M20_A :: _0 , true => RX15M20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M20_A :: _1 } } # [ doc = "Write proxy for field `RX15M20`" ] pub struct RX15M20_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M20_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M21_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M21_A ) -> Self { match variant { RX15M21_A :: _0 => false , RX15M21_A :: _1 => true } } } # [ doc = "Reader of field `RX15M21`" ] pub type RX15M21_R = crate :: R < bool , RX15M21_A > ; impl RX15M21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M21_A { match self . bits { false => RX15M21_A :: _0 , true => RX15M21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M21_A :: _1 } } # [ doc = "Write proxy for field `RX15M21`" ] pub struct RX15M21_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M21_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M22_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M22_A ) -> Self { match variant { RX15M22_A :: _0 => false , RX15M22_A :: _1 => true } } } # [ doc = "Reader of field `RX15M22`" ] pub type RX15M22_R = crate :: R < bool , RX15M22_A > ; impl RX15M22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M22_A { match self . bits { false => RX15M22_A :: _0 , true => RX15M22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M22_A :: _1 } } # [ doc = "Write proxy for field `RX15M22`" ] pub struct RX15M22_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M23_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M23_A ) -> Self { match variant { RX15M23_A :: _0 => false , RX15M23_A :: _1 => true } } } # [ doc = "Reader of field `RX15M23`" ] pub type RX15M23_R = crate :: R < bool , RX15M23_A > ; impl RX15M23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M23_A { match self . bits { false => RX15M23_A :: _0 , true => RX15M23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M23_A :: _1 } } # [ doc = "Write proxy for field `RX15M23`" ] pub struct RX15M23_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M24_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M24_A ) -> Self { match variant { RX15M24_A :: _0 => false , RX15M24_A :: _1 => true } } } # [ doc = "Reader of field `RX15M24`" ] pub type RX15M24_R = crate :: R < bool , RX15M24_A > ; impl RX15M24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M24_A { match self . bits { false => RX15M24_A :: _0 , true => RX15M24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M24_A :: _1 } } # [ doc = "Write proxy for field `RX15M24`" ] pub struct RX15M24_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M24_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M25_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M25_A ) -> Self { match variant { RX15M25_A :: _0 => false , RX15M25_A :: _1 => true } } } # [ doc = "Reader of field `RX15M25`" ] pub type RX15M25_R = crate :: R < bool , RX15M25_A > ; impl RX15M25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M25_A { match self . bits { false => RX15M25_A :: _0 , true => RX15M25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M25_A :: _1 } } # [ doc = "Write proxy for field `RX15M25`" ] pub struct RX15M25_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M25_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M26_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M26_A ) -> Self { match variant { RX15M26_A :: _0 => false , RX15M26_A :: _1 => true } } } # [ doc = "Reader of field `RX15M26`" ] pub type RX15M26_R = crate :: R < bool , RX15M26_A > ; impl RX15M26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M26_A { match self . bits { false => RX15M26_A :: _0 , true => RX15M26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M26_A :: _1 } } # [ doc = "Write proxy for field `RX15M26`" ] pub struct RX15M26_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M26_A :: _1 ) } # [ 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 = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M27_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M27_A ) -> Self { match variant { RX15M27_A :: _0 => false , RX15M27_A :: _1 => true } } } # [ doc = "Reader of field `RX15M27`" ] pub type RX15M27_R = crate :: R < bool , RX15M27_A > ; impl RX15M27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M27_A { match self . bits { false => RX15M27_A :: _0 , true => RX15M27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M27_A :: _1 } } # [ doc = "Write proxy for field `RX15M27`" ] pub struct RX15M27_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M28_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M28_A ) -> Self { match variant { RX15M28_A :: _0 => false , RX15M28_A :: _1 => true } } } # [ doc = "Reader of field `RX15M28`" ] pub type RX15M28_R = crate :: R < bool , RX15M28_A > ; impl RX15M28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M28_A { match self . bits { false => RX15M28_A :: _0 , true => RX15M28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M28_A :: _1 } } # [ doc = "Write proxy for field `RX15M28`" ] pub struct RX15M28_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M29_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M29_A ) -> Self { match variant { RX15M29_A :: _0 => false , RX15M29_A :: _1 => true } } } # [ doc = "Reader of field `RX15M29`" ] pub type RX15M29_R = crate :: R < bool , RX15M29_A > ; impl RX15M29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M29_A { match self . bits { false => RX15M29_A :: _0 , true => RX15M29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M29_A :: _1 } } # [ doc = "Write proxy for field `RX15M29`" ] pub struct RX15M29_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M30_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M30_A ) -> Self { match variant { RX15M30_A :: _0 => false , RX15M30_A :: _1 => true } } } # [ doc = "Reader of field `RX15M30`" ] pub type RX15M30_R = crate :: R < bool , RX15M30_A > ; impl RX15M30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M30_A { match self . bits { false => RX15M30_A :: _0 , true => RX15M30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M30_A :: _1 } } # [ doc = "Write proxy for field `RX15M30`" ] pub struct RX15M30_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Rx Buffer 15 Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX15M31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < RX15M31_A > for bool { # [ inline ( always ) ] fn from ( variant : RX15M31_A ) -> Self { match variant { RX15M31_A :: _0 => false , RX15M31_A :: _1 => true } } } # [ doc = "Reader of field `RX15M31`" ] pub type RX15M31_R = crate :: R < bool , RX15M31_A > ; impl RX15M31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX15M31_A { match self . bits { false => RX15M31_A :: _0 , true => RX15M31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX15M31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX15M31_A :: _1 } } # [ doc = "Write proxy for field `RX15M31`" ] pub struct RX15M31_W < 'a > { w : & 'a mut W , } impl < 'a > RX15M31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RX15M31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RX15M31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RX15M31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m0 ( & self ) -> RX15M0_R { RX15M0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m1 ( & self ) -> RX15M1_R { RX15M1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m2 ( & self ) -> RX15M2_R { RX15M2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m3 ( & self ) -> RX15M3_R { RX15M3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m4 ( & self ) -> RX15M4_R { RX15M4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m5 ( & self ) -> RX15M5_R { RX15M5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m6 ( & self ) -> RX15M6_R { RX15M6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m7 ( & self ) -> RX15M7_R { RX15M7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m8 ( & self ) -> RX15M8_R { RX15M8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m9 ( & self ) -> RX15M9_R { RX15M9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m10 ( & self ) -> RX15M10_R { RX15M10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m11 ( & self ) -> RX15M11_R { RX15M11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m12 ( & self ) -> RX15M12_R { RX15M12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m13 ( & self ) -> RX15M13_R { RX15M13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m14 ( & self ) -> RX15M14_R { RX15M14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m15 ( & self ) -> RX15M15_R { RX15M15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m16 ( & self ) -> RX15M16_R { RX15M16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m17 ( & self ) -> RX15M17_R { RX15M17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m18 ( & self ) -> RX15M18_R { RX15M18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m19 ( & self ) -> RX15M19_R { RX15M19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m20 ( & self ) -> RX15M20_R { RX15M20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m21 ( & self ) -> RX15M21_R { RX15M21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m22 ( & self ) -> RX15M22_R { RX15M22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m23 ( & self ) -> RX15M23_R { RX15M23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m24 ( & self ) -> RX15M24_R { RX15M24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m25 ( & self ) -> RX15M25_R { RX15M25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m26 ( & self ) -> RX15M26_R { RX15M26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m27 ( & self ) -> RX15M27_R { RX15M27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m28 ( & self ) -> RX15M28_R { RX15M28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m29 ( & self ) -> RX15M29_R { RX15M29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m30 ( & self ) -> RX15M30_R { RX15M30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m31 ( & self ) -> RX15M31_R { RX15M31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m0 ( & mut self ) -> RX15M0_W { RX15M0_W { w : self } } # [ doc = "Bit 1 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m1 ( & mut self ) -> RX15M1_W { RX15M1_W { w : self } } # [ doc = "Bit 2 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m2 ( & mut self ) -> RX15M2_W { RX15M2_W { w : self } } # [ doc = "Bit 3 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m3 ( & mut self ) -> RX15M3_W { RX15M3_W { w : self } } # [ doc = "Bit 4 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m4 ( & mut self ) -> RX15M4_W { RX15M4_W { w : self } } # [ doc = "Bit 5 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m5 ( & mut self ) -> RX15M5_W { RX15M5_W { w : self } } # [ doc = "Bit 6 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m6 ( & mut self ) -> RX15M6_W { RX15M6_W { w : self } } # [ doc = "Bit 7 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m7 ( & mut self ) -> RX15M7_W { RX15M7_W { w : self } } # [ doc = "Bit 8 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m8 ( & mut self ) -> RX15M8_W { RX15M8_W { w : self } } # [ doc = "Bit 9 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m9 ( & mut self ) -> RX15M9_W { RX15M9_W { w : self } } # [ doc = "Bit 10 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m10 ( & mut self ) -> RX15M10_W { RX15M10_W { w : self } } # [ doc = "Bit 11 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m11 ( & mut self ) -> RX15M11_W { RX15M11_W { w : self } } # [ doc = "Bit 12 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m12 ( & mut self ) -> RX15M12_W { RX15M12_W { w : self } } # [ doc = "Bit 13 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m13 ( & mut self ) -> RX15M13_W { RX15M13_W { w : self } } # [ doc = "Bit 14 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m14 ( & mut self ) -> RX15M14_W { RX15M14_W { w : self } } # [ doc = "Bit 15 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m15 ( & mut self ) -> RX15M15_W { RX15M15_W { w : self } } # [ doc = "Bit 16 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m16 ( & mut self ) -> RX15M16_W { RX15M16_W { w : self } } # [ doc = "Bit 17 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m17 ( & mut self ) -> RX15M17_W { RX15M17_W { w : self } } # [ doc = "Bit 18 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m18 ( & mut self ) -> RX15M18_W { RX15M18_W { w : self } } # [ doc = "Bit 19 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m19 ( & mut self ) -> RX15M19_W { RX15M19_W { w : self } } # [ doc = "Bit 20 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m20 ( & mut self ) -> RX15M20_W { RX15M20_W { w : self } } # [ doc = "Bit 21 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m21 ( & mut self ) -> RX15M21_W { RX15M21_W { w : self } } # [ doc = "Bit 22 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m22 ( & mut self ) -> RX15M22_W { RX15M22_W { w : self } } # [ doc = "Bit 23 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m23 ( & mut self ) -> RX15M23_W { RX15M23_W { w : self } } # [ doc = "Bit 24 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m24 ( & mut self ) -> RX15M24_W { RX15M24_W { w : self } } # [ doc = "Bit 25 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m25 ( & mut self ) -> RX15M25_W { RX15M25_W { w : self } } # [ doc = "Bit 26 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m26 ( & mut self ) -> RX15M26_W { RX15M26_W { w : self } } # [ doc = "Bit 27 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m27 ( & mut self ) -> RX15M27_W { RX15M27_W { w : self } } # [ doc = "Bit 28 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m28 ( & mut self ) -> RX15M28_W { RX15M28_W { w : self } } # [ doc = "Bit 29 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m29 ( & mut self ) -> RX15M29_W { RX15M29_W { w : self } } # [ doc = "Bit 30 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m30 ( & mut self ) -> RX15M30_W { RX15M30_W { w : self } } # [ doc = "Bit 31 - Rx Buffer 15 Mask Bits" ] # [ inline ( always ) ] pub fn rx15m31 ( & mut self ) -> RX15M31_W { RX15M31_W { w : self } } } } # [ doc = "Error Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ecr](ecr) module" ] pub type ECR = crate :: Reg < u32 , _ECR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ECR ; # [ doc = "`read()` method returns [ecr::R](ecr::R) reader structure" ] impl crate :: Readable for ECR { } # [ doc = "`write(|w| ..)` method takes [ecr::W](ecr::W) writer structure" ] impl crate :: Writable for ECR { } # [ doc = "Error Counter" ] pub mod ecr { # [ doc = "Reader of register ECR" ] pub type R = crate :: R < u32 , super :: ECR > ; # [ doc = "Writer for register ECR" ] pub type W = crate :: W < u32 , super :: ECR > ; # [ doc = "Register ECR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ECR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXERRCNT`" ] pub type TXERRCNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXERRCNT`" ] pub struct TXERRCNT_W < 'a > { w : & 'a mut W , } impl < 'a > TXERRCNT_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `RXERRCNT`" ] pub type RXERRCNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXERRCNT`" ] pub struct RXERRCNT_W < 'a > { w : & 'a mut W , } impl < 'a > RXERRCNT_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Transmit Error Counter" ] # [ inline ( always ) ] pub fn txerrcnt ( & self ) -> TXERRCNT_R { TXERRCNT_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Receive Error Counter" ] # [ inline ( always ) ] pub fn rxerrcnt ( & self ) -> RXERRCNT_R { RXERRCNT_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Transmit Error Counter" ] # [ inline ( always ) ] pub fn txerrcnt ( & mut self ) -> TXERRCNT_W { TXERRCNT_W { w : self } } # [ doc = "Bits 8:15 - Receive Error Counter" ] # [ inline ( always ) ] pub fn rxerrcnt ( & mut self ) -> RXERRCNT_W { RXERRCNT_W { w : self } } } } # [ doc = "Error and Status 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [esr1](esr1) module" ] pub type ESR1 = crate :: Reg < u32 , _ESR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ESR1 ; # [ doc = "`read()` method returns [esr1::R](esr1::R) reader structure" ] impl crate :: Readable for ESR1 { } # [ doc = "`write(|w| ..)` method takes [esr1::W](esr1::W) writer structure" ] impl crate :: Writable for ESR1 { } # [ doc = "Error and Status 1 register" ] pub mod esr1 { # [ doc = "Reader of register ESR1" ] pub type R = crate :: R < u32 , super :: ESR1 > ; # [ doc = "Writer for register ESR1" ] pub type W = crate :: W < u32 , super :: ESR1 > ; # [ doc = "Register ESR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ESR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wake-Up Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: Indicates a recessive to dominant transition was received on the CAN bus." ] _1 } impl From < WAKINT_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKINT_A ) -> Self { match variant { WAKINT_A :: _0 => false , WAKINT_A :: _1 => true } } } # [ doc = "Reader of field `WAKINT`" ] pub type WAKINT_R = crate :: R < bool , WAKINT_A > ; impl WAKINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKINT_A { match self . bits { false => WAKINT_A :: _0 , true => WAKINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKINT_A :: _1 } } # [ doc = "Write proxy for field `WAKINT`" ] pub struct WAKINT_W < 'a > { w : & 'a mut W , } impl < 'a > WAKINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKINT_A :: _0 ) } # [ doc = "Indicates a recessive to dominant transition was received on the CAN bus." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKINT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Error Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: Indicates setting of any Error Bit in the Error and Status Register." ] _1 } impl From < ERRINT_A > for bool { # [ inline ( always ) ] fn from ( variant : ERRINT_A ) -> Self { match variant { ERRINT_A :: _0 => false , ERRINT_A :: _1 => true } } } # [ doc = "Reader of field `ERRINT`" ] pub type ERRINT_R = crate :: R < bool , ERRINT_A > ; impl ERRINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERRINT_A { match self . bits { false => ERRINT_A :: _0 , true => ERRINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERRINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERRINT_A :: _1 } } # [ doc = "Write proxy for field `ERRINT`" ] pub struct ERRINT_W < 'a > { w : & 'a mut W , } impl < 'a > ERRINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERRINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERRINT_A :: _0 ) } # [ doc = "Indicates setting of any Error Bit in the Error and Status Register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERRINT_A :: _1 ) } # [ 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 } } # [ doc = "Bus Off Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOFFINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: FlexCAN module entered Bus Off state." ] _1 } impl From < BOFFINT_A > for bool { # [ inline ( always ) ] fn from ( variant : BOFFINT_A ) -> Self { match variant { BOFFINT_A :: _0 => false , BOFFINT_A :: _1 => true } } } # [ doc = "Reader of field `BOFFINT`" ] pub type BOFFINT_R = crate :: R < bool , BOFFINT_A > ; impl BOFFINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOFFINT_A { match self . bits { false => BOFFINT_A :: _0 , true => BOFFINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOFFINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOFFINT_A :: _1 } } # [ doc = "Write proxy for field `BOFFINT`" ] pub struct BOFFINT_W < 'a > { w : & 'a mut W , } impl < 'a > BOFFINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOFFINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOFFINT_A :: _0 ) } # [ doc = "FlexCAN module entered Bus Off state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOFFINT_A :: _1 ) } # [ 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 = "FlexCAN In Reception\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RX_A { # [ doc = "0: FlexCAN is not receiving a message." ] _0 , # [ doc = "1: FlexCAN is receiving a message." ] _1 } impl From < RX_A > for bool { # [ inline ( always ) ] fn from ( variant : RX_A ) -> Self { match variant { RX_A :: _0 => false , RX_A :: _1 => true } } } # [ doc = "Reader of field `RX`" ] pub type RX_R = crate :: R < bool , RX_A > ; impl RX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RX_A { match self . bits { false => RX_A :: _0 , true => RX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RX_A :: _1 } } # [ doc = "Fault Confinement State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLTCONF_A { # [ doc = "0: Error Active" ] _00 , # [ doc = "1: Error Passive" ] _01 } impl From < FLTCONF_A > for u8 { # [ inline ( always ) ] fn from ( variant : FLTCONF_A ) -> Self { match variant { FLTCONF_A :: _00 => 0 , FLTCONF_A :: _01 => 1 } } } # [ doc = "Reader of field `FLTCONF`" ] pub type FLTCONF_R = crate :: R < u8 , FLTCONF_A > ; impl FLTCONF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FLTCONF_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FLTCONF_A :: _00 ) , 1 => Val ( FLTCONF_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FLTCONF_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FLTCONF_A :: _01 } } # [ doc = "FlexCAN In Transmission\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TX_A { # [ doc = "0: FlexCAN is not transmitting a message." ] _0 , # [ doc = "1: FlexCAN is transmitting a message." ] _1 } impl From < TX_A > for bool { # [ inline ( always ) ] fn from ( variant : TX_A ) -> Self { match variant { TX_A :: _0 => false , TX_A :: _1 => true } } } # [ doc = "Reader of field `TX`" ] pub type TX_R = crate :: R < bool , TX_A > ; impl TX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TX_A { match self . bits { false => TX_A :: _0 , true => TX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TX_A :: _1 } } # [ doc = "This bit indicates when CAN bus is in IDLE state\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLE_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: CAN bus is now IDLE." ] _1 } impl From < IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLE_A ) -> Self { match variant { IDLE_A :: _0 => false , IDLE_A :: _1 => true } } } # [ doc = "Reader of field `IDLE`" ] pub type IDLE_R = crate :: R < bool , IDLE_A > ; impl IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLE_A { match self . bits { false => IDLE_A :: _0 , true => IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLE_A :: _1 } } # [ doc = "Rx Error Warning\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXWRN_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: RXERRCNT is greater than or equal to 96." ] _1 } impl From < RXWRN_A > for bool { # [ inline ( always ) ] fn from ( variant : RXWRN_A ) -> Self { match variant { RXWRN_A :: _0 => false , RXWRN_A :: _1 => true } } } # [ doc = "Reader of field `RXWRN`" ] pub type RXWRN_R = crate :: R < bool , RXWRN_A > ; impl RXWRN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXWRN_A { match self . bits { false => RXWRN_A :: _0 , true => RXWRN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXWRN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXWRN_A :: _1 } } # [ doc = "TX Error Warning\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXWRN_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: TXERRCNT is greater than or equal to 96." ] _1 } impl From < TXWRN_A > for bool { # [ inline ( always ) ] fn from ( variant : TXWRN_A ) -> Self { match variant { TXWRN_A :: _0 => false , TXWRN_A :: _1 => true } } } # [ doc = "Reader of field `TXWRN`" ] pub type TXWRN_R = crate :: R < bool , TXWRN_A > ; impl TXWRN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXWRN_A { match self . bits { false => TXWRN_A :: _0 , true => TXWRN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXWRN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXWRN_A :: _1 } } # [ doc = "Stuffing Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STFERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: A Stuffing Error occurred since last read of this register." ] _1 } impl From < STFERR_A > for bool { # [ inline ( always ) ] fn from ( variant : STFERR_A ) -> Self { match variant { STFERR_A :: _0 => false , STFERR_A :: _1 => true } } } # [ doc = "Reader of field `STFERR`" ] pub type STFERR_R = crate :: R < bool , STFERR_A > ; impl STFERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STFERR_A { match self . bits { false => STFERR_A :: _0 , true => STFERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STFERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STFERR_A :: _1 } } # [ doc = "Form Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRMERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: A Form Error occurred since last read of this register." ] _1 } impl From < FRMERR_A > for bool { # [ inline ( always ) ] fn from ( variant : FRMERR_A ) -> Self { match variant { FRMERR_A :: _0 => false , FRMERR_A :: _1 => true } } } # [ doc = "Reader of field `FRMERR`" ] pub type FRMERR_R = crate :: R < bool , FRMERR_A > ; impl FRMERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRMERR_A { match self . bits { false => FRMERR_A :: _0 , true => FRMERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRMERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRMERR_A :: _1 } } # [ doc = "Cyclic Redundancy Check Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: A CRC error occurred since last read of this register." ] _1 } impl From < CRCERR_A > for bool { # [ inline ( always ) ] fn from ( variant : CRCERR_A ) -> Self { match variant { CRCERR_A :: _0 => false , CRCERR_A :: _1 => true } } } # [ doc = "Reader of field `CRCERR`" ] pub type CRCERR_R = crate :: R < bool , CRCERR_A > ; impl CRCERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRCERR_A { match self . bits { false => CRCERR_A :: _0 , true => CRCERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRCERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRCERR_A :: _1 } } # [ doc = "Acknowledge Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACKERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: An ACK error occurred since last read of this register." ] _1 } impl From < ACKERR_A > for bool { # [ inline ( always ) ] fn from ( variant : ACKERR_A ) -> Self { match variant { ACKERR_A :: _0 => false , ACKERR_A :: _1 => true } } } # [ doc = "Reader of field `ACKERR`" ] pub type ACKERR_R = crate :: R < bool , ACKERR_A > ; impl ACKERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACKERR_A { match self . bits { false => ACKERR_A :: _0 , true => ACKERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACKERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACKERR_A :: _1 } } # [ doc = "Bit0 Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BIT0ERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: At least one bit sent as dominant is received as recessive." ] _1 } impl From < BIT0ERR_A > for bool { # [ inline ( always ) ] fn from ( variant : BIT0ERR_A ) -> Self { match variant { BIT0ERR_A :: _0 => false , BIT0ERR_A :: _1 => true } } } # [ doc = "Reader of field `BIT0ERR`" ] pub type BIT0ERR_R = crate :: R < bool , BIT0ERR_A > ; impl BIT0ERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BIT0ERR_A { match self . bits { false => BIT0ERR_A :: _0 , true => BIT0ERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BIT0ERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BIT0ERR_A :: _1 } } # [ doc = "Bit1 Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BIT1ERR_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: At least one bit sent as recessive is received as dominant." ] _1 } impl From < BIT1ERR_A > for bool { # [ inline ( always ) ] fn from ( variant : BIT1ERR_A ) -> Self { match variant { BIT1ERR_A :: _0 => false , BIT1ERR_A :: _1 => true } } } # [ doc = "Reader of field `BIT1ERR`" ] pub type BIT1ERR_R = crate :: R < bool , BIT1ERR_A > ; impl BIT1ERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BIT1ERR_A { match self . bits { false => BIT1ERR_A :: _0 , true => BIT1ERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BIT1ERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BIT1ERR_A :: _1 } } # [ doc = "Rx Warning Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWRNINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: The Rx error counter transitioned from less than 96 to greater than or equal to 96." ] _1 } impl From < RWRNINT_A > for bool { # [ inline ( always ) ] fn from ( variant : RWRNINT_A ) -> Self { match variant { RWRNINT_A :: _0 => false , RWRNINT_A :: _1 => true } } } # [ doc = "Reader of field `RWRNINT`" ] pub type RWRNINT_R = crate :: R < bool , RWRNINT_A > ; impl RWRNINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWRNINT_A { match self . bits { false => RWRNINT_A :: _0 , true => RWRNINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWRNINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWRNINT_A :: _1 } } # [ doc = "Write proxy for field `RWRNINT`" ] pub struct RWRNINT_W < 'a > { w : & 'a mut W , } impl < 'a > RWRNINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWRNINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWRNINT_A :: _0 ) } # [ doc = "The Rx error counter transitioned from less than 96 to greater than or equal to 96." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWRNINT_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Tx Warning Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWRNINT_A { # [ doc = "0: No such occurrence." ] _0 , # [ doc = "1: The Tx error counter transitioned from less than 96 to greater than or equal to 96." ] _1 } impl From < TWRNINT_A > for bool { # [ inline ( always ) ] fn from ( variant : TWRNINT_A ) -> Self { match variant { TWRNINT_A :: _0 => false , TWRNINT_A :: _1 => true } } } # [ doc = "Reader of field `TWRNINT`" ] pub type TWRNINT_R = crate :: R < bool , TWRNINT_A > ; impl TWRNINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWRNINT_A { match self . bits { false => TWRNINT_A :: _0 , true => TWRNINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWRNINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWRNINT_A :: _1 } } # [ doc = "Write proxy for field `TWRNINT`" ] pub struct TWRNINT_W < 'a > { w : & 'a mut W , } impl < 'a > TWRNINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWRNINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No such occurrence." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWRNINT_A :: _0 ) } # [ doc = "The Tx error counter transitioned from less than 96 to greater than or equal to 96." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWRNINT_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "CAN Synchronization Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCH_A { # [ doc = "0: FlexCAN is not synchronized to the CAN bus." ] _0 , # [ doc = "1: FlexCAN is synchronized to the CAN bus." ] _1 } impl From < SYNCH_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCH_A ) -> Self { match variant { SYNCH_A :: _0 => false , SYNCH_A :: _1 => true } } } # [ doc = "Reader of field `SYNCH`" ] pub type SYNCH_R = crate :: R < bool , SYNCH_A > ; impl SYNCH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCH_A { match self . bits { false => SYNCH_A :: _0 , true => SYNCH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCH_A :: _1 } } impl R { # [ doc = "Bit 0 - Wake-Up Interrupt" ] # [ inline ( always ) ] pub fn wakint ( & self ) -> WAKINT_R { WAKINT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Error Interrupt" ] # [ inline ( always ) ] pub fn errint ( & self ) -> ERRINT_R { ERRINT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Bus Off Interrupt" ] # [ inline ( always ) ] pub fn boffint ( & self ) -> BOFFINT_R { BOFFINT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - FlexCAN In Reception" ] # [ inline ( always ) ] pub fn rx ( & self ) -> RX_R { RX_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:5 - Fault Confinement State" ] # [ inline ( always ) ] pub fn fltconf ( & self ) -> FLTCONF_R { FLTCONF_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bit 6 - FlexCAN In Transmission" ] # [ inline ( always ) ] pub fn tx ( & self ) -> TX_R { TX_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - This bit indicates when CAN bus is in IDLE state" ] # [ inline ( always ) ] pub fn idle ( & self ) -> IDLE_R { IDLE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx Error Warning" ] # [ inline ( always ) ] pub fn rxwrn ( & self ) -> RXWRN_R { RXWRN_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - TX Error Warning" ] # [ inline ( always ) ] pub fn txwrn ( & self ) -> TXWRN_R { TXWRN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Stuffing Error" ] # [ inline ( always ) ] pub fn stferr ( & self ) -> STFERR_R { STFERR_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Form Error" ] # [ inline ( always ) ] pub fn frmerr ( & self ) -> FRMERR_R { FRMERR_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Cyclic Redundancy Check Error" ] # [ inline ( always ) ] pub fn crcerr ( & self ) -> CRCERR_R { CRCERR_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Acknowledge Error" ] # [ inline ( always ) ] pub fn ackerr ( & self ) -> ACKERR_R { ACKERR_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Bit0 Error" ] # [ inline ( always ) ] pub fn bit0err ( & self ) -> BIT0ERR_R { BIT0ERR_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Bit1 Error" ] # [ inline ( always ) ] pub fn bit1err ( & self ) -> BIT1ERR_R { BIT1ERR_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx Warning Interrupt Flag" ] # [ inline ( always ) ] pub fn rwrnint ( & self ) -> RWRNINT_R { RWRNINT_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Tx Warning Interrupt Flag" ] # [ inline ( always ) ] pub fn twrnint ( & self ) -> TWRNINT_R { TWRNINT_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - CAN Synchronization Status" ] # [ inline ( always ) ] pub fn synch ( & self ) -> SYNCH_R { SYNCH_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Wake-Up Interrupt" ] # [ inline ( always ) ] pub fn wakint ( & mut self ) -> WAKINT_W { WAKINT_W { w : self } } # [ doc = "Bit 1 - Error Interrupt" ] # [ inline ( always ) ] pub fn errint ( & mut self ) -> ERRINT_W { ERRINT_W { w : self } } # [ doc = "Bit 2 - Bus Off Interrupt" ] # [ inline ( always ) ] pub fn boffint ( & mut self ) -> BOFFINT_W { BOFFINT_W { w : self } } # [ doc = "Bit 16 - Rx Warning Interrupt Flag" ] # [ inline ( always ) ] pub fn rwrnint ( & mut self ) -> RWRNINT_W { RWRNINT_W { w : self } } # [ doc = "Bit 17 - Tx Warning Interrupt Flag" ] # [ inline ( always ) ] pub fn twrnint ( & mut self ) -> TWRNINT_W { TWRNINT_W { w : self } } } } # [ doc = "Interrupt Masks 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [imask1](imask1) module" ] pub type IMASK1 = crate :: Reg < u32 , _IMASK1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IMASK1 ; # [ doc = "`read()` method returns [imask1::R](imask1::R) reader structure" ] impl crate :: Readable for IMASK1 { } # [ doc = "`write(|w| ..)` method takes [imask1::W](imask1::W) writer structure" ] impl crate :: Writable for IMASK1 { } # [ doc = "Interrupt Masks 1 register" ] pub mod imask1 { # [ doc = "Reader of register IMASK1" ] pub type R = crate :: R < u32 , super :: IMASK1 > ; # [ doc = "Writer for register IMASK1" ] pub type W = crate :: W < u32 , super :: IMASK1 > ; # [ doc = "Register IMASK1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IMASK1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM0_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM0_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM0_A ) -> Self { match variant { BUFLM0_A :: _0 => false , BUFLM0_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM0`" ] pub type BUFLM0_R = crate :: R < bool , BUFLM0_A > ; impl BUFLM0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM0_A { match self . bits { false => BUFLM0_A :: _0 , true => BUFLM0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM0_A :: _1 } } # [ doc = "Write proxy for field `BUFLM0`" ] pub struct BUFLM0_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM0_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM1_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM1_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM1_A ) -> Self { match variant { BUFLM1_A :: _0 => false , BUFLM1_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM1`" ] pub type BUFLM1_R = crate :: R < bool , BUFLM1_A > ; impl BUFLM1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM1_A { match self . bits { false => BUFLM1_A :: _0 , true => BUFLM1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM1_A :: _1 } } # [ doc = "Write proxy for field `BUFLM1`" ] pub struct BUFLM1_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM1_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM1_A :: _1 ) } # [ 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 } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM2_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM2_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM2_A ) -> Self { match variant { BUFLM2_A :: _0 => false , BUFLM2_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM2`" ] pub type BUFLM2_R = crate :: R < bool , BUFLM2_A > ; impl BUFLM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM2_A { match self . bits { false => BUFLM2_A :: _0 , true => BUFLM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM2_A :: _1 } } # [ doc = "Write proxy for field `BUFLM2`" ] pub struct BUFLM2_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM2_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM2_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM3_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM3_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM3_A ) -> Self { match variant { BUFLM3_A :: _0 => false , BUFLM3_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM3`" ] pub type BUFLM3_R = crate :: R < bool , BUFLM3_A > ; impl BUFLM3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM3_A { match self . bits { false => BUFLM3_A :: _0 , true => BUFLM3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM3_A :: _1 } } # [ doc = "Write proxy for field `BUFLM3`" ] pub struct BUFLM3_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM3_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM4_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM4_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM4_A ) -> Self { match variant { BUFLM4_A :: _0 => false , BUFLM4_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM4`" ] pub type BUFLM4_R = crate :: R < bool , BUFLM4_A > ; impl BUFLM4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM4_A { match self . bits { false => BUFLM4_A :: _0 , true => BUFLM4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM4_A :: _1 } } # [ doc = "Write proxy for field `BUFLM4`" ] pub struct BUFLM4_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM4_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM5_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM5_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM5_A ) -> Self { match variant { BUFLM5_A :: _0 => false , BUFLM5_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM5`" ] pub type BUFLM5_R = crate :: R < bool , BUFLM5_A > ; impl BUFLM5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM5_A { match self . bits { false => BUFLM5_A :: _0 , true => BUFLM5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM5_A :: _1 } } # [ doc = "Write proxy for field `BUFLM5`" ] pub struct BUFLM5_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM5_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM5_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM6_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM6_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM6_A ) -> Self { match variant { BUFLM6_A :: _0 => false , BUFLM6_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM6`" ] pub type BUFLM6_R = crate :: R < bool , BUFLM6_A > ; impl BUFLM6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM6_A { match self . bits { false => BUFLM6_A :: _0 , true => BUFLM6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM6_A :: _1 } } # [ doc = "Write proxy for field `BUFLM6`" ] pub struct BUFLM6_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM6_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM6_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM7_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM7_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM7_A ) -> Self { match variant { BUFLM7_A :: _0 => false , BUFLM7_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM7`" ] pub type BUFLM7_R = crate :: R < bool , BUFLM7_A > ; impl BUFLM7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM7_A { match self . bits { false => BUFLM7_A :: _0 , true => BUFLM7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM7_A :: _1 } } # [ doc = "Write proxy for field `BUFLM7`" ] pub struct BUFLM7_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM7_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM7_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM8_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM8_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM8_A ) -> Self { match variant { BUFLM8_A :: _0 => false , BUFLM8_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM8`" ] pub type BUFLM8_R = crate :: R < bool , BUFLM8_A > ; impl BUFLM8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM8_A { match self . bits { false => BUFLM8_A :: _0 , true => BUFLM8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM8_A :: _1 } } # [ doc = "Write proxy for field `BUFLM8`" ] pub struct BUFLM8_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM8_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM9_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM9_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM9_A ) -> Self { match variant { BUFLM9_A :: _0 => false , BUFLM9_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM9`" ] pub type BUFLM9_R = crate :: R < bool , BUFLM9_A > ; impl BUFLM9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM9_A { match self . bits { false => BUFLM9_A :: _0 , true => BUFLM9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM9_A :: _1 } } # [ doc = "Write proxy for field `BUFLM9`" ] pub struct BUFLM9_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM9_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM10_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM10_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM10_A ) -> Self { match variant { BUFLM10_A :: _0 => false , BUFLM10_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM10`" ] pub type BUFLM10_R = crate :: R < bool , BUFLM10_A > ; impl BUFLM10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM10_A { match self . bits { false => BUFLM10_A :: _0 , true => BUFLM10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM10_A :: _1 } } # [ doc = "Write proxy for field `BUFLM10`" ] pub struct BUFLM10_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM10_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM11_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM11_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM11_A ) -> Self { match variant { BUFLM11_A :: _0 => false , BUFLM11_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM11`" ] pub type BUFLM11_R = crate :: R < bool , BUFLM11_A > ; impl BUFLM11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM11_A { match self . bits { false => BUFLM11_A :: _0 , true => BUFLM11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM11_A :: _1 } } # [ doc = "Write proxy for field `BUFLM11`" ] pub struct BUFLM11_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM11_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM12_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM12_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM12_A ) -> Self { match variant { BUFLM12_A :: _0 => false , BUFLM12_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM12`" ] pub type BUFLM12_R = crate :: R < bool , BUFLM12_A > ; impl BUFLM12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM12_A { match self . bits { false => BUFLM12_A :: _0 , true => BUFLM12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM12_A :: _1 } } # [ doc = "Write proxy for field `BUFLM12`" ] pub struct BUFLM12_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM12_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM13_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM13_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM13_A ) -> Self { match variant { BUFLM13_A :: _0 => false , BUFLM13_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM13`" ] pub type BUFLM13_R = crate :: R < bool , BUFLM13_A > ; impl BUFLM13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM13_A { match self . bits { false => BUFLM13_A :: _0 , true => BUFLM13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM13_A :: _1 } } # [ doc = "Write proxy for field `BUFLM13`" ] pub struct BUFLM13_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM13_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM13_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM14_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM14_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM14_A ) -> Self { match variant { BUFLM14_A :: _0 => false , BUFLM14_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM14`" ] pub type BUFLM14_R = crate :: R < bool , BUFLM14_A > ; impl BUFLM14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM14_A { match self . bits { false => BUFLM14_A :: _0 , true => BUFLM14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM14_A :: _1 } } # [ doc = "Write proxy for field `BUFLM14`" ] pub struct BUFLM14_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM14_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM15_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM15_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM15_A ) -> Self { match variant { BUFLM15_A :: _0 => false , BUFLM15_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM15`" ] pub type BUFLM15_R = crate :: R < bool , BUFLM15_A > ; impl BUFLM15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM15_A { match self . bits { false => BUFLM15_A :: _0 , true => BUFLM15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM15_A :: _1 } } # [ doc = "Write proxy for field `BUFLM15`" ] pub struct BUFLM15_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM15_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM16_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM16_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM16_A ) -> Self { match variant { BUFLM16_A :: _0 => false , BUFLM16_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM16`" ] pub type BUFLM16_R = crate :: R < bool , BUFLM16_A > ; impl BUFLM16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM16_A { match self . bits { false => BUFLM16_A :: _0 , true => BUFLM16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM16_A :: _1 } } # [ doc = "Write proxy for field `BUFLM16`" ] pub struct BUFLM16_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM16_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM17_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM17_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM17_A ) -> Self { match variant { BUFLM17_A :: _0 => false , BUFLM17_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM17`" ] pub type BUFLM17_R = crate :: R < bool , BUFLM17_A > ; impl BUFLM17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM17_A { match self . bits { false => BUFLM17_A :: _0 , true => BUFLM17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM17_A :: _1 } } # [ doc = "Write proxy for field `BUFLM17`" ] pub struct BUFLM17_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM17_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM18_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM18_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM18_A ) -> Self { match variant { BUFLM18_A :: _0 => false , BUFLM18_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM18`" ] pub type BUFLM18_R = crate :: R < bool , BUFLM18_A > ; impl BUFLM18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM18_A { match self . bits { false => BUFLM18_A :: _0 , true => BUFLM18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM18_A :: _1 } } # [ doc = "Write proxy for field `BUFLM18`" ] pub struct BUFLM18_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM18_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM19_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM19_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM19_A ) -> Self { match variant { BUFLM19_A :: _0 => false , BUFLM19_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM19`" ] pub type BUFLM19_R = crate :: R < bool , BUFLM19_A > ; impl BUFLM19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM19_A { match self . bits { false => BUFLM19_A :: _0 , true => BUFLM19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM19_A :: _1 } } # [ doc = "Write proxy for field `BUFLM19`" ] pub struct BUFLM19_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM19_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM20_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM20_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM20_A ) -> Self { match variant { BUFLM20_A :: _0 => false , BUFLM20_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM20`" ] pub type BUFLM20_R = crate :: R < bool , BUFLM20_A > ; impl BUFLM20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM20_A { match self . bits { false => BUFLM20_A :: _0 , true => BUFLM20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM20_A :: _1 } } # [ doc = "Write proxy for field `BUFLM20`" ] pub struct BUFLM20_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM20_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM20_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM21_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM21_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM21_A ) -> Self { match variant { BUFLM21_A :: _0 => false , BUFLM21_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM21`" ] pub type BUFLM21_R = crate :: R < bool , BUFLM21_A > ; impl BUFLM21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM21_A { match self . bits { false => BUFLM21_A :: _0 , true => BUFLM21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM21_A :: _1 } } # [ doc = "Write proxy for field `BUFLM21`" ] pub struct BUFLM21_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM21_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM21_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM22_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM22_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM22_A ) -> Self { match variant { BUFLM22_A :: _0 => false , BUFLM22_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM22`" ] pub type BUFLM22_R = crate :: R < bool , BUFLM22_A > ; impl BUFLM22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM22_A { match self . bits { false => BUFLM22_A :: _0 , true => BUFLM22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM22_A :: _1 } } # [ doc = "Write proxy for field `BUFLM22`" ] pub struct BUFLM22_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM22_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM23_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM23_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM23_A ) -> Self { match variant { BUFLM23_A :: _0 => false , BUFLM23_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM23`" ] pub type BUFLM23_R = crate :: R < bool , BUFLM23_A > ; impl BUFLM23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM23_A { match self . bits { false => BUFLM23_A :: _0 , true => BUFLM23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM23_A :: _1 } } # [ doc = "Write proxy for field `BUFLM23`" ] pub struct BUFLM23_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM23_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM24_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM24_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM24_A ) -> Self { match variant { BUFLM24_A :: _0 => false , BUFLM24_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM24`" ] pub type BUFLM24_R = crate :: R < bool , BUFLM24_A > ; impl BUFLM24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM24_A { match self . bits { false => BUFLM24_A :: _0 , true => BUFLM24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM24_A :: _1 } } # [ doc = "Write proxy for field `BUFLM24`" ] pub struct BUFLM24_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM24_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM24_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM25_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM25_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM25_A ) -> Self { match variant { BUFLM25_A :: _0 => false , BUFLM25_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM25`" ] pub type BUFLM25_R = crate :: R < bool , BUFLM25_A > ; impl BUFLM25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM25_A { match self . bits { false => BUFLM25_A :: _0 , true => BUFLM25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM25_A :: _1 } } # [ doc = "Write proxy for field `BUFLM25`" ] pub struct BUFLM25_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM25_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM25_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM26_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM26_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM26_A ) -> Self { match variant { BUFLM26_A :: _0 => false , BUFLM26_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM26`" ] pub type BUFLM26_R = crate :: R < bool , BUFLM26_A > ; impl BUFLM26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM26_A { match self . bits { false => BUFLM26_A :: _0 , true => BUFLM26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM26_A :: _1 } } # [ doc = "Write proxy for field `BUFLM26`" ] pub struct BUFLM26_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM26_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM26_A :: _1 ) } # [ 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 = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM27_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM27_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM27_A ) -> Self { match variant { BUFLM27_A :: _0 => false , BUFLM27_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM27`" ] pub type BUFLM27_R = crate :: R < bool , BUFLM27_A > ; impl BUFLM27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM27_A { match self . bits { false => BUFLM27_A :: _0 , true => BUFLM27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM27_A :: _1 } } # [ doc = "Write proxy for field `BUFLM27`" ] pub struct BUFLM27_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM27_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM28_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM28_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM28_A ) -> Self { match variant { BUFLM28_A :: _0 => false , BUFLM28_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM28`" ] pub type BUFLM28_R = crate :: R < bool , BUFLM28_A > ; impl BUFLM28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM28_A { match self . bits { false => BUFLM28_A :: _0 , true => BUFLM28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM28_A :: _1 } } # [ doc = "Write proxy for field `BUFLM28`" ] pub struct BUFLM28_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM28_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM29_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM29_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM29_A ) -> Self { match variant { BUFLM29_A :: _0 => false , BUFLM29_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM29`" ] pub type BUFLM29_R = crate :: R < bool , BUFLM29_A > ; impl BUFLM29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM29_A { match self . bits { false => BUFLM29_A :: _0 , true => BUFLM29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM29_A :: _1 } } # [ doc = "Write proxy for field `BUFLM29`" ] pub struct BUFLM29_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM29_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM30_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM30_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM30_A ) -> Self { match variant { BUFLM30_A :: _0 => false , BUFLM30_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM30`" ] pub type BUFLM30_R = crate :: R < bool , BUFLM30_A > ; impl BUFLM30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM30_A { match self . bits { false => BUFLM30_A :: _0 , true => BUFLM30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM30_A :: _1 } } # [ doc = "Write proxy for field `BUFLM30`" ] pub struct BUFLM30_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM30_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Buffer MB i Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUFLM31_A { # [ doc = "0: The corresponding buffer Interrupt is disabled." ] _0 , # [ doc = "1: The corresponding buffer Interrupt is enabled." ] _1 } impl From < BUFLM31_A > for bool { # [ inline ( always ) ] fn from ( variant : BUFLM31_A ) -> Self { match variant { BUFLM31_A :: _0 => false , BUFLM31_A :: _1 => true } } } # [ doc = "Reader of field `BUFLM31`" ] pub type BUFLM31_R = crate :: R < bool , BUFLM31_A > ; impl BUFLM31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUFLM31_A { match self . bits { false => BUFLM31_A :: _0 , true => BUFLM31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUFLM31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUFLM31_A :: _1 } } # [ doc = "Write proxy for field `BUFLM31`" ] pub struct BUFLM31_W < 'a > { w : & 'a mut W , } impl < 'a > BUFLM31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUFLM31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUFLM31_A :: _0 ) } # [ doc = "The corresponding buffer Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUFLM31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm0 ( & self ) -> BUFLM0_R { BUFLM0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm1 ( & self ) -> BUFLM1_R { BUFLM1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm2 ( & self ) -> BUFLM2_R { BUFLM2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm3 ( & self ) -> BUFLM3_R { BUFLM3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm4 ( & self ) -> BUFLM4_R { BUFLM4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm5 ( & self ) -> BUFLM5_R { BUFLM5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm6 ( & self ) -> BUFLM6_R { BUFLM6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm7 ( & self ) -> BUFLM7_R { BUFLM7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm8 ( & self ) -> BUFLM8_R { BUFLM8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm9 ( & self ) -> BUFLM9_R { BUFLM9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm10 ( & self ) -> BUFLM10_R { BUFLM10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm11 ( & self ) -> BUFLM11_R { BUFLM11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm12 ( & self ) -> BUFLM12_R { BUFLM12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm13 ( & self ) -> BUFLM13_R { BUFLM13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm14 ( & self ) -> BUFLM14_R { BUFLM14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm15 ( & self ) -> BUFLM15_R { BUFLM15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm16 ( & self ) -> BUFLM16_R { BUFLM16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm17 ( & self ) -> BUFLM17_R { BUFLM17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm18 ( & self ) -> BUFLM18_R { BUFLM18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm19 ( & self ) -> BUFLM19_R { BUFLM19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm20 ( & self ) -> BUFLM20_R { BUFLM20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm21 ( & self ) -> BUFLM21_R { BUFLM21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm22 ( & self ) -> BUFLM22_R { BUFLM22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm23 ( & self ) -> BUFLM23_R { BUFLM23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm24 ( & self ) -> BUFLM24_R { BUFLM24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm25 ( & self ) -> BUFLM25_R { BUFLM25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm26 ( & self ) -> BUFLM26_R { BUFLM26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm27 ( & self ) -> BUFLM27_R { BUFLM27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm28 ( & self ) -> BUFLM28_R { BUFLM28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm29 ( & self ) -> BUFLM29_R { BUFLM29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm30 ( & self ) -> BUFLM30_R { BUFLM30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm31 ( & self ) -> BUFLM31_R { BUFLM31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm0 ( & mut self ) -> BUFLM0_W { BUFLM0_W { w : self } } # [ doc = "Bit 1 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm1 ( & mut self ) -> BUFLM1_W { BUFLM1_W { w : self } } # [ doc = "Bit 2 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm2 ( & mut self ) -> BUFLM2_W { BUFLM2_W { w : self } } # [ doc = "Bit 3 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm3 ( & mut self ) -> BUFLM3_W { BUFLM3_W { w : self } } # [ doc = "Bit 4 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm4 ( & mut self ) -> BUFLM4_W { BUFLM4_W { w : self } } # [ doc = "Bit 5 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm5 ( & mut self ) -> BUFLM5_W { BUFLM5_W { w : self } } # [ doc = "Bit 6 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm6 ( & mut self ) -> BUFLM6_W { BUFLM6_W { w : self } } # [ doc = "Bit 7 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm7 ( & mut self ) -> BUFLM7_W { BUFLM7_W { w : self } } # [ doc = "Bit 8 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm8 ( & mut self ) -> BUFLM8_W { BUFLM8_W { w : self } } # [ doc = "Bit 9 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm9 ( & mut self ) -> BUFLM9_W { BUFLM9_W { w : self } } # [ doc = "Bit 10 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm10 ( & mut self ) -> BUFLM10_W { BUFLM10_W { w : self } } # [ doc = "Bit 11 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm11 ( & mut self ) -> BUFLM11_W { BUFLM11_W { w : self } } # [ doc = "Bit 12 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm12 ( & mut self ) -> BUFLM12_W { BUFLM12_W { w : self } } # [ doc = "Bit 13 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm13 ( & mut self ) -> BUFLM13_W { BUFLM13_W { w : self } } # [ doc = "Bit 14 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm14 ( & mut self ) -> BUFLM14_W { BUFLM14_W { w : self } } # [ doc = "Bit 15 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm15 ( & mut self ) -> BUFLM15_W { BUFLM15_W { w : self } } # [ doc = "Bit 16 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm16 ( & mut self ) -> BUFLM16_W { BUFLM16_W { w : self } } # [ doc = "Bit 17 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm17 ( & mut self ) -> BUFLM17_W { BUFLM17_W { w : self } } # [ doc = "Bit 18 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm18 ( & mut self ) -> BUFLM18_W { BUFLM18_W { w : self } } # [ doc = "Bit 19 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm19 ( & mut self ) -> BUFLM19_W { BUFLM19_W { w : self } } # [ doc = "Bit 20 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm20 ( & mut self ) -> BUFLM20_W { BUFLM20_W { w : self } } # [ doc = "Bit 21 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm21 ( & mut self ) -> BUFLM21_W { BUFLM21_W { w : self } } # [ doc = "Bit 22 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm22 ( & mut self ) -> BUFLM22_W { BUFLM22_W { w : self } } # [ doc = "Bit 23 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm23 ( & mut self ) -> BUFLM23_W { BUFLM23_W { w : self } } # [ doc = "Bit 24 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm24 ( & mut self ) -> BUFLM24_W { BUFLM24_W { w : self } } # [ doc = "Bit 25 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm25 ( & mut self ) -> BUFLM25_W { BUFLM25_W { w : self } } # [ doc = "Bit 26 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm26 ( & mut self ) -> BUFLM26_W { BUFLM26_W { w : self } } # [ doc = "Bit 27 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm27 ( & mut self ) -> BUFLM27_W { BUFLM27_W { w : self } } # [ doc = "Bit 28 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm28 ( & mut self ) -> BUFLM28_W { BUFLM28_W { w : self } } # [ doc = "Bit 29 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm29 ( & mut self ) -> BUFLM29_W { BUFLM29_W { w : self } } # [ doc = "Bit 30 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm30 ( & mut self ) -> BUFLM30_W { BUFLM30_W { w : self } } # [ doc = "Bit 31 - Buffer MB i Mask" ] # [ inline ( always ) ] pub fn buflm31 ( & mut self ) -> BUFLM31_W { BUFLM31_W { w : self } } } } # [ doc = "Interrupt Flags 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [iflag1](iflag1) module" ] pub type IFLAG1 = crate :: Reg < u32 , _IFLAG1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IFLAG1 ; # [ doc = "`read()` method returns [iflag1::R](iflag1::R) reader structure" ] impl crate :: Readable for IFLAG1 { } # [ doc = "`write(|w| ..)` method takes [iflag1::W](iflag1::W) writer structure" ] impl crate :: Writable for IFLAG1 { } # [ doc = "Interrupt Flags 1 register" ] pub mod iflag1 { # [ doc = "Reader of register IFLAG1" ] pub type R = crate :: R < u32 , super :: IFLAG1 > ; # [ doc = "Writer for register IFLAG1" ] pub type W = crate :: W < u32 , super :: IFLAG1 > ; # [ doc = "Register IFLAG1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IFLAG1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Buffer MB0 Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF0I_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF0I_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF0I_A ) -> Self { match variant { BUF0I_A :: _0 => false , BUF0I_A :: _1 => true } } } # [ doc = "Reader of field `BUF0I`" ] pub type BUF0I_R = crate :: R < bool , BUF0I_A > ; impl BUF0I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF0I_A { match self . bits { false => BUF0I_A :: _0 , true => BUF0I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF0I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF0I_A :: _1 } } # [ doc = "Write proxy for field `BUF0I`" ] pub struct BUF0I_W < 'a > { w : & 'a mut W , } impl < 'a > BUF0I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF0I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF0I_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF0I_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Buffer MB i Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF4TO1I0_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF4TO1I0_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF4TO1I0_A ) -> Self { match variant { BUF4TO1I0_A :: _0 => false , BUF4TO1I0_A :: _1 => true } } } # [ doc = "Reader of field `BUF4TO1I0`" ] pub type BUF4TO1I0_R = crate :: R < bool , BUF4TO1I0_A > ; impl BUF4TO1I0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF4TO1I0_A { match self . bits { false => BUF4TO1I0_A :: _0 , true => BUF4TO1I0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF4TO1I0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF4TO1I0_A :: _1 } } # [ doc = "Write proxy for field `BUF4TO1I0`" ] pub struct BUF4TO1I0_W < 'a > { w : & 'a mut W , } impl < 'a > BUF4TO1I0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF4TO1I0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I0_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I0_A :: _1 ) } # [ 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 } } # [ doc = "Buffer MB i Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF4TO1I1_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF4TO1I1_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF4TO1I1_A ) -> Self { match variant { BUF4TO1I1_A :: _0 => false , BUF4TO1I1_A :: _1 => true } } } # [ doc = "Reader of field `BUF4TO1I1`" ] pub type BUF4TO1I1_R = crate :: R < bool , BUF4TO1I1_A > ; impl BUF4TO1I1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF4TO1I1_A { match self . bits { false => BUF4TO1I1_A :: _0 , true => BUF4TO1I1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF4TO1I1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF4TO1I1_A :: _1 } } # [ doc = "Write proxy for field `BUF4TO1I1`" ] pub struct BUF4TO1I1_W < 'a > { w : & 'a mut W , } impl < 'a > BUF4TO1I1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF4TO1I1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I1_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I1_A :: _1 ) } # [ 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 = "Buffer MB i Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF4TO1I2_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF4TO1I2_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF4TO1I2_A ) -> Self { match variant { BUF4TO1I2_A :: _0 => false , BUF4TO1I2_A :: _1 => true } } } # [ doc = "Reader of field `BUF4TO1I2`" ] pub type BUF4TO1I2_R = crate :: R < bool , BUF4TO1I2_A > ; impl BUF4TO1I2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF4TO1I2_A { match self . bits { false => BUF4TO1I2_A :: _0 , true => BUF4TO1I2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF4TO1I2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF4TO1I2_A :: _1 } } # [ doc = "Write proxy for field `BUF4TO1I2`" ] pub struct BUF4TO1I2_W < 'a > { w : & 'a mut W , } impl < 'a > BUF4TO1I2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF4TO1I2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I2_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I2_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Buffer MB i Interrupt Or \"reserved\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF4TO1I3_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] _1 } impl From < BUF4TO1I3_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF4TO1I3_A ) -> Self { match variant { BUF4TO1I3_A :: _0 => false , BUF4TO1I3_A :: _1 => true } } } # [ doc = "Reader of field `BUF4TO1I3`" ] pub type BUF4TO1I3_R = crate :: R < bool , BUF4TO1I3_A > ; impl BUF4TO1I3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF4TO1I3_A { match self . bits { false => BUF4TO1I3_A :: _0 , true => BUF4TO1I3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF4TO1I3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF4TO1I3_A :: _1 } } # [ doc = "Write proxy for field `BUF4TO1I3`" ] pub struct BUF4TO1I3_W < 'a > { w : & 'a mut W , } impl < 'a > BUF4TO1I3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF4TO1I3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I3_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception when MCR\\[RFEN\\]=0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF4TO1I3_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Buffer MB5 Interrupt Or \"Frames available in Rx FIFO\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF5I_A { # [ doc = "0: No occurrence of MB5 completing transmission/reception when MCR\\[RFEN\\]=0, or of frame(s) available in the FIFO, when MCR\\[RFEN\\]=1" ] _0 , # [ doc = "1: MB5 completed transmission/reception when MCR\\[RFEN\\]=0, or frame(s) available in the Rx FIFO when MCR\\[RFEN\\]=1" ] _1 } impl From < BUF5I_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF5I_A ) -> Self { match variant { BUF5I_A :: _0 => false , BUF5I_A :: _1 => true } } } # [ doc = "Reader of field `BUF5I`" ] pub type BUF5I_R = crate :: R < bool , BUF5I_A > ; impl BUF5I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF5I_A { match self . bits { false => BUF5I_A :: _0 , true => BUF5I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF5I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF5I_A :: _1 } } # [ doc = "Write proxy for field `BUF5I`" ] pub struct BUF5I_W < 'a > { w : & 'a mut W , } impl < 'a > BUF5I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF5I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No occurrence of MB5 completing transmission/reception when MCR\\[RFEN\\]=0, or of frame(s) available in the FIFO, when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF5I_A :: _0 ) } # [ doc = "MB5 completed transmission/reception when MCR\\[RFEN\\]=0, or frame(s) available in the Rx FIFO when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF5I_A :: _1 ) } # [ 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 = "Buffer MB6 Interrupt Or \"Rx FIFO Warning\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF6I_A { # [ doc = "0: No occurrence of MB6 completing transmission/reception when MCR\\[RFEN\\]=0, or of Rx FIFO almost full when MCR\\[RFEN\\]=1" ] _0 , # [ doc = "1: MB6 completed transmission/reception when MCR\\[RFEN\\]=0, or Rx FIFO almost full when MCR\\[RFEN\\]=1" ] _1 } impl From < BUF6I_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF6I_A ) -> Self { match variant { BUF6I_A :: _0 => false , BUF6I_A :: _1 => true } } } # [ doc = "Reader of field `BUF6I`" ] pub type BUF6I_R = crate :: R < bool , BUF6I_A > ; impl BUF6I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF6I_A { match self . bits { false => BUF6I_A :: _0 , true => BUF6I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF6I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF6I_A :: _1 } } # [ doc = "Write proxy for field `BUF6I`" ] pub struct BUF6I_W < 'a > { w : & 'a mut W , } impl < 'a > BUF6I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF6I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No occurrence of MB6 completing transmission/reception when MCR\\[RFEN\\]=0, or of Rx FIFO almost full when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF6I_A :: _0 ) } # [ doc = "MB6 completed transmission/reception when MCR\\[RFEN\\]=0, or Rx FIFO almost full when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF6I_A :: _1 ) } # [ 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 = "Buffer MB7 Interrupt Or \"Rx FIFO Overflow\"\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF7I_A { # [ doc = "0: No occurrence of MB7 completing transmission/reception when MCR\\[RFEN\\]=0, or of Rx FIFO overflow when MCR\\[RFEN\\]=1" ] _0 , # [ doc = "1: MB7 completed transmission/reception when MCR\\[RFEN\\]=0, or Rx FIFO overflow when MCR\\[RFEN\\]=1" ] _1 } impl From < BUF7I_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF7I_A ) -> Self { match variant { BUF7I_A :: _0 => false , BUF7I_A :: _1 => true } } } # [ doc = "Reader of field `BUF7I`" ] pub type BUF7I_R = crate :: R < bool , BUF7I_A > ; impl BUF7I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF7I_A { match self . bits { false => BUF7I_A :: _0 , true => BUF7I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF7I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF7I_A :: _1 } } # [ doc = "Write proxy for field `BUF7I`" ] pub struct BUF7I_W < 'a > { w : & 'a mut W , } impl < 'a > BUF7I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF7I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No occurrence of MB7 completing transmission/reception when MCR\\[RFEN\\]=0, or of Rx FIFO overflow when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF7I_A :: _0 ) } # [ doc = "MB7 completed transmission/reception when MCR\\[RFEN\\]=0, or Rx FIFO overflow when MCR\\[RFEN\\]=1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF7I_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I0_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I0_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I0_A ) -> Self { match variant { BUF31TO8I0_A :: _0 => false , BUF31TO8I0_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I0`" ] pub type BUF31TO8I0_R = crate :: R < bool , BUF31TO8I0_A > ; impl BUF31TO8I0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I0_A { match self . bits { false => BUF31TO8I0_A :: _0 , true => BUF31TO8I0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I0_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I0`" ] pub struct BUF31TO8I0_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I0_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I0_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I1_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I1_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I1_A ) -> Self { match variant { BUF31TO8I1_A :: _0 => false , BUF31TO8I1_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I1`" ] pub type BUF31TO8I1_R = crate :: R < bool , BUF31TO8I1_A > ; impl BUF31TO8I1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I1_A { match self . bits { false => BUF31TO8I1_A :: _0 , true => BUF31TO8I1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I1_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I1`" ] pub struct BUF31TO8I1_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I1_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I1_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I2_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I2_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I2_A ) -> Self { match variant { BUF31TO8I2_A :: _0 => false , BUF31TO8I2_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I2`" ] pub type BUF31TO8I2_R = crate :: R < bool , BUF31TO8I2_A > ; impl BUF31TO8I2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I2_A { match self . bits { false => BUF31TO8I2_A :: _0 , true => BUF31TO8I2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I2_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I2`" ] pub struct BUF31TO8I2_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I2_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I2_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I3_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I3_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I3_A ) -> Self { match variant { BUF31TO8I3_A :: _0 => false , BUF31TO8I3_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I3`" ] pub type BUF31TO8I3_R = crate :: R < bool , BUF31TO8I3_A > ; impl BUF31TO8I3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I3_A { match self . bits { false => BUF31TO8I3_A :: _0 , true => BUF31TO8I3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I3_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I3`" ] pub struct BUF31TO8I3_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I3_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I3_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I4_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I4_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I4_A ) -> Self { match variant { BUF31TO8I4_A :: _0 => false , BUF31TO8I4_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I4`" ] pub type BUF31TO8I4_R = crate :: R < bool , BUF31TO8I4_A > ; impl BUF31TO8I4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I4_A { match self . bits { false => BUF31TO8I4_A :: _0 , true => BUF31TO8I4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I4_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I4`" ] pub struct BUF31TO8I4_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I4_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I5_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I5_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I5_A ) -> Self { match variant { BUF31TO8I5_A :: _0 => false , BUF31TO8I5_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I5`" ] pub type BUF31TO8I5_R = crate :: R < bool , BUF31TO8I5_A > ; impl BUF31TO8I5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I5_A { match self . bits { false => BUF31TO8I5_A :: _0 , true => BUF31TO8I5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I5_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I5`" ] pub struct BUF31TO8I5_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I5_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I5_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I6_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I6_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I6_A ) -> Self { match variant { BUF31TO8I6_A :: _0 => false , BUF31TO8I6_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I6`" ] pub type BUF31TO8I6_R = crate :: R < bool , BUF31TO8I6_A > ; impl BUF31TO8I6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I6_A { match self . bits { false => BUF31TO8I6_A :: _0 , true => BUF31TO8I6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I6_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I6`" ] pub struct BUF31TO8I6_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I6_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I6_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I7_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I7_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I7_A ) -> Self { match variant { BUF31TO8I7_A :: _0 => false , BUF31TO8I7_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I7`" ] pub type BUF31TO8I7_R = crate :: R < bool , BUF31TO8I7_A > ; impl BUF31TO8I7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I7_A { match self . bits { false => BUF31TO8I7_A :: _0 , true => BUF31TO8I7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I7_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I7`" ] pub struct BUF31TO8I7_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I7_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I7_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I8_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I8_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I8_A ) -> Self { match variant { BUF31TO8I8_A :: _0 => false , BUF31TO8I8_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I8`" ] pub type BUF31TO8I8_R = crate :: R < bool , BUF31TO8I8_A > ; impl BUF31TO8I8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I8_A { match self . bits { false => BUF31TO8I8_A :: _0 , true => BUF31TO8I8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I8_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I8`" ] pub struct BUF31TO8I8_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I8_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I8_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I9_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I9_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I9_A ) -> Self { match variant { BUF31TO8I9_A :: _0 => false , BUF31TO8I9_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I9`" ] pub type BUF31TO8I9_R = crate :: R < bool , BUF31TO8I9_A > ; impl BUF31TO8I9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I9_A { match self . bits { false => BUF31TO8I9_A :: _0 , true => BUF31TO8I9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I9_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I9`" ] pub struct BUF31TO8I9_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I9_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I9_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I10_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I10_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I10_A ) -> Self { match variant { BUF31TO8I10_A :: _0 => false , BUF31TO8I10_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I10`" ] pub type BUF31TO8I10_R = crate :: R < bool , BUF31TO8I10_A > ; impl BUF31TO8I10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I10_A { match self . bits { false => BUF31TO8I10_A :: _0 , true => BUF31TO8I10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I10_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I10`" ] pub struct BUF31TO8I10_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I10_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I10_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I11_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I11_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I11_A ) -> Self { match variant { BUF31TO8I11_A :: _0 => false , BUF31TO8I11_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I11`" ] pub type BUF31TO8I11_R = crate :: R < bool , BUF31TO8I11_A > ; impl BUF31TO8I11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I11_A { match self . bits { false => BUF31TO8I11_A :: _0 , true => BUF31TO8I11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I11_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I11`" ] pub struct BUF31TO8I11_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I11_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I11_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I12_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I12_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I12_A ) -> Self { match variant { BUF31TO8I12_A :: _0 => false , BUF31TO8I12_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I12`" ] pub type BUF31TO8I12_R = crate :: R < bool , BUF31TO8I12_A > ; impl BUF31TO8I12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I12_A { match self . bits { false => BUF31TO8I12_A :: _0 , true => BUF31TO8I12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I12_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I12`" ] pub struct BUF31TO8I12_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I12_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I12_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I13_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I13_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I13_A ) -> Self { match variant { BUF31TO8I13_A :: _0 => false , BUF31TO8I13_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I13`" ] pub type BUF31TO8I13_R = crate :: R < bool , BUF31TO8I13_A > ; impl BUF31TO8I13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I13_A { match self . bits { false => BUF31TO8I13_A :: _0 , true => BUF31TO8I13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I13_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I13`" ] pub struct BUF31TO8I13_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I13_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I13_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I14_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I14_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I14_A ) -> Self { match variant { BUF31TO8I14_A :: _0 => false , BUF31TO8I14_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I14`" ] pub type BUF31TO8I14_R = crate :: R < bool , BUF31TO8I14_A > ; impl BUF31TO8I14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I14_A { match self . bits { false => BUF31TO8I14_A :: _0 , true => BUF31TO8I14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I14_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I14`" ] pub struct BUF31TO8I14_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I14_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I14_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I15_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I15_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I15_A ) -> Self { match variant { BUF31TO8I15_A :: _0 => false , BUF31TO8I15_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I15`" ] pub type BUF31TO8I15_R = crate :: R < bool , BUF31TO8I15_A > ; impl BUF31TO8I15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I15_A { match self . bits { false => BUF31TO8I15_A :: _0 , true => BUF31TO8I15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I15_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I15`" ] pub struct BUF31TO8I15_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I15_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I15_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I16_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I16_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I16_A ) -> Self { match variant { BUF31TO8I16_A :: _0 => false , BUF31TO8I16_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I16`" ] pub type BUF31TO8I16_R = crate :: R < bool , BUF31TO8I16_A > ; impl BUF31TO8I16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I16_A { match self . bits { false => BUF31TO8I16_A :: _0 , true => BUF31TO8I16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I16_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I16`" ] pub struct BUF31TO8I16_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I16_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I16_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I17_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I17_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I17_A ) -> Self { match variant { BUF31TO8I17_A :: _0 => false , BUF31TO8I17_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I17`" ] pub type BUF31TO8I17_R = crate :: R < bool , BUF31TO8I17_A > ; impl BUF31TO8I17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I17_A { match self . bits { false => BUF31TO8I17_A :: _0 , true => BUF31TO8I17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I17_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I17`" ] pub struct BUF31TO8I17_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I17_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I17_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I18_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I18_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I18_A ) -> Self { match variant { BUF31TO8I18_A :: _0 => false , BUF31TO8I18_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I18`" ] pub type BUF31TO8I18_R = crate :: R < bool , BUF31TO8I18_A > ; impl BUF31TO8I18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I18_A { match self . bits { false => BUF31TO8I18_A :: _0 , true => BUF31TO8I18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I18_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I18`" ] pub struct BUF31TO8I18_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I18_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I18_A :: _1 ) } # [ 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 = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I19_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I19_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I19_A ) -> Self { match variant { BUF31TO8I19_A :: _0 => false , BUF31TO8I19_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I19`" ] pub type BUF31TO8I19_R = crate :: R < bool , BUF31TO8I19_A > ; impl BUF31TO8I19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I19_A { match self . bits { false => BUF31TO8I19_A :: _0 , true => BUF31TO8I19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I19_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I19`" ] pub struct BUF31TO8I19_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I19_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I19_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I20_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I20_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I20_A ) -> Self { match variant { BUF31TO8I20_A :: _0 => false , BUF31TO8I20_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I20`" ] pub type BUF31TO8I20_R = crate :: R < bool , BUF31TO8I20_A > ; impl BUF31TO8I20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I20_A { match self . bits { false => BUF31TO8I20_A :: _0 , true => BUF31TO8I20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I20_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I20`" ] pub struct BUF31TO8I20_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I20_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I20_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I21_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I21_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I21_A ) -> Self { match variant { BUF31TO8I21_A :: _0 => false , BUF31TO8I21_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I21`" ] pub type BUF31TO8I21_R = crate :: R < bool , BUF31TO8I21_A > ; impl BUF31TO8I21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I21_A { match self . bits { false => BUF31TO8I21_A :: _0 , true => BUF31TO8I21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I21_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I21`" ] pub struct BUF31TO8I21_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I21_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I21_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I22_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I22_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I22_A ) -> Self { match variant { BUF31TO8I22_A :: _0 => false , BUF31TO8I22_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I22`" ] pub type BUF31TO8I22_R = crate :: R < bool , BUF31TO8I22_A > ; impl BUF31TO8I22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I22_A { match self . bits { false => BUF31TO8I22_A :: _0 , true => BUF31TO8I22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I22_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I22`" ] pub struct BUF31TO8I22_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I22_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I22_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Buffer MBi Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUF31TO8I23_A { # [ doc = "0: The corresponding buffer has no occurrence of successfully completed transmission or reception." ] _0 , # [ doc = "1: The corresponding buffer has successfully completed transmission or reception." ] _1 } impl From < BUF31TO8I23_A > for bool { # [ inline ( always ) ] fn from ( variant : BUF31TO8I23_A ) -> Self { match variant { BUF31TO8I23_A :: _0 => false , BUF31TO8I23_A :: _1 => true } } } # [ doc = "Reader of field `BUF31TO8I23`" ] pub type BUF31TO8I23_R = crate :: R < bool , BUF31TO8I23_A > ; impl BUF31TO8I23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUF31TO8I23_A { match self . bits { false => BUF31TO8I23_A :: _0 , true => BUF31TO8I23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUF31TO8I23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUF31TO8I23_A :: _1 } } # [ doc = "Write proxy for field `BUF31TO8I23`" ] pub struct BUF31TO8I23_W < 'a > { w : & 'a mut W , } impl < 'a > BUF31TO8I23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUF31TO8I23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding buffer has no occurrence of successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I23_A :: _0 ) } # [ doc = "The corresponding buffer has successfully completed transmission or reception." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUF31TO8I23_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Buffer MB0 Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf0i ( & self ) -> BUF0I_R { BUF0I_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i0 ( & self ) -> BUF4TO1I0_R { BUF4TO1I0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i1 ( & self ) -> BUF4TO1I1_R { BUF4TO1I1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i2 ( & self ) -> BUF4TO1I2_R { BUF4TO1I2_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i3 ( & self ) -> BUF4TO1I3_R { BUF4TO1I3_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Buffer MB5 Interrupt Or \"Frames available in Rx FIFO\"" ] # [ inline ( always ) ] pub fn buf5i ( & self ) -> BUF5I_R { BUF5I_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Buffer MB6 Interrupt Or \"Rx FIFO Warning\"" ] # [ inline ( always ) ] pub fn buf6i ( & self ) -> BUF6I_R { BUF6I_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Buffer MB7 Interrupt Or \"Rx FIFO Overflow\"" ] # [ inline ( always ) ] pub fn buf7i ( & self ) -> BUF7I_R { BUF7I_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i0 ( & self ) -> BUF31TO8I0_R { BUF31TO8I0_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i1 ( & self ) -> BUF31TO8I1_R { BUF31TO8I1_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i2 ( & self ) -> BUF31TO8I2_R { BUF31TO8I2_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i3 ( & self ) -> BUF31TO8I3_R { BUF31TO8I3_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i4 ( & self ) -> BUF31TO8I4_R { BUF31TO8I4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i5 ( & self ) -> BUF31TO8I5_R { BUF31TO8I5_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i6 ( & self ) -> BUF31TO8I6_R { BUF31TO8I6_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i7 ( & self ) -> BUF31TO8I7_R { BUF31TO8I7_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i8 ( & self ) -> BUF31TO8I8_R { BUF31TO8I8_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i9 ( & self ) -> BUF31TO8I9_R { BUF31TO8I9_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i10 ( & self ) -> BUF31TO8I10_R { BUF31TO8I10_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i11 ( & self ) -> BUF31TO8I11_R { BUF31TO8I11_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i12 ( & self ) -> BUF31TO8I12_R { BUF31TO8I12_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i13 ( & self ) -> BUF31TO8I13_R { BUF31TO8I13_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i14 ( & self ) -> BUF31TO8I14_R { BUF31TO8I14_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i15 ( & self ) -> BUF31TO8I15_R { BUF31TO8I15_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i16 ( & self ) -> BUF31TO8I16_R { BUF31TO8I16_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i17 ( & self ) -> BUF31TO8I17_R { BUF31TO8I17_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i18 ( & self ) -> BUF31TO8I18_R { BUF31TO8I18_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i19 ( & self ) -> BUF31TO8I19_R { BUF31TO8I19_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i20 ( & self ) -> BUF31TO8I20_R { BUF31TO8I20_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i21 ( & self ) -> BUF31TO8I21_R { BUF31TO8I21_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i22 ( & self ) -> BUF31TO8I22_R { BUF31TO8I22_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i23 ( & self ) -> BUF31TO8I23_R { BUF31TO8I23_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Buffer MB0 Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf0i ( & mut self ) -> BUF0I_W { BUF0I_W { w : self } } # [ doc = "Bit 1 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i0 ( & mut self ) -> BUF4TO1I0_W { BUF4TO1I0_W { w : self } } # [ doc = "Bit 2 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i1 ( & mut self ) -> BUF4TO1I1_W { BUF4TO1I1_W { w : self } } # [ doc = "Bit 3 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i2 ( & mut self ) -> BUF4TO1I2_W { BUF4TO1I2_W { w : self } } # [ doc = "Bit 4 - Buffer MB i Interrupt Or \"reserved\"" ] # [ inline ( always ) ] pub fn buf4to1i3 ( & mut self ) -> BUF4TO1I3_W { BUF4TO1I3_W { w : self } } # [ doc = "Bit 5 - Buffer MB5 Interrupt Or \"Frames available in Rx FIFO\"" ] # [ inline ( always ) ] pub fn buf5i ( & mut self ) -> BUF5I_W { BUF5I_W { w : self } } # [ doc = "Bit 6 - Buffer MB6 Interrupt Or \"Rx FIFO Warning\"" ] # [ inline ( always ) ] pub fn buf6i ( & mut self ) -> BUF6I_W { BUF6I_W { w : self } } # [ doc = "Bit 7 - Buffer MB7 Interrupt Or \"Rx FIFO Overflow\"" ] # [ inline ( always ) ] pub fn buf7i ( & mut self ) -> BUF7I_W { BUF7I_W { w : self } } # [ doc = "Bit 8 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i0 ( & mut self ) -> BUF31TO8I0_W { BUF31TO8I0_W { w : self } } # [ doc = "Bit 9 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i1 ( & mut self ) -> BUF31TO8I1_W { BUF31TO8I1_W { w : self } } # [ doc = "Bit 10 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i2 ( & mut self ) -> BUF31TO8I2_W { BUF31TO8I2_W { w : self } } # [ doc = "Bit 11 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i3 ( & mut self ) -> BUF31TO8I3_W { BUF31TO8I3_W { w : self } } # [ doc = "Bit 12 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i4 ( & mut self ) -> BUF31TO8I4_W { BUF31TO8I4_W { w : self } } # [ doc = "Bit 13 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i5 ( & mut self ) -> BUF31TO8I5_W { BUF31TO8I5_W { w : self } } # [ doc = "Bit 14 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i6 ( & mut self ) -> BUF31TO8I6_W { BUF31TO8I6_W { w : self } } # [ doc = "Bit 15 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i7 ( & mut self ) -> BUF31TO8I7_W { BUF31TO8I7_W { w : self } } # [ doc = "Bit 16 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i8 ( & mut self ) -> BUF31TO8I8_W { BUF31TO8I8_W { w : self } } # [ doc = "Bit 17 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i9 ( & mut self ) -> BUF31TO8I9_W { BUF31TO8I9_W { w : self } } # [ doc = "Bit 18 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i10 ( & mut self ) -> BUF31TO8I10_W { BUF31TO8I10_W { w : self } } # [ doc = "Bit 19 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i11 ( & mut self ) -> BUF31TO8I11_W { BUF31TO8I11_W { w : self } } # [ doc = "Bit 20 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i12 ( & mut self ) -> BUF31TO8I12_W { BUF31TO8I12_W { w : self } } # [ doc = "Bit 21 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i13 ( & mut self ) -> BUF31TO8I13_W { BUF31TO8I13_W { w : self } } # [ doc = "Bit 22 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i14 ( & mut self ) -> BUF31TO8I14_W { BUF31TO8I14_W { w : self } } # [ doc = "Bit 23 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i15 ( & mut self ) -> BUF31TO8I15_W { BUF31TO8I15_W { w : self } } # [ doc = "Bit 24 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i16 ( & mut self ) -> BUF31TO8I16_W { BUF31TO8I16_W { w : self } } # [ doc = "Bit 25 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i17 ( & mut self ) -> BUF31TO8I17_W { BUF31TO8I17_W { w : self } } # [ doc = "Bit 26 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i18 ( & mut self ) -> BUF31TO8I18_W { BUF31TO8I18_W { w : self } } # [ doc = "Bit 27 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i19 ( & mut self ) -> BUF31TO8I19_W { BUF31TO8I19_W { w : self } } # [ doc = "Bit 28 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i20 ( & mut self ) -> BUF31TO8I20_W { BUF31TO8I20_W { w : self } } # [ doc = "Bit 29 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i21 ( & mut self ) -> BUF31TO8I21_W { BUF31TO8I21_W { w : self } } # [ doc = "Bit 30 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i22 ( & mut self ) -> BUF31TO8I22_W { BUF31TO8I22_W { w : self } } # [ doc = "Bit 31 - Buffer MBi Interrupt" ] # [ inline ( always ) ] pub fn buf31to8i23 ( & mut self ) -> BUF31TO8I23_W { BUF31TO8I23_W { w : self } } } } # [ doc = "Control 2 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl2](ctrl2) module" ] pub type CTRL2 = crate :: Reg < u32 , _CTRL2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL2 ; # [ doc = "`read()` method returns [ctrl2::R](ctrl2::R) reader structure" ] impl crate :: Readable for CTRL2 { } # [ doc = "`write(|w| ..)` method takes [ctrl2::W](ctrl2::W) writer structure" ] impl crate :: Writable for CTRL2 { } # [ doc = "Control 2 register" ] pub mod ctrl2 { # [ doc = "Reader of register CTRL2" ] pub type R = crate :: R < u32 , super :: CTRL2 > ; # [ doc = "Writer for register CTRL2" ] pub type W = crate :: W < u32 , super :: CTRL2 > ; # [ doc = "Register CTRL2 `reset()`'s with value 0x00b0_0000" ] impl crate :: ResetValue for super :: CTRL2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x00b0_0000 } } # [ doc = "Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EACEN_A { # [ doc = "0: Rx Mailbox filter's IDE bit is always compared and RTR is never compared despite mask bits." ] _0 , # [ doc = "1: Enables the comparison of both Rx Mailbox filter's IDE and RTR bit with their corresponding bits within the incoming frame. Mask bits do apply." ] _1 } impl From < EACEN_A > for bool { # [ inline ( always ) ] fn from ( variant : EACEN_A ) -> Self { match variant { EACEN_A :: _0 => false , EACEN_A :: _1 => true } } } # [ doc = "Reader of field `EACEN`" ] pub type EACEN_R = crate :: R < bool , EACEN_A > ; impl EACEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EACEN_A { match self . bits { false => EACEN_A :: _0 , true => EACEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EACEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EACEN_A :: _1 } } # [ doc = "Write proxy for field `EACEN`" ] pub struct EACEN_W < 'a > { w : & 'a mut W , } impl < 'a > EACEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EACEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rx Mailbox filter's IDE bit is always compared and RTR is never compared despite mask bits." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EACEN_A :: _0 ) } # [ doc = "Enables the comparison of both Rx Mailbox filter's IDE and RTR bit with their corresponding bits within the incoming frame. Mask bits do apply." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EACEN_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Remote Request Storing\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RRS_A { # [ doc = "0: Remote Response Frame is generated." ] _0 , # [ doc = "1: Remote Request Frame is stored." ] _1 } impl From < RRS_A > for bool { # [ inline ( always ) ] fn from ( variant : RRS_A ) -> Self { match variant { RRS_A :: _0 => false , RRS_A :: _1 => true } } } # [ doc = "Reader of field `RRS`" ] pub type RRS_R = crate :: R < bool , RRS_A > ; impl RRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RRS_A { match self . bits { false => RRS_A :: _0 , true => RRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RRS_A :: _1 } } # [ doc = "Write proxy for field `RRS`" ] pub struct RRS_W < 'a > { w : & 'a mut W , } impl < 'a > RRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Remote Response Frame is generated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RRS_A :: _0 ) } # [ doc = "Remote Request Frame is stored." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RRS_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Mailboxes Reception Priority\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MRP_A { # [ doc = "0: Matching starts from Rx FIFO and continues on Mailboxes." ] _0 , # [ doc = "1: Matching starts from Mailboxes and continues on Rx FIFO." ] _1 } impl From < MRP_A > for bool { # [ inline ( always ) ] fn from ( variant : MRP_A ) -> Self { match variant { MRP_A :: _0 => false , MRP_A :: _1 => true } } } # [ doc = "Reader of field `MRP`" ] pub type MRP_R = crate :: R < bool , MRP_A > ; impl MRP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MRP_A { match self . bits { false => MRP_A :: _0 , true => MRP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MRP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MRP_A :: _1 } } # [ doc = "Write proxy for field `MRP`" ] pub struct MRP_W < 'a > { w : & 'a mut W , } impl < 'a > MRP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MRP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Matching starts from Rx FIFO and continues on Mailboxes." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MRP_A :: _0 ) } # [ doc = "Matching starts from Mailboxes and continues on Rx FIFO." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MRP_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `TASD`" ] pub type TASD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TASD`" ] pub struct TASD_W < 'a > { w : & 'a mut W , } impl < 'a > TASD_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 & ! ( 0x1f << 19 ) ) | ( ( ( value as u32 ) & 0x1f ) << 19 ) ; self . w } } # [ doc = "Reader of field `RFFN`" ] pub type RFFN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RFFN`" ] pub struct RFFN_W < 'a > { w : & 'a mut W , } impl < 'a > RFFN_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } # [ doc = "Write-Access To Memory In Freeze Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRMFRZ_A { # [ doc = "0: Maintain the write access restrictions." ] _0 , # [ doc = "1: Enable unrestricted write access to FlexCAN memory." ] _1 } impl From < WRMFRZ_A > for bool { # [ inline ( always ) ] fn from ( variant : WRMFRZ_A ) -> Self { match variant { WRMFRZ_A :: _0 => false , WRMFRZ_A :: _1 => true } } } # [ doc = "Reader of field `WRMFRZ`" ] pub type WRMFRZ_R = crate :: R < bool , WRMFRZ_A > ; impl WRMFRZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WRMFRZ_A { match self . bits { false => WRMFRZ_A :: _0 , true => WRMFRZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WRMFRZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WRMFRZ_A :: _1 } } # [ doc = "Write proxy for field `WRMFRZ`" ] pub struct WRMFRZ_W < 'a > { w : & 'a mut W , } impl < 'a > WRMFRZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WRMFRZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Maintain the write access restrictions." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WRMFRZ_A :: _0 ) } # [ doc = "Enable unrestricted write access to FlexCAN memory." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WRMFRZ_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } impl R { # [ doc = "Bit 16 - Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes" ] # [ inline ( always ) ] pub fn eacen ( & self ) -> EACEN_R { EACEN_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Remote Request Storing" ] # [ inline ( always ) ] pub fn rrs ( & self ) -> RRS_R { RRS_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Mailboxes Reception Priority" ] # [ inline ( always ) ] pub fn mrp ( & self ) -> MRP_R { MRP_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bits 19:23 - Tx Arbitration Start Delay" ] # [ inline ( always ) ] pub fn tasd ( & self ) -> TASD_R { TASD_R :: new ( ( ( self . bits >> 19 ) & 0x1f ) as u8 ) } # [ doc = "Bits 24:27 - Number Of Rx FIFO Filters" ] # [ inline ( always ) ] pub fn rffn ( & self ) -> RFFN_R { RFFN_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bit 28 - Write-Access To Memory In Freeze Mode" ] # [ inline ( always ) ] pub fn wrmfrz ( & self ) -> WRMFRZ_R { WRMFRZ_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 16 - Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes" ] # [ inline ( always ) ] pub fn eacen ( & mut self ) -> EACEN_W { EACEN_W { w : self } } # [ doc = "Bit 17 - Remote Request Storing" ] # [ inline ( always ) ] pub fn rrs ( & mut self ) -> RRS_W { RRS_W { w : self } } # [ doc = "Bit 18 - Mailboxes Reception Priority" ] # [ inline ( always ) ] pub fn mrp ( & mut self ) -> MRP_W { MRP_W { w : self } } # [ doc = "Bits 19:23 - Tx Arbitration Start Delay" ] # [ inline ( always ) ] pub fn tasd ( & mut self ) -> TASD_W { TASD_W { w : self } } # [ doc = "Bits 24:27 - Number Of Rx FIFO Filters" ] # [ inline ( always ) ] pub fn rffn ( & mut self ) -> RFFN_W { RFFN_W { w : self } } # [ doc = "Bit 28 - Write-Access To Memory In Freeze Mode" ] # [ inline ( always ) ] pub fn wrmfrz ( & mut self ) -> WRMFRZ_W { WRMFRZ_W { w : self } } } } # [ doc = "Error and Status 2 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [esr2](esr2) module" ] pub type ESR2 = crate :: Reg < u32 , _ESR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ESR2 ; # [ doc = "`read()` method returns [esr2::R](esr2::R) reader structure" ] impl crate :: Readable for ESR2 { } # [ doc = "Error and Status 2 register" ] pub mod esr2 { # [ doc = "Reader of register ESR2" ] pub type R = crate :: R < u32 , super :: ESR2 > ; # [ doc = "Inactive Mailbox\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IMB_A { # [ doc = "0: If ESR2\\[VPS\\] is asserted, the ESR2\\[LPTM\\] is not an inactive Mailbox." ] _0 , # [ doc = "1: If ESR2\\[VPS\\] is asserted, there is at least one inactive Mailbox. LPTM content is the number of the first one." ] _1 } impl From < IMB_A > for bool { # [ inline ( always ) ] fn from ( variant : IMB_A ) -> Self { match variant { IMB_A :: _0 => false , IMB_A :: _1 => true } } } # [ doc = "Reader of field `IMB`" ] pub type IMB_R = crate :: R < bool , IMB_A > ; impl IMB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IMB_A { match self . bits { false => IMB_A :: _0 , true => IMB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IMB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IMB_A :: _1 } } # [ doc = "Valid Priority Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VPS_A { # [ doc = "0: Contents of IMB and LPTM are invalid." ] _0 , # [ doc = "1: Contents of IMB and LPTM are valid." ] _1 } impl From < VPS_A > for bool { # [ inline ( always ) ] fn from ( variant : VPS_A ) -> Self { match variant { VPS_A :: _0 => false , VPS_A :: _1 => true } } } # [ doc = "Reader of field `VPS`" ] pub type VPS_R = crate :: R < bool , VPS_A > ; impl VPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VPS_A { match self . bits { false => VPS_A :: _0 , true => VPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VPS_A :: _1 } } # [ doc = "Reader of field `LPTM`" ] pub type LPTM_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 13 - Inactive Mailbox" ] # [ inline ( always ) ] pub fn imb ( & self ) -> IMB_R { IMB_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Valid Priority Status" ] # [ inline ( always ) ] pub fn vps ( & self ) -> VPS_R { VPS_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:22 - Lowest Priority Tx Mailbox" ] # [ inline ( always ) ] pub fn lptm ( & self ) -> LPTM_R { LPTM_R :: new ( ( ( self . bits >> 16 ) & 0x7f ) as u8 ) } } } # [ doc = "CRC Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [crcr](crcr) module" ] pub type CRCR = crate :: Reg < u32 , _CRCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CRCR ; # [ doc = "`read()` method returns [crcr::R](crcr::R) reader structure" ] impl crate :: Readable for CRCR { } # [ doc = "CRC Register" ] pub mod crcr { # [ doc = "Reader of register CRCR" ] pub type R = crate :: R < u32 , super :: CRCR > ; # [ doc = "Reader of field `TXCRC`" ] pub type TXCRC_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `MBCRC`" ] pub type MBCRC_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:14 - CRC Transmitted" ] # [ inline ( always ) ] pub fn txcrc ( & self ) -> TXCRC_R { TXCRC_R :: new ( ( self . bits & 0x7fff ) as u16 ) } # [ doc = "Bits 16:22 - CRC Mailbox" ] # [ inline ( always ) ] pub fn mbcrc ( & self ) -> MBCRC_R { MBCRC_R :: new ( ( ( self . bits >> 16 ) & 0x7f ) as u8 ) } } } # [ doc = "Rx FIFO Global Mask register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxfgmask](rxfgmask) module" ] pub type RXFGMASK = crate :: Reg < u32 , _RXFGMASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXFGMASK ; # [ doc = "`read()` method returns [rxfgmask::R](rxfgmask::R) reader structure" ] impl crate :: Readable for RXFGMASK { } # [ doc = "`write(|w| ..)` method takes [rxfgmask::W](rxfgmask::W) writer structure" ] impl crate :: Writable for RXFGMASK { } # [ doc = "Rx FIFO Global Mask register" ] pub mod rxfgmask { # [ doc = "Reader of register RXFGMASK" ] pub type R = crate :: R < u32 , super :: RXFGMASK > ; # [ doc = "Writer for register RXFGMASK" ] pub type W = crate :: W < u32 , super :: RXFGMASK > ; # [ doc = "Register RXFGMASK `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: RXFGMASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM0_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM0_A ) -> Self { match variant { FGM0_A :: _0 => false , FGM0_A :: _1 => true } } } # [ doc = "Reader of field `FGM0`" ] pub type FGM0_R = crate :: R < bool , FGM0_A > ; impl FGM0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM0_A { match self . bits { false => FGM0_A :: _0 , true => FGM0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM0_A :: _1 } } # [ doc = "Write proxy for field `FGM0`" ] pub struct FGM0_W < 'a > { w : & 'a mut W , } impl < 'a > FGM0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM1_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM1_A ) -> Self { match variant { FGM1_A :: _0 => false , FGM1_A :: _1 => true } } } # [ doc = "Reader of field `FGM1`" ] pub type FGM1_R = crate :: R < bool , FGM1_A > ; impl FGM1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM1_A { match self . bits { false => FGM1_A :: _0 , true => FGM1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM1_A :: _1 } } # [ doc = "Write proxy for field `FGM1`" ] pub struct FGM1_W < 'a > { w : & 'a mut W , } impl < 'a > FGM1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM1_A :: _1 ) } # [ 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 } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM2_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM2_A ) -> Self { match variant { FGM2_A :: _0 => false , FGM2_A :: _1 => true } } } # [ doc = "Reader of field `FGM2`" ] pub type FGM2_R = crate :: R < bool , FGM2_A > ; impl FGM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM2_A { match self . bits { false => FGM2_A :: _0 , true => FGM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM2_A :: _1 } } # [ doc = "Write proxy for field `FGM2`" ] pub struct FGM2_W < 'a > { w : & 'a mut W , } impl < 'a > FGM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM2_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM3_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM3_A ) -> Self { match variant { FGM3_A :: _0 => false , FGM3_A :: _1 => true } } } # [ doc = "Reader of field `FGM3`" ] pub type FGM3_R = crate :: R < bool , FGM3_A > ; impl FGM3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM3_A { match self . bits { false => FGM3_A :: _0 , true => FGM3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM3_A :: _1 } } # [ doc = "Write proxy for field `FGM3`" ] pub struct FGM3_W < 'a > { w : & 'a mut W , } impl < 'a > FGM3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM4_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM4_A ) -> Self { match variant { FGM4_A :: _0 => false , FGM4_A :: _1 => true } } } # [ doc = "Reader of field `FGM4`" ] pub type FGM4_R = crate :: R < bool , FGM4_A > ; impl FGM4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM4_A { match self . bits { false => FGM4_A :: _0 , true => FGM4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM4_A :: _1 } } # [ doc = "Write proxy for field `FGM4`" ] pub struct FGM4_W < 'a > { w : & 'a mut W , } impl < 'a > FGM4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM5_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM5_A ) -> Self { match variant { FGM5_A :: _0 => false , FGM5_A :: _1 => true } } } # [ doc = "Reader of field `FGM5`" ] pub type FGM5_R = crate :: R < bool , FGM5_A > ; impl FGM5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM5_A { match self . bits { false => FGM5_A :: _0 , true => FGM5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM5_A :: _1 } } # [ doc = "Write proxy for field `FGM5`" ] pub struct FGM5_W < 'a > { w : & 'a mut W , } impl < 'a > FGM5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM5_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM6_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM6_A ) -> Self { match variant { FGM6_A :: _0 => false , FGM6_A :: _1 => true } } } # [ doc = "Reader of field `FGM6`" ] pub type FGM6_R = crate :: R < bool , FGM6_A > ; impl FGM6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM6_A { match self . bits { false => FGM6_A :: _0 , true => FGM6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM6_A :: _1 } } # [ doc = "Write proxy for field `FGM6`" ] pub struct FGM6_W < 'a > { w : & 'a mut W , } impl < 'a > FGM6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM6_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM7_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM7_A ) -> Self { match variant { FGM7_A :: _0 => false , FGM7_A :: _1 => true } } } # [ doc = "Reader of field `FGM7`" ] pub type FGM7_R = crate :: R < bool , FGM7_A > ; impl FGM7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM7_A { match self . bits { false => FGM7_A :: _0 , true => FGM7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM7_A :: _1 } } # [ doc = "Write proxy for field `FGM7`" ] pub struct FGM7_W < 'a > { w : & 'a mut W , } impl < 'a > FGM7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM7_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM8_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM8_A ) -> Self { match variant { FGM8_A :: _0 => false , FGM8_A :: _1 => true } } } # [ doc = "Reader of field `FGM8`" ] pub type FGM8_R = crate :: R < bool , FGM8_A > ; impl FGM8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM8_A { match self . bits { false => FGM8_A :: _0 , true => FGM8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM8_A :: _1 } } # [ doc = "Write proxy for field `FGM8`" ] pub struct FGM8_W < 'a > { w : & 'a mut W , } impl < 'a > FGM8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM9_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM9_A ) -> Self { match variant { FGM9_A :: _0 => false , FGM9_A :: _1 => true } } } # [ doc = "Reader of field `FGM9`" ] pub type FGM9_R = crate :: R < bool , FGM9_A > ; impl FGM9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM9_A { match self . bits { false => FGM9_A :: _0 , true => FGM9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM9_A :: _1 } } # [ doc = "Write proxy for field `FGM9`" ] pub struct FGM9_W < 'a > { w : & 'a mut W , } impl < 'a > FGM9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM10_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM10_A ) -> Self { match variant { FGM10_A :: _0 => false , FGM10_A :: _1 => true } } } # [ doc = "Reader of field `FGM10`" ] pub type FGM10_R = crate :: R < bool , FGM10_A > ; impl FGM10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM10_A { match self . bits { false => FGM10_A :: _0 , true => FGM10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM10_A :: _1 } } # [ doc = "Write proxy for field `FGM10`" ] pub struct FGM10_W < 'a > { w : & 'a mut W , } impl < 'a > FGM10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM11_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM11_A ) -> Self { match variant { FGM11_A :: _0 => false , FGM11_A :: _1 => true } } } # [ doc = "Reader of field `FGM11`" ] pub type FGM11_R = crate :: R < bool , FGM11_A > ; impl FGM11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM11_A { match self . bits { false => FGM11_A :: _0 , true => FGM11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM11_A :: _1 } } # [ doc = "Write proxy for field `FGM11`" ] pub struct FGM11_W < 'a > { w : & 'a mut W , } impl < 'a > FGM11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM12_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM12_A ) -> Self { match variant { FGM12_A :: _0 => false , FGM12_A :: _1 => true } } } # [ doc = "Reader of field `FGM12`" ] pub type FGM12_R = crate :: R < bool , FGM12_A > ; impl FGM12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM12_A { match self . bits { false => FGM12_A :: _0 , true => FGM12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM12_A :: _1 } } # [ doc = "Write proxy for field `FGM12`" ] pub struct FGM12_W < 'a > { w : & 'a mut W , } impl < 'a > FGM12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM13_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM13_A ) -> Self { match variant { FGM13_A :: _0 => false , FGM13_A :: _1 => true } } } # [ doc = "Reader of field `FGM13`" ] pub type FGM13_R = crate :: R < bool , FGM13_A > ; impl FGM13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM13_A { match self . bits { false => FGM13_A :: _0 , true => FGM13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM13_A :: _1 } } # [ doc = "Write proxy for field `FGM13`" ] pub struct FGM13_W < 'a > { w : & 'a mut W , } impl < 'a > FGM13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM13_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM14_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM14_A ) -> Self { match variant { FGM14_A :: _0 => false , FGM14_A :: _1 => true } } } # [ doc = "Reader of field `FGM14`" ] pub type FGM14_R = crate :: R < bool , FGM14_A > ; impl FGM14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM14_A { match self . bits { false => FGM14_A :: _0 , true => FGM14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM14_A :: _1 } } # [ doc = "Write proxy for field `FGM14`" ] pub struct FGM14_W < 'a > { w : & 'a mut W , } impl < 'a > FGM14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM15_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM15_A ) -> Self { match variant { FGM15_A :: _0 => false , FGM15_A :: _1 => true } } } # [ doc = "Reader of field `FGM15`" ] pub type FGM15_R = crate :: R < bool , FGM15_A > ; impl FGM15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM15_A { match self . bits { false => FGM15_A :: _0 , true => FGM15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM15_A :: _1 } } # [ doc = "Write proxy for field `FGM15`" ] pub struct FGM15_W < 'a > { w : & 'a mut W , } impl < 'a > FGM15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM16_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM16_A ) -> Self { match variant { FGM16_A :: _0 => false , FGM16_A :: _1 => true } } } # [ doc = "Reader of field `FGM16`" ] pub type FGM16_R = crate :: R < bool , FGM16_A > ; impl FGM16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM16_A { match self . bits { false => FGM16_A :: _0 , true => FGM16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM16_A :: _1 } } # [ doc = "Write proxy for field `FGM16`" ] pub struct FGM16_W < 'a > { w : & 'a mut W , } impl < 'a > FGM16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM17_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM17_A ) -> Self { match variant { FGM17_A :: _0 => false , FGM17_A :: _1 => true } } } # [ doc = "Reader of field `FGM17`" ] pub type FGM17_R = crate :: R < bool , FGM17_A > ; impl FGM17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM17_A { match self . bits { false => FGM17_A :: _0 , true => FGM17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM17_A :: _1 } } # [ doc = "Write proxy for field `FGM17`" ] pub struct FGM17_W < 'a > { w : & 'a mut W , } impl < 'a > FGM17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM18_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM18_A ) -> Self { match variant { FGM18_A :: _0 => false , FGM18_A :: _1 => true } } } # [ doc = "Reader of field `FGM18`" ] pub type FGM18_R = crate :: R < bool , FGM18_A > ; impl FGM18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM18_A { match self . bits { false => FGM18_A :: _0 , true => FGM18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM18_A :: _1 } } # [ doc = "Write proxy for field `FGM18`" ] pub struct FGM18_W < 'a > { w : & 'a mut W , } impl < 'a > FGM18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM19_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM19_A ) -> Self { match variant { FGM19_A :: _0 => false , FGM19_A :: _1 => true } } } # [ doc = "Reader of field `FGM19`" ] pub type FGM19_R = crate :: R < bool , FGM19_A > ; impl FGM19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM19_A { match self . bits { false => FGM19_A :: _0 , true => FGM19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM19_A :: _1 } } # [ doc = "Write proxy for field `FGM19`" ] pub struct FGM19_W < 'a > { w : & 'a mut W , } impl < 'a > FGM19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM20_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM20_A ) -> Self { match variant { FGM20_A :: _0 => false , FGM20_A :: _1 => true } } } # [ doc = "Reader of field `FGM20`" ] pub type FGM20_R = crate :: R < bool , FGM20_A > ; impl FGM20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM20_A { match self . bits { false => FGM20_A :: _0 , true => FGM20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM20_A :: _1 } } # [ doc = "Write proxy for field `FGM20`" ] pub struct FGM20_W < 'a > { w : & 'a mut W , } impl < 'a > FGM20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM20_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM21_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM21_A ) -> Self { match variant { FGM21_A :: _0 => false , FGM21_A :: _1 => true } } } # [ doc = "Reader of field `FGM21`" ] pub type FGM21_R = crate :: R < bool , FGM21_A > ; impl FGM21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM21_A { match self . bits { false => FGM21_A :: _0 , true => FGM21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM21_A :: _1 } } # [ doc = "Write proxy for field `FGM21`" ] pub struct FGM21_W < 'a > { w : & 'a mut W , } impl < 'a > FGM21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM21_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM22_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM22_A ) -> Self { match variant { FGM22_A :: _0 => false , FGM22_A :: _1 => true } } } # [ doc = "Reader of field `FGM22`" ] pub type FGM22_R = crate :: R < bool , FGM22_A > ; impl FGM22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM22_A { match self . bits { false => FGM22_A :: _0 , true => FGM22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM22_A :: _1 } } # [ doc = "Write proxy for field `FGM22`" ] pub struct FGM22_W < 'a > { w : & 'a mut W , } impl < 'a > FGM22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM23_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM23_A ) -> Self { match variant { FGM23_A :: _0 => false , FGM23_A :: _1 => true } } } # [ doc = "Reader of field `FGM23`" ] pub type FGM23_R = crate :: R < bool , FGM23_A > ; impl FGM23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM23_A { match self . bits { false => FGM23_A :: _0 , true => FGM23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM23_A :: _1 } } # [ doc = "Write proxy for field `FGM23`" ] pub struct FGM23_W < 'a > { w : & 'a mut W , } impl < 'a > FGM23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM24_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM24_A ) -> Self { match variant { FGM24_A :: _0 => false , FGM24_A :: _1 => true } } } # [ doc = "Reader of field `FGM24`" ] pub type FGM24_R = crate :: R < bool , FGM24_A > ; impl FGM24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM24_A { match self . bits { false => FGM24_A :: _0 , true => FGM24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM24_A :: _1 } } # [ doc = "Write proxy for field `FGM24`" ] pub struct FGM24_W < 'a > { w : & 'a mut W , } impl < 'a > FGM24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM24_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM25_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM25_A ) -> Self { match variant { FGM25_A :: _0 => false , FGM25_A :: _1 => true } } } # [ doc = "Reader of field `FGM25`" ] pub type FGM25_R = crate :: R < bool , FGM25_A > ; impl FGM25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM25_A { match self . bits { false => FGM25_A :: _0 , true => FGM25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM25_A :: _1 } } # [ doc = "Write proxy for field `FGM25`" ] pub struct FGM25_W < 'a > { w : & 'a mut W , } impl < 'a > FGM25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM25_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM26_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM26_A ) -> Self { match variant { FGM26_A :: _0 => false , FGM26_A :: _1 => true } } } # [ doc = "Reader of field `FGM26`" ] pub type FGM26_R = crate :: R < bool , FGM26_A > ; impl FGM26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM26_A { match self . bits { false => FGM26_A :: _0 , true => FGM26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM26_A :: _1 } } # [ doc = "Write proxy for field `FGM26`" ] pub struct FGM26_W < 'a > { w : & 'a mut W , } impl < 'a > FGM26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM26_A :: _1 ) } # [ 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 = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM27_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM27_A ) -> Self { match variant { FGM27_A :: _0 => false , FGM27_A :: _1 => true } } } # [ doc = "Reader of field `FGM27`" ] pub type FGM27_R = crate :: R < bool , FGM27_A > ; impl FGM27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM27_A { match self . bits { false => FGM27_A :: _0 , true => FGM27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM27_A :: _1 } } # [ doc = "Write proxy for field `FGM27`" ] pub struct FGM27_W < 'a > { w : & 'a mut W , } impl < 'a > FGM27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM28_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM28_A ) -> Self { match variant { FGM28_A :: _0 => false , FGM28_A :: _1 => true } } } # [ doc = "Reader of field `FGM28`" ] pub type FGM28_R = crate :: R < bool , FGM28_A > ; impl FGM28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM28_A { match self . bits { false => FGM28_A :: _0 , true => FGM28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM28_A :: _1 } } # [ doc = "Write proxy for field `FGM28`" ] pub struct FGM28_W < 'a > { w : & 'a mut W , } impl < 'a > FGM28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM29_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM29_A ) -> Self { match variant { FGM29_A :: _0 => false , FGM29_A :: _1 => true } } } # [ doc = "Reader of field `FGM29`" ] pub type FGM29_R = crate :: R < bool , FGM29_A > ; impl FGM29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM29_A { match self . bits { false => FGM29_A :: _0 , true => FGM29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM29_A :: _1 } } # [ doc = "Write proxy for field `FGM29`" ] pub struct FGM29_W < 'a > { w : & 'a mut W , } impl < 'a > FGM29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM30_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM30_A ) -> Self { match variant { FGM30_A :: _0 => false , FGM30_A :: _1 => true } } } # [ doc = "Reader of field `FGM30`" ] pub type FGM30_R = crate :: R < bool , FGM30_A > ; impl FGM30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM30_A { match self . bits { false => FGM30_A :: _0 , true => FGM30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM30_A :: _1 } } # [ doc = "Write proxy for field `FGM30`" ] pub struct FGM30_W < 'a > { w : & 'a mut W , } impl < 'a > FGM30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Rx FIFO Global Mask Bits\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FGM31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < FGM31_A > for bool { # [ inline ( always ) ] fn from ( variant : FGM31_A ) -> Self { match variant { FGM31_A :: _0 => false , FGM31_A :: _1 => true } } } # [ doc = "Reader of field `FGM31`" ] pub type FGM31_R = crate :: R < bool , FGM31_A > ; impl FGM31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FGM31_A { match self . bits { false => FGM31_A :: _0 , true => FGM31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FGM31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FGM31_A :: _1 } } # [ doc = "Write proxy for field `FGM31`" ] pub struct FGM31_W < 'a > { w : & 'a mut W , } impl < 'a > FGM31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FGM31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FGM31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FGM31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm0 ( & self ) -> FGM0_R { FGM0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm1 ( & self ) -> FGM1_R { FGM1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm2 ( & self ) -> FGM2_R { FGM2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm3 ( & self ) -> FGM3_R { FGM3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm4 ( & self ) -> FGM4_R { FGM4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm5 ( & self ) -> FGM5_R { FGM5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm6 ( & self ) -> FGM6_R { FGM6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm7 ( & self ) -> FGM7_R { FGM7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm8 ( & self ) -> FGM8_R { FGM8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm9 ( & self ) -> FGM9_R { FGM9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm10 ( & self ) -> FGM10_R { FGM10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm11 ( & self ) -> FGM11_R { FGM11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm12 ( & self ) -> FGM12_R { FGM12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm13 ( & self ) -> FGM13_R { FGM13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm14 ( & self ) -> FGM14_R { FGM14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm15 ( & self ) -> FGM15_R { FGM15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm16 ( & self ) -> FGM16_R { FGM16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm17 ( & self ) -> FGM17_R { FGM17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm18 ( & self ) -> FGM18_R { FGM18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm19 ( & self ) -> FGM19_R { FGM19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm20 ( & self ) -> FGM20_R { FGM20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm21 ( & self ) -> FGM21_R { FGM21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm22 ( & self ) -> FGM22_R { FGM22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm23 ( & self ) -> FGM23_R { FGM23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm24 ( & self ) -> FGM24_R { FGM24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm25 ( & self ) -> FGM25_R { FGM25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm26 ( & self ) -> FGM26_R { FGM26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm27 ( & self ) -> FGM27_R { FGM27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm28 ( & self ) -> FGM28_R { FGM28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm29 ( & self ) -> FGM29_R { FGM29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm30 ( & self ) -> FGM30_R { FGM30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm31 ( & self ) -> FGM31_R { FGM31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm0 ( & mut self ) -> FGM0_W { FGM0_W { w : self } } # [ doc = "Bit 1 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm1 ( & mut self ) -> FGM1_W { FGM1_W { w : self } } # [ doc = "Bit 2 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm2 ( & mut self ) -> FGM2_W { FGM2_W { w : self } } # [ doc = "Bit 3 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm3 ( & mut self ) -> FGM3_W { FGM3_W { w : self } } # [ doc = "Bit 4 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm4 ( & mut self ) -> FGM4_W { FGM4_W { w : self } } # [ doc = "Bit 5 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm5 ( & mut self ) -> FGM5_W { FGM5_W { w : self } } # [ doc = "Bit 6 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm6 ( & mut self ) -> FGM6_W { FGM6_W { w : self } } # [ doc = "Bit 7 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm7 ( & mut self ) -> FGM7_W { FGM7_W { w : self } } # [ doc = "Bit 8 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm8 ( & mut self ) -> FGM8_W { FGM8_W { w : self } } # [ doc = "Bit 9 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm9 ( & mut self ) -> FGM9_W { FGM9_W { w : self } } # [ doc = "Bit 10 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm10 ( & mut self ) -> FGM10_W { FGM10_W { w : self } } # [ doc = "Bit 11 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm11 ( & mut self ) -> FGM11_W { FGM11_W { w : self } } # [ doc = "Bit 12 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm12 ( & mut self ) -> FGM12_W { FGM12_W { w : self } } # [ doc = "Bit 13 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm13 ( & mut self ) -> FGM13_W { FGM13_W { w : self } } # [ doc = "Bit 14 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm14 ( & mut self ) -> FGM14_W { FGM14_W { w : self } } # [ doc = "Bit 15 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm15 ( & mut self ) -> FGM15_W { FGM15_W { w : self } } # [ doc = "Bit 16 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm16 ( & mut self ) -> FGM16_W { FGM16_W { w : self } } # [ doc = "Bit 17 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm17 ( & mut self ) -> FGM17_W { FGM17_W { w : self } } # [ doc = "Bit 18 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm18 ( & mut self ) -> FGM18_W { FGM18_W { w : self } } # [ doc = "Bit 19 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm19 ( & mut self ) -> FGM19_W { FGM19_W { w : self } } # [ doc = "Bit 20 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm20 ( & mut self ) -> FGM20_W { FGM20_W { w : self } } # [ doc = "Bit 21 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm21 ( & mut self ) -> FGM21_W { FGM21_W { w : self } } # [ doc = "Bit 22 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm22 ( & mut self ) -> FGM22_W { FGM22_W { w : self } } # [ doc = "Bit 23 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm23 ( & mut self ) -> FGM23_W { FGM23_W { w : self } } # [ doc = "Bit 24 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm24 ( & mut self ) -> FGM24_W { FGM24_W { w : self } } # [ doc = "Bit 25 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm25 ( & mut self ) -> FGM25_W { FGM25_W { w : self } } # [ doc = "Bit 26 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm26 ( & mut self ) -> FGM26_W { FGM26_W { w : self } } # [ doc = "Bit 27 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm27 ( & mut self ) -> FGM27_W { FGM27_W { w : self } } # [ doc = "Bit 28 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm28 ( & mut self ) -> FGM28_W { FGM28_W { w : self } } # [ doc = "Bit 29 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm29 ( & mut self ) -> FGM29_W { FGM29_W { w : self } } # [ doc = "Bit 30 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm30 ( & mut self ) -> FGM30_W { FGM30_W { w : self } } # [ doc = "Bit 31 - Rx FIFO Global Mask Bits" ] # [ inline ( always ) ] pub fn fgm31 ( & mut self ) -> FGM31_W { FGM31_W { w : self } } } } # [ doc = "Rx FIFO Information Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxfir](rxfir) module" ] pub type RXFIR = crate :: Reg < u32 , _RXFIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXFIR ; # [ doc = "`read()` method returns [rxfir::R](rxfir::R) reader structure" ] impl crate :: Readable for RXFIR { } # [ doc = "Rx FIFO Information Register" ] pub mod rxfir { # [ doc = "Reader of register RXFIR" ] pub type R = crate :: R < u32 , super :: RXFIR > ; # [ doc = "Reader of field `IDHIT`" ] pub type IDHIT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:8 - Identifier Acceptance Filter Hit Indicator" ] # [ inline ( always ) ] pub fn idhit ( & self ) -> IDHIT_R { IDHIT_R :: new ( ( self . bits & 0x01ff ) as u16 ) } } } # [ doc = "Message Buffer 0 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs0](cs0) module" ] pub type CS0 = crate :: Reg < u32 , _CS0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS0 ; # [ doc = "`read()` method returns [cs0::R](cs0::R) reader structure" ] impl crate :: Readable for CS0 { } # [ doc = "`write(|w| ..)` method takes [cs0::W](cs0::W) writer structure" ] impl crate :: Writable for CS0 { } # [ doc = "Message Buffer 0 CS Register" ] pub mod cs0 { # [ doc = "Reader of register CS0" ] pub type R = crate :: R < u32 , super :: CS0 > ; # [ doc = "Writer for register CS0" ] pub type W = crate :: W < u32 , super :: CS0 > ; # [ doc = "Register CS0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 0 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id0](id0) module" ] pub type ID0 = crate :: Reg < u32 , _ID0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID0 ; # [ doc = "`read()` method returns [id0::R](id0::R) reader structure" ] impl crate :: Readable for ID0 { } # [ doc = "`write(|w| ..)` method takes [id0::W](id0::W) writer structure" ] impl crate :: Writable for ID0 { } # [ doc = "Message Buffer 0 ID Register" ] pub mod id0 { # [ doc = "Reader of register ID0" ] pub type R = crate :: R < u32 , super :: ID0 > ; # [ doc = "Writer for register ID0" ] pub type W = crate :: W < u32 , super :: ID0 > ; # [ doc = "Register ID0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 0 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word00](word00) module" ] pub type WORD00 = crate :: Reg < u32 , _WORD00 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD00 ; # [ doc = "`read()` method returns [word00::R](word00::R) reader structure" ] impl crate :: Readable for WORD00 { } # [ doc = "`write(|w| ..)` method takes [word00::W](word00::W) writer structure" ] impl crate :: Writable for WORD00 { } # [ doc = "Message Buffer 0 WORD0 Register" ] pub mod word00 { # [ doc = "Reader of register WORD00" ] pub type R = crate :: R < u32 , super :: WORD00 > ; # [ doc = "Writer for register WORD00" ] pub type W = crate :: W < u32 , super :: WORD00 > ; # [ doc = "Register WORD00 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD00 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 0 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word10](word10) module" ] pub type WORD10 = crate :: Reg < u32 , _WORD10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD10 ; # [ doc = "`read()` method returns [word10::R](word10::R) reader structure" ] impl crate :: Readable for WORD10 { } # [ doc = "`write(|w| ..)` method takes [word10::W](word10::W) writer structure" ] impl crate :: Writable for WORD10 { } # [ doc = "Message Buffer 0 WORD1 Register" ] pub mod word10 { # [ doc = "Reader of register WORD10" ] pub type R = crate :: R < u32 , super :: WORD10 > ; # [ doc = "Writer for register WORD10" ] pub type W = crate :: W < u32 , super :: WORD10 > ; # [ doc = "Register WORD10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 1 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs1](cs1) module" ] pub type CS1 = crate :: Reg < u32 , _CS1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS1 ; # [ doc = "`read()` method returns [cs1::R](cs1::R) reader structure" ] impl crate :: Readable for CS1 { } # [ doc = "`write(|w| ..)` method takes [cs1::W](cs1::W) writer structure" ] impl crate :: Writable for CS1 { } # [ doc = "Message Buffer 1 CS Register" ] pub mod cs1 { # [ doc = "Reader of register CS1" ] pub type R = crate :: R < u32 , super :: CS1 > ; # [ doc = "Writer for register CS1" ] pub type W = crate :: W < u32 , super :: CS1 > ; # [ doc = "Register CS1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 1 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id1](id1) module" ] pub type ID1 = crate :: Reg < u32 , _ID1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID1 ; # [ doc = "`read()` method returns [id1::R](id1::R) reader structure" ] impl crate :: Readable for ID1 { } # [ doc = "`write(|w| ..)` method takes [id1::W](id1::W) writer structure" ] impl crate :: Writable for ID1 { } # [ doc = "Message Buffer 1 ID Register" ] pub mod id1 { # [ doc = "Reader of register ID1" ] pub type R = crate :: R < u32 , super :: ID1 > ; # [ doc = "Writer for register ID1" ] pub type W = crate :: W < u32 , super :: ID1 > ; # [ doc = "Register ID1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 1 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word01](word01) module" ] pub type WORD01 = crate :: Reg < u32 , _WORD01 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD01 ; # [ doc = "`read()` method returns [word01::R](word01::R) reader structure" ] impl crate :: Readable for WORD01 { } # [ doc = "`write(|w| ..)` method takes [word01::W](word01::W) writer structure" ] impl crate :: Writable for WORD01 { } # [ doc = "Message Buffer 1 WORD0 Register" ] pub mod word01 { # [ doc = "Reader of register WORD01" ] pub type R = crate :: R < u32 , super :: WORD01 > ; # [ doc = "Writer for register WORD01" ] pub type W = crate :: W < u32 , super :: WORD01 > ; # [ doc = "Register WORD01 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD01 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 1 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word11](word11) module" ] pub type WORD11 = crate :: Reg < u32 , _WORD11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD11 ; # [ doc = "`read()` method returns [word11::R](word11::R) reader structure" ] impl crate :: Readable for WORD11 { } # [ doc = "`write(|w| ..)` method takes [word11::W](word11::W) writer structure" ] impl crate :: Writable for WORD11 { } # [ doc = "Message Buffer 1 WORD1 Register" ] pub mod word11 { # [ doc = "Reader of register WORD11" ] pub type R = crate :: R < u32 , super :: WORD11 > ; # [ doc = "Writer for register WORD11" ] pub type W = crate :: W < u32 , super :: WORD11 > ; # [ doc = "Register WORD11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 2 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs2](cs2) module" ] pub type CS2 = crate :: Reg < u32 , _CS2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS2 ; # [ doc = "`read()` method returns [cs2::R](cs2::R) reader structure" ] impl crate :: Readable for CS2 { } # [ doc = "`write(|w| ..)` method takes [cs2::W](cs2::W) writer structure" ] impl crate :: Writable for CS2 { } # [ doc = "Message Buffer 2 CS Register" ] pub mod cs2 { # [ doc = "Reader of register CS2" ] pub type R = crate :: R < u32 , super :: CS2 > ; # [ doc = "Writer for register CS2" ] pub type W = crate :: W < u32 , super :: CS2 > ; # [ doc = "Register CS2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 2 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id2](id2) module" ] pub type ID2 = crate :: Reg < u32 , _ID2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID2 ; # [ doc = "`read()` method returns [id2::R](id2::R) reader structure" ] impl crate :: Readable for ID2 { } # [ doc = "`write(|w| ..)` method takes [id2::W](id2::W) writer structure" ] impl crate :: Writable for ID2 { } # [ doc = "Message Buffer 2 ID Register" ] pub mod id2 { # [ doc = "Reader of register ID2" ] pub type R = crate :: R < u32 , super :: ID2 > ; # [ doc = "Writer for register ID2" ] pub type W = crate :: W < u32 , super :: ID2 > ; # [ doc = "Register ID2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 2 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word02](word02) module" ] pub type WORD02 = crate :: Reg < u32 , _WORD02 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD02 ; # [ doc = "`read()` method returns [word02::R](word02::R) reader structure" ] impl crate :: Readable for WORD02 { } # [ doc = "`write(|w| ..)` method takes [word02::W](word02::W) writer structure" ] impl crate :: Writable for WORD02 { } # [ doc = "Message Buffer 2 WORD0 Register" ] pub mod word02 { # [ doc = "Reader of register WORD02" ] pub type R = crate :: R < u32 , super :: WORD02 > ; # [ doc = "Writer for register WORD02" ] pub type W = crate :: W < u32 , super :: WORD02 > ; # [ doc = "Register WORD02 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD02 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 2 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word12](word12) module" ] pub type WORD12 = crate :: Reg < u32 , _WORD12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD12 ; # [ doc = "`read()` method returns [word12::R](word12::R) reader structure" ] impl crate :: Readable for WORD12 { } # [ doc = "`write(|w| ..)` method takes [word12::W](word12::W) writer structure" ] impl crate :: Writable for WORD12 { } # [ doc = "Message Buffer 2 WORD1 Register" ] pub mod word12 { # [ doc = "Reader of register WORD12" ] pub type R = crate :: R < u32 , super :: WORD12 > ; # [ doc = "Writer for register WORD12" ] pub type W = crate :: W < u32 , super :: WORD12 > ; # [ doc = "Register WORD12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 3 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs3](cs3) module" ] pub type CS3 = crate :: Reg < u32 , _CS3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS3 ; # [ doc = "`read()` method returns [cs3::R](cs3::R) reader structure" ] impl crate :: Readable for CS3 { } # [ doc = "`write(|w| ..)` method takes [cs3::W](cs3::W) writer structure" ] impl crate :: Writable for CS3 { } # [ doc = "Message Buffer 3 CS Register" ] pub mod cs3 { # [ doc = "Reader of register CS3" ] pub type R = crate :: R < u32 , super :: CS3 > ; # [ doc = "Writer for register CS3" ] pub type W = crate :: W < u32 , super :: CS3 > ; # [ doc = "Register CS3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 3 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id3](id3) module" ] pub type ID3 = crate :: Reg < u32 , _ID3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID3 ; # [ doc = "`read()` method returns [id3::R](id3::R) reader structure" ] impl crate :: Readable for ID3 { } # [ doc = "`write(|w| ..)` method takes [id3::W](id3::W) writer structure" ] impl crate :: Writable for ID3 { } # [ doc = "Message Buffer 3 ID Register" ] pub mod id3 { # [ doc = "Reader of register ID3" ] pub type R = crate :: R < u32 , super :: ID3 > ; # [ doc = "Writer for register ID3" ] pub type W = crate :: W < u32 , super :: ID3 > ; # [ doc = "Register ID3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 3 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word03](word03) module" ] pub type WORD03 = crate :: Reg < u32 , _WORD03 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD03 ; # [ doc = "`read()` method returns [word03::R](word03::R) reader structure" ] impl crate :: Readable for WORD03 { } # [ doc = "`write(|w| ..)` method takes [word03::W](word03::W) writer structure" ] impl crate :: Writable for WORD03 { } # [ doc = "Message Buffer 3 WORD0 Register" ] pub mod word03 { # [ doc = "Reader of register WORD03" ] pub type R = crate :: R < u32 , super :: WORD03 > ; # [ doc = "Writer for register WORD03" ] pub type W = crate :: W < u32 , super :: WORD03 > ; # [ doc = "Register WORD03 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD03 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 3 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word13](word13) module" ] pub type WORD13 = crate :: Reg < u32 , _WORD13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD13 ; # [ doc = "`read()` method returns [word13::R](word13::R) reader structure" ] impl crate :: Readable for WORD13 { } # [ doc = "`write(|w| ..)` method takes [word13::W](word13::W) writer structure" ] impl crate :: Writable for WORD13 { } # [ doc = "Message Buffer 3 WORD1 Register" ] pub mod word13 { # [ doc = "Reader of register WORD13" ] pub type R = crate :: R < u32 , super :: WORD13 > ; # [ doc = "Writer for register WORD13" ] pub type W = crate :: W < u32 , super :: WORD13 > ; # [ doc = "Register WORD13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 4 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs4](cs4) module" ] pub type CS4 = crate :: Reg < u32 , _CS4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS4 ; # [ doc = "`read()` method returns [cs4::R](cs4::R) reader structure" ] impl crate :: Readable for CS4 { } # [ doc = "`write(|w| ..)` method takes [cs4::W](cs4::W) writer structure" ] impl crate :: Writable for CS4 { } # [ doc = "Message Buffer 4 CS Register" ] pub mod cs4 { # [ doc = "Reader of register CS4" ] pub type R = crate :: R < u32 , super :: CS4 > ; # [ doc = "Writer for register CS4" ] pub type W = crate :: W < u32 , super :: CS4 > ; # [ doc = "Register CS4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 4 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id4](id4) module" ] pub type ID4 = crate :: Reg < u32 , _ID4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID4 ; # [ doc = "`read()` method returns [id4::R](id4::R) reader structure" ] impl crate :: Readable for ID4 { } # [ doc = "`write(|w| ..)` method takes [id4::W](id4::W) writer structure" ] impl crate :: Writable for ID4 { } # [ doc = "Message Buffer 4 ID Register" ] pub mod id4 { # [ doc = "Reader of register ID4" ] pub type R = crate :: R < u32 , super :: ID4 > ; # [ doc = "Writer for register ID4" ] pub type W = crate :: W < u32 , super :: ID4 > ; # [ doc = "Register ID4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 4 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word04](word04) module" ] pub type WORD04 = crate :: Reg < u32 , _WORD04 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD04 ; # [ doc = "`read()` method returns [word04::R](word04::R) reader structure" ] impl crate :: Readable for WORD04 { } # [ doc = "`write(|w| ..)` method takes [word04::W](word04::W) writer structure" ] impl crate :: Writable for WORD04 { } # [ doc = "Message Buffer 4 WORD0 Register" ] pub mod word04 { # [ doc = "Reader of register WORD04" ] pub type R = crate :: R < u32 , super :: WORD04 > ; # [ doc = "Writer for register WORD04" ] pub type W = crate :: W < u32 , super :: WORD04 > ; # [ doc = "Register WORD04 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD04 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 4 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word14](word14) module" ] pub type WORD14 = crate :: Reg < u32 , _WORD14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD14 ; # [ doc = "`read()` method returns [word14::R](word14::R) reader structure" ] impl crate :: Readable for WORD14 { } # [ doc = "`write(|w| ..)` method takes [word14::W](word14::W) writer structure" ] impl crate :: Writable for WORD14 { } # [ doc = "Message Buffer 4 WORD1 Register" ] pub mod word14 { # [ doc = "Reader of register WORD14" ] pub type R = crate :: R < u32 , super :: WORD14 > ; # [ doc = "Writer for register WORD14" ] pub type W = crate :: W < u32 , super :: WORD14 > ; # [ doc = "Register WORD14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 5 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs5](cs5) module" ] pub type CS5 = crate :: Reg < u32 , _CS5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS5 ; # [ doc = "`read()` method returns [cs5::R](cs5::R) reader structure" ] impl crate :: Readable for CS5 { } # [ doc = "`write(|w| ..)` method takes [cs5::W](cs5::W) writer structure" ] impl crate :: Writable for CS5 { } # [ doc = "Message Buffer 5 CS Register" ] pub mod cs5 { # [ doc = "Reader of register CS5" ] pub type R = crate :: R < u32 , super :: CS5 > ; # [ doc = "Writer for register CS5" ] pub type W = crate :: W < u32 , super :: CS5 > ; # [ doc = "Register CS5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 5 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id5](id5) module" ] pub type ID5 = crate :: Reg < u32 , _ID5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID5 ; # [ doc = "`read()` method returns [id5::R](id5::R) reader structure" ] impl crate :: Readable for ID5 { } # [ doc = "`write(|w| ..)` method takes [id5::W](id5::W) writer structure" ] impl crate :: Writable for ID5 { } # [ doc = "Message Buffer 5 ID Register" ] pub mod id5 { # [ doc = "Reader of register ID5" ] pub type R = crate :: R < u32 , super :: ID5 > ; # [ doc = "Writer for register ID5" ] pub type W = crate :: W < u32 , super :: ID5 > ; # [ doc = "Register ID5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 5 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word05](word05) module" ] pub type WORD05 = crate :: Reg < u32 , _WORD05 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD05 ; # [ doc = "`read()` method returns [word05::R](word05::R) reader structure" ] impl crate :: Readable for WORD05 { } # [ doc = "`write(|w| ..)` method takes [word05::W](word05::W) writer structure" ] impl crate :: Writable for WORD05 { } # [ doc = "Message Buffer 5 WORD0 Register" ] pub mod word05 { # [ doc = "Reader of register WORD05" ] pub type R = crate :: R < u32 , super :: WORD05 > ; # [ doc = "Writer for register WORD05" ] pub type W = crate :: W < u32 , super :: WORD05 > ; # [ doc = "Register WORD05 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD05 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 5 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word15](word15) module" ] pub type WORD15 = crate :: Reg < u32 , _WORD15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD15 ; # [ doc = "`read()` method returns [word15::R](word15::R) reader structure" ] impl crate :: Readable for WORD15 { } # [ doc = "`write(|w| ..)` method takes [word15::W](word15::W) writer structure" ] impl crate :: Writable for WORD15 { } # [ doc = "Message Buffer 5 WORD1 Register" ] pub mod word15 { # [ doc = "Reader of register WORD15" ] pub type R = crate :: R < u32 , super :: WORD15 > ; # [ doc = "Writer for register WORD15" ] pub type W = crate :: W < u32 , super :: WORD15 > ; # [ doc = "Register WORD15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 6 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs6](cs6) module" ] pub type CS6 = crate :: Reg < u32 , _CS6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS6 ; # [ doc = "`read()` method returns [cs6::R](cs6::R) reader structure" ] impl crate :: Readable for CS6 { } # [ doc = "`write(|w| ..)` method takes [cs6::W](cs6::W) writer structure" ] impl crate :: Writable for CS6 { } # [ doc = "Message Buffer 6 CS Register" ] pub mod cs6 { # [ doc = "Reader of register CS6" ] pub type R = crate :: R < u32 , super :: CS6 > ; # [ doc = "Writer for register CS6" ] pub type W = crate :: W < u32 , super :: CS6 > ; # [ doc = "Register CS6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 6 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id6](id6) module" ] pub type ID6 = crate :: Reg < u32 , _ID6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID6 ; # [ doc = "`read()` method returns [id6::R](id6::R) reader structure" ] impl crate :: Readable for ID6 { } # [ doc = "`write(|w| ..)` method takes [id6::W](id6::W) writer structure" ] impl crate :: Writable for ID6 { } # [ doc = "Message Buffer 6 ID Register" ] pub mod id6 { # [ doc = "Reader of register ID6" ] pub type R = crate :: R < u32 , super :: ID6 > ; # [ doc = "Writer for register ID6" ] pub type W = crate :: W < u32 , super :: ID6 > ; # [ doc = "Register ID6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 6 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word06](word06) module" ] pub type WORD06 = crate :: Reg < u32 , _WORD06 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD06 ; # [ doc = "`read()` method returns [word06::R](word06::R) reader structure" ] impl crate :: Readable for WORD06 { } # [ doc = "`write(|w| ..)` method takes [word06::W](word06::W) writer structure" ] impl crate :: Writable for WORD06 { } # [ doc = "Message Buffer 6 WORD0 Register" ] pub mod word06 { # [ doc = "Reader of register WORD06" ] pub type R = crate :: R < u32 , super :: WORD06 > ; # [ doc = "Writer for register WORD06" ] pub type W = crate :: W < u32 , super :: WORD06 > ; # [ doc = "Register WORD06 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD06 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 6 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word16](word16) module" ] pub type WORD16 = crate :: Reg < u32 , _WORD16 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD16 ; # [ doc = "`read()` method returns [word16::R](word16::R) reader structure" ] impl crate :: Readable for WORD16 { } # [ doc = "`write(|w| ..)` method takes [word16::W](word16::W) writer structure" ] impl crate :: Writable for WORD16 { } # [ doc = "Message Buffer 6 WORD1 Register" ] pub mod word16 { # [ doc = "Reader of register WORD16" ] pub type R = crate :: R < u32 , super :: WORD16 > ; # [ doc = "Writer for register WORD16" ] pub type W = crate :: W < u32 , super :: WORD16 > ; # [ doc = "Register WORD16 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD16 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 7 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs7](cs7) module" ] pub type CS7 = crate :: Reg < u32 , _CS7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS7 ; # [ doc = "`read()` method returns [cs7::R](cs7::R) reader structure" ] impl crate :: Readable for CS7 { } # [ doc = "`write(|w| ..)` method takes [cs7::W](cs7::W) writer structure" ] impl crate :: Writable for CS7 { } # [ doc = "Message Buffer 7 CS Register" ] pub mod cs7 { # [ doc = "Reader of register CS7" ] pub type R = crate :: R < u32 , super :: CS7 > ; # [ doc = "Writer for register CS7" ] pub type W = crate :: W < u32 , super :: CS7 > ; # [ doc = "Register CS7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 7 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id7](id7) module" ] pub type ID7 = crate :: Reg < u32 , _ID7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID7 ; # [ doc = "`read()` method returns [id7::R](id7::R) reader structure" ] impl crate :: Readable for ID7 { } # [ doc = "`write(|w| ..)` method takes [id7::W](id7::W) writer structure" ] impl crate :: Writable for ID7 { } # [ doc = "Message Buffer 7 ID Register" ] pub mod id7 { # [ doc = "Reader of register ID7" ] pub type R = crate :: R < u32 , super :: ID7 > ; # [ doc = "Writer for register ID7" ] pub type W = crate :: W < u32 , super :: ID7 > ; # [ doc = "Register ID7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 7 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word07](word07) module" ] pub type WORD07 = crate :: Reg < u32 , _WORD07 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD07 ; # [ doc = "`read()` method returns [word07::R](word07::R) reader structure" ] impl crate :: Readable for WORD07 { } # [ doc = "`write(|w| ..)` method takes [word07::W](word07::W) writer structure" ] impl crate :: Writable for WORD07 { } # [ doc = "Message Buffer 7 WORD0 Register" ] pub mod word07 { # [ doc = "Reader of register WORD07" ] pub type R = crate :: R < u32 , super :: WORD07 > ; # [ doc = "Writer for register WORD07" ] pub type W = crate :: W < u32 , super :: WORD07 > ; # [ doc = "Register WORD07 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD07 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 7 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word17](word17) module" ] pub type WORD17 = crate :: Reg < u32 , _WORD17 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD17 ; # [ doc = "`read()` method returns [word17::R](word17::R) reader structure" ] impl crate :: Readable for WORD17 { } # [ doc = "`write(|w| ..)` method takes [word17::W](word17::W) writer structure" ] impl crate :: Writable for WORD17 { } # [ doc = "Message Buffer 7 WORD1 Register" ] pub mod word17 { # [ doc = "Reader of register WORD17" ] pub type R = crate :: R < u32 , super :: WORD17 > ; # [ doc = "Writer for register WORD17" ] pub type W = crate :: W < u32 , super :: WORD17 > ; # [ doc = "Register WORD17 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD17 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 8 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs8](cs8) module" ] pub type CS8 = crate :: Reg < u32 , _CS8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS8 ; # [ doc = "`read()` method returns [cs8::R](cs8::R) reader structure" ] impl crate :: Readable for CS8 { } # [ doc = "`write(|w| ..)` method takes [cs8::W](cs8::W) writer structure" ] impl crate :: Writable for CS8 { } # [ doc = "Message Buffer 8 CS Register" ] pub mod cs8 { # [ doc = "Reader of register CS8" ] pub type R = crate :: R < u32 , super :: CS8 > ; # [ doc = "Writer for register CS8" ] pub type W = crate :: W < u32 , super :: CS8 > ; # [ doc = "Register CS8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 8 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id8](id8) module" ] pub type ID8 = crate :: Reg < u32 , _ID8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID8 ; # [ doc = "`read()` method returns [id8::R](id8::R) reader structure" ] impl crate :: Readable for ID8 { } # [ doc = "`write(|w| ..)` method takes [id8::W](id8::W) writer structure" ] impl crate :: Writable for ID8 { } # [ doc = "Message Buffer 8 ID Register" ] pub mod id8 { # [ doc = "Reader of register ID8" ] pub type R = crate :: R < u32 , super :: ID8 > ; # [ doc = "Writer for register ID8" ] pub type W = crate :: W < u32 , super :: ID8 > ; # [ doc = "Register ID8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 8 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word08](word08) module" ] pub type WORD08 = crate :: Reg < u32 , _WORD08 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD08 ; # [ doc = "`read()` method returns [word08::R](word08::R) reader structure" ] impl crate :: Readable for WORD08 { } # [ doc = "`write(|w| ..)` method takes [word08::W](word08::W) writer structure" ] impl crate :: Writable for WORD08 { } # [ doc = "Message Buffer 8 WORD0 Register" ] pub mod word08 { # [ doc = "Reader of register WORD08" ] pub type R = crate :: R < u32 , super :: WORD08 > ; # [ doc = "Writer for register WORD08" ] pub type W = crate :: W < u32 , super :: WORD08 > ; # [ doc = "Register WORD08 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD08 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 8 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word18](word18) module" ] pub type WORD18 = crate :: Reg < u32 , _WORD18 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD18 ; # [ doc = "`read()` method returns [word18::R](word18::R) reader structure" ] impl crate :: Readable for WORD18 { } # [ doc = "`write(|w| ..)` method takes [word18::W](word18::W) writer structure" ] impl crate :: Writable for WORD18 { } # [ doc = "Message Buffer 8 WORD1 Register" ] pub mod word18 { # [ doc = "Reader of register WORD18" ] pub type R = crate :: R < u32 , super :: WORD18 > ; # [ doc = "Writer for register WORD18" ] pub type W = crate :: W < u32 , super :: WORD18 > ; # [ doc = "Register WORD18 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD18 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 9 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs9](cs9) module" ] pub type CS9 = crate :: Reg < u32 , _CS9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS9 ; # [ doc = "`read()` method returns [cs9::R](cs9::R) reader structure" ] impl crate :: Readable for CS9 { } # [ doc = "`write(|w| ..)` method takes [cs9::W](cs9::W) writer structure" ] impl crate :: Writable for CS9 { } # [ doc = "Message Buffer 9 CS Register" ] pub mod cs9 { # [ doc = "Reader of register CS9" ] pub type R = crate :: R < u32 , super :: CS9 > ; # [ doc = "Writer for register CS9" ] pub type W = crate :: W < u32 , super :: CS9 > ; # [ doc = "Register CS9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 9 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id9](id9) module" ] pub type ID9 = crate :: Reg < u32 , _ID9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID9 ; # [ doc = "`read()` method returns [id9::R](id9::R) reader structure" ] impl crate :: Readable for ID9 { } # [ doc = "`write(|w| ..)` method takes [id9::W](id9::W) writer structure" ] impl crate :: Writable for ID9 { } # [ doc = "Message Buffer 9 ID Register" ] pub mod id9 { # [ doc = "Reader of register ID9" ] pub type R = crate :: R < u32 , super :: ID9 > ; # [ doc = "Writer for register ID9" ] pub type W = crate :: W < u32 , super :: ID9 > ; # [ doc = "Register ID9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 9 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word09](word09) module" ] pub type WORD09 = crate :: Reg < u32 , _WORD09 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD09 ; # [ doc = "`read()` method returns [word09::R](word09::R) reader structure" ] impl crate :: Readable for WORD09 { } # [ doc = "`write(|w| ..)` method takes [word09::W](word09::W) writer structure" ] impl crate :: Writable for WORD09 { } # [ doc = "Message Buffer 9 WORD0 Register" ] pub mod word09 { # [ doc = "Reader of register WORD09" ] pub type R = crate :: R < u32 , super :: WORD09 > ; # [ doc = "Writer for register WORD09" ] pub type W = crate :: W < u32 , super :: WORD09 > ; # [ doc = "Register WORD09 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD09 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 9 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word19](word19) module" ] pub type WORD19 = crate :: Reg < u32 , _WORD19 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD19 ; # [ doc = "`read()` method returns [word19::R](word19::R) reader structure" ] impl crate :: Readable for WORD19 { } # [ doc = "`write(|w| ..)` method takes [word19::W](word19::W) writer structure" ] impl crate :: Writable for WORD19 { } # [ doc = "Message Buffer 9 WORD1 Register" ] pub mod word19 { # [ doc = "Reader of register WORD19" ] pub type R = crate :: R < u32 , super :: WORD19 > ; # [ doc = "Writer for register WORD19" ] pub type W = crate :: W < u32 , super :: WORD19 > ; # [ doc = "Register WORD19 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD19 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 10 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs10](cs10) module" ] pub type CS10 = crate :: Reg < u32 , _CS10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS10 ; # [ doc = "`read()` method returns [cs10::R](cs10::R) reader structure" ] impl crate :: Readable for CS10 { } # [ doc = "`write(|w| ..)` method takes [cs10::W](cs10::W) writer structure" ] impl crate :: Writable for CS10 { } # [ doc = "Message Buffer 10 CS Register" ] pub mod cs10 { # [ doc = "Reader of register CS10" ] pub type R = crate :: R < u32 , super :: CS10 > ; # [ doc = "Writer for register CS10" ] pub type W = crate :: W < u32 , super :: CS10 > ; # [ doc = "Register CS10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 10 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id10](id10) module" ] pub type ID10 = crate :: Reg < u32 , _ID10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID10 ; # [ doc = "`read()` method returns [id10::R](id10::R) reader structure" ] impl crate :: Readable for ID10 { } # [ doc = "`write(|w| ..)` method takes [id10::W](id10::W) writer structure" ] impl crate :: Writable for ID10 { } # [ doc = "Message Buffer 10 ID Register" ] pub mod id10 { # [ doc = "Reader of register ID10" ] pub type R = crate :: R < u32 , super :: ID10 > ; # [ doc = "Writer for register ID10" ] pub type W = crate :: W < u32 , super :: ID10 > ; # [ doc = "Register ID10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 10 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word010](word010) module" ] pub type WORD010 = crate :: Reg < u32 , _WORD010 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD010 ; # [ doc = "`read()` method returns [word010::R](word010::R) reader structure" ] impl crate :: Readable for WORD010 { } # [ doc = "`write(|w| ..)` method takes [word010::W](word010::W) writer structure" ] impl crate :: Writable for WORD010 { } # [ doc = "Message Buffer 10 WORD0 Register" ] pub mod word010 { # [ doc = "Reader of register WORD010" ] pub type R = crate :: R < u32 , super :: WORD010 > ; # [ doc = "Writer for register WORD010" ] pub type W = crate :: W < u32 , super :: WORD010 > ; # [ doc = "Register WORD010 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD010 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 10 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word110](word110) module" ] pub type WORD110 = crate :: Reg < u32 , _WORD110 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD110 ; # [ doc = "`read()` method returns [word110::R](word110::R) reader structure" ] impl crate :: Readable for WORD110 { } # [ doc = "`write(|w| ..)` method takes [word110::W](word110::W) writer structure" ] impl crate :: Writable for WORD110 { } # [ doc = "Message Buffer 10 WORD1 Register" ] pub mod word110 { # [ doc = "Reader of register WORD110" ] pub type R = crate :: R < u32 , super :: WORD110 > ; # [ doc = "Writer for register WORD110" ] pub type W = crate :: W < u32 , super :: WORD110 > ; # [ doc = "Register WORD110 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD110 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 11 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs11](cs11) module" ] pub type CS11 = crate :: Reg < u32 , _CS11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS11 ; # [ doc = "`read()` method returns [cs11::R](cs11::R) reader structure" ] impl crate :: Readable for CS11 { } # [ doc = "`write(|w| ..)` method takes [cs11::W](cs11::W) writer structure" ] impl crate :: Writable for CS11 { } # [ doc = "Message Buffer 11 CS Register" ] pub mod cs11 { # [ doc = "Reader of register CS11" ] pub type R = crate :: R < u32 , super :: CS11 > ; # [ doc = "Writer for register CS11" ] pub type W = crate :: W < u32 , super :: CS11 > ; # [ doc = "Register CS11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 11 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id11](id11) module" ] pub type ID11 = crate :: Reg < u32 , _ID11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID11 ; # [ doc = "`read()` method returns [id11::R](id11::R) reader structure" ] impl crate :: Readable for ID11 { } # [ doc = "`write(|w| ..)` method takes [id11::W](id11::W) writer structure" ] impl crate :: Writable for ID11 { } # [ doc = "Message Buffer 11 ID Register" ] pub mod id11 { # [ doc = "Reader of register ID11" ] pub type R = crate :: R < u32 , super :: ID11 > ; # [ doc = "Writer for register ID11" ] pub type W = crate :: W < u32 , super :: ID11 > ; # [ doc = "Register ID11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 11 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word011](word011) module" ] pub type WORD011 = crate :: Reg < u32 , _WORD011 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD011 ; # [ doc = "`read()` method returns [word011::R](word011::R) reader structure" ] impl crate :: Readable for WORD011 { } # [ doc = "`write(|w| ..)` method takes [word011::W](word011::W) writer structure" ] impl crate :: Writable for WORD011 { } # [ doc = "Message Buffer 11 WORD0 Register" ] pub mod word011 { # [ doc = "Reader of register WORD011" ] pub type R = crate :: R < u32 , super :: WORD011 > ; # [ doc = "Writer for register WORD011" ] pub type W = crate :: W < u32 , super :: WORD011 > ; # [ doc = "Register WORD011 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD011 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 11 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word111](word111) module" ] pub type WORD111 = crate :: Reg < u32 , _WORD111 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD111 ; # [ doc = "`read()` method returns [word111::R](word111::R) reader structure" ] impl crate :: Readable for WORD111 { } # [ doc = "`write(|w| ..)` method takes [word111::W](word111::W) writer structure" ] impl crate :: Writable for WORD111 { } # [ doc = "Message Buffer 11 WORD1 Register" ] pub mod word111 { # [ doc = "Reader of register WORD111" ] pub type R = crate :: R < u32 , super :: WORD111 > ; # [ doc = "Writer for register WORD111" ] pub type W = crate :: W < u32 , super :: WORD111 > ; # [ doc = "Register WORD111 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD111 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 12 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs12](cs12) module" ] pub type CS12 = crate :: Reg < u32 , _CS12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS12 ; # [ doc = "`read()` method returns [cs12::R](cs12::R) reader structure" ] impl crate :: Readable for CS12 { } # [ doc = "`write(|w| ..)` method takes [cs12::W](cs12::W) writer structure" ] impl crate :: Writable for CS12 { } # [ doc = "Message Buffer 12 CS Register" ] pub mod cs12 { # [ doc = "Reader of register CS12" ] pub type R = crate :: R < u32 , super :: CS12 > ; # [ doc = "Writer for register CS12" ] pub type W = crate :: W < u32 , super :: CS12 > ; # [ doc = "Register CS12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 12 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id12](id12) module" ] pub type ID12 = crate :: Reg < u32 , _ID12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID12 ; # [ doc = "`read()` method returns [id12::R](id12::R) reader structure" ] impl crate :: Readable for ID12 { } # [ doc = "`write(|w| ..)` method takes [id12::W](id12::W) writer structure" ] impl crate :: Writable for ID12 { } # [ doc = "Message Buffer 12 ID Register" ] pub mod id12 { # [ doc = "Reader of register ID12" ] pub type R = crate :: R < u32 , super :: ID12 > ; # [ doc = "Writer for register ID12" ] pub type W = crate :: W < u32 , super :: ID12 > ; # [ doc = "Register ID12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 12 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word012](word012) module" ] pub type WORD012 = crate :: Reg < u32 , _WORD012 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD012 ; # [ doc = "`read()` method returns [word012::R](word012::R) reader structure" ] impl crate :: Readable for WORD012 { } # [ doc = "`write(|w| ..)` method takes [word012::W](word012::W) writer structure" ] impl crate :: Writable for WORD012 { } # [ doc = "Message Buffer 12 WORD0 Register" ] pub mod word012 { # [ doc = "Reader of register WORD012" ] pub type R = crate :: R < u32 , super :: WORD012 > ; # [ doc = "Writer for register WORD012" ] pub type W = crate :: W < u32 , super :: WORD012 > ; # [ doc = "Register WORD012 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD012 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 12 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word112](word112) module" ] pub type WORD112 = crate :: Reg < u32 , _WORD112 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD112 ; # [ doc = "`read()` method returns [word112::R](word112::R) reader structure" ] impl crate :: Readable for WORD112 { } # [ doc = "`write(|w| ..)` method takes [word112::W](word112::W) writer structure" ] impl crate :: Writable for WORD112 { } # [ doc = "Message Buffer 12 WORD1 Register" ] pub mod word112 { # [ doc = "Reader of register WORD112" ] pub type R = crate :: R < u32 , super :: WORD112 > ; # [ doc = "Writer for register WORD112" ] pub type W = crate :: W < u32 , super :: WORD112 > ; # [ doc = "Register WORD112 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD112 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 13 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs13](cs13) module" ] pub type CS13 = crate :: Reg < u32 , _CS13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS13 ; # [ doc = "`read()` method returns [cs13::R](cs13::R) reader structure" ] impl crate :: Readable for CS13 { } # [ doc = "`write(|w| ..)` method takes [cs13::W](cs13::W) writer structure" ] impl crate :: Writable for CS13 { } # [ doc = "Message Buffer 13 CS Register" ] pub mod cs13 { # [ doc = "Reader of register CS13" ] pub type R = crate :: R < u32 , super :: CS13 > ; # [ doc = "Writer for register CS13" ] pub type W = crate :: W < u32 , super :: CS13 > ; # [ doc = "Register CS13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 13 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id13](id13) module" ] pub type ID13 = crate :: Reg < u32 , _ID13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID13 ; # [ doc = "`read()` method returns [id13::R](id13::R) reader structure" ] impl crate :: Readable for ID13 { } # [ doc = "`write(|w| ..)` method takes [id13::W](id13::W) writer structure" ] impl crate :: Writable for ID13 { } # [ doc = "Message Buffer 13 ID Register" ] pub mod id13 { # [ doc = "Reader of register ID13" ] pub type R = crate :: R < u32 , super :: ID13 > ; # [ doc = "Writer for register ID13" ] pub type W = crate :: W < u32 , super :: ID13 > ; # [ doc = "Register ID13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 13 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word013](word013) module" ] pub type WORD013 = crate :: Reg < u32 , _WORD013 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD013 ; # [ doc = "`read()` method returns [word013::R](word013::R) reader structure" ] impl crate :: Readable for WORD013 { } # [ doc = "`write(|w| ..)` method takes [word013::W](word013::W) writer structure" ] impl crate :: Writable for WORD013 { } # [ doc = "Message Buffer 13 WORD0 Register" ] pub mod word013 { # [ doc = "Reader of register WORD013" ] pub type R = crate :: R < u32 , super :: WORD013 > ; # [ doc = "Writer for register WORD013" ] pub type W = crate :: W < u32 , super :: WORD013 > ; # [ doc = "Register WORD013 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD013 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 13 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word113](word113) module" ] pub type WORD113 = crate :: Reg < u32 , _WORD113 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD113 ; # [ doc = "`read()` method returns [word113::R](word113::R) reader structure" ] impl crate :: Readable for WORD113 { } # [ doc = "`write(|w| ..)` method takes [word113::W](word113::W) writer structure" ] impl crate :: Writable for WORD113 { } # [ doc = "Message Buffer 13 WORD1 Register" ] pub mod word113 { # [ doc = "Reader of register WORD113" ] pub type R = crate :: R < u32 , super :: WORD113 > ; # [ doc = "Writer for register WORD113" ] pub type W = crate :: W < u32 , super :: WORD113 > ; # [ doc = "Register WORD113 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD113 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 14 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs14](cs14) module" ] pub type CS14 = crate :: Reg < u32 , _CS14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS14 ; # [ doc = "`read()` method returns [cs14::R](cs14::R) reader structure" ] impl crate :: Readable for CS14 { } # [ doc = "`write(|w| ..)` method takes [cs14::W](cs14::W) writer structure" ] impl crate :: Writable for CS14 { } # [ doc = "Message Buffer 14 CS Register" ] pub mod cs14 { # [ doc = "Reader of register CS14" ] pub type R = crate :: R < u32 , super :: CS14 > ; # [ doc = "Writer for register CS14" ] pub type W = crate :: W < u32 , super :: CS14 > ; # [ doc = "Register CS14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 14 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id14](id14) module" ] pub type ID14 = crate :: Reg < u32 , _ID14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID14 ; # [ doc = "`read()` method returns [id14::R](id14::R) reader structure" ] impl crate :: Readable for ID14 { } # [ doc = "`write(|w| ..)` method takes [id14::W](id14::W) writer structure" ] impl crate :: Writable for ID14 { } # [ doc = "Message Buffer 14 ID Register" ] pub mod id14 { # [ doc = "Reader of register ID14" ] pub type R = crate :: R < u32 , super :: ID14 > ; # [ doc = "Writer for register ID14" ] pub type W = crate :: W < u32 , super :: ID14 > ; # [ doc = "Register ID14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 14 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word014](word014) module" ] pub type WORD014 = crate :: Reg < u32 , _WORD014 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD014 ; # [ doc = "`read()` method returns [word014::R](word014::R) reader structure" ] impl crate :: Readable for WORD014 { } # [ doc = "`write(|w| ..)` method takes [word014::W](word014::W) writer structure" ] impl crate :: Writable for WORD014 { } # [ doc = "Message Buffer 14 WORD0 Register" ] pub mod word014 { # [ doc = "Reader of register WORD014" ] pub type R = crate :: R < u32 , super :: WORD014 > ; # [ doc = "Writer for register WORD014" ] pub type W = crate :: W < u32 , super :: WORD014 > ; # [ doc = "Register WORD014 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD014 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 14 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word114](word114) module" ] pub type WORD114 = crate :: Reg < u32 , _WORD114 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD114 ; # [ doc = "`read()` method returns [word114::R](word114::R) reader structure" ] impl crate :: Readable for WORD114 { } # [ doc = "`write(|w| ..)` method takes [word114::W](word114::W) writer structure" ] impl crate :: Writable for WORD114 { } # [ doc = "Message Buffer 14 WORD1 Register" ] pub mod word114 { # [ doc = "Reader of register WORD114" ] pub type R = crate :: R < u32 , super :: WORD114 > ; # [ doc = "Writer for register WORD114" ] pub type W = crate :: W < u32 , super :: WORD114 > ; # [ doc = "Register WORD114 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD114 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Message Buffer 15 CS Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs15](cs15) module" ] pub type CS15 = crate :: Reg < u32 , _CS15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CS15 ; # [ doc = "`read()` method returns [cs15::R](cs15::R) reader structure" ] impl crate :: Readable for CS15 { } # [ doc = "`write(|w| ..)` method takes [cs15::W](cs15::W) writer structure" ] impl crate :: Writable for CS15 { } # [ doc = "Message Buffer 15 CS Register" ] pub mod cs15 { # [ doc = "Reader of register CS15" ] pub type R = crate :: R < u32 , super :: CS15 > ; # [ doc = "Writer for register CS15" ] pub type W = crate :: W < u32 , super :: CS15 > ; # [ doc = "Register CS15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CS15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIME_STAMP`" ] pub type TIME_STAMP_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIME_STAMP`" ] pub struct TIME_STAMP_W < 'a > { w : & 'a mut W , } impl < 'a > TIME_STAMP_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLC`" ] pub type DLC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DLC`" ] pub struct DLC_W < 'a > { w : & 'a mut W , } impl < 'a > DLC_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `RTR`" ] pub type RTR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RTR`" ] pub struct RTR_W < 'a > { w : & 'a mut W , } impl < 'a > RTR_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 = "Reader of field `IDE`" ] pub type IDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDE`" ] pub struct IDE_W < 'a > { w : & 'a mut W , } impl < 'a > IDE_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 = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CODE`" ] pub type CODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CODE`" ] pub struct CODE_W < 'a > { w : & 'a mut W , } impl < 'a > CODE_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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & self ) -> TIME_STAMP_R { TIME_STAMP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & self ) -> DLC_R { DLC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & self ) -> RTR_R { RTR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & self ) -> IDE_R { IDE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & self ) -> CODE_R { CODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Free-Running Counter Time stamp. This 16-bit field is a copy of the Free-Running Timer, captured for Tx and Rx frames at the time when the beginning of the Identifier field appears on the CAN bus." ] # [ inline ( always ) ] pub fn time_stamp ( & mut self ) -> TIME_STAMP_W { TIME_STAMP_W { w : self } } # [ doc = "Bits 16:19 - Length of the data to be stored/transmitted." ] # [ inline ( always ) ] pub fn dlc ( & mut self ) -> DLC_W { DLC_W { w : self } } # [ doc = "Bit 20 - Remote Transmission Request. One/zero for remote/data frame." ] # [ inline ( always ) ] pub fn rtr ( & mut self ) -> RTR_W { RTR_W { w : self } } # [ doc = "Bit 21 - ID Extended. One/zero for extended/standard format frame." ] # [ inline ( always ) ] pub fn ide ( & mut self ) -> IDE_W { IDE_W { w : self } } # [ doc = "Bit 22 - Substitute Remote Request. Contains a fixed recessive bit." ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bits 24:27 - Reserved" ] # [ inline ( always ) ] pub fn code ( & mut self ) -> CODE_W { CODE_W { w : self } } } } # [ doc = "Message Buffer 15 ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id15](id15) module" ] pub type ID15 = crate :: Reg < u32 , _ID15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID15 ; # [ doc = "`read()` method returns [id15::R](id15::R) reader structure" ] impl crate :: Readable for ID15 { } # [ doc = "`write(|w| ..)` method takes [id15::W](id15::W) writer structure" ] impl crate :: Writable for ID15 { } # [ doc = "Message Buffer 15 ID Register" ] pub mod id15 { # [ doc = "Reader of register ID15" ] pub type R = crate :: R < u32 , super :: ID15 > ; # [ doc = "Writer for register ID15" ] pub type W = crate :: W < u32 , super :: ID15 > ; # [ doc = "Register ID15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ID15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0003_ffff ) | ( ( value as u32 ) & 0x0003_ffff ) ; self . w } } # [ doc = "Reader of field `STD`" ] pub type STD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `STD`" ] pub struct STD_W < 'a > { w : & 'a mut W , } impl < 'a > STD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff << 18 ) ) | ( ( ( value as u32 ) & 0x07ff ) << 18 ) ; self . w } } # [ doc = "Reader of field `PRIO`" ] pub type PRIO_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIO`" ] pub struct PRIO_W < 'a > { w : & 'a mut W , } impl < 'a > PRIO_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 << 29 ) ) | ( ( ( value as u32 ) & 0x07 ) << 29 ) ; self . w } } impl R { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( self . bits & 0x0003_ffff ) as u32 ) } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & self ) -> STD_R { STD_R :: new ( ( ( self . bits >> 18 ) & 0x07ff ) as u16 ) } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & self ) -> PRIO_R { PRIO_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:17 - Contains extended (LOW word) identifier of message buffer." ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } # [ doc = "Bits 18:28 - Contains standard/extended (HIGH word) identifier of message buffer." ] # [ inline ( always ) ] pub fn std ( & mut self ) -> STD_W { STD_W { w : self } } # [ doc = "Bits 29:31 - Local priority. This 3-bit fieldis only used when LPRIO_EN bit is set in MCR and it only makes sense for Tx buffers. These bits are not transmitted. They are appended to the regular ID to define the transmission priority." ] # [ inline ( always ) ] pub fn prio ( & mut self ) -> PRIO_W { PRIO_W { w : self } } } } # [ doc = "Message Buffer 15 WORD0 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word015](word015) module" ] pub type WORD015 = crate :: Reg < u32 , _WORD015 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD015 ; # [ doc = "`read()` method returns [word015::R](word015::R) reader structure" ] impl crate :: Readable for WORD015 { } # [ doc = "`write(|w| ..)` method takes [word015::W](word015::W) writer structure" ] impl crate :: Writable for WORD015 { } # [ doc = "Message Buffer 15 WORD0 Register" ] pub mod word015 { # [ doc = "Reader of register WORD015" ] pub type R = crate :: R < u32 , super :: WORD015 > ; # [ doc = "Writer for register WORD015" ] pub type W = crate :: W < u32 , super :: WORD015 > ; # [ doc = "Register WORD015 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD015 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_3`" ] pub type DATA_BYTE_3_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_3`" ] pub struct DATA_BYTE_3_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_3_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_2`" ] pub type DATA_BYTE_2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_2`" ] pub struct DATA_BYTE_2_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_2_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_1`" ] pub type DATA_BYTE_1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_1`" ] pub struct DATA_BYTE_1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_1_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_0`" ] pub type DATA_BYTE_0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_0`" ] pub struct DATA_BYTE_0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_0_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & self ) -> DATA_BYTE_3_R { DATA_BYTE_3_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & self ) -> DATA_BYTE_2_R { DATA_BYTE_2_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & self ) -> DATA_BYTE_1_R { DATA_BYTE_1_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & self ) -> DATA_BYTE_0_R { DATA_BYTE_0_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 3 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_3 ( & mut self ) -> DATA_BYTE_3_W { DATA_BYTE_3_W { w : self } } # [ doc = "Bits 8:15 - Data byte 2 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_2 ( & mut self ) -> DATA_BYTE_2_W { DATA_BYTE_2_W { w : self } } # [ doc = "Bits 16:23 - Data byte 1 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_1 ( & mut self ) -> DATA_BYTE_1_W { DATA_BYTE_1_W { w : self } } # [ doc = "Bits 24:31 - Data byte 0 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_0 ( & mut self ) -> DATA_BYTE_0_W { DATA_BYTE_0_W { w : self } } } } # [ doc = "Message Buffer 15 WORD1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [word115](word115) module" ] pub type WORD115 = crate :: Reg < u32 , _WORD115 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WORD115 ; # [ doc = "`read()` method returns [word115::R](word115::R) reader structure" ] impl crate :: Readable for WORD115 { } # [ doc = "`write(|w| ..)` method takes [word115::W](word115::W) writer structure" ] impl crate :: Writable for WORD115 { } # [ doc = "Message Buffer 15 WORD1 Register" ] pub mod word115 { # [ doc = "Reader of register WORD115" ] pub type R = crate :: R < u32 , super :: WORD115 > ; # [ doc = "Writer for register WORD115" ] pub type W = crate :: W < u32 , super :: WORD115 > ; # [ doc = "Register WORD115 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WORD115 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA_BYTE_7`" ] pub type DATA_BYTE_7_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_7`" ] pub struct DATA_BYTE_7_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_7_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_6`" ] pub type DATA_BYTE_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_6`" ] pub struct DATA_BYTE_6_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_6_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_5`" ] pub type DATA_BYTE_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_5`" ] pub struct DATA_BYTE_5_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_5_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `DATA_BYTE_4`" ] pub type DATA_BYTE_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA_BYTE_4`" ] pub struct DATA_BYTE_4_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_BYTE_4_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & self ) -> DATA_BYTE_7_R { DATA_BYTE_7_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & self ) -> DATA_BYTE_6_R { DATA_BYTE_6_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & self ) -> DATA_BYTE_5_R { DATA_BYTE_5_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & self ) -> DATA_BYTE_4_R { DATA_BYTE_4_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_7 ( & mut self ) -> DATA_BYTE_7_W { DATA_BYTE_7_W { w : self } } # [ doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_6 ( & mut self ) -> DATA_BYTE_6_W { DATA_BYTE_6_W { w : self } } # [ doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_5 ( & mut self ) -> DATA_BYTE_5_W { DATA_BYTE_5_W { w : self } } # [ doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame." ] # [ inline ( always ) ] pub fn data_byte_4 ( & mut self ) -> DATA_BYTE_4_W { DATA_BYTE_4_W { w : self } } } } # [ doc = "Rx Individual Mask Registers\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rximr](rximr) module" ] pub type RXIMR = crate :: Reg < u32 , _RXIMR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXIMR ; # [ doc = "`read()` method returns [rximr::R](rximr::R) reader structure" ] impl crate :: Readable for RXIMR { } # [ doc = "`write(|w| ..)` method takes [rximr::W](rximr::W) writer structure" ] impl crate :: Writable for RXIMR { } # [ doc = "Rx Individual Mask Registers" ] pub mod rximr { # [ doc = "Reader of register RXIMR%s" ] pub type R = crate :: R < u32 , super :: RXIMR > ; # [ doc = "Writer for register RXIMR%s" ] pub type W = crate :: W < u32 , super :: RXIMR > ; # [ doc = "Register RXIMR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RXIMR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI0_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI0_A > for bool { # [ inline ( always ) ] fn from ( variant : MI0_A ) -> Self { match variant { MI0_A :: _0 => false , MI0_A :: _1 => true } } } # [ doc = "Reader of field `MI0`" ] pub type MI0_R = crate :: R < bool , MI0_A > ; impl MI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI0_A { match self . bits { false => MI0_A :: _0 , true => MI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI0_A :: _1 } } # [ doc = "Write proxy for field `MI0`" ] pub struct MI0_W < 'a > { w : & 'a mut W , } impl < 'a > MI0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI0_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI1_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI1_A > for bool { # [ inline ( always ) ] fn from ( variant : MI1_A ) -> Self { match variant { MI1_A :: _0 => false , MI1_A :: _1 => true } } } # [ doc = "Reader of field `MI1`" ] pub type MI1_R = crate :: R < bool , MI1_A > ; impl MI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI1_A { match self . bits { false => MI1_A :: _0 , true => MI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI1_A :: _1 } } # [ doc = "Write proxy for field `MI1`" ] pub struct MI1_W < 'a > { w : & 'a mut W , } impl < 'a > MI1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI1_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI1_A :: _1 ) } # [ 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 } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI2_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI2_A > for bool { # [ inline ( always ) ] fn from ( variant : MI2_A ) -> Self { match variant { MI2_A :: _0 => false , MI2_A :: _1 => true } } } # [ doc = "Reader of field `MI2`" ] pub type MI2_R = crate :: R < bool , MI2_A > ; impl MI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI2_A { match self . bits { false => MI2_A :: _0 , true => MI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI2_A :: _1 } } # [ doc = "Write proxy for field `MI2`" ] pub struct MI2_W < 'a > { w : & 'a mut W , } impl < 'a > MI2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI2_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI2_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI3_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI3_A > for bool { # [ inline ( always ) ] fn from ( variant : MI3_A ) -> Self { match variant { MI3_A :: _0 => false , MI3_A :: _1 => true } } } # [ doc = "Reader of field `MI3`" ] pub type MI3_R = crate :: R < bool , MI3_A > ; impl MI3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI3_A { match self . bits { false => MI3_A :: _0 , true => MI3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI3_A :: _1 } } # [ doc = "Write proxy for field `MI3`" ] pub struct MI3_W < 'a > { w : & 'a mut W , } impl < 'a > MI3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI3_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI4_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI4_A > for bool { # [ inline ( always ) ] fn from ( variant : MI4_A ) -> Self { match variant { MI4_A :: _0 => false , MI4_A :: _1 => true } } } # [ doc = "Reader of field `MI4`" ] pub type MI4_R = crate :: R < bool , MI4_A > ; impl MI4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI4_A { match self . bits { false => MI4_A :: _0 , true => MI4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI4_A :: _1 } } # [ doc = "Write proxy for field `MI4`" ] pub struct MI4_W < 'a > { w : & 'a mut W , } impl < 'a > MI4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI4_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI5_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI5_A > for bool { # [ inline ( always ) ] fn from ( variant : MI5_A ) -> Self { match variant { MI5_A :: _0 => false , MI5_A :: _1 => true } } } # [ doc = "Reader of field `MI5`" ] pub type MI5_R = crate :: R < bool , MI5_A > ; impl MI5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI5_A { match self . bits { false => MI5_A :: _0 , true => MI5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI5_A :: _1 } } # [ doc = "Write proxy for field `MI5`" ] pub struct MI5_W < 'a > { w : & 'a mut W , } impl < 'a > MI5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI5_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI5_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI6_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI6_A > for bool { # [ inline ( always ) ] fn from ( variant : MI6_A ) -> Self { match variant { MI6_A :: _0 => false , MI6_A :: _1 => true } } } # [ doc = "Reader of field `MI6`" ] pub type MI6_R = crate :: R < bool , MI6_A > ; impl MI6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI6_A { match self . bits { false => MI6_A :: _0 , true => MI6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI6_A :: _1 } } # [ doc = "Write proxy for field `MI6`" ] pub struct MI6_W < 'a > { w : & 'a mut W , } impl < 'a > MI6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI6_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI6_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI7_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI7_A > for bool { # [ inline ( always ) ] fn from ( variant : MI7_A ) -> Self { match variant { MI7_A :: _0 => false , MI7_A :: _1 => true } } } # [ doc = "Reader of field `MI7`" ] pub type MI7_R = crate :: R < bool , MI7_A > ; impl MI7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI7_A { match self . bits { false => MI7_A :: _0 , true => MI7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI7_A :: _1 } } # [ doc = "Write proxy for field `MI7`" ] pub struct MI7_W < 'a > { w : & 'a mut W , } impl < 'a > MI7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI7_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI7_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI8_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI8_A > for bool { # [ inline ( always ) ] fn from ( variant : MI8_A ) -> Self { match variant { MI8_A :: _0 => false , MI8_A :: _1 => true } } } # [ doc = "Reader of field `MI8`" ] pub type MI8_R = crate :: R < bool , MI8_A > ; impl MI8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI8_A { match self . bits { false => MI8_A :: _0 , true => MI8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI8_A :: _1 } } # [ doc = "Write proxy for field `MI8`" ] pub struct MI8_W < 'a > { w : & 'a mut W , } impl < 'a > MI8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI8_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI9_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI9_A > for bool { # [ inline ( always ) ] fn from ( variant : MI9_A ) -> Self { match variant { MI9_A :: _0 => false , MI9_A :: _1 => true } } } # [ doc = "Reader of field `MI9`" ] pub type MI9_R = crate :: R < bool , MI9_A > ; impl MI9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI9_A { match self . bits { false => MI9_A :: _0 , true => MI9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI9_A :: _1 } } # [ doc = "Write proxy for field `MI9`" ] pub struct MI9_W < 'a > { w : & 'a mut W , } impl < 'a > MI9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI9_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI10_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI10_A > for bool { # [ inline ( always ) ] fn from ( variant : MI10_A ) -> Self { match variant { MI10_A :: _0 => false , MI10_A :: _1 => true } } } # [ doc = "Reader of field `MI10`" ] pub type MI10_R = crate :: R < bool , MI10_A > ; impl MI10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI10_A { match self . bits { false => MI10_A :: _0 , true => MI10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI10_A :: _1 } } # [ doc = "Write proxy for field `MI10`" ] pub struct MI10_W < 'a > { w : & 'a mut W , } impl < 'a > MI10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI10_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI11_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI11_A > for bool { # [ inline ( always ) ] fn from ( variant : MI11_A ) -> Self { match variant { MI11_A :: _0 => false , MI11_A :: _1 => true } } } # [ doc = "Reader of field `MI11`" ] pub type MI11_R = crate :: R < bool , MI11_A > ; impl MI11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI11_A { match self . bits { false => MI11_A :: _0 , true => MI11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI11_A :: _1 } } # [ doc = "Write proxy for field `MI11`" ] pub struct MI11_W < 'a > { w : & 'a mut W , } impl < 'a > MI11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI11_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI12_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI12_A > for bool { # [ inline ( always ) ] fn from ( variant : MI12_A ) -> Self { match variant { MI12_A :: _0 => false , MI12_A :: _1 => true } } } # [ doc = "Reader of field `MI12`" ] pub type MI12_R = crate :: R < bool , MI12_A > ; impl MI12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI12_A { match self . bits { false => MI12_A :: _0 , true => MI12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI12_A :: _1 } } # [ doc = "Write proxy for field `MI12`" ] pub struct MI12_W < 'a > { w : & 'a mut W , } impl < 'a > MI12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI12_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI13_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI13_A > for bool { # [ inline ( always ) ] fn from ( variant : MI13_A ) -> Self { match variant { MI13_A :: _0 => false , MI13_A :: _1 => true } } } # [ doc = "Reader of field `MI13`" ] pub type MI13_R = crate :: R < bool , MI13_A > ; impl MI13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI13_A { match self . bits { false => MI13_A :: _0 , true => MI13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI13_A :: _1 } } # [ doc = "Write proxy for field `MI13`" ] pub struct MI13_W < 'a > { w : & 'a mut W , } impl < 'a > MI13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI13_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI13_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI14_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI14_A > for bool { # [ inline ( always ) ] fn from ( variant : MI14_A ) -> Self { match variant { MI14_A :: _0 => false , MI14_A :: _1 => true } } } # [ doc = "Reader of field `MI14`" ] pub type MI14_R = crate :: R < bool , MI14_A > ; impl MI14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI14_A { match self . bits { false => MI14_A :: _0 , true => MI14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI14_A :: _1 } } # [ doc = "Write proxy for field `MI14`" ] pub struct MI14_W < 'a > { w : & 'a mut W , } impl < 'a > MI14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI14_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI15_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI15_A > for bool { # [ inline ( always ) ] fn from ( variant : MI15_A ) -> Self { match variant { MI15_A :: _0 => false , MI15_A :: _1 => true } } } # [ doc = "Reader of field `MI15`" ] pub type MI15_R = crate :: R < bool , MI15_A > ; impl MI15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI15_A { match self . bits { false => MI15_A :: _0 , true => MI15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI15_A :: _1 } } # [ doc = "Write proxy for field `MI15`" ] pub struct MI15_W < 'a > { w : & 'a mut W , } impl < 'a > MI15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI15_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI16_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI16_A > for bool { # [ inline ( always ) ] fn from ( variant : MI16_A ) -> Self { match variant { MI16_A :: _0 => false , MI16_A :: _1 => true } } } # [ doc = "Reader of field `MI16`" ] pub type MI16_R = crate :: R < bool , MI16_A > ; impl MI16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI16_A { match self . bits { false => MI16_A :: _0 , true => MI16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI16_A :: _1 } } # [ doc = "Write proxy for field `MI16`" ] pub struct MI16_W < 'a > { w : & 'a mut W , } impl < 'a > MI16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI16_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI17_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI17_A > for bool { # [ inline ( always ) ] fn from ( variant : MI17_A ) -> Self { match variant { MI17_A :: _0 => false , MI17_A :: _1 => true } } } # [ doc = "Reader of field `MI17`" ] pub type MI17_R = crate :: R < bool , MI17_A > ; impl MI17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI17_A { match self . bits { false => MI17_A :: _0 , true => MI17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI17_A :: _1 } } # [ doc = "Write proxy for field `MI17`" ] pub struct MI17_W < 'a > { w : & 'a mut W , } impl < 'a > MI17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI17_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI18_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI18_A > for bool { # [ inline ( always ) ] fn from ( variant : MI18_A ) -> Self { match variant { MI18_A :: _0 => false , MI18_A :: _1 => true } } } # [ doc = "Reader of field `MI18`" ] pub type MI18_R = crate :: R < bool , MI18_A > ; impl MI18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI18_A { match self . bits { false => MI18_A :: _0 , true => MI18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI18_A :: _1 } } # [ doc = "Write proxy for field `MI18`" ] pub struct MI18_W < 'a > { w : & 'a mut W , } impl < 'a > MI18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI18_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI19_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI19_A > for bool { # [ inline ( always ) ] fn from ( variant : MI19_A ) -> Self { match variant { MI19_A :: _0 => false , MI19_A :: _1 => true } } } # [ doc = "Reader of field `MI19`" ] pub type MI19_R = crate :: R < bool , MI19_A > ; impl MI19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI19_A { match self . bits { false => MI19_A :: _0 , true => MI19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI19_A :: _1 } } # [ doc = "Write proxy for field `MI19`" ] pub struct MI19_W < 'a > { w : & 'a mut W , } impl < 'a > MI19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI19_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI20_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI20_A > for bool { # [ inline ( always ) ] fn from ( variant : MI20_A ) -> Self { match variant { MI20_A :: _0 => false , MI20_A :: _1 => true } } } # [ doc = "Reader of field `MI20`" ] pub type MI20_R = crate :: R < bool , MI20_A > ; impl MI20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI20_A { match self . bits { false => MI20_A :: _0 , true => MI20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI20_A :: _1 } } # [ doc = "Write proxy for field `MI20`" ] pub struct MI20_W < 'a > { w : & 'a mut W , } impl < 'a > MI20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI20_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI20_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI21_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI21_A > for bool { # [ inline ( always ) ] fn from ( variant : MI21_A ) -> Self { match variant { MI21_A :: _0 => false , MI21_A :: _1 => true } } } # [ doc = "Reader of field `MI21`" ] pub type MI21_R = crate :: R < bool , MI21_A > ; impl MI21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI21_A { match self . bits { false => MI21_A :: _0 , true => MI21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI21_A :: _1 } } # [ doc = "Write proxy for field `MI21`" ] pub struct MI21_W < 'a > { w : & 'a mut W , } impl < 'a > MI21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI21_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI21_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI22_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI22_A > for bool { # [ inline ( always ) ] fn from ( variant : MI22_A ) -> Self { match variant { MI22_A :: _0 => false , MI22_A :: _1 => true } } } # [ doc = "Reader of field `MI22`" ] pub type MI22_R = crate :: R < bool , MI22_A > ; impl MI22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI22_A { match self . bits { false => MI22_A :: _0 , true => MI22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI22_A :: _1 } } # [ doc = "Write proxy for field `MI22`" ] pub struct MI22_W < 'a > { w : & 'a mut W , } impl < 'a > MI22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI22_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI23_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI23_A > for bool { # [ inline ( always ) ] fn from ( variant : MI23_A ) -> Self { match variant { MI23_A :: _0 => false , MI23_A :: _1 => true } } } # [ doc = "Reader of field `MI23`" ] pub type MI23_R = crate :: R < bool , MI23_A > ; impl MI23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI23_A { match self . bits { false => MI23_A :: _0 , true => MI23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI23_A :: _1 } } # [ doc = "Write proxy for field `MI23`" ] pub struct MI23_W < 'a > { w : & 'a mut W , } impl < 'a > MI23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI23_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI24_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI24_A > for bool { # [ inline ( always ) ] fn from ( variant : MI24_A ) -> Self { match variant { MI24_A :: _0 => false , MI24_A :: _1 => true } } } # [ doc = "Reader of field `MI24`" ] pub type MI24_R = crate :: R < bool , MI24_A > ; impl MI24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI24_A { match self . bits { false => MI24_A :: _0 , true => MI24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI24_A :: _1 } } # [ doc = "Write proxy for field `MI24`" ] pub struct MI24_W < 'a > { w : & 'a mut W , } impl < 'a > MI24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI24_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI24_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI25_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI25_A > for bool { # [ inline ( always ) ] fn from ( variant : MI25_A ) -> Self { match variant { MI25_A :: _0 => false , MI25_A :: _1 => true } } } # [ doc = "Reader of field `MI25`" ] pub type MI25_R = crate :: R < bool , MI25_A > ; impl MI25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI25_A { match self . bits { false => MI25_A :: _0 , true => MI25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI25_A :: _1 } } # [ doc = "Write proxy for field `MI25`" ] pub struct MI25_W < 'a > { w : & 'a mut W , } impl < 'a > MI25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI25_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI25_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI26_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI26_A > for bool { # [ inline ( always ) ] fn from ( variant : MI26_A ) -> Self { match variant { MI26_A :: _0 => false , MI26_A :: _1 => true } } } # [ doc = "Reader of field `MI26`" ] pub type MI26_R = crate :: R < bool , MI26_A > ; impl MI26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI26_A { match self . bits { false => MI26_A :: _0 , true => MI26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI26_A :: _1 } } # [ doc = "Write proxy for field `MI26`" ] pub struct MI26_W < 'a > { w : & 'a mut W , } impl < 'a > MI26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI26_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI26_A :: _1 ) } # [ 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 = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI27_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI27_A > for bool { # [ inline ( always ) ] fn from ( variant : MI27_A ) -> Self { match variant { MI27_A :: _0 => false , MI27_A :: _1 => true } } } # [ doc = "Reader of field `MI27`" ] pub type MI27_R = crate :: R < bool , MI27_A > ; impl MI27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI27_A { match self . bits { false => MI27_A :: _0 , true => MI27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI27_A :: _1 } } # [ doc = "Write proxy for field `MI27`" ] pub struct MI27_W < 'a > { w : & 'a mut W , } impl < 'a > MI27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI27_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI28_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI28_A > for bool { # [ inline ( always ) ] fn from ( variant : MI28_A ) -> Self { match variant { MI28_A :: _0 => false , MI28_A :: _1 => true } } } # [ doc = "Reader of field `MI28`" ] pub type MI28_R = crate :: R < bool , MI28_A > ; impl MI28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI28_A { match self . bits { false => MI28_A :: _0 , true => MI28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI28_A :: _1 } } # [ doc = "Write proxy for field `MI28`" ] pub struct MI28_W < 'a > { w : & 'a mut W , } impl < 'a > MI28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI28_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI29_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI29_A > for bool { # [ inline ( always ) ] fn from ( variant : MI29_A ) -> Self { match variant { MI29_A :: _0 => false , MI29_A :: _1 => true } } } # [ doc = "Reader of field `MI29`" ] pub type MI29_R = crate :: R < bool , MI29_A > ; impl MI29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI29_A { match self . bits { false => MI29_A :: _0 , true => MI29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI29_A :: _1 } } # [ doc = "Write proxy for field `MI29`" ] pub struct MI29_W < 'a > { w : & 'a mut W , } impl < 'a > MI29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI29_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI30_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI30_A > for bool { # [ inline ( always ) ] fn from ( variant : MI30_A ) -> Self { match variant { MI30_A :: _0 => false , MI30_A :: _1 => true } } } # [ doc = "Reader of field `MI30`" ] pub type MI30_R = crate :: R < bool , MI30_A > ; impl MI30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI30_A { match self . bits { false => MI30_A :: _0 , true => MI30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI30_A :: _1 } } # [ doc = "Write proxy for field `MI30`" ] pub struct MI30_W < 'a > { w : & 'a mut W , } impl < 'a > MI30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI30_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Individual Mask Bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MI31_A { # [ doc = "0: The corresponding bit in the filter is \"don't care.\"" ] _0 , # [ doc = "1: The corresponding bit in the filter is checked." ] _1 } impl From < MI31_A > for bool { # [ inline ( always ) ] fn from ( variant : MI31_A ) -> Self { match variant { MI31_A :: _0 => false , MI31_A :: _1 => true } } } # [ doc = "Reader of field `MI31`" ] pub type MI31_R = crate :: R < bool , MI31_A > ; impl MI31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MI31_A { match self . bits { false => MI31_A :: _0 , true => MI31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MI31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MI31_A :: _1 } } # [ doc = "Write proxy for field `MI31`" ] pub struct MI31_W < 'a > { w : & 'a mut W , } impl < 'a > MI31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MI31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding bit in the filter is \"don't care.\"" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MI31_A :: _0 ) } # [ doc = "The corresponding bit in the filter is checked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MI31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi0 ( & self ) -> MI0_R { MI0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi1 ( & self ) -> MI1_R { MI1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi2 ( & self ) -> MI2_R { MI2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi3 ( & self ) -> MI3_R { MI3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi4 ( & self ) -> MI4_R { MI4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi5 ( & self ) -> MI5_R { MI5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi6 ( & self ) -> MI6_R { MI6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi7 ( & self ) -> MI7_R { MI7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi8 ( & self ) -> MI8_R { MI8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi9 ( & self ) -> MI9_R { MI9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi10 ( & self ) -> MI10_R { MI10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi11 ( & self ) -> MI11_R { MI11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi12 ( & self ) -> MI12_R { MI12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi13 ( & self ) -> MI13_R { MI13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi14 ( & self ) -> MI14_R { MI14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi15 ( & self ) -> MI15_R { MI15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi16 ( & self ) -> MI16_R { MI16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi17 ( & self ) -> MI17_R { MI17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi18 ( & self ) -> MI18_R { MI18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi19 ( & self ) -> MI19_R { MI19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi20 ( & self ) -> MI20_R { MI20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi21 ( & self ) -> MI21_R { MI21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi22 ( & self ) -> MI22_R { MI22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi23 ( & self ) -> MI23_R { MI23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi24 ( & self ) -> MI24_R { MI24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi25 ( & self ) -> MI25_R { MI25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi26 ( & self ) -> MI26_R { MI26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi27 ( & self ) -> MI27_R { MI27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi28 ( & self ) -> MI28_R { MI28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi29 ( & self ) -> MI29_R { MI29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi30 ( & self ) -> MI30_R { MI30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi31 ( & self ) -> MI31_R { MI31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi0 ( & mut self ) -> MI0_W { MI0_W { w : self } } # [ doc = "Bit 1 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi1 ( & mut self ) -> MI1_W { MI1_W { w : self } } # [ doc = "Bit 2 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi2 ( & mut self ) -> MI2_W { MI2_W { w : self } } # [ doc = "Bit 3 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi3 ( & mut self ) -> MI3_W { MI3_W { w : self } } # [ doc = "Bit 4 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi4 ( & mut self ) -> MI4_W { MI4_W { w : self } } # [ doc = "Bit 5 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi5 ( & mut self ) -> MI5_W { MI5_W { w : self } } # [ doc = "Bit 6 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi6 ( & mut self ) -> MI6_W { MI6_W { w : self } } # [ doc = "Bit 7 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi7 ( & mut self ) -> MI7_W { MI7_W { w : self } } # [ doc = "Bit 8 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi8 ( & mut self ) -> MI8_W { MI8_W { w : self } } # [ doc = "Bit 9 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi9 ( & mut self ) -> MI9_W { MI9_W { w : self } } # [ doc = "Bit 10 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi10 ( & mut self ) -> MI10_W { MI10_W { w : self } } # [ doc = "Bit 11 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi11 ( & mut self ) -> MI11_W { MI11_W { w : self } } # [ doc = "Bit 12 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi12 ( & mut self ) -> MI12_W { MI12_W { w : self } } # [ doc = "Bit 13 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi13 ( & mut self ) -> MI13_W { MI13_W { w : self } } # [ doc = "Bit 14 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi14 ( & mut self ) -> MI14_W { MI14_W { w : self } } # [ doc = "Bit 15 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi15 ( & mut self ) -> MI15_W { MI15_W { w : self } } # [ doc = "Bit 16 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi16 ( & mut self ) -> MI16_W { MI16_W { w : self } } # [ doc = "Bit 17 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi17 ( & mut self ) -> MI17_W { MI17_W { w : self } } # [ doc = "Bit 18 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi18 ( & mut self ) -> MI18_W { MI18_W { w : self } } # [ doc = "Bit 19 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi19 ( & mut self ) -> MI19_W { MI19_W { w : self } } # [ doc = "Bit 20 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi20 ( & mut self ) -> MI20_W { MI20_W { w : self } } # [ doc = "Bit 21 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi21 ( & mut self ) -> MI21_W { MI21_W { w : self } } # [ doc = "Bit 22 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi22 ( & mut self ) -> MI22_W { MI22_W { w : self } } # [ doc = "Bit 23 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi23 ( & mut self ) -> MI23_W { MI23_W { w : self } } # [ doc = "Bit 24 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi24 ( & mut self ) -> MI24_W { MI24_W { w : self } } # [ doc = "Bit 25 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi25 ( & mut self ) -> MI25_W { MI25_W { w : self } } # [ doc = "Bit 26 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi26 ( & mut self ) -> MI26_W { MI26_W { w : self } } # [ doc = "Bit 27 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi27 ( & mut self ) -> MI27_W { MI27_W { w : self } } # [ doc = "Bit 28 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi28 ( & mut self ) -> MI28_W { MI28_W { w : self } } # [ doc = "Bit 29 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi29 ( & mut self ) -> MI29_W { MI29_W { w : self } } # [ doc = "Bit 30 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi30 ( & mut self ) -> MI30_W { MI30_W { w : self } } # [ doc = "Bit 31 - Individual Mask Bits" ] # [ inline ( always ) ] pub fn mi31 ( & mut self ) -> MI31_W { MI31_W { w : self } } } } } # [ doc = "Serial Peripheral Interface" ] pub struct SPI0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPI0 { } impl SPI0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const spi0 :: RegisterBlock { 0x4002_c000 as * const _ } } impl Deref for SPI0 { type Target = spi0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SPI0 :: ptr ( ) } } } # [ doc = "Serial Peripheral Interface" ] pub mod spi0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Module Configuration Register" ] pub mcr : MCR , _reserved1 : [ u8 ; 4usize ] , # [ doc = "0x08 - Transfer Count Register" ] pub tcr : TCR , _reserved_2_ctar : [ u8 ; 8usize ] , _reserved3 : [ u8 ; 24usize ] , # [ doc = "0x2c - Status Register" ] pub sr : SR , # [ doc = "0x30 - DMA/Interrupt Request Select and Enable Register" ] pub rser : RSER , _reserved_5_pushr : [ u8 ; 4usize ] , # [ doc = "0x38 - POP RX FIFO Register" ] pub popr : POPR , # [ doc = "0x3c - Transmit FIFO Registers" ] pub txfr : [ TXFR ; 4 ] , _reserved8 : [ u8 ; 48usize ] , # [ doc = "0x7c - Receive FIFO Registers" ] pub rxfr : [ RXFR ; 4 ] , } impl RegisterBlock { # [ doc = "0x0c - Clock and Transfer Attributes Register (In Slave Mode)" ] # [ inline ( always ) ] pub fn ctar_slave ( & self ) -> & CTAR_SLAVE { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 12usize ) as * const CTAR_SLAVE ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Slave Mode)" ] # [ inline ( always ) ] pub fn ctar_slave_mut ( & self ) -> & mut CTAR_SLAVE { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 12usize ) as * mut CTAR_SLAVE ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Master Mode)" ] # [ inline ( always ) ] pub fn ctar ( & self ) -> & [ CTAR ; 2 ] { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 12usize ) as * const [ CTAR ; 2 ] ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Master Mode)" ] # [ inline ( always ) ] pub fn ctar_mut ( & self ) -> & mut [ CTAR ; 2 ] { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 12usize ) as * mut [ CTAR ; 2 ] ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Slave Mode" ] # [ inline ( always ) ] pub fn pushr_slave ( & self ) -> & PUSHR_SLAVE { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 52usize ) as * const PUSHR_SLAVE ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Slave Mode" ] # [ inline ( always ) ] pub fn pushr_slave_mut ( & self ) -> & mut PUSHR_SLAVE { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 52usize ) as * mut PUSHR_SLAVE ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Master Mode" ] # [ inline ( always ) ] pub fn pushr ( & self ) -> & PUSHR { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 52usize ) as * const PUSHR ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Master Mode" ] # [ inline ( always ) ] pub fn pushr_mut ( & self ) -> & mut PUSHR { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 52usize ) as * mut PUSHR ) } } } # [ doc = "Module Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mcr](mcr) module" ] pub type MCR = crate :: Reg < u32 , _MCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCR ; # [ doc = "`read()` method returns [mcr::R](mcr::R) reader structure" ] impl crate :: Readable for MCR { } # [ doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure" ] impl crate :: Writable for MCR { } # [ doc = "Module Configuration Register" ] pub mod mcr { # [ doc = "Reader of register MCR" ] pub type R = crate :: R < u32 , super :: MCR > ; # [ doc = "Writer for register MCR" ] pub type W = crate :: W < u32 , super :: MCR > ; # [ doc = "Register MCR `reset()`'s with value 0x4001" ] impl crate :: ResetValue for super :: MCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x4001 } } # [ doc = "Halt\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HALT_A { # [ doc = "0: Start transfers." ] _0 , # [ doc = "1: Stop transfers." ] _1 } impl From < HALT_A > for bool { # [ inline ( always ) ] fn from ( variant : HALT_A ) -> Self { match variant { HALT_A :: _0 => false , HALT_A :: _1 => true } } } # [ doc = "Reader of field `HALT`" ] pub type HALT_R = crate :: R < bool , HALT_A > ; impl HALT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HALT_A { match self . bits { false => HALT_A :: _0 , true => HALT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HALT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HALT_A :: _1 } } # [ doc = "Write proxy for field `HALT`" ] pub struct HALT_W < 'a > { w : & 'a mut W , } impl < 'a > HALT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HALT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Start transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _0 ) } # [ doc = "Stop transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Sample Point\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMPL_PT_A { # [ doc = "0: 0 protocol clock cycles between SCK edge and SIN sample" ] _00 , # [ doc = "1: 1 protocol clock cycle between SCK edge and SIN sample" ] _01 , # [ doc = "2: 2 protocol clock cycles between SCK edge and SIN sample" ] _10 } impl From < SMPL_PT_A > for u8 { # [ inline ( always ) ] fn from ( variant : SMPL_PT_A ) -> Self { match variant { SMPL_PT_A :: _00 => 0 , SMPL_PT_A :: _01 => 1 , SMPL_PT_A :: _10 => 2 } } } # [ doc = "Reader of field `SMPL_PT`" ] pub type SMPL_PT_R = crate :: R < u8 , SMPL_PT_A > ; impl SMPL_PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SMPL_PT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SMPL_PT_A :: _00 ) , 1 => Val ( SMPL_PT_A :: _01 ) , 2 => Val ( SMPL_PT_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SMPL_PT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SMPL_PT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SMPL_PT_A :: _10 } } # [ doc = "Write proxy for field `SMPL_PT`" ] pub struct SMPL_PT_W < 'a > { w : & 'a mut W , } impl < 'a > SMPL_PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMPL_PT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "0 protocol clock cycles between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _00 ) } # [ doc = "1 protocol clock cycle between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _01 ) } # [ doc = "2 protocol clock cycles between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _10 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "CLR_RXF\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLR_RXF_AW { # [ doc = "0: Do not clear the RX FIFO counter." ] _0 , # [ doc = "1: Clear the RX FIFO counter." ] _1 } impl From < CLR_RXF_AW > for bool { # [ inline ( always ) ] fn from ( variant : CLR_RXF_AW ) -> Self { match variant { CLR_RXF_AW :: _0 => false , CLR_RXF_AW :: _1 => true } } } # [ doc = "Write proxy for field `CLR_RXF`" ] pub struct CLR_RXF_W < 'a > { w : & 'a mut W , } impl < 'a > CLR_RXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLR_RXF_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the RX FIFO counter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLR_RXF_AW :: _0 ) } # [ doc = "Clear the RX FIFO counter." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLR_RXF_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Clear TX FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLR_TXF_AW { # [ doc = "0: Do not clear the TX FIFO counter." ] _0 , # [ doc = "1: Clear the TX FIFO counter." ] _1 } impl From < CLR_TXF_AW > for bool { # [ inline ( always ) ] fn from ( variant : CLR_TXF_AW ) -> Self { match variant { CLR_TXF_AW :: _0 => false , CLR_TXF_AW :: _1 => true } } } # [ doc = "Write proxy for field `CLR_TXF`" ] pub struct CLR_TXF_W < 'a > { w : & 'a mut W , } impl < 'a > CLR_TXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLR_TXF_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the TX FIFO counter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLR_TXF_AW :: _0 ) } # [ doc = "Clear the TX FIFO counter." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLR_TXF_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Disable Receive FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIS_RXF_A { # [ doc = "0: RX FIFO is enabled." ] _0 , # [ doc = "1: RX FIFO is disabled." ] _1 } impl From < DIS_RXF_A > for bool { # [ inline ( always ) ] fn from ( variant : DIS_RXF_A ) -> Self { match variant { DIS_RXF_A :: _0 => false , DIS_RXF_A :: _1 => true } } } # [ doc = "Reader of field `DIS_RXF`" ] pub type DIS_RXF_R = crate :: R < bool , DIS_RXF_A > ; impl DIS_RXF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIS_RXF_A { match self . bits { false => DIS_RXF_A :: _0 , true => DIS_RXF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIS_RXF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIS_RXF_A :: _1 } } # [ doc = "Write proxy for field `DIS_RXF`" ] pub struct DIS_RXF_W < 'a > { w : & 'a mut W , } impl < 'a > DIS_RXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIS_RXF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RX FIFO is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIS_RXF_A :: _0 ) } # [ doc = "RX FIFO is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIS_RXF_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Disable Transmit FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIS_TXF_A { # [ doc = "0: TX FIFO is enabled." ] _0 , # [ doc = "1: TX FIFO is disabled." ] _1 } impl From < DIS_TXF_A > for bool { # [ inline ( always ) ] fn from ( variant : DIS_TXF_A ) -> Self { match variant { DIS_TXF_A :: _0 => false , DIS_TXF_A :: _1 => true } } } # [ doc = "Reader of field `DIS_TXF`" ] pub type DIS_TXF_R = crate :: R < bool , DIS_TXF_A > ; impl DIS_TXF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIS_TXF_A { match self . bits { false => DIS_TXF_A :: _0 , true => DIS_TXF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIS_TXF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIS_TXF_A :: _1 } } # [ doc = "Write proxy for field `DIS_TXF`" ] pub struct DIS_TXF_W < 'a > { w : & 'a mut W , } impl < 'a > DIS_TXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIS_TXF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TX FIFO is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIS_TXF_A :: _0 ) } # [ doc = "TX FIFO is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIS_TXF_A :: _1 ) } # [ 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 = "Module Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MDIS_A { # [ doc = "0: Enables the module clocks." ] _0 , # [ doc = "1: Allows external logic to disable the module clocks." ] _1 } impl From < MDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : MDIS_A ) -> Self { match variant { MDIS_A :: _0 => false , MDIS_A :: _1 => true } } } # [ doc = "Reader of field `MDIS`" ] pub type MDIS_R = crate :: R < bool , MDIS_A > ; impl MDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MDIS_A { match self . bits { false => MDIS_A :: _0 , true => MDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MDIS_A :: _1 } } # [ doc = "Write proxy for field `MDIS`" ] pub struct MDIS_W < 'a > { w : & 'a mut W , } impl < 'a > MDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Enables the module clocks." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _0 ) } # [ doc = "Allows external logic to disable the module clocks." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Doze Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOZE_A { # [ doc = "0: Doze mode has no effect on the module." ] _0 , # [ doc = "1: Doze mode disables the module." ] _1 } impl From < DOZE_A > for bool { # [ inline ( always ) ] fn from ( variant : DOZE_A ) -> Self { match variant { DOZE_A :: _0 => false , DOZE_A :: _1 => true } } } # [ doc = "Reader of field `DOZE`" ] pub type DOZE_R = crate :: R < bool , DOZE_A > ; impl DOZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DOZE_A { match self . bits { false => DOZE_A :: _0 , true => DOZE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DOZE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DOZE_A :: _1 } } # [ doc = "Write proxy for field `DOZE`" ] pub struct DOZE_W < 'a > { w : & 'a mut W , } impl < 'a > DOZE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DOZE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Doze mode has no effect on the module." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DOZE_A :: _0 ) } # [ doc = "Doze mode disables the module." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DOZE_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS0_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS0_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS0_A ) -> Self { match variant { PCSIS0_A :: _0 => false , PCSIS0_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS0`" ] pub type PCSIS0_R = crate :: R < bool , PCSIS0_A > ; impl PCSIS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS0_A { match self . bits { false => PCSIS0_A :: _0 , true => PCSIS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS0_A :: _1 } } # [ doc = "Write proxy for field `PCSIS0`" ] pub struct PCSIS0_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS0_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS1_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS1_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS1_A ) -> Self { match variant { PCSIS1_A :: _0 => false , PCSIS1_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS1`" ] pub type PCSIS1_R = crate :: R < bool , PCSIS1_A > ; impl PCSIS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS1_A { match self . bits { false => PCSIS1_A :: _0 , true => PCSIS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS1_A :: _1 } } # [ doc = "Write proxy for field `PCSIS1`" ] pub struct PCSIS1_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS1_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS2_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS2_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS2_A ) -> Self { match variant { PCSIS2_A :: _0 => false , PCSIS2_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS2`" ] pub type PCSIS2_R = crate :: R < bool , PCSIS2_A > ; impl PCSIS2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS2_A { match self . bits { false => PCSIS2_A :: _0 , true => PCSIS2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS2_A :: _1 } } # [ doc = "Write proxy for field `PCSIS2`" ] pub struct PCSIS2_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS2_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS3_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS3_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS3_A ) -> Self { match variant { PCSIS3_A :: _0 => false , PCSIS3_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS3`" ] pub type PCSIS3_R = crate :: R < bool , PCSIS3_A > ; impl PCSIS3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS3_A { match self . bits { false => PCSIS3_A :: _0 , true => PCSIS3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS3_A :: _1 } } # [ doc = "Write proxy for field `PCSIS3`" ] pub struct PCSIS3_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS3_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS3_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS4_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS4_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS4_A ) -> Self { match variant { PCSIS4_A :: _0 => false , PCSIS4_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS4`" ] pub type PCSIS4_R = crate :: R < bool , PCSIS4_A > ; impl PCSIS4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS4_A { match self . bits { false => PCSIS4_A :: _0 , true => PCSIS4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS4_A :: _1 } } # [ doc = "Write proxy for field `PCSIS4`" ] pub struct PCSIS4_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS4_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS4_A :: _1 ) } # [ 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 = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS5_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS5_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS5_A ) -> Self { match variant { PCSIS5_A :: _0 => false , PCSIS5_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS5`" ] pub type PCSIS5_R = crate :: R < bool , PCSIS5_A > ; impl PCSIS5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS5_A { match self . bits { false => PCSIS5_A :: _0 , true => PCSIS5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS5_A :: _1 } } # [ doc = "Write proxy for field `PCSIS5`" ] pub struct PCSIS5_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS5_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS5_A :: _1 ) } # [ 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 = "Receive FIFO Overflow Overwrite Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ROOE_A { # [ doc = "0: Incoming data is ignored." ] _0 , # [ doc = "1: Incoming data is shifted into the shift register." ] _1 } impl From < ROOE_A > for bool { # [ inline ( always ) ] fn from ( variant : ROOE_A ) -> Self { match variant { ROOE_A :: _0 => false , ROOE_A :: _1 => true } } } # [ doc = "Reader of field `ROOE`" ] pub type ROOE_R = crate :: R < bool , ROOE_A > ; impl ROOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ROOE_A { match self . bits { false => ROOE_A :: _0 , true => ROOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ROOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ROOE_A :: _1 } } # [ doc = "Write proxy for field `ROOE`" ] pub struct ROOE_W < 'a > { w : & 'a mut W , } impl < 'a > ROOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ROOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Incoming data is ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ROOE_A :: _0 ) } # [ doc = "Incoming data is shifted into the shift register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ROOE_A :: _1 ) } # [ 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 = "Peripheral Chip Select Strobe Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSSE_A { # [ doc = "0: PCS5/ PCSS is used as the Peripheral Chip Select\\[5\\] signal." ] _0 , # [ doc = "1: PCS5/ PCSS is used as an active-low PCS Strobe signal." ] _1 } impl From < PCSSE_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSSE_A ) -> Self { match variant { PCSSE_A :: _0 => false , PCSSE_A :: _1 => true } } } # [ doc = "Reader of field `PCSSE`" ] pub type PCSSE_R = crate :: R < bool , PCSSE_A > ; impl PCSSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSSE_A { match self . bits { false => PCSSE_A :: _0 , true => PCSSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSSE_A :: _1 } } # [ doc = "Write proxy for field `PCSSE`" ] pub struct PCSSE_W < 'a > { w : & 'a mut W , } impl < 'a > PCSSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PCS5/ PCSS is used as the Peripheral Chip Select\\[5\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSSE_A :: _0 ) } # [ doc = "PCS5/ PCSS is used as an active-low PCS Strobe signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSSE_A :: _1 ) } # [ 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 = "Modified Transfer Format Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTFE_A { # [ doc = "0: Modified SPI transfer format disabled." ] _0 , # [ doc = "1: Modified SPI transfer format enabled." ] _1 } impl From < MTFE_A > for bool { # [ inline ( always ) ] fn from ( variant : MTFE_A ) -> Self { match variant { MTFE_A :: _0 => false , MTFE_A :: _1 => true } } } # [ doc = "Reader of field `MTFE`" ] pub type MTFE_R = crate :: R < bool , MTFE_A > ; impl MTFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTFE_A { match self . bits { false => MTFE_A :: _0 , true => MTFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTFE_A :: _1 } } # [ doc = "Write proxy for field `MTFE`" ] pub struct MTFE_W < 'a > { w : & 'a mut W , } impl < 'a > MTFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Modified SPI transfer format disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTFE_A :: _0 ) } # [ doc = "Modified SPI transfer format enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTFE_A :: _1 ) } # [ 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 = "Freeze\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRZ_A { # [ doc = "0: Do not halt serial transfers in Debug mode." ] _0 , # [ doc = "1: Halt serial transfers in Debug mode." ] _1 } impl From < FRZ_A > for bool { # [ inline ( always ) ] fn from ( variant : FRZ_A ) -> Self { match variant { FRZ_A :: _0 => false , FRZ_A :: _1 => true } } } # [ doc = "Reader of field `FRZ`" ] pub type FRZ_R = crate :: R < bool , FRZ_A > ; impl FRZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRZ_A { match self . bits { false => FRZ_A :: _0 , true => FRZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRZ_A :: _1 } } # [ doc = "Write proxy for field `FRZ`" ] pub struct FRZ_W < 'a > { w : & 'a mut W , } impl < 'a > FRZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not halt serial transfers in Debug mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _0 ) } # [ doc = "Halt serial transfers in Debug mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "SPI Configuration.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DCONF_A { # [ doc = "0: SPI" ] _00 } impl From < DCONF_A > for u8 { # [ inline ( always ) ] fn from ( variant : DCONF_A ) -> Self { match variant { DCONF_A :: _00 => 0 } } } # [ doc = "Reader of field `DCONF`" ] pub type DCONF_R = crate :: R < u8 , DCONF_A > ; impl DCONF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DCONF_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DCONF_A :: _00 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DCONF_A :: _00 } } # [ doc = "Continuous SCK Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CONT_SCKE_A { # [ doc = "0: Continuous SCK disabled." ] _0 , # [ doc = "1: Continuous SCK enabled." ] _1 } impl From < CONT_SCKE_A > for bool { # [ inline ( always ) ] fn from ( variant : CONT_SCKE_A ) -> Self { match variant { CONT_SCKE_A :: _0 => false , CONT_SCKE_A :: _1 => true } } } # [ doc = "Reader of field `CONT_SCKE`" ] pub type CONT_SCKE_R = crate :: R < bool , CONT_SCKE_A > ; impl CONT_SCKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CONT_SCKE_A { match self . bits { false => CONT_SCKE_A :: _0 , true => CONT_SCKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CONT_SCKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CONT_SCKE_A :: _1 } } # [ doc = "Write proxy for field `CONT_SCKE`" ] pub struct CONT_SCKE_W < 'a > { w : & 'a mut W , } impl < 'a > CONT_SCKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CONT_SCKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Continuous SCK disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CONT_SCKE_A :: _0 ) } # [ doc = "Continuous SCK enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CONT_SCKE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Master/Slave Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSTR_A { # [ doc = "0: Enables Slave mode" ] _0 , # [ doc = "1: Enables Master mode" ] _1 } impl From < MSTR_A > for bool { # [ inline ( always ) ] fn from ( variant : MSTR_A ) -> Self { match variant { MSTR_A :: _0 => false , MSTR_A :: _1 => true } } } # [ doc = "Reader of field `MSTR`" ] pub type MSTR_R = crate :: R < bool , MSTR_A > ; impl MSTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSTR_A { match self . bits { false => MSTR_A :: _0 , true => MSTR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSTR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSTR_A :: _1 } } # [ doc = "Write proxy for field `MSTR`" ] pub struct MSTR_W < 'a > { w : & 'a mut W , } impl < 'a > MSTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSTR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Enables Slave mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSTR_A :: _0 ) } # [ doc = "Enables Master mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSTR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Halt" ] # [ inline ( always ) ] pub fn halt ( & self ) -> HALT_R { HALT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 8:9 - Sample Point" ] # [ inline ( always ) ] pub fn smpl_pt ( & self ) -> SMPL_PT_R { SMPL_PT_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 12 - Disable Receive FIFO" ] # [ inline ( always ) ] pub fn dis_rxf ( & self ) -> DIS_RXF_R { DIS_RXF_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Disable Transmit FIFO" ] # [ inline ( always ) ] pub fn dis_txf ( & self ) -> DIS_TXF_R { DIS_TXF_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & self ) -> MDIS_R { MDIS_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Doze Enable" ] # [ inline ( always ) ] pub fn doze ( & self ) -> DOZE_R { DOZE_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis0 ( & self ) -> PCSIS0_R { PCSIS0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis1 ( & self ) -> PCSIS1_R { PCSIS1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis2 ( & self ) -> PCSIS2_R { PCSIS2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis3 ( & self ) -> PCSIS3_R { PCSIS3_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis4 ( & self ) -> PCSIS4_R { PCSIS4_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis5 ( & self ) -> PCSIS5_R { PCSIS5_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Receive FIFO Overflow Overwrite Enable" ] # [ inline ( always ) ] pub fn rooe ( & self ) -> ROOE_R { ROOE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Peripheral Chip Select Strobe Enable" ] # [ inline ( always ) ] pub fn pcsse ( & self ) -> PCSSE_R { PCSSE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Modified Transfer Format Enable" ] # [ inline ( always ) ] pub fn mtfe ( & self ) -> MTFE_R { MTFE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Freeze" ] # [ inline ( always ) ] pub fn frz ( & self ) -> FRZ_R { FRZ_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:29 - SPI Configuration." ] # [ inline ( always ) ] pub fn dconf ( & self ) -> DCONF_R { DCONF_R :: new ( ( ( self . bits >> 28 ) & 0x03 ) as u8 ) } # [ doc = "Bit 30 - Continuous SCK Enable" ] # [ inline ( always ) ] pub fn cont_scke ( & self ) -> CONT_SCKE_R { CONT_SCKE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Master/Slave Mode Select" ] # [ inline ( always ) ] pub fn mstr ( & self ) -> MSTR_R { MSTR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Halt" ] # [ inline ( always ) ] pub fn halt ( & mut self ) -> HALT_W { HALT_W { w : self } } # [ doc = "Bits 8:9 - Sample Point" ] # [ inline ( always ) ] pub fn smpl_pt ( & mut self ) -> SMPL_PT_W { SMPL_PT_W { w : self } } # [ doc = "Bit 10 - CLR_RXF" ] # [ inline ( always ) ] pub fn clr_rxf ( & mut self ) -> CLR_RXF_W { CLR_RXF_W { w : self } } # [ doc = "Bit 11 - Clear TX FIFO" ] # [ inline ( always ) ] pub fn clr_txf ( & mut self ) -> CLR_TXF_W { CLR_TXF_W { w : self } } # [ doc = "Bit 12 - Disable Receive FIFO" ] # [ inline ( always ) ] pub fn dis_rxf ( & mut self ) -> DIS_RXF_W { DIS_RXF_W { w : self } } # [ doc = "Bit 13 - Disable Transmit FIFO" ] # [ inline ( always ) ] pub fn dis_txf ( & mut self ) -> DIS_TXF_W { DIS_TXF_W { w : self } } # [ doc = "Bit 14 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & mut self ) -> MDIS_W { MDIS_W { w : self } } # [ doc = "Bit 15 - Doze Enable" ] # [ inline ( always ) ] pub fn doze ( & mut self ) -> DOZE_W { DOZE_W { w : self } } # [ doc = "Bit 16 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis0 ( & mut self ) -> PCSIS0_W { PCSIS0_W { w : self } } # [ doc = "Bit 17 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis1 ( & mut self ) -> PCSIS1_W { PCSIS1_W { w : self } } # [ doc = "Bit 18 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis2 ( & mut self ) -> PCSIS2_W { PCSIS2_W { w : self } } # [ doc = "Bit 19 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis3 ( & mut self ) -> PCSIS3_W { PCSIS3_W { w : self } } # [ doc = "Bit 20 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis4 ( & mut self ) -> PCSIS4_W { PCSIS4_W { w : self } } # [ doc = "Bit 21 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis5 ( & mut self ) -> PCSIS5_W { PCSIS5_W { w : self } } # [ doc = "Bit 24 - Receive FIFO Overflow Overwrite Enable" ] # [ inline ( always ) ] pub fn rooe ( & mut self ) -> ROOE_W { ROOE_W { w : self } } # [ doc = "Bit 25 - Peripheral Chip Select Strobe Enable" ] # [ inline ( always ) ] pub fn pcsse ( & mut self ) -> PCSSE_W { PCSSE_W { w : self } } # [ doc = "Bit 26 - Modified Transfer Format Enable" ] # [ inline ( always ) ] pub fn mtfe ( & mut self ) -> MTFE_W { MTFE_W { w : self } } # [ doc = "Bit 27 - Freeze" ] # [ inline ( always ) ] pub fn frz ( & mut self ) -> FRZ_W { FRZ_W { w : self } } # [ doc = "Bit 30 - Continuous SCK Enable" ] # [ inline ( always ) ] pub fn cont_scke ( & mut self ) -> CONT_SCKE_W { CONT_SCKE_W { w : self } } # [ doc = "Bit 31 - Master/Slave Mode Select" ] # [ inline ( always ) ] pub fn mstr ( & mut self ) -> MSTR_W { MSTR_W { w : self } } } } # [ doc = "Transfer Count Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr](tcr) module" ] pub type TCR = crate :: Reg < u32 , _TCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR ; # [ doc = "`read()` method returns [tcr::R](tcr::R) reader structure" ] impl crate :: Readable for TCR { } # [ doc = "`write(|w| ..)` method takes [tcr::W](tcr::W) writer structure" ] impl crate :: Writable for TCR { } # [ doc = "Transfer Count Register" ] pub mod tcr { # [ doc = "Reader of register TCR" ] pub type R = crate :: R < u32 , super :: TCR > ; # [ doc = "Writer for register TCR" ] pub type W = crate :: W < u32 , super :: TCR > ; # [ doc = "Register TCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SPI_TCNT`" ] pub type SPI_TCNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `SPI_TCNT`" ] pub struct SPI_TCNT_W < 'a > { w : & 'a mut W , } impl < 'a > SPI_TCNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 16:31 - SPI Transfer Counter" ] # [ inline ( always ) ] pub fn spi_tcnt ( & self ) -> SPI_TCNT_R { SPI_TCNT_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 16:31 - SPI Transfer Counter" ] # [ inline ( always ) ] pub fn spi_tcnt ( & mut self ) -> SPI_TCNT_W { SPI_TCNT_W { w : self } } } } # [ doc = "Clock and Transfer Attributes Register (In Master Mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctar](ctar) module" ] pub type CTAR = crate :: Reg < u32 , _CTAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTAR ; # [ doc = "`read()` method returns [ctar::R](ctar::R) reader structure" ] impl crate :: Readable for CTAR { } # [ doc = "`write(|w| ..)` method takes [ctar::W](ctar::W) writer structure" ] impl crate :: Writable for CTAR { } # [ doc = "Clock and Transfer Attributes Register (In Master Mode)" ] pub mod ctar { # [ doc = "Reader of register CTAR%s" ] pub type R = crate :: R < u32 , super :: CTAR > ; # [ doc = "Writer for register CTAR%s" ] pub type W = crate :: W < u32 , super :: CTAR > ; # [ doc = "Register CTAR%s `reset()`'s with value 0x7800_0000" ] impl crate :: ResetValue for super :: CTAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7800_0000 } } # [ doc = "Reader of field `BR`" ] pub type BR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BR`" ] pub struct BR_W < 'a > { w : & 'a mut W , } impl < 'a > BR_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `DT`" ] pub type DT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DT`" ] pub struct DT_W < 'a > { w : & 'a mut W , } impl < 'a > DT_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } # [ doc = "Reader of field `ASC`" ] pub type ASC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ASC`" ] pub struct ASC_W < 'a > { w : & 'a mut W , } impl < 'a > ASC_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `CSSCK`" ] pub type CSSCK_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CSSCK`" ] pub struct CSSCK_W < 'a > { w : & 'a mut W , } impl < 'a > CSSCK_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 & ! ( 0x0f << 12 ) ) | ( ( ( value as u32 ) & 0x0f ) << 12 ) ; self . w } } # [ doc = "Baud Rate Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PBR_A { # [ doc = "0: Baud Rate Prescaler value is 2." ] _00 , # [ doc = "1: Baud Rate Prescaler value is 3." ] _01 , # [ doc = "2: Baud Rate Prescaler value is 5." ] _10 , # [ doc = "3: Baud Rate Prescaler value is 7." ] _11 } impl From < PBR_A > for u8 { # [ inline ( always ) ] fn from ( variant : PBR_A ) -> Self { match variant { PBR_A :: _00 => 0 , PBR_A :: _01 => 1 , PBR_A :: _10 => 2 , PBR_A :: _11 => 3 } } } # [ doc = "Reader of field `PBR`" ] pub type PBR_R = crate :: R < u8 , PBR_A > ; impl PBR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PBR_A { match self . bits { 0 => PBR_A :: _00 , 1 => PBR_A :: _01 , 2 => PBR_A :: _10 , 3 => PBR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PBR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PBR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PBR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PBR_A :: _11 } } # [ doc = "Write proxy for field `PBR`" ] pub struct PBR_W < 'a > { w : & 'a mut W , } impl < 'a > PBR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PBR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Baud Rate Prescaler value is 2." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _00 ) } # [ doc = "Baud Rate Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _01 ) } # [ doc = "Baud Rate Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _10 ) } # [ doc = "Baud Rate Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "Delay after Transfer Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDT_A { # [ doc = "0: Delay after Transfer Prescaler value is 1." ] _00 , # [ doc = "1: Delay after Transfer Prescaler value is 3." ] _01 , # [ doc = "2: Delay after Transfer Prescaler value is 5." ] _10 , # [ doc = "3: Delay after Transfer Prescaler value is 7." ] _11 } impl From < PDT_A > for u8 { # [ inline ( always ) ] fn from ( variant : PDT_A ) -> Self { match variant { PDT_A :: _00 => 0 , PDT_A :: _01 => 1 , PDT_A :: _10 => 2 , PDT_A :: _11 => 3 } } } # [ doc = "Reader of field `PDT`" ] pub type PDT_R = crate :: R < u8 , PDT_A > ; impl PDT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDT_A { match self . bits { 0 => PDT_A :: _00 , 1 => PDT_A :: _01 , 2 => PDT_A :: _10 , 3 => PDT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PDT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PDT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PDT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PDT_A :: _11 } } # [ doc = "Write proxy for field `PDT`" ] pub struct PDT_W < 'a > { w : & 'a mut W , } impl < 'a > PDT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay after Transfer Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _00 ) } # [ doc = "Delay after Transfer Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _01 ) } # [ doc = "Delay after Transfer Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _10 ) } # [ doc = "Delay after Transfer Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "After SCK Delay Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PASC_A { # [ doc = "0: Delay after Transfer Prescaler value is 1." ] _00 , # [ doc = "1: Delay after Transfer Prescaler value is 3." ] _01 , # [ doc = "2: Delay after Transfer Prescaler value is 5." ] _10 , # [ doc = "3: Delay after Transfer Prescaler value is 7." ] _11 } impl From < PASC_A > for u8 { # [ inline ( always ) ] fn from ( variant : PASC_A ) -> Self { match variant { PASC_A :: _00 => 0 , PASC_A :: _01 => 1 , PASC_A :: _10 => 2 , PASC_A :: _11 => 3 } } } # [ doc = "Reader of field `PASC`" ] pub type PASC_R = crate :: R < u8 , PASC_A > ; impl PASC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PASC_A { match self . bits { 0 => PASC_A :: _00 , 1 => PASC_A :: _01 , 2 => PASC_A :: _10 , 3 => PASC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PASC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PASC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PASC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PASC_A :: _11 } } # [ doc = "Write proxy for field `PASC`" ] pub struct PASC_W < 'a > { w : & 'a mut W , } impl < 'a > PASC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PASC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay after Transfer Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _00 ) } # [ doc = "Delay after Transfer Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _01 ) } # [ doc = "Delay after Transfer Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _10 ) } # [ doc = "Delay after Transfer Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "PCS to SCK Delay Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSSCK_A { # [ doc = "0: PCS to SCK Prescaler value is 1." ] _00 , # [ doc = "1: PCS to SCK Prescaler value is 3." ] _01 , # [ doc = "2: PCS to SCK Prescaler value is 5." ] _10 , # [ doc = "3: PCS to SCK Prescaler value is 7." ] _11 } impl From < PCSSCK_A > for u8 { # [ inline ( always ) ] fn from ( variant : PCSSCK_A ) -> Self { match variant { PCSSCK_A :: _00 => 0 , PCSSCK_A :: _01 => 1 , PCSSCK_A :: _10 => 2 , PCSSCK_A :: _11 => 3 } } } # [ doc = "Reader of field `PCSSCK`" ] pub type PCSSCK_R = crate :: R < u8 , PCSSCK_A > ; impl PCSSCK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSSCK_A { match self . bits { 0 => PCSSCK_A :: _00 , 1 => PCSSCK_A :: _01 , 2 => PCSSCK_A :: _10 , 3 => PCSSCK_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PCSSCK_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PCSSCK_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PCSSCK_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PCSSCK_A :: _11 } } # [ doc = "Write proxy for field `PCSSCK`" ] pub struct PCSSCK_W < 'a > { w : & 'a mut W , } impl < 'a > PCSSCK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSSCK_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "PCS to SCK Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _00 ) } # [ doc = "PCS to SCK Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _01 ) } # [ doc = "PCS to SCK Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _10 ) } # [ doc = "PCS to SCK Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } # [ doc = "LSB First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LSBFE_A { # [ doc = "0: Data is transferred MSB first." ] _0 , # [ doc = "1: Data is transferred LSB first." ] _1 } impl From < LSBFE_A > for bool { # [ inline ( always ) ] fn from ( variant : LSBFE_A ) -> Self { match variant { LSBFE_A :: _0 => false , LSBFE_A :: _1 => true } } } # [ doc = "Reader of field `LSBFE`" ] pub type LSBFE_R = crate :: R < bool , LSBFE_A > ; impl LSBFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LSBFE_A { match self . bits { false => LSBFE_A :: _0 , true => LSBFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LSBFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LSBFE_A :: _1 } } # [ doc = "Write proxy for field `LSBFE`" ] pub struct LSBFE_W < 'a > { w : & 'a mut W , } impl < 'a > LSBFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LSBFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is transferred MSB first." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LSBFE_A :: _0 ) } # [ doc = "Data is transferred LSB first." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LSBFE_A :: _1 ) } # [ 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 = "Clock Phase\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHA_A { # [ doc = "0: Data is captured on the leading edge of SCK and changed on the following edge." ] _0 , # [ doc = "1: Data is changed on the leading edge of SCK and captured on the following edge." ] _1 } impl From < CPHA_A > for bool { # [ inline ( always ) ] fn from ( variant : CPHA_A ) -> Self { match variant { CPHA_A :: _0 => false , CPHA_A :: _1 => true } } } # [ doc = "Reader of field `CPHA`" ] pub type CPHA_R = crate :: R < bool , CPHA_A > ; impl CPHA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPHA_A { match self . bits { false => CPHA_A :: _0 , true => CPHA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPHA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPHA_A :: _1 } } # [ doc = "Write proxy for field `CPHA`" ] pub struct CPHA_W < 'a > { w : & 'a mut W , } impl < 'a > CPHA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPHA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is captured on the leading edge of SCK and changed on the following edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _0 ) } # [ doc = "Data is changed on the leading edge of SCK and captured on the following edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _1 ) } # [ 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 = "Clock Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOL_A { # [ doc = "0: The inactive state value of SCK is low." ] _0 , # [ doc = "1: The inactive state value of SCK is high." ] _1 } impl From < CPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOL_A ) -> Self { match variant { CPOL_A :: _0 => false , CPOL_A :: _1 => true } } } # [ doc = "Reader of field `CPOL`" ] pub type CPOL_R = crate :: R < bool , CPOL_A > ; impl CPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOL_A { match self . bits { false => CPOL_A :: _0 , true => CPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOL_A :: _1 } } # [ doc = "Write proxy for field `CPOL`" ] pub struct CPOL_W < 'a > { w : & 'a mut W , } impl < 'a > CPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state value of SCK is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _0 ) } # [ doc = "The inactive state value of SCK is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _1 ) } # [ 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 = "Reader of field `FMSZ`" ] pub type FMSZ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FMSZ`" ] pub struct FMSZ_W < 'a > { w : & 'a mut W , } impl < 'a > FMSZ_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 & ! ( 0x0f << 27 ) ) | ( ( ( value as u32 ) & 0x0f ) << 27 ) ; self . w } } # [ doc = "Double Baud Rate\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBR_A { # [ doc = "0: The baud rate is computed normally with a 50/50 duty cycle." ] _0 , # [ doc = "1: The baud rate is doubled with the duty cycle depending on the Baud Rate Prescaler." ] _1 } impl From < DBR_A > for bool { # [ inline ( always ) ] fn from ( variant : DBR_A ) -> Self { match variant { DBR_A :: _0 => false , DBR_A :: _1 => true } } } # [ doc = "Reader of field `DBR`" ] pub type DBR_R = crate :: R < bool , DBR_A > ; impl DBR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBR_A { match self . bits { false => DBR_A :: _0 , true => DBR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBR_A :: _1 } } # [ doc = "Write proxy for field `DBR`" ] pub struct DBR_W < 'a > { w : & 'a mut W , } impl < 'a > DBR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The baud rate is computed normally with a 50/50 duty cycle." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DBR_A :: _0 ) } # [ doc = "The baud rate is doubled with the duty cycle depending on the Baud Rate Prescaler." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DBR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Baud Rate Scaler" ] # [ inline ( always ) ] pub fn br ( & self ) -> BR_R { BR_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Delay After Transfer Scaler" ] # [ inline ( always ) ] pub fn dt ( & self ) -> DT_R { DT_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - After SCK Delay Scaler" ] # [ inline ( always ) ] pub fn asc ( & self ) -> ASC_R { ASC_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - PCS to SCK Delay Scaler" ] # [ inline ( always ) ] pub fn cssck ( & self ) -> CSSCK_R { CSSCK_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:17 - Baud Rate Prescaler" ] # [ inline ( always ) ] pub fn pbr ( & self ) -> PBR_R { PBR_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - Delay after Transfer Prescaler" ] # [ inline ( always ) ] pub fn pdt ( & self ) -> PDT_R { PDT_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:21 - After SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pasc ( & self ) -> PASC_R { PASC_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bits 22:23 - PCS to SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pcssck ( & self ) -> PCSSCK_R { PCSSCK_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } # [ doc = "Bit 24 - LSB First" ] # [ inline ( always ) ] pub fn lsbfe ( & self ) -> LSBFE_R { LSBFE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & self ) -> CPHA_R { CPHA_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & self ) -> CPOL_R { CPOL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & self ) -> FMSZ_R { FMSZ_R :: new ( ( ( self . bits >> 27 ) & 0x0f ) as u8 ) } # [ doc = "Bit 31 - Double Baud Rate" ] # [ inline ( always ) ] pub fn dbr ( & self ) -> DBR_R { DBR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - Baud Rate Scaler" ] # [ inline ( always ) ] pub fn br ( & mut self ) -> BR_W { BR_W { w : self } } # [ doc = "Bits 4:7 - Delay After Transfer Scaler" ] # [ inline ( always ) ] pub fn dt ( & mut self ) -> DT_W { DT_W { w : self } } # [ doc = "Bits 8:11 - After SCK Delay Scaler" ] # [ inline ( always ) ] pub fn asc ( & mut self ) -> ASC_W { ASC_W { w : self } } # [ doc = "Bits 12:15 - PCS to SCK Delay Scaler" ] # [ inline ( always ) ] pub fn cssck ( & mut self ) -> CSSCK_W { CSSCK_W { w : self } } # [ doc = "Bits 16:17 - Baud Rate Prescaler" ] # [ inline ( always ) ] pub fn pbr ( & mut self ) -> PBR_W { PBR_W { w : self } } # [ doc = "Bits 18:19 - Delay after Transfer Prescaler" ] # [ inline ( always ) ] pub fn pdt ( & mut self ) -> PDT_W { PDT_W { w : self } } # [ doc = "Bits 20:21 - After SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pasc ( & mut self ) -> PASC_W { PASC_W { w : self } } # [ doc = "Bits 22:23 - PCS to SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pcssck ( & mut self ) -> PCSSCK_W { PCSSCK_W { w : self } } # [ doc = "Bit 24 - LSB First" ] # [ inline ( always ) ] pub fn lsbfe ( & mut self ) -> LSBFE_W { LSBFE_W { w : self } } # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & mut self ) -> CPHA_W { CPHA_W { w : self } } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & mut self ) -> CPOL_W { CPOL_W { w : self } } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & mut self ) -> FMSZ_W { FMSZ_W { w : self } } # [ doc = "Bit 31 - Double Baud Rate" ] # [ inline ( always ) ] pub fn dbr ( & mut self ) -> DBR_W { DBR_W { w : self } } } } # [ doc = "Clock and Transfer Attributes Register (In Slave Mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctar_slave](ctar_slave) module" ] pub type CTAR_SLAVE = crate :: Reg < u32 , _CTAR_SLAVE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTAR_SLAVE ; # [ doc = "`read()` method returns [ctar_slave::R](ctar_slave::R) reader structure" ] impl crate :: Readable for CTAR_SLAVE { } # [ doc = "`write(|w| ..)` method takes [ctar_slave::W](ctar_slave::W) writer structure" ] impl crate :: Writable for CTAR_SLAVE { } # [ doc = "Clock and Transfer Attributes Register (In Slave Mode)" ] pub mod ctar_slave { # [ doc = "Reader of register CTAR_SLAVE" ] pub type R = crate :: R < u32 , super :: CTAR_SLAVE > ; # [ doc = "Writer for register CTAR_SLAVE" ] pub type W = crate :: W < u32 , super :: CTAR_SLAVE > ; # [ doc = "Register CTAR_SLAVE `reset()`'s with value 0x7800_0000" ] impl crate :: ResetValue for super :: CTAR_SLAVE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7800_0000 } } # [ doc = "Clock Phase\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHA_A { # [ doc = "0: Data is captured on the leading edge of SCK and changed on the following edge." ] _0 , # [ doc = "1: Data is changed on the leading edge of SCK and captured on the following edge." ] _1 } impl From < CPHA_A > for bool { # [ inline ( always ) ] fn from ( variant : CPHA_A ) -> Self { match variant { CPHA_A :: _0 => false , CPHA_A :: _1 => true } } } # [ doc = "Reader of field `CPHA`" ] pub type CPHA_R = crate :: R < bool , CPHA_A > ; impl CPHA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPHA_A { match self . bits { false => CPHA_A :: _0 , true => CPHA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPHA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPHA_A :: _1 } } # [ doc = "Write proxy for field `CPHA`" ] pub struct CPHA_W < 'a > { w : & 'a mut W , } impl < 'a > CPHA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPHA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is captured on the leading edge of SCK and changed on the following edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _0 ) } # [ doc = "Data is changed on the leading edge of SCK and captured on the following edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _1 ) } # [ 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 = "Clock Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOL_A { # [ doc = "0: The inactive state value of SCK is low." ] _0 , # [ doc = "1: The inactive state value of SCK is high." ] _1 } impl From < CPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOL_A ) -> Self { match variant { CPOL_A :: _0 => false , CPOL_A :: _1 => true } } } # [ doc = "Reader of field `CPOL`" ] pub type CPOL_R = crate :: R < bool , CPOL_A > ; impl CPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOL_A { match self . bits { false => CPOL_A :: _0 , true => CPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOL_A :: _1 } } # [ doc = "Write proxy for field `CPOL`" ] pub struct CPOL_W < 'a > { w : & 'a mut W , } impl < 'a > CPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state value of SCK is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _0 ) } # [ doc = "The inactive state value of SCK is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _1 ) } # [ 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 = "Reader of field `FMSZ`" ] pub type FMSZ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FMSZ`" ] pub struct FMSZ_W < 'a > { w : & 'a mut W , } impl < 'a > FMSZ_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 & ! ( 0x0f << 27 ) ) | ( ( ( value as u32 ) & 0x0f ) << 27 ) ; self . w } } impl R { # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & self ) -> CPHA_R { CPHA_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & self ) -> CPOL_R { CPOL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & self ) -> FMSZ_R { FMSZ_R :: new ( ( ( self . bits >> 27 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & mut self ) -> CPHA_W { CPHA_W { w : self } } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & mut self ) -> CPOL_W { CPOL_W { w : self } } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & mut self ) -> FMSZ_W { FMSZ_W { w : self } } } } # [ doc = "Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sr](sr) module" ] pub type SR = crate :: Reg < u32 , _SR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SR ; # [ doc = "`read()` method returns [sr::R](sr::R) reader structure" ] impl crate :: Readable for SR { } # [ doc = "`write(|w| ..)` method takes [sr::W](sr::W) writer structure" ] impl crate :: Writable for SR { } # [ doc = "Status Register" ] pub mod sr { # [ doc = "Reader of register SR" ] pub type R = crate :: R < u32 , super :: SR > ; # [ doc = "Writer for register SR" ] pub type W = crate :: W < u32 , super :: SR > ; # [ doc = "Register SR `reset()`'s with value 0x0200_0000" ] impl crate :: ResetValue for super :: SR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0200_0000 } } # [ doc = "Reader of field `POPNXTPTR`" ] pub type POPNXTPTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `RXCTR`" ] pub type RXCTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TXNXTPTR`" ] pub type TXNXTPTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TXCTR`" ] pub type TXCTR_R = crate :: R < u8 , u8 > ; # [ doc = "Receive FIFO Drain Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_A { # [ doc = "0: RX FIFO is empty." ] _0 , # [ doc = "1: RX FIFO is not empty." ] _1 } impl From < RFDF_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_A ) -> Self { match variant { RFDF_A :: _0 => false , RFDF_A :: _1 => true } } } # [ doc = "Reader of field `RFDF`" ] pub type RFDF_R = crate :: R < bool , RFDF_A > ; impl RFDF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_A { match self . bits { false => RFDF_A :: _0 , true => RFDF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_A :: _1 } } # [ doc = "Write proxy for field `RFDF`" ] pub struct RFDF_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RX FIFO is empty." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_A :: _0 ) } # [ doc = "RX FIFO is not empty." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Receive FIFO Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFOF_A { # [ doc = "0: No Rx FIFO overflow." ] _0 , # [ doc = "1: Rx FIFO overflow has occurred." ] _1 } impl From < RFOF_A > for bool { # [ inline ( always ) ] fn from ( variant : RFOF_A ) -> Self { match variant { RFOF_A :: _0 => false , RFOF_A :: _1 => true } } } # [ doc = "Reader of field `RFOF`" ] pub type RFOF_R = crate :: R < bool , RFOF_A > ; impl RFOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFOF_A { match self . bits { false => RFOF_A :: _0 , true => RFOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFOF_A :: _1 } } # [ doc = "Write proxy for field `RFOF`" ] pub struct RFOF_W < 'a > { w : & 'a mut W , } impl < 'a > RFOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No Rx FIFO overflow." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFOF_A :: _0 ) } # [ doc = "Rx FIFO overflow has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFOF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Transmit FIFO Fill Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_A { # [ doc = "0: TX FIFO is full." ] _0 , # [ doc = "1: TX FIFO is not full." ] _1 } impl From < TFFF_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_A ) -> Self { match variant { TFFF_A :: _0 => false , TFFF_A :: _1 => true } } } # [ doc = "Reader of field `TFFF`" ] pub type TFFF_R = crate :: R < bool , TFFF_A > ; impl TFFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_A { match self . bits { false => TFFF_A :: _0 , true => TFFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_A :: _1 } } # [ doc = "Write proxy for field `TFFF`" ] pub struct TFFF_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TX FIFO is full." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_A :: _0 ) } # [ doc = "TX FIFO is not full." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_A :: _1 ) } # [ 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 = "Transmit FIFO Underflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFUF_A { # [ doc = "0: No TX FIFO underflow." ] _0 , # [ doc = "1: TX FIFO underflow has occurred." ] _1 } impl From < TFUF_A > for bool { # [ inline ( always ) ] fn from ( variant : TFUF_A ) -> Self { match variant { TFUF_A :: _0 => false , TFUF_A :: _1 => true } } } # [ doc = "Reader of field `TFUF`" ] pub type TFUF_R = crate :: R < bool , TFUF_A > ; impl TFUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFUF_A { match self . bits { false => TFUF_A :: _0 , true => TFUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFUF_A :: _1 } } # [ doc = "Write proxy for field `TFUF`" ] pub struct TFUF_W < 'a > { w : & 'a mut W , } impl < 'a > TFUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No TX FIFO underflow." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFUF_A :: _0 ) } # [ doc = "TX FIFO underflow has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFUF_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "End of Queue Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQF_A { # [ doc = "0: EOQ is not set in the executing command." ] _0 , # [ doc = "1: EOQ is set in the executing SPI command." ] _1 } impl From < EOQF_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQF_A ) -> Self { match variant { EOQF_A :: _0 => false , EOQF_A :: _1 => true } } } # [ doc = "Reader of field `EOQF`" ] pub type EOQF_R = crate :: R < bool , EOQF_A > ; impl EOQF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQF_A { match self . bits { false => EOQF_A :: _0 , true => EOQF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQF_A :: _1 } } # [ doc = "Write proxy for field `EOQF`" ] pub struct EOQF_W < 'a > { w : & 'a mut W , } impl < 'a > EOQF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "EOQ is not set in the executing command." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQF_A :: _0 ) } # [ doc = "EOQ is set in the executing SPI command." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQF_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "TX and RX Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRXS_A { # [ doc = "0: Transmit and receive operations are disabled (The module is in Stopped state)." ] _0 , # [ doc = "1: Transmit and receive operations are enabled (The module is in Running state)." ] _1 } impl From < TXRXS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRXS_A ) -> Self { match variant { TXRXS_A :: _0 => false , TXRXS_A :: _1 => true } } } # [ doc = "Reader of field `TXRXS`" ] pub type TXRXS_R = crate :: R < bool , TXRXS_A > ; impl TXRXS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRXS_A { match self . bits { false => TXRXS_A :: _0 , true => TXRXS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRXS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRXS_A :: _1 } } # [ doc = "Write proxy for field `TXRXS`" ] pub struct TXRXS_W < 'a > { w : & 'a mut W , } impl < 'a > TXRXS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRXS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit and receive operations are disabled (The module is in Stopped state)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRXS_A :: _0 ) } # [ doc = "Transmit and receive operations are enabled (The module is in Running state)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRXS_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Transfer Complete Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_A { # [ doc = "0: Transfer not complete." ] _0 , # [ doc = "1: Transfer complete." ] _1 } impl From < TCF_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_A ) -> Self { match variant { TCF_A :: _0 => false , TCF_A :: _1 => true } } } # [ doc = "Reader of field `TCF`" ] pub type TCF_R = crate :: R < bool , TCF_A > ; impl TCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_A { match self . bits { false => TCF_A :: _0 , true => TCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_A :: _1 } } # [ doc = "Write proxy for field `TCF`" ] pub struct TCF_W < 'a > { w : & 'a mut W , } impl < 'a > TCF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transfer not complete." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCF_A :: _0 ) } # [ doc = "Transfer complete." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCF_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Pop Next Pointer" ] # [ inline ( always ) ] pub fn popnxtptr ( & self ) -> POPNXTPTR_R { POPNXTPTR_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - RX FIFO Counter" ] # [ inline ( always ) ] pub fn rxctr ( & self ) -> RXCTR_R { RXCTR_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Transmit Next Pointer" ] # [ inline ( always ) ] pub fn txnxtptr ( & self ) -> TXNXTPTR_R { TXNXTPTR_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - TX FIFO Counter" ] # [ inline ( always ) ] pub fn txctr ( & self ) -> TXCTR_R { TXCTR_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bit 17 - Receive FIFO Drain Flag" ] # [ inline ( always ) ] pub fn rfdf ( & self ) -> RFDF_R { RFDF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Receive FIFO Overflow Flag" ] # [ inline ( always ) ] pub fn rfof ( & self ) -> RFOF_R { RFOF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Transmit FIFO Fill Flag" ] # [ inline ( always ) ] pub fn tfff ( & self ) -> TFFF_R { TFFF_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Transmit FIFO Underflow Flag" ] # [ inline ( always ) ] pub fn tfuf ( & self ) -> TFUF_R { TFUF_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - End of Queue Flag" ] # [ inline ( always ) ] pub fn eoqf ( & self ) -> EOQF_R { EOQF_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - TX and RX Status" ] # [ inline ( always ) ] pub fn txrxs ( & self ) -> TXRXS_R { TXRXS_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & self ) -> TCF_R { TCF_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 17 - Receive FIFO Drain Flag" ] # [ inline ( always ) ] pub fn rfdf ( & mut self ) -> RFDF_W { RFDF_W { w : self } } # [ doc = "Bit 19 - Receive FIFO Overflow Flag" ] # [ inline ( always ) ] pub fn rfof ( & mut self ) -> RFOF_W { RFOF_W { w : self } } # [ doc = "Bit 25 - Transmit FIFO Fill Flag" ] # [ inline ( always ) ] pub fn tfff ( & mut self ) -> TFFF_W { TFFF_W { w : self } } # [ doc = "Bit 27 - Transmit FIFO Underflow Flag" ] # [ inline ( always ) ] pub fn tfuf ( & mut self ) -> TFUF_W { TFUF_W { w : self } } # [ doc = "Bit 28 - End of Queue Flag" ] # [ inline ( always ) ] pub fn eoqf ( & mut self ) -> EOQF_W { EOQF_W { w : self } } # [ doc = "Bit 30 - TX and RX Status" ] # [ inline ( always ) ] pub fn txrxs ( & mut self ) -> TXRXS_W { TXRXS_W { w : self } } # [ doc = "Bit 31 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & mut self ) -> TCF_W { TCF_W { w : self } } } } # [ doc = "DMA/Interrupt Request Select and Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rser](rser) module" ] pub type RSER = crate :: Reg < u32 , _RSER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RSER ; # [ doc = "`read()` method returns [rser::R](rser::R) reader structure" ] impl crate :: Readable for RSER { } # [ doc = "`write(|w| ..)` method takes [rser::W](rser::W) writer structure" ] impl crate :: Writable for RSER { } # [ doc = "DMA/Interrupt Request Select and Enable Register" ] pub mod rser { # [ doc = "Reader of register RSER" ] pub type R = crate :: R < u32 , super :: RSER > ; # [ doc = "Writer for register RSER" ] pub type W = crate :: W < u32 , super :: RSER > ; # [ doc = "Register RSER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RSER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO Drain DMA or Interrupt Request Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_DIRS_A { # [ doc = "0: Interrupt request." ] _0 , # [ doc = "1: DMA request." ] _1 } impl From < RFDF_DIRS_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_DIRS_A ) -> Self { match variant { RFDF_DIRS_A :: _0 => false , RFDF_DIRS_A :: _1 => true } } } # [ doc = "Reader of field `RFDF_DIRS`" ] pub type RFDF_DIRS_R = crate :: R < bool , RFDF_DIRS_A > ; impl RFDF_DIRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_DIRS_A { match self . bits { false => RFDF_DIRS_A :: _0 , true => RFDF_DIRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_DIRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_DIRS_A :: _1 } } # [ doc = "Write proxy for field `RFDF_DIRS`" ] pub struct RFDF_DIRS_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_DIRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_DIRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_DIRS_A :: _0 ) } # [ doc = "DMA request." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_DIRS_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Receive FIFO Drain Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_RE_A { # [ doc = "0: RFDF interrupt or DMA requests are disabled." ] _0 , # [ doc = "1: RFDF interrupt or DMA requests are enabled." ] _1 } impl From < RFDF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_RE_A ) -> Self { match variant { RFDF_RE_A :: _0 => false , RFDF_RE_A :: _1 => true } } } # [ doc = "Reader of field `RFDF_RE`" ] pub type RFDF_RE_R = crate :: R < bool , RFDF_RE_A > ; impl RFDF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_RE_A { match self . bits { false => RFDF_RE_A :: _0 , true => RFDF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_RE_A :: _1 } } # [ doc = "Write proxy for field `RFDF_RE`" ] pub struct RFDF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RFDF interrupt or DMA requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_RE_A :: _0 ) } # [ doc = "RFDF interrupt or DMA requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_RE_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Receive FIFO Overflow Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFOF_RE_A { # [ doc = "0: RFOF interrupt requests are disabled." ] _0 , # [ doc = "1: RFOF interrupt requests are enabled." ] _1 } impl From < RFOF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RFOF_RE_A ) -> Self { match variant { RFOF_RE_A :: _0 => false , RFOF_RE_A :: _1 => true } } } # [ doc = "Reader of field `RFOF_RE`" ] pub type RFOF_RE_R = crate :: R < bool , RFOF_RE_A > ; impl RFOF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFOF_RE_A { match self . bits { false => RFOF_RE_A :: _0 , true => RFOF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFOF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFOF_RE_A :: _1 } } # [ doc = "Write proxy for field `RFOF_RE`" ] pub struct RFOF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > RFOF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFOF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RFOF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFOF_RE_A :: _0 ) } # [ doc = "RFOF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFOF_RE_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Transmit FIFO Fill DMA or Interrupt Request Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_DIRS_A { # [ doc = "0: TFFF flag generates interrupt requests." ] _0 , # [ doc = "1: TFFF flag generates DMA requests." ] _1 } impl From < TFFF_DIRS_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_DIRS_A ) -> Self { match variant { TFFF_DIRS_A :: _0 => false , TFFF_DIRS_A :: _1 => true } } } # [ doc = "Reader of field `TFFF_DIRS`" ] pub type TFFF_DIRS_R = crate :: R < bool , TFFF_DIRS_A > ; impl TFFF_DIRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_DIRS_A { match self . bits { false => TFFF_DIRS_A :: _0 , true => TFFF_DIRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_DIRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_DIRS_A :: _1 } } # [ doc = "Write proxy for field `TFFF_DIRS`" ] pub struct TFFF_DIRS_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_DIRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_DIRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFFF flag generates interrupt requests." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_DIRS_A :: _0 ) } # [ doc = "TFFF flag generates DMA requests." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_DIRS_A :: _1 ) } # [ 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 = "Transmit FIFO Fill Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_RE_A { # [ doc = "0: TFFF interrupts or DMA requests are disabled." ] _0 , # [ doc = "1: TFFF interrupts or DMA requests are enabled." ] _1 } impl From < TFFF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_RE_A ) -> Self { match variant { TFFF_RE_A :: _0 => false , TFFF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TFFF_RE`" ] pub type TFFF_RE_R = crate :: R < bool , TFFF_RE_A > ; impl TFFF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_RE_A { match self . bits { false => TFFF_RE_A :: _0 , true => TFFF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_RE_A :: _1 } } # [ doc = "Write proxy for field `TFFF_RE`" ] pub struct TFFF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFFF interrupts or DMA requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_RE_A :: _0 ) } # [ doc = "TFFF interrupts or DMA requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_RE_A :: _1 ) } # [ 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 = "Transmit FIFO Underflow Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFUF_RE_A { # [ doc = "0: TFUF interrupt requests are disabled." ] _0 , # [ doc = "1: TFUF interrupt requests are enabled." ] _1 } impl From < TFUF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TFUF_RE_A ) -> Self { match variant { TFUF_RE_A :: _0 => false , TFUF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TFUF_RE`" ] pub type TFUF_RE_R = crate :: R < bool , TFUF_RE_A > ; impl TFUF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFUF_RE_A { match self . bits { false => TFUF_RE_A :: _0 , true => TFUF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFUF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFUF_RE_A :: _1 } } # [ doc = "Write proxy for field `TFUF_RE`" ] pub struct TFUF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TFUF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFUF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFUF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFUF_RE_A :: _0 ) } # [ doc = "TFUF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFUF_RE_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Finished Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQF_RE_A { # [ doc = "0: EOQF interrupt requests are disabled." ] _0 , # [ doc = "1: EOQF interrupt requests are enabled." ] _1 } impl From < EOQF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQF_RE_A ) -> Self { match variant { EOQF_RE_A :: _0 => false , EOQF_RE_A :: _1 => true } } } # [ doc = "Reader of field `EOQF_RE`" ] pub type EOQF_RE_R = crate :: R < bool , EOQF_RE_A > ; impl EOQF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQF_RE_A { match self . bits { false => EOQF_RE_A :: _0 , true => EOQF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQF_RE_A :: _1 } } # [ doc = "Write proxy for field `EOQF_RE`" ] pub struct EOQF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > EOQF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "EOQF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQF_RE_A :: _0 ) } # [ doc = "EOQF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQF_RE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Transmission Complete Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_RE_A { # [ doc = "0: TCF interrupt requests are disabled." ] _0 , # [ doc = "1: TCF interrupt requests are enabled." ] _1 } impl From < TCF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_RE_A ) -> Self { match variant { TCF_RE_A :: _0 => false , TCF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TCF_RE`" ] pub type TCF_RE_R = crate :: R < bool , TCF_RE_A > ; impl TCF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_RE_A { match self . bits { false => TCF_RE_A :: _0 , true => TCF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_RE_A :: _1 } } # [ doc = "Write proxy for field `TCF_RE`" ] pub struct TCF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TCF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TCF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCF_RE_A :: _0 ) } # [ doc = "TCF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCF_RE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 16 - Receive FIFO Drain DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn rfdf_dirs ( & self ) -> RFDF_DIRS_R { RFDF_DIRS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Receive FIFO Drain Request Enable" ] # [ inline ( always ) ] pub fn rfdf_re ( & self ) -> RFDF_RE_R { RFDF_RE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Receive FIFO Overflow Request Enable" ] # [ inline ( always ) ] pub fn rfof_re ( & self ) -> RFOF_RE_R { RFOF_RE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Transmit FIFO Fill DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn tfff_dirs ( & self ) -> TFFF_DIRS_R { TFFF_DIRS_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Transmit FIFO Fill Request Enable" ] # [ inline ( always ) ] pub fn tfff_re ( & self ) -> TFFF_RE_R { TFFF_RE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Transmit FIFO Underflow Request Enable" ] # [ inline ( always ) ] pub fn tfuf_re ( & self ) -> TFUF_RE_R { TFUF_RE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Finished Request Enable" ] # [ inline ( always ) ] pub fn eoqf_re ( & self ) -> EOQF_RE_R { EOQF_RE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Transmission Complete Request Enable" ] # [ inline ( always ) ] pub fn tcf_re ( & self ) -> TCF_RE_R { TCF_RE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 16 - Receive FIFO Drain DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn rfdf_dirs ( & mut self ) -> RFDF_DIRS_W { RFDF_DIRS_W { w : self } } # [ doc = "Bit 17 - Receive FIFO Drain Request Enable" ] # [ inline ( always ) ] pub fn rfdf_re ( & mut self ) -> RFDF_RE_W { RFDF_RE_W { w : self } } # [ doc = "Bit 19 - Receive FIFO Overflow Request Enable" ] # [ inline ( always ) ] pub fn rfof_re ( & mut self ) -> RFOF_RE_W { RFOF_RE_W { w : self } } # [ doc = "Bit 24 - Transmit FIFO Fill DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn tfff_dirs ( & mut self ) -> TFFF_DIRS_W { TFFF_DIRS_W { w : self } } # [ doc = "Bit 25 - Transmit FIFO Fill Request Enable" ] # [ inline ( always ) ] pub fn tfff_re ( & mut self ) -> TFFF_RE_W { TFFF_RE_W { w : self } } # [ doc = "Bit 27 - Transmit FIFO Underflow Request Enable" ] # [ inline ( always ) ] pub fn tfuf_re ( & mut self ) -> TFUF_RE_W { TFUF_RE_W { w : self } } # [ doc = "Bit 28 - Finished Request Enable" ] # [ inline ( always ) ] pub fn eoqf_re ( & mut self ) -> EOQF_RE_W { EOQF_RE_W { w : self } } # [ doc = "Bit 31 - Transmission Complete Request Enable" ] # [ inline ( always ) ] pub fn tcf_re ( & mut self ) -> TCF_RE_W { TCF_RE_W { w : self } } } } # [ doc = "PUSH TX FIFO Register In Master Mode\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pushr](pushr) module" ] pub type PUSHR = crate :: Reg < u32 , _PUSHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PUSHR ; # [ doc = "`read()` method returns [pushr::R](pushr::R) reader structure" ] impl crate :: Readable for PUSHR { } # [ doc = "`write(|w| ..)` method takes [pushr::W](pushr::W) writer structure" ] impl crate :: Writable for PUSHR { } # [ doc = "PUSH TX FIFO Register In Master Mode" ] pub mod pushr { # [ doc = "Reader of register PUSHR" ] pub type R = crate :: R < u32 , super :: PUSHR > ; # [ doc = "Writer for register PUSHR" ] pub type W = crate :: W < u32 , super :: PUSHR > ; # [ doc = "Register PUSHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PUSHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TXDATA`" ] pub struct TXDATA_W < 'a > { w : & 'a mut W , } impl < 'a > TXDATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS0_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS0_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS0_A ) -> Self { match variant { PCS0_A :: _0 => false , PCS0_A :: _1 => true } } } # [ doc = "Reader of field `PCS0`" ] pub type PCS0_R = crate :: R < bool , PCS0_A > ; impl PCS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS0_A { match self . bits { false => PCS0_A :: _0 , true => PCS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS0_A :: _1 } } # [ doc = "Write proxy for field `PCS0`" ] pub struct PCS0_W < 'a > { w : & 'a mut W , } impl < 'a > PCS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS0_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS1_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS1_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS1_A ) -> Self { match variant { PCS1_A :: _0 => false , PCS1_A :: _1 => true } } } # [ doc = "Reader of field `PCS1`" ] pub type PCS1_R = crate :: R < bool , PCS1_A > ; impl PCS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS1_A { match self . bits { false => PCS1_A :: _0 , true => PCS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS1_A :: _1 } } # [ doc = "Write proxy for field `PCS1`" ] pub struct PCS1_W < 'a > { w : & 'a mut W , } impl < 'a > PCS1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS1_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS2_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS2_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS2_A ) -> Self { match variant { PCS2_A :: _0 => false , PCS2_A :: _1 => true } } } # [ doc = "Reader of field `PCS2`" ] pub type PCS2_R = crate :: R < bool , PCS2_A > ; impl PCS2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS2_A { match self . bits { false => PCS2_A :: _0 , true => PCS2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS2_A :: _1 } } # [ doc = "Write proxy for field `PCS2`" ] pub struct PCS2_W < 'a > { w : & 'a mut W , } impl < 'a > PCS2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS2_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS3_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS3_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS3_A ) -> Self { match variant { PCS3_A :: _0 => false , PCS3_A :: _1 => true } } } # [ doc = "Reader of field `PCS3`" ] pub type PCS3_R = crate :: R < bool , PCS3_A > ; impl PCS3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS3_A { match self . bits { false => PCS3_A :: _0 , true => PCS3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS3_A :: _1 } } # [ doc = "Write proxy for field `PCS3`" ] pub struct PCS3_W < 'a > { w : & 'a mut W , } impl < 'a > PCS3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS3_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS3_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS4_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS4_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS4_A ) -> Self { match variant { PCS4_A :: _0 => false , PCS4_A :: _1 => true } } } # [ doc = "Reader of field `PCS4`" ] pub type PCS4_R = crate :: R < bool , PCS4_A > ; impl PCS4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS4_A { match self . bits { false => PCS4_A :: _0 , true => PCS4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS4_A :: _1 } } # [ doc = "Write proxy for field `PCS4`" ] pub struct PCS4_W < 'a > { w : & 'a mut W , } impl < 'a > PCS4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS4_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS4_A :: _1 ) } # [ 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 = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS5_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS5_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS5_A ) -> Self { match variant { PCS5_A :: _0 => false , PCS5_A :: _1 => true } } } # [ doc = "Reader of field `PCS5`" ] pub type PCS5_R = crate :: R < bool , PCS5_A > ; impl PCS5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS5_A { match self . bits { false => PCS5_A :: _0 , true => PCS5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS5_A :: _1 } } # [ doc = "Write proxy for field `PCS5`" ] pub struct PCS5_W < 'a > { w : & 'a mut W , } impl < 'a > PCS5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS5_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS5_A :: _1 ) } # [ 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 = "Clear Transfer Counter\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTCNT_A { # [ doc = "0: Do not clear the TCR\\[TCNT\\] field." ] _0 , # [ doc = "1: Clear the TCR\\[TCNT\\] field." ] _1 } impl From < CTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : CTCNT_A ) -> Self { match variant { CTCNT_A :: _0 => false , CTCNT_A :: _1 => true } } } # [ doc = "Reader of field `CTCNT`" ] pub type CTCNT_R = crate :: R < bool , CTCNT_A > ; impl CTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CTCNT_A { match self . bits { false => CTCNT_A :: _0 , true => CTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CTCNT_A :: _1 } } # [ doc = "Write proxy for field `CTCNT`" ] pub struct CTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > CTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the TCR\\[TCNT\\] field." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CTCNT_A :: _0 ) } # [ doc = "Clear the TCR\\[TCNT\\] field." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CTCNT_A :: _1 ) } # [ 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 = "End Of Queue\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQ_A { # [ doc = "0: The SPI data is not the last data to transfer." ] _0 , # [ doc = "1: The SPI data is the last data to transfer." ] _1 } impl From < EOQ_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQ_A ) -> Self { match variant { EOQ_A :: _0 => false , EOQ_A :: _1 => true } } } # [ doc = "Reader of field `EOQ`" ] pub type EOQ_R = crate :: R < bool , EOQ_A > ; impl EOQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQ_A { match self . bits { false => EOQ_A :: _0 , true => EOQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQ_A :: _1 } } # [ doc = "Write proxy for field `EOQ`" ] pub struct EOQ_W < 'a > { w : & 'a mut W , } impl < 'a > EOQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The SPI data is not the last data to transfer." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQ_A :: _0 ) } # [ doc = "The SPI data is the last data to transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQ_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Clock and Transfer Attributes Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTAS_A { # [ doc = "0: CTAR0" ] _000 , # [ doc = "1: CTAR1" ] _001 } impl From < CTAS_A > for u8 { # [ inline ( always ) ] fn from ( variant : CTAS_A ) -> Self { match variant { CTAS_A :: _000 => 0 , CTAS_A :: _001 => 1 } } } # [ doc = "Reader of field `CTAS`" ] pub type CTAS_R = crate :: R < u8 , CTAS_A > ; impl CTAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CTAS_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CTAS_A :: _000 ) , 1 => Val ( CTAS_A :: _001 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == CTAS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == CTAS_A :: _001 } } # [ doc = "Write proxy for field `CTAS`" ] pub struct CTAS_W < 'a > { w : & 'a mut W , } impl < 'a > CTAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTAS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "CTAR0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( CTAS_A :: _000 ) } # [ doc = "CTAR1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( CTAS_A :: _001 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x07 ) << 28 ) ; self . w } } # [ doc = "Continuous Peripheral Chip Select Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CONT_A { # [ doc = "0: Return PCSn signals to their inactive state between transfers." ] _0 , # [ doc = "1: Keep PCSn signals asserted between transfers." ] _1 } impl From < CONT_A > for bool { # [ inline ( always ) ] fn from ( variant : CONT_A ) -> Self { match variant { CONT_A :: _0 => false , CONT_A :: _1 => true } } } # [ doc = "Reader of field `CONT`" ] pub type CONT_R = crate :: R < bool , CONT_A > ; impl CONT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CONT_A { match self . bits { false => CONT_A :: _0 , true => CONT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CONT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CONT_A :: _1 } } # [ doc = "Write proxy for field `CONT`" ] pub struct CONT_W < 'a > { w : & 'a mut W , } impl < 'a > CONT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CONT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Return PCSn signals to their inactive state between transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CONT_A :: _0 ) } # [ doc = "Keep PCSn signals asserted between transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CONT_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bit 16 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs0 ( & self ) -> PCS0_R { PCS0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs1 ( & self ) -> PCS1_R { PCS1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs2 ( & self ) -> PCS2_R { PCS2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs3 ( & self ) -> PCS3_R { PCS3_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs4 ( & self ) -> PCS4_R { PCS4_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs5 ( & self ) -> PCS5_R { PCS5_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clear Transfer Counter" ] # [ inline ( always ) ] pub fn ctcnt ( & self ) -> CTCNT_R { CTCNT_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - End Of Queue" ] # [ inline ( always ) ] pub fn eoq ( & self ) -> EOQ_R { EOQ_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:30 - Clock and Transfer Attributes Select" ] # [ inline ( always ) ] pub fn ctas ( & self ) -> CTAS_R { CTAS_R :: new ( ( ( self . bits >> 28 ) & 0x07 ) as u8 ) } # [ doc = "Bit 31 - Continuous Peripheral Chip Select Enable" ] # [ inline ( always ) ] pub fn cont ( & self ) -> CONT_R { CONT_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & mut self ) -> TXDATA_W { TXDATA_W { w : self } } # [ doc = "Bit 16 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs0 ( & mut self ) -> PCS0_W { PCS0_W { w : self } } # [ doc = "Bit 17 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs1 ( & mut self ) -> PCS1_W { PCS1_W { w : self } } # [ doc = "Bit 18 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs2 ( & mut self ) -> PCS2_W { PCS2_W { w : self } } # [ doc = "Bit 19 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs3 ( & mut self ) -> PCS3_W { PCS3_W { w : self } } # [ doc = "Bit 20 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs4 ( & mut self ) -> PCS4_W { PCS4_W { w : self } } # [ doc = "Bit 21 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs5 ( & mut self ) -> PCS5_W { PCS5_W { w : self } } # [ doc = "Bit 26 - Clear Transfer Counter" ] # [ inline ( always ) ] pub fn ctcnt ( & mut self ) -> CTCNT_W { CTCNT_W { w : self } } # [ doc = "Bit 27 - End Of Queue" ] # [ inline ( always ) ] pub fn eoq ( & mut self ) -> EOQ_W { EOQ_W { w : self } } # [ doc = "Bits 28:30 - Clock and Transfer Attributes Select" ] # [ inline ( always ) ] pub fn ctas ( & mut self ) -> CTAS_W { CTAS_W { w : self } } # [ doc = "Bit 31 - Continuous Peripheral Chip Select Enable" ] # [ inline ( always ) ] pub fn cont ( & mut self ) -> CONT_W { CONT_W { w : self } } } } # [ doc = "PUSH TX FIFO Register In Slave Mode\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pushr_slave](pushr_slave) module" ] pub type PUSHR_SLAVE = crate :: Reg < u32 , _PUSHR_SLAVE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PUSHR_SLAVE ; # [ doc = "`read()` method returns [pushr_slave::R](pushr_slave::R) reader structure" ] impl crate :: Readable for PUSHR_SLAVE { } # [ doc = "`write(|w| ..)` method takes [pushr_slave::W](pushr_slave::W) writer structure" ] impl crate :: Writable for PUSHR_SLAVE { } # [ doc = "PUSH TX FIFO Register In Slave Mode" ] pub mod pushr_slave { # [ doc = "Reader of register PUSHR_SLAVE" ] pub type R = crate :: R < u32 , super :: PUSHR_SLAVE > ; # [ doc = "Writer for register PUSHR_SLAVE" ] pub type W = crate :: W < u32 , super :: PUSHR_SLAVE > ; # [ doc = "Register PUSHR_SLAVE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PUSHR_SLAVE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `TXDATA`" ] pub struct TXDATA_W < 'a > { w : & 'a mut W , } impl < 'a > TXDATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & mut self ) -> TXDATA_W { TXDATA_W { w : self } } } } # [ doc = "POP RX FIFO Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [popr](popr) module" ] pub type POPR = crate :: Reg < u32 , _POPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POPR ; # [ doc = "`read()` method returns [popr::R](popr::R) reader structure" ] impl crate :: Readable for POPR { } # [ doc = "POP RX FIFO Register" ] pub mod popr { # [ doc = "Reader of register POPR" ] pub type R = crate :: R < u32 , super :: POPR > ; # [ doc = "Reader of field `RXDATA`" ] pub type RXDATA_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Received Data" ] # [ inline ( always ) ] pub fn rxdata ( & self ) -> RXDATA_R { RXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Transmit FIFO Registers\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [txfr](txfr) module" ] pub type TXFR = crate :: Reg < u32 , _TXFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TXFR ; # [ doc = "`read()` method returns [txfr::R](txfr::R) reader structure" ] impl crate :: Readable for TXFR { } # [ doc = "Transmit FIFO Registers" ] pub mod txfr { # [ doc = "Reader of register TXFR%s" ] pub type R = crate :: R < u32 , super :: TXFR > ; # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `TXCMD_TXDATA`" ] pub type TXCMD_TXDATA_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Transmit Command or Transmit Data" ] # [ inline ( always ) ] pub fn txcmd_txdata ( & self ) -> TXCMD_TXDATA_R { TXCMD_TXDATA_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } } # [ doc = "Receive FIFO Registers\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxfr](rxfr) module" ] pub type RXFR = crate :: Reg < u32 , _RXFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXFR ; # [ doc = "`read()` method returns [rxfr::R](rxfr::R) reader structure" ] impl crate :: Readable for RXFR { } # [ doc = "Receive FIFO Registers" ] pub mod rxfr { # [ doc = "Reader of register RXFR%s" ] pub type R = crate :: R < u32 , super :: RXFR > ; # [ doc = "Reader of field `RXDATA`" ] pub type RXDATA_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Receive Data" ] # [ inline ( always ) ] pub fn rxdata ( & self ) -> RXDATA_R { RXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } } # [ doc = "Serial Peripheral Interface" ] pub struct SPI1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPI1 { } impl SPI1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const spi1 :: RegisterBlock { 0x4002_d000 as * const _ } } impl Deref for SPI1 { type Target = spi1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SPI1 :: ptr ( ) } } } # [ doc = "Serial Peripheral Interface" ] pub mod spi1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Module Configuration Register" ] pub mcr : MCR , _reserved1 : [ u8 ; 4usize ] , # [ doc = "0x08 - Transfer Count Register" ] pub tcr : TCR , _reserved_2_ctar : [ u8 ; 8usize ] , _reserved3 : [ u8 ; 24usize ] , # [ doc = "0x2c - Status Register" ] pub sr : SR , # [ doc = "0x30 - DMA/Interrupt Request Select and Enable Register" ] pub rser : RSER , _reserved_5_pushr : [ u8 ; 4usize ] , # [ doc = "0x38 - POP RX FIFO Register" ] pub popr : POPR , # [ doc = "0x3c - Transmit FIFO Registers" ] pub txfr : [ TXFR ; 4 ] , _reserved8 : [ u8 ; 48usize ] , # [ doc = "0x7c - Receive FIFO Registers" ] pub rxfr : [ RXFR ; 4 ] , } impl RegisterBlock { # [ doc = "0x0c - Clock and Transfer Attributes Register (In Slave Mode)" ] # [ inline ( always ) ] pub fn ctar_slave ( & self ) -> & CTAR_SLAVE { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 12usize ) as * const CTAR_SLAVE ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Slave Mode)" ] # [ inline ( always ) ] pub fn ctar_slave_mut ( & self ) -> & mut CTAR_SLAVE { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 12usize ) as * mut CTAR_SLAVE ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Master Mode)" ] # [ inline ( always ) ] pub fn ctar ( & self ) -> & [ CTAR ; 2 ] { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 12usize ) as * const [ CTAR ; 2 ] ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Master Mode)" ] # [ inline ( always ) ] pub fn ctar_mut ( & self ) -> & mut [ CTAR ; 2 ] { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 12usize ) as * mut [ CTAR ; 2 ] ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Slave Mode" ] # [ inline ( always ) ] pub fn pushr_slave ( & self ) -> & PUSHR_SLAVE { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 52usize ) as * const PUSHR_SLAVE ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Slave Mode" ] # [ inline ( always ) ] pub fn pushr_slave_mut ( & self ) -> & mut PUSHR_SLAVE { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 52usize ) as * mut PUSHR_SLAVE ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Master Mode" ] # [ inline ( always ) ] pub fn pushr ( & self ) -> & PUSHR { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 52usize ) as * const PUSHR ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Master Mode" ] # [ inline ( always ) ] pub fn pushr_mut ( & self ) -> & mut PUSHR { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 52usize ) as * mut PUSHR ) } } } # [ doc = "Module Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mcr](mcr) module" ] pub type MCR = crate :: Reg < u32 , _MCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCR ; # [ doc = "`read()` method returns [mcr::R](mcr::R) reader structure" ] impl crate :: Readable for MCR { } # [ doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure" ] impl crate :: Writable for MCR { } # [ doc = "Module Configuration Register" ] pub mod mcr { # [ doc = "Reader of register MCR" ] pub type R = crate :: R < u32 , super :: MCR > ; # [ doc = "Writer for register MCR" ] pub type W = crate :: W < u32 , super :: MCR > ; # [ doc = "Register MCR `reset()`'s with value 0x4001" ] impl crate :: ResetValue for super :: MCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x4001 } } # [ doc = "Halt\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HALT_A { # [ doc = "0: Start transfers." ] _0 , # [ doc = "1: Stop transfers." ] _1 } impl From < HALT_A > for bool { # [ inline ( always ) ] fn from ( variant : HALT_A ) -> Self { match variant { HALT_A :: _0 => false , HALT_A :: _1 => true } } } # [ doc = "Reader of field `HALT`" ] pub type HALT_R = crate :: R < bool , HALT_A > ; impl HALT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HALT_A { match self . bits { false => HALT_A :: _0 , true => HALT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HALT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HALT_A :: _1 } } # [ doc = "Write proxy for field `HALT`" ] pub struct HALT_W < 'a > { w : & 'a mut W , } impl < 'a > HALT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HALT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Start transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _0 ) } # [ doc = "Stop transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Sample Point\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMPL_PT_A { # [ doc = "0: 0 protocol clock cycles between SCK edge and SIN sample" ] _00 , # [ doc = "1: 1 protocol clock cycle between SCK edge and SIN sample" ] _01 , # [ doc = "2: 2 protocol clock cycles between SCK edge and SIN sample" ] _10 } impl From < SMPL_PT_A > for u8 { # [ inline ( always ) ] fn from ( variant : SMPL_PT_A ) -> Self { match variant { SMPL_PT_A :: _00 => 0 , SMPL_PT_A :: _01 => 1 , SMPL_PT_A :: _10 => 2 } } } # [ doc = "Reader of field `SMPL_PT`" ] pub type SMPL_PT_R = crate :: R < u8 , SMPL_PT_A > ; impl SMPL_PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SMPL_PT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SMPL_PT_A :: _00 ) , 1 => Val ( SMPL_PT_A :: _01 ) , 2 => Val ( SMPL_PT_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SMPL_PT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SMPL_PT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SMPL_PT_A :: _10 } } # [ doc = "Write proxy for field `SMPL_PT`" ] pub struct SMPL_PT_W < 'a > { w : & 'a mut W , } impl < 'a > SMPL_PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMPL_PT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "0 protocol clock cycles between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _00 ) } # [ doc = "1 protocol clock cycle between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _01 ) } # [ doc = "2 protocol clock cycles between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _10 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "CLR_RXF\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLR_RXF_AW { # [ doc = "0: Do not clear the RX FIFO counter." ] _0 , # [ doc = "1: Clear the RX FIFO counter." ] _1 } impl From < CLR_RXF_AW > for bool { # [ inline ( always ) ] fn from ( variant : CLR_RXF_AW ) -> Self { match variant { CLR_RXF_AW :: _0 => false , CLR_RXF_AW :: _1 => true } } } # [ doc = "Write proxy for field `CLR_RXF`" ] pub struct CLR_RXF_W < 'a > { w : & 'a mut W , } impl < 'a > CLR_RXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLR_RXF_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the RX FIFO counter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLR_RXF_AW :: _0 ) } # [ doc = "Clear the RX FIFO counter." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLR_RXF_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Clear TX FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLR_TXF_AW { # [ doc = "0: Do not clear the TX FIFO counter." ] _0 , # [ doc = "1: Clear the TX FIFO counter." ] _1 } impl From < CLR_TXF_AW > for bool { # [ inline ( always ) ] fn from ( variant : CLR_TXF_AW ) -> Self { match variant { CLR_TXF_AW :: _0 => false , CLR_TXF_AW :: _1 => true } } } # [ doc = "Write proxy for field `CLR_TXF`" ] pub struct CLR_TXF_W < 'a > { w : & 'a mut W , } impl < 'a > CLR_TXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLR_TXF_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the TX FIFO counter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLR_TXF_AW :: _0 ) } # [ doc = "Clear the TX FIFO counter." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLR_TXF_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Disable Receive FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIS_RXF_A { # [ doc = "0: RX FIFO is enabled." ] _0 , # [ doc = "1: RX FIFO is disabled." ] _1 } impl From < DIS_RXF_A > for bool { # [ inline ( always ) ] fn from ( variant : DIS_RXF_A ) -> Self { match variant { DIS_RXF_A :: _0 => false , DIS_RXF_A :: _1 => true } } } # [ doc = "Reader of field `DIS_RXF`" ] pub type DIS_RXF_R = crate :: R < bool , DIS_RXF_A > ; impl DIS_RXF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIS_RXF_A { match self . bits { false => DIS_RXF_A :: _0 , true => DIS_RXF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIS_RXF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIS_RXF_A :: _1 } } # [ doc = "Write proxy for field `DIS_RXF`" ] pub struct DIS_RXF_W < 'a > { w : & 'a mut W , } impl < 'a > DIS_RXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIS_RXF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RX FIFO is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIS_RXF_A :: _0 ) } # [ doc = "RX FIFO is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIS_RXF_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Disable Transmit FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIS_TXF_A { # [ doc = "0: TX FIFO is enabled." ] _0 , # [ doc = "1: TX FIFO is disabled." ] _1 } impl From < DIS_TXF_A > for bool { # [ inline ( always ) ] fn from ( variant : DIS_TXF_A ) -> Self { match variant { DIS_TXF_A :: _0 => false , DIS_TXF_A :: _1 => true } } } # [ doc = "Reader of field `DIS_TXF`" ] pub type DIS_TXF_R = crate :: R < bool , DIS_TXF_A > ; impl DIS_TXF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIS_TXF_A { match self . bits { false => DIS_TXF_A :: _0 , true => DIS_TXF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIS_TXF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIS_TXF_A :: _1 } } # [ doc = "Write proxy for field `DIS_TXF`" ] pub struct DIS_TXF_W < 'a > { w : & 'a mut W , } impl < 'a > DIS_TXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIS_TXF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TX FIFO is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIS_TXF_A :: _0 ) } # [ doc = "TX FIFO is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIS_TXF_A :: _1 ) } # [ 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 = "Module Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MDIS_A { # [ doc = "0: Enables the module clocks." ] _0 , # [ doc = "1: Allows external logic to disable the module clocks." ] _1 } impl From < MDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : MDIS_A ) -> Self { match variant { MDIS_A :: _0 => false , MDIS_A :: _1 => true } } } # [ doc = "Reader of field `MDIS`" ] pub type MDIS_R = crate :: R < bool , MDIS_A > ; impl MDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MDIS_A { match self . bits { false => MDIS_A :: _0 , true => MDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MDIS_A :: _1 } } # [ doc = "Write proxy for field `MDIS`" ] pub struct MDIS_W < 'a > { w : & 'a mut W , } impl < 'a > MDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Enables the module clocks." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _0 ) } # [ doc = "Allows external logic to disable the module clocks." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Doze Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOZE_A { # [ doc = "0: Doze mode has no effect on the module." ] _0 , # [ doc = "1: Doze mode disables the module." ] _1 } impl From < DOZE_A > for bool { # [ inline ( always ) ] fn from ( variant : DOZE_A ) -> Self { match variant { DOZE_A :: _0 => false , DOZE_A :: _1 => true } } } # [ doc = "Reader of field `DOZE`" ] pub type DOZE_R = crate :: R < bool , DOZE_A > ; impl DOZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DOZE_A { match self . bits { false => DOZE_A :: _0 , true => DOZE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DOZE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DOZE_A :: _1 } } # [ doc = "Write proxy for field `DOZE`" ] pub struct DOZE_W < 'a > { w : & 'a mut W , } impl < 'a > DOZE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DOZE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Doze mode has no effect on the module." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DOZE_A :: _0 ) } # [ doc = "Doze mode disables the module." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DOZE_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS0_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS0_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS0_A ) -> Self { match variant { PCSIS0_A :: _0 => false , PCSIS0_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS0`" ] pub type PCSIS0_R = crate :: R < bool , PCSIS0_A > ; impl PCSIS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS0_A { match self . bits { false => PCSIS0_A :: _0 , true => PCSIS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS0_A :: _1 } } # [ doc = "Write proxy for field `PCSIS0`" ] pub struct PCSIS0_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS0_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS1_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS1_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS1_A ) -> Self { match variant { PCSIS1_A :: _0 => false , PCSIS1_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS1`" ] pub type PCSIS1_R = crate :: R < bool , PCSIS1_A > ; impl PCSIS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS1_A { match self . bits { false => PCSIS1_A :: _0 , true => PCSIS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS1_A :: _1 } } # [ doc = "Write proxy for field `PCSIS1`" ] pub struct PCSIS1_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS1_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS2_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS2_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS2_A ) -> Self { match variant { PCSIS2_A :: _0 => false , PCSIS2_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS2`" ] pub type PCSIS2_R = crate :: R < bool , PCSIS2_A > ; impl PCSIS2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS2_A { match self . bits { false => PCSIS2_A :: _0 , true => PCSIS2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS2_A :: _1 } } # [ doc = "Write proxy for field `PCSIS2`" ] pub struct PCSIS2_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS2_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS3_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS3_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS3_A ) -> Self { match variant { PCSIS3_A :: _0 => false , PCSIS3_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS3`" ] pub type PCSIS3_R = crate :: R < bool , PCSIS3_A > ; impl PCSIS3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS3_A { match self . bits { false => PCSIS3_A :: _0 , true => PCSIS3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS3_A :: _1 } } # [ doc = "Write proxy for field `PCSIS3`" ] pub struct PCSIS3_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS3_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS3_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS4_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS4_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS4_A ) -> Self { match variant { PCSIS4_A :: _0 => false , PCSIS4_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS4`" ] pub type PCSIS4_R = crate :: R < bool , PCSIS4_A > ; impl PCSIS4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS4_A { match self . bits { false => PCSIS4_A :: _0 , true => PCSIS4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS4_A :: _1 } } # [ doc = "Write proxy for field `PCSIS4`" ] pub struct PCSIS4_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS4_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS4_A :: _1 ) } # [ 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 = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS5_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS5_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS5_A ) -> Self { match variant { PCSIS5_A :: _0 => false , PCSIS5_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS5`" ] pub type PCSIS5_R = crate :: R < bool , PCSIS5_A > ; impl PCSIS5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS5_A { match self . bits { false => PCSIS5_A :: _0 , true => PCSIS5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS5_A :: _1 } } # [ doc = "Write proxy for field `PCSIS5`" ] pub struct PCSIS5_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS5_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS5_A :: _1 ) } # [ 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 = "Receive FIFO Overflow Overwrite Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ROOE_A { # [ doc = "0: Incoming data is ignored." ] _0 , # [ doc = "1: Incoming data is shifted into the shift register." ] _1 } impl From < ROOE_A > for bool { # [ inline ( always ) ] fn from ( variant : ROOE_A ) -> Self { match variant { ROOE_A :: _0 => false , ROOE_A :: _1 => true } } } # [ doc = "Reader of field `ROOE`" ] pub type ROOE_R = crate :: R < bool , ROOE_A > ; impl ROOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ROOE_A { match self . bits { false => ROOE_A :: _0 , true => ROOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ROOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ROOE_A :: _1 } } # [ doc = "Write proxy for field `ROOE`" ] pub struct ROOE_W < 'a > { w : & 'a mut W , } impl < 'a > ROOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ROOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Incoming data is ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ROOE_A :: _0 ) } # [ doc = "Incoming data is shifted into the shift register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ROOE_A :: _1 ) } # [ 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 = "Peripheral Chip Select Strobe Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSSE_A { # [ doc = "0: PCS5/ PCSS is used as the Peripheral Chip Select\\[5\\] signal." ] _0 , # [ doc = "1: PCS5/ PCSS is used as an active-low PCS Strobe signal." ] _1 } impl From < PCSSE_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSSE_A ) -> Self { match variant { PCSSE_A :: _0 => false , PCSSE_A :: _1 => true } } } # [ doc = "Reader of field `PCSSE`" ] pub type PCSSE_R = crate :: R < bool , PCSSE_A > ; impl PCSSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSSE_A { match self . bits { false => PCSSE_A :: _0 , true => PCSSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSSE_A :: _1 } } # [ doc = "Write proxy for field `PCSSE`" ] pub struct PCSSE_W < 'a > { w : & 'a mut W , } impl < 'a > PCSSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PCS5/ PCSS is used as the Peripheral Chip Select\\[5\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSSE_A :: _0 ) } # [ doc = "PCS5/ PCSS is used as an active-low PCS Strobe signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSSE_A :: _1 ) } # [ 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 = "Modified Transfer Format Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTFE_A { # [ doc = "0: Modified SPI transfer format disabled." ] _0 , # [ doc = "1: Modified SPI transfer format enabled." ] _1 } impl From < MTFE_A > for bool { # [ inline ( always ) ] fn from ( variant : MTFE_A ) -> Self { match variant { MTFE_A :: _0 => false , MTFE_A :: _1 => true } } } # [ doc = "Reader of field `MTFE`" ] pub type MTFE_R = crate :: R < bool , MTFE_A > ; impl MTFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTFE_A { match self . bits { false => MTFE_A :: _0 , true => MTFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTFE_A :: _1 } } # [ doc = "Write proxy for field `MTFE`" ] pub struct MTFE_W < 'a > { w : & 'a mut W , } impl < 'a > MTFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Modified SPI transfer format disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTFE_A :: _0 ) } # [ doc = "Modified SPI transfer format enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTFE_A :: _1 ) } # [ 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 = "Freeze\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRZ_A { # [ doc = "0: Do not halt serial transfers in Debug mode." ] _0 , # [ doc = "1: Halt serial transfers in Debug mode." ] _1 } impl From < FRZ_A > for bool { # [ inline ( always ) ] fn from ( variant : FRZ_A ) -> Self { match variant { FRZ_A :: _0 => false , FRZ_A :: _1 => true } } } # [ doc = "Reader of field `FRZ`" ] pub type FRZ_R = crate :: R < bool , FRZ_A > ; impl FRZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRZ_A { match self . bits { false => FRZ_A :: _0 , true => FRZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRZ_A :: _1 } } # [ doc = "Write proxy for field `FRZ`" ] pub struct FRZ_W < 'a > { w : & 'a mut W , } impl < 'a > FRZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not halt serial transfers in Debug mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _0 ) } # [ doc = "Halt serial transfers in Debug mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "SPI Configuration.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DCONF_A { # [ doc = "0: SPI" ] _00 } impl From < DCONF_A > for u8 { # [ inline ( always ) ] fn from ( variant : DCONF_A ) -> Self { match variant { DCONF_A :: _00 => 0 } } } # [ doc = "Reader of field `DCONF`" ] pub type DCONF_R = crate :: R < u8 , DCONF_A > ; impl DCONF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DCONF_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DCONF_A :: _00 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DCONF_A :: _00 } } # [ doc = "Continuous SCK Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CONT_SCKE_A { # [ doc = "0: Continuous SCK disabled." ] _0 , # [ doc = "1: Continuous SCK enabled." ] _1 } impl From < CONT_SCKE_A > for bool { # [ inline ( always ) ] fn from ( variant : CONT_SCKE_A ) -> Self { match variant { CONT_SCKE_A :: _0 => false , CONT_SCKE_A :: _1 => true } } } # [ doc = "Reader of field `CONT_SCKE`" ] pub type CONT_SCKE_R = crate :: R < bool , CONT_SCKE_A > ; impl CONT_SCKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CONT_SCKE_A { match self . bits { false => CONT_SCKE_A :: _0 , true => CONT_SCKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CONT_SCKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CONT_SCKE_A :: _1 } } # [ doc = "Write proxy for field `CONT_SCKE`" ] pub struct CONT_SCKE_W < 'a > { w : & 'a mut W , } impl < 'a > CONT_SCKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CONT_SCKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Continuous SCK disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CONT_SCKE_A :: _0 ) } # [ doc = "Continuous SCK enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CONT_SCKE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Master/Slave Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSTR_A { # [ doc = "0: Enables Slave mode" ] _0 , # [ doc = "1: Enables Master mode" ] _1 } impl From < MSTR_A > for bool { # [ inline ( always ) ] fn from ( variant : MSTR_A ) -> Self { match variant { MSTR_A :: _0 => false , MSTR_A :: _1 => true } } } # [ doc = "Reader of field `MSTR`" ] pub type MSTR_R = crate :: R < bool , MSTR_A > ; impl MSTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSTR_A { match self . bits { false => MSTR_A :: _0 , true => MSTR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSTR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSTR_A :: _1 } } # [ doc = "Write proxy for field `MSTR`" ] pub struct MSTR_W < 'a > { w : & 'a mut W , } impl < 'a > MSTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSTR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Enables Slave mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSTR_A :: _0 ) } # [ doc = "Enables Master mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSTR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Halt" ] # [ inline ( always ) ] pub fn halt ( & self ) -> HALT_R { HALT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 8:9 - Sample Point" ] # [ inline ( always ) ] pub fn smpl_pt ( & self ) -> SMPL_PT_R { SMPL_PT_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 12 - Disable Receive FIFO" ] # [ inline ( always ) ] pub fn dis_rxf ( & self ) -> DIS_RXF_R { DIS_RXF_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Disable Transmit FIFO" ] # [ inline ( always ) ] pub fn dis_txf ( & self ) -> DIS_TXF_R { DIS_TXF_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & self ) -> MDIS_R { MDIS_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Doze Enable" ] # [ inline ( always ) ] pub fn doze ( & self ) -> DOZE_R { DOZE_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis0 ( & self ) -> PCSIS0_R { PCSIS0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis1 ( & self ) -> PCSIS1_R { PCSIS1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis2 ( & self ) -> PCSIS2_R { PCSIS2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis3 ( & self ) -> PCSIS3_R { PCSIS3_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis4 ( & self ) -> PCSIS4_R { PCSIS4_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis5 ( & self ) -> PCSIS5_R { PCSIS5_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Receive FIFO Overflow Overwrite Enable" ] # [ inline ( always ) ] pub fn rooe ( & self ) -> ROOE_R { ROOE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Peripheral Chip Select Strobe Enable" ] # [ inline ( always ) ] pub fn pcsse ( & self ) -> PCSSE_R { PCSSE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Modified Transfer Format Enable" ] # [ inline ( always ) ] pub fn mtfe ( & self ) -> MTFE_R { MTFE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Freeze" ] # [ inline ( always ) ] pub fn frz ( & self ) -> FRZ_R { FRZ_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:29 - SPI Configuration." ] # [ inline ( always ) ] pub fn dconf ( & self ) -> DCONF_R { DCONF_R :: new ( ( ( self . bits >> 28 ) & 0x03 ) as u8 ) } # [ doc = "Bit 30 - Continuous SCK Enable" ] # [ inline ( always ) ] pub fn cont_scke ( & self ) -> CONT_SCKE_R { CONT_SCKE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Master/Slave Mode Select" ] # [ inline ( always ) ] pub fn mstr ( & self ) -> MSTR_R { MSTR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Halt" ] # [ inline ( always ) ] pub fn halt ( & mut self ) -> HALT_W { HALT_W { w : self } } # [ doc = "Bits 8:9 - Sample Point" ] # [ inline ( always ) ] pub fn smpl_pt ( & mut self ) -> SMPL_PT_W { SMPL_PT_W { w : self } } # [ doc = "Bit 10 - CLR_RXF" ] # [ inline ( always ) ] pub fn clr_rxf ( & mut self ) -> CLR_RXF_W { CLR_RXF_W { w : self } } # [ doc = "Bit 11 - Clear TX FIFO" ] # [ inline ( always ) ] pub fn clr_txf ( & mut self ) -> CLR_TXF_W { CLR_TXF_W { w : self } } # [ doc = "Bit 12 - Disable Receive FIFO" ] # [ inline ( always ) ] pub fn dis_rxf ( & mut self ) -> DIS_RXF_W { DIS_RXF_W { w : self } } # [ doc = "Bit 13 - Disable Transmit FIFO" ] # [ inline ( always ) ] pub fn dis_txf ( & mut self ) -> DIS_TXF_W { DIS_TXF_W { w : self } } # [ doc = "Bit 14 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & mut self ) -> MDIS_W { MDIS_W { w : self } } # [ doc = "Bit 15 - Doze Enable" ] # [ inline ( always ) ] pub fn doze ( & mut self ) -> DOZE_W { DOZE_W { w : self } } # [ doc = "Bit 16 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis0 ( & mut self ) -> PCSIS0_W { PCSIS0_W { w : self } } # [ doc = "Bit 17 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis1 ( & mut self ) -> PCSIS1_W { PCSIS1_W { w : self } } # [ doc = "Bit 18 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis2 ( & mut self ) -> PCSIS2_W { PCSIS2_W { w : self } } # [ doc = "Bit 19 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis3 ( & mut self ) -> PCSIS3_W { PCSIS3_W { w : self } } # [ doc = "Bit 20 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis4 ( & mut self ) -> PCSIS4_W { PCSIS4_W { w : self } } # [ doc = "Bit 21 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis5 ( & mut self ) -> PCSIS5_W { PCSIS5_W { w : self } } # [ doc = "Bit 24 - Receive FIFO Overflow Overwrite Enable" ] # [ inline ( always ) ] pub fn rooe ( & mut self ) -> ROOE_W { ROOE_W { w : self } } # [ doc = "Bit 25 - Peripheral Chip Select Strobe Enable" ] # [ inline ( always ) ] pub fn pcsse ( & mut self ) -> PCSSE_W { PCSSE_W { w : self } } # [ doc = "Bit 26 - Modified Transfer Format Enable" ] # [ inline ( always ) ] pub fn mtfe ( & mut self ) -> MTFE_W { MTFE_W { w : self } } # [ doc = "Bit 27 - Freeze" ] # [ inline ( always ) ] pub fn frz ( & mut self ) -> FRZ_W { FRZ_W { w : self } } # [ doc = "Bit 30 - Continuous SCK Enable" ] # [ inline ( always ) ] pub fn cont_scke ( & mut self ) -> CONT_SCKE_W { CONT_SCKE_W { w : self } } # [ doc = "Bit 31 - Master/Slave Mode Select" ] # [ inline ( always ) ] pub fn mstr ( & mut self ) -> MSTR_W { MSTR_W { w : self } } } } # [ doc = "Transfer Count Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr](tcr) module" ] pub type TCR = crate :: Reg < u32 , _TCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR ; # [ doc = "`read()` method returns [tcr::R](tcr::R) reader structure" ] impl crate :: Readable for TCR { } # [ doc = "`write(|w| ..)` method takes [tcr::W](tcr::W) writer structure" ] impl crate :: Writable for TCR { } # [ doc = "Transfer Count Register" ] pub mod tcr { # [ doc = "Reader of register TCR" ] pub type R = crate :: R < u32 , super :: TCR > ; # [ doc = "Writer for register TCR" ] pub type W = crate :: W < u32 , super :: TCR > ; # [ doc = "Register TCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SPI_TCNT`" ] pub type SPI_TCNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `SPI_TCNT`" ] pub struct SPI_TCNT_W < 'a > { w : & 'a mut W , } impl < 'a > SPI_TCNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 16:31 - SPI Transfer Counter" ] # [ inline ( always ) ] pub fn spi_tcnt ( & self ) -> SPI_TCNT_R { SPI_TCNT_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 16:31 - SPI Transfer Counter" ] # [ inline ( always ) ] pub fn spi_tcnt ( & mut self ) -> SPI_TCNT_W { SPI_TCNT_W { w : self } } } } # [ doc = "Clock and Transfer Attributes Register (In Master Mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctar](ctar) module" ] pub type CTAR = crate :: Reg < u32 , _CTAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTAR ; # [ doc = "`read()` method returns [ctar::R](ctar::R) reader structure" ] impl crate :: Readable for CTAR { } # [ doc = "`write(|w| ..)` method takes [ctar::W](ctar::W) writer structure" ] impl crate :: Writable for CTAR { } # [ doc = "Clock and Transfer Attributes Register (In Master Mode)" ] pub mod ctar { # [ doc = "Reader of register CTAR%s" ] pub type R = crate :: R < u32 , super :: CTAR > ; # [ doc = "Writer for register CTAR%s" ] pub type W = crate :: W < u32 , super :: CTAR > ; # [ doc = "Register CTAR%s `reset()`'s with value 0x7800_0000" ] impl crate :: ResetValue for super :: CTAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7800_0000 } } # [ doc = "Reader of field `BR`" ] pub type BR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BR`" ] pub struct BR_W < 'a > { w : & 'a mut W , } impl < 'a > BR_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `DT`" ] pub type DT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DT`" ] pub struct DT_W < 'a > { w : & 'a mut W , } impl < 'a > DT_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } # [ doc = "Reader of field `ASC`" ] pub type ASC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ASC`" ] pub struct ASC_W < 'a > { w : & 'a mut W , } impl < 'a > ASC_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `CSSCK`" ] pub type CSSCK_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CSSCK`" ] pub struct CSSCK_W < 'a > { w : & 'a mut W , } impl < 'a > CSSCK_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 & ! ( 0x0f << 12 ) ) | ( ( ( value as u32 ) & 0x0f ) << 12 ) ; self . w } } # [ doc = "Baud Rate Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PBR_A { # [ doc = "0: Baud Rate Prescaler value is 2." ] _00 , # [ doc = "1: Baud Rate Prescaler value is 3." ] _01 , # [ doc = "2: Baud Rate Prescaler value is 5." ] _10 , # [ doc = "3: Baud Rate Prescaler value is 7." ] _11 } impl From < PBR_A > for u8 { # [ inline ( always ) ] fn from ( variant : PBR_A ) -> Self { match variant { PBR_A :: _00 => 0 , PBR_A :: _01 => 1 , PBR_A :: _10 => 2 , PBR_A :: _11 => 3 } } } # [ doc = "Reader of field `PBR`" ] pub type PBR_R = crate :: R < u8 , PBR_A > ; impl PBR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PBR_A { match self . bits { 0 => PBR_A :: _00 , 1 => PBR_A :: _01 , 2 => PBR_A :: _10 , 3 => PBR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PBR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PBR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PBR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PBR_A :: _11 } } # [ doc = "Write proxy for field `PBR`" ] pub struct PBR_W < 'a > { w : & 'a mut W , } impl < 'a > PBR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PBR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Baud Rate Prescaler value is 2." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _00 ) } # [ doc = "Baud Rate Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _01 ) } # [ doc = "Baud Rate Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _10 ) } # [ doc = "Baud Rate Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "Delay after Transfer Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDT_A { # [ doc = "0: Delay after Transfer Prescaler value is 1." ] _00 , # [ doc = "1: Delay after Transfer Prescaler value is 3." ] _01 , # [ doc = "2: Delay after Transfer Prescaler value is 5." ] _10 , # [ doc = "3: Delay after Transfer Prescaler value is 7." ] _11 } impl From < PDT_A > for u8 { # [ inline ( always ) ] fn from ( variant : PDT_A ) -> Self { match variant { PDT_A :: _00 => 0 , PDT_A :: _01 => 1 , PDT_A :: _10 => 2 , PDT_A :: _11 => 3 } } } # [ doc = "Reader of field `PDT`" ] pub type PDT_R = crate :: R < u8 , PDT_A > ; impl PDT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDT_A { match self . bits { 0 => PDT_A :: _00 , 1 => PDT_A :: _01 , 2 => PDT_A :: _10 , 3 => PDT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PDT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PDT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PDT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PDT_A :: _11 } } # [ doc = "Write proxy for field `PDT`" ] pub struct PDT_W < 'a > { w : & 'a mut W , } impl < 'a > PDT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay after Transfer Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _00 ) } # [ doc = "Delay after Transfer Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _01 ) } # [ doc = "Delay after Transfer Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _10 ) } # [ doc = "Delay after Transfer Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "After SCK Delay Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PASC_A { # [ doc = "0: Delay after Transfer Prescaler value is 1." ] _00 , # [ doc = "1: Delay after Transfer Prescaler value is 3." ] _01 , # [ doc = "2: Delay after Transfer Prescaler value is 5." ] _10 , # [ doc = "3: Delay after Transfer Prescaler value is 7." ] _11 } impl From < PASC_A > for u8 { # [ inline ( always ) ] fn from ( variant : PASC_A ) -> Self { match variant { PASC_A :: _00 => 0 , PASC_A :: _01 => 1 , PASC_A :: _10 => 2 , PASC_A :: _11 => 3 } } } # [ doc = "Reader of field `PASC`" ] pub type PASC_R = crate :: R < u8 , PASC_A > ; impl PASC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PASC_A { match self . bits { 0 => PASC_A :: _00 , 1 => PASC_A :: _01 , 2 => PASC_A :: _10 , 3 => PASC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PASC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PASC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PASC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PASC_A :: _11 } } # [ doc = "Write proxy for field `PASC`" ] pub struct PASC_W < 'a > { w : & 'a mut W , } impl < 'a > PASC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PASC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay after Transfer Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _00 ) } # [ doc = "Delay after Transfer Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _01 ) } # [ doc = "Delay after Transfer Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _10 ) } # [ doc = "Delay after Transfer Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "PCS to SCK Delay Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSSCK_A { # [ doc = "0: PCS to SCK Prescaler value is 1." ] _00 , # [ doc = "1: PCS to SCK Prescaler value is 3." ] _01 , # [ doc = "2: PCS to SCK Prescaler value is 5." ] _10 , # [ doc = "3: PCS to SCK Prescaler value is 7." ] _11 } impl From < PCSSCK_A > for u8 { # [ inline ( always ) ] fn from ( variant : PCSSCK_A ) -> Self { match variant { PCSSCK_A :: _00 => 0 , PCSSCK_A :: _01 => 1 , PCSSCK_A :: _10 => 2 , PCSSCK_A :: _11 => 3 } } } # [ doc = "Reader of field `PCSSCK`" ] pub type PCSSCK_R = crate :: R < u8 , PCSSCK_A > ; impl PCSSCK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSSCK_A { match self . bits { 0 => PCSSCK_A :: _00 , 1 => PCSSCK_A :: _01 , 2 => PCSSCK_A :: _10 , 3 => PCSSCK_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PCSSCK_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PCSSCK_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PCSSCK_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PCSSCK_A :: _11 } } # [ doc = "Write proxy for field `PCSSCK`" ] pub struct PCSSCK_W < 'a > { w : & 'a mut W , } impl < 'a > PCSSCK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSSCK_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "PCS to SCK Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _00 ) } # [ doc = "PCS to SCK Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _01 ) } # [ doc = "PCS to SCK Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _10 ) } # [ doc = "PCS to SCK Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } # [ doc = "LSB First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LSBFE_A { # [ doc = "0: Data is transferred MSB first." ] _0 , # [ doc = "1: Data is transferred LSB first." ] _1 } impl From < LSBFE_A > for bool { # [ inline ( always ) ] fn from ( variant : LSBFE_A ) -> Self { match variant { LSBFE_A :: _0 => false , LSBFE_A :: _1 => true } } } # [ doc = "Reader of field `LSBFE`" ] pub type LSBFE_R = crate :: R < bool , LSBFE_A > ; impl LSBFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LSBFE_A { match self . bits { false => LSBFE_A :: _0 , true => LSBFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LSBFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LSBFE_A :: _1 } } # [ doc = "Write proxy for field `LSBFE`" ] pub struct LSBFE_W < 'a > { w : & 'a mut W , } impl < 'a > LSBFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LSBFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is transferred MSB first." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LSBFE_A :: _0 ) } # [ doc = "Data is transferred LSB first." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LSBFE_A :: _1 ) } # [ 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 = "Clock Phase\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHA_A { # [ doc = "0: Data is captured on the leading edge of SCK and changed on the following edge." ] _0 , # [ doc = "1: Data is changed on the leading edge of SCK and captured on the following edge." ] _1 } impl From < CPHA_A > for bool { # [ inline ( always ) ] fn from ( variant : CPHA_A ) -> Self { match variant { CPHA_A :: _0 => false , CPHA_A :: _1 => true } } } # [ doc = "Reader of field `CPHA`" ] pub type CPHA_R = crate :: R < bool , CPHA_A > ; impl CPHA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPHA_A { match self . bits { false => CPHA_A :: _0 , true => CPHA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPHA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPHA_A :: _1 } } # [ doc = "Write proxy for field `CPHA`" ] pub struct CPHA_W < 'a > { w : & 'a mut W , } impl < 'a > CPHA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPHA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is captured on the leading edge of SCK and changed on the following edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _0 ) } # [ doc = "Data is changed on the leading edge of SCK and captured on the following edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _1 ) } # [ 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 = "Clock Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOL_A { # [ doc = "0: The inactive state value of SCK is low." ] _0 , # [ doc = "1: The inactive state value of SCK is high." ] _1 } impl From < CPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOL_A ) -> Self { match variant { CPOL_A :: _0 => false , CPOL_A :: _1 => true } } } # [ doc = "Reader of field `CPOL`" ] pub type CPOL_R = crate :: R < bool , CPOL_A > ; impl CPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOL_A { match self . bits { false => CPOL_A :: _0 , true => CPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOL_A :: _1 } } # [ doc = "Write proxy for field `CPOL`" ] pub struct CPOL_W < 'a > { w : & 'a mut W , } impl < 'a > CPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state value of SCK is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _0 ) } # [ doc = "The inactive state value of SCK is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _1 ) } # [ 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 = "Reader of field `FMSZ`" ] pub type FMSZ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FMSZ`" ] pub struct FMSZ_W < 'a > { w : & 'a mut W , } impl < 'a > FMSZ_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 & ! ( 0x0f << 27 ) ) | ( ( ( value as u32 ) & 0x0f ) << 27 ) ; self . w } } # [ doc = "Double Baud Rate\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBR_A { # [ doc = "0: The baud rate is computed normally with a 50/50 duty cycle." ] _0 , # [ doc = "1: The baud rate is doubled with the duty cycle depending on the Baud Rate Prescaler." ] _1 } impl From < DBR_A > for bool { # [ inline ( always ) ] fn from ( variant : DBR_A ) -> Self { match variant { DBR_A :: _0 => false , DBR_A :: _1 => true } } } # [ doc = "Reader of field `DBR`" ] pub type DBR_R = crate :: R < bool , DBR_A > ; impl DBR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBR_A { match self . bits { false => DBR_A :: _0 , true => DBR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBR_A :: _1 } } # [ doc = "Write proxy for field `DBR`" ] pub struct DBR_W < 'a > { w : & 'a mut W , } impl < 'a > DBR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The baud rate is computed normally with a 50/50 duty cycle." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DBR_A :: _0 ) } # [ doc = "The baud rate is doubled with the duty cycle depending on the Baud Rate Prescaler." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DBR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Baud Rate Scaler" ] # [ inline ( always ) ] pub fn br ( & self ) -> BR_R { BR_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Delay After Transfer Scaler" ] # [ inline ( always ) ] pub fn dt ( & self ) -> DT_R { DT_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - After SCK Delay Scaler" ] # [ inline ( always ) ] pub fn asc ( & self ) -> ASC_R { ASC_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - PCS to SCK Delay Scaler" ] # [ inline ( always ) ] pub fn cssck ( & self ) -> CSSCK_R { CSSCK_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:17 - Baud Rate Prescaler" ] # [ inline ( always ) ] pub fn pbr ( & self ) -> PBR_R { PBR_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - Delay after Transfer Prescaler" ] # [ inline ( always ) ] pub fn pdt ( & self ) -> PDT_R { PDT_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:21 - After SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pasc ( & self ) -> PASC_R { PASC_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bits 22:23 - PCS to SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pcssck ( & self ) -> PCSSCK_R { PCSSCK_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } # [ doc = "Bit 24 - LSB First" ] # [ inline ( always ) ] pub fn lsbfe ( & self ) -> LSBFE_R { LSBFE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & self ) -> CPHA_R { CPHA_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & self ) -> CPOL_R { CPOL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & self ) -> FMSZ_R { FMSZ_R :: new ( ( ( self . bits >> 27 ) & 0x0f ) as u8 ) } # [ doc = "Bit 31 - Double Baud Rate" ] # [ inline ( always ) ] pub fn dbr ( & self ) -> DBR_R { DBR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - Baud Rate Scaler" ] # [ inline ( always ) ] pub fn br ( & mut self ) -> BR_W { BR_W { w : self } } # [ doc = "Bits 4:7 - Delay After Transfer Scaler" ] # [ inline ( always ) ] pub fn dt ( & mut self ) -> DT_W { DT_W { w : self } } # [ doc = "Bits 8:11 - After SCK Delay Scaler" ] # [ inline ( always ) ] pub fn asc ( & mut self ) -> ASC_W { ASC_W { w : self } } # [ doc = "Bits 12:15 - PCS to SCK Delay Scaler" ] # [ inline ( always ) ] pub fn cssck ( & mut self ) -> CSSCK_W { CSSCK_W { w : self } } # [ doc = "Bits 16:17 - Baud Rate Prescaler" ] # [ inline ( always ) ] pub fn pbr ( & mut self ) -> PBR_W { PBR_W { w : self } } # [ doc = "Bits 18:19 - Delay after Transfer Prescaler" ] # [ inline ( always ) ] pub fn pdt ( & mut self ) -> PDT_W { PDT_W { w : self } } # [ doc = "Bits 20:21 - After SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pasc ( & mut self ) -> PASC_W { PASC_W { w : self } } # [ doc = "Bits 22:23 - PCS to SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pcssck ( & mut self ) -> PCSSCK_W { PCSSCK_W { w : self } } # [ doc = "Bit 24 - LSB First" ] # [ inline ( always ) ] pub fn lsbfe ( & mut self ) -> LSBFE_W { LSBFE_W { w : self } } # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & mut self ) -> CPHA_W { CPHA_W { w : self } } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & mut self ) -> CPOL_W { CPOL_W { w : self } } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & mut self ) -> FMSZ_W { FMSZ_W { w : self } } # [ doc = "Bit 31 - Double Baud Rate" ] # [ inline ( always ) ] pub fn dbr ( & mut self ) -> DBR_W { DBR_W { w : self } } } } # [ doc = "Clock and Transfer Attributes Register (In Slave Mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctar_slave](ctar_slave) module" ] pub type CTAR_SLAVE = crate :: Reg < u32 , _CTAR_SLAVE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTAR_SLAVE ; # [ doc = "`read()` method returns [ctar_slave::R](ctar_slave::R) reader structure" ] impl crate :: Readable for CTAR_SLAVE { } # [ doc = "`write(|w| ..)` method takes [ctar_slave::W](ctar_slave::W) writer structure" ] impl crate :: Writable for CTAR_SLAVE { } # [ doc = "Clock and Transfer Attributes Register (In Slave Mode)" ] pub mod ctar_slave { # [ doc = "Reader of register CTAR_SLAVE" ] pub type R = crate :: R < u32 , super :: CTAR_SLAVE > ; # [ doc = "Writer for register CTAR_SLAVE" ] pub type W = crate :: W < u32 , super :: CTAR_SLAVE > ; # [ doc = "Register CTAR_SLAVE `reset()`'s with value 0x7800_0000" ] impl crate :: ResetValue for super :: CTAR_SLAVE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7800_0000 } } # [ doc = "Clock Phase\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHA_A { # [ doc = "0: Data is captured on the leading edge of SCK and changed on the following edge." ] _0 , # [ doc = "1: Data is changed on the leading edge of SCK and captured on the following edge." ] _1 } impl From < CPHA_A > for bool { # [ inline ( always ) ] fn from ( variant : CPHA_A ) -> Self { match variant { CPHA_A :: _0 => false , CPHA_A :: _1 => true } } } # [ doc = "Reader of field `CPHA`" ] pub type CPHA_R = crate :: R < bool , CPHA_A > ; impl CPHA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPHA_A { match self . bits { false => CPHA_A :: _0 , true => CPHA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPHA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPHA_A :: _1 } } # [ doc = "Write proxy for field `CPHA`" ] pub struct CPHA_W < 'a > { w : & 'a mut W , } impl < 'a > CPHA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPHA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is captured on the leading edge of SCK and changed on the following edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _0 ) } # [ doc = "Data is changed on the leading edge of SCK and captured on the following edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _1 ) } # [ 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 = "Clock Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOL_A { # [ doc = "0: The inactive state value of SCK is low." ] _0 , # [ doc = "1: The inactive state value of SCK is high." ] _1 } impl From < CPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOL_A ) -> Self { match variant { CPOL_A :: _0 => false , CPOL_A :: _1 => true } } } # [ doc = "Reader of field `CPOL`" ] pub type CPOL_R = crate :: R < bool , CPOL_A > ; impl CPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOL_A { match self . bits { false => CPOL_A :: _0 , true => CPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOL_A :: _1 } } # [ doc = "Write proxy for field `CPOL`" ] pub struct CPOL_W < 'a > { w : & 'a mut W , } impl < 'a > CPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state value of SCK is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _0 ) } # [ doc = "The inactive state value of SCK is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _1 ) } # [ 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 = "Reader of field `FMSZ`" ] pub type FMSZ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FMSZ`" ] pub struct FMSZ_W < 'a > { w : & 'a mut W , } impl < 'a > FMSZ_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 & ! ( 0x0f << 27 ) ) | ( ( ( value as u32 ) & 0x0f ) << 27 ) ; self . w } } impl R { # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & self ) -> CPHA_R { CPHA_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & self ) -> CPOL_R { CPOL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & self ) -> FMSZ_R { FMSZ_R :: new ( ( ( self . bits >> 27 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & mut self ) -> CPHA_W { CPHA_W { w : self } } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & mut self ) -> CPOL_W { CPOL_W { w : self } } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & mut self ) -> FMSZ_W { FMSZ_W { w : self } } } } # [ doc = "Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sr](sr) module" ] pub type SR = crate :: Reg < u32 , _SR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SR ; # [ doc = "`read()` method returns [sr::R](sr::R) reader structure" ] impl crate :: Readable for SR { } # [ doc = "`write(|w| ..)` method takes [sr::W](sr::W) writer structure" ] impl crate :: Writable for SR { } # [ doc = "Status Register" ] pub mod sr { # [ doc = "Reader of register SR" ] pub type R = crate :: R < u32 , super :: SR > ; # [ doc = "Writer for register SR" ] pub type W = crate :: W < u32 , super :: SR > ; # [ doc = "Register SR `reset()`'s with value 0x0200_0000" ] impl crate :: ResetValue for super :: SR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0200_0000 } } # [ doc = "Reader of field `POPNXTPTR`" ] pub type POPNXTPTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `RXCTR`" ] pub type RXCTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TXNXTPTR`" ] pub type TXNXTPTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TXCTR`" ] pub type TXCTR_R = crate :: R < u8 , u8 > ; # [ doc = "Receive FIFO Drain Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_A { # [ doc = "0: RX FIFO is empty." ] _0 , # [ doc = "1: RX FIFO is not empty." ] _1 } impl From < RFDF_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_A ) -> Self { match variant { RFDF_A :: _0 => false , RFDF_A :: _1 => true } } } # [ doc = "Reader of field `RFDF`" ] pub type RFDF_R = crate :: R < bool , RFDF_A > ; impl RFDF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_A { match self . bits { false => RFDF_A :: _0 , true => RFDF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_A :: _1 } } # [ doc = "Write proxy for field `RFDF`" ] pub struct RFDF_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RX FIFO is empty." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_A :: _0 ) } # [ doc = "RX FIFO is not empty." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Receive FIFO Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFOF_A { # [ doc = "0: No Rx FIFO overflow." ] _0 , # [ doc = "1: Rx FIFO overflow has occurred." ] _1 } impl From < RFOF_A > for bool { # [ inline ( always ) ] fn from ( variant : RFOF_A ) -> Self { match variant { RFOF_A :: _0 => false , RFOF_A :: _1 => true } } } # [ doc = "Reader of field `RFOF`" ] pub type RFOF_R = crate :: R < bool , RFOF_A > ; impl RFOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFOF_A { match self . bits { false => RFOF_A :: _0 , true => RFOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFOF_A :: _1 } } # [ doc = "Write proxy for field `RFOF`" ] pub struct RFOF_W < 'a > { w : & 'a mut W , } impl < 'a > RFOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No Rx FIFO overflow." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFOF_A :: _0 ) } # [ doc = "Rx FIFO overflow has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFOF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Transmit FIFO Fill Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_A { # [ doc = "0: TX FIFO is full." ] _0 , # [ doc = "1: TX FIFO is not full." ] _1 } impl From < TFFF_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_A ) -> Self { match variant { TFFF_A :: _0 => false , TFFF_A :: _1 => true } } } # [ doc = "Reader of field `TFFF`" ] pub type TFFF_R = crate :: R < bool , TFFF_A > ; impl TFFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_A { match self . bits { false => TFFF_A :: _0 , true => TFFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_A :: _1 } } # [ doc = "Write proxy for field `TFFF`" ] pub struct TFFF_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TX FIFO is full." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_A :: _0 ) } # [ doc = "TX FIFO is not full." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_A :: _1 ) } # [ 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 = "Transmit FIFO Underflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFUF_A { # [ doc = "0: No TX FIFO underflow." ] _0 , # [ doc = "1: TX FIFO underflow has occurred." ] _1 } impl From < TFUF_A > for bool { # [ inline ( always ) ] fn from ( variant : TFUF_A ) -> Self { match variant { TFUF_A :: _0 => false , TFUF_A :: _1 => true } } } # [ doc = "Reader of field `TFUF`" ] pub type TFUF_R = crate :: R < bool , TFUF_A > ; impl TFUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFUF_A { match self . bits { false => TFUF_A :: _0 , true => TFUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFUF_A :: _1 } } # [ doc = "Write proxy for field `TFUF`" ] pub struct TFUF_W < 'a > { w : & 'a mut W , } impl < 'a > TFUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No TX FIFO underflow." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFUF_A :: _0 ) } # [ doc = "TX FIFO underflow has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFUF_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "End of Queue Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQF_A { # [ doc = "0: EOQ is not set in the executing command." ] _0 , # [ doc = "1: EOQ is set in the executing SPI command." ] _1 } impl From < EOQF_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQF_A ) -> Self { match variant { EOQF_A :: _0 => false , EOQF_A :: _1 => true } } } # [ doc = "Reader of field `EOQF`" ] pub type EOQF_R = crate :: R < bool , EOQF_A > ; impl EOQF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQF_A { match self . bits { false => EOQF_A :: _0 , true => EOQF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQF_A :: _1 } } # [ doc = "Write proxy for field `EOQF`" ] pub struct EOQF_W < 'a > { w : & 'a mut W , } impl < 'a > EOQF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "EOQ is not set in the executing command." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQF_A :: _0 ) } # [ doc = "EOQ is set in the executing SPI command." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQF_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "TX and RX Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRXS_A { # [ doc = "0: Transmit and receive operations are disabled (The module is in Stopped state)." ] _0 , # [ doc = "1: Transmit and receive operations are enabled (The module is in Running state)." ] _1 } impl From < TXRXS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRXS_A ) -> Self { match variant { TXRXS_A :: _0 => false , TXRXS_A :: _1 => true } } } # [ doc = "Reader of field `TXRXS`" ] pub type TXRXS_R = crate :: R < bool , TXRXS_A > ; impl TXRXS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRXS_A { match self . bits { false => TXRXS_A :: _0 , true => TXRXS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRXS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRXS_A :: _1 } } # [ doc = "Write proxy for field `TXRXS`" ] pub struct TXRXS_W < 'a > { w : & 'a mut W , } impl < 'a > TXRXS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRXS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit and receive operations are disabled (The module is in Stopped state)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRXS_A :: _0 ) } # [ doc = "Transmit and receive operations are enabled (The module is in Running state)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRXS_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Transfer Complete Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_A { # [ doc = "0: Transfer not complete." ] _0 , # [ doc = "1: Transfer complete." ] _1 } impl From < TCF_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_A ) -> Self { match variant { TCF_A :: _0 => false , TCF_A :: _1 => true } } } # [ doc = "Reader of field `TCF`" ] pub type TCF_R = crate :: R < bool , TCF_A > ; impl TCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_A { match self . bits { false => TCF_A :: _0 , true => TCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_A :: _1 } } # [ doc = "Write proxy for field `TCF`" ] pub struct TCF_W < 'a > { w : & 'a mut W , } impl < 'a > TCF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transfer not complete." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCF_A :: _0 ) } # [ doc = "Transfer complete." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCF_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Pop Next Pointer" ] # [ inline ( always ) ] pub fn popnxtptr ( & self ) -> POPNXTPTR_R { POPNXTPTR_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - RX FIFO Counter" ] # [ inline ( always ) ] pub fn rxctr ( & self ) -> RXCTR_R { RXCTR_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Transmit Next Pointer" ] # [ inline ( always ) ] pub fn txnxtptr ( & self ) -> TXNXTPTR_R { TXNXTPTR_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - TX FIFO Counter" ] # [ inline ( always ) ] pub fn txctr ( & self ) -> TXCTR_R { TXCTR_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bit 17 - Receive FIFO Drain Flag" ] # [ inline ( always ) ] pub fn rfdf ( & self ) -> RFDF_R { RFDF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Receive FIFO Overflow Flag" ] # [ inline ( always ) ] pub fn rfof ( & self ) -> RFOF_R { RFOF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Transmit FIFO Fill Flag" ] # [ inline ( always ) ] pub fn tfff ( & self ) -> TFFF_R { TFFF_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Transmit FIFO Underflow Flag" ] # [ inline ( always ) ] pub fn tfuf ( & self ) -> TFUF_R { TFUF_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - End of Queue Flag" ] # [ inline ( always ) ] pub fn eoqf ( & self ) -> EOQF_R { EOQF_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - TX and RX Status" ] # [ inline ( always ) ] pub fn txrxs ( & self ) -> TXRXS_R { TXRXS_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & self ) -> TCF_R { TCF_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 17 - Receive FIFO Drain Flag" ] # [ inline ( always ) ] pub fn rfdf ( & mut self ) -> RFDF_W { RFDF_W { w : self } } # [ doc = "Bit 19 - Receive FIFO Overflow Flag" ] # [ inline ( always ) ] pub fn rfof ( & mut self ) -> RFOF_W { RFOF_W { w : self } } # [ doc = "Bit 25 - Transmit FIFO Fill Flag" ] # [ inline ( always ) ] pub fn tfff ( & mut self ) -> TFFF_W { TFFF_W { w : self } } # [ doc = "Bit 27 - Transmit FIFO Underflow Flag" ] # [ inline ( always ) ] pub fn tfuf ( & mut self ) -> TFUF_W { TFUF_W { w : self } } # [ doc = "Bit 28 - End of Queue Flag" ] # [ inline ( always ) ] pub fn eoqf ( & mut self ) -> EOQF_W { EOQF_W { w : self } } # [ doc = "Bit 30 - TX and RX Status" ] # [ inline ( always ) ] pub fn txrxs ( & mut self ) -> TXRXS_W { TXRXS_W { w : self } } # [ doc = "Bit 31 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & mut self ) -> TCF_W { TCF_W { w : self } } } } # [ doc = "DMA/Interrupt Request Select and Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rser](rser) module" ] pub type RSER = crate :: Reg < u32 , _RSER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RSER ; # [ doc = "`read()` method returns [rser::R](rser::R) reader structure" ] impl crate :: Readable for RSER { } # [ doc = "`write(|w| ..)` method takes [rser::W](rser::W) writer structure" ] impl crate :: Writable for RSER { } # [ doc = "DMA/Interrupt Request Select and Enable Register" ] pub mod rser { # [ doc = "Reader of register RSER" ] pub type R = crate :: R < u32 , super :: RSER > ; # [ doc = "Writer for register RSER" ] pub type W = crate :: W < u32 , super :: RSER > ; # [ doc = "Register RSER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RSER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO Drain DMA or Interrupt Request Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_DIRS_A { # [ doc = "0: Interrupt request." ] _0 , # [ doc = "1: DMA request." ] _1 } impl From < RFDF_DIRS_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_DIRS_A ) -> Self { match variant { RFDF_DIRS_A :: _0 => false , RFDF_DIRS_A :: _1 => true } } } # [ doc = "Reader of field `RFDF_DIRS`" ] pub type RFDF_DIRS_R = crate :: R < bool , RFDF_DIRS_A > ; impl RFDF_DIRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_DIRS_A { match self . bits { false => RFDF_DIRS_A :: _0 , true => RFDF_DIRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_DIRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_DIRS_A :: _1 } } # [ doc = "Write proxy for field `RFDF_DIRS`" ] pub struct RFDF_DIRS_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_DIRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_DIRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_DIRS_A :: _0 ) } # [ doc = "DMA request." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_DIRS_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Receive FIFO Drain Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_RE_A { # [ doc = "0: RFDF interrupt or DMA requests are disabled." ] _0 , # [ doc = "1: RFDF interrupt or DMA requests are enabled." ] _1 } impl From < RFDF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_RE_A ) -> Self { match variant { RFDF_RE_A :: _0 => false , RFDF_RE_A :: _1 => true } } } # [ doc = "Reader of field `RFDF_RE`" ] pub type RFDF_RE_R = crate :: R < bool , RFDF_RE_A > ; impl RFDF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_RE_A { match self . bits { false => RFDF_RE_A :: _0 , true => RFDF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_RE_A :: _1 } } # [ doc = "Write proxy for field `RFDF_RE`" ] pub struct RFDF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RFDF interrupt or DMA requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_RE_A :: _0 ) } # [ doc = "RFDF interrupt or DMA requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_RE_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Receive FIFO Overflow Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFOF_RE_A { # [ doc = "0: RFOF interrupt requests are disabled." ] _0 , # [ doc = "1: RFOF interrupt requests are enabled." ] _1 } impl From < RFOF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RFOF_RE_A ) -> Self { match variant { RFOF_RE_A :: _0 => false , RFOF_RE_A :: _1 => true } } } # [ doc = "Reader of field `RFOF_RE`" ] pub type RFOF_RE_R = crate :: R < bool , RFOF_RE_A > ; impl RFOF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFOF_RE_A { match self . bits { false => RFOF_RE_A :: _0 , true => RFOF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFOF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFOF_RE_A :: _1 } } # [ doc = "Write proxy for field `RFOF_RE`" ] pub struct RFOF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > RFOF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFOF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RFOF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFOF_RE_A :: _0 ) } # [ doc = "RFOF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFOF_RE_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Transmit FIFO Fill DMA or Interrupt Request Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_DIRS_A { # [ doc = "0: TFFF flag generates interrupt requests." ] _0 , # [ doc = "1: TFFF flag generates DMA requests." ] _1 } impl From < TFFF_DIRS_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_DIRS_A ) -> Self { match variant { TFFF_DIRS_A :: _0 => false , TFFF_DIRS_A :: _1 => true } } } # [ doc = "Reader of field `TFFF_DIRS`" ] pub type TFFF_DIRS_R = crate :: R < bool , TFFF_DIRS_A > ; impl TFFF_DIRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_DIRS_A { match self . bits { false => TFFF_DIRS_A :: _0 , true => TFFF_DIRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_DIRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_DIRS_A :: _1 } } # [ doc = "Write proxy for field `TFFF_DIRS`" ] pub struct TFFF_DIRS_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_DIRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_DIRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFFF flag generates interrupt requests." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_DIRS_A :: _0 ) } # [ doc = "TFFF flag generates DMA requests." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_DIRS_A :: _1 ) } # [ 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 = "Transmit FIFO Fill Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_RE_A { # [ doc = "0: TFFF interrupts or DMA requests are disabled." ] _0 , # [ doc = "1: TFFF interrupts or DMA requests are enabled." ] _1 } impl From < TFFF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_RE_A ) -> Self { match variant { TFFF_RE_A :: _0 => false , TFFF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TFFF_RE`" ] pub type TFFF_RE_R = crate :: R < bool , TFFF_RE_A > ; impl TFFF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_RE_A { match self . bits { false => TFFF_RE_A :: _0 , true => TFFF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_RE_A :: _1 } } # [ doc = "Write proxy for field `TFFF_RE`" ] pub struct TFFF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFFF interrupts or DMA requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_RE_A :: _0 ) } # [ doc = "TFFF interrupts or DMA requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_RE_A :: _1 ) } # [ 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 = "Transmit FIFO Underflow Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFUF_RE_A { # [ doc = "0: TFUF interrupt requests are disabled." ] _0 , # [ doc = "1: TFUF interrupt requests are enabled." ] _1 } impl From < TFUF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TFUF_RE_A ) -> Self { match variant { TFUF_RE_A :: _0 => false , TFUF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TFUF_RE`" ] pub type TFUF_RE_R = crate :: R < bool , TFUF_RE_A > ; impl TFUF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFUF_RE_A { match self . bits { false => TFUF_RE_A :: _0 , true => TFUF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFUF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFUF_RE_A :: _1 } } # [ doc = "Write proxy for field `TFUF_RE`" ] pub struct TFUF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TFUF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFUF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFUF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFUF_RE_A :: _0 ) } # [ doc = "TFUF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFUF_RE_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Finished Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQF_RE_A { # [ doc = "0: EOQF interrupt requests are disabled." ] _0 , # [ doc = "1: EOQF interrupt requests are enabled." ] _1 } impl From < EOQF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQF_RE_A ) -> Self { match variant { EOQF_RE_A :: _0 => false , EOQF_RE_A :: _1 => true } } } # [ doc = "Reader of field `EOQF_RE`" ] pub type EOQF_RE_R = crate :: R < bool , EOQF_RE_A > ; impl EOQF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQF_RE_A { match self . bits { false => EOQF_RE_A :: _0 , true => EOQF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQF_RE_A :: _1 } } # [ doc = "Write proxy for field `EOQF_RE`" ] pub struct EOQF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > EOQF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "EOQF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQF_RE_A :: _0 ) } # [ doc = "EOQF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQF_RE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Transmission Complete Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_RE_A { # [ doc = "0: TCF interrupt requests are disabled." ] _0 , # [ doc = "1: TCF interrupt requests are enabled." ] _1 } impl From < TCF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_RE_A ) -> Self { match variant { TCF_RE_A :: _0 => false , TCF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TCF_RE`" ] pub type TCF_RE_R = crate :: R < bool , TCF_RE_A > ; impl TCF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_RE_A { match self . bits { false => TCF_RE_A :: _0 , true => TCF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_RE_A :: _1 } } # [ doc = "Write proxy for field `TCF_RE`" ] pub struct TCF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TCF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TCF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCF_RE_A :: _0 ) } # [ doc = "TCF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCF_RE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 16 - Receive FIFO Drain DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn rfdf_dirs ( & self ) -> RFDF_DIRS_R { RFDF_DIRS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Receive FIFO Drain Request Enable" ] # [ inline ( always ) ] pub fn rfdf_re ( & self ) -> RFDF_RE_R { RFDF_RE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Receive FIFO Overflow Request Enable" ] # [ inline ( always ) ] pub fn rfof_re ( & self ) -> RFOF_RE_R { RFOF_RE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Transmit FIFO Fill DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn tfff_dirs ( & self ) -> TFFF_DIRS_R { TFFF_DIRS_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Transmit FIFO Fill Request Enable" ] # [ inline ( always ) ] pub fn tfff_re ( & self ) -> TFFF_RE_R { TFFF_RE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Transmit FIFO Underflow Request Enable" ] # [ inline ( always ) ] pub fn tfuf_re ( & self ) -> TFUF_RE_R { TFUF_RE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Finished Request Enable" ] # [ inline ( always ) ] pub fn eoqf_re ( & self ) -> EOQF_RE_R { EOQF_RE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Transmission Complete Request Enable" ] # [ inline ( always ) ] pub fn tcf_re ( & self ) -> TCF_RE_R { TCF_RE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 16 - Receive FIFO Drain DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn rfdf_dirs ( & mut self ) -> RFDF_DIRS_W { RFDF_DIRS_W { w : self } } # [ doc = "Bit 17 - Receive FIFO Drain Request Enable" ] # [ inline ( always ) ] pub fn rfdf_re ( & mut self ) -> RFDF_RE_W { RFDF_RE_W { w : self } } # [ doc = "Bit 19 - Receive FIFO Overflow Request Enable" ] # [ inline ( always ) ] pub fn rfof_re ( & mut self ) -> RFOF_RE_W { RFOF_RE_W { w : self } } # [ doc = "Bit 24 - Transmit FIFO Fill DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn tfff_dirs ( & mut self ) -> TFFF_DIRS_W { TFFF_DIRS_W { w : self } } # [ doc = "Bit 25 - Transmit FIFO Fill Request Enable" ] # [ inline ( always ) ] pub fn tfff_re ( & mut self ) -> TFFF_RE_W { TFFF_RE_W { w : self } } # [ doc = "Bit 27 - Transmit FIFO Underflow Request Enable" ] # [ inline ( always ) ] pub fn tfuf_re ( & mut self ) -> TFUF_RE_W { TFUF_RE_W { w : self } } # [ doc = "Bit 28 - Finished Request Enable" ] # [ inline ( always ) ] pub fn eoqf_re ( & mut self ) -> EOQF_RE_W { EOQF_RE_W { w : self } } # [ doc = "Bit 31 - Transmission Complete Request Enable" ] # [ inline ( always ) ] pub fn tcf_re ( & mut self ) -> TCF_RE_W { TCF_RE_W { w : self } } } } # [ doc = "PUSH TX FIFO Register In Master Mode\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pushr](pushr) module" ] pub type PUSHR = crate :: Reg < u32 , _PUSHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PUSHR ; # [ doc = "`read()` method returns [pushr::R](pushr::R) reader structure" ] impl crate :: Readable for PUSHR { } # [ doc = "`write(|w| ..)` method takes [pushr::W](pushr::W) writer structure" ] impl crate :: Writable for PUSHR { } # [ doc = "PUSH TX FIFO Register In Master Mode" ] pub mod pushr { # [ doc = "Reader of register PUSHR" ] pub type R = crate :: R < u32 , super :: PUSHR > ; # [ doc = "Writer for register PUSHR" ] pub type W = crate :: W < u32 , super :: PUSHR > ; # [ doc = "Register PUSHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PUSHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TXDATA`" ] pub struct TXDATA_W < 'a > { w : & 'a mut W , } impl < 'a > TXDATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS0_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS0_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS0_A ) -> Self { match variant { PCS0_A :: _0 => false , PCS0_A :: _1 => true } } } # [ doc = "Reader of field `PCS0`" ] pub type PCS0_R = crate :: R < bool , PCS0_A > ; impl PCS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS0_A { match self . bits { false => PCS0_A :: _0 , true => PCS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS0_A :: _1 } } # [ doc = "Write proxy for field `PCS0`" ] pub struct PCS0_W < 'a > { w : & 'a mut W , } impl < 'a > PCS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS0_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS1_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS1_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS1_A ) -> Self { match variant { PCS1_A :: _0 => false , PCS1_A :: _1 => true } } } # [ doc = "Reader of field `PCS1`" ] pub type PCS1_R = crate :: R < bool , PCS1_A > ; impl PCS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS1_A { match self . bits { false => PCS1_A :: _0 , true => PCS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS1_A :: _1 } } # [ doc = "Write proxy for field `PCS1`" ] pub struct PCS1_W < 'a > { w : & 'a mut W , } impl < 'a > PCS1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS1_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS2_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS2_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS2_A ) -> Self { match variant { PCS2_A :: _0 => false , PCS2_A :: _1 => true } } } # [ doc = "Reader of field `PCS2`" ] pub type PCS2_R = crate :: R < bool , PCS2_A > ; impl PCS2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS2_A { match self . bits { false => PCS2_A :: _0 , true => PCS2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS2_A :: _1 } } # [ doc = "Write proxy for field `PCS2`" ] pub struct PCS2_W < 'a > { w : & 'a mut W , } impl < 'a > PCS2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS2_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS3_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS3_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS3_A ) -> Self { match variant { PCS3_A :: _0 => false , PCS3_A :: _1 => true } } } # [ doc = "Reader of field `PCS3`" ] pub type PCS3_R = crate :: R < bool , PCS3_A > ; impl PCS3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS3_A { match self . bits { false => PCS3_A :: _0 , true => PCS3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS3_A :: _1 } } # [ doc = "Write proxy for field `PCS3`" ] pub struct PCS3_W < 'a > { w : & 'a mut W , } impl < 'a > PCS3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS3_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS3_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS4_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS4_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS4_A ) -> Self { match variant { PCS4_A :: _0 => false , PCS4_A :: _1 => true } } } # [ doc = "Reader of field `PCS4`" ] pub type PCS4_R = crate :: R < bool , PCS4_A > ; impl PCS4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS4_A { match self . bits { false => PCS4_A :: _0 , true => PCS4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS4_A :: _1 } } # [ doc = "Write proxy for field `PCS4`" ] pub struct PCS4_W < 'a > { w : & 'a mut W , } impl < 'a > PCS4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS4_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS4_A :: _1 ) } # [ 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 = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS5_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS5_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS5_A ) -> Self { match variant { PCS5_A :: _0 => false , PCS5_A :: _1 => true } } } # [ doc = "Reader of field `PCS5`" ] pub type PCS5_R = crate :: R < bool , PCS5_A > ; impl PCS5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS5_A { match self . bits { false => PCS5_A :: _0 , true => PCS5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS5_A :: _1 } } # [ doc = "Write proxy for field `PCS5`" ] pub struct PCS5_W < 'a > { w : & 'a mut W , } impl < 'a > PCS5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS5_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS5_A :: _1 ) } # [ 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 = "Clear Transfer Counter\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTCNT_A { # [ doc = "0: Do not clear the TCR\\[TCNT\\] field." ] _0 , # [ doc = "1: Clear the TCR\\[TCNT\\] field." ] _1 } impl From < CTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : CTCNT_A ) -> Self { match variant { CTCNT_A :: _0 => false , CTCNT_A :: _1 => true } } } # [ doc = "Reader of field `CTCNT`" ] pub type CTCNT_R = crate :: R < bool , CTCNT_A > ; impl CTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CTCNT_A { match self . bits { false => CTCNT_A :: _0 , true => CTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CTCNT_A :: _1 } } # [ doc = "Write proxy for field `CTCNT`" ] pub struct CTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > CTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the TCR\\[TCNT\\] field." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CTCNT_A :: _0 ) } # [ doc = "Clear the TCR\\[TCNT\\] field." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CTCNT_A :: _1 ) } # [ 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 = "End Of Queue\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQ_A { # [ doc = "0: The SPI data is not the last data to transfer." ] _0 , # [ doc = "1: The SPI data is the last data to transfer." ] _1 } impl From < EOQ_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQ_A ) -> Self { match variant { EOQ_A :: _0 => false , EOQ_A :: _1 => true } } } # [ doc = "Reader of field `EOQ`" ] pub type EOQ_R = crate :: R < bool , EOQ_A > ; impl EOQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQ_A { match self . bits { false => EOQ_A :: _0 , true => EOQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQ_A :: _1 } } # [ doc = "Write proxy for field `EOQ`" ] pub struct EOQ_W < 'a > { w : & 'a mut W , } impl < 'a > EOQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The SPI data is not the last data to transfer." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQ_A :: _0 ) } # [ doc = "The SPI data is the last data to transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQ_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Clock and Transfer Attributes Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTAS_A { # [ doc = "0: CTAR0" ] _000 , # [ doc = "1: CTAR1" ] _001 } impl From < CTAS_A > for u8 { # [ inline ( always ) ] fn from ( variant : CTAS_A ) -> Self { match variant { CTAS_A :: _000 => 0 , CTAS_A :: _001 => 1 } } } # [ doc = "Reader of field `CTAS`" ] pub type CTAS_R = crate :: R < u8 , CTAS_A > ; impl CTAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CTAS_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CTAS_A :: _000 ) , 1 => Val ( CTAS_A :: _001 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == CTAS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == CTAS_A :: _001 } } # [ doc = "Write proxy for field `CTAS`" ] pub struct CTAS_W < 'a > { w : & 'a mut W , } impl < 'a > CTAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTAS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "CTAR0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( CTAS_A :: _000 ) } # [ doc = "CTAR1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( CTAS_A :: _001 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x07 ) << 28 ) ; self . w } } # [ doc = "Continuous Peripheral Chip Select Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CONT_A { # [ doc = "0: Return PCSn signals to their inactive state between transfers." ] _0 , # [ doc = "1: Keep PCSn signals asserted between transfers." ] _1 } impl From < CONT_A > for bool { # [ inline ( always ) ] fn from ( variant : CONT_A ) -> Self { match variant { CONT_A :: _0 => false , CONT_A :: _1 => true } } } # [ doc = "Reader of field `CONT`" ] pub type CONT_R = crate :: R < bool , CONT_A > ; impl CONT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CONT_A { match self . bits { false => CONT_A :: _0 , true => CONT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CONT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CONT_A :: _1 } } # [ doc = "Write proxy for field `CONT`" ] pub struct CONT_W < 'a > { w : & 'a mut W , } impl < 'a > CONT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CONT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Return PCSn signals to their inactive state between transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CONT_A :: _0 ) } # [ doc = "Keep PCSn signals asserted between transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CONT_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bit 16 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs0 ( & self ) -> PCS0_R { PCS0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs1 ( & self ) -> PCS1_R { PCS1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs2 ( & self ) -> PCS2_R { PCS2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs3 ( & self ) -> PCS3_R { PCS3_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs4 ( & self ) -> PCS4_R { PCS4_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs5 ( & self ) -> PCS5_R { PCS5_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clear Transfer Counter" ] # [ inline ( always ) ] pub fn ctcnt ( & self ) -> CTCNT_R { CTCNT_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - End Of Queue" ] # [ inline ( always ) ] pub fn eoq ( & self ) -> EOQ_R { EOQ_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:30 - Clock and Transfer Attributes Select" ] # [ inline ( always ) ] pub fn ctas ( & self ) -> CTAS_R { CTAS_R :: new ( ( ( self . bits >> 28 ) & 0x07 ) as u8 ) } # [ doc = "Bit 31 - Continuous Peripheral Chip Select Enable" ] # [ inline ( always ) ] pub fn cont ( & self ) -> CONT_R { CONT_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & mut self ) -> TXDATA_W { TXDATA_W { w : self } } # [ doc = "Bit 16 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs0 ( & mut self ) -> PCS0_W { PCS0_W { w : self } } # [ doc = "Bit 17 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs1 ( & mut self ) -> PCS1_W { PCS1_W { w : self } } # [ doc = "Bit 18 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs2 ( & mut self ) -> PCS2_W { PCS2_W { w : self } } # [ doc = "Bit 19 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs3 ( & mut self ) -> PCS3_W { PCS3_W { w : self } } # [ doc = "Bit 20 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs4 ( & mut self ) -> PCS4_W { PCS4_W { w : self } } # [ doc = "Bit 21 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs5 ( & mut self ) -> PCS5_W { PCS5_W { w : self } } # [ doc = "Bit 26 - Clear Transfer Counter" ] # [ inline ( always ) ] pub fn ctcnt ( & mut self ) -> CTCNT_W { CTCNT_W { w : self } } # [ doc = "Bit 27 - End Of Queue" ] # [ inline ( always ) ] pub fn eoq ( & mut self ) -> EOQ_W { EOQ_W { w : self } } # [ doc = "Bits 28:30 - Clock and Transfer Attributes Select" ] # [ inline ( always ) ] pub fn ctas ( & mut self ) -> CTAS_W { CTAS_W { w : self } } # [ doc = "Bit 31 - Continuous Peripheral Chip Select Enable" ] # [ inline ( always ) ] pub fn cont ( & mut self ) -> CONT_W { CONT_W { w : self } } } } # [ doc = "PUSH TX FIFO Register In Slave Mode\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pushr_slave](pushr_slave) module" ] pub type PUSHR_SLAVE = crate :: Reg < u32 , _PUSHR_SLAVE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PUSHR_SLAVE ; # [ doc = "`read()` method returns [pushr_slave::R](pushr_slave::R) reader structure" ] impl crate :: Readable for PUSHR_SLAVE { } # [ doc = "`write(|w| ..)` method takes [pushr_slave::W](pushr_slave::W) writer structure" ] impl crate :: Writable for PUSHR_SLAVE { } # [ doc = "PUSH TX FIFO Register In Slave Mode" ] pub mod pushr_slave { # [ doc = "Reader of register PUSHR_SLAVE" ] pub type R = crate :: R < u32 , super :: PUSHR_SLAVE > ; # [ doc = "Writer for register PUSHR_SLAVE" ] pub type W = crate :: W < u32 , super :: PUSHR_SLAVE > ; # [ doc = "Register PUSHR_SLAVE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PUSHR_SLAVE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `TXDATA`" ] pub struct TXDATA_W < 'a > { w : & 'a mut W , } impl < 'a > TXDATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & mut self ) -> TXDATA_W { TXDATA_W { w : self } } } } # [ doc = "POP RX FIFO Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [popr](popr) module" ] pub type POPR = crate :: Reg < u32 , _POPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POPR ; # [ doc = "`read()` method returns [popr::R](popr::R) reader structure" ] impl crate :: Readable for POPR { } # [ doc = "POP RX FIFO Register" ] pub mod popr { # [ doc = "Reader of register POPR" ] pub type R = crate :: R < u32 , super :: POPR > ; # [ doc = "Reader of field `RXDATA`" ] pub type RXDATA_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Received Data" ] # [ inline ( always ) ] pub fn rxdata ( & self ) -> RXDATA_R { RXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Transmit FIFO Registers\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [txfr](txfr) module" ] pub type TXFR = crate :: Reg < u32 , _TXFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TXFR ; # [ doc = "`read()` method returns [txfr::R](txfr::R) reader structure" ] impl crate :: Readable for TXFR { } # [ doc = "Transmit FIFO Registers" ] pub mod txfr { # [ doc = "Reader of register TXFR%s" ] pub type R = crate :: R < u32 , super :: TXFR > ; # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `TXCMD_TXDATA`" ] pub type TXCMD_TXDATA_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Transmit Command or Transmit Data" ] # [ inline ( always ) ] pub fn txcmd_txdata ( & self ) -> TXCMD_TXDATA_R { TXCMD_TXDATA_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } } # [ doc = "Receive FIFO Registers\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxfr](rxfr) module" ] pub type RXFR = crate :: Reg < u32 , _RXFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXFR ; # [ doc = "`read()` method returns [rxfr::R](rxfr::R) reader structure" ] impl crate :: Readable for RXFR { } # [ doc = "Receive FIFO Registers" ] pub mod rxfr { # [ doc = "Reader of register RXFR%s" ] pub type R = crate :: R < u32 , super :: RXFR > ; # [ doc = "Reader of field `RXDATA`" ] pub type RXDATA_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Receive Data" ] # [ inline ( always ) ] pub fn rxdata ( & self ) -> RXDATA_R { RXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } } # [ doc = "Serial Peripheral Interface" ] pub struct SPI2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPI2 { } impl SPI2 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const spi2 :: RegisterBlock { 0x400a_c000 as * const _ } } impl Deref for SPI2 { type Target = spi2 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SPI2 :: ptr ( ) } } } # [ doc = "Serial Peripheral Interface" ] pub mod spi2 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Module Configuration Register" ] pub mcr : MCR , _reserved1 : [ u8 ; 4usize ] , # [ doc = "0x08 - Transfer Count Register" ] pub tcr : TCR , _reserved_2_ctar : [ u8 ; 8usize ] , _reserved3 : [ u8 ; 24usize ] , # [ doc = "0x2c - Status Register" ] pub sr : SR , # [ doc = "0x30 - DMA/Interrupt Request Select and Enable Register" ] pub rser : RSER , _reserved_5_pushr : [ u8 ; 4usize ] , # [ doc = "0x38 - POP RX FIFO Register" ] pub popr : POPR , # [ doc = "0x3c - Transmit FIFO Registers" ] pub txfr : [ TXFR ; 4 ] , _reserved8 : [ u8 ; 48usize ] , # [ doc = "0x7c - Receive FIFO Registers" ] pub rxfr : [ RXFR ; 4 ] , } impl RegisterBlock { # [ doc = "0x0c - Clock and Transfer Attributes Register (In Slave Mode)" ] # [ inline ( always ) ] pub fn ctar_slave ( & self ) -> & CTAR_SLAVE { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 12usize ) as * const CTAR_SLAVE ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Slave Mode)" ] # [ inline ( always ) ] pub fn ctar_slave_mut ( & self ) -> & mut CTAR_SLAVE { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 12usize ) as * mut CTAR_SLAVE ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Master Mode)" ] # [ inline ( always ) ] pub fn ctar ( & self ) -> & [ CTAR ; 2 ] { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 12usize ) as * const [ CTAR ; 2 ] ) } } # [ doc = "0x0c - Clock and Transfer Attributes Register (In Master Mode)" ] # [ inline ( always ) ] pub fn ctar_mut ( & self ) -> & mut [ CTAR ; 2 ] { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 12usize ) as * mut [ CTAR ; 2 ] ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Slave Mode" ] # [ inline ( always ) ] pub fn pushr_slave ( & self ) -> & PUSHR_SLAVE { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 52usize ) as * const PUSHR_SLAVE ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Slave Mode" ] # [ inline ( always ) ] pub fn pushr_slave_mut ( & self ) -> & mut PUSHR_SLAVE { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 52usize ) as * mut PUSHR_SLAVE ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Master Mode" ] # [ inline ( always ) ] pub fn pushr ( & self ) -> & PUSHR { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 52usize ) as * const PUSHR ) } } # [ doc = "0x34 - PUSH TX FIFO Register In Master Mode" ] # [ inline ( always ) ] pub fn pushr_mut ( & self ) -> & mut PUSHR { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 52usize ) as * mut PUSHR ) } } } # [ doc = "Module Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mcr](mcr) module" ] pub type MCR = crate :: Reg < u32 , _MCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCR ; # [ doc = "`read()` method returns [mcr::R](mcr::R) reader structure" ] impl crate :: Readable for MCR { } # [ doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure" ] impl crate :: Writable for MCR { } # [ doc = "Module Configuration Register" ] pub mod mcr { # [ doc = "Reader of register MCR" ] pub type R = crate :: R < u32 , super :: MCR > ; # [ doc = "Writer for register MCR" ] pub type W = crate :: W < u32 , super :: MCR > ; # [ doc = "Register MCR `reset()`'s with value 0x4001" ] impl crate :: ResetValue for super :: MCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x4001 } } # [ doc = "Halt\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HALT_A { # [ doc = "0: Start transfers." ] _0 , # [ doc = "1: Stop transfers." ] _1 } impl From < HALT_A > for bool { # [ inline ( always ) ] fn from ( variant : HALT_A ) -> Self { match variant { HALT_A :: _0 => false , HALT_A :: _1 => true } } } # [ doc = "Reader of field `HALT`" ] pub type HALT_R = crate :: R < bool , HALT_A > ; impl HALT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HALT_A { match self . bits { false => HALT_A :: _0 , true => HALT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HALT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HALT_A :: _1 } } # [ doc = "Write proxy for field `HALT`" ] pub struct HALT_W < 'a > { w : & 'a mut W , } impl < 'a > HALT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HALT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Start transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _0 ) } # [ doc = "Stop transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HALT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Sample Point\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMPL_PT_A { # [ doc = "0: 0 protocol clock cycles between SCK edge and SIN sample" ] _00 , # [ doc = "1: 1 protocol clock cycle between SCK edge and SIN sample" ] _01 , # [ doc = "2: 2 protocol clock cycles between SCK edge and SIN sample" ] _10 } impl From < SMPL_PT_A > for u8 { # [ inline ( always ) ] fn from ( variant : SMPL_PT_A ) -> Self { match variant { SMPL_PT_A :: _00 => 0 , SMPL_PT_A :: _01 => 1 , SMPL_PT_A :: _10 => 2 } } } # [ doc = "Reader of field `SMPL_PT`" ] pub type SMPL_PT_R = crate :: R < u8 , SMPL_PT_A > ; impl SMPL_PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SMPL_PT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SMPL_PT_A :: _00 ) , 1 => Val ( SMPL_PT_A :: _01 ) , 2 => Val ( SMPL_PT_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SMPL_PT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SMPL_PT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SMPL_PT_A :: _10 } } # [ doc = "Write proxy for field `SMPL_PT`" ] pub struct SMPL_PT_W < 'a > { w : & 'a mut W , } impl < 'a > SMPL_PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMPL_PT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "0 protocol clock cycles between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _00 ) } # [ doc = "1 protocol clock cycle between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _01 ) } # [ doc = "2 protocol clock cycles between SCK edge and SIN sample" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SMPL_PT_A :: _10 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "CLR_RXF\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLR_RXF_AW { # [ doc = "0: Do not clear the RX FIFO counter." ] _0 , # [ doc = "1: Clear the RX FIFO counter." ] _1 } impl From < CLR_RXF_AW > for bool { # [ inline ( always ) ] fn from ( variant : CLR_RXF_AW ) -> Self { match variant { CLR_RXF_AW :: _0 => false , CLR_RXF_AW :: _1 => true } } } # [ doc = "Write proxy for field `CLR_RXF`" ] pub struct CLR_RXF_W < 'a > { w : & 'a mut W , } impl < 'a > CLR_RXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLR_RXF_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the RX FIFO counter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLR_RXF_AW :: _0 ) } # [ doc = "Clear the RX FIFO counter." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLR_RXF_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Clear TX FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLR_TXF_AW { # [ doc = "0: Do not clear the TX FIFO counter." ] _0 , # [ doc = "1: Clear the TX FIFO counter." ] _1 } impl From < CLR_TXF_AW > for bool { # [ inline ( always ) ] fn from ( variant : CLR_TXF_AW ) -> Self { match variant { CLR_TXF_AW :: _0 => false , CLR_TXF_AW :: _1 => true } } } # [ doc = "Write proxy for field `CLR_TXF`" ] pub struct CLR_TXF_W < 'a > { w : & 'a mut W , } impl < 'a > CLR_TXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLR_TXF_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the TX FIFO counter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLR_TXF_AW :: _0 ) } # [ doc = "Clear the TX FIFO counter." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLR_TXF_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Disable Receive FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIS_RXF_A { # [ doc = "0: RX FIFO is enabled." ] _0 , # [ doc = "1: RX FIFO is disabled." ] _1 } impl From < DIS_RXF_A > for bool { # [ inline ( always ) ] fn from ( variant : DIS_RXF_A ) -> Self { match variant { DIS_RXF_A :: _0 => false , DIS_RXF_A :: _1 => true } } } # [ doc = "Reader of field `DIS_RXF`" ] pub type DIS_RXF_R = crate :: R < bool , DIS_RXF_A > ; impl DIS_RXF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIS_RXF_A { match self . bits { false => DIS_RXF_A :: _0 , true => DIS_RXF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIS_RXF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIS_RXF_A :: _1 } } # [ doc = "Write proxy for field `DIS_RXF`" ] pub struct DIS_RXF_W < 'a > { w : & 'a mut W , } impl < 'a > DIS_RXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIS_RXF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RX FIFO is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIS_RXF_A :: _0 ) } # [ doc = "RX FIFO is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIS_RXF_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Disable Transmit FIFO\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIS_TXF_A { # [ doc = "0: TX FIFO is enabled." ] _0 , # [ doc = "1: TX FIFO is disabled." ] _1 } impl From < DIS_TXF_A > for bool { # [ inline ( always ) ] fn from ( variant : DIS_TXF_A ) -> Self { match variant { DIS_TXF_A :: _0 => false , DIS_TXF_A :: _1 => true } } } # [ doc = "Reader of field `DIS_TXF`" ] pub type DIS_TXF_R = crate :: R < bool , DIS_TXF_A > ; impl DIS_TXF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIS_TXF_A { match self . bits { false => DIS_TXF_A :: _0 , true => DIS_TXF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIS_TXF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIS_TXF_A :: _1 } } # [ doc = "Write proxy for field `DIS_TXF`" ] pub struct DIS_TXF_W < 'a > { w : & 'a mut W , } impl < 'a > DIS_TXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIS_TXF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TX FIFO is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIS_TXF_A :: _0 ) } # [ doc = "TX FIFO is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIS_TXF_A :: _1 ) } # [ 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 = "Module Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MDIS_A { # [ doc = "0: Enables the module clocks." ] _0 , # [ doc = "1: Allows external logic to disable the module clocks." ] _1 } impl From < MDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : MDIS_A ) -> Self { match variant { MDIS_A :: _0 => false , MDIS_A :: _1 => true } } } # [ doc = "Reader of field `MDIS`" ] pub type MDIS_R = crate :: R < bool , MDIS_A > ; impl MDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MDIS_A { match self . bits { false => MDIS_A :: _0 , true => MDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MDIS_A :: _1 } } # [ doc = "Write proxy for field `MDIS`" ] pub struct MDIS_W < 'a > { w : & 'a mut W , } impl < 'a > MDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Enables the module clocks." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _0 ) } # [ doc = "Allows external logic to disable the module clocks." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Doze Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOZE_A { # [ doc = "0: Doze mode has no effect on the module." ] _0 , # [ doc = "1: Doze mode disables the module." ] _1 } impl From < DOZE_A > for bool { # [ inline ( always ) ] fn from ( variant : DOZE_A ) -> Self { match variant { DOZE_A :: _0 => false , DOZE_A :: _1 => true } } } # [ doc = "Reader of field `DOZE`" ] pub type DOZE_R = crate :: R < bool , DOZE_A > ; impl DOZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DOZE_A { match self . bits { false => DOZE_A :: _0 , true => DOZE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DOZE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DOZE_A :: _1 } } # [ doc = "Write proxy for field `DOZE`" ] pub struct DOZE_W < 'a > { w : & 'a mut W , } impl < 'a > DOZE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DOZE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Doze mode has no effect on the module." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DOZE_A :: _0 ) } # [ doc = "Doze mode disables the module." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DOZE_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS0_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS0_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS0_A ) -> Self { match variant { PCSIS0_A :: _0 => false , PCSIS0_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS0`" ] pub type PCSIS0_R = crate :: R < bool , PCSIS0_A > ; impl PCSIS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS0_A { match self . bits { false => PCSIS0_A :: _0 , true => PCSIS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS0_A :: _1 } } # [ doc = "Write proxy for field `PCSIS0`" ] pub struct PCSIS0_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS0_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS1_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS1_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS1_A ) -> Self { match variant { PCSIS1_A :: _0 => false , PCSIS1_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS1`" ] pub type PCSIS1_R = crate :: R < bool , PCSIS1_A > ; impl PCSIS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS1_A { match self . bits { false => PCSIS1_A :: _0 , true => PCSIS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS1_A :: _1 } } # [ doc = "Write proxy for field `PCSIS1`" ] pub struct PCSIS1_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS1_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS2_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS2_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS2_A ) -> Self { match variant { PCSIS2_A :: _0 => false , PCSIS2_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS2`" ] pub type PCSIS2_R = crate :: R < bool , PCSIS2_A > ; impl PCSIS2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS2_A { match self . bits { false => PCSIS2_A :: _0 , true => PCSIS2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS2_A :: _1 } } # [ doc = "Write proxy for field `PCSIS2`" ] pub struct PCSIS2_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS2_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS3_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS3_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS3_A ) -> Self { match variant { PCSIS3_A :: _0 => false , PCSIS3_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS3`" ] pub type PCSIS3_R = crate :: R < bool , PCSIS3_A > ; impl PCSIS3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS3_A { match self . bits { false => PCSIS3_A :: _0 , true => PCSIS3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS3_A :: _1 } } # [ doc = "Write proxy for field `PCSIS3`" ] pub struct PCSIS3_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS3_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS3_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS4_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS4_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS4_A ) -> Self { match variant { PCSIS4_A :: _0 => false , PCSIS4_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS4`" ] pub type PCSIS4_R = crate :: R < bool , PCSIS4_A > ; impl PCSIS4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS4_A { match self . bits { false => PCSIS4_A :: _0 , true => PCSIS4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS4_A :: _1 } } # [ doc = "Write proxy for field `PCSIS4`" ] pub struct PCSIS4_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS4_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS4_A :: _1 ) } # [ 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 = "Peripheral Chip Select x Inactive State\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSIS5_A { # [ doc = "0: The inactive state of PCSx is low." ] _0 , # [ doc = "1: The inactive state of PCSx is high." ] _1 } impl From < PCSIS5_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSIS5_A ) -> Self { match variant { PCSIS5_A :: _0 => false , PCSIS5_A :: _1 => true } } } # [ doc = "Reader of field `PCSIS5`" ] pub type PCSIS5_R = crate :: R < bool , PCSIS5_A > ; impl PCSIS5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSIS5_A { match self . bits { false => PCSIS5_A :: _0 , true => PCSIS5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSIS5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSIS5_A :: _1 } } # [ doc = "Write proxy for field `PCSIS5`" ] pub struct PCSIS5_W < 'a > { w : & 'a mut W , } impl < 'a > PCSIS5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSIS5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state of PCSx is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSIS5_A :: _0 ) } # [ doc = "The inactive state of PCSx is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSIS5_A :: _1 ) } # [ 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 = "Receive FIFO Overflow Overwrite Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ROOE_A { # [ doc = "0: Incoming data is ignored." ] _0 , # [ doc = "1: Incoming data is shifted into the shift register." ] _1 } impl From < ROOE_A > for bool { # [ inline ( always ) ] fn from ( variant : ROOE_A ) -> Self { match variant { ROOE_A :: _0 => false , ROOE_A :: _1 => true } } } # [ doc = "Reader of field `ROOE`" ] pub type ROOE_R = crate :: R < bool , ROOE_A > ; impl ROOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ROOE_A { match self . bits { false => ROOE_A :: _0 , true => ROOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ROOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ROOE_A :: _1 } } # [ doc = "Write proxy for field `ROOE`" ] pub struct ROOE_W < 'a > { w : & 'a mut W , } impl < 'a > ROOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ROOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Incoming data is ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ROOE_A :: _0 ) } # [ doc = "Incoming data is shifted into the shift register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ROOE_A :: _1 ) } # [ 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 = "Peripheral Chip Select Strobe Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSSE_A { # [ doc = "0: PCS5/ PCSS is used as the Peripheral Chip Select\\[5\\] signal." ] _0 , # [ doc = "1: PCS5/ PCSS is used as an active-low PCS Strobe signal." ] _1 } impl From < PCSSE_A > for bool { # [ inline ( always ) ] fn from ( variant : PCSSE_A ) -> Self { match variant { PCSSE_A :: _0 => false , PCSSE_A :: _1 => true } } } # [ doc = "Reader of field `PCSSE`" ] pub type PCSSE_R = crate :: R < bool , PCSSE_A > ; impl PCSSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSSE_A { match self . bits { false => PCSSE_A :: _0 , true => PCSSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCSSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCSSE_A :: _1 } } # [ doc = "Write proxy for field `PCSSE`" ] pub struct PCSSE_W < 'a > { w : & 'a mut W , } impl < 'a > PCSSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PCS5/ PCSS is used as the Peripheral Chip Select\\[5\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCSSE_A :: _0 ) } # [ doc = "PCS5/ PCSS is used as an active-low PCS Strobe signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCSSE_A :: _1 ) } # [ 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 = "Modified Transfer Format Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MTFE_A { # [ doc = "0: Modified SPI transfer format disabled." ] _0 , # [ doc = "1: Modified SPI transfer format enabled." ] _1 } impl From < MTFE_A > for bool { # [ inline ( always ) ] fn from ( variant : MTFE_A ) -> Self { match variant { MTFE_A :: _0 => false , MTFE_A :: _1 => true } } } # [ doc = "Reader of field `MTFE`" ] pub type MTFE_R = crate :: R < bool , MTFE_A > ; impl MTFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MTFE_A { match self . bits { false => MTFE_A :: _0 , true => MTFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MTFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MTFE_A :: _1 } } # [ doc = "Write proxy for field `MTFE`" ] pub struct MTFE_W < 'a > { w : & 'a mut W , } impl < 'a > MTFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MTFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Modified SPI transfer format disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MTFE_A :: _0 ) } # [ doc = "Modified SPI transfer format enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MTFE_A :: _1 ) } # [ 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 = "Freeze\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRZ_A { # [ doc = "0: Do not halt serial transfers in Debug mode." ] _0 , # [ doc = "1: Halt serial transfers in Debug mode." ] _1 } impl From < FRZ_A > for bool { # [ inline ( always ) ] fn from ( variant : FRZ_A ) -> Self { match variant { FRZ_A :: _0 => false , FRZ_A :: _1 => true } } } # [ doc = "Reader of field `FRZ`" ] pub type FRZ_R = crate :: R < bool , FRZ_A > ; impl FRZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRZ_A { match self . bits { false => FRZ_A :: _0 , true => FRZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRZ_A :: _1 } } # [ doc = "Write proxy for field `FRZ`" ] pub struct FRZ_W < 'a > { w : & 'a mut W , } impl < 'a > FRZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not halt serial transfers in Debug mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _0 ) } # [ doc = "Halt serial transfers in Debug mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "SPI Configuration.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DCONF_A { # [ doc = "0: SPI" ] _00 } impl From < DCONF_A > for u8 { # [ inline ( always ) ] fn from ( variant : DCONF_A ) -> Self { match variant { DCONF_A :: _00 => 0 } } } # [ doc = "Reader of field `DCONF`" ] pub type DCONF_R = crate :: R < u8 , DCONF_A > ; impl DCONF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DCONF_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DCONF_A :: _00 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DCONF_A :: _00 } } # [ doc = "Continuous SCK Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CONT_SCKE_A { # [ doc = "0: Continuous SCK disabled." ] _0 , # [ doc = "1: Continuous SCK enabled." ] _1 } impl From < CONT_SCKE_A > for bool { # [ inline ( always ) ] fn from ( variant : CONT_SCKE_A ) -> Self { match variant { CONT_SCKE_A :: _0 => false , CONT_SCKE_A :: _1 => true } } } # [ doc = "Reader of field `CONT_SCKE`" ] pub type CONT_SCKE_R = crate :: R < bool , CONT_SCKE_A > ; impl CONT_SCKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CONT_SCKE_A { match self . bits { false => CONT_SCKE_A :: _0 , true => CONT_SCKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CONT_SCKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CONT_SCKE_A :: _1 } } # [ doc = "Write proxy for field `CONT_SCKE`" ] pub struct CONT_SCKE_W < 'a > { w : & 'a mut W , } impl < 'a > CONT_SCKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CONT_SCKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Continuous SCK disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CONT_SCKE_A :: _0 ) } # [ doc = "Continuous SCK enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CONT_SCKE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Master/Slave Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSTR_A { # [ doc = "0: Enables Slave mode" ] _0 , # [ doc = "1: Enables Master mode" ] _1 } impl From < MSTR_A > for bool { # [ inline ( always ) ] fn from ( variant : MSTR_A ) -> Self { match variant { MSTR_A :: _0 => false , MSTR_A :: _1 => true } } } # [ doc = "Reader of field `MSTR`" ] pub type MSTR_R = crate :: R < bool , MSTR_A > ; impl MSTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSTR_A { match self . bits { false => MSTR_A :: _0 , true => MSTR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSTR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSTR_A :: _1 } } # [ doc = "Write proxy for field `MSTR`" ] pub struct MSTR_W < 'a > { w : & 'a mut W , } impl < 'a > MSTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSTR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Enables Slave mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSTR_A :: _0 ) } # [ doc = "Enables Master mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSTR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Halt" ] # [ inline ( always ) ] pub fn halt ( & self ) -> HALT_R { HALT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 8:9 - Sample Point" ] # [ inline ( always ) ] pub fn smpl_pt ( & self ) -> SMPL_PT_R { SMPL_PT_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 12 - Disable Receive FIFO" ] # [ inline ( always ) ] pub fn dis_rxf ( & self ) -> DIS_RXF_R { DIS_RXF_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Disable Transmit FIFO" ] # [ inline ( always ) ] pub fn dis_txf ( & self ) -> DIS_TXF_R { DIS_TXF_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & self ) -> MDIS_R { MDIS_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Doze Enable" ] # [ inline ( always ) ] pub fn doze ( & self ) -> DOZE_R { DOZE_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis0 ( & self ) -> PCSIS0_R { PCSIS0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis1 ( & self ) -> PCSIS1_R { PCSIS1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis2 ( & self ) -> PCSIS2_R { PCSIS2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis3 ( & self ) -> PCSIS3_R { PCSIS3_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis4 ( & self ) -> PCSIS4_R { PCSIS4_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis5 ( & self ) -> PCSIS5_R { PCSIS5_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Receive FIFO Overflow Overwrite Enable" ] # [ inline ( always ) ] pub fn rooe ( & self ) -> ROOE_R { ROOE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Peripheral Chip Select Strobe Enable" ] # [ inline ( always ) ] pub fn pcsse ( & self ) -> PCSSE_R { PCSSE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Modified Transfer Format Enable" ] # [ inline ( always ) ] pub fn mtfe ( & self ) -> MTFE_R { MTFE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Freeze" ] # [ inline ( always ) ] pub fn frz ( & self ) -> FRZ_R { FRZ_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:29 - SPI Configuration." ] # [ inline ( always ) ] pub fn dconf ( & self ) -> DCONF_R { DCONF_R :: new ( ( ( self . bits >> 28 ) & 0x03 ) as u8 ) } # [ doc = "Bit 30 - Continuous SCK Enable" ] # [ inline ( always ) ] pub fn cont_scke ( & self ) -> CONT_SCKE_R { CONT_SCKE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Master/Slave Mode Select" ] # [ inline ( always ) ] pub fn mstr ( & self ) -> MSTR_R { MSTR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Halt" ] # [ inline ( always ) ] pub fn halt ( & mut self ) -> HALT_W { HALT_W { w : self } } # [ doc = "Bits 8:9 - Sample Point" ] # [ inline ( always ) ] pub fn smpl_pt ( & mut self ) -> SMPL_PT_W { SMPL_PT_W { w : self } } # [ doc = "Bit 10 - CLR_RXF" ] # [ inline ( always ) ] pub fn clr_rxf ( & mut self ) -> CLR_RXF_W { CLR_RXF_W { w : self } } # [ doc = "Bit 11 - Clear TX FIFO" ] # [ inline ( always ) ] pub fn clr_txf ( & mut self ) -> CLR_TXF_W { CLR_TXF_W { w : self } } # [ doc = "Bit 12 - Disable Receive FIFO" ] # [ inline ( always ) ] pub fn dis_rxf ( & mut self ) -> DIS_RXF_W { DIS_RXF_W { w : self } } # [ doc = "Bit 13 - Disable Transmit FIFO" ] # [ inline ( always ) ] pub fn dis_txf ( & mut self ) -> DIS_TXF_W { DIS_TXF_W { w : self } } # [ doc = "Bit 14 - Module Disable" ] # [ inline ( always ) ] pub fn mdis ( & mut self ) -> MDIS_W { MDIS_W { w : self } } # [ doc = "Bit 15 - Doze Enable" ] # [ inline ( always ) ] pub fn doze ( & mut self ) -> DOZE_W { DOZE_W { w : self } } # [ doc = "Bit 16 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis0 ( & mut self ) -> PCSIS0_W { PCSIS0_W { w : self } } # [ doc = "Bit 17 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis1 ( & mut self ) -> PCSIS1_W { PCSIS1_W { w : self } } # [ doc = "Bit 18 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis2 ( & mut self ) -> PCSIS2_W { PCSIS2_W { w : self } } # [ doc = "Bit 19 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis3 ( & mut self ) -> PCSIS3_W { PCSIS3_W { w : self } } # [ doc = "Bit 20 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis4 ( & mut self ) -> PCSIS4_W { PCSIS4_W { w : self } } # [ doc = "Bit 21 - Peripheral Chip Select x Inactive State" ] # [ inline ( always ) ] pub fn pcsis5 ( & mut self ) -> PCSIS5_W { PCSIS5_W { w : self } } # [ doc = "Bit 24 - Receive FIFO Overflow Overwrite Enable" ] # [ inline ( always ) ] pub fn rooe ( & mut self ) -> ROOE_W { ROOE_W { w : self } } # [ doc = "Bit 25 - Peripheral Chip Select Strobe Enable" ] # [ inline ( always ) ] pub fn pcsse ( & mut self ) -> PCSSE_W { PCSSE_W { w : self } } # [ doc = "Bit 26 - Modified Transfer Format Enable" ] # [ inline ( always ) ] pub fn mtfe ( & mut self ) -> MTFE_W { MTFE_W { w : self } } # [ doc = "Bit 27 - Freeze" ] # [ inline ( always ) ] pub fn frz ( & mut self ) -> FRZ_W { FRZ_W { w : self } } # [ doc = "Bit 30 - Continuous SCK Enable" ] # [ inline ( always ) ] pub fn cont_scke ( & mut self ) -> CONT_SCKE_W { CONT_SCKE_W { w : self } } # [ doc = "Bit 31 - Master/Slave Mode Select" ] # [ inline ( always ) ] pub fn mstr ( & mut self ) -> MSTR_W { MSTR_W { w : self } } } } # [ doc = "Transfer Count Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr](tcr) module" ] pub type TCR = crate :: Reg < u32 , _TCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR ; # [ doc = "`read()` method returns [tcr::R](tcr::R) reader structure" ] impl crate :: Readable for TCR { } # [ doc = "`write(|w| ..)` method takes [tcr::W](tcr::W) writer structure" ] impl crate :: Writable for TCR { } # [ doc = "Transfer Count Register" ] pub mod tcr { # [ doc = "Reader of register TCR" ] pub type R = crate :: R < u32 , super :: TCR > ; # [ doc = "Writer for register TCR" ] pub type W = crate :: W < u32 , super :: TCR > ; # [ doc = "Register TCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SPI_TCNT`" ] pub type SPI_TCNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `SPI_TCNT`" ] pub struct SPI_TCNT_W < 'a > { w : & 'a mut W , } impl < 'a > SPI_TCNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 16:31 - SPI Transfer Counter" ] # [ inline ( always ) ] pub fn spi_tcnt ( & self ) -> SPI_TCNT_R { SPI_TCNT_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 16:31 - SPI Transfer Counter" ] # [ inline ( always ) ] pub fn spi_tcnt ( & mut self ) -> SPI_TCNT_W { SPI_TCNT_W { w : self } } } } # [ doc = "Clock and Transfer Attributes Register (In Master Mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctar](ctar) module" ] pub type CTAR = crate :: Reg < u32 , _CTAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTAR ; # [ doc = "`read()` method returns [ctar::R](ctar::R) reader structure" ] impl crate :: Readable for CTAR { } # [ doc = "`write(|w| ..)` method takes [ctar::W](ctar::W) writer structure" ] impl crate :: Writable for CTAR { } # [ doc = "Clock and Transfer Attributes Register (In Master Mode)" ] pub mod ctar { # [ doc = "Reader of register CTAR%s" ] pub type R = crate :: R < u32 , super :: CTAR > ; # [ doc = "Writer for register CTAR%s" ] pub type W = crate :: W < u32 , super :: CTAR > ; # [ doc = "Register CTAR%s `reset()`'s with value 0x7800_0000" ] impl crate :: ResetValue for super :: CTAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7800_0000 } } # [ doc = "Reader of field `BR`" ] pub type BR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BR`" ] pub struct BR_W < 'a > { w : & 'a mut W , } impl < 'a > BR_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `DT`" ] pub type DT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DT`" ] pub struct DT_W < 'a > { w : & 'a mut W , } impl < 'a > DT_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } # [ doc = "Reader of field `ASC`" ] pub type ASC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ASC`" ] pub struct ASC_W < 'a > { w : & 'a mut W , } impl < 'a > ASC_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `CSSCK`" ] pub type CSSCK_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CSSCK`" ] pub struct CSSCK_W < 'a > { w : & 'a mut W , } impl < 'a > CSSCK_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 & ! ( 0x0f << 12 ) ) | ( ( ( value as u32 ) & 0x0f ) << 12 ) ; self . w } } # [ doc = "Baud Rate Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PBR_A { # [ doc = "0: Baud Rate Prescaler value is 2." ] _00 , # [ doc = "1: Baud Rate Prescaler value is 3." ] _01 , # [ doc = "2: Baud Rate Prescaler value is 5." ] _10 , # [ doc = "3: Baud Rate Prescaler value is 7." ] _11 } impl From < PBR_A > for u8 { # [ inline ( always ) ] fn from ( variant : PBR_A ) -> Self { match variant { PBR_A :: _00 => 0 , PBR_A :: _01 => 1 , PBR_A :: _10 => 2 , PBR_A :: _11 => 3 } } } # [ doc = "Reader of field `PBR`" ] pub type PBR_R = crate :: R < u8 , PBR_A > ; impl PBR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PBR_A { match self . bits { 0 => PBR_A :: _00 , 1 => PBR_A :: _01 , 2 => PBR_A :: _10 , 3 => PBR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PBR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PBR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PBR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PBR_A :: _11 } } # [ doc = "Write proxy for field `PBR`" ] pub struct PBR_W < 'a > { w : & 'a mut W , } impl < 'a > PBR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PBR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Baud Rate Prescaler value is 2." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _00 ) } # [ doc = "Baud Rate Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _01 ) } # [ doc = "Baud Rate Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _10 ) } # [ doc = "Baud Rate Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PBR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "Delay after Transfer Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDT_A { # [ doc = "0: Delay after Transfer Prescaler value is 1." ] _00 , # [ doc = "1: Delay after Transfer Prescaler value is 3." ] _01 , # [ doc = "2: Delay after Transfer Prescaler value is 5." ] _10 , # [ doc = "3: Delay after Transfer Prescaler value is 7." ] _11 } impl From < PDT_A > for u8 { # [ inline ( always ) ] fn from ( variant : PDT_A ) -> Self { match variant { PDT_A :: _00 => 0 , PDT_A :: _01 => 1 , PDT_A :: _10 => 2 , PDT_A :: _11 => 3 } } } # [ doc = "Reader of field `PDT`" ] pub type PDT_R = crate :: R < u8 , PDT_A > ; impl PDT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDT_A { match self . bits { 0 => PDT_A :: _00 , 1 => PDT_A :: _01 , 2 => PDT_A :: _10 , 3 => PDT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PDT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PDT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PDT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PDT_A :: _11 } } # [ doc = "Write proxy for field `PDT`" ] pub struct PDT_W < 'a > { w : & 'a mut W , } impl < 'a > PDT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay after Transfer Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _00 ) } # [ doc = "Delay after Transfer Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _01 ) } # [ doc = "Delay after Transfer Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _10 ) } # [ doc = "Delay after Transfer Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PDT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "After SCK Delay Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PASC_A { # [ doc = "0: Delay after Transfer Prescaler value is 1." ] _00 , # [ doc = "1: Delay after Transfer Prescaler value is 3." ] _01 , # [ doc = "2: Delay after Transfer Prescaler value is 5." ] _10 , # [ doc = "3: Delay after Transfer Prescaler value is 7." ] _11 } impl From < PASC_A > for u8 { # [ inline ( always ) ] fn from ( variant : PASC_A ) -> Self { match variant { PASC_A :: _00 => 0 , PASC_A :: _01 => 1 , PASC_A :: _10 => 2 , PASC_A :: _11 => 3 } } } # [ doc = "Reader of field `PASC`" ] pub type PASC_R = crate :: R < u8 , PASC_A > ; impl PASC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PASC_A { match self . bits { 0 => PASC_A :: _00 , 1 => PASC_A :: _01 , 2 => PASC_A :: _10 , 3 => PASC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PASC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PASC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PASC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PASC_A :: _11 } } # [ doc = "Write proxy for field `PASC`" ] pub struct PASC_W < 'a > { w : & 'a mut W , } impl < 'a > PASC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PASC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay after Transfer Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _00 ) } # [ doc = "Delay after Transfer Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _01 ) } # [ doc = "Delay after Transfer Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _10 ) } # [ doc = "Delay after Transfer Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PASC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "PCS to SCK Delay Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCSSCK_A { # [ doc = "0: PCS to SCK Prescaler value is 1." ] _00 , # [ doc = "1: PCS to SCK Prescaler value is 3." ] _01 , # [ doc = "2: PCS to SCK Prescaler value is 5." ] _10 , # [ doc = "3: PCS to SCK Prescaler value is 7." ] _11 } impl From < PCSSCK_A > for u8 { # [ inline ( always ) ] fn from ( variant : PCSSCK_A ) -> Self { match variant { PCSSCK_A :: _00 => 0 , PCSSCK_A :: _01 => 1 , PCSSCK_A :: _10 => 2 , PCSSCK_A :: _11 => 3 } } } # [ doc = "Reader of field `PCSSCK`" ] pub type PCSSCK_R = crate :: R < u8 , PCSSCK_A > ; impl PCSSCK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCSSCK_A { match self . bits { 0 => PCSSCK_A :: _00 , 1 => PCSSCK_A :: _01 , 2 => PCSSCK_A :: _10 , 3 => PCSSCK_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PCSSCK_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PCSSCK_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PCSSCK_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PCSSCK_A :: _11 } } # [ doc = "Write proxy for field `PCSSCK`" ] pub struct PCSSCK_W < 'a > { w : & 'a mut W , } impl < 'a > PCSSCK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCSSCK_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "PCS to SCK Prescaler value is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _00 ) } # [ doc = "PCS to SCK Prescaler value is 3." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _01 ) } # [ doc = "PCS to SCK Prescaler value is 5." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _10 ) } # [ doc = "PCS to SCK Prescaler value is 7." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PCSSCK_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } # [ doc = "LSB First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LSBFE_A { # [ doc = "0: Data is transferred MSB first." ] _0 , # [ doc = "1: Data is transferred LSB first." ] _1 } impl From < LSBFE_A > for bool { # [ inline ( always ) ] fn from ( variant : LSBFE_A ) -> Self { match variant { LSBFE_A :: _0 => false , LSBFE_A :: _1 => true } } } # [ doc = "Reader of field `LSBFE`" ] pub type LSBFE_R = crate :: R < bool , LSBFE_A > ; impl LSBFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LSBFE_A { match self . bits { false => LSBFE_A :: _0 , true => LSBFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LSBFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LSBFE_A :: _1 } } # [ doc = "Write proxy for field `LSBFE`" ] pub struct LSBFE_W < 'a > { w : & 'a mut W , } impl < 'a > LSBFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LSBFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is transferred MSB first." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LSBFE_A :: _0 ) } # [ doc = "Data is transferred LSB first." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LSBFE_A :: _1 ) } # [ 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 = "Clock Phase\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHA_A { # [ doc = "0: Data is captured on the leading edge of SCK and changed on the following edge." ] _0 , # [ doc = "1: Data is changed on the leading edge of SCK and captured on the following edge." ] _1 } impl From < CPHA_A > for bool { # [ inline ( always ) ] fn from ( variant : CPHA_A ) -> Self { match variant { CPHA_A :: _0 => false , CPHA_A :: _1 => true } } } # [ doc = "Reader of field `CPHA`" ] pub type CPHA_R = crate :: R < bool , CPHA_A > ; impl CPHA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPHA_A { match self . bits { false => CPHA_A :: _0 , true => CPHA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPHA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPHA_A :: _1 } } # [ doc = "Write proxy for field `CPHA`" ] pub struct CPHA_W < 'a > { w : & 'a mut W , } impl < 'a > CPHA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPHA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is captured on the leading edge of SCK and changed on the following edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _0 ) } # [ doc = "Data is changed on the leading edge of SCK and captured on the following edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _1 ) } # [ 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 = "Clock Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOL_A { # [ doc = "0: The inactive state value of SCK is low." ] _0 , # [ doc = "1: The inactive state value of SCK is high." ] _1 } impl From < CPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOL_A ) -> Self { match variant { CPOL_A :: _0 => false , CPOL_A :: _1 => true } } } # [ doc = "Reader of field `CPOL`" ] pub type CPOL_R = crate :: R < bool , CPOL_A > ; impl CPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOL_A { match self . bits { false => CPOL_A :: _0 , true => CPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOL_A :: _1 } } # [ doc = "Write proxy for field `CPOL`" ] pub struct CPOL_W < 'a > { w : & 'a mut W , } impl < 'a > CPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state value of SCK is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _0 ) } # [ doc = "The inactive state value of SCK is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _1 ) } # [ 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 = "Reader of field `FMSZ`" ] pub type FMSZ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FMSZ`" ] pub struct FMSZ_W < 'a > { w : & 'a mut W , } impl < 'a > FMSZ_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 & ! ( 0x0f << 27 ) ) | ( ( ( value as u32 ) & 0x0f ) << 27 ) ; self . w } } # [ doc = "Double Baud Rate\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBR_A { # [ doc = "0: The baud rate is computed normally with a 50/50 duty cycle." ] _0 , # [ doc = "1: The baud rate is doubled with the duty cycle depending on the Baud Rate Prescaler." ] _1 } impl From < DBR_A > for bool { # [ inline ( always ) ] fn from ( variant : DBR_A ) -> Self { match variant { DBR_A :: _0 => false , DBR_A :: _1 => true } } } # [ doc = "Reader of field `DBR`" ] pub type DBR_R = crate :: R < bool , DBR_A > ; impl DBR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBR_A { match self . bits { false => DBR_A :: _0 , true => DBR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBR_A :: _1 } } # [ doc = "Write proxy for field `DBR`" ] pub struct DBR_W < 'a > { w : & 'a mut W , } impl < 'a > DBR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The baud rate is computed normally with a 50/50 duty cycle." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DBR_A :: _0 ) } # [ doc = "The baud rate is doubled with the duty cycle depending on the Baud Rate Prescaler." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DBR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Baud Rate Scaler" ] # [ inline ( always ) ] pub fn br ( & self ) -> BR_R { BR_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Delay After Transfer Scaler" ] # [ inline ( always ) ] pub fn dt ( & self ) -> DT_R { DT_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - After SCK Delay Scaler" ] # [ inline ( always ) ] pub fn asc ( & self ) -> ASC_R { ASC_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - PCS to SCK Delay Scaler" ] # [ inline ( always ) ] pub fn cssck ( & self ) -> CSSCK_R { CSSCK_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:17 - Baud Rate Prescaler" ] # [ inline ( always ) ] pub fn pbr ( & self ) -> PBR_R { PBR_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - Delay after Transfer Prescaler" ] # [ inline ( always ) ] pub fn pdt ( & self ) -> PDT_R { PDT_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:21 - After SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pasc ( & self ) -> PASC_R { PASC_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bits 22:23 - PCS to SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pcssck ( & self ) -> PCSSCK_R { PCSSCK_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } # [ doc = "Bit 24 - LSB First" ] # [ inline ( always ) ] pub fn lsbfe ( & self ) -> LSBFE_R { LSBFE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & self ) -> CPHA_R { CPHA_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & self ) -> CPOL_R { CPOL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & self ) -> FMSZ_R { FMSZ_R :: new ( ( ( self . bits >> 27 ) & 0x0f ) as u8 ) } # [ doc = "Bit 31 - Double Baud Rate" ] # [ inline ( always ) ] pub fn dbr ( & self ) -> DBR_R { DBR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - Baud Rate Scaler" ] # [ inline ( always ) ] pub fn br ( & mut self ) -> BR_W { BR_W { w : self } } # [ doc = "Bits 4:7 - Delay After Transfer Scaler" ] # [ inline ( always ) ] pub fn dt ( & mut self ) -> DT_W { DT_W { w : self } } # [ doc = "Bits 8:11 - After SCK Delay Scaler" ] # [ inline ( always ) ] pub fn asc ( & mut self ) -> ASC_W { ASC_W { w : self } } # [ doc = "Bits 12:15 - PCS to SCK Delay Scaler" ] # [ inline ( always ) ] pub fn cssck ( & mut self ) -> CSSCK_W { CSSCK_W { w : self } } # [ doc = "Bits 16:17 - Baud Rate Prescaler" ] # [ inline ( always ) ] pub fn pbr ( & mut self ) -> PBR_W { PBR_W { w : self } } # [ doc = "Bits 18:19 - Delay after Transfer Prescaler" ] # [ inline ( always ) ] pub fn pdt ( & mut self ) -> PDT_W { PDT_W { w : self } } # [ doc = "Bits 20:21 - After SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pasc ( & mut self ) -> PASC_W { PASC_W { w : self } } # [ doc = "Bits 22:23 - PCS to SCK Delay Prescaler" ] # [ inline ( always ) ] pub fn pcssck ( & mut self ) -> PCSSCK_W { PCSSCK_W { w : self } } # [ doc = "Bit 24 - LSB First" ] # [ inline ( always ) ] pub fn lsbfe ( & mut self ) -> LSBFE_W { LSBFE_W { w : self } } # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & mut self ) -> CPHA_W { CPHA_W { w : self } } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & mut self ) -> CPOL_W { CPOL_W { w : self } } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & mut self ) -> FMSZ_W { FMSZ_W { w : self } } # [ doc = "Bit 31 - Double Baud Rate" ] # [ inline ( always ) ] pub fn dbr ( & mut self ) -> DBR_W { DBR_W { w : self } } } } # [ doc = "Clock and Transfer Attributes Register (In Slave Mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctar_slave](ctar_slave) module" ] pub type CTAR_SLAVE = crate :: Reg < u32 , _CTAR_SLAVE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTAR_SLAVE ; # [ doc = "`read()` method returns [ctar_slave::R](ctar_slave::R) reader structure" ] impl crate :: Readable for CTAR_SLAVE { } # [ doc = "`write(|w| ..)` method takes [ctar_slave::W](ctar_slave::W) writer structure" ] impl crate :: Writable for CTAR_SLAVE { } # [ doc = "Clock and Transfer Attributes Register (In Slave Mode)" ] pub mod ctar_slave { # [ doc = "Reader of register CTAR_SLAVE" ] pub type R = crate :: R < u32 , super :: CTAR_SLAVE > ; # [ doc = "Writer for register CTAR_SLAVE" ] pub type W = crate :: W < u32 , super :: CTAR_SLAVE > ; # [ doc = "Register CTAR_SLAVE `reset()`'s with value 0x7800_0000" ] impl crate :: ResetValue for super :: CTAR_SLAVE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7800_0000 } } # [ doc = "Clock Phase\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHA_A { # [ doc = "0: Data is captured on the leading edge of SCK and changed on the following edge." ] _0 , # [ doc = "1: Data is changed on the leading edge of SCK and captured on the following edge." ] _1 } impl From < CPHA_A > for bool { # [ inline ( always ) ] fn from ( variant : CPHA_A ) -> Self { match variant { CPHA_A :: _0 => false , CPHA_A :: _1 => true } } } # [ doc = "Reader of field `CPHA`" ] pub type CPHA_R = crate :: R < bool , CPHA_A > ; impl CPHA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPHA_A { match self . bits { false => CPHA_A :: _0 , true => CPHA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPHA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPHA_A :: _1 } } # [ doc = "Write proxy for field `CPHA`" ] pub struct CPHA_W < 'a > { w : & 'a mut W , } impl < 'a > CPHA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPHA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data is captured on the leading edge of SCK and changed on the following edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _0 ) } # [ doc = "Data is changed on the leading edge of SCK and captured on the following edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPHA_A :: _1 ) } # [ 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 = "Clock Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOL_A { # [ doc = "0: The inactive state value of SCK is low." ] _0 , # [ doc = "1: The inactive state value of SCK is high." ] _1 } impl From < CPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOL_A ) -> Self { match variant { CPOL_A :: _0 => false , CPOL_A :: _1 => true } } } # [ doc = "Reader of field `CPOL`" ] pub type CPOL_R = crate :: R < bool , CPOL_A > ; impl CPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOL_A { match self . bits { false => CPOL_A :: _0 , true => CPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOL_A :: _1 } } # [ doc = "Write proxy for field `CPOL`" ] pub struct CPOL_W < 'a > { w : & 'a mut W , } impl < 'a > CPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The inactive state value of SCK is low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _0 ) } # [ doc = "The inactive state value of SCK is high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPOL_A :: _1 ) } # [ 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 = "Reader of field `FMSZ`" ] pub type FMSZ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FMSZ`" ] pub struct FMSZ_W < 'a > { w : & 'a mut W , } impl < 'a > FMSZ_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 & ! ( 0x0f << 27 ) ) | ( ( ( value as u32 ) & 0x0f ) << 27 ) ; self . w } } impl R { # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & self ) -> CPHA_R { CPHA_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & self ) -> CPOL_R { CPOL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & self ) -> FMSZ_R { FMSZ_R :: new ( ( ( self . bits >> 27 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 25 - Clock Phase" ] # [ inline ( always ) ] pub fn cpha ( & mut self ) -> CPHA_W { CPHA_W { w : self } } # [ doc = "Bit 26 - Clock Polarity" ] # [ inline ( always ) ] pub fn cpol ( & mut self ) -> CPOL_W { CPOL_W { w : self } } # [ doc = "Bits 27:30 - Frame Size" ] # [ inline ( always ) ] pub fn fmsz ( & mut self ) -> FMSZ_W { FMSZ_W { w : self } } } } # [ doc = "Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sr](sr) module" ] pub type SR = crate :: Reg < u32 , _SR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SR ; # [ doc = "`read()` method returns [sr::R](sr::R) reader structure" ] impl crate :: Readable for SR { } # [ doc = "`write(|w| ..)` method takes [sr::W](sr::W) writer structure" ] impl crate :: Writable for SR { } # [ doc = "Status Register" ] pub mod sr { # [ doc = "Reader of register SR" ] pub type R = crate :: R < u32 , super :: SR > ; # [ doc = "Writer for register SR" ] pub type W = crate :: W < u32 , super :: SR > ; # [ doc = "Register SR `reset()`'s with value 0x0200_0000" ] impl crate :: ResetValue for super :: SR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0200_0000 } } # [ doc = "Reader of field `POPNXTPTR`" ] pub type POPNXTPTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `RXCTR`" ] pub type RXCTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TXNXTPTR`" ] pub type TXNXTPTR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TXCTR`" ] pub type TXCTR_R = crate :: R < u8 , u8 > ; # [ doc = "Receive FIFO Drain Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_A { # [ doc = "0: RX FIFO is empty." ] _0 , # [ doc = "1: RX FIFO is not empty." ] _1 } impl From < RFDF_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_A ) -> Self { match variant { RFDF_A :: _0 => false , RFDF_A :: _1 => true } } } # [ doc = "Reader of field `RFDF`" ] pub type RFDF_R = crate :: R < bool , RFDF_A > ; impl RFDF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_A { match self . bits { false => RFDF_A :: _0 , true => RFDF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_A :: _1 } } # [ doc = "Write proxy for field `RFDF`" ] pub struct RFDF_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RX FIFO is empty." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_A :: _0 ) } # [ doc = "RX FIFO is not empty." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Receive FIFO Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFOF_A { # [ doc = "0: No Rx FIFO overflow." ] _0 , # [ doc = "1: Rx FIFO overflow has occurred." ] _1 } impl From < RFOF_A > for bool { # [ inline ( always ) ] fn from ( variant : RFOF_A ) -> Self { match variant { RFOF_A :: _0 => false , RFOF_A :: _1 => true } } } # [ doc = "Reader of field `RFOF`" ] pub type RFOF_R = crate :: R < bool , RFOF_A > ; impl RFOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFOF_A { match self . bits { false => RFOF_A :: _0 , true => RFOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFOF_A :: _1 } } # [ doc = "Write proxy for field `RFOF`" ] pub struct RFOF_W < 'a > { w : & 'a mut W , } impl < 'a > RFOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No Rx FIFO overflow." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFOF_A :: _0 ) } # [ doc = "Rx FIFO overflow has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFOF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Transmit FIFO Fill Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_A { # [ doc = "0: TX FIFO is full." ] _0 , # [ doc = "1: TX FIFO is not full." ] _1 } impl From < TFFF_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_A ) -> Self { match variant { TFFF_A :: _0 => false , TFFF_A :: _1 => true } } } # [ doc = "Reader of field `TFFF`" ] pub type TFFF_R = crate :: R < bool , TFFF_A > ; impl TFFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_A { match self . bits { false => TFFF_A :: _0 , true => TFFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_A :: _1 } } # [ doc = "Write proxy for field `TFFF`" ] pub struct TFFF_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TX FIFO is full." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_A :: _0 ) } # [ doc = "TX FIFO is not full." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_A :: _1 ) } # [ 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 = "Transmit FIFO Underflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFUF_A { # [ doc = "0: No TX FIFO underflow." ] _0 , # [ doc = "1: TX FIFO underflow has occurred." ] _1 } impl From < TFUF_A > for bool { # [ inline ( always ) ] fn from ( variant : TFUF_A ) -> Self { match variant { TFUF_A :: _0 => false , TFUF_A :: _1 => true } } } # [ doc = "Reader of field `TFUF`" ] pub type TFUF_R = crate :: R < bool , TFUF_A > ; impl TFUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFUF_A { match self . bits { false => TFUF_A :: _0 , true => TFUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFUF_A :: _1 } } # [ doc = "Write proxy for field `TFUF`" ] pub struct TFUF_W < 'a > { w : & 'a mut W , } impl < 'a > TFUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No TX FIFO underflow." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFUF_A :: _0 ) } # [ doc = "TX FIFO underflow has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFUF_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "End of Queue Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQF_A { # [ doc = "0: EOQ is not set in the executing command." ] _0 , # [ doc = "1: EOQ is set in the executing SPI command." ] _1 } impl From < EOQF_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQF_A ) -> Self { match variant { EOQF_A :: _0 => false , EOQF_A :: _1 => true } } } # [ doc = "Reader of field `EOQF`" ] pub type EOQF_R = crate :: R < bool , EOQF_A > ; impl EOQF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQF_A { match self . bits { false => EOQF_A :: _0 , true => EOQF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQF_A :: _1 } } # [ doc = "Write proxy for field `EOQF`" ] pub struct EOQF_W < 'a > { w : & 'a mut W , } impl < 'a > EOQF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "EOQ is not set in the executing command." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQF_A :: _0 ) } # [ doc = "EOQ is set in the executing SPI command." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQF_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "TX and RX Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRXS_A { # [ doc = "0: Transmit and receive operations are disabled (The module is in Stopped state)." ] _0 , # [ doc = "1: Transmit and receive operations are enabled (The module is in Running state)." ] _1 } impl From < TXRXS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRXS_A ) -> Self { match variant { TXRXS_A :: _0 => false , TXRXS_A :: _1 => true } } } # [ doc = "Reader of field `TXRXS`" ] pub type TXRXS_R = crate :: R < bool , TXRXS_A > ; impl TXRXS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRXS_A { match self . bits { false => TXRXS_A :: _0 , true => TXRXS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRXS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRXS_A :: _1 } } # [ doc = "Write proxy for field `TXRXS`" ] pub struct TXRXS_W < 'a > { w : & 'a mut W , } impl < 'a > TXRXS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRXS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit and receive operations are disabled (The module is in Stopped state)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRXS_A :: _0 ) } # [ doc = "Transmit and receive operations are enabled (The module is in Running state)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRXS_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Transfer Complete Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_A { # [ doc = "0: Transfer not complete." ] _0 , # [ doc = "1: Transfer complete." ] _1 } impl From < TCF_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_A ) -> Self { match variant { TCF_A :: _0 => false , TCF_A :: _1 => true } } } # [ doc = "Reader of field `TCF`" ] pub type TCF_R = crate :: R < bool , TCF_A > ; impl TCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_A { match self . bits { false => TCF_A :: _0 , true => TCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_A :: _1 } } # [ doc = "Write proxy for field `TCF`" ] pub struct TCF_W < 'a > { w : & 'a mut W , } impl < 'a > TCF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transfer not complete." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCF_A :: _0 ) } # [ doc = "Transfer complete." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCF_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Pop Next Pointer" ] # [ inline ( always ) ] pub fn popnxtptr ( & self ) -> POPNXTPTR_R { POPNXTPTR_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - RX FIFO Counter" ] # [ inline ( always ) ] pub fn rxctr ( & self ) -> RXCTR_R { RXCTR_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Transmit Next Pointer" ] # [ inline ( always ) ] pub fn txnxtptr ( & self ) -> TXNXTPTR_R { TXNXTPTR_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - TX FIFO Counter" ] # [ inline ( always ) ] pub fn txctr ( & self ) -> TXCTR_R { TXCTR_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bit 17 - Receive FIFO Drain Flag" ] # [ inline ( always ) ] pub fn rfdf ( & self ) -> RFDF_R { RFDF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Receive FIFO Overflow Flag" ] # [ inline ( always ) ] pub fn rfof ( & self ) -> RFOF_R { RFOF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Transmit FIFO Fill Flag" ] # [ inline ( always ) ] pub fn tfff ( & self ) -> TFFF_R { TFFF_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Transmit FIFO Underflow Flag" ] # [ inline ( always ) ] pub fn tfuf ( & self ) -> TFUF_R { TFUF_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - End of Queue Flag" ] # [ inline ( always ) ] pub fn eoqf ( & self ) -> EOQF_R { EOQF_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - TX and RX Status" ] # [ inline ( always ) ] pub fn txrxs ( & self ) -> TXRXS_R { TXRXS_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & self ) -> TCF_R { TCF_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 17 - Receive FIFO Drain Flag" ] # [ inline ( always ) ] pub fn rfdf ( & mut self ) -> RFDF_W { RFDF_W { w : self } } # [ doc = "Bit 19 - Receive FIFO Overflow Flag" ] # [ inline ( always ) ] pub fn rfof ( & mut self ) -> RFOF_W { RFOF_W { w : self } } # [ doc = "Bit 25 - Transmit FIFO Fill Flag" ] # [ inline ( always ) ] pub fn tfff ( & mut self ) -> TFFF_W { TFFF_W { w : self } } # [ doc = "Bit 27 - Transmit FIFO Underflow Flag" ] # [ inline ( always ) ] pub fn tfuf ( & mut self ) -> TFUF_W { TFUF_W { w : self } } # [ doc = "Bit 28 - End of Queue Flag" ] # [ inline ( always ) ] pub fn eoqf ( & mut self ) -> EOQF_W { EOQF_W { w : self } } # [ doc = "Bit 30 - TX and RX Status" ] # [ inline ( always ) ] pub fn txrxs ( & mut self ) -> TXRXS_W { TXRXS_W { w : self } } # [ doc = "Bit 31 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & mut self ) -> TCF_W { TCF_W { w : self } } } } # [ doc = "DMA/Interrupt Request Select and Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rser](rser) module" ] pub type RSER = crate :: Reg < u32 , _RSER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RSER ; # [ doc = "`read()` method returns [rser::R](rser::R) reader structure" ] impl crate :: Readable for RSER { } # [ doc = "`write(|w| ..)` method takes [rser::W](rser::W) writer structure" ] impl crate :: Writable for RSER { } # [ doc = "DMA/Interrupt Request Select and Enable Register" ] pub mod rser { # [ doc = "Reader of register RSER" ] pub type R = crate :: R < u32 , super :: RSER > ; # [ doc = "Writer for register RSER" ] pub type W = crate :: W < u32 , super :: RSER > ; # [ doc = "Register RSER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RSER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO Drain DMA or Interrupt Request Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_DIRS_A { # [ doc = "0: Interrupt request." ] _0 , # [ doc = "1: DMA request." ] _1 } impl From < RFDF_DIRS_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_DIRS_A ) -> Self { match variant { RFDF_DIRS_A :: _0 => false , RFDF_DIRS_A :: _1 => true } } } # [ doc = "Reader of field `RFDF_DIRS`" ] pub type RFDF_DIRS_R = crate :: R < bool , RFDF_DIRS_A > ; impl RFDF_DIRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_DIRS_A { match self . bits { false => RFDF_DIRS_A :: _0 , true => RFDF_DIRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_DIRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_DIRS_A :: _1 } } # [ doc = "Write proxy for field `RFDF_DIRS`" ] pub struct RFDF_DIRS_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_DIRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_DIRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_DIRS_A :: _0 ) } # [ doc = "DMA request." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_DIRS_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Receive FIFO Drain Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFDF_RE_A { # [ doc = "0: RFDF interrupt or DMA requests are disabled." ] _0 , # [ doc = "1: RFDF interrupt or DMA requests are enabled." ] _1 } impl From < RFDF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RFDF_RE_A ) -> Self { match variant { RFDF_RE_A :: _0 => false , RFDF_RE_A :: _1 => true } } } # [ doc = "Reader of field `RFDF_RE`" ] pub type RFDF_RE_R = crate :: R < bool , RFDF_RE_A > ; impl RFDF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFDF_RE_A { match self . bits { false => RFDF_RE_A :: _0 , true => RFDF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFDF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFDF_RE_A :: _1 } } # [ doc = "Write proxy for field `RFDF_RE`" ] pub struct RFDF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > RFDF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFDF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RFDF interrupt or DMA requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFDF_RE_A :: _0 ) } # [ doc = "RFDF interrupt or DMA requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFDF_RE_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Receive FIFO Overflow Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RFOF_RE_A { # [ doc = "0: RFOF interrupt requests are disabled." ] _0 , # [ doc = "1: RFOF interrupt requests are enabled." ] _1 } impl From < RFOF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RFOF_RE_A ) -> Self { match variant { RFOF_RE_A :: _0 => false , RFOF_RE_A :: _1 => true } } } # [ doc = "Reader of field `RFOF_RE`" ] pub type RFOF_RE_R = crate :: R < bool , RFOF_RE_A > ; impl RFOF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RFOF_RE_A { match self . bits { false => RFOF_RE_A :: _0 , true => RFOF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RFOF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RFOF_RE_A :: _1 } } # [ doc = "Write proxy for field `RFOF_RE`" ] pub struct RFOF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > RFOF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RFOF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RFOF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RFOF_RE_A :: _0 ) } # [ doc = "RFOF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RFOF_RE_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Transmit FIFO Fill DMA or Interrupt Request Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_DIRS_A { # [ doc = "0: TFFF flag generates interrupt requests." ] _0 , # [ doc = "1: TFFF flag generates DMA requests." ] _1 } impl From < TFFF_DIRS_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_DIRS_A ) -> Self { match variant { TFFF_DIRS_A :: _0 => false , TFFF_DIRS_A :: _1 => true } } } # [ doc = "Reader of field `TFFF_DIRS`" ] pub type TFFF_DIRS_R = crate :: R < bool , TFFF_DIRS_A > ; impl TFFF_DIRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_DIRS_A { match self . bits { false => TFFF_DIRS_A :: _0 , true => TFFF_DIRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_DIRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_DIRS_A :: _1 } } # [ doc = "Write proxy for field `TFFF_DIRS`" ] pub struct TFFF_DIRS_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_DIRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_DIRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFFF flag generates interrupt requests." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_DIRS_A :: _0 ) } # [ doc = "TFFF flag generates DMA requests." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_DIRS_A :: _1 ) } # [ 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 = "Transmit FIFO Fill Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFFF_RE_A { # [ doc = "0: TFFF interrupts or DMA requests are disabled." ] _0 , # [ doc = "1: TFFF interrupts or DMA requests are enabled." ] _1 } impl From < TFFF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TFFF_RE_A ) -> Self { match variant { TFFF_RE_A :: _0 => false , TFFF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TFFF_RE`" ] pub type TFFF_RE_R = crate :: R < bool , TFFF_RE_A > ; impl TFFF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFFF_RE_A { match self . bits { false => TFFF_RE_A :: _0 , true => TFFF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFFF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFFF_RE_A :: _1 } } # [ doc = "Write proxy for field `TFFF_RE`" ] pub struct TFFF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TFFF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFFF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFFF interrupts or DMA requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFFF_RE_A :: _0 ) } # [ doc = "TFFF interrupts or DMA requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFFF_RE_A :: _1 ) } # [ 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 = "Transmit FIFO Underflow Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFUF_RE_A { # [ doc = "0: TFUF interrupt requests are disabled." ] _0 , # [ doc = "1: TFUF interrupt requests are enabled." ] _1 } impl From < TFUF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TFUF_RE_A ) -> Self { match variant { TFUF_RE_A :: _0 => false , TFUF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TFUF_RE`" ] pub type TFUF_RE_R = crate :: R < bool , TFUF_RE_A > ; impl TFUF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFUF_RE_A { match self . bits { false => TFUF_RE_A :: _0 , true => TFUF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFUF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFUF_RE_A :: _1 } } # [ doc = "Write proxy for field `TFUF_RE`" ] pub struct TFUF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TFUF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFUF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TFUF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFUF_RE_A :: _0 ) } # [ doc = "TFUF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFUF_RE_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Finished Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQF_RE_A { # [ doc = "0: EOQF interrupt requests are disabled." ] _0 , # [ doc = "1: EOQF interrupt requests are enabled." ] _1 } impl From < EOQF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQF_RE_A ) -> Self { match variant { EOQF_RE_A :: _0 => false , EOQF_RE_A :: _1 => true } } } # [ doc = "Reader of field `EOQF_RE`" ] pub type EOQF_RE_R = crate :: R < bool , EOQF_RE_A > ; impl EOQF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQF_RE_A { match self . bits { false => EOQF_RE_A :: _0 , true => EOQF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQF_RE_A :: _1 } } # [ doc = "Write proxy for field `EOQF_RE`" ] pub struct EOQF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > EOQF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "EOQF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQF_RE_A :: _0 ) } # [ doc = "EOQF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQF_RE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Transmission Complete Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_RE_A { # [ doc = "0: TCF interrupt requests are disabled." ] _0 , # [ doc = "1: TCF interrupt requests are enabled." ] _1 } impl From < TCF_RE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_RE_A ) -> Self { match variant { TCF_RE_A :: _0 => false , TCF_RE_A :: _1 => true } } } # [ doc = "Reader of field `TCF_RE`" ] pub type TCF_RE_R = crate :: R < bool , TCF_RE_A > ; impl TCF_RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_RE_A { match self . bits { false => TCF_RE_A :: _0 , true => TCF_RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_RE_A :: _1 } } # [ doc = "Write proxy for field `TCF_RE`" ] pub struct TCF_RE_W < 'a > { w : & 'a mut W , } impl < 'a > TCF_RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCF_RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TCF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCF_RE_A :: _0 ) } # [ doc = "TCF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCF_RE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 16 - Receive FIFO Drain DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn rfdf_dirs ( & self ) -> RFDF_DIRS_R { RFDF_DIRS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Receive FIFO Drain Request Enable" ] # [ inline ( always ) ] pub fn rfdf_re ( & self ) -> RFDF_RE_R { RFDF_RE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Receive FIFO Overflow Request Enable" ] # [ inline ( always ) ] pub fn rfof_re ( & self ) -> RFOF_RE_R { RFOF_RE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Transmit FIFO Fill DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn tfff_dirs ( & self ) -> TFFF_DIRS_R { TFFF_DIRS_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Transmit FIFO Fill Request Enable" ] # [ inline ( always ) ] pub fn tfff_re ( & self ) -> TFFF_RE_R { TFFF_RE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Transmit FIFO Underflow Request Enable" ] # [ inline ( always ) ] pub fn tfuf_re ( & self ) -> TFUF_RE_R { TFUF_RE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Finished Request Enable" ] # [ inline ( always ) ] pub fn eoqf_re ( & self ) -> EOQF_RE_R { EOQF_RE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Transmission Complete Request Enable" ] # [ inline ( always ) ] pub fn tcf_re ( & self ) -> TCF_RE_R { TCF_RE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 16 - Receive FIFO Drain DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn rfdf_dirs ( & mut self ) -> RFDF_DIRS_W { RFDF_DIRS_W { w : self } } # [ doc = "Bit 17 - Receive FIFO Drain Request Enable" ] # [ inline ( always ) ] pub fn rfdf_re ( & mut self ) -> RFDF_RE_W { RFDF_RE_W { w : self } } # [ doc = "Bit 19 - Receive FIFO Overflow Request Enable" ] # [ inline ( always ) ] pub fn rfof_re ( & mut self ) -> RFOF_RE_W { RFOF_RE_W { w : self } } # [ doc = "Bit 24 - Transmit FIFO Fill DMA or Interrupt Request Select" ] # [ inline ( always ) ] pub fn tfff_dirs ( & mut self ) -> TFFF_DIRS_W { TFFF_DIRS_W { w : self } } # [ doc = "Bit 25 - Transmit FIFO Fill Request Enable" ] # [ inline ( always ) ] pub fn tfff_re ( & mut self ) -> TFFF_RE_W { TFFF_RE_W { w : self } } # [ doc = "Bit 27 - Transmit FIFO Underflow Request Enable" ] # [ inline ( always ) ] pub fn tfuf_re ( & mut self ) -> TFUF_RE_W { TFUF_RE_W { w : self } } # [ doc = "Bit 28 - Finished Request Enable" ] # [ inline ( always ) ] pub fn eoqf_re ( & mut self ) -> EOQF_RE_W { EOQF_RE_W { w : self } } # [ doc = "Bit 31 - Transmission Complete Request Enable" ] # [ inline ( always ) ] pub fn tcf_re ( & mut self ) -> TCF_RE_W { TCF_RE_W { w : self } } } } # [ doc = "PUSH TX FIFO Register In Master Mode\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pushr](pushr) module" ] pub type PUSHR = crate :: Reg < u32 , _PUSHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PUSHR ; # [ doc = "`read()` method returns [pushr::R](pushr::R) reader structure" ] impl crate :: Readable for PUSHR { } # [ doc = "`write(|w| ..)` method takes [pushr::W](pushr::W) writer structure" ] impl crate :: Writable for PUSHR { } # [ doc = "PUSH TX FIFO Register In Master Mode" ] pub mod pushr { # [ doc = "Reader of register PUSHR" ] pub type R = crate :: R < u32 , super :: PUSHR > ; # [ doc = "Writer for register PUSHR" ] pub type W = crate :: W < u32 , super :: PUSHR > ; # [ doc = "Register PUSHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PUSHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TXDATA`" ] pub struct TXDATA_W < 'a > { w : & 'a mut W , } impl < 'a > TXDATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS0_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS0_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS0_A ) -> Self { match variant { PCS0_A :: _0 => false , PCS0_A :: _1 => true } } } # [ doc = "Reader of field `PCS0`" ] pub type PCS0_R = crate :: R < bool , PCS0_A > ; impl PCS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS0_A { match self . bits { false => PCS0_A :: _0 , true => PCS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS0_A :: _1 } } # [ doc = "Write proxy for field `PCS0`" ] pub struct PCS0_W < 'a > { w : & 'a mut W , } impl < 'a > PCS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS0_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS1_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS1_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS1_A ) -> Self { match variant { PCS1_A :: _0 => false , PCS1_A :: _1 => true } } } # [ doc = "Reader of field `PCS1`" ] pub type PCS1_R = crate :: R < bool , PCS1_A > ; impl PCS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS1_A { match self . bits { false => PCS1_A :: _0 , true => PCS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS1_A :: _1 } } # [ doc = "Write proxy for field `PCS1`" ] pub struct PCS1_W < 'a > { w : & 'a mut W , } impl < 'a > PCS1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS1_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS2_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS2_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS2_A ) -> Self { match variant { PCS2_A :: _0 => false , PCS2_A :: _1 => true } } } # [ doc = "Reader of field `PCS2`" ] pub type PCS2_R = crate :: R < bool , PCS2_A > ; impl PCS2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS2_A { match self . bits { false => PCS2_A :: _0 , true => PCS2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS2_A :: _1 } } # [ doc = "Write proxy for field `PCS2`" ] pub struct PCS2_W < 'a > { w : & 'a mut W , } impl < 'a > PCS2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS2_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS3_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS3_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS3_A ) -> Self { match variant { PCS3_A :: _0 => false , PCS3_A :: _1 => true } } } # [ doc = "Reader of field `PCS3`" ] pub type PCS3_R = crate :: R < bool , PCS3_A > ; impl PCS3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS3_A { match self . bits { false => PCS3_A :: _0 , true => PCS3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS3_A :: _1 } } # [ doc = "Write proxy for field `PCS3`" ] pub struct PCS3_W < 'a > { w : & 'a mut W , } impl < 'a > PCS3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS3_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS3_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS4_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS4_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS4_A ) -> Self { match variant { PCS4_A :: _0 => false , PCS4_A :: _1 => true } } } # [ doc = "Reader of field `PCS4`" ] pub type PCS4_R = crate :: R < bool , PCS4_A > ; impl PCS4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS4_A { match self . bits { false => PCS4_A :: _0 , true => PCS4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS4_A :: _1 } } # [ doc = "Write proxy for field `PCS4`" ] pub struct PCS4_W < 'a > { w : & 'a mut W , } impl < 'a > PCS4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS4_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS4_A :: _1 ) } # [ 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 = "Select which PCS signals are to be asserted for the transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS5_A { # [ doc = "0: Negate the PCS\\[x\\] signal." ] _0 , # [ doc = "1: Assert the PCS\\[x\\] signal." ] _1 } impl From < PCS5_A > for bool { # [ inline ( always ) ] fn from ( variant : PCS5_A ) -> Self { match variant { PCS5_A :: _0 => false , PCS5_A :: _1 => true } } } # [ doc = "Reader of field `PCS5`" ] pub type PCS5_R = crate :: R < bool , PCS5_A > ; impl PCS5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS5_A { match self . bits { false => PCS5_A :: _0 , true => PCS5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCS5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCS5_A :: _1 } } # [ doc = "Write proxy for field `PCS5`" ] pub struct PCS5_W < 'a > { w : & 'a mut W , } impl < 'a > PCS5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Negate the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCS5_A :: _0 ) } # [ doc = "Assert the PCS\\[x\\] signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCS5_A :: _1 ) } # [ 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 = "Clear Transfer Counter\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTCNT_A { # [ doc = "0: Do not clear the TCR\\[TCNT\\] field." ] _0 , # [ doc = "1: Clear the TCR\\[TCNT\\] field." ] _1 } impl From < CTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : CTCNT_A ) -> Self { match variant { CTCNT_A :: _0 => false , CTCNT_A :: _1 => true } } } # [ doc = "Reader of field `CTCNT`" ] pub type CTCNT_R = crate :: R < bool , CTCNT_A > ; impl CTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CTCNT_A { match self . bits { false => CTCNT_A :: _0 , true => CTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CTCNT_A :: _1 } } # [ doc = "Write proxy for field `CTCNT`" ] pub struct CTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > CTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the TCR\\[TCNT\\] field." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CTCNT_A :: _0 ) } # [ doc = "Clear the TCR\\[TCNT\\] field." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CTCNT_A :: _1 ) } # [ 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 = "End Of Queue\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOQ_A { # [ doc = "0: The SPI data is not the last data to transfer." ] _0 , # [ doc = "1: The SPI data is the last data to transfer." ] _1 } impl From < EOQ_A > for bool { # [ inline ( always ) ] fn from ( variant : EOQ_A ) -> Self { match variant { EOQ_A :: _0 => false , EOQ_A :: _1 => true } } } # [ doc = "Reader of field `EOQ`" ] pub type EOQ_R = crate :: R < bool , EOQ_A > ; impl EOQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOQ_A { match self . bits { false => EOQ_A :: _0 , true => EOQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOQ_A :: _1 } } # [ doc = "Write proxy for field `EOQ`" ] pub struct EOQ_W < 'a > { w : & 'a mut W , } impl < 'a > EOQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The SPI data is not the last data to transfer." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOQ_A :: _0 ) } # [ doc = "The SPI data is the last data to transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOQ_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Clock and Transfer Attributes Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTAS_A { # [ doc = "0: CTAR0" ] _000 , # [ doc = "1: CTAR1" ] _001 } impl From < CTAS_A > for u8 { # [ inline ( always ) ] fn from ( variant : CTAS_A ) -> Self { match variant { CTAS_A :: _000 => 0 , CTAS_A :: _001 => 1 } } } # [ doc = "Reader of field `CTAS`" ] pub type CTAS_R = crate :: R < u8 , CTAS_A > ; impl CTAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CTAS_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CTAS_A :: _000 ) , 1 => Val ( CTAS_A :: _001 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == CTAS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == CTAS_A :: _001 } } # [ doc = "Write proxy for field `CTAS`" ] pub struct CTAS_W < 'a > { w : & 'a mut W , } impl < 'a > CTAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTAS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "CTAR0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( CTAS_A :: _000 ) } # [ doc = "CTAR1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( CTAS_A :: _001 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x07 ) << 28 ) ; self . w } } # [ doc = "Continuous Peripheral Chip Select Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CONT_A { # [ doc = "0: Return PCSn signals to their inactive state between transfers." ] _0 , # [ doc = "1: Keep PCSn signals asserted between transfers." ] _1 } impl From < CONT_A > for bool { # [ inline ( always ) ] fn from ( variant : CONT_A ) -> Self { match variant { CONT_A :: _0 => false , CONT_A :: _1 => true } } } # [ doc = "Reader of field `CONT`" ] pub type CONT_R = crate :: R < bool , CONT_A > ; impl CONT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CONT_A { match self . bits { false => CONT_A :: _0 , true => CONT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CONT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CONT_A :: _1 } } # [ doc = "Write proxy for field `CONT`" ] pub struct CONT_W < 'a > { w : & 'a mut W , } impl < 'a > CONT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CONT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Return PCSn signals to their inactive state between transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CONT_A :: _0 ) } # [ doc = "Keep PCSn signals asserted between transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CONT_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bit 16 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs0 ( & self ) -> PCS0_R { PCS0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs1 ( & self ) -> PCS1_R { PCS1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs2 ( & self ) -> PCS2_R { PCS2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs3 ( & self ) -> PCS3_R { PCS3_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs4 ( & self ) -> PCS4_R { PCS4_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs5 ( & self ) -> PCS5_R { PCS5_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Clear Transfer Counter" ] # [ inline ( always ) ] pub fn ctcnt ( & self ) -> CTCNT_R { CTCNT_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - End Of Queue" ] # [ inline ( always ) ] pub fn eoq ( & self ) -> EOQ_R { EOQ_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:30 - Clock and Transfer Attributes Select" ] # [ inline ( always ) ] pub fn ctas ( & self ) -> CTAS_R { CTAS_R :: new ( ( ( self . bits >> 28 ) & 0x07 ) as u8 ) } # [ doc = "Bit 31 - Continuous Peripheral Chip Select Enable" ] # [ inline ( always ) ] pub fn cont ( & self ) -> CONT_R { CONT_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & mut self ) -> TXDATA_W { TXDATA_W { w : self } } # [ doc = "Bit 16 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs0 ( & mut self ) -> PCS0_W { PCS0_W { w : self } } # [ doc = "Bit 17 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs1 ( & mut self ) -> PCS1_W { PCS1_W { w : self } } # [ doc = "Bit 18 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs2 ( & mut self ) -> PCS2_W { PCS2_W { w : self } } # [ doc = "Bit 19 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs3 ( & mut self ) -> PCS3_W { PCS3_W { w : self } } # [ doc = "Bit 20 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs4 ( & mut self ) -> PCS4_W { PCS4_W { w : self } } # [ doc = "Bit 21 - Select which PCS signals are to be asserted for the transfer" ] # [ inline ( always ) ] pub fn pcs5 ( & mut self ) -> PCS5_W { PCS5_W { w : self } } # [ doc = "Bit 26 - Clear Transfer Counter" ] # [ inline ( always ) ] pub fn ctcnt ( & mut self ) -> CTCNT_W { CTCNT_W { w : self } } # [ doc = "Bit 27 - End Of Queue" ] # [ inline ( always ) ] pub fn eoq ( & mut self ) -> EOQ_W { EOQ_W { w : self } } # [ doc = "Bits 28:30 - Clock and Transfer Attributes Select" ] # [ inline ( always ) ] pub fn ctas ( & mut self ) -> CTAS_W { CTAS_W { w : self } } # [ doc = "Bit 31 - Continuous Peripheral Chip Select Enable" ] # [ inline ( always ) ] pub fn cont ( & mut self ) -> CONT_W { CONT_W { w : self } } } } # [ doc = "PUSH TX FIFO Register In Slave Mode\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pushr_slave](pushr_slave) module" ] pub type PUSHR_SLAVE = crate :: Reg < u32 , _PUSHR_SLAVE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PUSHR_SLAVE ; # [ doc = "`read()` method returns [pushr_slave::R](pushr_slave::R) reader structure" ] impl crate :: Readable for PUSHR_SLAVE { } # [ doc = "`write(|w| ..)` method takes [pushr_slave::W](pushr_slave::W) writer structure" ] impl crate :: Writable for PUSHR_SLAVE { } # [ doc = "PUSH TX FIFO Register In Slave Mode" ] pub mod pushr_slave { # [ doc = "Reader of register PUSHR_SLAVE" ] pub type R = crate :: R < u32 , super :: PUSHR_SLAVE > ; # [ doc = "Writer for register PUSHR_SLAVE" ] pub type W = crate :: W < u32 , super :: PUSHR_SLAVE > ; # [ doc = "Register PUSHR_SLAVE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PUSHR_SLAVE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `TXDATA`" ] pub struct TXDATA_W < 'a > { w : & 'a mut W , } impl < 'a > TXDATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & mut self ) -> TXDATA_W { TXDATA_W { w : self } } } } # [ doc = "POP RX FIFO Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [popr](popr) module" ] pub type POPR = crate :: Reg < u32 , _POPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POPR ; # [ doc = "`read()` method returns [popr::R](popr::R) reader structure" ] impl crate :: Readable for POPR { } # [ doc = "POP RX FIFO Register" ] pub mod popr { # [ doc = "Reader of register POPR" ] pub type R = crate :: R < u32 , super :: POPR > ; # [ doc = "Reader of field `RXDATA`" ] pub type RXDATA_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Received Data" ] # [ inline ( always ) ] pub fn rxdata ( & self ) -> RXDATA_R { RXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Transmit FIFO Registers\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [txfr](txfr) module" ] pub type TXFR = crate :: Reg < u32 , _TXFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TXFR ; # [ doc = "`read()` method returns [txfr::R](txfr::R) reader structure" ] impl crate :: Readable for TXFR { } # [ doc = "Transmit FIFO Registers" ] pub mod txfr { # [ doc = "Reader of register TXFR%s" ] pub type R = crate :: R < u32 , super :: TXFR > ; # [ doc = "Reader of field `TXDATA`" ] pub type TXDATA_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `TXCMD_TXDATA`" ] pub type TXCMD_TXDATA_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Transmit Data" ] # [ inline ( always ) ] pub fn txdata ( & self ) -> TXDATA_R { TXDATA_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Transmit Command or Transmit Data" ] # [ inline ( always ) ] pub fn txcmd_txdata ( & self ) -> TXCMD_TXDATA_R { TXCMD_TXDATA_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } } # [ doc = "Receive FIFO Registers\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rxfr](rxfr) module" ] pub type RXFR = crate :: Reg < u32 , _RXFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RXFR ; # [ doc = "`read()` method returns [rxfr::R](rxfr::R) reader structure" ] impl crate :: Readable for RXFR { } # [ doc = "Receive FIFO Registers" ] pub mod rxfr { # [ doc = "Reader of register RXFR%s" ] pub type R = crate :: R < u32 , super :: RXFR > ; # [ doc = "Reader of field `RXDATA`" ] pub type RXDATA_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Receive Data" ] # [ inline ( always ) ] pub fn rxdata ( & self ) -> RXDATA_R { RXDATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } } # [ doc = "Inter-IC Sound / Synchronous Audio Interface" ] pub struct I2S0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for I2S0 { } impl I2S0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const i2s0 :: RegisterBlock { 0x4002_f000 as * const _ } } impl Deref for I2S0 { type Target = i2s0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * I2S0 :: ptr ( ) } } } # [ doc = "Inter-IC Sound / Synchronous Audio Interface" ] pub mod i2s0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - SAI Transmit Control Register" ] pub tcsr : TCSR , # [ doc = "0x04 - SAI Transmit Configuration 1 Register" ] pub tcr1 : TCR1 , # [ doc = "0x08 - SAI Transmit Configuration 2 Register" ] pub tcr2 : TCR2 , # [ doc = "0x0c - SAI Transmit Configuration 3 Register" ] pub tcr3 : TCR3 , # [ doc = "0x10 - SAI Transmit Configuration 4 Register" ] pub tcr4 : TCR4 , # [ doc = "0x14 - SAI Transmit Configuration 5 Register" ] pub tcr5 : TCR5 , _reserved6 : [ u8 ; 8usize ] , # [ doc = "0x20 - SAI Transmit Data Register" ] pub tdr : [ TDR ; 2 ] , _reserved7 : [ u8 ; 24usize ] , # [ doc = "0x40 - SAI Transmit FIFO Register" ] pub tfr : [ TFR ; 2 ] , _reserved8 : [ u8 ; 24usize ] , # [ doc = "0x60 - SAI Transmit Mask Register" ] pub tmr : TMR , _reserved9 : [ u8 ; 28usize ] , # [ doc = "0x80 - SAI Receive Control Register" ] pub rcsr : RCSR , # [ doc = "0x84 - SAI Receive Configuration 1 Register" ] pub rcr1 : RCR1 , # [ doc = "0x88 - SAI Receive Configuration 2 Register" ] pub rcr2 : RCR2 , # [ doc = "0x8c - SAI Receive Configuration 3 Register" ] pub rcr3 : RCR3 , # [ doc = "0x90 - SAI Receive Configuration 4 Register" ] pub rcr4 : RCR4 , # [ doc = "0x94 - SAI Receive Configuration 5 Register" ] pub rcr5 : RCR5 , _reserved15 : [ u8 ; 8usize ] , # [ doc = "0xa0 - SAI Receive Data Register" ] pub rdr : [ RDR ; 2 ] , _reserved16 : [ u8 ; 24usize ] , # [ doc = "0xc0 - SAI Receive FIFO Register" ] pub rfr : [ RFR ; 2 ] , _reserved17 : [ u8 ; 24usize ] , # [ doc = "0xe0 - SAI Receive Mask Register" ] pub rmr : RMR , _reserved18 : [ u8 ; 28usize ] , # [ doc = "0x100 - SAI MCLK Control Register" ] pub mcr : MCR , # [ doc = "0x104 - SAI MCLK Divide Register" ] pub mdr : MDR , } # [ doc = "SAI Transmit Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcsr](tcsr) module" ] pub type TCSR = crate :: Reg < u32 , _TCSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCSR ; # [ doc = "`read()` method returns [tcsr::R](tcsr::R) reader structure" ] impl crate :: Readable for TCSR { } # [ doc = "`write(|w| ..)` method takes [tcsr::W](tcsr::W) writer structure" ] impl crate :: Writable for TCSR { } # [ doc = "SAI Transmit Control Register" ] pub mod tcsr { # [ doc = "Reader of register TCSR" ] pub type R = crate :: R < u32 , super :: TCSR > ; # [ doc = "Writer for register TCSR" ] pub type W = crate :: W < u32 , super :: TCSR > ; # [ doc = "Register TCSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "FIFO Request DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRDE_A { # [ doc = "0: Disables the DMA request." ] _0 , # [ doc = "1: Enables the DMA request." ] _1 } impl From < FRDE_A > for bool { # [ inline ( always ) ] fn from ( variant : FRDE_A ) -> Self { match variant { FRDE_A :: _0 => false , FRDE_A :: _1 => true } } } # [ doc = "Reader of field `FRDE`" ] pub type FRDE_R = crate :: R < bool , FRDE_A > ; impl FRDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRDE_A { match self . bits { false => FRDE_A :: _0 , true => FRDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRDE_A :: _1 } } # [ doc = "Write proxy for field `FRDE`" ] pub struct FRDE_W < 'a > { w : & 'a mut W , } impl < 'a > FRDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the DMA request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRDE_A :: _0 ) } # [ doc = "Enables the DMA request." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRDE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "FIFO Warning DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FWDE_A { # [ doc = "0: Disables the DMA request." ] _0 , # [ doc = "1: Enables the DMA request." ] _1 } impl From < FWDE_A > for bool { # [ inline ( always ) ] fn from ( variant : FWDE_A ) -> Self { match variant { FWDE_A :: _0 => false , FWDE_A :: _1 => true } } } # [ doc = "Reader of field `FWDE`" ] pub type FWDE_R = crate :: R < bool , FWDE_A > ; impl FWDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FWDE_A { match self . bits { false => FWDE_A :: _0 , true => FWDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FWDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FWDE_A :: _1 } } # [ doc = "Write proxy for field `FWDE`" ] pub struct FWDE_W < 'a > { w : & 'a mut W , } impl < 'a > FWDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FWDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the DMA request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FWDE_A :: _0 ) } # [ doc = "Enables the DMA request." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FWDE_A :: _1 ) } # [ 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 } } # [ doc = "FIFO Request Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRIE_A { # [ doc = "0: Disables the interrupt." ] _0 , # [ doc = "1: Enables the interrupt." ] _1 } impl From < FRIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FRIE_A ) -> Self { match variant { FRIE_A :: _0 => false , FRIE_A :: _1 => true } } } # [ doc = "Reader of field `FRIE`" ] pub type FRIE_R = crate :: R < bool , FRIE_A > ; impl FRIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRIE_A { match self . bits { false => FRIE_A :: _0 , true => FRIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRIE_A :: _1 } } # [ doc = "Write proxy for field `FRIE`" ] pub struct FRIE_W < 'a > { w : & 'a mut W , } impl < 'a > FRIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRIE_A :: _0 ) } # [ doc = "Enables the interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRIE_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "FIFO Warning Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FWIE_A { # [ doc = "0: Disables the interrupt." ] _0 , # [ doc = "1: Enables the interrupt." ] _1 } impl From < FWIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FWIE_A ) -> Self { match variant { FWIE_A :: _0 => false , FWIE_A :: _1 => true } } } # [ doc = "Reader of field `FWIE`" ] pub type FWIE_R = crate :: R < bool , FWIE_A > ; impl FWIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FWIE_A { match self . bits { false => FWIE_A :: _0 , true => FWIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FWIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FWIE_A :: _1 } } # [ doc = "Write proxy for field `FWIE`" ] pub struct FWIE_W < 'a > { w : & 'a mut W , } impl < 'a > FWIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FWIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FWIE_A :: _0 ) } # [ doc = "Enables the interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FWIE_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "FIFO Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEIE_A { # [ doc = "0: Disables the interrupt." ] _0 , # [ doc = "1: Enables the interrupt." ] _1 } impl From < FEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FEIE_A ) -> Self { match variant { FEIE_A :: _0 => false , FEIE_A :: _1 => true } } } # [ doc = "Reader of field `FEIE`" ] pub type FEIE_R = crate :: R < bool , FEIE_A > ; impl FEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEIE_A { match self . bits { false => FEIE_A :: _0 , true => FEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEIE_A :: _1 } } # [ doc = "Write proxy for field `FEIE`" ] pub struct FEIE_W < 'a > { w : & 'a mut W , } impl < 'a > FEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _0 ) } # [ doc = "Enables the interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Sync Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEIE_A { # [ doc = "0: Disables interrupt." ] _0 , # [ doc = "1: Enables interrupt." ] _1 } impl From < SEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : SEIE_A ) -> Self { match variant { SEIE_A :: _0 => false , SEIE_A :: _1 => true } } } # [ doc = "Reader of field `SEIE`" ] pub type SEIE_R = crate :: R < bool , SEIE_A > ; impl SEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEIE_A { match self . bits { false => SEIE_A :: _0 , true => SEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SEIE_A :: _1 } } # [ doc = "Write proxy for field `SEIE`" ] pub struct SEIE_W < 'a > { w : & 'a mut W , } impl < 'a > SEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SEIE_A :: _0 ) } # [ doc = "Enables interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SEIE_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Word Start Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WSIE_A { # [ doc = "0: Disables interrupt." ] _0 , # [ doc = "1: Enables interrupt." ] _1 } impl From < WSIE_A > for bool { # [ inline ( always ) ] fn from ( variant : WSIE_A ) -> Self { match variant { WSIE_A :: _0 => false , WSIE_A :: _1 => true } } } # [ doc = "Reader of field `WSIE`" ] pub type WSIE_R = crate :: R < bool , WSIE_A > ; impl WSIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WSIE_A { match self . bits { false => WSIE_A :: _0 , true => WSIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WSIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WSIE_A :: _1 } } # [ doc = "Write proxy for field `WSIE`" ] pub struct WSIE_W < 'a > { w : & 'a mut W , } impl < 'a > WSIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WSIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WSIE_A :: _0 ) } # [ doc = "Enables interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WSIE_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "FIFO Request Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRF_A { # [ doc = "0: Transmit FIFO watermark has not been reached." ] _0 , # [ doc = "1: Transmit FIFO watermark has been reached." ] _1 } impl From < FRF_A > for bool { # [ inline ( always ) ] fn from ( variant : FRF_A ) -> Self { match variant { FRF_A :: _0 => false , FRF_A :: _1 => true } } } # [ doc = "Reader of field `FRF`" ] pub type FRF_R = crate :: R < bool , FRF_A > ; impl FRF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRF_A { match self . bits { false => FRF_A :: _0 , true => FRF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRF_A :: _1 } } # [ doc = "FIFO Warning Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FWF_A { # [ doc = "0: No enabled transmit FIFO is empty." ] _0 , # [ doc = "1: Enabled transmit FIFO is empty." ] _1 } impl From < FWF_A > for bool { # [ inline ( always ) ] fn from ( variant : FWF_A ) -> Self { match variant { FWF_A :: _0 => false , FWF_A :: _1 => true } } } # [ doc = "Reader of field `FWF`" ] pub type FWF_R = crate :: R < bool , FWF_A > ; impl FWF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FWF_A { match self . bits { false => FWF_A :: _0 , true => FWF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FWF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FWF_A :: _1 } } # [ doc = "FIFO Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEF_A { # [ doc = "0: Transmit underrun not detected." ] _0 , # [ doc = "1: Transmit underrun detected." ] _1 } impl From < FEF_A > for bool { # [ inline ( always ) ] fn from ( variant : FEF_A ) -> Self { match variant { FEF_A :: _0 => false , FEF_A :: _1 => true } } } # [ doc = "Reader of field `FEF`" ] pub type FEF_R = crate :: R < bool , FEF_A > ; impl FEF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEF_A { match self . bits { false => FEF_A :: _0 , true => FEF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEF_A :: _1 } } # [ doc = "Write proxy for field `FEF`" ] pub struct FEF_W < 'a > { w : & 'a mut W , } impl < 'a > FEF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit underrun not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEF_A :: _0 ) } # [ doc = "Transmit underrun detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEF_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Sync Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEF_A { # [ doc = "0: Sync error not detected." ] _0 , # [ doc = "1: Frame sync error detected." ] _1 } impl From < SEF_A > for bool { # [ inline ( always ) ] fn from ( variant : SEF_A ) -> Self { match variant { SEF_A :: _0 => false , SEF_A :: _1 => true } } } # [ doc = "Reader of field `SEF`" ] pub type SEF_R = crate :: R < bool , SEF_A > ; impl SEF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEF_A { match self . bits { false => SEF_A :: _0 , true => SEF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SEF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SEF_A :: _1 } } # [ doc = "Write proxy for field `SEF`" ] pub struct SEF_W < 'a > { w : & 'a mut W , } impl < 'a > SEF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SEF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sync error not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SEF_A :: _0 ) } # [ doc = "Frame sync error detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SEF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Word Start Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WSF_A { # [ doc = "0: Start of word not detected." ] _0 , # [ doc = "1: Start of word detected." ] _1 } impl From < WSF_A > for bool { # [ inline ( always ) ] fn from ( variant : WSF_A ) -> Self { match variant { WSF_A :: _0 => false , WSF_A :: _1 => true } } } # [ doc = "Reader of field `WSF`" ] pub type WSF_R = crate :: R < bool , WSF_A > ; impl WSF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WSF_A { match self . bits { false => WSF_A :: _0 , true => WSF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WSF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WSF_A :: _1 } } # [ doc = "Write proxy for field `WSF`" ] pub struct WSF_W < 'a > { w : & 'a mut W , } impl < 'a > WSF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WSF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Start of word not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WSF_A :: _0 ) } # [ doc = "Start of word detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WSF_A :: _1 ) } # [ 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 = "Software Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SR_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Software reset." ] _1 } impl From < SR_A > for bool { # [ inline ( always ) ] fn from ( variant : SR_A ) -> Self { match variant { SR_A :: _0 => false , SR_A :: _1 => true } } } # [ doc = "Reader of field `SR`" ] pub type SR_R = crate :: R < bool , SR_A > ; impl SR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SR_A { match self . bits { false => SR_A :: _0 , true => SR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SR_A :: _1 } } # [ doc = "Write proxy for field `SR`" ] pub struct SR_W < 'a > { w : & 'a mut W , } impl < 'a > SR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SR_A :: _0 ) } # [ doc = "Software reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SR_A :: _1 ) } # [ 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 = "FIFO Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FR_AW { # [ doc = "0: No effect." ] _0 , # [ doc = "1: FIFO reset." ] _1 } impl From < FR_AW > for bool { # [ inline ( always ) ] fn from ( variant : FR_AW ) -> Self { match variant { FR_AW :: _0 => false , FR_AW :: _1 => true } } } # [ doc = "Write proxy for field `FR`" ] pub struct FR_W < 'a > { w : & 'a mut W , } impl < 'a > FR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FR_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FR_AW :: _0 ) } # [ doc = "FIFO reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FR_AW :: _1 ) } # [ 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 = "Bit Clock Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCE_A { # [ doc = "0: Transmit bit clock is disabled." ] _0 , # [ doc = "1: Transmit bit clock is enabled." ] _1 } impl From < BCE_A > for bool { # [ inline ( always ) ] fn from ( variant : BCE_A ) -> Self { match variant { BCE_A :: _0 => false , BCE_A :: _1 => true } } } # [ doc = "Reader of field `BCE`" ] pub type BCE_R = crate :: R < bool , BCE_A > ; impl BCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCE_A { match self . bits { false => BCE_A :: _0 , true => BCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCE_A :: _1 } } # [ doc = "Write proxy for field `BCE`" ] pub struct BCE_W < 'a > { w : & 'a mut W , } impl < 'a > BCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit bit clock is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCE_A :: _0 ) } # [ doc = "Transmit bit clock is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Debug Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBGE_A { # [ doc = "0: Transmitter is disabled in Debug mode, after completing the current frame." ] _0 , # [ doc = "1: Transmitter is enabled in Debug mode." ] _1 } impl From < DBGE_A > for bool { # [ inline ( always ) ] fn from ( variant : DBGE_A ) -> Self { match variant { DBGE_A :: _0 => false , DBGE_A :: _1 => true } } } # [ doc = "Reader of field `DBGE`" ] pub type DBGE_R = crate :: R < bool , DBGE_A > ; impl DBGE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBGE_A { match self . bits { false => DBGE_A :: _0 , true => DBGE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBGE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBGE_A :: _1 } } # [ doc = "Write proxy for field `DBGE`" ] pub struct DBGE_W < 'a > { w : & 'a mut W , } impl < 'a > DBGE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBGE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter is disabled in Debug mode, after completing the current frame." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DBGE_A :: _0 ) } # [ doc = "Transmitter is enabled in Debug mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DBGE_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Stop Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPE_A { # [ doc = "0: Transmitter disabled in Stop mode." ] _0 , # [ doc = "1: Transmitter enabled in Stop mode." ] _1 } impl From < STOPE_A > for bool { # [ inline ( always ) ] fn from ( variant : STOPE_A ) -> Self { match variant { STOPE_A :: _0 => false , STOPE_A :: _1 => true } } } # [ doc = "Reader of field `STOPE`" ] pub type STOPE_R = crate :: R < bool , STOPE_A > ; impl STOPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STOPE_A { match self . bits { false => STOPE_A :: _0 , true => STOPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STOPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STOPE_A :: _1 } } # [ doc = "Write proxy for field `STOPE`" ] pub struct STOPE_W < 'a > { w : & 'a mut W , } impl < 'a > STOPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STOPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter disabled in Stop mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STOPE_A :: _0 ) } # [ doc = "Transmitter enabled in Stop mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STOPE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Transmitter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TE_A { # [ doc = "0: Transmitter is disabled." ] _0 , # [ doc = "1: Transmitter is enabled, or transmitter has been disabled and has not yet reached end of frame." ] _1 } impl From < TE_A > for bool { # [ inline ( always ) ] fn from ( variant : TE_A ) -> Self { match variant { TE_A :: _0 => false , TE_A :: _1 => true } } } # [ doc = "Reader of field `TE`" ] pub type TE_R = crate :: R < bool , TE_A > ; impl TE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TE_A { match self . bits { false => TE_A :: _0 , true => TE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TE_A :: _1 } } # [ doc = "Write proxy for field `TE`" ] pub struct TE_W < 'a > { w : & 'a mut W , } impl < 'a > TE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TE_A :: _0 ) } # [ doc = "Transmitter is enabled, or transmitter has been disabled and has not yet reached end of frame." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - FIFO Request DMA Enable" ] # [ inline ( always ) ] pub fn frde ( & self ) -> FRDE_R { FRDE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - FIFO Warning DMA Enable" ] # [ inline ( always ) ] pub fn fwde ( & self ) -> FWDE_R { FWDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - FIFO Request Interrupt Enable" ] # [ inline ( always ) ] pub fn frie ( & self ) -> FRIE_R { FRIE_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - FIFO Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn fwie ( & self ) -> FWIE_R { FWIE_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - FIFO Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & self ) -> FEIE_R { FEIE_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Sync Error Interrupt Enable" ] # [ inline ( always ) ] pub fn seie ( & self ) -> SEIE_R { SEIE_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Word Start Interrupt Enable" ] # [ inline ( always ) ] pub fn wsie ( & self ) -> WSIE_R { WSIE_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - FIFO Request Flag" ] # [ inline ( always ) ] pub fn frf ( & self ) -> FRF_R { FRF_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - FIFO Warning Flag" ] # [ inline ( always ) ] pub fn fwf ( & self ) -> FWF_R { FWF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - FIFO Error Flag" ] # [ inline ( always ) ] pub fn fef ( & self ) -> FEF_R { FEF_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Sync Error Flag" ] # [ inline ( always ) ] pub fn sef ( & self ) -> SEF_R { SEF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Word Start Flag" ] # [ inline ( always ) ] pub fn wsf ( & self ) -> WSF_R { WSF_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Software Reset" ] # [ inline ( always ) ] pub fn sr ( & self ) -> SR_R { SR_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Bit Clock Enable" ] # [ inline ( always ) ] pub fn bce ( & self ) -> BCE_R { BCE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Debug Enable" ] # [ inline ( always ) ] pub fn dbge ( & self ) -> DBGE_R { DBGE_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Stop Enable" ] # [ inline ( always ) ] pub fn stope ( & self ) -> STOPE_R { STOPE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & self ) -> TE_R { TE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FIFO Request DMA Enable" ] # [ inline ( always ) ] pub fn frde ( & mut self ) -> FRDE_W { FRDE_W { w : self } } # [ doc = "Bit 1 - FIFO Warning DMA Enable" ] # [ inline ( always ) ] pub fn fwde ( & mut self ) -> FWDE_W { FWDE_W { w : self } } # [ doc = "Bit 8 - FIFO Request Interrupt Enable" ] # [ inline ( always ) ] pub fn frie ( & mut self ) -> FRIE_W { FRIE_W { w : self } } # [ doc = "Bit 9 - FIFO Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn fwie ( & mut self ) -> FWIE_W { FWIE_W { w : self } } # [ doc = "Bit 10 - FIFO Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & mut self ) -> FEIE_W { FEIE_W { w : self } } # [ doc = "Bit 11 - Sync Error Interrupt Enable" ] # [ inline ( always ) ] pub fn seie ( & mut self ) -> SEIE_W { SEIE_W { w : self } } # [ doc = "Bit 12 - Word Start Interrupt Enable" ] # [ inline ( always ) ] pub fn wsie ( & mut self ) -> WSIE_W { WSIE_W { w : self } } # [ doc = "Bit 18 - FIFO Error Flag" ] # [ inline ( always ) ] pub fn fef ( & mut self ) -> FEF_W { FEF_W { w : self } } # [ doc = "Bit 19 - Sync Error Flag" ] # [ inline ( always ) ] pub fn sef ( & mut self ) -> SEF_W { SEF_W { w : self } } # [ doc = "Bit 20 - Word Start Flag" ] # [ inline ( always ) ] pub fn wsf ( & mut self ) -> WSF_W { WSF_W { w : self } } # [ doc = "Bit 24 - Software Reset" ] # [ inline ( always ) ] pub fn sr ( & mut self ) -> SR_W { SR_W { w : self } } # [ doc = "Bit 25 - FIFO Reset" ] # [ inline ( always ) ] pub fn fr ( & mut self ) -> FR_W { FR_W { w : self } } # [ doc = "Bit 28 - Bit Clock Enable" ] # [ inline ( always ) ] pub fn bce ( & mut self ) -> BCE_W { BCE_W { w : self } } # [ doc = "Bit 29 - Debug Enable" ] # [ inline ( always ) ] pub fn dbge ( & mut self ) -> DBGE_W { DBGE_W { w : self } } # [ doc = "Bit 30 - Stop Enable" ] # [ inline ( always ) ] pub fn stope ( & mut self ) -> STOPE_W { STOPE_W { w : self } } # [ doc = "Bit 31 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & mut self ) -> TE_W { TE_W { w : self } } } } # [ doc = "SAI Transmit Configuration 1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr1](tcr1) module" ] pub type TCR1 = crate :: Reg < u32 , _TCR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR1 ; # [ doc = "`read()` method returns [tcr1::R](tcr1::R) reader structure" ] impl crate :: Readable for TCR1 { } # [ doc = "`write(|w| ..)` method takes [tcr1::W](tcr1::W) writer structure" ] impl crate :: Writable for TCR1 { } # [ doc = "SAI Transmit Configuration 1 Register" ] pub mod tcr1 { # [ doc = "Reader of register TCR1" ] pub type R = crate :: R < u32 , super :: TCR1 > ; # [ doc = "Writer for register TCR1" ] pub type W = crate :: W < u32 , super :: TCR1 > ; # [ doc = "Register TCR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TFW`" ] pub type TFW_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TFW`" ] pub struct TFW_W < 'a > { w : & 'a mut W , } impl < 'a > TFW_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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Transmit FIFO Watermark" ] # [ inline ( always ) ] pub fn tfw ( & self ) -> TFW_R { TFW_R :: new ( ( self . bits & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Transmit FIFO Watermark" ] # [ inline ( always ) ] pub fn tfw ( & mut self ) -> TFW_W { TFW_W { w : self } } } } # [ doc = "SAI Transmit Configuration 2 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr2](tcr2) module" ] pub type TCR2 = crate :: Reg < u32 , _TCR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR2 ; # [ doc = "`read()` method returns [tcr2::R](tcr2::R) reader structure" ] impl crate :: Readable for TCR2 { } # [ doc = "`write(|w| ..)` method takes [tcr2::W](tcr2::W) writer structure" ] impl crate :: Writable for TCR2 { } # [ doc = "SAI Transmit Configuration 2 Register" ] pub mod tcr2 { # [ doc = "Reader of register TCR2" ] pub type R = crate :: R < u32 , super :: TCR2 > ; # [ doc = "Writer for register TCR2" ] pub type W = crate :: W < u32 , super :: TCR2 > ; # [ doc = "Register TCR2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DIV`" ] pub type DIV_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DIV`" ] pub struct DIV_W < 'a > { w : & 'a mut W , } impl < 'a > DIV_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Bit Clock Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCD_A { # [ doc = "0: Bit clock is generated externally in Slave mode." ] _0 , # [ doc = "1: Bit clock is generated internally in Master mode." ] _1 } impl From < BCD_A > for bool { # [ inline ( always ) ] fn from ( variant : BCD_A ) -> Self { match variant { BCD_A :: _0 => false , BCD_A :: _1 => true } } } # [ doc = "Reader of field `BCD`" ] pub type BCD_R = crate :: R < bool , BCD_A > ; impl BCD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCD_A { match self . bits { false => BCD_A :: _0 , true => BCD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCD_A :: _1 } } # [ doc = "Write proxy for field `BCD`" ] pub struct BCD_W < 'a > { w : & 'a mut W , } impl < 'a > BCD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bit clock is generated externally in Slave mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCD_A :: _0 ) } # [ doc = "Bit clock is generated internally in Master mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCD_A :: _1 ) } # [ 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 = "Bit Clock Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCP_A { # [ doc = "0: Bit clock is active high with drive outputs on rising edge and sample inputs on falling edge." ] _0 , # [ doc = "1: Bit clock is active low with drive outputs on falling edge and sample inputs on rising edge." ] _1 } impl From < BCP_A > for bool { # [ inline ( always ) ] fn from ( variant : BCP_A ) -> Self { match variant { BCP_A :: _0 => false , BCP_A :: _1 => true } } } # [ doc = "Reader of field `BCP`" ] pub type BCP_R = crate :: R < bool , BCP_A > ; impl BCP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCP_A { match self . bits { false => BCP_A :: _0 , true => BCP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCP_A :: _1 } } # [ doc = "Write proxy for field `BCP`" ] pub struct BCP_W < 'a > { w : & 'a mut W , } impl < 'a > BCP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bit clock is active high with drive outputs on rising edge and sample inputs on falling edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCP_A :: _0 ) } # [ doc = "Bit clock is active low with drive outputs on falling edge and sample inputs on rising edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCP_A :: _1 ) } # [ 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 = "MCLK Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSEL_A { # [ doc = "0: Bus Clock selected." ] _00 , # [ doc = "1: Master Clock (MCLK) 1 option selected." ] _01 , # [ doc = "2: Master Clock (MCLK) 2 option selected." ] _10 , # [ doc = "3: Master Clock (MCLK) 3 option selected." ] _11 } impl From < MSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : MSEL_A ) -> Self { match variant { MSEL_A :: _00 => 0 , MSEL_A :: _01 => 1 , MSEL_A :: _10 => 2 , MSEL_A :: _11 => 3 } } } # [ doc = "Reader of field `MSEL`" ] pub type MSEL_R = crate :: R < u8 , MSEL_A > ; impl MSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSEL_A { match self . bits { 0 => MSEL_A :: _00 , 1 => MSEL_A :: _01 , 2 => MSEL_A :: _10 , 3 => MSEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MSEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MSEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MSEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MSEL_A :: _11 } } # [ doc = "Write proxy for field `MSEL`" ] pub struct MSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Bus Clock selected." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _00 ) } # [ doc = "Master Clock (MCLK) 1 option selected." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _01 ) } # [ doc = "Master Clock (MCLK) 2 option selected." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _10 ) } # [ doc = "Master Clock (MCLK) 3 option selected." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 26 ) ) | ( ( ( value as u32 ) & 0x03 ) << 26 ) ; self . w } } # [ doc = "Bit Clock Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCI_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Internal logic is clocked as if bit clock was externally generated." ] _1 } impl From < BCI_A > for bool { # [ inline ( always ) ] fn from ( variant : BCI_A ) -> Self { match variant { BCI_A :: _0 => false , BCI_A :: _1 => true } } } # [ doc = "Reader of field `BCI`" ] pub type BCI_R = crate :: R < bool , BCI_A > ; impl BCI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCI_A { match self . bits { false => BCI_A :: _0 , true => BCI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCI_A :: _1 } } # [ doc = "Write proxy for field `BCI`" ] pub struct BCI_W < 'a > { w : & 'a mut W , } impl < 'a > BCI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCI_A :: _0 ) } # [ doc = "Internal logic is clocked as if bit clock was externally generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCI_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Bit Clock Swap\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCS_A { # [ doc = "0: Use the normal bit clock source." ] _0 , # [ doc = "1: Swap the bit clock source." ] _1 } impl From < BCS_A > for bool { # [ inline ( always ) ] fn from ( variant : BCS_A ) -> Self { match variant { BCS_A :: _0 => false , BCS_A :: _1 => true } } } # [ doc = "Reader of field `BCS`" ] pub type BCS_R = crate :: R < bool , BCS_A > ; impl BCS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCS_A { match self . bits { false => BCS_A :: _0 , true => BCS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCS_A :: _1 } } # [ doc = "Write proxy for field `BCS`" ] pub struct BCS_W < 'a > { w : & 'a mut W , } impl < 'a > BCS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the normal bit clock source." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCS_A :: _0 ) } # [ doc = "Swap the bit clock source." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCS_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Synchronous Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNC_A { # [ doc = "0: Asynchronous mode." ] _00 , # [ doc = "1: Synchronous with receiver." ] _01 , # [ doc = "2: Synchronous with another SAI transmitter." ] _10 , # [ doc = "3: Synchronous with another SAI receiver." ] _11 } impl From < SYNC_A > for u8 { # [ inline ( always ) ] fn from ( variant : SYNC_A ) -> Self { match variant { SYNC_A :: _00 => 0 , SYNC_A :: _01 => 1 , SYNC_A :: _10 => 2 , SYNC_A :: _11 => 3 } } } # [ doc = "Reader of field `SYNC`" ] pub type SYNC_R = crate :: R < u8 , SYNC_A > ; impl SYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNC_A { match self . bits { 0 => SYNC_A :: _00 , 1 => SYNC_A :: _01 , 2 => SYNC_A :: _10 , 3 => SYNC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SYNC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SYNC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SYNC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SYNC_A :: _11 } } # [ doc = "Write proxy for field `SYNC`" ] pub struct SYNC_W < 'a > { w : & 'a mut W , } impl < 'a > SYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Asynchronous mode." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( SYNC_A :: _00 ) } # [ doc = "Synchronous with receiver." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( SYNC_A :: _01 ) } # [ doc = "Synchronous with another SAI transmitter." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SYNC_A :: _10 ) } # [ doc = "Synchronous with another SAI receiver." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( SYNC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 30 ) ) | ( ( ( value as u32 ) & 0x03 ) << 30 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Bit Clock Divide" ] # [ inline ( always ) ] pub fn div ( & self ) -> DIV_R { DIV_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bit 24 - Bit Clock Direction" ] # [ inline ( always ) ] pub fn bcd ( & self ) -> BCD_R { BCD_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Bit Clock Polarity" ] # [ inline ( always ) ] pub fn bcp ( & self ) -> BCP_R { BCP_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bits 26:27 - MCLK Select" ] # [ inline ( always ) ] pub fn msel ( & self ) -> MSEL_R { MSEL_R :: new ( ( ( self . bits >> 26 ) & 0x03 ) as u8 ) } # [ doc = "Bit 28 - Bit Clock Input" ] # [ inline ( always ) ] pub fn bci ( & self ) -> BCI_R { BCI_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Bit Clock Swap" ] # [ inline ( always ) ] pub fn bcs ( & self ) -> BCS_R { BCS_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bits 30:31 - Synchronous Mode" ] # [ inline ( always ) ] pub fn sync ( & self ) -> SYNC_R { SYNC_R :: new ( ( ( self . bits >> 30 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Bit Clock Divide" ] # [ inline ( always ) ] pub fn div ( & mut self ) -> DIV_W { DIV_W { w : self } } # [ doc = "Bit 24 - Bit Clock Direction" ] # [ inline ( always ) ] pub fn bcd ( & mut self ) -> BCD_W { BCD_W { w : self } } # [ doc = "Bit 25 - Bit Clock Polarity" ] # [ inline ( always ) ] pub fn bcp ( & mut self ) -> BCP_W { BCP_W { w : self } } # [ doc = "Bits 26:27 - MCLK Select" ] # [ inline ( always ) ] pub fn msel ( & mut self ) -> MSEL_W { MSEL_W { w : self } } # [ doc = "Bit 28 - Bit Clock Input" ] # [ inline ( always ) ] pub fn bci ( & mut self ) -> BCI_W { BCI_W { w : self } } # [ doc = "Bit 29 - Bit Clock Swap" ] # [ inline ( always ) ] pub fn bcs ( & mut self ) -> BCS_W { BCS_W { w : self } } # [ doc = "Bits 30:31 - Synchronous Mode" ] # [ inline ( always ) ] pub fn sync ( & mut self ) -> SYNC_W { SYNC_W { w : self } } } } # [ doc = "SAI Transmit Configuration 3 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr3](tcr3) module" ] pub type TCR3 = crate :: Reg < u32 , _TCR3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR3 ; # [ doc = "`read()` method returns [tcr3::R](tcr3::R) reader structure" ] impl crate :: Readable for TCR3 { } # [ doc = "`write(|w| ..)` method takes [tcr3::W](tcr3::W) writer structure" ] impl crate :: Writable for TCR3 { } # [ doc = "SAI Transmit Configuration 3 Register" ] pub mod tcr3 { # [ doc = "Reader of register TCR3" ] pub type R = crate :: R < u32 , super :: TCR3 > ; # [ doc = "Writer for register TCR3" ] pub type W = crate :: W < u32 , super :: TCR3 > ; # [ doc = "Register TCR3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `WDFL`" ] pub type WDFL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WDFL`" ] pub struct WDFL_W < 'a > { w : & 'a mut W , } impl < 'a > WDFL_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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } # [ doc = "Transmit Channel Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCE0_A { # [ doc = "0: Transmit data channel N is disabled." ] _0 , # [ doc = "1: Transmit data channel N is enabled." ] _1 } impl From < TCE0_A > for bool { # [ inline ( always ) ] fn from ( variant : TCE0_A ) -> Self { match variant { TCE0_A :: _0 => false , TCE0_A :: _1 => true } } } # [ doc = "Reader of field `TCE0`" ] pub type TCE0_R = crate :: R < bool , TCE0_A > ; impl TCE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCE0_A { match self . bits { false => TCE0_A :: _0 , true => TCE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCE0_A :: _1 } } # [ doc = "Write proxy for field `TCE0`" ] pub struct TCE0_W < 'a > { w : & 'a mut W , } impl < 'a > TCE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit data channel N is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCE0_A :: _0 ) } # [ doc = "Transmit data channel N is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCE0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Transmit Channel Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCE1_A { # [ doc = "0: Transmit data channel N is disabled." ] _0 , # [ doc = "1: Transmit data channel N is enabled." ] _1 } impl From < TCE1_A > for bool { # [ inline ( always ) ] fn from ( variant : TCE1_A ) -> Self { match variant { TCE1_A :: _0 => false , TCE1_A :: _1 => true } } } # [ doc = "Reader of field `TCE1`" ] pub type TCE1_R = crate :: R < bool , TCE1_A > ; impl TCE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCE1_A { match self . bits { false => TCE1_A :: _0 , true => TCE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCE1_A :: _1 } } # [ doc = "Write proxy for field `TCE1`" ] pub struct TCE1_W < 'a > { w : & 'a mut W , } impl < 'a > TCE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit data channel N is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCE1_A :: _0 ) } # [ doc = "Transmit data channel N is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCE1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Channel FIFO Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFR0_AW { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Transmit data channel N FIFO is reset." ] _1 } impl From < CFR0_AW > for bool { # [ inline ( always ) ] fn from ( variant : CFR0_AW ) -> Self { match variant { CFR0_AW :: _0 => false , CFR0_AW :: _1 => true } } } # [ doc = "Write proxy for field `CFR0`" ] pub struct CFR0_W < 'a > { w : & 'a mut W , } impl < 'a > CFR0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFR0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFR0_AW :: _0 ) } # [ doc = "Transmit data channel N FIFO is reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFR0_AW :: _1 ) } # [ 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 = "Channel FIFO Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFR1_AW { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Transmit data channel N FIFO is reset." ] _1 } impl From < CFR1_AW > for bool { # [ inline ( always ) ] fn from ( variant : CFR1_AW ) -> Self { match variant { CFR1_AW :: _0 => false , CFR1_AW :: _1 => true } } } # [ doc = "Write proxy for field `CFR1`" ] pub struct CFR1_W < 'a > { w : & 'a mut W , } impl < 'a > CFR1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFR1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFR1_AW :: _0 ) } # [ doc = "Transmit data channel N FIFO is reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFR1_AW :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 0:4 - Word Flag Configuration" ] # [ inline ( always ) ] pub fn wdfl ( & self ) -> WDFL_R { WDFL_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 16 - Transmit Channel Enable" ] # [ inline ( always ) ] pub fn tce0 ( & self ) -> TCE0_R { TCE0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Transmit Channel Enable" ] # [ inline ( always ) ] pub fn tce1 ( & self ) -> TCE1_R { TCE1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Word Flag Configuration" ] # [ inline ( always ) ] pub fn wdfl ( & mut self ) -> WDFL_W { WDFL_W { w : self } } # [ doc = "Bit 16 - Transmit Channel Enable" ] # [ inline ( always ) ] pub fn tce0 ( & mut self ) -> TCE0_W { TCE0_W { w : self } } # [ doc = "Bit 17 - Transmit Channel Enable" ] # [ inline ( always ) ] pub fn tce1 ( & mut self ) -> TCE1_W { TCE1_W { w : self } } # [ doc = "Bit 24 - Channel FIFO Reset" ] # [ inline ( always ) ] pub fn cfr0 ( & mut self ) -> CFR0_W { CFR0_W { w : self } } # [ doc = "Bit 25 - Channel FIFO Reset" ] # [ inline ( always ) ] pub fn cfr1 ( & mut self ) -> CFR1_W { CFR1_W { w : self } } } } # [ doc = "SAI Transmit Configuration 4 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr4](tcr4) module" ] pub type TCR4 = crate :: Reg < u32 , _TCR4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR4 ; # [ doc = "`read()` method returns [tcr4::R](tcr4::R) reader structure" ] impl crate :: Readable for TCR4 { } # [ doc = "`write(|w| ..)` method takes [tcr4::W](tcr4::W) writer structure" ] impl crate :: Writable for TCR4 { } # [ doc = "SAI Transmit Configuration 4 Register" ] pub mod tcr4 { # [ doc = "Reader of register TCR4" ] pub type R = crate :: R < u32 , super :: TCR4 > ; # [ doc = "Writer for register TCR4" ] pub type W = crate :: W < u32 , super :: TCR4 > ; # [ doc = "Register TCR4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Frame Sync Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSD_A { # [ doc = "0: Frame sync is generated externally in Slave mode." ] _0 , # [ doc = "1: Frame sync is generated internally in Master mode." ] _1 } impl From < FSD_A > for bool { # [ inline ( always ) ] fn from ( variant : FSD_A ) -> Self { match variant { FSD_A :: _0 => false , FSD_A :: _1 => true } } } # [ doc = "Reader of field `FSD`" ] pub type FSD_R = crate :: R < bool , FSD_A > ; impl FSD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FSD_A { match self . bits { false => FSD_A :: _0 , true => FSD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FSD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FSD_A :: _1 } } # [ doc = "Write proxy for field `FSD`" ] pub struct FSD_W < 'a > { w : & 'a mut W , } impl < 'a > FSD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FSD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frame sync is generated externally in Slave mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FSD_A :: _0 ) } # [ doc = "Frame sync is generated internally in Master mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FSD_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Frame Sync Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSP_A { # [ doc = "0: Frame sync is active high." ] _0 , # [ doc = "1: Frame sync is active low." ] _1 } impl From < FSP_A > for bool { # [ inline ( always ) ] fn from ( variant : FSP_A ) -> Self { match variant { FSP_A :: _0 => false , FSP_A :: _1 => true } } } # [ doc = "Reader of field `FSP`" ] pub type FSP_R = crate :: R < bool , FSP_A > ; impl FSP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FSP_A { match self . bits { false => FSP_A :: _0 , true => FSP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FSP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FSP_A :: _1 } } # [ doc = "Write proxy for field `FSP`" ] pub struct FSP_W < 'a > { w : & 'a mut W , } impl < 'a > FSP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FSP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frame sync is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FSP_A :: _0 ) } # [ doc = "Frame sync is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FSP_A :: _1 ) } # [ 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 } } # [ doc = "On Demand Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ONDEM_A { # [ doc = "0: Internal frame sync is generated continuously." ] _0 , # [ doc = "1: Internal frame sync is generated when the FIFO warning flag is clear." ] _1 } impl From < ONDEM_A > for bool { # [ inline ( always ) ] fn from ( variant : ONDEM_A ) -> Self { match variant { ONDEM_A :: _0 => false , ONDEM_A :: _1 => true } } } # [ doc = "Reader of field `ONDEM`" ] pub type ONDEM_R = crate :: R < bool , ONDEM_A > ; impl ONDEM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ONDEM_A { match self . bits { false => ONDEM_A :: _0 , true => ONDEM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ONDEM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ONDEM_A :: _1 } } # [ doc = "Write proxy for field `ONDEM`" ] pub struct ONDEM_W < 'a > { w : & 'a mut W , } impl < 'a > ONDEM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ONDEM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal frame sync is generated continuously." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ONDEM_A :: _0 ) } # [ doc = "Internal frame sync is generated when the FIFO warning flag is clear." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ONDEM_A :: _1 ) } # [ 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 = "Frame Sync Early\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSE_A { # [ doc = "0: Frame sync asserts with the first bit of the frame." ] _0 , # [ doc = "1: Frame sync asserts one bit before the first bit of the frame." ] _1 } impl From < FSE_A > for bool { # [ inline ( always ) ] fn from ( variant : FSE_A ) -> Self { match variant { FSE_A :: _0 => false , FSE_A :: _1 => true } } } # [ doc = "Reader of field `FSE`" ] pub type FSE_R = crate :: R < bool , FSE_A > ; impl FSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FSE_A { match self . bits { false => FSE_A :: _0 , true => FSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FSE_A :: _1 } } # [ doc = "Write proxy for field `FSE`" ] pub struct FSE_W < 'a > { w : & 'a mut W , } impl < 'a > FSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frame sync asserts with the first bit of the frame." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FSE_A :: _0 ) } # [ doc = "Frame sync asserts one bit before the first bit of the frame." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "MSB First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MF_A { # [ doc = "0: LSB is transmitted first." ] _0 , # [ doc = "1: MSB is transmitted first." ] _1 } impl From < MF_A > for bool { # [ inline ( always ) ] fn from ( variant : MF_A ) -> Self { match variant { MF_A :: _0 => false , MF_A :: _1 => true } } } # [ doc = "Reader of field `MF`" ] pub type MF_R = crate :: R < bool , MF_A > ; impl MF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MF_A { match self . bits { false => MF_A :: _0 , true => MF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MF_A :: _1 } } # [ doc = "Write proxy for field `MF`" ] pub struct MF_W < 'a > { w : & 'a mut W , } impl < 'a > MF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LSB is transmitted first." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MF_A :: _0 ) } # [ doc = "MSB is transmitted first." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MF_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `SYWD`" ] pub type SYWD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SYWD`" ] pub struct SYWD_W < 'a > { w : & 'a mut W , } impl < 'a > SYWD_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 & ! ( 0x1f << 8 ) ) | ( ( ( value as u32 ) & 0x1f ) << 8 ) ; self . w } } # [ doc = "Reader of field `FRSZ`" ] pub type FRSZ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FRSZ`" ] pub struct FRSZ_W < 'a > { w : & 'a mut W , } impl < 'a > FRSZ_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } # [ doc = "FIFO Packing Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FPACK_A { # [ doc = "0: FIFO packing is disabled" ] _00 , # [ doc = "2: 8-bit FIFO packing is enabled" ] _10 , # [ doc = "3: 16-bit FIFO packing is enabled" ] _11 } impl From < FPACK_A > for u8 { # [ inline ( always ) ] fn from ( variant : FPACK_A ) -> Self { match variant { FPACK_A :: _00 => 0 , FPACK_A :: _10 => 2 , FPACK_A :: _11 => 3 } } } # [ doc = "Reader of field `FPACK`" ] pub type FPACK_R = crate :: R < u8 , FPACK_A > ; impl FPACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FPACK_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FPACK_A :: _00 ) , 2 => Val ( FPACK_A :: _10 ) , 3 => Val ( FPACK_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FPACK_A :: _00 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FPACK_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FPACK_A :: _11 } } # [ doc = "Write proxy for field `FPACK`" ] pub struct FPACK_W < 'a > { w : & 'a mut W , } impl < 'a > FPACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FPACK_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FIFO packing is disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FPACK_A :: _00 ) } # [ doc = "8-bit FIFO packing is enabled" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FPACK_A :: _10 ) } # [ doc = "16-bit FIFO packing is enabled" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FPACK_A :: _11 ) } # [ 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 << 24 ) ) | ( ( ( value as u32 ) & 0x03 ) << 24 ) ; self . w } } # [ doc = "FIFO Combine Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FCOMB_A { # [ doc = "0: FIFO combine mode disabled." ] _00 , # [ doc = "1: FIFO combine mode enabled on FIFO reads (from transmit shift registers)." ] _01 , # [ doc = "2: FIFO combine mode enabled on FIFO writes (by software)." ] _10 , # [ doc = "3: FIFO combine mode enabled on FIFO reads (from transmit shift registers) and writes (by software)." ] _11 } impl From < FCOMB_A > for u8 { # [ inline ( always ) ] fn from ( variant : FCOMB_A ) -> Self { match variant { FCOMB_A :: _00 => 0 , FCOMB_A :: _01 => 1 , FCOMB_A :: _10 => 2 , FCOMB_A :: _11 => 3 } } } # [ doc = "Reader of field `FCOMB`" ] pub type FCOMB_R = crate :: R < u8 , FCOMB_A > ; impl FCOMB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FCOMB_A { match self . bits { 0 => FCOMB_A :: _00 , 1 => FCOMB_A :: _01 , 2 => FCOMB_A :: _10 , 3 => FCOMB_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FCOMB_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FCOMB_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FCOMB_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FCOMB_A :: _11 } } # [ doc = "Write proxy for field `FCOMB`" ] pub struct FCOMB_W < 'a > { w : & 'a mut W , } impl < 'a > FCOMB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FCOMB_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "FIFO combine mode disabled." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FCOMB_A :: _00 ) } # [ doc = "FIFO combine mode enabled on FIFO reads (from transmit shift registers)." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FCOMB_A :: _01 ) } # [ doc = "FIFO combine mode enabled on FIFO writes (by software)." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FCOMB_A :: _10 ) } # [ doc = "FIFO combine mode enabled on FIFO reads (from transmit shift registers) and writes (by software)." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FCOMB_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 26 ) ) | ( ( ( value as u32 ) & 0x03 ) << 26 ) ; self . w } } # [ doc = "FIFO Continue on Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FCONT_A { # [ doc = "0: On FIFO error, the SAI will continue from the start of the next frame after the FIFO error flag has been cleared." ] _0 , # [ doc = "1: On FIFO error, the SAI will continue from the same word that caused the FIFO error to set after the FIFO warning flag has been cleared." ] _1 } impl From < FCONT_A > for bool { # [ inline ( always ) ] fn from ( variant : FCONT_A ) -> Self { match variant { FCONT_A :: _0 => false , FCONT_A :: _1 => true } } } # [ doc = "Reader of field `FCONT`" ] pub type FCONT_R = crate :: R < bool , FCONT_A > ; impl FCONT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FCONT_A { match self . bits { false => FCONT_A :: _0 , true => FCONT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FCONT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FCONT_A :: _1 } } # [ doc = "Write proxy for field `FCONT`" ] pub struct FCONT_W < 'a > { w : & 'a mut W , } impl < 'a > FCONT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FCONT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "On FIFO error, the SAI will continue from the start of the next frame after the FIFO error flag has been cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FCONT_A :: _0 ) } # [ doc = "On FIFO error, the SAI will continue from the same word that caused the FIFO error to set after the FIFO warning flag has been cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FCONT_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } impl R { # [ doc = "Bit 0 - Frame Sync Direction" ] # [ inline ( always ) ] pub fn fsd ( & self ) -> FSD_R { FSD_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Frame Sync Polarity" ] # [ inline ( always ) ] pub fn fsp ( & self ) -> FSP_R { FSP_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - On Demand Mode" ] # [ inline ( always ) ] pub fn ondem ( & self ) -> ONDEM_R { ONDEM_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Frame Sync Early" ] # [ inline ( always ) ] pub fn fse ( & self ) -> FSE_R { FSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - MSB First" ] # [ inline ( always ) ] pub fn mf ( & self ) -> MF_R { MF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:12 - Sync Width" ] # [ inline ( always ) ] pub fn sywd ( & self ) -> SYWD_R { SYWD_R :: new ( ( ( self . bits >> 8 ) & 0x1f ) as u8 ) } # [ doc = "Bits 16:20 - Frame size" ] # [ inline ( always ) ] pub fn frsz ( & self ) -> FRSZ_R { FRSZ_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bits 24:25 - FIFO Packing Mode" ] # [ inline ( always ) ] pub fn fpack ( & self ) -> FPACK_R { FPACK_R :: new ( ( ( self . bits >> 24 ) & 0x03 ) as u8 ) } # [ doc = "Bits 26:27 - FIFO Combine Mode" ] # [ inline ( always ) ] pub fn fcomb ( & self ) -> FCOMB_R { FCOMB_R :: new ( ( ( self . bits >> 26 ) & 0x03 ) as u8 ) } # [ doc = "Bit 28 - FIFO Continue on Error" ] # [ inline ( always ) ] pub fn fcont ( & self ) -> FCONT_R { FCONT_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Frame Sync Direction" ] # [ inline ( always ) ] pub fn fsd ( & mut self ) -> FSD_W { FSD_W { w : self } } # [ doc = "Bit 1 - Frame Sync Polarity" ] # [ inline ( always ) ] pub fn fsp ( & mut self ) -> FSP_W { FSP_W { w : self } } # [ doc = "Bit 2 - On Demand Mode" ] # [ inline ( always ) ] pub fn ondem ( & mut self ) -> ONDEM_W { ONDEM_W { w : self } } # [ doc = "Bit 3 - Frame Sync Early" ] # [ inline ( always ) ] pub fn fse ( & mut self ) -> FSE_W { FSE_W { w : self } } # [ doc = "Bit 4 - MSB First" ] # [ inline ( always ) ] pub fn mf ( & mut self ) -> MF_W { MF_W { w : self } } # [ doc = "Bits 8:12 - Sync Width" ] # [ inline ( always ) ] pub fn sywd ( & mut self ) -> SYWD_W { SYWD_W { w : self } } # [ doc = "Bits 16:20 - Frame size" ] # [ inline ( always ) ] pub fn frsz ( & mut self ) -> FRSZ_W { FRSZ_W { w : self } } # [ doc = "Bits 24:25 - FIFO Packing Mode" ] # [ inline ( always ) ] pub fn fpack ( & mut self ) -> FPACK_W { FPACK_W { w : self } } # [ doc = "Bits 26:27 - FIFO Combine Mode" ] # [ inline ( always ) ] pub fn fcomb ( & mut self ) -> FCOMB_W { FCOMB_W { w : self } } # [ doc = "Bit 28 - FIFO Continue on Error" ] # [ inline ( always ) ] pub fn fcont ( & mut self ) -> FCONT_W { FCONT_W { w : self } } } } # [ doc = "SAI Transmit Configuration 5 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr5](tcr5) module" ] pub type TCR5 = crate :: Reg < u32 , _TCR5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR5 ; # [ doc = "`read()` method returns [tcr5::R](tcr5::R) reader structure" ] impl crate :: Readable for TCR5 { } # [ doc = "`write(|w| ..)` method takes [tcr5::W](tcr5::W) writer structure" ] impl crate :: Writable for TCR5 { } # [ doc = "SAI Transmit Configuration 5 Register" ] pub mod tcr5 { # [ doc = "Reader of register TCR5" ] pub type R = crate :: R < u32 , super :: TCR5 > ; # [ doc = "Writer for register TCR5" ] pub type W = crate :: W < u32 , super :: TCR5 > ; # [ doc = "Register TCR5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FBT`" ] pub type FBT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FBT`" ] pub struct FBT_W < 'a > { w : & 'a mut W , } impl < 'a > FBT_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 & ! ( 0x1f << 8 ) ) | ( ( ( value as u32 ) & 0x1f ) << 8 ) ; self . w } } # [ doc = "Reader of field `W0W`" ] pub type W0W_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `W0W`" ] pub struct W0W_W < 'a > { w : & 'a mut W , } impl < 'a > W0W_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } # [ doc = "Reader of field `WNW`" ] pub type WNW_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WNW`" ] pub struct WNW_W < 'a > { w : & 'a mut W , } impl < 'a > WNW_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 & ! ( 0x1f << 24 ) ) | ( ( ( value as u32 ) & 0x1f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 8:12 - First Bit Shifted" ] # [ inline ( always ) ] pub fn fbt ( & self ) -> FBT_R { FBT_R :: new ( ( ( self . bits >> 8 ) & 0x1f ) as u8 ) } # [ doc = "Bits 16:20 - Word 0 Width" ] # [ inline ( always ) ] pub fn w0w ( & self ) -> W0W_R { W0W_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bits 24:28 - Word N Width" ] # [ inline ( always ) ] pub fn wnw ( & self ) -> WNW_R { WNW_R :: new ( ( ( self . bits >> 24 ) & 0x1f ) as u8 ) } } impl W { # [ doc = "Bits 8:12 - First Bit Shifted" ] # [ inline ( always ) ] pub fn fbt ( & mut self ) -> FBT_W { FBT_W { w : self } } # [ doc = "Bits 16:20 - Word 0 Width" ] # [ inline ( always ) ] pub fn w0w ( & mut self ) -> W0W_W { W0W_W { w : self } } # [ doc = "Bits 24:28 - Word N Width" ] # [ inline ( always ) ] pub fn wnw ( & mut self ) -> WNW_W { WNW_W { w : self } } } } # [ doc = "SAI Transmit Data Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tdr](tdr) module" ] pub type TDR = crate :: Reg < u32 , _TDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TDR ; # [ doc = "`write(|w| ..)` method takes [tdr::W](tdr::W) writer structure" ] impl crate :: Writable for TDR { } # [ doc = "SAI Transmit Data Register" ] pub mod tdr { # [ doc = "Writer for register TDR%s" ] pub type W = crate :: W < u32 , super :: TDR > ; # [ doc = "Register TDR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `TDR`" ] pub struct TDR_W < 'a > { w : & 'a mut W , } impl < 'a > TDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Transmit Data Register" ] # [ inline ( always ) ] pub fn tdr ( & mut self ) -> TDR_W { TDR_W { w : self } } } } # [ doc = "SAI Transmit FIFO Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tfr](tfr) module" ] pub type TFR = crate :: Reg < u32 , _TFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TFR ; # [ doc = "`read()` method returns [tfr::R](tfr::R) reader structure" ] impl crate :: Readable for TFR { } # [ doc = "SAI Transmit FIFO Register" ] pub mod tfr { # [ doc = "Reader of register TFR%s" ] pub type R = crate :: R < u32 , super :: TFR > ; # [ doc = "Reader of field `RFP`" ] pub type RFP_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `WFP`" ] pub type WFP_R = crate :: R < u8 , u8 > ; # [ doc = "Write Channel Pointer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WCP_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: FIFO combine is enabled for FIFO writes and this FIFO will be written on the next FIFO write." ] _1 } impl From < WCP_A > for bool { # [ inline ( always ) ] fn from ( variant : WCP_A ) -> Self { match variant { WCP_A :: _0 => false , WCP_A :: _1 => true } } } # [ doc = "Reader of field `WCP`" ] pub type WCP_R = crate :: R < bool , WCP_A > ; impl WCP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WCP_A { match self . bits { false => WCP_A :: _0 , true => WCP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WCP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WCP_A :: _1 } } impl R { # [ doc = "Bits 0:3 - Read FIFO Pointer" ] # [ inline ( always ) ] pub fn rfp ( & self ) -> RFP_R { RFP_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Write FIFO Pointer" ] # [ inline ( always ) ] pub fn wfp ( & self ) -> WFP_R { WFP_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 31 - Write Channel Pointer" ] # [ inline ( always ) ] pub fn wcp ( & self ) -> WCP_R { WCP_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "SAI Transmit Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmr](tmr) module" ] pub type TMR = crate :: Reg < u32 , _TMR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TMR ; # [ doc = "`read()` method returns [tmr::R](tmr::R) reader structure" ] impl crate :: Readable for TMR { } # [ doc = "`write(|w| ..)` method takes [tmr::W](tmr::W) writer structure" ] impl crate :: Writable for TMR { } # [ doc = "SAI Transmit Mask Register" ] pub mod tmr { # [ doc = "Reader of register TMR" ] pub type R = crate :: R < u32 , super :: TMR > ; # [ doc = "Writer for register TMR" ] pub type W = crate :: W < u32 , super :: TMR > ; # [ doc = "Register TMR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TMR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM0_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM0_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM0_A ) -> Self { match variant { TWM0_A :: _0 => false , TWM0_A :: _1 => true } } } # [ doc = "Reader of field `TWM0`" ] pub type TWM0_R = crate :: R < bool , TWM0_A > ; impl TWM0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM0_A { match self . bits { false => TWM0_A :: _0 , true => TWM0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM0_A :: _1 } } # [ doc = "Write proxy for field `TWM0`" ] pub struct TWM0_W < 'a > { w : & 'a mut W , } impl < 'a > TWM0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM0_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM1_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM1_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM1_A ) -> Self { match variant { TWM1_A :: _0 => false , TWM1_A :: _1 => true } } } # [ doc = "Reader of field `TWM1`" ] pub type TWM1_R = crate :: R < bool , TWM1_A > ; impl TWM1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM1_A { match self . bits { false => TWM1_A :: _0 , true => TWM1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM1_A :: _1 } } # [ doc = "Write proxy for field `TWM1`" ] pub struct TWM1_W < 'a > { w : & 'a mut W , } impl < 'a > TWM1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM1_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM1_A :: _1 ) } # [ 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 } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM2_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM2_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM2_A ) -> Self { match variant { TWM2_A :: _0 => false , TWM2_A :: _1 => true } } } # [ doc = "Reader of field `TWM2`" ] pub type TWM2_R = crate :: R < bool , TWM2_A > ; impl TWM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM2_A { match self . bits { false => TWM2_A :: _0 , true => TWM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM2_A :: _1 } } # [ doc = "Write proxy for field `TWM2`" ] pub struct TWM2_W < 'a > { w : & 'a mut W , } impl < 'a > TWM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM2_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM2_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM3_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM3_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM3_A ) -> Self { match variant { TWM3_A :: _0 => false , TWM3_A :: _1 => true } } } # [ doc = "Reader of field `TWM3`" ] pub type TWM3_R = crate :: R < bool , TWM3_A > ; impl TWM3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM3_A { match self . bits { false => TWM3_A :: _0 , true => TWM3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM3_A :: _1 } } # [ doc = "Write proxy for field `TWM3`" ] pub struct TWM3_W < 'a > { w : & 'a mut W , } impl < 'a > TWM3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM3_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM4_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM4_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM4_A ) -> Self { match variant { TWM4_A :: _0 => false , TWM4_A :: _1 => true } } } # [ doc = "Reader of field `TWM4`" ] pub type TWM4_R = crate :: R < bool , TWM4_A > ; impl TWM4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM4_A { match self . bits { false => TWM4_A :: _0 , true => TWM4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM4_A :: _1 } } # [ doc = "Write proxy for field `TWM4`" ] pub struct TWM4_W < 'a > { w : & 'a mut W , } impl < 'a > TWM4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM4_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM5_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM5_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM5_A ) -> Self { match variant { TWM5_A :: _0 => false , TWM5_A :: _1 => true } } } # [ doc = "Reader of field `TWM5`" ] pub type TWM5_R = crate :: R < bool , TWM5_A > ; impl TWM5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM5_A { match self . bits { false => TWM5_A :: _0 , true => TWM5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM5_A :: _1 } } # [ doc = "Write proxy for field `TWM5`" ] pub struct TWM5_W < 'a > { w : & 'a mut W , } impl < 'a > TWM5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM5_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM5_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM6_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM6_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM6_A ) -> Self { match variant { TWM6_A :: _0 => false , TWM6_A :: _1 => true } } } # [ doc = "Reader of field `TWM6`" ] pub type TWM6_R = crate :: R < bool , TWM6_A > ; impl TWM6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM6_A { match self . bits { false => TWM6_A :: _0 , true => TWM6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM6_A :: _1 } } # [ doc = "Write proxy for field `TWM6`" ] pub struct TWM6_W < 'a > { w : & 'a mut W , } impl < 'a > TWM6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM6_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM6_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM7_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM7_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM7_A ) -> Self { match variant { TWM7_A :: _0 => false , TWM7_A :: _1 => true } } } # [ doc = "Reader of field `TWM7`" ] pub type TWM7_R = crate :: R < bool , TWM7_A > ; impl TWM7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM7_A { match self . bits { false => TWM7_A :: _0 , true => TWM7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM7_A :: _1 } } # [ doc = "Write proxy for field `TWM7`" ] pub struct TWM7_W < 'a > { w : & 'a mut W , } impl < 'a > TWM7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM7_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM7_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM8_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM8_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM8_A ) -> Self { match variant { TWM8_A :: _0 => false , TWM8_A :: _1 => true } } } # [ doc = "Reader of field `TWM8`" ] pub type TWM8_R = crate :: R < bool , TWM8_A > ; impl TWM8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM8_A { match self . bits { false => TWM8_A :: _0 , true => TWM8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM8_A :: _1 } } # [ doc = "Write proxy for field `TWM8`" ] pub struct TWM8_W < 'a > { w : & 'a mut W , } impl < 'a > TWM8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM8_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM9_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM9_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM9_A ) -> Self { match variant { TWM9_A :: _0 => false , TWM9_A :: _1 => true } } } # [ doc = "Reader of field `TWM9`" ] pub type TWM9_R = crate :: R < bool , TWM9_A > ; impl TWM9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM9_A { match self . bits { false => TWM9_A :: _0 , true => TWM9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM9_A :: _1 } } # [ doc = "Write proxy for field `TWM9`" ] pub struct TWM9_W < 'a > { w : & 'a mut W , } impl < 'a > TWM9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM9_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM10_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM10_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM10_A ) -> Self { match variant { TWM10_A :: _0 => false , TWM10_A :: _1 => true } } } # [ doc = "Reader of field `TWM10`" ] pub type TWM10_R = crate :: R < bool , TWM10_A > ; impl TWM10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM10_A { match self . bits { false => TWM10_A :: _0 , true => TWM10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM10_A :: _1 } } # [ doc = "Write proxy for field `TWM10`" ] pub struct TWM10_W < 'a > { w : & 'a mut W , } impl < 'a > TWM10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM10_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM11_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM11_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM11_A ) -> Self { match variant { TWM11_A :: _0 => false , TWM11_A :: _1 => true } } } # [ doc = "Reader of field `TWM11`" ] pub type TWM11_R = crate :: R < bool , TWM11_A > ; impl TWM11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM11_A { match self . bits { false => TWM11_A :: _0 , true => TWM11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM11_A :: _1 } } # [ doc = "Write proxy for field `TWM11`" ] pub struct TWM11_W < 'a > { w : & 'a mut W , } impl < 'a > TWM11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM11_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM12_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM12_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM12_A ) -> Self { match variant { TWM12_A :: _0 => false , TWM12_A :: _1 => true } } } # [ doc = "Reader of field `TWM12`" ] pub type TWM12_R = crate :: R < bool , TWM12_A > ; impl TWM12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM12_A { match self . bits { false => TWM12_A :: _0 , true => TWM12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM12_A :: _1 } } # [ doc = "Write proxy for field `TWM12`" ] pub struct TWM12_W < 'a > { w : & 'a mut W , } impl < 'a > TWM12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM12_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM13_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM13_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM13_A ) -> Self { match variant { TWM13_A :: _0 => false , TWM13_A :: _1 => true } } } # [ doc = "Reader of field `TWM13`" ] pub type TWM13_R = crate :: R < bool , TWM13_A > ; impl TWM13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM13_A { match self . bits { false => TWM13_A :: _0 , true => TWM13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM13_A :: _1 } } # [ doc = "Write proxy for field `TWM13`" ] pub struct TWM13_W < 'a > { w : & 'a mut W , } impl < 'a > TWM13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM13_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM13_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM14_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM14_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM14_A ) -> Self { match variant { TWM14_A :: _0 => false , TWM14_A :: _1 => true } } } # [ doc = "Reader of field `TWM14`" ] pub type TWM14_R = crate :: R < bool , TWM14_A > ; impl TWM14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM14_A { match self . bits { false => TWM14_A :: _0 , true => TWM14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM14_A :: _1 } } # [ doc = "Write proxy for field `TWM14`" ] pub struct TWM14_W < 'a > { w : & 'a mut W , } impl < 'a > TWM14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM14_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM15_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM15_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM15_A ) -> Self { match variant { TWM15_A :: _0 => false , TWM15_A :: _1 => true } } } # [ doc = "Reader of field `TWM15`" ] pub type TWM15_R = crate :: R < bool , TWM15_A > ; impl TWM15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM15_A { match self . bits { false => TWM15_A :: _0 , true => TWM15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM15_A :: _1 } } # [ doc = "Write proxy for field `TWM15`" ] pub struct TWM15_W < 'a > { w : & 'a mut W , } impl < 'a > TWM15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM15_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM16_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM16_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM16_A ) -> Self { match variant { TWM16_A :: _0 => false , TWM16_A :: _1 => true } } } # [ doc = "Reader of field `TWM16`" ] pub type TWM16_R = crate :: R < bool , TWM16_A > ; impl TWM16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM16_A { match self . bits { false => TWM16_A :: _0 , true => TWM16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM16_A :: _1 } } # [ doc = "Write proxy for field `TWM16`" ] pub struct TWM16_W < 'a > { w : & 'a mut W , } impl < 'a > TWM16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM16_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM17_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM17_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM17_A ) -> Self { match variant { TWM17_A :: _0 => false , TWM17_A :: _1 => true } } } # [ doc = "Reader of field `TWM17`" ] pub type TWM17_R = crate :: R < bool , TWM17_A > ; impl TWM17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM17_A { match self . bits { false => TWM17_A :: _0 , true => TWM17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM17_A :: _1 } } # [ doc = "Write proxy for field `TWM17`" ] pub struct TWM17_W < 'a > { w : & 'a mut W , } impl < 'a > TWM17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM17_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM18_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM18_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM18_A ) -> Self { match variant { TWM18_A :: _0 => false , TWM18_A :: _1 => true } } } # [ doc = "Reader of field `TWM18`" ] pub type TWM18_R = crate :: R < bool , TWM18_A > ; impl TWM18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM18_A { match self . bits { false => TWM18_A :: _0 , true => TWM18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM18_A :: _1 } } # [ doc = "Write proxy for field `TWM18`" ] pub struct TWM18_W < 'a > { w : & 'a mut W , } impl < 'a > TWM18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM18_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM19_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM19_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM19_A ) -> Self { match variant { TWM19_A :: _0 => false , TWM19_A :: _1 => true } } } # [ doc = "Reader of field `TWM19`" ] pub type TWM19_R = crate :: R < bool , TWM19_A > ; impl TWM19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM19_A { match self . bits { false => TWM19_A :: _0 , true => TWM19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM19_A :: _1 } } # [ doc = "Write proxy for field `TWM19`" ] pub struct TWM19_W < 'a > { w : & 'a mut W , } impl < 'a > TWM19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM19_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM20_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM20_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM20_A ) -> Self { match variant { TWM20_A :: _0 => false , TWM20_A :: _1 => true } } } # [ doc = "Reader of field `TWM20`" ] pub type TWM20_R = crate :: R < bool , TWM20_A > ; impl TWM20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM20_A { match self . bits { false => TWM20_A :: _0 , true => TWM20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM20_A :: _1 } } # [ doc = "Write proxy for field `TWM20`" ] pub struct TWM20_W < 'a > { w : & 'a mut W , } impl < 'a > TWM20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM20_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM20_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM21_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM21_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM21_A ) -> Self { match variant { TWM21_A :: _0 => false , TWM21_A :: _1 => true } } } # [ doc = "Reader of field `TWM21`" ] pub type TWM21_R = crate :: R < bool , TWM21_A > ; impl TWM21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM21_A { match self . bits { false => TWM21_A :: _0 , true => TWM21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM21_A :: _1 } } # [ doc = "Write proxy for field `TWM21`" ] pub struct TWM21_W < 'a > { w : & 'a mut W , } impl < 'a > TWM21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM21_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM21_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM22_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM22_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM22_A ) -> Self { match variant { TWM22_A :: _0 => false , TWM22_A :: _1 => true } } } # [ doc = "Reader of field `TWM22`" ] pub type TWM22_R = crate :: R < bool , TWM22_A > ; impl TWM22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM22_A { match self . bits { false => TWM22_A :: _0 , true => TWM22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM22_A :: _1 } } # [ doc = "Write proxy for field `TWM22`" ] pub struct TWM22_W < 'a > { w : & 'a mut W , } impl < 'a > TWM22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM22_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM23_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM23_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM23_A ) -> Self { match variant { TWM23_A :: _0 => false , TWM23_A :: _1 => true } } } # [ doc = "Reader of field `TWM23`" ] pub type TWM23_R = crate :: R < bool , TWM23_A > ; impl TWM23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM23_A { match self . bits { false => TWM23_A :: _0 , true => TWM23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM23_A :: _1 } } # [ doc = "Write proxy for field `TWM23`" ] pub struct TWM23_W < 'a > { w : & 'a mut W , } impl < 'a > TWM23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM23_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM24_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM24_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM24_A ) -> Self { match variant { TWM24_A :: _0 => false , TWM24_A :: _1 => true } } } # [ doc = "Reader of field `TWM24`" ] pub type TWM24_R = crate :: R < bool , TWM24_A > ; impl TWM24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM24_A { match self . bits { false => TWM24_A :: _0 , true => TWM24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM24_A :: _1 } } # [ doc = "Write proxy for field `TWM24`" ] pub struct TWM24_W < 'a > { w : & 'a mut W , } impl < 'a > TWM24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM24_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM24_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM25_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM25_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM25_A ) -> Self { match variant { TWM25_A :: _0 => false , TWM25_A :: _1 => true } } } # [ doc = "Reader of field `TWM25`" ] pub type TWM25_R = crate :: R < bool , TWM25_A > ; impl TWM25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM25_A { match self . bits { false => TWM25_A :: _0 , true => TWM25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM25_A :: _1 } } # [ doc = "Write proxy for field `TWM25`" ] pub struct TWM25_W < 'a > { w : & 'a mut W , } impl < 'a > TWM25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM25_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM25_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM26_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM26_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM26_A ) -> Self { match variant { TWM26_A :: _0 => false , TWM26_A :: _1 => true } } } # [ doc = "Reader of field `TWM26`" ] pub type TWM26_R = crate :: R < bool , TWM26_A > ; impl TWM26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM26_A { match self . bits { false => TWM26_A :: _0 , true => TWM26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM26_A :: _1 } } # [ doc = "Write proxy for field `TWM26`" ] pub struct TWM26_W < 'a > { w : & 'a mut W , } impl < 'a > TWM26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM26_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM26_A :: _1 ) } # [ 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 = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM27_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM27_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM27_A ) -> Self { match variant { TWM27_A :: _0 => false , TWM27_A :: _1 => true } } } # [ doc = "Reader of field `TWM27`" ] pub type TWM27_R = crate :: R < bool , TWM27_A > ; impl TWM27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM27_A { match self . bits { false => TWM27_A :: _0 , true => TWM27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM27_A :: _1 } } # [ doc = "Write proxy for field `TWM27`" ] pub struct TWM27_W < 'a > { w : & 'a mut W , } impl < 'a > TWM27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM27_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM28_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM28_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM28_A ) -> Self { match variant { TWM28_A :: _0 => false , TWM28_A :: _1 => true } } } # [ doc = "Reader of field `TWM28`" ] pub type TWM28_R = crate :: R < bool , TWM28_A > ; impl TWM28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM28_A { match self . bits { false => TWM28_A :: _0 , true => TWM28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM28_A :: _1 } } # [ doc = "Write proxy for field `TWM28`" ] pub struct TWM28_W < 'a > { w : & 'a mut W , } impl < 'a > TWM28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM28_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM29_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM29_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM29_A ) -> Self { match variant { TWM29_A :: _0 => false , TWM29_A :: _1 => true } } } # [ doc = "Reader of field `TWM29`" ] pub type TWM29_R = crate :: R < bool , TWM29_A > ; impl TWM29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM29_A { match self . bits { false => TWM29_A :: _0 , true => TWM29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM29_A :: _1 } } # [ doc = "Write proxy for field `TWM29`" ] pub struct TWM29_W < 'a > { w : & 'a mut W , } impl < 'a > TWM29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM29_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM30_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM30_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM30_A ) -> Self { match variant { TWM30_A :: _0 => false , TWM30_A :: _1 => true } } } # [ doc = "Reader of field `TWM30`" ] pub type TWM30_R = crate :: R < bool , TWM30_A > ; impl TWM30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM30_A { match self . bits { false => TWM30_A :: _0 , true => TWM30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM30_A :: _1 } } # [ doc = "Write proxy for field `TWM30`" ] pub struct TWM30_W < 'a > { w : & 'a mut W , } impl < 'a > TWM30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM30_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Transmit Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TWM31_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked. The transmit data pins are tri-stated when masked." ] _1 } impl From < TWM31_A > for bool { # [ inline ( always ) ] fn from ( variant : TWM31_A ) -> Self { match variant { TWM31_A :: _0 => false , TWM31_A :: _1 => true } } } # [ doc = "Reader of field `TWM31`" ] pub type TWM31_R = crate :: R < bool , TWM31_A > ; impl TWM31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TWM31_A { match self . bits { false => TWM31_A :: _0 , true => TWM31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TWM31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TWM31_A :: _1 } } # [ doc = "Write proxy for field `TWM31`" ] pub struct TWM31_W < 'a > { w : & 'a mut W , } impl < 'a > TWM31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TWM31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TWM31_A :: _0 ) } # [ doc = "Word N is masked. The transmit data pins are tri-stated when masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TWM31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm0 ( & self ) -> TWM0_R { TWM0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm1 ( & self ) -> TWM1_R { TWM1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm2 ( & self ) -> TWM2_R { TWM2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm3 ( & self ) -> TWM3_R { TWM3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm4 ( & self ) -> TWM4_R { TWM4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm5 ( & self ) -> TWM5_R { TWM5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm6 ( & self ) -> TWM6_R { TWM6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm7 ( & self ) -> TWM7_R { TWM7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm8 ( & self ) -> TWM8_R { TWM8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm9 ( & self ) -> TWM9_R { TWM9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm10 ( & self ) -> TWM10_R { TWM10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm11 ( & self ) -> TWM11_R { TWM11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm12 ( & self ) -> TWM12_R { TWM12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm13 ( & self ) -> TWM13_R { TWM13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm14 ( & self ) -> TWM14_R { TWM14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm15 ( & self ) -> TWM15_R { TWM15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm16 ( & self ) -> TWM16_R { TWM16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm17 ( & self ) -> TWM17_R { TWM17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm18 ( & self ) -> TWM18_R { TWM18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm19 ( & self ) -> TWM19_R { TWM19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm20 ( & self ) -> TWM20_R { TWM20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm21 ( & self ) -> TWM21_R { TWM21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm22 ( & self ) -> TWM22_R { TWM22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm23 ( & self ) -> TWM23_R { TWM23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm24 ( & self ) -> TWM24_R { TWM24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm25 ( & self ) -> TWM25_R { TWM25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm26 ( & self ) -> TWM26_R { TWM26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm27 ( & self ) -> TWM27_R { TWM27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm28 ( & self ) -> TWM28_R { TWM28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm29 ( & self ) -> TWM29_R { TWM29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm30 ( & self ) -> TWM30_R { TWM30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm31 ( & self ) -> TWM31_R { TWM31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm0 ( & mut self ) -> TWM0_W { TWM0_W { w : self } } # [ doc = "Bit 1 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm1 ( & mut self ) -> TWM1_W { TWM1_W { w : self } } # [ doc = "Bit 2 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm2 ( & mut self ) -> TWM2_W { TWM2_W { w : self } } # [ doc = "Bit 3 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm3 ( & mut self ) -> TWM3_W { TWM3_W { w : self } } # [ doc = "Bit 4 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm4 ( & mut self ) -> TWM4_W { TWM4_W { w : self } } # [ doc = "Bit 5 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm5 ( & mut self ) -> TWM5_W { TWM5_W { w : self } } # [ doc = "Bit 6 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm6 ( & mut self ) -> TWM6_W { TWM6_W { w : self } } # [ doc = "Bit 7 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm7 ( & mut self ) -> TWM7_W { TWM7_W { w : self } } # [ doc = "Bit 8 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm8 ( & mut self ) -> TWM8_W { TWM8_W { w : self } } # [ doc = "Bit 9 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm9 ( & mut self ) -> TWM9_W { TWM9_W { w : self } } # [ doc = "Bit 10 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm10 ( & mut self ) -> TWM10_W { TWM10_W { w : self } } # [ doc = "Bit 11 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm11 ( & mut self ) -> TWM11_W { TWM11_W { w : self } } # [ doc = "Bit 12 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm12 ( & mut self ) -> TWM12_W { TWM12_W { w : self } } # [ doc = "Bit 13 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm13 ( & mut self ) -> TWM13_W { TWM13_W { w : self } } # [ doc = "Bit 14 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm14 ( & mut self ) -> TWM14_W { TWM14_W { w : self } } # [ doc = "Bit 15 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm15 ( & mut self ) -> TWM15_W { TWM15_W { w : self } } # [ doc = "Bit 16 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm16 ( & mut self ) -> TWM16_W { TWM16_W { w : self } } # [ doc = "Bit 17 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm17 ( & mut self ) -> TWM17_W { TWM17_W { w : self } } # [ doc = "Bit 18 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm18 ( & mut self ) -> TWM18_W { TWM18_W { w : self } } # [ doc = "Bit 19 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm19 ( & mut self ) -> TWM19_W { TWM19_W { w : self } } # [ doc = "Bit 20 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm20 ( & mut self ) -> TWM20_W { TWM20_W { w : self } } # [ doc = "Bit 21 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm21 ( & mut self ) -> TWM21_W { TWM21_W { w : self } } # [ doc = "Bit 22 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm22 ( & mut self ) -> TWM22_W { TWM22_W { w : self } } # [ doc = "Bit 23 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm23 ( & mut self ) -> TWM23_W { TWM23_W { w : self } } # [ doc = "Bit 24 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm24 ( & mut self ) -> TWM24_W { TWM24_W { w : self } } # [ doc = "Bit 25 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm25 ( & mut self ) -> TWM25_W { TWM25_W { w : self } } # [ doc = "Bit 26 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm26 ( & mut self ) -> TWM26_W { TWM26_W { w : self } } # [ doc = "Bit 27 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm27 ( & mut self ) -> TWM27_W { TWM27_W { w : self } } # [ doc = "Bit 28 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm28 ( & mut self ) -> TWM28_W { TWM28_W { w : self } } # [ doc = "Bit 29 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm29 ( & mut self ) -> TWM29_W { TWM29_W { w : self } } # [ doc = "Bit 30 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm30 ( & mut self ) -> TWM30_W { TWM30_W { w : self } } # [ doc = "Bit 31 - Transmit Word Mask" ] # [ inline ( always ) ] pub fn twm31 ( & mut self ) -> TWM31_W { TWM31_W { w : self } } } } # [ doc = "SAI Receive Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcsr](rcsr) module" ] pub type RCSR = crate :: Reg < u32 , _RCSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCSR ; # [ doc = "`read()` method returns [rcsr::R](rcsr::R) reader structure" ] impl crate :: Readable for RCSR { } # [ doc = "`write(|w| ..)` method takes [rcsr::W](rcsr::W) writer structure" ] impl crate :: Writable for RCSR { } # [ doc = "SAI Receive Control Register" ] pub mod rcsr { # [ doc = "Reader of register RCSR" ] pub type R = crate :: R < u32 , super :: RCSR > ; # [ doc = "Writer for register RCSR" ] pub type W = crate :: W < u32 , super :: RCSR > ; # [ doc = "Register RCSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RCSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "FIFO Request DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRDE_A { # [ doc = "0: Disables the DMA request." ] _0 , # [ doc = "1: Enables the DMA request." ] _1 } impl From < FRDE_A > for bool { # [ inline ( always ) ] fn from ( variant : FRDE_A ) -> Self { match variant { FRDE_A :: _0 => false , FRDE_A :: _1 => true } } } # [ doc = "Reader of field `FRDE`" ] pub type FRDE_R = crate :: R < bool , FRDE_A > ; impl FRDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRDE_A { match self . bits { false => FRDE_A :: _0 , true => FRDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRDE_A :: _1 } } # [ doc = "Write proxy for field `FRDE`" ] pub struct FRDE_W < 'a > { w : & 'a mut W , } impl < 'a > FRDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the DMA request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRDE_A :: _0 ) } # [ doc = "Enables the DMA request." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRDE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "FIFO Warning DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FWDE_A { # [ doc = "0: Disables the DMA request." ] _0 , # [ doc = "1: Enables the DMA request." ] _1 } impl From < FWDE_A > for bool { # [ inline ( always ) ] fn from ( variant : FWDE_A ) -> Self { match variant { FWDE_A :: _0 => false , FWDE_A :: _1 => true } } } # [ doc = "Reader of field `FWDE`" ] pub type FWDE_R = crate :: R < bool , FWDE_A > ; impl FWDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FWDE_A { match self . bits { false => FWDE_A :: _0 , true => FWDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FWDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FWDE_A :: _1 } } # [ doc = "Write proxy for field `FWDE`" ] pub struct FWDE_W < 'a > { w : & 'a mut W , } impl < 'a > FWDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FWDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the DMA request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FWDE_A :: _0 ) } # [ doc = "Enables the DMA request." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FWDE_A :: _1 ) } # [ 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 } } # [ doc = "FIFO Request Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRIE_A { # [ doc = "0: Disables the interrupt." ] _0 , # [ doc = "1: Enables the interrupt." ] _1 } impl From < FRIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FRIE_A ) -> Self { match variant { FRIE_A :: _0 => false , FRIE_A :: _1 => true } } } # [ doc = "Reader of field `FRIE`" ] pub type FRIE_R = crate :: R < bool , FRIE_A > ; impl FRIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRIE_A { match self . bits { false => FRIE_A :: _0 , true => FRIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRIE_A :: _1 } } # [ doc = "Write proxy for field `FRIE`" ] pub struct FRIE_W < 'a > { w : & 'a mut W , } impl < 'a > FRIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRIE_A :: _0 ) } # [ doc = "Enables the interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRIE_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "FIFO Warning Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FWIE_A { # [ doc = "0: Disables the interrupt." ] _0 , # [ doc = "1: Enables the interrupt." ] _1 } impl From < FWIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FWIE_A ) -> Self { match variant { FWIE_A :: _0 => false , FWIE_A :: _1 => true } } } # [ doc = "Reader of field `FWIE`" ] pub type FWIE_R = crate :: R < bool , FWIE_A > ; impl FWIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FWIE_A { match self . bits { false => FWIE_A :: _0 , true => FWIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FWIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FWIE_A :: _1 } } # [ doc = "Write proxy for field `FWIE`" ] pub struct FWIE_W < 'a > { w : & 'a mut W , } impl < 'a > FWIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FWIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FWIE_A :: _0 ) } # [ doc = "Enables the interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FWIE_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "FIFO Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEIE_A { # [ doc = "0: Disables the interrupt." ] _0 , # [ doc = "1: Enables the interrupt." ] _1 } impl From < FEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FEIE_A ) -> Self { match variant { FEIE_A :: _0 => false , FEIE_A :: _1 => true } } } # [ doc = "Reader of field `FEIE`" ] pub type FEIE_R = crate :: R < bool , FEIE_A > ; impl FEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEIE_A { match self . bits { false => FEIE_A :: _0 , true => FEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEIE_A :: _1 } } # [ doc = "Write proxy for field `FEIE`" ] pub struct FEIE_W < 'a > { w : & 'a mut W , } impl < 'a > FEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _0 ) } # [ doc = "Enables the interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Sync Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEIE_A { # [ doc = "0: Disables interrupt." ] _0 , # [ doc = "1: Enables interrupt." ] _1 } impl From < SEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : SEIE_A ) -> Self { match variant { SEIE_A :: _0 => false , SEIE_A :: _1 => true } } } # [ doc = "Reader of field `SEIE`" ] pub type SEIE_R = crate :: R < bool , SEIE_A > ; impl SEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEIE_A { match self . bits { false => SEIE_A :: _0 , true => SEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SEIE_A :: _1 } } # [ doc = "Write proxy for field `SEIE`" ] pub struct SEIE_W < 'a > { w : & 'a mut W , } impl < 'a > SEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SEIE_A :: _0 ) } # [ doc = "Enables interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SEIE_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Word Start Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WSIE_A { # [ doc = "0: Disables interrupt." ] _0 , # [ doc = "1: Enables interrupt." ] _1 } impl From < WSIE_A > for bool { # [ inline ( always ) ] fn from ( variant : WSIE_A ) -> Self { match variant { WSIE_A :: _0 => false , WSIE_A :: _1 => true } } } # [ doc = "Reader of field `WSIE`" ] pub type WSIE_R = crate :: R < bool , WSIE_A > ; impl WSIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WSIE_A { match self . bits { false => WSIE_A :: _0 , true => WSIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WSIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WSIE_A :: _1 } } # [ doc = "Write proxy for field `WSIE`" ] pub struct WSIE_W < 'a > { w : & 'a mut W , } impl < 'a > WSIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WSIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WSIE_A :: _0 ) } # [ doc = "Enables interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WSIE_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "FIFO Request Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRF_A { # [ doc = "0: Receive FIFO watermark not reached." ] _0 , # [ doc = "1: Receive FIFO watermark has been reached." ] _1 } impl From < FRF_A > for bool { # [ inline ( always ) ] fn from ( variant : FRF_A ) -> Self { match variant { FRF_A :: _0 => false , FRF_A :: _1 => true } } } # [ doc = "Reader of field `FRF`" ] pub type FRF_R = crate :: R < bool , FRF_A > ; impl FRF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRF_A { match self . bits { false => FRF_A :: _0 , true => FRF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRF_A :: _1 } } # [ doc = "FIFO Warning Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FWF_A { # [ doc = "0: No enabled receive FIFO is full." ] _0 , # [ doc = "1: Enabled receive FIFO is full." ] _1 } impl From < FWF_A > for bool { # [ inline ( always ) ] fn from ( variant : FWF_A ) -> Self { match variant { FWF_A :: _0 => false , FWF_A :: _1 => true } } } # [ doc = "Reader of field `FWF`" ] pub type FWF_R = crate :: R < bool , FWF_A > ; impl FWF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FWF_A { match self . bits { false => FWF_A :: _0 , true => FWF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FWF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FWF_A :: _1 } } # [ doc = "FIFO Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEF_A { # [ doc = "0: Receive overflow not detected." ] _0 , # [ doc = "1: Receive overflow detected." ] _1 } impl From < FEF_A > for bool { # [ inline ( always ) ] fn from ( variant : FEF_A ) -> Self { match variant { FEF_A :: _0 => false , FEF_A :: _1 => true } } } # [ doc = "Reader of field `FEF`" ] pub type FEF_R = crate :: R < bool , FEF_A > ; impl FEF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEF_A { match self . bits { false => FEF_A :: _0 , true => FEF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEF_A :: _1 } } # [ doc = "Write proxy for field `FEF`" ] pub struct FEF_W < 'a > { w : & 'a mut W , } impl < 'a > FEF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive overflow not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEF_A :: _0 ) } # [ doc = "Receive overflow detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEF_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Sync Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEF_A { # [ doc = "0: Sync error not detected." ] _0 , # [ doc = "1: Frame sync error detected." ] _1 } impl From < SEF_A > for bool { # [ inline ( always ) ] fn from ( variant : SEF_A ) -> Self { match variant { SEF_A :: _0 => false , SEF_A :: _1 => true } } } # [ doc = "Reader of field `SEF`" ] pub type SEF_R = crate :: R < bool , SEF_A > ; impl SEF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEF_A { match self . bits { false => SEF_A :: _0 , true => SEF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SEF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SEF_A :: _1 } } # [ doc = "Write proxy for field `SEF`" ] pub struct SEF_W < 'a > { w : & 'a mut W , } impl < 'a > SEF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SEF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sync error not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SEF_A :: _0 ) } # [ doc = "Frame sync error detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SEF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Word Start Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WSF_A { # [ doc = "0: Start of word not detected." ] _0 , # [ doc = "1: Start of word detected." ] _1 } impl From < WSF_A > for bool { # [ inline ( always ) ] fn from ( variant : WSF_A ) -> Self { match variant { WSF_A :: _0 => false , WSF_A :: _1 => true } } } # [ doc = "Reader of field `WSF`" ] pub type WSF_R = crate :: R < bool , WSF_A > ; impl WSF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WSF_A { match self . bits { false => WSF_A :: _0 , true => WSF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WSF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WSF_A :: _1 } } # [ doc = "Write proxy for field `WSF`" ] pub struct WSF_W < 'a > { w : & 'a mut W , } impl < 'a > WSF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WSF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Start of word not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WSF_A :: _0 ) } # [ doc = "Start of word detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WSF_A :: _1 ) } # [ 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 = "Software Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SR_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Software reset." ] _1 } impl From < SR_A > for bool { # [ inline ( always ) ] fn from ( variant : SR_A ) -> Self { match variant { SR_A :: _0 => false , SR_A :: _1 => true } } } # [ doc = "Reader of field `SR`" ] pub type SR_R = crate :: R < bool , SR_A > ; impl SR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SR_A { match self . bits { false => SR_A :: _0 , true => SR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SR_A :: _1 } } # [ doc = "Write proxy for field `SR`" ] pub struct SR_W < 'a > { w : & 'a mut W , } impl < 'a > SR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SR_A :: _0 ) } # [ doc = "Software reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SR_A :: _1 ) } # [ 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 = "FIFO Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FR_AW { # [ doc = "0: No effect." ] _0 , # [ doc = "1: FIFO reset." ] _1 } impl From < FR_AW > for bool { # [ inline ( always ) ] fn from ( variant : FR_AW ) -> Self { match variant { FR_AW :: _0 => false , FR_AW :: _1 => true } } } # [ doc = "Write proxy for field `FR`" ] pub struct FR_W < 'a > { w : & 'a mut W , } impl < 'a > FR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FR_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FR_AW :: _0 ) } # [ doc = "FIFO reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FR_AW :: _1 ) } # [ 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 = "Bit Clock Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCE_A { # [ doc = "0: Receive bit clock is disabled." ] _0 , # [ doc = "1: Receive bit clock is enabled." ] _1 } impl From < BCE_A > for bool { # [ inline ( always ) ] fn from ( variant : BCE_A ) -> Self { match variant { BCE_A :: _0 => false , BCE_A :: _1 => true } } } # [ doc = "Reader of field `BCE`" ] pub type BCE_R = crate :: R < bool , BCE_A > ; impl BCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCE_A { match self . bits { false => BCE_A :: _0 , true => BCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCE_A :: _1 } } # [ doc = "Write proxy for field `BCE`" ] pub struct BCE_W < 'a > { w : & 'a mut W , } impl < 'a > BCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive bit clock is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCE_A :: _0 ) } # [ doc = "Receive bit clock is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Debug Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBGE_A { # [ doc = "0: Receiver is disabled in Debug mode, after completing the current frame." ] _0 , # [ doc = "1: Receiver is enabled in Debug mode." ] _1 } impl From < DBGE_A > for bool { # [ inline ( always ) ] fn from ( variant : DBGE_A ) -> Self { match variant { DBGE_A :: _0 => false , DBGE_A :: _1 => true } } } # [ doc = "Reader of field `DBGE`" ] pub type DBGE_R = crate :: R < bool , DBGE_A > ; impl DBGE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBGE_A { match self . bits { false => DBGE_A :: _0 , true => DBGE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBGE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBGE_A :: _1 } } # [ doc = "Write proxy for field `DBGE`" ] pub struct DBGE_W < 'a > { w : & 'a mut W , } impl < 'a > DBGE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBGE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver is disabled in Debug mode, after completing the current frame." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DBGE_A :: _0 ) } # [ doc = "Receiver is enabled in Debug mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DBGE_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Stop Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPE_A { # [ doc = "0: Receiver disabled in Stop mode." ] _0 , # [ doc = "1: Receiver enabled in Stop mode." ] _1 } impl From < STOPE_A > for bool { # [ inline ( always ) ] fn from ( variant : STOPE_A ) -> Self { match variant { STOPE_A :: _0 => false , STOPE_A :: _1 => true } } } # [ doc = "Reader of field `STOPE`" ] pub type STOPE_R = crate :: R < bool , STOPE_A > ; impl STOPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STOPE_A { match self . bits { false => STOPE_A :: _0 , true => STOPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STOPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STOPE_A :: _1 } } # [ doc = "Write proxy for field `STOPE`" ] pub struct STOPE_W < 'a > { w : & 'a mut W , } impl < 'a > STOPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STOPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver disabled in Stop mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STOPE_A :: _0 ) } # [ doc = "Receiver enabled in Stop mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STOPE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Receiver Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RE_A { # [ doc = "0: Receiver is disabled." ] _0 , # [ doc = "1: Receiver is enabled, or receiver has been disabled and has not yet reached end of frame." ] _1 } impl From < RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RE_A ) -> Self { match variant { RE_A :: _0 => false , RE_A :: _1 => true } } } # [ doc = "Reader of field `RE`" ] pub type RE_R = crate :: R < bool , RE_A > ; impl RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RE_A { match self . bits { false => RE_A :: _0 , true => RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RE_A :: _1 } } # [ doc = "Write proxy for field `RE`" ] pub struct RE_W < 'a > { w : & 'a mut W , } impl < 'a > RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RE_A :: _0 ) } # [ doc = "Receiver is enabled, or receiver has been disabled and has not yet reached end of frame." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - FIFO Request DMA Enable" ] # [ inline ( always ) ] pub fn frde ( & self ) -> FRDE_R { FRDE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - FIFO Warning DMA Enable" ] # [ inline ( always ) ] pub fn fwde ( & self ) -> FWDE_R { FWDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - FIFO Request Interrupt Enable" ] # [ inline ( always ) ] pub fn frie ( & self ) -> FRIE_R { FRIE_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - FIFO Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn fwie ( & self ) -> FWIE_R { FWIE_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - FIFO Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & self ) -> FEIE_R { FEIE_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Sync Error Interrupt Enable" ] # [ inline ( always ) ] pub fn seie ( & self ) -> SEIE_R { SEIE_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Word Start Interrupt Enable" ] # [ inline ( always ) ] pub fn wsie ( & self ) -> WSIE_R { WSIE_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - FIFO Request Flag" ] # [ inline ( always ) ] pub fn frf ( & self ) -> FRF_R { FRF_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - FIFO Warning Flag" ] # [ inline ( always ) ] pub fn fwf ( & self ) -> FWF_R { FWF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - FIFO Error Flag" ] # [ inline ( always ) ] pub fn fef ( & self ) -> FEF_R { FEF_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Sync Error Flag" ] # [ inline ( always ) ] pub fn sef ( & self ) -> SEF_R { SEF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Word Start Flag" ] # [ inline ( always ) ] pub fn wsf ( & self ) -> WSF_R { WSF_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Software Reset" ] # [ inline ( always ) ] pub fn sr ( & self ) -> SR_R { SR_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Bit Clock Enable" ] # [ inline ( always ) ] pub fn bce ( & self ) -> BCE_R { BCE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Debug Enable" ] # [ inline ( always ) ] pub fn dbge ( & self ) -> DBGE_R { DBGE_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Stop Enable" ] # [ inline ( always ) ] pub fn stope ( & self ) -> STOPE_R { STOPE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & self ) -> RE_R { RE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FIFO Request DMA Enable" ] # [ inline ( always ) ] pub fn frde ( & mut self ) -> FRDE_W { FRDE_W { w : self } } # [ doc = "Bit 1 - FIFO Warning DMA Enable" ] # [ inline ( always ) ] pub fn fwde ( & mut self ) -> FWDE_W { FWDE_W { w : self } } # [ doc = "Bit 8 - FIFO Request Interrupt Enable" ] # [ inline ( always ) ] pub fn frie ( & mut self ) -> FRIE_W { FRIE_W { w : self } } # [ doc = "Bit 9 - FIFO Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn fwie ( & mut self ) -> FWIE_W { FWIE_W { w : self } } # [ doc = "Bit 10 - FIFO Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & mut self ) -> FEIE_W { FEIE_W { w : self } } # [ doc = "Bit 11 - Sync Error Interrupt Enable" ] # [ inline ( always ) ] pub fn seie ( & mut self ) -> SEIE_W { SEIE_W { w : self } } # [ doc = "Bit 12 - Word Start Interrupt Enable" ] # [ inline ( always ) ] pub fn wsie ( & mut self ) -> WSIE_W { WSIE_W { w : self } } # [ doc = "Bit 18 - FIFO Error Flag" ] # [ inline ( always ) ] pub fn fef ( & mut self ) -> FEF_W { FEF_W { w : self } } # [ doc = "Bit 19 - Sync Error Flag" ] # [ inline ( always ) ] pub fn sef ( & mut self ) -> SEF_W { SEF_W { w : self } } # [ doc = "Bit 20 - Word Start Flag" ] # [ inline ( always ) ] pub fn wsf ( & mut self ) -> WSF_W { WSF_W { w : self } } # [ doc = "Bit 24 - Software Reset" ] # [ inline ( always ) ] pub fn sr ( & mut self ) -> SR_W { SR_W { w : self } } # [ doc = "Bit 25 - FIFO Reset" ] # [ inline ( always ) ] pub fn fr ( & mut self ) -> FR_W { FR_W { w : self } } # [ doc = "Bit 28 - Bit Clock Enable" ] # [ inline ( always ) ] pub fn bce ( & mut self ) -> BCE_W { BCE_W { w : self } } # [ doc = "Bit 29 - Debug Enable" ] # [ inline ( always ) ] pub fn dbge ( & mut self ) -> DBGE_W { DBGE_W { w : self } } # [ doc = "Bit 30 - Stop Enable" ] # [ inline ( always ) ] pub fn stope ( & mut self ) -> STOPE_W { STOPE_W { w : self } } # [ doc = "Bit 31 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & mut self ) -> RE_W { RE_W { w : self } } } } # [ doc = "SAI Receive Configuration 1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcr1](rcr1) module" ] pub type RCR1 = crate :: Reg < u32 , _RCR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCR1 ; # [ doc = "`read()` method returns [rcr1::R](rcr1::R) reader structure" ] impl crate :: Readable for RCR1 { } # [ doc = "`write(|w| ..)` method takes [rcr1::W](rcr1::W) writer structure" ] impl crate :: Writable for RCR1 { } # [ doc = "SAI Receive Configuration 1 Register" ] pub mod rcr1 { # [ doc = "Reader of register RCR1" ] pub type R = crate :: R < u32 , super :: RCR1 > ; # [ doc = "Writer for register RCR1" ] pub type W = crate :: W < u32 , super :: RCR1 > ; # [ doc = "Register RCR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RCR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RFW`" ] pub type RFW_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RFW`" ] pub struct RFW_W < 'a > { w : & 'a mut W , } impl < 'a > RFW_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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Receive FIFO Watermark" ] # [ inline ( always ) ] pub fn rfw ( & self ) -> RFW_R { RFW_R :: new ( ( self . bits & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Receive FIFO Watermark" ] # [ inline ( always ) ] pub fn rfw ( & mut self ) -> RFW_W { RFW_W { w : self } } } } # [ doc = "SAI Receive Configuration 2 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcr2](rcr2) module" ] pub type RCR2 = crate :: Reg < u32 , _RCR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCR2 ; # [ doc = "`read()` method returns [rcr2::R](rcr2::R) reader structure" ] impl crate :: Readable for RCR2 { } # [ doc = "`write(|w| ..)` method takes [rcr2::W](rcr2::W) writer structure" ] impl crate :: Writable for RCR2 { } # [ doc = "SAI Receive Configuration 2 Register" ] pub mod rcr2 { # [ doc = "Reader of register RCR2" ] pub type R = crate :: R < u32 , super :: RCR2 > ; # [ doc = "Writer for register RCR2" ] pub type W = crate :: W < u32 , super :: RCR2 > ; # [ doc = "Register RCR2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RCR2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DIV`" ] pub type DIV_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DIV`" ] pub struct DIV_W < 'a > { w : & 'a mut W , } impl < 'a > DIV_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Bit Clock Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCD_A { # [ doc = "0: Bit clock is generated externally in Slave mode." ] _0 , # [ doc = "1: Bit clock is generated internally in Master mode." ] _1 } impl From < BCD_A > for bool { # [ inline ( always ) ] fn from ( variant : BCD_A ) -> Self { match variant { BCD_A :: _0 => false , BCD_A :: _1 => true } } } # [ doc = "Reader of field `BCD`" ] pub type BCD_R = crate :: R < bool , BCD_A > ; impl BCD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCD_A { match self . bits { false => BCD_A :: _0 , true => BCD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCD_A :: _1 } } # [ doc = "Write proxy for field `BCD`" ] pub struct BCD_W < 'a > { w : & 'a mut W , } impl < 'a > BCD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bit clock is generated externally in Slave mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCD_A :: _0 ) } # [ doc = "Bit clock is generated internally in Master mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCD_A :: _1 ) } # [ 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 = "Bit Clock Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCP_A { # [ doc = "0: Bit Clock is active high with drive outputs on rising edge and sample inputs on falling edge." ] _0 , # [ doc = "1: Bit Clock is active low with drive outputs on falling edge and sample inputs on rising edge." ] _1 } impl From < BCP_A > for bool { # [ inline ( always ) ] fn from ( variant : BCP_A ) -> Self { match variant { BCP_A :: _0 => false , BCP_A :: _1 => true } } } # [ doc = "Reader of field `BCP`" ] pub type BCP_R = crate :: R < bool , BCP_A > ; impl BCP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCP_A { match self . bits { false => BCP_A :: _0 , true => BCP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCP_A :: _1 } } # [ doc = "Write proxy for field `BCP`" ] pub struct BCP_W < 'a > { w : & 'a mut W , } impl < 'a > BCP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bit Clock is active high with drive outputs on rising edge and sample inputs on falling edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCP_A :: _0 ) } # [ doc = "Bit Clock is active low with drive outputs on falling edge and sample inputs on rising edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCP_A :: _1 ) } # [ 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 = "MCLK Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSEL_A { # [ doc = "0: Bus Clock selected." ] _00 , # [ doc = "1: Master Clock (MCLK) 1 option selected." ] _01 , # [ doc = "2: Master Clock (MCLK) 2 option selected." ] _10 , # [ doc = "3: Master Clock (MCLK) 3 option selected." ] _11 } impl From < MSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : MSEL_A ) -> Self { match variant { MSEL_A :: _00 => 0 , MSEL_A :: _01 => 1 , MSEL_A :: _10 => 2 , MSEL_A :: _11 => 3 } } } # [ doc = "Reader of field `MSEL`" ] pub type MSEL_R = crate :: R < u8 , MSEL_A > ; impl MSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSEL_A { match self . bits { 0 => MSEL_A :: _00 , 1 => MSEL_A :: _01 , 2 => MSEL_A :: _10 , 3 => MSEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MSEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MSEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MSEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MSEL_A :: _11 } } # [ doc = "Write proxy for field `MSEL`" ] pub struct MSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Bus Clock selected." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _00 ) } # [ doc = "Master Clock (MCLK) 1 option selected." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _01 ) } # [ doc = "Master Clock (MCLK) 2 option selected." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _10 ) } # [ doc = "Master Clock (MCLK) 3 option selected." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 26 ) ) | ( ( ( value as u32 ) & 0x03 ) << 26 ) ; self . w } } # [ doc = "Bit Clock Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCI_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Internal logic is clocked as if bit clock was externally generated." ] _1 } impl From < BCI_A > for bool { # [ inline ( always ) ] fn from ( variant : BCI_A ) -> Self { match variant { BCI_A :: _0 => false , BCI_A :: _1 => true } } } # [ doc = "Reader of field `BCI`" ] pub type BCI_R = crate :: R < bool , BCI_A > ; impl BCI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCI_A { match self . bits { false => BCI_A :: _0 , true => BCI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCI_A :: _1 } } # [ doc = "Write proxy for field `BCI`" ] pub struct BCI_W < 'a > { w : & 'a mut W , } impl < 'a > BCI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCI_A :: _0 ) } # [ doc = "Internal logic is clocked as if bit clock was externally generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCI_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Bit Clock Swap\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCS_A { # [ doc = "0: Use the normal bit clock source." ] _0 , # [ doc = "1: Swap the bit clock source." ] _1 } impl From < BCS_A > for bool { # [ inline ( always ) ] fn from ( variant : BCS_A ) -> Self { match variant { BCS_A :: _0 => false , BCS_A :: _1 => true } } } # [ doc = "Reader of field `BCS`" ] pub type BCS_R = crate :: R < bool , BCS_A > ; impl BCS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCS_A { match self . bits { false => BCS_A :: _0 , true => BCS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCS_A :: _1 } } # [ doc = "Write proxy for field `BCS`" ] pub struct BCS_W < 'a > { w : & 'a mut W , } impl < 'a > BCS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the normal bit clock source." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCS_A :: _0 ) } # [ doc = "Swap the bit clock source." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCS_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Synchronous Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNC_A { # [ doc = "0: Asynchronous mode." ] _00 , # [ doc = "1: Synchronous with transmitter." ] _01 , # [ doc = "2: Synchronous with another SAI receiver." ] _10 , # [ doc = "3: Synchronous with another SAI transmitter." ] _11 } impl From < SYNC_A > for u8 { # [ inline ( always ) ] fn from ( variant : SYNC_A ) -> Self { match variant { SYNC_A :: _00 => 0 , SYNC_A :: _01 => 1 , SYNC_A :: _10 => 2 , SYNC_A :: _11 => 3 } } } # [ doc = "Reader of field `SYNC`" ] pub type SYNC_R = crate :: R < u8 , SYNC_A > ; impl SYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNC_A { match self . bits { 0 => SYNC_A :: _00 , 1 => SYNC_A :: _01 , 2 => SYNC_A :: _10 , 3 => SYNC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SYNC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SYNC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SYNC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SYNC_A :: _11 } } # [ doc = "Write proxy for field `SYNC`" ] pub struct SYNC_W < 'a > { w : & 'a mut W , } impl < 'a > SYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Asynchronous mode." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( SYNC_A :: _00 ) } # [ doc = "Synchronous with transmitter." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( SYNC_A :: _01 ) } # [ doc = "Synchronous with another SAI receiver." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SYNC_A :: _10 ) } # [ doc = "Synchronous with another SAI transmitter." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( SYNC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 30 ) ) | ( ( ( value as u32 ) & 0x03 ) << 30 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Bit Clock Divide" ] # [ inline ( always ) ] pub fn div ( & self ) -> DIV_R { DIV_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bit 24 - Bit Clock Direction" ] # [ inline ( always ) ] pub fn bcd ( & self ) -> BCD_R { BCD_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Bit Clock Polarity" ] # [ inline ( always ) ] pub fn bcp ( & self ) -> BCP_R { BCP_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bits 26:27 - MCLK Select" ] # [ inline ( always ) ] pub fn msel ( & self ) -> MSEL_R { MSEL_R :: new ( ( ( self . bits >> 26 ) & 0x03 ) as u8 ) } # [ doc = "Bit 28 - Bit Clock Input" ] # [ inline ( always ) ] pub fn bci ( & self ) -> BCI_R { BCI_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Bit Clock Swap" ] # [ inline ( always ) ] pub fn bcs ( & self ) -> BCS_R { BCS_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bits 30:31 - Synchronous Mode" ] # [ inline ( always ) ] pub fn sync ( & self ) -> SYNC_R { SYNC_R :: new ( ( ( self . bits >> 30 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Bit Clock Divide" ] # [ inline ( always ) ] pub fn div ( & mut self ) -> DIV_W { DIV_W { w : self } } # [ doc = "Bit 24 - Bit Clock Direction" ] # [ inline ( always ) ] pub fn bcd ( & mut self ) -> BCD_W { BCD_W { w : self } } # [ doc = "Bit 25 - Bit Clock Polarity" ] # [ inline ( always ) ] pub fn bcp ( & mut self ) -> BCP_W { BCP_W { w : self } } # [ doc = "Bits 26:27 - MCLK Select" ] # [ inline ( always ) ] pub fn msel ( & mut self ) -> MSEL_W { MSEL_W { w : self } } # [ doc = "Bit 28 - Bit Clock Input" ] # [ inline ( always ) ] pub fn bci ( & mut self ) -> BCI_W { BCI_W { w : self } } # [ doc = "Bit 29 - Bit Clock Swap" ] # [ inline ( always ) ] pub fn bcs ( & mut self ) -> BCS_W { BCS_W { w : self } } # [ doc = "Bits 30:31 - Synchronous Mode" ] # [ inline ( always ) ] pub fn sync ( & mut self ) -> SYNC_W { SYNC_W { w : self } } } } # [ doc = "SAI Receive Configuration 3 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcr3](rcr3) module" ] pub type RCR3 = crate :: Reg < u32 , _RCR3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCR3 ; # [ doc = "`read()` method returns [rcr3::R](rcr3::R) reader structure" ] impl crate :: Readable for RCR3 { } # [ doc = "`write(|w| ..)` method takes [rcr3::W](rcr3::W) writer structure" ] impl crate :: Writable for RCR3 { } # [ doc = "SAI Receive Configuration 3 Register" ] pub mod rcr3 { # [ doc = "Reader of register RCR3" ] pub type R = crate :: R < u32 , super :: RCR3 > ; # [ doc = "Writer for register RCR3" ] pub type W = crate :: W < u32 , super :: RCR3 > ; # [ doc = "Register RCR3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RCR3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `WDFL`" ] pub type WDFL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WDFL`" ] pub struct WDFL_W < 'a > { w : & 'a mut W , } impl < 'a > WDFL_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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } # [ doc = "Receive Channel Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RCE0_A { # [ doc = "0: Receive data channel N is disabled." ] _0 , # [ doc = "1: Receive data channel N is enabled." ] _1 } impl From < RCE0_A > for bool { # [ inline ( always ) ] fn from ( variant : RCE0_A ) -> Self { match variant { RCE0_A :: _0 => false , RCE0_A :: _1 => true } } } # [ doc = "Reader of field `RCE0`" ] pub type RCE0_R = crate :: R < bool , RCE0_A > ; impl RCE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RCE0_A { match self . bits { false => RCE0_A :: _0 , true => RCE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RCE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RCE0_A :: _1 } } # [ doc = "Write proxy for field `RCE0`" ] pub struct RCE0_W < 'a > { w : & 'a mut W , } impl < 'a > RCE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RCE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive data channel N is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RCE0_A :: _0 ) } # [ doc = "Receive data channel N is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RCE0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Receive Channel Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RCE1_A { # [ doc = "0: Receive data channel N is disabled." ] _0 , # [ doc = "1: Receive data channel N is enabled." ] _1 } impl From < RCE1_A > for bool { # [ inline ( always ) ] fn from ( variant : RCE1_A ) -> Self { match variant { RCE1_A :: _0 => false , RCE1_A :: _1 => true } } } # [ doc = "Reader of field `RCE1`" ] pub type RCE1_R = crate :: R < bool , RCE1_A > ; impl RCE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RCE1_A { match self . bits { false => RCE1_A :: _0 , true => RCE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RCE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RCE1_A :: _1 } } # [ doc = "Write proxy for field `RCE1`" ] pub struct RCE1_W < 'a > { w : & 'a mut W , } impl < 'a > RCE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RCE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive data channel N is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RCE1_A :: _0 ) } # [ doc = "Receive data channel N is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RCE1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Channel FIFO Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFR0_AW { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Receive data channel N FIFO is reset." ] _1 } impl From < CFR0_AW > for bool { # [ inline ( always ) ] fn from ( variant : CFR0_AW ) -> Self { match variant { CFR0_AW :: _0 => false , CFR0_AW :: _1 => true } } } # [ doc = "Write proxy for field `CFR0`" ] pub struct CFR0_W < 'a > { w : & 'a mut W , } impl < 'a > CFR0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFR0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFR0_AW :: _0 ) } # [ doc = "Receive data channel N FIFO is reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFR0_AW :: _1 ) } # [ 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 = "Channel FIFO Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFR1_AW { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Receive data channel N FIFO is reset." ] _1 } impl From < CFR1_AW > for bool { # [ inline ( always ) ] fn from ( variant : CFR1_AW ) -> Self { match variant { CFR1_AW :: _0 => false , CFR1_AW :: _1 => true } } } # [ doc = "Write proxy for field `CFR1`" ] pub struct CFR1_W < 'a > { w : & 'a mut W , } impl < 'a > CFR1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFR1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFR1_AW :: _0 ) } # [ doc = "Receive data channel N FIFO is reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFR1_AW :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 0:4 - Word Flag Configuration" ] # [ inline ( always ) ] pub fn wdfl ( & self ) -> WDFL_R { WDFL_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 16 - Receive Channel Enable" ] # [ inline ( always ) ] pub fn rce0 ( & self ) -> RCE0_R { RCE0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Receive Channel Enable" ] # [ inline ( always ) ] pub fn rce1 ( & self ) -> RCE1_R { RCE1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Word Flag Configuration" ] # [ inline ( always ) ] pub fn wdfl ( & mut self ) -> WDFL_W { WDFL_W { w : self } } # [ doc = "Bit 16 - Receive Channel Enable" ] # [ inline ( always ) ] pub fn rce0 ( & mut self ) -> RCE0_W { RCE0_W { w : self } } # [ doc = "Bit 17 - Receive Channel Enable" ] # [ inline ( always ) ] pub fn rce1 ( & mut self ) -> RCE1_W { RCE1_W { w : self } } # [ doc = "Bit 24 - Channel FIFO Reset" ] # [ inline ( always ) ] pub fn cfr0 ( & mut self ) -> CFR0_W { CFR0_W { w : self } } # [ doc = "Bit 25 - Channel FIFO Reset" ] # [ inline ( always ) ] pub fn cfr1 ( & mut self ) -> CFR1_W { CFR1_W { w : self } } } } # [ doc = "SAI Receive Configuration 4 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcr4](rcr4) module" ] pub type RCR4 = crate :: Reg < u32 , _RCR4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCR4 ; # [ doc = "`read()` method returns [rcr4::R](rcr4::R) reader structure" ] impl crate :: Readable for RCR4 { } # [ doc = "`write(|w| ..)` method takes [rcr4::W](rcr4::W) writer structure" ] impl crate :: Writable for RCR4 { } # [ doc = "SAI Receive Configuration 4 Register" ] pub mod rcr4 { # [ doc = "Reader of register RCR4" ] pub type R = crate :: R < u32 , super :: RCR4 > ; # [ doc = "Writer for register RCR4" ] pub type W = crate :: W < u32 , super :: RCR4 > ; # [ doc = "Register RCR4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RCR4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Frame Sync Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSD_A { # [ doc = "0: Frame Sync is generated externally in Slave mode." ] _0 , # [ doc = "1: Frame Sync is generated internally in Master mode." ] _1 } impl From < FSD_A > for bool { # [ inline ( always ) ] fn from ( variant : FSD_A ) -> Self { match variant { FSD_A :: _0 => false , FSD_A :: _1 => true } } } # [ doc = "Reader of field `FSD`" ] pub type FSD_R = crate :: R < bool , FSD_A > ; impl FSD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FSD_A { match self . bits { false => FSD_A :: _0 , true => FSD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FSD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FSD_A :: _1 } } # [ doc = "Write proxy for field `FSD`" ] pub struct FSD_W < 'a > { w : & 'a mut W , } impl < 'a > FSD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FSD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frame Sync is generated externally in Slave mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FSD_A :: _0 ) } # [ doc = "Frame Sync is generated internally in Master mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FSD_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Frame Sync Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSP_A { # [ doc = "0: Frame sync is active high." ] _0 , # [ doc = "1: Frame sync is active low." ] _1 } impl From < FSP_A > for bool { # [ inline ( always ) ] fn from ( variant : FSP_A ) -> Self { match variant { FSP_A :: _0 => false , FSP_A :: _1 => true } } } # [ doc = "Reader of field `FSP`" ] pub type FSP_R = crate :: R < bool , FSP_A > ; impl FSP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FSP_A { match self . bits { false => FSP_A :: _0 , true => FSP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FSP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FSP_A :: _1 } } # [ doc = "Write proxy for field `FSP`" ] pub struct FSP_W < 'a > { w : & 'a mut W , } impl < 'a > FSP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FSP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frame sync is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FSP_A :: _0 ) } # [ doc = "Frame sync is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FSP_A :: _1 ) } # [ 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 } } # [ doc = "On Demand Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ONDEM_A { # [ doc = "0: Internal frame sync is generated continuously." ] _0 , # [ doc = "1: Internal frame sync is generated when the FIFO warning flag is clear." ] _1 } impl From < ONDEM_A > for bool { # [ inline ( always ) ] fn from ( variant : ONDEM_A ) -> Self { match variant { ONDEM_A :: _0 => false , ONDEM_A :: _1 => true } } } # [ doc = "Reader of field `ONDEM`" ] pub type ONDEM_R = crate :: R < bool , ONDEM_A > ; impl ONDEM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ONDEM_A { match self . bits { false => ONDEM_A :: _0 , true => ONDEM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ONDEM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ONDEM_A :: _1 } } # [ doc = "Write proxy for field `ONDEM`" ] pub struct ONDEM_W < 'a > { w : & 'a mut W , } impl < 'a > ONDEM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ONDEM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal frame sync is generated continuously." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ONDEM_A :: _0 ) } # [ doc = "Internal frame sync is generated when the FIFO warning flag is clear." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ONDEM_A :: _1 ) } # [ 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 = "Frame Sync Early\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSE_A { # [ doc = "0: Frame sync asserts with the first bit of the frame." ] _0 , # [ doc = "1: Frame sync asserts one bit before the first bit of the frame." ] _1 } impl From < FSE_A > for bool { # [ inline ( always ) ] fn from ( variant : FSE_A ) -> Self { match variant { FSE_A :: _0 => false , FSE_A :: _1 => true } } } # [ doc = "Reader of field `FSE`" ] pub type FSE_R = crate :: R < bool , FSE_A > ; impl FSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FSE_A { match self . bits { false => FSE_A :: _0 , true => FSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FSE_A :: _1 } } # [ doc = "Write proxy for field `FSE`" ] pub struct FSE_W < 'a > { w : & 'a mut W , } impl < 'a > FSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frame sync asserts with the first bit of the frame." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FSE_A :: _0 ) } # [ doc = "Frame sync asserts one bit before the first bit of the frame." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "MSB First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MF_A { # [ doc = "0: LSB is received first." ] _0 , # [ doc = "1: MSB is received first." ] _1 } impl From < MF_A > for bool { # [ inline ( always ) ] fn from ( variant : MF_A ) -> Self { match variant { MF_A :: _0 => false , MF_A :: _1 => true } } } # [ doc = "Reader of field `MF`" ] pub type MF_R = crate :: R < bool , MF_A > ; impl MF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MF_A { match self . bits { false => MF_A :: _0 , true => MF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MF_A :: _1 } } # [ doc = "Write proxy for field `MF`" ] pub struct MF_W < 'a > { w : & 'a mut W , } impl < 'a > MF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LSB is received first." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MF_A :: _0 ) } # [ doc = "MSB is received first." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MF_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `SYWD`" ] pub type SYWD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SYWD`" ] pub struct SYWD_W < 'a > { w : & 'a mut W , } impl < 'a > SYWD_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 & ! ( 0x1f << 8 ) ) | ( ( ( value as u32 ) & 0x1f ) << 8 ) ; self . w } } # [ doc = "Reader of field `FRSZ`" ] pub type FRSZ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FRSZ`" ] pub struct FRSZ_W < 'a > { w : & 'a mut W , } impl < 'a > FRSZ_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } # [ doc = "FIFO Packing Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FPACK_A { # [ doc = "0: FIFO packing is disabled" ] _00 , # [ doc = "2: 8-bit FIFO packing is enabled" ] _10 , # [ doc = "3: 16-bit FIFO packing is enabled" ] _11 } impl From < FPACK_A > for u8 { # [ inline ( always ) ] fn from ( variant : FPACK_A ) -> Self { match variant { FPACK_A :: _00 => 0 , FPACK_A :: _10 => 2 , FPACK_A :: _11 => 3 } } } # [ doc = "Reader of field `FPACK`" ] pub type FPACK_R = crate :: R < u8 , FPACK_A > ; impl FPACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FPACK_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FPACK_A :: _00 ) , 2 => Val ( FPACK_A :: _10 ) , 3 => Val ( FPACK_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FPACK_A :: _00 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FPACK_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FPACK_A :: _11 } } # [ doc = "Write proxy for field `FPACK`" ] pub struct FPACK_W < 'a > { w : & 'a mut W , } impl < 'a > FPACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FPACK_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FIFO packing is disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FPACK_A :: _00 ) } # [ doc = "8-bit FIFO packing is enabled" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FPACK_A :: _10 ) } # [ doc = "16-bit FIFO packing is enabled" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FPACK_A :: _11 ) } # [ 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 << 24 ) ) | ( ( ( value as u32 ) & 0x03 ) << 24 ) ; self . w } } # [ doc = "FIFO Combine Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FCOMB_A { # [ doc = "0: FIFO combine mode disabled." ] _00 , # [ doc = "1: FIFO combine mode enabled on FIFO writes (from receive shift registers)." ] _01 , # [ doc = "2: FIFO combine mode enabled on FIFO reads (by software)." ] _10 , # [ doc = "3: FIFO combine mode enabled on FIFO writes (from receive shift registers) and reads (by software)." ] _11 } impl From < FCOMB_A > for u8 { # [ inline ( always ) ] fn from ( variant : FCOMB_A ) -> Self { match variant { FCOMB_A :: _00 => 0 , FCOMB_A :: _01 => 1 , FCOMB_A :: _10 => 2 , FCOMB_A :: _11 => 3 } } } # [ doc = "Reader of field `FCOMB`" ] pub type FCOMB_R = crate :: R < u8 , FCOMB_A > ; impl FCOMB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FCOMB_A { match self . bits { 0 => FCOMB_A :: _00 , 1 => FCOMB_A :: _01 , 2 => FCOMB_A :: _10 , 3 => FCOMB_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FCOMB_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FCOMB_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FCOMB_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FCOMB_A :: _11 } } # [ doc = "Write proxy for field `FCOMB`" ] pub struct FCOMB_W < 'a > { w : & 'a mut W , } impl < 'a > FCOMB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FCOMB_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "FIFO combine mode disabled." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FCOMB_A :: _00 ) } # [ doc = "FIFO combine mode enabled on FIFO writes (from receive shift registers)." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FCOMB_A :: _01 ) } # [ doc = "FIFO combine mode enabled on FIFO reads (by software)." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FCOMB_A :: _10 ) } # [ doc = "FIFO combine mode enabled on FIFO writes (from receive shift registers) and reads (by software)." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FCOMB_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 26 ) ) | ( ( ( value as u32 ) & 0x03 ) << 26 ) ; self . w } } # [ doc = "FIFO Continue on Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FCONT_A { # [ doc = "0: On FIFO error, the SAI will continue from the start of the next frame after the FIFO error flag has been cleared." ] _0 , # [ doc = "1: On FIFO error, the SAI will continue from the same word that caused the FIFO error to set after the FIFO warning flag has been cleared." ] _1 } impl From < FCONT_A > for bool { # [ inline ( always ) ] fn from ( variant : FCONT_A ) -> Self { match variant { FCONT_A :: _0 => false , FCONT_A :: _1 => true } } } # [ doc = "Reader of field `FCONT`" ] pub type FCONT_R = crate :: R < bool , FCONT_A > ; impl FCONT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FCONT_A { match self . bits { false => FCONT_A :: _0 , true => FCONT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FCONT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FCONT_A :: _1 } } # [ doc = "Write proxy for field `FCONT`" ] pub struct FCONT_W < 'a > { w : & 'a mut W , } impl < 'a > FCONT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FCONT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "On FIFO error, the SAI will continue from the start of the next frame after the FIFO error flag has been cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FCONT_A :: _0 ) } # [ doc = "On FIFO error, the SAI will continue from the same word that caused the FIFO error to set after the FIFO warning flag has been cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FCONT_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } impl R { # [ doc = "Bit 0 - Frame Sync Direction" ] # [ inline ( always ) ] pub fn fsd ( & self ) -> FSD_R { FSD_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Frame Sync Polarity" ] # [ inline ( always ) ] pub fn fsp ( & self ) -> FSP_R { FSP_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - On Demand Mode" ] # [ inline ( always ) ] pub fn ondem ( & self ) -> ONDEM_R { ONDEM_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Frame Sync Early" ] # [ inline ( always ) ] pub fn fse ( & self ) -> FSE_R { FSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - MSB First" ] # [ inline ( always ) ] pub fn mf ( & self ) -> MF_R { MF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:12 - Sync Width" ] # [ inline ( always ) ] pub fn sywd ( & self ) -> SYWD_R { SYWD_R :: new ( ( ( self . bits >> 8 ) & 0x1f ) as u8 ) } # [ doc = "Bits 16:20 - Frame Size" ] # [ inline ( always ) ] pub fn frsz ( & self ) -> FRSZ_R { FRSZ_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bits 24:25 - FIFO Packing Mode" ] # [ inline ( always ) ] pub fn fpack ( & self ) -> FPACK_R { FPACK_R :: new ( ( ( self . bits >> 24 ) & 0x03 ) as u8 ) } # [ doc = "Bits 26:27 - FIFO Combine Mode" ] # [ inline ( always ) ] pub fn fcomb ( & self ) -> FCOMB_R { FCOMB_R :: new ( ( ( self . bits >> 26 ) & 0x03 ) as u8 ) } # [ doc = "Bit 28 - FIFO Continue on Error" ] # [ inline ( always ) ] pub fn fcont ( & self ) -> FCONT_R { FCONT_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Frame Sync Direction" ] # [ inline ( always ) ] pub fn fsd ( & mut self ) -> FSD_W { FSD_W { w : self } } # [ doc = "Bit 1 - Frame Sync Polarity" ] # [ inline ( always ) ] pub fn fsp ( & mut self ) -> FSP_W { FSP_W { w : self } } # [ doc = "Bit 2 - On Demand Mode" ] # [ inline ( always ) ] pub fn ondem ( & mut self ) -> ONDEM_W { ONDEM_W { w : self } } # [ doc = "Bit 3 - Frame Sync Early" ] # [ inline ( always ) ] pub fn fse ( & mut self ) -> FSE_W { FSE_W { w : self } } # [ doc = "Bit 4 - MSB First" ] # [ inline ( always ) ] pub fn mf ( & mut self ) -> MF_W { MF_W { w : self } } # [ doc = "Bits 8:12 - Sync Width" ] # [ inline ( always ) ] pub fn sywd ( & mut self ) -> SYWD_W { SYWD_W { w : self } } # [ doc = "Bits 16:20 - Frame Size" ] # [ inline ( always ) ] pub fn frsz ( & mut self ) -> FRSZ_W { FRSZ_W { w : self } } # [ doc = "Bits 24:25 - FIFO Packing Mode" ] # [ inline ( always ) ] pub fn fpack ( & mut self ) -> FPACK_W { FPACK_W { w : self } } # [ doc = "Bits 26:27 - FIFO Combine Mode" ] # [ inline ( always ) ] pub fn fcomb ( & mut self ) -> FCOMB_W { FCOMB_W { w : self } } # [ doc = "Bit 28 - FIFO Continue on Error" ] # [ inline ( always ) ] pub fn fcont ( & mut self ) -> FCONT_W { FCONT_W { w : self } } } } # [ doc = "SAI Receive Configuration 5 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcr5](rcr5) module" ] pub type RCR5 = crate :: Reg < u32 , _RCR5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCR5 ; # [ doc = "`read()` method returns [rcr5::R](rcr5::R) reader structure" ] impl crate :: Readable for RCR5 { } # [ doc = "`write(|w| ..)` method takes [rcr5::W](rcr5::W) writer structure" ] impl crate :: Writable for RCR5 { } # [ doc = "SAI Receive Configuration 5 Register" ] pub mod rcr5 { # [ doc = "Reader of register RCR5" ] pub type R = crate :: R < u32 , super :: RCR5 > ; # [ doc = "Writer for register RCR5" ] pub type W = crate :: W < u32 , super :: RCR5 > ; # [ doc = "Register RCR5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RCR5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FBT`" ] pub type FBT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FBT`" ] pub struct FBT_W < 'a > { w : & 'a mut W , } impl < 'a > FBT_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 & ! ( 0x1f << 8 ) ) | ( ( ( value as u32 ) & 0x1f ) << 8 ) ; self . w } } # [ doc = "Reader of field `W0W`" ] pub type W0W_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `W0W`" ] pub struct W0W_W < 'a > { w : & 'a mut W , } impl < 'a > W0W_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } # [ doc = "Reader of field `WNW`" ] pub type WNW_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WNW`" ] pub struct WNW_W < 'a > { w : & 'a mut W , } impl < 'a > WNW_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 & ! ( 0x1f << 24 ) ) | ( ( ( value as u32 ) & 0x1f ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 8:12 - First Bit Shifted" ] # [ inline ( always ) ] pub fn fbt ( & self ) -> FBT_R { FBT_R :: new ( ( ( self . bits >> 8 ) & 0x1f ) as u8 ) } # [ doc = "Bits 16:20 - Word 0 Width" ] # [ inline ( always ) ] pub fn w0w ( & self ) -> W0W_R { W0W_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bits 24:28 - Word N Width" ] # [ inline ( always ) ] pub fn wnw ( & self ) -> WNW_R { WNW_R :: new ( ( ( self . bits >> 24 ) & 0x1f ) as u8 ) } } impl W { # [ doc = "Bits 8:12 - First Bit Shifted" ] # [ inline ( always ) ] pub fn fbt ( & mut self ) -> FBT_W { FBT_W { w : self } } # [ doc = "Bits 16:20 - Word 0 Width" ] # [ inline ( always ) ] pub fn w0w ( & mut self ) -> W0W_W { W0W_W { w : self } } # [ doc = "Bits 24:28 - Word N Width" ] # [ inline ( always ) ] pub fn wnw ( & mut self ) -> WNW_W { WNW_W { w : self } } } } # [ doc = "SAI Receive Data Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rdr](rdr) module" ] pub type RDR = crate :: Reg < u32 , _RDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RDR ; # [ doc = "`read()` method returns [rdr::R](rdr::R) reader structure" ] impl crate :: Readable for RDR { } # [ doc = "SAI Receive Data Register" ] pub mod rdr { # [ doc = "Reader of register RDR%s" ] pub type R = crate :: R < u32 , super :: RDR > ; # [ doc = "Reader of field `RDR`" ] pub type RDR_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Receive Data Register" ] # [ inline ( always ) ] pub fn rdr ( & self ) -> RDR_R { RDR_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "SAI Receive FIFO Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfr](rfr) module" ] pub type RFR = crate :: Reg < u32 , _RFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RFR ; # [ doc = "`read()` method returns [rfr::R](rfr::R) reader structure" ] impl crate :: Readable for RFR { } # [ doc = "SAI Receive FIFO Register" ] pub mod rfr { # [ doc = "Reader of register RFR%s" ] pub type R = crate :: R < u32 , super :: RFR > ; # [ doc = "Reader of field `RFP`" ] pub type RFP_R = crate :: R < u8 , u8 > ; # [ doc = "Receive Channel Pointer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RCP_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: FIFO combine is enabled for FIFO reads and this FIFO will be read on the next FIFO read." ] _1 } impl From < RCP_A > for bool { # [ inline ( always ) ] fn from ( variant : RCP_A ) -> Self { match variant { RCP_A :: _0 => false , RCP_A :: _1 => true } } } # [ doc = "Reader of field `RCP`" ] pub type RCP_R = crate :: R < bool , RCP_A > ; impl RCP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RCP_A { match self . bits { false => RCP_A :: _0 , true => RCP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RCP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RCP_A :: _1 } } # [ doc = "Reader of field `WFP`" ] pub type WFP_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:3 - Read FIFO Pointer" ] # [ inline ( always ) ] pub fn rfp ( & self ) -> RFP_R { RFP_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bit 15 - Receive Channel Pointer" ] # [ inline ( always ) ] pub fn rcp ( & self ) -> RCP_R { RCP_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Write FIFO Pointer" ] # [ inline ( always ) ] pub fn wfp ( & self ) -> WFP_R { WFP_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } } } # [ doc = "SAI Receive Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmr](rmr) module" ] pub type RMR = crate :: Reg < u32 , _RMR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMR ; # [ doc = "`read()` method returns [rmr::R](rmr::R) reader structure" ] impl crate :: Readable for RMR { } # [ doc = "`write(|w| ..)` method takes [rmr::W](rmr::W) writer structure" ] impl crate :: Writable for RMR { } # [ doc = "SAI Receive Mask Register" ] pub mod rmr { # [ doc = "Reader of register RMR" ] pub type R = crate :: R < u32 , super :: RMR > ; # [ doc = "Writer for register RMR" ] pub type W = crate :: W < u32 , super :: RMR > ; # [ doc = "Register RMR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RMR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM0_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM0_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM0_A ) -> Self { match variant { RWM0_A :: _0 => false , RWM0_A :: _1 => true } } } # [ doc = "Reader of field `RWM0`" ] pub type RWM0_R = crate :: R < bool , RWM0_A > ; impl RWM0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM0_A { match self . bits { false => RWM0_A :: _0 , true => RWM0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM0_A :: _1 } } # [ doc = "Write proxy for field `RWM0`" ] pub struct RWM0_W < 'a > { w : & 'a mut W , } impl < 'a > RWM0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM0_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM1_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM1_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM1_A ) -> Self { match variant { RWM1_A :: _0 => false , RWM1_A :: _1 => true } } } # [ doc = "Reader of field `RWM1`" ] pub type RWM1_R = crate :: R < bool , RWM1_A > ; impl RWM1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM1_A { match self . bits { false => RWM1_A :: _0 , true => RWM1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM1_A :: _1 } } # [ doc = "Write proxy for field `RWM1`" ] pub struct RWM1_W < 'a > { w : & 'a mut W , } impl < 'a > RWM1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM1_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM1_A :: _1 ) } # [ 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 } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM2_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM2_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM2_A ) -> Self { match variant { RWM2_A :: _0 => false , RWM2_A :: _1 => true } } } # [ doc = "Reader of field `RWM2`" ] pub type RWM2_R = crate :: R < bool , RWM2_A > ; impl RWM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM2_A { match self . bits { false => RWM2_A :: _0 , true => RWM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM2_A :: _1 } } # [ doc = "Write proxy for field `RWM2`" ] pub struct RWM2_W < 'a > { w : & 'a mut W , } impl < 'a > RWM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM2_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM2_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM3_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM3_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM3_A ) -> Self { match variant { RWM3_A :: _0 => false , RWM3_A :: _1 => true } } } # [ doc = "Reader of field `RWM3`" ] pub type RWM3_R = crate :: R < bool , RWM3_A > ; impl RWM3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM3_A { match self . bits { false => RWM3_A :: _0 , true => RWM3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM3_A :: _1 } } # [ doc = "Write proxy for field `RWM3`" ] pub struct RWM3_W < 'a > { w : & 'a mut W , } impl < 'a > RWM3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM3_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM4_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM4_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM4_A ) -> Self { match variant { RWM4_A :: _0 => false , RWM4_A :: _1 => true } } } # [ doc = "Reader of field `RWM4`" ] pub type RWM4_R = crate :: R < bool , RWM4_A > ; impl RWM4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM4_A { match self . bits { false => RWM4_A :: _0 , true => RWM4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM4_A :: _1 } } # [ doc = "Write proxy for field `RWM4`" ] pub struct RWM4_W < 'a > { w : & 'a mut W , } impl < 'a > RWM4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM4_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM5_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM5_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM5_A ) -> Self { match variant { RWM5_A :: _0 => false , RWM5_A :: _1 => true } } } # [ doc = "Reader of field `RWM5`" ] pub type RWM5_R = crate :: R < bool , RWM5_A > ; impl RWM5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM5_A { match self . bits { false => RWM5_A :: _0 , true => RWM5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM5_A :: _1 } } # [ doc = "Write proxy for field `RWM5`" ] pub struct RWM5_W < 'a > { w : & 'a mut W , } impl < 'a > RWM5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM5_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM5_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM6_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM6_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM6_A ) -> Self { match variant { RWM6_A :: _0 => false , RWM6_A :: _1 => true } } } # [ doc = "Reader of field `RWM6`" ] pub type RWM6_R = crate :: R < bool , RWM6_A > ; impl RWM6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM6_A { match self . bits { false => RWM6_A :: _0 , true => RWM6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM6_A :: _1 } } # [ doc = "Write proxy for field `RWM6`" ] pub struct RWM6_W < 'a > { w : & 'a mut W , } impl < 'a > RWM6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM6_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM6_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM7_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM7_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM7_A ) -> Self { match variant { RWM7_A :: _0 => false , RWM7_A :: _1 => true } } } # [ doc = "Reader of field `RWM7`" ] pub type RWM7_R = crate :: R < bool , RWM7_A > ; impl RWM7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM7_A { match self . bits { false => RWM7_A :: _0 , true => RWM7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM7_A :: _1 } } # [ doc = "Write proxy for field `RWM7`" ] pub struct RWM7_W < 'a > { w : & 'a mut W , } impl < 'a > RWM7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM7_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM7_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM8_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM8_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM8_A ) -> Self { match variant { RWM8_A :: _0 => false , RWM8_A :: _1 => true } } } # [ doc = "Reader of field `RWM8`" ] pub type RWM8_R = crate :: R < bool , RWM8_A > ; impl RWM8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM8_A { match self . bits { false => RWM8_A :: _0 , true => RWM8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM8_A :: _1 } } # [ doc = "Write proxy for field `RWM8`" ] pub struct RWM8_W < 'a > { w : & 'a mut W , } impl < 'a > RWM8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM8_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM9_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM9_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM9_A ) -> Self { match variant { RWM9_A :: _0 => false , RWM9_A :: _1 => true } } } # [ doc = "Reader of field `RWM9`" ] pub type RWM9_R = crate :: R < bool , RWM9_A > ; impl RWM9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM9_A { match self . bits { false => RWM9_A :: _0 , true => RWM9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM9_A :: _1 } } # [ doc = "Write proxy for field `RWM9`" ] pub struct RWM9_W < 'a > { w : & 'a mut W , } impl < 'a > RWM9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM9_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM10_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM10_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM10_A ) -> Self { match variant { RWM10_A :: _0 => false , RWM10_A :: _1 => true } } } # [ doc = "Reader of field `RWM10`" ] pub type RWM10_R = crate :: R < bool , RWM10_A > ; impl RWM10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM10_A { match self . bits { false => RWM10_A :: _0 , true => RWM10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM10_A :: _1 } } # [ doc = "Write proxy for field `RWM10`" ] pub struct RWM10_W < 'a > { w : & 'a mut W , } impl < 'a > RWM10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM10_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM11_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM11_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM11_A ) -> Self { match variant { RWM11_A :: _0 => false , RWM11_A :: _1 => true } } } # [ doc = "Reader of field `RWM11`" ] pub type RWM11_R = crate :: R < bool , RWM11_A > ; impl RWM11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM11_A { match self . bits { false => RWM11_A :: _0 , true => RWM11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM11_A :: _1 } } # [ doc = "Write proxy for field `RWM11`" ] pub struct RWM11_W < 'a > { w : & 'a mut W , } impl < 'a > RWM11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM11_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM12_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM12_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM12_A ) -> Self { match variant { RWM12_A :: _0 => false , RWM12_A :: _1 => true } } } # [ doc = "Reader of field `RWM12`" ] pub type RWM12_R = crate :: R < bool , RWM12_A > ; impl RWM12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM12_A { match self . bits { false => RWM12_A :: _0 , true => RWM12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM12_A :: _1 } } # [ doc = "Write proxy for field `RWM12`" ] pub struct RWM12_W < 'a > { w : & 'a mut W , } impl < 'a > RWM12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM12_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM13_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM13_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM13_A ) -> Self { match variant { RWM13_A :: _0 => false , RWM13_A :: _1 => true } } } # [ doc = "Reader of field `RWM13`" ] pub type RWM13_R = crate :: R < bool , RWM13_A > ; impl RWM13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM13_A { match self . bits { false => RWM13_A :: _0 , true => RWM13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM13_A :: _1 } } # [ doc = "Write proxy for field `RWM13`" ] pub struct RWM13_W < 'a > { w : & 'a mut W , } impl < 'a > RWM13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM13_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM13_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM14_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM14_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM14_A ) -> Self { match variant { RWM14_A :: _0 => false , RWM14_A :: _1 => true } } } # [ doc = "Reader of field `RWM14`" ] pub type RWM14_R = crate :: R < bool , RWM14_A > ; impl RWM14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM14_A { match self . bits { false => RWM14_A :: _0 , true => RWM14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM14_A :: _1 } } # [ doc = "Write proxy for field `RWM14`" ] pub struct RWM14_W < 'a > { w : & 'a mut W , } impl < 'a > RWM14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM14_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM15_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM15_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM15_A ) -> Self { match variant { RWM15_A :: _0 => false , RWM15_A :: _1 => true } } } # [ doc = "Reader of field `RWM15`" ] pub type RWM15_R = crate :: R < bool , RWM15_A > ; impl RWM15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM15_A { match self . bits { false => RWM15_A :: _0 , true => RWM15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM15_A :: _1 } } # [ doc = "Write proxy for field `RWM15`" ] pub struct RWM15_W < 'a > { w : & 'a mut W , } impl < 'a > RWM15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM15_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM16_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM16_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM16_A ) -> Self { match variant { RWM16_A :: _0 => false , RWM16_A :: _1 => true } } } # [ doc = "Reader of field `RWM16`" ] pub type RWM16_R = crate :: R < bool , RWM16_A > ; impl RWM16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM16_A { match self . bits { false => RWM16_A :: _0 , true => RWM16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM16_A :: _1 } } # [ doc = "Write proxy for field `RWM16`" ] pub struct RWM16_W < 'a > { w : & 'a mut W , } impl < 'a > RWM16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM16_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM17_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM17_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM17_A ) -> Self { match variant { RWM17_A :: _0 => false , RWM17_A :: _1 => true } } } # [ doc = "Reader of field `RWM17`" ] pub type RWM17_R = crate :: R < bool , RWM17_A > ; impl RWM17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM17_A { match self . bits { false => RWM17_A :: _0 , true => RWM17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM17_A :: _1 } } # [ doc = "Write proxy for field `RWM17`" ] pub struct RWM17_W < 'a > { w : & 'a mut W , } impl < 'a > RWM17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM17_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM18_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM18_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM18_A ) -> Self { match variant { RWM18_A :: _0 => false , RWM18_A :: _1 => true } } } # [ doc = "Reader of field `RWM18`" ] pub type RWM18_R = crate :: R < bool , RWM18_A > ; impl RWM18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM18_A { match self . bits { false => RWM18_A :: _0 , true => RWM18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM18_A :: _1 } } # [ doc = "Write proxy for field `RWM18`" ] pub struct RWM18_W < 'a > { w : & 'a mut W , } impl < 'a > RWM18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM18_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM19_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM19_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM19_A ) -> Self { match variant { RWM19_A :: _0 => false , RWM19_A :: _1 => true } } } # [ doc = "Reader of field `RWM19`" ] pub type RWM19_R = crate :: R < bool , RWM19_A > ; impl RWM19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM19_A { match self . bits { false => RWM19_A :: _0 , true => RWM19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM19_A :: _1 } } # [ doc = "Write proxy for field `RWM19`" ] pub struct RWM19_W < 'a > { w : & 'a mut W , } impl < 'a > RWM19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM19_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM20_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM20_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM20_A ) -> Self { match variant { RWM20_A :: _0 => false , RWM20_A :: _1 => true } } } # [ doc = "Reader of field `RWM20`" ] pub type RWM20_R = crate :: R < bool , RWM20_A > ; impl RWM20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM20_A { match self . bits { false => RWM20_A :: _0 , true => RWM20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM20_A :: _1 } } # [ doc = "Write proxy for field `RWM20`" ] pub struct RWM20_W < 'a > { w : & 'a mut W , } impl < 'a > RWM20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM20_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM20_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM21_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM21_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM21_A ) -> Self { match variant { RWM21_A :: _0 => false , RWM21_A :: _1 => true } } } # [ doc = "Reader of field `RWM21`" ] pub type RWM21_R = crate :: R < bool , RWM21_A > ; impl RWM21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM21_A { match self . bits { false => RWM21_A :: _0 , true => RWM21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM21_A :: _1 } } # [ doc = "Write proxy for field `RWM21`" ] pub struct RWM21_W < 'a > { w : & 'a mut W , } impl < 'a > RWM21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM21_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM21_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM22_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM22_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM22_A ) -> Self { match variant { RWM22_A :: _0 => false , RWM22_A :: _1 => true } } } # [ doc = "Reader of field `RWM22`" ] pub type RWM22_R = crate :: R < bool , RWM22_A > ; impl RWM22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM22_A { match self . bits { false => RWM22_A :: _0 , true => RWM22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM22_A :: _1 } } # [ doc = "Write proxy for field `RWM22`" ] pub struct RWM22_W < 'a > { w : & 'a mut W , } impl < 'a > RWM22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM22_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM23_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM23_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM23_A ) -> Self { match variant { RWM23_A :: _0 => false , RWM23_A :: _1 => true } } } # [ doc = "Reader of field `RWM23`" ] pub type RWM23_R = crate :: R < bool , RWM23_A > ; impl RWM23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM23_A { match self . bits { false => RWM23_A :: _0 , true => RWM23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM23_A :: _1 } } # [ doc = "Write proxy for field `RWM23`" ] pub struct RWM23_W < 'a > { w : & 'a mut W , } impl < 'a > RWM23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM23_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM24_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM24_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM24_A ) -> Self { match variant { RWM24_A :: _0 => false , RWM24_A :: _1 => true } } } # [ doc = "Reader of field `RWM24`" ] pub type RWM24_R = crate :: R < bool , RWM24_A > ; impl RWM24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM24_A { match self . bits { false => RWM24_A :: _0 , true => RWM24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM24_A :: _1 } } # [ doc = "Write proxy for field `RWM24`" ] pub struct RWM24_W < 'a > { w : & 'a mut W , } impl < 'a > RWM24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM24_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM24_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM25_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM25_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM25_A ) -> Self { match variant { RWM25_A :: _0 => false , RWM25_A :: _1 => true } } } # [ doc = "Reader of field `RWM25`" ] pub type RWM25_R = crate :: R < bool , RWM25_A > ; impl RWM25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM25_A { match self . bits { false => RWM25_A :: _0 , true => RWM25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM25_A :: _1 } } # [ doc = "Write proxy for field `RWM25`" ] pub struct RWM25_W < 'a > { w : & 'a mut W , } impl < 'a > RWM25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM25_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM25_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM26_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM26_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM26_A ) -> Self { match variant { RWM26_A :: _0 => false , RWM26_A :: _1 => true } } } # [ doc = "Reader of field `RWM26`" ] pub type RWM26_R = crate :: R < bool , RWM26_A > ; impl RWM26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM26_A { match self . bits { false => RWM26_A :: _0 , true => RWM26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM26_A :: _1 } } # [ doc = "Write proxy for field `RWM26`" ] pub struct RWM26_W < 'a > { w : & 'a mut W , } impl < 'a > RWM26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM26_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM26_A :: _1 ) } # [ 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 = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM27_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM27_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM27_A ) -> Self { match variant { RWM27_A :: _0 => false , RWM27_A :: _1 => true } } } # [ doc = "Reader of field `RWM27`" ] pub type RWM27_R = crate :: R < bool , RWM27_A > ; impl RWM27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM27_A { match self . bits { false => RWM27_A :: _0 , true => RWM27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM27_A :: _1 } } # [ doc = "Write proxy for field `RWM27`" ] pub struct RWM27_W < 'a > { w : & 'a mut W , } impl < 'a > RWM27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM27_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM28_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM28_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM28_A ) -> Self { match variant { RWM28_A :: _0 => false , RWM28_A :: _1 => true } } } # [ doc = "Reader of field `RWM28`" ] pub type RWM28_R = crate :: R < bool , RWM28_A > ; impl RWM28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM28_A { match self . bits { false => RWM28_A :: _0 , true => RWM28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM28_A :: _1 } } # [ doc = "Write proxy for field `RWM28`" ] pub struct RWM28_W < 'a > { w : & 'a mut W , } impl < 'a > RWM28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM28_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM29_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM29_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM29_A ) -> Self { match variant { RWM29_A :: _0 => false , RWM29_A :: _1 => true } } } # [ doc = "Reader of field `RWM29`" ] pub type RWM29_R = crate :: R < bool , RWM29_A > ; impl RWM29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM29_A { match self . bits { false => RWM29_A :: _0 , true => RWM29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM29_A :: _1 } } # [ doc = "Write proxy for field `RWM29`" ] pub struct RWM29_W < 'a > { w : & 'a mut W , } impl < 'a > RWM29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM29_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM30_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM30_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM30_A ) -> Self { match variant { RWM30_A :: _0 => false , RWM30_A :: _1 => true } } } # [ doc = "Reader of field `RWM30`" ] pub type RWM30_R = crate :: R < bool , RWM30_A > ; impl RWM30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM30_A { match self . bits { false => RWM30_A :: _0 , true => RWM30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM30_A :: _1 } } # [ doc = "Write proxy for field `RWM30`" ] pub struct RWM30_W < 'a > { w : & 'a mut W , } impl < 'a > RWM30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM30_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Receive Word Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWM31_A { # [ doc = "0: Word N is enabled." ] _0 , # [ doc = "1: Word N is masked." ] _1 } impl From < RWM31_A > for bool { # [ inline ( always ) ] fn from ( variant : RWM31_A ) -> Self { match variant { RWM31_A :: _0 => false , RWM31_A :: _1 => true } } } # [ doc = "Reader of field `RWM31`" ] pub type RWM31_R = crate :: R < bool , RWM31_A > ; impl RWM31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWM31_A { match self . bits { false => RWM31_A :: _0 , true => RWM31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWM31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWM31_A :: _1 } } # [ doc = "Write proxy for field `RWM31`" ] pub struct RWM31_W < 'a > { w : & 'a mut W , } impl < 'a > RWM31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWM31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Word N is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWM31_A :: _0 ) } # [ doc = "Word N is masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWM31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm0 ( & self ) -> RWM0_R { RWM0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm1 ( & self ) -> RWM1_R { RWM1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm2 ( & self ) -> RWM2_R { RWM2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm3 ( & self ) -> RWM3_R { RWM3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm4 ( & self ) -> RWM4_R { RWM4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm5 ( & self ) -> RWM5_R { RWM5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm6 ( & self ) -> RWM6_R { RWM6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm7 ( & self ) -> RWM7_R { RWM7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm8 ( & self ) -> RWM8_R { RWM8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm9 ( & self ) -> RWM9_R { RWM9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm10 ( & self ) -> RWM10_R { RWM10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm11 ( & self ) -> RWM11_R { RWM11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm12 ( & self ) -> RWM12_R { RWM12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm13 ( & self ) -> RWM13_R { RWM13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm14 ( & self ) -> RWM14_R { RWM14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm15 ( & self ) -> RWM15_R { RWM15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm16 ( & self ) -> RWM16_R { RWM16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm17 ( & self ) -> RWM17_R { RWM17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm18 ( & self ) -> RWM18_R { RWM18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm19 ( & self ) -> RWM19_R { RWM19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm20 ( & self ) -> RWM20_R { RWM20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm21 ( & self ) -> RWM21_R { RWM21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm22 ( & self ) -> RWM22_R { RWM22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm23 ( & self ) -> RWM23_R { RWM23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm24 ( & self ) -> RWM24_R { RWM24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm25 ( & self ) -> RWM25_R { RWM25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm26 ( & self ) -> RWM26_R { RWM26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm27 ( & self ) -> RWM27_R { RWM27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm28 ( & self ) -> RWM28_R { RWM28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm29 ( & self ) -> RWM29_R { RWM29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm30 ( & self ) -> RWM30_R { RWM30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm31 ( & self ) -> RWM31_R { RWM31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm0 ( & mut self ) -> RWM0_W { RWM0_W { w : self } } # [ doc = "Bit 1 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm1 ( & mut self ) -> RWM1_W { RWM1_W { w : self } } # [ doc = "Bit 2 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm2 ( & mut self ) -> RWM2_W { RWM2_W { w : self } } # [ doc = "Bit 3 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm3 ( & mut self ) -> RWM3_W { RWM3_W { w : self } } # [ doc = "Bit 4 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm4 ( & mut self ) -> RWM4_W { RWM4_W { w : self } } # [ doc = "Bit 5 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm5 ( & mut self ) -> RWM5_W { RWM5_W { w : self } } # [ doc = "Bit 6 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm6 ( & mut self ) -> RWM6_W { RWM6_W { w : self } } # [ doc = "Bit 7 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm7 ( & mut self ) -> RWM7_W { RWM7_W { w : self } } # [ doc = "Bit 8 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm8 ( & mut self ) -> RWM8_W { RWM8_W { w : self } } # [ doc = "Bit 9 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm9 ( & mut self ) -> RWM9_W { RWM9_W { w : self } } # [ doc = "Bit 10 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm10 ( & mut self ) -> RWM10_W { RWM10_W { w : self } } # [ doc = "Bit 11 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm11 ( & mut self ) -> RWM11_W { RWM11_W { w : self } } # [ doc = "Bit 12 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm12 ( & mut self ) -> RWM12_W { RWM12_W { w : self } } # [ doc = "Bit 13 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm13 ( & mut self ) -> RWM13_W { RWM13_W { w : self } } # [ doc = "Bit 14 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm14 ( & mut self ) -> RWM14_W { RWM14_W { w : self } } # [ doc = "Bit 15 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm15 ( & mut self ) -> RWM15_W { RWM15_W { w : self } } # [ doc = "Bit 16 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm16 ( & mut self ) -> RWM16_W { RWM16_W { w : self } } # [ doc = "Bit 17 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm17 ( & mut self ) -> RWM17_W { RWM17_W { w : self } } # [ doc = "Bit 18 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm18 ( & mut self ) -> RWM18_W { RWM18_W { w : self } } # [ doc = "Bit 19 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm19 ( & mut self ) -> RWM19_W { RWM19_W { w : self } } # [ doc = "Bit 20 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm20 ( & mut self ) -> RWM20_W { RWM20_W { w : self } } # [ doc = "Bit 21 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm21 ( & mut self ) -> RWM21_W { RWM21_W { w : self } } # [ doc = "Bit 22 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm22 ( & mut self ) -> RWM22_W { RWM22_W { w : self } } # [ doc = "Bit 23 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm23 ( & mut self ) -> RWM23_W { RWM23_W { w : self } } # [ doc = "Bit 24 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm24 ( & mut self ) -> RWM24_W { RWM24_W { w : self } } # [ doc = "Bit 25 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm25 ( & mut self ) -> RWM25_W { RWM25_W { w : self } } # [ doc = "Bit 26 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm26 ( & mut self ) -> RWM26_W { RWM26_W { w : self } } # [ doc = "Bit 27 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm27 ( & mut self ) -> RWM27_W { RWM27_W { w : self } } # [ doc = "Bit 28 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm28 ( & mut self ) -> RWM28_W { RWM28_W { w : self } } # [ doc = "Bit 29 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm29 ( & mut self ) -> RWM29_W { RWM29_W { w : self } } # [ doc = "Bit 30 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm30 ( & mut self ) -> RWM30_W { RWM30_W { w : self } } # [ doc = "Bit 31 - Receive Word Mask" ] # [ inline ( always ) ] pub fn rwm31 ( & mut self ) -> RWM31_W { RWM31_W { w : self } } } } # [ doc = "SAI MCLK Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mcr](mcr) module" ] pub type MCR = crate :: Reg < u32 , _MCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCR ; # [ doc = "`read()` method returns [mcr::R](mcr::R) reader structure" ] impl crate :: Readable for MCR { } # [ doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure" ] impl crate :: Writable for MCR { } # [ doc = "SAI MCLK Control Register" ] pub mod mcr { # [ doc = "Reader of register MCR" ] pub type R = crate :: R < u32 , super :: MCR > ; # [ doc = "Writer for register MCR" ] pub type W = crate :: W < u32 , super :: MCR > ; # [ doc = "Register MCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "MCLK Input Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MICS_A { # [ doc = "0: MCLK divider input clock 0 is selected." ] _00 , # [ doc = "1: MCLK divider input clock 1 is selected." ] _01 , # [ doc = "2: MCLK divider input clock 2 is selected." ] _10 , # [ doc = "3: MCLK divider input clock 3 is selected." ] _11 } impl From < MICS_A > for u8 { # [ inline ( always ) ] fn from ( variant : MICS_A ) -> Self { match variant { MICS_A :: _00 => 0 , MICS_A :: _01 => 1 , MICS_A :: _10 => 2 , MICS_A :: _11 => 3 } } } # [ doc = "Reader of field `MICS`" ] pub type MICS_R = crate :: R < u8 , MICS_A > ; impl MICS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MICS_A { match self . bits { 0 => MICS_A :: _00 , 1 => MICS_A :: _01 , 2 => MICS_A :: _10 , 3 => MICS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MICS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MICS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MICS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MICS_A :: _11 } } # [ doc = "Write proxy for field `MICS`" ] pub struct MICS_W < 'a > { w : & 'a mut W , } impl < 'a > MICS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MICS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "MCLK divider input clock 0 is selected." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MICS_A :: _00 ) } # [ doc = "MCLK divider input clock 1 is selected." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MICS_A :: _01 ) } # [ doc = "MCLK divider input clock 2 is selected." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MICS_A :: _10 ) } # [ doc = "MCLK divider input clock 3 is selected." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( MICS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 24 ) ) | ( ( ( value as u32 ) & 0x03 ) << 24 ) ; self . w } } # [ doc = "MCLK Output Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MOE_A { # [ doc = "0: MCLK signal pin is configured as an input that bypasses the MCLK divider." ] _0 , # [ doc = "1: MCLK signal pin is configured as an output from the MCLK divider and the MCLK divider is enabled." ] _1 } impl From < MOE_A > for bool { # [ inline ( always ) ] fn from ( variant : MOE_A ) -> Self { match variant { MOE_A :: _0 => false , MOE_A :: _1 => true } } } # [ doc = "Reader of field `MOE`" ] pub type MOE_R = crate :: R < bool , MOE_A > ; impl MOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MOE_A { match self . bits { false => MOE_A :: _0 , true => MOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MOE_A :: _1 } } # [ doc = "Write proxy for field `MOE`" ] pub struct MOE_W < 'a > { w : & 'a mut W , } impl < 'a > MOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MCLK signal pin is configured as an input that bypasses the MCLK divider." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MOE_A :: _0 ) } # [ doc = "MCLK signal pin is configured as an output from the MCLK divider and the MCLK divider is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MOE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Divider Update Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DUF_A { # [ doc = "0: MCLK divider ratio is not being updated currently." ] _0 , # [ doc = "1: MCLK divider ratio is updating on-the-fly. Further updates to the MCLK divider ratio are blocked while this flag remains set." ] _1 } impl From < DUF_A > for bool { # [ inline ( always ) ] fn from ( variant : DUF_A ) -> Self { match variant { DUF_A :: _0 => false , DUF_A :: _1 => true } } } # [ doc = "Reader of field `DUF`" ] pub type DUF_R = crate :: R < bool , DUF_A > ; impl DUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DUF_A { match self . bits { false => DUF_A :: _0 , true => DUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DUF_A :: _1 } } impl R { # [ doc = "Bits 24:25 - MCLK Input Clock Select" ] # [ inline ( always ) ] pub fn mics ( & self ) -> MICS_R { MICS_R :: new ( ( ( self . bits >> 24 ) & 0x03 ) as u8 ) } # [ doc = "Bit 30 - MCLK Output Enable" ] # [ inline ( always ) ] pub fn moe ( & self ) -> MOE_R { MOE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Divider Update Flag" ] # [ inline ( always ) ] pub fn duf ( & self ) -> DUF_R { DUF_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 24:25 - MCLK Input Clock Select" ] # [ inline ( always ) ] pub fn mics ( & mut self ) -> MICS_W { MICS_W { w : self } } # [ doc = "Bit 30 - MCLK Output Enable" ] # [ inline ( always ) ] pub fn moe ( & mut self ) -> MOE_W { MOE_W { w : self } } } } # [ doc = "SAI MCLK Divide Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mdr](mdr) module" ] pub type MDR = crate :: Reg < u32 , _MDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MDR ; # [ doc = "`read()` method returns [mdr::R](mdr::R) reader structure" ] impl crate :: Readable for MDR { } # [ doc = "`write(|w| ..)` method takes [mdr::W](mdr::W) writer structure" ] impl crate :: Writable for MDR { } # [ doc = "SAI MCLK Divide Register" ] pub mod mdr { # [ doc = "Reader of register MDR" ] pub type R = crate :: R < u32 , super :: MDR > ; # [ doc = "Writer for register MDR" ] pub type W = crate :: W < u32 , super :: MDR > ; # [ doc = "Register MDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DIVIDE`" ] pub type DIVIDE_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DIVIDE`" ] pub struct DIVIDE_W < 'a > { w : & 'a mut W , } impl < 'a > DIVIDE_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0fff ) | ( ( value as u32 ) & 0x0fff ) ; self . w } } # [ doc = "Reader of field `FRACT`" ] pub type FRACT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FRACT`" ] pub struct FRACT_W < 'a > { w : & 'a mut W , } impl < 'a > FRACT_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 & ! ( 0xff << 12 ) ) | ( ( ( value as u32 ) & 0xff ) << 12 ) ; self . w } } impl R { # [ doc = "Bits 0:11 - MCLK Divide" ] # [ inline ( always ) ] pub fn divide ( & self ) -> DIVIDE_R { DIVIDE_R :: new ( ( self . bits & 0x0fff ) as u16 ) } # [ doc = "Bits 12:19 - MCLK Fraction" ] # [ inline ( always ) ] pub fn fract ( & self ) -> FRACT_R { FRACT_R :: new ( ( ( self . bits >> 12 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:11 - MCLK Divide" ] # [ inline ( always ) ] pub fn divide ( & mut self ) -> DIVIDE_W { DIVIDE_W { w : self } } # [ doc = "Bits 12:19 - MCLK Fraction" ] # [ inline ( always ) ] pub fn fract ( & mut self ) -> FRACT_W { FRACT_W { w : self } } } } } # [ doc = "Cyclic Redundancy Check" ] pub struct CRC { _marker : PhantomData < * const ( ) > } unsafe impl Send for CRC { } impl CRC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const crc :: RegisterBlock { 0x4003_2000 as * const _ } } impl Deref for CRC { type Target = crc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CRC :: ptr ( ) } } } # [ doc = "Cyclic Redundancy Check" ] pub mod crc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved_0_data : [ u8 ; 4usize ] , _reserved_1_gpoly : [ u8 ; 4usize ] , _reserved_2_ctrl : [ u8 ; 4usize ] , } impl RegisterBlock { # [ doc = "0x00 - CRC_DATALL register." ] # [ inline ( always ) ] pub fn datall ( & self ) -> & DATALL { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 0usize ) as * const DATALL ) } } # [ doc = "0x00 - CRC_DATALL register." ] # [ inline ( always ) ] pub fn datall_mut ( & self ) -> & mut DATALL { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 0usize ) as * mut DATALL ) } } # [ doc = "0x00 - CRC_DATAL register." ] # [ inline ( always ) ] pub fn datal ( & self ) -> & DATAL { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 0usize ) as * const DATAL ) } } # [ doc = "0x00 - CRC_DATAL register." ] # [ inline ( always ) ] pub fn datal_mut ( & self ) -> & mut DATAL { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 0usize ) as * mut DATAL ) } } # [ doc = "0x00 - CRC Data register" ] # [ inline ( always ) ] pub fn data ( & self ) -> & DATA { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 0usize ) as * const DATA ) } } # [ doc = "0x00 - CRC Data register" ] # [ inline ( always ) ] pub fn data_mut ( & self ) -> & mut DATA { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 0usize ) as * mut DATA ) } } # [ doc = "0x01 - CRC_DATALU register." ] # [ inline ( always ) ] pub fn datalu ( & self ) -> & DATALU { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 1usize ) as * const DATALU ) } } # [ doc = "0x01 - CRC_DATALU register." ] # [ inline ( always ) ] pub fn datalu_mut ( & self ) -> & mut DATALU { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 1usize ) as * mut DATALU ) } } # [ doc = "0x02 - CRC_DATAHL register." ] # [ inline ( always ) ] pub fn datahl ( & self ) -> & DATAHL { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 2usize ) as * const DATAHL ) } } # [ doc = "0x02 - CRC_DATAHL register." ] # [ inline ( always ) ] pub fn datahl_mut ( & self ) -> & mut DATAHL { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 2usize ) as * mut DATAHL ) } } # [ doc = "0x02 - CRC_DATAH register." ] # [ inline ( always ) ] pub fn datah ( & self ) -> & DATAH { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 2usize ) as * const DATAH ) } } # [ doc = "0x02 - CRC_DATAH register." ] # [ inline ( always ) ] pub fn datah_mut ( & self ) -> & mut DATAH { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 2usize ) as * mut DATAH ) } } # [ doc = "0x03 - CRC_DATAHU register." ] # [ inline ( always ) ] pub fn datahu ( & self ) -> & DATAHU { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 3usize ) as * const DATAHU ) } } # [ doc = "0x03 - CRC_DATAHU register." ] # [ inline ( always ) ] pub fn datahu_mut ( & self ) -> & mut DATAHU { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 3usize ) as * mut DATAHU ) } } # [ doc = "0x04 - CRC_GPOLYLL register." ] # [ inline ( always ) ] pub fn gpolyll ( & self ) -> & GPOLYLL { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4usize ) as * const GPOLYLL ) } } # [ doc = "0x04 - CRC_GPOLYLL register." ] # [ inline ( always ) ] pub fn gpolyll_mut ( & self ) -> & mut GPOLYLL { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4usize ) as * mut GPOLYLL ) } } # [ doc = "0x04 - CRC_GPOLYL register." ] # [ inline ( always ) ] pub fn gpolyl ( & self ) -> & GPOLYL { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4usize ) as * const GPOLYL ) } } # [ doc = "0x04 - CRC_GPOLYL register." ] # [ inline ( always ) ] pub fn gpolyl_mut ( & self ) -> & mut GPOLYL { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4usize ) as * mut GPOLYL ) } } # [ doc = "0x04 - CRC Polynomial register" ] # [ inline ( always ) ] pub fn gpoly ( & self ) -> & GPOLY { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 4usize ) as * const GPOLY ) } } # [ doc = "0x04 - CRC Polynomial register" ] # [ inline ( always ) ] pub fn gpoly_mut ( & self ) -> & mut GPOLY { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 4usize ) as * mut GPOLY ) } } # [ doc = "0x05 - CRC_GPOLYLU register." ] # [ inline ( always ) ] pub fn gpolylu ( & self ) -> & GPOLYLU { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 5usize ) as * const GPOLYLU ) } } # [ doc = "0x05 - CRC_GPOLYLU register." ] # [ inline ( always ) ] pub fn gpolylu_mut ( & self ) -> & mut GPOLYLU { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 5usize ) as * mut GPOLYLU ) } } # [ doc = "0x06 - CRC_GPOLYHL register." ] # [ inline ( always ) ] pub fn gpolyhl ( & self ) -> & GPOLYHL { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 6usize ) as * const GPOLYHL ) } } # [ doc = "0x06 - CRC_GPOLYHL register." ] # [ inline ( always ) ] pub fn gpolyhl_mut ( & self ) -> & mut GPOLYHL { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 6usize ) as * mut GPOLYHL ) } } # [ doc = "0x06 - CRC_GPOLYH register." ] # [ inline ( always ) ] pub fn gpolyh ( & self ) -> & GPOLYH { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 6usize ) as * const GPOLYH ) } } # [ doc = "0x06 - CRC_GPOLYH register." ] # [ inline ( always ) ] pub fn gpolyh_mut ( & self ) -> & mut GPOLYH { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 6usize ) as * mut GPOLYH ) } } # [ doc = "0x07 - CRC_GPOLYHU register." ] # [ inline ( always ) ] pub fn gpolyhu ( & self ) -> & GPOLYHU { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 7usize ) as * const GPOLYHU ) } } # [ doc = "0x07 - CRC_GPOLYHU register." ] # [ inline ( always ) ] pub fn gpolyhu_mut ( & self ) -> & mut GPOLYHU { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 7usize ) as * mut GPOLYHU ) } } # [ doc = "0x08 - CRC Control register" ] # [ inline ( always ) ] pub fn ctrl ( & self ) -> & CTRL { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 8usize ) as * const CTRL ) } } # [ doc = "0x08 - CRC Control register" ] # [ inline ( always ) ] pub fn ctrl_mut ( & self ) -> & mut CTRL { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 8usize ) as * mut CTRL ) } } # [ doc = "0x0b - CRC_CTRLHU register." ] # [ inline ( always ) ] pub fn ctrlhu ( & self ) -> & CTRLHU { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 11usize ) as * const CTRLHU ) } } # [ doc = "0x0b - CRC_CTRLHU register." ] # [ inline ( always ) ] pub fn ctrlhu_mut ( & self ) -> & mut CTRLHU { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 11usize ) as * mut CTRLHU ) } } } # [ doc = "CRC Data register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data](data) module" ] pub type DATA = crate :: Reg < u32 , _DATA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATA ; # [ doc = "`read()` method returns [data::R](data::R) reader structure" ] impl crate :: Readable for DATA { } # [ doc = "`write(|w| ..)` method takes [data::W](data::W) writer structure" ] impl crate :: Writable for DATA { } # [ doc = "CRC Data register" ] pub mod data { # [ doc = "Reader of register DATA" ] pub type R = crate :: R < u32 , super :: DATA > ; # [ doc = "Writer for register DATA" ] pub type W = crate :: W < u32 , super :: DATA > ; # [ doc = "Register DATA `reset()`'s with value 0xffff_ffff" ] impl crate :: ResetValue for super :: DATA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff_ffff } } # [ doc = "Reader of field `LL`" ] pub type LL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `LL`" ] pub struct LL_W < 'a > { w : & 'a mut W , } impl < 'a > LL_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `LU`" ] pub type LU_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `LU`" ] pub struct LU_W < 'a > { w : & 'a mut W , } impl < 'a > LU_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `HL`" ] pub type HL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HL`" ] pub struct HL_W < 'a > { w : & 'a mut W , } impl < 'a > HL_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `HU`" ] pub type HU_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HU`" ] pub struct HU_W < 'a > { w : & 'a mut W , } impl < 'a > HU_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - CRC Low Lower Byte" ] # [ inline ( always ) ] pub fn ll ( & self ) -> LL_R { LL_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - CRC Low Upper Byte" ] # [ inline ( always ) ] pub fn lu ( & self ) -> LU_R { LU_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - CRC High Lower Byte" ] # [ inline ( always ) ] pub fn hl ( & self ) -> HL_R { HL_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - CRC High Upper Byte" ] # [ inline ( always ) ] pub fn hu ( & self ) -> HU_R { HU_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - CRC Low Lower Byte" ] # [ inline ( always ) ] pub fn ll ( & mut self ) -> LL_W { LL_W { w : self } } # [ doc = "Bits 8:15 - CRC Low Upper Byte" ] # [ inline ( always ) ] pub fn lu ( & mut self ) -> LU_W { LU_W { w : self } } # [ doc = "Bits 16:23 - CRC High Lower Byte" ] # [ inline ( always ) ] pub fn hl ( & mut self ) -> HL_W { HL_W { w : self } } # [ doc = "Bits 24:31 - CRC High Upper Byte" ] # [ inline ( always ) ] pub fn hu ( & mut self ) -> HU_W { HU_W { w : self } } } } # [ doc = "CRC_DATAL register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datal](datal) module" ] pub type DATAL = crate :: Reg < u16 , _DATAL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAL ; # [ doc = "`read()` method returns [datal::R](datal::R) reader structure" ] impl crate :: Readable for DATAL { } # [ doc = "`write(|w| ..)` method takes [datal::W](datal::W) writer structure" ] impl crate :: Writable for DATAL { } # [ doc = "CRC_DATAL register." ] pub mod datal { # [ doc = "Reader of register DATAL" ] pub type R = crate :: R < u16 , super :: DATAL > ; # [ doc = "Writer for register DATAL" ] pub type W = crate :: W < u16 , super :: DATAL > ; # [ doc = "Register DATAL `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: DATAL { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Reader of field `DATAL`" ] pub type DATAL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DATAL`" ] pub struct DATAL_W < 'a > { w : & 'a mut W , } impl < 'a > DATAL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - DATAL stores the lower 16 bits of the 16/32 bit CRC" ] # [ inline ( always ) ] pub fn datal ( & self ) -> DATAL_R { DATAL_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - DATAL stores the lower 16 bits of the 16/32 bit CRC" ] # [ inline ( always ) ] pub fn datal ( & mut self ) -> DATAL_W { DATAL_W { w : self } } } } # [ doc = "CRC_DATALL register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datall](datall) module" ] pub type DATALL = crate :: Reg < u8 , _DATALL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATALL ; # [ doc = "`read()` method returns [datall::R](datall::R) reader structure" ] impl crate :: Readable for DATALL { } # [ doc = "`write(|w| ..)` method takes [datall::W](datall::W) writer structure" ] impl crate :: Writable for DATALL { } # [ doc = "CRC_DATALL register." ] pub mod datall { # [ doc = "Reader of register DATALL" ] pub type R = crate :: R < u8 , super :: DATALL > ; # [ doc = "Writer for register DATALL" ] pub type W = crate :: W < u8 , super :: DATALL > ; # [ doc = "Register DATALL `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: DATALL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `DATALL`" ] pub type DATALL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATALL`" ] pub struct DATALL_W < 'a > { w : & 'a mut W , } impl < 'a > DATALL_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - CRCLL stores the first 8 bits of the 32 bit DATA" ] # [ inline ( always ) ] pub fn datall ( & self ) -> DATALL_R { DATALL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - CRCLL stores the first 8 bits of the 32 bit DATA" ] # [ inline ( always ) ] pub fn datall ( & mut self ) -> DATALL_W { DATALL_W { w : self } } } } # [ doc = "CRC_DATALU register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datalu](datalu) module" ] pub type DATALU = crate :: Reg < u8 , _DATALU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATALU ; # [ doc = "`read()` method returns [datalu::R](datalu::R) reader structure" ] impl crate :: Readable for DATALU { } # [ doc = "`write(|w| ..)` method takes [datalu::W](datalu::W) writer structure" ] impl crate :: Writable for DATALU { } # [ doc = "CRC_DATALU register." ] pub mod datalu { # [ doc = "Reader of register DATALU" ] pub type R = crate :: R < u8 , super :: DATALU > ; # [ doc = "Writer for register DATALU" ] pub type W = crate :: W < u8 , super :: DATALU > ; # [ doc = "Register DATALU `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: DATALU { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `DATALU`" ] pub type DATALU_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATALU`" ] pub struct DATALU_W < 'a > { w : & 'a mut W , } impl < 'a > DATALU_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - DATALL stores the second 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn datalu ( & self ) -> DATALU_R { DATALU_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - DATALL stores the second 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn datalu ( & mut self ) -> DATALU_W { DATALU_W { w : self } } } } # [ doc = "CRC_DATAH register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datah](datah) module" ] pub type DATAH = crate :: Reg < u16 , _DATAH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAH ; # [ doc = "`read()` method returns [datah::R](datah::R) reader structure" ] impl crate :: Readable for DATAH { } # [ doc = "`write(|w| ..)` method takes [datah::W](datah::W) writer structure" ] impl crate :: Writable for DATAH { } # [ doc = "CRC_DATAH register." ] pub mod datah { # [ doc = "Reader of register DATAH" ] pub type R = crate :: R < u16 , super :: DATAH > ; # [ doc = "Writer for register DATAH" ] pub type W = crate :: W < u16 , super :: DATAH > ; # [ doc = "Register DATAH `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: DATAH { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Reader of field `DATAH`" ] pub type DATAH_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DATAH`" ] pub struct DATAH_W < 'a > { w : & 'a mut W , } impl < 'a > DATAH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - DATAH stores the high 16 bits of the 16/32 bit CRC" ] # [ inline ( always ) ] pub fn datah ( & self ) -> DATAH_R { DATAH_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - DATAH stores the high 16 bits of the 16/32 bit CRC" ] # [ inline ( always ) ] pub fn datah ( & mut self ) -> DATAH_W { DATAH_W { w : self } } } } # [ doc = "CRC_DATAHL register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datahl](datahl) module" ] pub type DATAHL = crate :: Reg < u8 , _DATAHL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAHL ; # [ doc = "`read()` method returns [datahl::R](datahl::R) reader structure" ] impl crate :: Readable for DATAHL { } # [ doc = "`write(|w| ..)` method takes [datahl::W](datahl::W) writer structure" ] impl crate :: Writable for DATAHL { } # [ doc = "CRC_DATAHL register." ] pub mod datahl { # [ doc = "Reader of register DATAHL" ] pub type R = crate :: R < u8 , super :: DATAHL > ; # [ doc = "Writer for register DATAHL" ] pub type W = crate :: W < u8 , super :: DATAHL > ; # [ doc = "Register DATAHL `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: DATAHL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `DATAHL`" ] pub type DATAHL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATAHL`" ] pub struct DATAHL_W < 'a > { w : & 'a mut W , } impl < 'a > DATAHL_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - DATAHL stores the third 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn datahl ( & self ) -> DATAHL_R { DATAHL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - DATAHL stores the third 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn datahl ( & mut self ) -> DATAHL_W { DATAHL_W { w : self } } } } # [ doc = "CRC_DATAHU register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datahu](datahu) module" ] pub type DATAHU = crate :: Reg < u8 , _DATAHU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATAHU ; # [ doc = "`read()` method returns [datahu::R](datahu::R) reader structure" ] impl crate :: Readable for DATAHU { } # [ doc = "`write(|w| ..)` method takes [datahu::W](datahu::W) writer structure" ] impl crate :: Writable for DATAHU { } # [ doc = "CRC_DATAHU register." ] pub mod datahu { # [ doc = "Reader of register DATAHU" ] pub type R = crate :: R < u8 , super :: DATAHU > ; # [ doc = "Writer for register DATAHU" ] pub type W = crate :: W < u8 , super :: DATAHU > ; # [ doc = "Register DATAHU `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: DATAHU { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `DATAHU`" ] pub type DATAHU_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATAHU`" ] pub struct DATAHU_W < 'a > { w : & 'a mut W , } impl < 'a > DATAHU_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - DATAHU stores the fourth 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn datahu ( & self ) -> DATAHU_R { DATAHU_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - DATAHU stores the fourth 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn datahu ( & mut self ) -> DATAHU_W { DATAHU_W { w : self } } } } # [ doc = "CRC Polynomial register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpoly](gpoly) module" ] pub type GPOLY = crate :: Reg < u32 , _GPOLY > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPOLY ; # [ doc = "`read()` method returns [gpoly::R](gpoly::R) reader structure" ] impl crate :: Readable for GPOLY { } # [ doc = "`write(|w| ..)` method takes [gpoly::W](gpoly::W) writer structure" ] impl crate :: Writable for GPOLY { } # [ doc = "CRC Polynomial register" ] pub mod gpoly { # [ doc = "Reader of register GPOLY" ] pub type R = crate :: R < u32 , super :: GPOLY > ; # [ doc = "Writer for register GPOLY" ] pub type W = crate :: W < u32 , super :: GPOLY > ; # [ doc = "Register GPOLY `reset()`'s with value 0x1021" ] impl crate :: ResetValue for super :: GPOLY { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1021 } } # [ doc = "Reader of field `LOW`" ] pub type LOW_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `LOW`" ] pub struct LOW_W < 'a > { w : & 'a mut W , } impl < 'a > LOW_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `HIGH`" ] pub type HIGH_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `HIGH`" ] pub struct HIGH_W < 'a > { w : & 'a mut W , } impl < 'a > HIGH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Low Polynominal Half-word" ] # [ inline ( always ) ] pub fn low ( & self ) -> LOW_R { LOW_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - High Polynominal Half-word" ] # [ inline ( always ) ] pub fn high ( & self ) -> HIGH_R { HIGH_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Low Polynominal Half-word" ] # [ inline ( always ) ] pub fn low ( & mut self ) -> LOW_W { LOW_W { w : self } } # [ doc = "Bits 16:31 - High Polynominal Half-word" ] # [ inline ( always ) ] pub fn high ( & mut self ) -> HIGH_W { HIGH_W { w : self } } } } # [ doc = "CRC_GPOLYL register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpolyl](gpolyl) module" ] pub type GPOLYL = crate :: Reg < u16 , _GPOLYL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPOLYL ; # [ doc = "`read()` method returns [gpolyl::R](gpolyl::R) reader structure" ] impl crate :: Readable for GPOLYL { } # [ doc = "`write(|w| ..)` method takes [gpolyl::W](gpolyl::W) writer structure" ] impl crate :: Writable for GPOLYL { } # [ doc = "CRC_GPOLYL register." ] pub mod gpolyl { # [ doc = "Reader of register GPOLYL" ] pub type R = crate :: R < u16 , super :: GPOLYL > ; # [ doc = "Writer for register GPOLYL" ] pub type W = crate :: W < u16 , super :: GPOLYL > ; # [ doc = "Register GPOLYL `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: GPOLYL { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Reader of field `GPOLYL`" ] pub type GPOLYL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `GPOLYL`" ] pub struct GPOLYL_W < 'a > { w : & 'a mut W , } impl < 'a > GPOLYL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - POLYL stores the lower 16 bits of the 16/32 bit CRC polynomial value" ] # [ inline ( always ) ] pub fn gpolyl ( & self ) -> GPOLYL_R { GPOLYL_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - POLYL stores the lower 16 bits of the 16/32 bit CRC polynomial value" ] # [ inline ( always ) ] pub fn gpolyl ( & mut self ) -> GPOLYL_W { GPOLYL_W { w : self } } } } # [ doc = "CRC_GPOLYLL register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpolyll](gpolyll) module" ] pub type GPOLYLL = crate :: Reg < u8 , _GPOLYLL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPOLYLL ; # [ doc = "`read()` method returns [gpolyll::R](gpolyll::R) reader structure" ] impl crate :: Readable for GPOLYLL { } # [ doc = "`write(|w| ..)` method takes [gpolyll::W](gpolyll::W) writer structure" ] impl crate :: Writable for GPOLYLL { } # [ doc = "CRC_GPOLYLL register." ] pub mod gpolyll { # [ doc = "Reader of register GPOLYLL" ] pub type R = crate :: R < u8 , super :: GPOLYLL > ; # [ doc = "Writer for register GPOLYLL" ] pub type W = crate :: W < u8 , super :: GPOLYLL > ; # [ doc = "Register GPOLYLL `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: GPOLYLL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `GPOLYLL`" ] pub type GPOLYLL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `GPOLYLL`" ] pub struct GPOLYLL_W < 'a > { w : & 'a mut W , } impl < 'a > GPOLYLL_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - POLYLL stores the first 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn gpolyll ( & self ) -> GPOLYLL_R { GPOLYLL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - POLYLL stores the first 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn gpolyll ( & mut self ) -> GPOLYLL_W { GPOLYLL_W { w : self } } } } # [ doc = "CRC_GPOLYLU register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpolylu](gpolylu) module" ] pub type GPOLYLU = crate :: Reg < u8 , _GPOLYLU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPOLYLU ; # [ doc = "`read()` method returns [gpolylu::R](gpolylu::R) reader structure" ] impl crate :: Readable for GPOLYLU { } # [ doc = "`write(|w| ..)` method takes [gpolylu::W](gpolylu::W) writer structure" ] impl crate :: Writable for GPOLYLU { } # [ doc = "CRC_GPOLYLU register." ] pub mod gpolylu { # [ doc = "Reader of register GPOLYLU" ] pub type R = crate :: R < u8 , super :: GPOLYLU > ; # [ doc = "Writer for register GPOLYLU" ] pub type W = crate :: W < u8 , super :: GPOLYLU > ; # [ doc = "Register GPOLYLU `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: GPOLYLU { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `GPOLYLU`" ] pub type GPOLYLU_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `GPOLYLU`" ] pub struct GPOLYLU_W < 'a > { w : & 'a mut W , } impl < 'a > GPOLYLU_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - POLYLL stores the second 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn gpolylu ( & self ) -> GPOLYLU_R { GPOLYLU_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - POLYLL stores the second 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn gpolylu ( & mut self ) -> GPOLYLU_W { GPOLYLU_W { w : self } } } } # [ doc = "CRC_GPOLYH register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpolyh](gpolyh) module" ] pub type GPOLYH = crate :: Reg < u16 , _GPOLYH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPOLYH ; # [ doc = "`read()` method returns [gpolyh::R](gpolyh::R) reader structure" ] impl crate :: Readable for GPOLYH { } # [ doc = "`write(|w| ..)` method takes [gpolyh::W](gpolyh::W) writer structure" ] impl crate :: Writable for GPOLYH { } # [ doc = "CRC_GPOLYH register." ] pub mod gpolyh { # [ doc = "Reader of register GPOLYH" ] pub type R = crate :: R < u16 , super :: GPOLYH > ; # [ doc = "Writer for register GPOLYH" ] pub type W = crate :: W < u16 , super :: GPOLYH > ; # [ doc = "Register GPOLYH `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: GPOLYH { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Reader of field `GPOLYH`" ] pub type GPOLYH_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `GPOLYH`" ] pub struct GPOLYH_W < 'a > { w : & 'a mut W , } impl < 'a > GPOLYH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - POLYH stores the high 16 bits of the 16/32 bit CRC polynomial value" ] # [ inline ( always ) ] pub fn gpolyh ( & self ) -> GPOLYH_R { GPOLYH_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - POLYH stores the high 16 bits of the 16/32 bit CRC polynomial value" ] # [ inline ( always ) ] pub fn gpolyh ( & mut self ) -> GPOLYH_W { GPOLYH_W { w : self } } } } # [ doc = "CRC_GPOLYHL register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpolyhl](gpolyhl) module" ] pub type GPOLYHL = crate :: Reg < u8 , _GPOLYHL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPOLYHL ; # [ doc = "`read()` method returns [gpolyhl::R](gpolyhl::R) reader structure" ] impl crate :: Readable for GPOLYHL { } # [ doc = "`write(|w| ..)` method takes [gpolyhl::W](gpolyhl::W) writer structure" ] impl crate :: Writable for GPOLYHL { } # [ doc = "CRC_GPOLYHL register." ] pub mod gpolyhl { # [ doc = "Reader of register GPOLYHL" ] pub type R = crate :: R < u8 , super :: GPOLYHL > ; # [ doc = "Writer for register GPOLYHL" ] pub type W = crate :: W < u8 , super :: GPOLYHL > ; # [ doc = "Register GPOLYHL `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: GPOLYHL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `GPOLYHL`" ] pub type GPOLYHL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `GPOLYHL`" ] pub struct GPOLYHL_W < 'a > { w : & 'a mut W , } impl < 'a > GPOLYHL_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - POLYHL stores the third 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn gpolyhl ( & self ) -> GPOLYHL_R { GPOLYHL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - POLYHL stores the third 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn gpolyhl ( & mut self ) -> GPOLYHL_W { GPOLYHL_W { w : self } } } } # [ doc = "CRC_GPOLYHU register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpolyhu](gpolyhu) module" ] pub type GPOLYHU = crate :: Reg < u8 , _GPOLYHU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPOLYHU ; # [ doc = "`read()` method returns [gpolyhu::R](gpolyhu::R) reader structure" ] impl crate :: Readable for GPOLYHU { } # [ doc = "`write(|w| ..)` method takes [gpolyhu::W](gpolyhu::W) writer structure" ] impl crate :: Writable for GPOLYHU { } # [ doc = "CRC_GPOLYHU register." ] pub mod gpolyhu { # [ doc = "Reader of register GPOLYHU" ] pub type R = crate :: R < u8 , super :: GPOLYHU > ; # [ doc = "Writer for register GPOLYHU" ] pub type W = crate :: W < u8 , super :: GPOLYHU > ; # [ doc = "Register GPOLYHU `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: GPOLYHU { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `GPOLYHU`" ] pub type GPOLYHU_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `GPOLYHU`" ] pub struct GPOLYHU_W < 'a > { w : & 'a mut W , } impl < 'a > GPOLYHU_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - POLYHU stores the fourth 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn gpolyhu ( & self ) -> GPOLYHU_R { GPOLYHU_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - POLYHU stores the fourth 8 bits of the 32 bit CRC" ] # [ inline ( always ) ] pub fn gpolyhu ( & mut self ) -> GPOLYHU_W { GPOLYHU_W { w : self } } } } # [ doc = "CRC Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl](ctrl) module" ] pub type CTRL = crate :: Reg < u32 , _CTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL ; # [ doc = "`read()` method returns [ctrl::R](ctrl::R) reader structure" ] impl crate :: Readable for CTRL { } # [ doc = "`write(|w| ..)` method takes [ctrl::W](ctrl::W) writer structure" ] impl crate :: Writable for CTRL { } # [ doc = "CRC Control register" ] pub mod ctrl { # [ doc = "Reader of register CTRL" ] pub type R = crate :: R < u32 , super :: CTRL > ; # [ doc = "Writer for register CTRL" ] pub type W = crate :: W < u32 , super :: CTRL > ; # [ doc = "Register CTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Width of CRC protocol.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCRC_A { # [ doc = "0: 16-bit CRC protocol." ] _0 , # [ doc = "1: 32-bit CRC protocol." ] _1 } impl From < TCRC_A > for bool { # [ inline ( always ) ] fn from ( variant : TCRC_A ) -> Self { match variant { TCRC_A :: _0 => false , TCRC_A :: _1 => true } } } # [ doc = "Reader of field `TCRC`" ] pub type TCRC_R = crate :: R < bool , TCRC_A > ; impl TCRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCRC_A { match self . bits { false => TCRC_A :: _0 , true => TCRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCRC_A :: _1 } } # [ doc = "Write proxy for field `TCRC`" ] pub struct TCRC_W < 'a > { w : & 'a mut W , } impl < 'a > TCRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "16-bit CRC protocol." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCRC_A :: _0 ) } # [ doc = "32-bit CRC protocol." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCRC_A :: _1 ) } # [ 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 = "Write CRC Data Register As Seed\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAS_A { # [ doc = "0: Writes to the CRC data register are data values." ] _0 , # [ doc = "1: Writes to the CRC data register are seed values." ] _1 } impl From < WAS_A > for bool { # [ inline ( always ) ] fn from ( variant : WAS_A ) -> Self { match variant { WAS_A :: _0 => false , WAS_A :: _1 => true } } } # [ doc = "Reader of field `WAS`" ] pub type WAS_R = crate :: R < bool , WAS_A > ; impl WAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAS_A { match self . bits { false => WAS_A :: _0 , true => WAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAS_A :: _1 } } # [ doc = "Write proxy for field `WAS`" ] pub struct WAS_W < 'a > { w : & 'a mut W , } impl < 'a > WAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the CRC data register are data values." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAS_A :: _0 ) } # [ doc = "Writes to the CRC data register are seed values." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAS_A :: _1 ) } # [ 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 = "Complement Read Of CRC Data Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FXOR_A { # [ doc = "0: No XOR on reading." ] _0 , # [ doc = "1: Invert or complement the read value of the CRC Data register." ] _1 } impl From < FXOR_A > for bool { # [ inline ( always ) ] fn from ( variant : FXOR_A ) -> Self { match variant { FXOR_A :: _0 => false , FXOR_A :: _1 => true } } } # [ doc = "Reader of field `FXOR`" ] pub type FXOR_R = crate :: R < bool , FXOR_A > ; impl FXOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FXOR_A { match self . bits { false => FXOR_A :: _0 , true => FXOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FXOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FXOR_A :: _1 } } # [ doc = "Write proxy for field `FXOR`" ] pub struct FXOR_W < 'a > { w : & 'a mut W , } impl < 'a > FXOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FXOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No XOR on reading." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FXOR_A :: _0 ) } # [ doc = "Invert or complement the read value of the CRC Data register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FXOR_A :: _1 ) } # [ 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 = "Type Of Transpose For Read\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOTR_A { # [ doc = "0: No transposition." ] _00 , # [ doc = "1: Bits in bytes are transposed; bytes are not transposed." ] _01 , # [ doc = "2: Both bits in bytes and bytes are transposed." ] _10 , # [ doc = "3: Only bytes are transposed; no bits in a byte are transposed." ] _11 } impl From < TOTR_A > for u8 { # [ inline ( always ) ] fn from ( variant : TOTR_A ) -> Self { match variant { TOTR_A :: _00 => 0 , TOTR_A :: _01 => 1 , TOTR_A :: _10 => 2 , TOTR_A :: _11 => 3 } } } # [ doc = "Reader of field `TOTR`" ] pub type TOTR_R = crate :: R < u8 , TOTR_A > ; impl TOTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOTR_A { match self . bits { 0 => TOTR_A :: _00 , 1 => TOTR_A :: _01 , 2 => TOTR_A :: _10 , 3 => TOTR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TOTR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TOTR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TOTR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TOTR_A :: _11 } } # [ doc = "Write proxy for field `TOTR`" ] pub struct TOTR_W < 'a > { w : & 'a mut W , } impl < 'a > TOTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOTR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No transposition." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TOTR_A :: _00 ) } # [ doc = "Bits in bytes are transposed; bytes are not transposed." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TOTR_A :: _01 ) } # [ doc = "Both bits in bytes and bytes are transposed." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TOTR_A :: _10 ) } # [ doc = "Only bytes are transposed; no bits in a byte are transposed." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TOTR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 28 ) ) | ( ( ( value as u32 ) & 0x03 ) << 28 ) ; self . w } } # [ doc = "Type Of Transpose For Writes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOT_A { # [ doc = "0: No transposition." ] _00 , # [ doc = "1: Bits in bytes are transposed; bytes are not transposed." ] _01 , # [ doc = "2: Both bits in bytes and bytes are transposed." ] _10 , # [ doc = "3: Only bytes are transposed; no bits in a byte are transposed." ] _11 } impl From < TOT_A > for u8 { # [ inline ( always ) ] fn from ( variant : TOT_A ) -> Self { match variant { TOT_A :: _00 => 0 , TOT_A :: _01 => 1 , TOT_A :: _10 => 2 , TOT_A :: _11 => 3 } } } # [ doc = "Reader of field `TOT`" ] pub type TOT_R = crate :: R < u8 , TOT_A > ; impl TOT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOT_A { match self . bits { 0 => TOT_A :: _00 , 1 => TOT_A :: _01 , 2 => TOT_A :: _10 , 3 => TOT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TOT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TOT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TOT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TOT_A :: _11 } } # [ doc = "Write proxy for field `TOT`" ] pub struct TOT_W < 'a > { w : & 'a mut W , } impl < 'a > TOT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No transposition." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TOT_A :: _00 ) } # [ doc = "Bits in bytes are transposed; bytes are not transposed." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TOT_A :: _01 ) } # [ doc = "Both bits in bytes and bytes are transposed." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TOT_A :: _10 ) } # [ doc = "Only bytes are transposed; no bits in a byte are transposed." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TOT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 30 ) ) | ( ( ( value as u32 ) & 0x03 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 24 - Width of CRC protocol." ] # [ inline ( always ) ] pub fn tcrc ( & self ) -> TCRC_R { TCRC_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Write CRC Data Register As Seed" ] # [ inline ( always ) ] pub fn was ( & self ) -> WAS_R { WAS_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Complement Read Of CRC Data Register" ] # [ inline ( always ) ] pub fn fxor ( & self ) -> FXOR_R { FXOR_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:29 - Type Of Transpose For Read" ] # [ inline ( always ) ] pub fn totr ( & self ) -> TOTR_R { TOTR_R :: new ( ( ( self . bits >> 28 ) & 0x03 ) as u8 ) } # [ doc = "Bits 30:31 - Type Of Transpose For Writes" ] # [ inline ( always ) ] pub fn tot ( & self ) -> TOT_R { TOT_R :: new ( ( ( self . bits >> 30 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bit 24 - Width of CRC protocol." ] # [ inline ( always ) ] pub fn tcrc ( & mut self ) -> TCRC_W { TCRC_W { w : self } } # [ doc = "Bit 25 - Write CRC Data Register As Seed" ] # [ inline ( always ) ] pub fn was ( & mut self ) -> WAS_W { WAS_W { w : self } } # [ doc = "Bit 26 - Complement Read Of CRC Data Register" ] # [ inline ( always ) ] pub fn fxor ( & mut self ) -> FXOR_W { FXOR_W { w : self } } # [ doc = "Bits 28:29 - Type Of Transpose For Read" ] # [ inline ( always ) ] pub fn totr ( & mut self ) -> TOTR_W { TOTR_W { w : self } } # [ doc = "Bits 30:31 - Type Of Transpose For Writes" ] # [ inline ( always ) ] pub fn tot ( & mut self ) -> TOT_W { TOT_W { w : self } } } } # [ doc = "CRC_CTRLHU register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrlhu](ctrlhu) module" ] pub type CTRLHU = crate :: Reg < u8 , _CTRLHU > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRLHU ; # [ doc = "`read()` method returns [ctrlhu::R](ctrlhu::R) reader structure" ] impl crate :: Readable for CTRLHU { } # [ doc = "`write(|w| ..)` method takes [ctrlhu::W](ctrlhu::W) writer structure" ] impl crate :: Writable for CTRLHU { } # [ doc = "CRC_CTRLHU register." ] pub mod ctrlhu { # [ doc = "Reader of register CTRLHU" ] pub type R = crate :: R < u8 , super :: CTRLHU > ; # [ doc = "Writer for register CTRLHU" ] pub type W = crate :: W < u8 , super :: CTRLHU > ; # [ doc = "Register CTRLHU `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CTRLHU { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCRC_A { # [ doc = "0: 16-bit CRC protocol." ] _0 , # [ doc = "1: 32-bit CRC protocol." ] _1 } impl From < TCRC_A > for bool { # [ inline ( always ) ] fn from ( variant : TCRC_A ) -> Self { match variant { TCRC_A :: _0 => false , TCRC_A :: _1 => true } } } # [ doc = "Reader of field `TCRC`" ] pub type TCRC_R = crate :: R < bool , TCRC_A > ; impl TCRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCRC_A { match self . bits { false => TCRC_A :: _0 , true => TCRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCRC_A :: _1 } } # [ doc = "Write proxy for field `TCRC`" ] pub struct TCRC_W < 'a > { w : & 'a mut W , } impl < 'a > TCRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "16-bit CRC protocol." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCRC_A :: _0 ) } # [ doc = "32-bit CRC protocol." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCRC_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAS_A { # [ doc = "0: Writes to CRC data register are data values." ] _0 , # [ doc = "1: Writes to CRC data reguster are seed values." ] _1 } impl From < WAS_A > for bool { # [ inline ( always ) ] fn from ( variant : WAS_A ) -> Self { match variant { WAS_A :: _0 => false , WAS_A :: _1 => true } } } # [ doc = "Reader of field `WAS`" ] pub type WAS_R = crate :: R < bool , WAS_A > ; impl WAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAS_A { match self . bits { false => WAS_A :: _0 , true => WAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAS_A :: _1 } } # [ doc = "Write proxy for field `WAS`" ] pub struct WAS_W < 'a > { w : & 'a mut W , } impl < 'a > WAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to CRC data register are data values." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAS_A :: _0 ) } # [ doc = "Writes to CRC data reguster are seed values." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FXOR_A { # [ doc = "0: No XOR on reading." ] _0 , # [ doc = "1: Invert or complement the read value of CRC data register." ] _1 } impl From < FXOR_A > for bool { # [ inline ( always ) ] fn from ( variant : FXOR_A ) -> Self { match variant { FXOR_A :: _0 => false , FXOR_A :: _1 => true } } } # [ doc = "Reader of field `FXOR`" ] pub type FXOR_R = crate :: R < bool , FXOR_A > ; impl FXOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FXOR_A { match self . bits { false => FXOR_A :: _0 , true => FXOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FXOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FXOR_A :: _1 } } # [ doc = "Write proxy for field `FXOR`" ] pub struct FXOR_W < 'a > { w : & 'a mut W , } impl < 'a > FXOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FXOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No XOR on reading." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FXOR_A :: _0 ) } # [ doc = "Invert or complement the read value of CRC data register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FXOR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOTR_A { # [ doc = "0: No Transposition." ] _00 , # [ doc = "1: Bits in bytes are transposed, bytes are not transposed." ] _01 , # [ doc = "2: Both bits in bytes and bytes are transposed." ] _10 , # [ doc = "3: Only bytes are transposed; no bits in a byte are transposed." ] _11 } impl From < TOTR_A > for u8 { # [ inline ( always ) ] fn from ( variant : TOTR_A ) -> Self { match variant { TOTR_A :: _00 => 0 , TOTR_A :: _01 => 1 , TOTR_A :: _10 => 2 , TOTR_A :: _11 => 3 } } } # [ doc = "Reader of field `TOTR`" ] pub type TOTR_R = crate :: R < u8 , TOTR_A > ; impl TOTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOTR_A { match self . bits { 0 => TOTR_A :: _00 , 1 => TOTR_A :: _01 , 2 => TOTR_A :: _10 , 3 => TOTR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TOTR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TOTR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TOTR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TOTR_A :: _11 } } # [ doc = "Write proxy for field `TOTR`" ] pub struct TOTR_W < 'a > { w : & 'a mut W , } impl < 'a > TOTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOTR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No Transposition." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TOTR_A :: _00 ) } # [ doc = "Bits in bytes are transposed, bytes are not transposed." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TOTR_A :: _01 ) } # [ doc = "Both bits in bytes and bytes are transposed." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TOTR_A :: _10 ) } # [ doc = "Only bytes are transposed; no bits in a byte are transposed." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TOTR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOT_A { # [ doc = "0: No Transposition." ] _00 , # [ doc = "1: Bits in bytes are transposed, bytes are not transposed." ] _01 , # [ doc = "2: Both bits in bytes and bytes are transposed." ] _10 , # [ doc = "3: Only bytes are transposed; no bits in a byte are transposed." ] _11 } impl From < TOT_A > for u8 { # [ inline ( always ) ] fn from ( variant : TOT_A ) -> Self { match variant { TOT_A :: _00 => 0 , TOT_A :: _01 => 1 , TOT_A :: _10 => 2 , TOT_A :: _11 => 3 } } } # [ doc = "Reader of field `TOT`" ] pub type TOT_R = crate :: R < u8 , TOT_A > ; impl TOT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOT_A { match self . bits { 0 => TOT_A :: _00 , 1 => TOT_A :: _01 , 2 => TOT_A :: _10 , 3 => TOT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TOT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TOT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TOT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TOT_A :: _11 } } # [ doc = "Write proxy for field `TOT`" ] pub struct TOT_W < 'a > { w : & 'a mut W , } impl < 'a > TOT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No Transposition." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TOT_A :: _00 ) } # [ doc = "Bits in bytes are transposed, bytes are not transposed." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TOT_A :: _01 ) } # [ doc = "Both bits in bytes and bytes are transposed." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TOT_A :: _10 ) } # [ doc = "Only bytes are transposed; no bits in a byte are transposed." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TOT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn tcrc ( & self ) -> TCRC_R { TCRC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn was ( & self ) -> WAS_R { WAS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn fxor ( & self ) -> FXOR_R { FXOR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:5 - no description available" ] # [ inline ( always ) ] pub fn totr ( & self ) -> TOTR_R { TOTR_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - no description available" ] # [ inline ( always ) ] pub fn tot ( & self ) -> TOT_R { TOT_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn tcrc ( & mut self ) -> TCRC_W { TCRC_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn was ( & mut self ) -> WAS_W { WAS_W { w : self } } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn fxor ( & mut self ) -> FXOR_W { FXOR_W { w : self } } # [ doc = "Bits 4:5 - no description available" ] # [ inline ( always ) ] pub fn totr ( & mut self ) -> TOTR_W { TOTR_W { w : self } } # [ doc = "Bits 6:7 - no description available" ] # [ inline ( always ) ] pub fn tot ( & mut self ) -> TOT_W { TOT_W { w : self } } } } } # [ doc = "USB Device Charger Detection module" ] pub struct USBDCD { _marker : PhantomData < * const ( ) > } unsafe impl Send for USBDCD { } impl USBDCD { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const usbdcd :: RegisterBlock { 0x4003_5000 as * const _ } } impl Deref for USBDCD { type Target = usbdcd :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * USBDCD :: ptr ( ) } } } # [ doc = "USB Device Charger Detection module" ] pub mod usbdcd { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Control register" ] pub control : CONTROL , # [ doc = "0x04 - Clock register" ] pub clock : CLOCK , # [ doc = "0x08 - Status register" ] pub status : STATUS , # [ doc = "0x0c - Signal Override Register" ] pub signal_override : SIGNAL_OVERRIDE , # [ doc = "0x10 - TIMER0 register" ] pub timer0 : TIMER0 , # [ doc = "0x14 - TIMER1 register" ] pub timer1 : TIMER1 , _reserved_6_timer2_bc1 : [ u8 ; 4usize ] , } impl RegisterBlock { # [ doc = "0x18 - TIMER2_BC12 register" ] # [ inline ( always ) ] pub fn timer2_bc12 ( & self ) -> & TIMER2_BC12 { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 24usize ) as * const TIMER2_BC12 ) } } # [ doc = "0x18 - TIMER2_BC12 register" ] # [ inline ( always ) ] pub fn timer2_bc12_mut ( & self ) -> & mut TIMER2_BC12 { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 24usize ) as * mut TIMER2_BC12 ) } } # [ doc = "0x18 - TIMER2_BC11 register" ] # [ inline ( always ) ] pub fn timer2_bc11 ( & self ) -> & TIMER2_BC11 { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 24usize ) as * const TIMER2_BC11 ) } } # [ doc = "0x18 - TIMER2_BC11 register" ] # [ inline ( always ) ] pub fn timer2_bc11_mut ( & self ) -> & mut TIMER2_BC11 { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 24usize ) as * mut TIMER2_BC11 ) } } } # [ doc = "Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [control](control) module" ] pub type CONTROL = crate :: Reg < u32 , _CONTROL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONTROL ; # [ doc = "`read()` method returns [control::R](control::R) reader structure" ] impl crate :: Readable for CONTROL { } # [ doc = "`write(|w| ..)` method takes [control::W](control::W) writer structure" ] impl crate :: Writable for CONTROL { } # [ doc = "Control register" ] pub mod control { # [ doc = "Reader of register CONTROL" ] pub type R = crate :: R < u32 , super :: CONTROL > ; # [ doc = "Writer for register CONTROL" ] pub type W = crate :: W < u32 , super :: CONTROL > ; # [ doc = "Register CONTROL `reset()`'s with value 0x0001_0000" ] impl crate :: ResetValue for super :: CONTROL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_0000 } } # [ doc = "Interrupt Acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IACK_AW { # [ doc = "0: Do not clear the interrupt." ] _0 , # [ doc = "1: Clear the IF bit (interrupt flag)." ] _1 } impl From < IACK_AW > for bool { # [ inline ( always ) ] fn from ( variant : IACK_AW ) -> Self { match variant { IACK_AW :: _0 => false , IACK_AW :: _1 => true } } } # [ doc = "Write proxy for field `IACK`" ] pub struct IACK_W < 'a > { w : & 'a mut W , } impl < 'a > IACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IACK_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IACK_AW :: _0 ) } # [ doc = "Clear the IF bit (interrupt flag)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IACK_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IF_A { # [ doc = "0: No interrupt is pending." ] _0 , # [ doc = "1: An interrupt is pending." ] _1 } impl From < IF_A > for bool { # [ inline ( always ) ] fn from ( variant : IF_A ) -> Self { match variant { IF_A :: _0 => false , IF_A :: _1 => true } } } # [ doc = "Reader of field `IF`" ] pub type IF_R = crate :: R < bool , IF_A > ; impl IF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IF_A { match self . bits { false => IF_A :: _0 , true => IF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IF_A :: _1 } } # [ doc = "Interrupt Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IE_A { # [ doc = "0: Disable interrupts to the system." ] _0 , # [ doc = "1: Enable interrupts to the system." ] _1 } impl From < IE_A > for bool { # [ inline ( always ) ] fn from ( variant : IE_A ) -> Self { match variant { IE_A :: _0 => false , IE_A :: _1 => true } } } # [ doc = "Reader of field `IE`" ] pub type IE_R = crate :: R < bool , IE_A > ; impl IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IE_A { match self . bits { false => IE_A :: _0 , true => IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IE_A :: _1 } } # [ doc = "Write proxy for field `IE`" ] pub struct IE_W < 'a > { w : & 'a mut W , } impl < 'a > IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable interrupts to the system." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IE_A :: _0 ) } # [ doc = "Enable interrupts to the system." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IE_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "BC1.2 compatibility. This bit cannot be changed after start detection.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BC12_A { # [ doc = "0: Compatible with BC1.1 (default)" ] _0 , # [ doc = "1: Compatible with BC1.2" ] _1 } impl From < BC12_A > for bool { # [ inline ( always ) ] fn from ( variant : BC12_A ) -> Self { match variant { BC12_A :: _0 => false , BC12_A :: _1 => true } } } # [ doc = "Reader of field `BC12`" ] pub type BC12_R = crate :: R < bool , BC12_A > ; impl BC12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BC12_A { match self . bits { false => BC12_A :: _0 , true => BC12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BC12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BC12_A :: _1 } } # [ doc = "Write proxy for field `BC12`" ] pub struct BC12_W < 'a > { w : & 'a mut W , } impl < 'a > BC12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BC12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Compatible with BC1.1 (default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BC12_A :: _0 ) } # [ doc = "Compatible with BC1.2" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BC12_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Start Change Detection Sequence\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum START_AW { # [ doc = "0: Do not start the sequence. Writes of this value have no effect." ] _0 , # [ doc = "1: Initiate the charger detection sequence. If the sequence is already running, writes of this value have no effect." ] _1 } impl From < START_AW > for bool { # [ inline ( always ) ] fn from ( variant : START_AW ) -> Self { match variant { START_AW :: _0 => false , START_AW :: _1 => true } } } # [ doc = "Write proxy for field `START`" ] pub struct START_W < 'a > { w : & 'a mut W , } impl < 'a > START_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : START_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not start the sequence. Writes of this value have no effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( START_AW :: _0 ) } # [ doc = "Initiate the charger detection sequence. If the sequence is already running, writes of this value have no effect." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( START_AW :: _1 ) } # [ 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 = "Software Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SR_AW { # [ doc = "0: Do not perform a software reset." ] _0 , # [ doc = "1: Perform a software reset." ] _1 } impl From < SR_AW > for bool { # [ inline ( always ) ] fn from ( variant : SR_AW ) -> Self { match variant { SR_AW :: _0 => false , SR_AW :: _1 => true } } } # [ doc = "Write proxy for field `SR`" ] pub struct SR_W < 'a > { w : & 'a mut W , } impl < 'a > SR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SR_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not perform a software reset." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SR_AW :: _0 ) } # [ doc = "Perform a software reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SR_AW :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 8 - Interrupt Flag" ] # [ inline ( always ) ] pub fn if_ ( & self ) -> IF_R { IF_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Interrupt Enable" ] # [ inline ( always ) ] pub fn ie ( & self ) -> IE_R { IE_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - BC1.2 compatibility. This bit cannot be changed after start detection." ] # [ inline ( always ) ] pub fn bc12 ( & self ) -> BC12_R { BC12_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Interrupt Acknowledge" ] # [ inline ( always ) ] pub fn iack ( & mut self ) -> IACK_W { IACK_W { w : self } } # [ doc = "Bit 16 - Interrupt Enable" ] # [ inline ( always ) ] pub fn ie ( & mut self ) -> IE_W { IE_W { w : self } } # [ doc = "Bit 17 - BC1.2 compatibility. This bit cannot be changed after start detection." ] # [ inline ( always ) ] pub fn bc12 ( & mut self ) -> BC12_W { BC12_W { w : self } } # [ doc = "Bit 24 - Start Change Detection Sequence" ] # [ inline ( always ) ] pub fn start ( & mut self ) -> START_W { START_W { w : self } } # [ doc = "Bit 25 - Software Reset" ] # [ inline ( always ) ] pub fn sr ( & mut self ) -> SR_W { SR_W { w : self } } } } # [ doc = "Clock register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clock](clock) module" ] pub type CLOCK = crate :: Reg < u32 , _CLOCK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLOCK ; # [ doc = "`read()` method returns [clock::R](clock::R) reader structure" ] impl crate :: Readable for CLOCK { } # [ doc = "`write(|w| ..)` method takes [clock::W](clock::W) writer structure" ] impl crate :: Writable for CLOCK { } # [ doc = "Clock register" ] pub mod clock { # [ doc = "Reader of register CLOCK" ] pub type R = crate :: R < u32 , super :: CLOCK > ; # [ doc = "Writer for register CLOCK" ] pub type W = crate :: W < u32 , super :: CLOCK > ; # [ doc = "Register CLOCK `reset()`'s with value 0xc1" ] impl crate :: ResetValue for super :: CLOCK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc1 } } # [ doc = "Unit of Measurement Encoding for Clock Speed\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLOCK_UNIT_A { # [ doc = "0: kHz Speed (between 1 kHz and 1023 kHz)" ] _0 , # [ doc = "1: MHz Speed (between 1 MHz and 1023 MHz)" ] _1 } impl From < CLOCK_UNIT_A > for bool { # [ inline ( always ) ] fn from ( variant : CLOCK_UNIT_A ) -> Self { match variant { CLOCK_UNIT_A :: _0 => false , CLOCK_UNIT_A :: _1 => true } } } # [ doc = "Reader of field `CLOCK_UNIT`" ] pub type CLOCK_UNIT_R = crate :: R < bool , CLOCK_UNIT_A > ; impl CLOCK_UNIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLOCK_UNIT_A { match self . bits { false => CLOCK_UNIT_A :: _0 , true => CLOCK_UNIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLOCK_UNIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLOCK_UNIT_A :: _1 } } # [ doc = "Write proxy for field `CLOCK_UNIT`" ] pub struct CLOCK_UNIT_W < 'a > { w : & 'a mut W , } impl < 'a > CLOCK_UNIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLOCK_UNIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "kHz Speed (between 1 kHz and 1023 kHz)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLOCK_UNIT_A :: _0 ) } # [ doc = "MHz Speed (between 1 MHz and 1023 MHz)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLOCK_UNIT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `CLOCK_SPEED`" ] pub type CLOCK_SPEED_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLOCK_SPEED`" ] pub struct CLOCK_SPEED_W < 'a > { w : & 'a mut W , } impl < 'a > CLOCK_SPEED_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 2 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 2 ) ; self . w } } impl R { # [ doc = "Bit 0 - Unit of Measurement Encoding for Clock Speed" ] # [ inline ( always ) ] pub fn clock_unit ( & self ) -> CLOCK_UNIT_R { CLOCK_UNIT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 2:11 - Numerical Value of Clock Speed in Binary" ] # [ inline ( always ) ] pub fn clock_speed ( & self ) -> CLOCK_SPEED_R { CLOCK_SPEED_R :: new ( ( ( self . bits >> 2 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bit 0 - Unit of Measurement Encoding for Clock Speed" ] # [ inline ( always ) ] pub fn clock_unit ( & mut self ) -> CLOCK_UNIT_W { CLOCK_UNIT_W { w : self } } # [ doc = "Bits 2:11 - Numerical Value of Clock Speed in Binary" ] # [ inline ( always ) ] pub fn clock_speed ( & mut self ) -> CLOCK_SPEED_W { CLOCK_SPEED_W { w : self } } } } # [ doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "Status register" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Charger Detection Sequence Results\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQ_RES_A { # [ doc = "0: No results to report." ] _00 , # [ doc = "1: Attached to an SDP. Must comply with USB 2.0 by drawing only 2.5 mA (max) until connected." ] _01 , # [ doc = "2: Attached to a charging port. The exact meaning depends on bit 18: 0: Attached to either a CDP or a DCP. The charger type detection has not completed. 1: Attached to a CDP. The charger type detection has completed." ] _10 , # [ doc = "3: Attached to a DCP." ] _11 } impl From < SEQ_RES_A > for u8 { # [ inline ( always ) ] fn from ( variant : SEQ_RES_A ) -> Self { match variant { SEQ_RES_A :: _00 => 0 , SEQ_RES_A :: _01 => 1 , SEQ_RES_A :: _10 => 2 , SEQ_RES_A :: _11 => 3 } } } # [ doc = "Reader of field `SEQ_RES`" ] pub type SEQ_RES_R = crate :: R < u8 , SEQ_RES_A > ; impl SEQ_RES_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEQ_RES_A { match self . bits { 0 => SEQ_RES_A :: _00 , 1 => SEQ_RES_A :: _01 , 2 => SEQ_RES_A :: _10 , 3 => SEQ_RES_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SEQ_RES_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SEQ_RES_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SEQ_RES_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SEQ_RES_A :: _11 } } # [ doc = "Charger Detection Sequence Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQ_STAT_A { # [ doc = "0: The module is either not enabled, or the module is enabled but the data pins have not yet been detected." ] _00 , # [ doc = "1: Data pin contact detection is complete." ] _01 , # [ doc = "2: Charging port detection is complete." ] _10 , # [ doc = "3: Charger type detection is complete." ] _11 } impl From < SEQ_STAT_A > for u8 { # [ inline ( always ) ] fn from ( variant : SEQ_STAT_A ) -> Self { match variant { SEQ_STAT_A :: _00 => 0 , SEQ_STAT_A :: _01 => 1 , SEQ_STAT_A :: _10 => 2 , SEQ_STAT_A :: _11 => 3 } } } # [ doc = "Reader of field `SEQ_STAT`" ] pub type SEQ_STAT_R = crate :: R < u8 , SEQ_STAT_A > ; impl SEQ_STAT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEQ_STAT_A { match self . bits { 0 => SEQ_STAT_A :: _00 , 1 => SEQ_STAT_A :: _01 , 2 => SEQ_STAT_A :: _10 , 3 => SEQ_STAT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SEQ_STAT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SEQ_STAT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SEQ_STAT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SEQ_STAT_A :: _11 } } # [ doc = "Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR_A { # [ doc = "0: No sequence errors." ] _0 , # [ doc = "1: Error in the detection sequence. See the SEQ_STAT field to determine the phase in which the error occurred." ] _1 } impl From < ERR_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR_A ) -> Self { match variant { ERR_A :: _0 => false , ERR_A :: _1 => true } } } # [ doc = "Reader of field `ERR`" ] pub type ERR_R = crate :: R < bool , ERR_A > ; impl ERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR_A { match self . bits { false => ERR_A :: _0 , true => ERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR_A :: _1 } } # [ doc = "Timeout Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TO_A { # [ doc = "0: The detection sequence has not been running for over 1 s." ] _0 , # [ doc = "1: It has been over 1 s since the data pin contact was detected and debounced." ] _1 } impl From < TO_A > for bool { # [ inline ( always ) ] fn from ( variant : TO_A ) -> Self { match variant { TO_A :: _0 => false , TO_A :: _1 => true } } } # [ doc = "Reader of field `TO`" ] pub type TO_R = crate :: R < bool , TO_A > ; impl TO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TO_A { match self . bits { false => TO_A :: _0 , true => TO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TO_A :: _1 } } # [ doc = "Active Status Indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACTIVE_A { # [ doc = "0: The sequence is not running." ] _0 , # [ doc = "1: The sequence is running." ] _1 } impl From < ACTIVE_A > for bool { # [ inline ( always ) ] fn from ( variant : ACTIVE_A ) -> Self { match variant { ACTIVE_A :: _0 => false , ACTIVE_A :: _1 => true } } } # [ doc = "Reader of field `ACTIVE`" ] pub type ACTIVE_R = crate :: R < bool , ACTIVE_A > ; impl ACTIVE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACTIVE_A { match self . bits { false => ACTIVE_A :: _0 , true => ACTIVE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACTIVE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACTIVE_A :: _1 } } impl R { # [ doc = "Bits 16:17 - Charger Detection Sequence Results" ] # [ inline ( always ) ] pub fn seq_res ( & self ) -> SEQ_RES_R { SEQ_RES_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - Charger Detection Sequence Status" ] # [ inline ( always ) ] pub fn seq_stat ( & self ) -> SEQ_STAT_R { SEQ_STAT_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bit 20 - Error Flag" ] # [ inline ( always ) ] pub fn err ( & self ) -> ERR_R { ERR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Timeout Flag" ] # [ inline ( always ) ] pub fn to ( & self ) -> TO_R { TO_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Active Status Indicator" ] # [ inline ( always ) ] pub fn active ( & self ) -> ACTIVE_R { ACTIVE_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } } } # [ doc = "Signal Override Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [signal_override](signal_override) module" ] pub type SIGNAL_OVERRIDE = crate :: Reg < u32 , _SIGNAL_OVERRIDE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SIGNAL_OVERRIDE ; # [ doc = "`read()` method returns [signal_override::R](signal_override::R) reader structure" ] impl crate :: Readable for SIGNAL_OVERRIDE { } # [ doc = "`write(|w| ..)` method takes [signal_override::W](signal_override::W) writer structure" ] impl crate :: Writable for SIGNAL_OVERRIDE { } # [ doc = "Signal Override Register" ] pub mod signal_override { # [ doc = "Reader of register SIGNAL_OVERRIDE" ] pub type R = crate :: R < u32 , super :: SIGNAL_OVERRIDE > ; # [ doc = "Writer for register SIGNAL_OVERRIDE" ] pub type W = crate :: W < u32 , super :: SIGNAL_OVERRIDE > ; # [ doc = "Register SIGNAL_OVERRIDE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SIGNAL_OVERRIDE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Phase Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: No overrides. Bit field must remain at this value during normal USB data communication to prevent unexpected conditions on USB_DP and USB_DM pins. (Default)" ] _00 , # [ doc = "1: Reserved, not for customer use." ] _01 , # [ doc = "2: Enables VDP_SRC voltage source for the USB_DP pin and IDM_SINK current source for the USB_DM pin." ] _10 , # [ doc = "3: Reserved, not for customer use." ] _11 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _00 => 0 , PS_A :: _01 => 1 , PS_A :: _10 => 2 , PS_A :: _11 => 3 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _00 , 1 => PS_A :: _01 , 2 => PS_A :: _10 , 3 => PS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PS_A :: _11 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No overrides. Bit field must remain at this value during normal USB data communication to prevent unexpected conditions on USB_DP and USB_DM pins. (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PS_A :: _00 ) } # [ doc = "Reserved, not for customer use." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PS_A :: _01 ) } # [ doc = "Enables VDP_SRC voltage source for the USB_DP pin and IDM_SINK current source for the USB_DM pin." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PS_A :: _10 ) } # [ doc = "Reserved, not for customer use." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Phase Selection" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Phase Selection" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } } } # [ doc = "TIMER0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer0](timer0) module" ] pub type TIMER0 = crate :: Reg < u32 , _TIMER0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER0 ; # [ doc = "`read()` method returns [timer0::R](timer0::R) reader structure" ] impl crate :: Readable for TIMER0 { } # [ doc = "`write(|w| ..)` method takes [timer0::W](timer0::W) writer structure" ] impl crate :: Writable for TIMER0 { } # [ doc = "TIMER0 register" ] pub mod timer0 { # [ doc = "Reader of register TIMER0" ] pub type R = crate :: R < u32 , super :: TIMER0 > ; # [ doc = "Writer for register TIMER0" ] pub type W = crate :: W < u32 , super :: TIMER0 > ; # [ doc = "Register TIMER0 `reset()`'s with value 0x0010_0000" ] impl crate :: ResetValue for super :: TIMER0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0010_0000 } } # [ doc = "Reader of field `TUNITCON`" ] pub type TUNITCON_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `TSEQ_INIT`" ] pub type TSEQ_INIT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSEQ_INIT`" ] pub struct TSEQ_INIT_W < 'a > { w : & 'a mut W , } impl < 'a > TSEQ_INIT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:11 - Unit Connection Timer Elapse (in ms)" ] # [ inline ( always ) ] pub fn tunitcon ( & self ) -> TUNITCON_R { TUNITCON_R :: new ( ( self . bits & 0x0fff ) as u16 ) } # [ doc = "Bits 16:25 - Sequence Initiation Time" ] # [ inline ( always ) ] pub fn tseq_init ( & self ) -> TSEQ_INIT_R { TSEQ_INIT_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 16:25 - Sequence Initiation Time" ] # [ inline ( always ) ] pub fn tseq_init ( & mut self ) -> TSEQ_INIT_W { TSEQ_INIT_W { w : self } } } } # [ doc = "TIMER1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer1](timer1) module" ] pub type TIMER1 = crate :: Reg < u32 , _TIMER1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER1 ; # [ doc = "`read()` method returns [timer1::R](timer1::R) reader structure" ] impl crate :: Readable for TIMER1 { } # [ doc = "`write(|w| ..)` method takes [timer1::W](timer1::W) writer structure" ] impl crate :: Writable for TIMER1 { } # [ doc = "TIMER1 register" ] pub mod timer1 { # [ doc = "Reader of register TIMER1" ] pub type R = crate :: R < u32 , super :: TIMER1 > ; # [ doc = "Writer for register TIMER1" ] pub type W = crate :: W < u32 , super :: TIMER1 > ; # [ doc = "Register TIMER1 `reset()`'s with value 0x000a_0028" ] impl crate :: ResetValue for super :: TIMER1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x000a_0028 } } # [ doc = "Reader of field `TVDPSRC_ON`" ] pub type TVDPSRC_ON_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TVDPSRC_ON`" ] pub struct TVDPSRC_ON_W < 'a > { w : & 'a mut W , } impl < 'a > TVDPSRC_ON_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } # [ doc = "Reader of field `TDCD_DBNC`" ] pub type TDCD_DBNC_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TDCD_DBNC`" ] pub struct TDCD_DBNC_W < 'a > { w : & 'a mut W , } impl < 'a > TDCD_DBNC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Time Period Comparator Enabled" ] # [ inline ( always ) ] pub fn tvdpsrc_on ( & self ) -> TVDPSRC_ON_R { TVDPSRC_ON_R :: new ( ( self . bits & 0x03ff ) as u16 ) } # [ doc = "Bits 16:25 - Time Period to Debounce D+ Signal" ] # [ inline ( always ) ] pub fn tdcd_dbnc ( & self ) -> TDCD_DBNC_R { TDCD_DBNC_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Time Period Comparator Enabled" ] # [ inline ( always ) ] pub fn tvdpsrc_on ( & mut self ) -> TVDPSRC_ON_W { TVDPSRC_ON_W { w : self } } # [ doc = "Bits 16:25 - Time Period to Debounce D+ Signal" ] # [ inline ( always ) ] pub fn tdcd_dbnc ( & mut self ) -> TDCD_DBNC_W { TDCD_DBNC_W { w : self } } } } # [ doc = "TIMER2_BC11 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer2_bc11](timer2_bc11) module" ] pub type TIMER2_BC11 = crate :: Reg < u32 , _TIMER2_BC11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER2_BC11 ; # [ doc = "`read()` method returns [timer2_bc11::R](timer2_bc11::R) reader structure" ] impl crate :: Readable for TIMER2_BC11 { } # [ doc = "`write(|w| ..)` method takes [timer2_bc11::W](timer2_bc11::W) writer structure" ] impl crate :: Writable for TIMER2_BC11 { } # [ doc = "TIMER2_BC11 register" ] pub mod timer2_bc11 { # [ doc = "Reader of register TIMER2_BC11" ] pub type R = crate :: R < u32 , super :: TIMER2_BC11 > ; # [ doc = "Writer for register TIMER2_BC11" ] pub type W = crate :: W < u32 , super :: TIMER2_BC11 > ; # [ doc = "Register TIMER2_BC11 `reset()`'s with value 0x0028_0001" ] impl crate :: ResetValue for super :: TIMER2_BC11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0028_0001 } } # [ doc = "Reader of field `CHECK_DM`" ] pub type CHECK_DM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CHECK_DM`" ] pub struct CHECK_DM_W < 'a > { w : & 'a mut W , } impl < 'a > CHECK_DM_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `TVDPSRC_CON`" ] pub type TVDPSRC_CON_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TVDPSRC_CON`" ] pub struct TVDPSRC_CON_W < 'a > { w : & 'a mut W , } impl < 'a > TVDPSRC_CON_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Time Before Check of D- Line" ] # [ inline ( always ) ] pub fn check_dm ( & self ) -> CHECK_DM_R { CHECK_DM_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:25 - Time Period Before Enabling D+ Pullup" ] # [ inline ( always ) ] pub fn tvdpsrc_con ( & self ) -> TVDPSRC_CON_R { TVDPSRC_CON_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:3 - Time Before Check of D- Line" ] # [ inline ( always ) ] pub fn check_dm ( & mut self ) -> CHECK_DM_W { CHECK_DM_W { w : self } } # [ doc = "Bits 16:25 - Time Period Before Enabling D+ Pullup" ] # [ inline ( always ) ] pub fn tvdpsrc_con ( & mut self ) -> TVDPSRC_CON_W { TVDPSRC_CON_W { w : self } } } } # [ doc = "TIMER2_BC12 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer2_bc12](timer2_bc12) module" ] pub type TIMER2_BC12 = crate :: Reg < u32 , _TIMER2_BC12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER2_BC12 ; # [ doc = "`read()` method returns [timer2_bc12::R](timer2_bc12::R) reader structure" ] impl crate :: Readable for TIMER2_BC12 { } # [ doc = "`write(|w| ..)` method takes [timer2_bc12::W](timer2_bc12::W) writer structure" ] impl crate :: Writable for TIMER2_BC12 { } # [ doc = "TIMER2_BC12 register" ] pub mod timer2_bc12 { # [ doc = "Reader of register TIMER2_BC12" ] pub type R = crate :: R < u32 , super :: TIMER2_BC12 > ; # [ doc = "Writer for register TIMER2_BC12" ] pub type W = crate :: W < u32 , super :: TIMER2_BC12 > ; # [ doc = "Register TIMER2_BC12 `reset()`'s with value 0x0001_0028" ] impl crate :: ResetValue for super :: TIMER2_BC12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_0028 } } # [ doc = "Reader of field `TVDMSRC_ON`" ] pub type TVDMSRC_ON_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TVDMSRC_ON`" ] pub struct TVDMSRC_ON_W < 'a > { w : & 'a mut W , } impl < 'a > TVDMSRC_ON_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } # [ doc = "Reader of field `TWAIT_AFTER_PRD`" ] pub type TWAIT_AFTER_PRD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TWAIT_AFTER_PRD`" ] pub struct TWAIT_AFTER_PRD_W < 'a > { w : & 'a mut W , } impl < 'a > TWAIT_AFTER_PRD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Sets the amount of time (in ms) that the module enables the VDM_SRC. Valid values are 0-40ms." ] # [ inline ( always ) ] pub fn tvdmsrc_on ( & self ) -> TVDMSRC_ON_R { TVDMSRC_ON_R :: new ( ( self . bits & 0x03ff ) as u16 ) } # [ doc = "Bits 16:25 - Sets the amount of time (in ms) that the module waits after primary detection before start to secondary detection" ] # [ inline ( always ) ] pub fn twait_after_prd ( & self ) -> TWAIT_AFTER_PRD_R { TWAIT_AFTER_PRD_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Sets the amount of time (in ms) that the module enables the VDM_SRC. Valid values are 0-40ms." ] # [ inline ( always ) ] pub fn tvdmsrc_on ( & mut self ) -> TVDMSRC_ON_W { TVDMSRC_ON_W { w : self } } # [ doc = "Bits 16:25 - Sets the amount of time (in ms) that the module waits after primary detection before start to secondary detection" ] # [ inline ( always ) ] pub fn twait_after_prd ( & mut self ) -> TWAIT_AFTER_PRD_W { TWAIT_AFTER_PRD_W { w : self } } } } } # [ doc = "Programmable Delay Block" ] pub struct PDB0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for PDB0 { } impl PDB0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const pdb0 :: RegisterBlock { 0x4003_6000 as * const _ } } impl Deref for PDB0 { type Target = pdb0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * PDB0 :: ptr ( ) } } } # [ doc = "Programmable Delay Block" ] pub mod pdb0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Status and Control register" ] pub sc : SC , # [ doc = "0x04 - Modulus register" ] pub mod_ : MOD , # [ doc = "0x08 - Counter register" ] pub cnt : CNT , # [ doc = "0x0c - Interrupt Delay register" ] pub idly : IDLY , # [ doc = "0x10 - Channel n Control register 1" ] pub ch0c1 : CHC1 , # [ doc = "0x14 - Channel n Status register" ] pub ch0s : CHS , # [ doc = "0x18 - Channel n Delay 0 register" ] pub ch0dly0 : CHDLY0 , # [ doc = "0x1c - Channel n Delay 1 register" ] pub ch0dly1 : CHDLY1 , _reserved8 : [ u8 ; 24usize ] , # [ doc = "0x38 - Channel n Control register 1" ] pub ch1c1 : CHC1 , # [ doc = "0x3c - Channel n Status register" ] pub ch1s : CHS , # [ doc = "0x40 - Channel n Delay 0 register" ] pub ch1dly0 : CHDLY0 , # [ doc = "0x44 - Channel n Delay 1 register" ] pub ch1dly1 : CHDLY1 , _reserved12 : [ u8 ; 264usize ] , # [ doc = "0x150 - DAC Interval Trigger n Control register" ] pub dacintc0 : DACINTC , # [ doc = "0x154 - DAC Interval n register" ] pub dacint0 : DACINT , # [ doc = "0x158 - DAC Interval Trigger n Control register" ] pub dacintc1 : DACINTC , # [ doc = "0x15c - DAC Interval n register" ] pub dacint1 : DACINT , _reserved16 : [ u8 ; 48usize ] , # [ doc = "0x190 - Pulse-Out n Enable register" ] pub poen : POEN , # [ doc = "0x194 - Pulse-Out n Delay register" ] pub podly : [ PODLY ; 4 ] , } # [ doc = "Status and Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u32 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "Status and Control register" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u32 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u32 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `LDOK`" ] pub type LDOK_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `LDOK`" ] pub struct LDOK_W < 'a > { w : & 'a mut W , } impl < 'a > LDOK_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Continuous Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CONT_A { # [ doc = "0: PDB operation in One-Shot mode" ] _0 , # [ doc = "1: PDB operation in Continuous mode" ] _1 } impl From < CONT_A > for bool { # [ inline ( always ) ] fn from ( variant : CONT_A ) -> Self { match variant { CONT_A :: _0 => false , CONT_A :: _1 => true } } } # [ doc = "Reader of field `CONT`" ] pub type CONT_R = crate :: R < bool , CONT_A > ; impl CONT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CONT_A { match self . bits { false => CONT_A :: _0 , true => CONT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CONT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CONT_A :: _1 } } # [ doc = "Write proxy for field `CONT`" ] pub struct CONT_W < 'a > { w : & 'a mut W , } impl < 'a > CONT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CONT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB operation in One-Shot mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CONT_A :: _0 ) } # [ doc = "PDB operation in Continuous mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CONT_A :: _1 ) } # [ 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 } } # [ doc = "Multiplication Factor Select for Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MULT_A { # [ doc = "0: Multiplication factor is 1." ] _00 , # [ doc = "1: Multiplication factor is 10." ] _01 , # [ doc = "2: Multiplication factor is 20." ] _10 , # [ doc = "3: Multiplication factor is 40." ] _11 } impl From < MULT_A > for u8 { # [ inline ( always ) ] fn from ( variant : MULT_A ) -> Self { match variant { MULT_A :: _00 => 0 , MULT_A :: _01 => 1 , MULT_A :: _10 => 2 , MULT_A :: _11 => 3 } } } # [ doc = "Reader of field `MULT`" ] pub type MULT_R = crate :: R < u8 , MULT_A > ; impl MULT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MULT_A { match self . bits { 0 => MULT_A :: _00 , 1 => MULT_A :: _01 , 2 => MULT_A :: _10 , 3 => MULT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MULT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MULT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MULT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MULT_A :: _11 } } # [ doc = "Write proxy for field `MULT`" ] pub struct MULT_W < 'a > { w : & 'a mut W , } impl < 'a > MULT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MULT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Multiplication factor is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _00 ) } # [ doc = "Multiplication factor is 10." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _01 ) } # [ doc = "Multiplication factor is 20." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _10 ) } # [ doc = "Multiplication factor is 40." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "PDB Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDBIE_A { # [ doc = "0: PDB interrupt disabled." ] _0 , # [ doc = "1: PDB interrupt enabled." ] _1 } impl From < PDBIE_A > for bool { # [ inline ( always ) ] fn from ( variant : PDBIE_A ) -> Self { match variant { PDBIE_A :: _0 => false , PDBIE_A :: _1 => true } } } # [ doc = "Reader of field `PDBIE`" ] pub type PDBIE_R = crate :: R < bool , PDBIE_A > ; impl PDBIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDBIE_A { match self . bits { false => PDBIE_A :: _0 , true => PDBIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDBIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDBIE_A :: _1 } } # [ doc = "Write proxy for field `PDBIE`" ] pub struct PDBIE_W < 'a > { w : & 'a mut W , } impl < 'a > PDBIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDBIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDBIE_A :: _0 ) } # [ doc = "PDB interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDBIE_A :: _1 ) } # [ 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 = "Reader of field `PDBIF`" ] pub type PDBIF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PDBIF`" ] pub struct PDBIF_W < 'a > { w : & 'a mut W , } impl < 'a > PDBIF_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 = "PDB Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDBEN_A { # [ doc = "0: PDB disabled. Counter is off." ] _0 , # [ doc = "1: PDB enabled." ] _1 } impl From < PDBEN_A > for bool { # [ inline ( always ) ] fn from ( variant : PDBEN_A ) -> Self { match variant { PDBEN_A :: _0 => false , PDBEN_A :: _1 => true } } } # [ doc = "Reader of field `PDBEN`" ] pub type PDBEN_R = crate :: R < bool , PDBEN_A > ; impl PDBEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDBEN_A { match self . bits { false => PDBEN_A :: _0 , true => PDBEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDBEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDBEN_A :: _1 } } # [ doc = "Write proxy for field `PDBEN`" ] pub struct PDBEN_W < 'a > { w : & 'a mut W , } impl < 'a > PDBEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDBEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB disabled. Counter is off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDBEN_A :: _0 ) } # [ doc = "PDB enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDBEN_A :: _1 ) } # [ 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 = "Trigger Input Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRGSEL_A { # [ doc = "0: Trigger-In 0 is selected." ] _0000 , # [ doc = "1: Trigger-In 1 is selected." ] _0001 , # [ doc = "2: Trigger-In 2 is selected." ] _0010 , # [ doc = "3: Trigger-In 3 is selected." ] _0011 , # [ doc = "4: Trigger-In 4 is selected." ] _0100 , # [ doc = "5: Trigger-In 5 is selected." ] _0101 , # [ doc = "6: Trigger-In 6 is selected." ] _0110 , # [ doc = "7: Trigger-In 7 is selected." ] _0111 , # [ doc = "8: Trigger-In 8 is selected." ] _1000 , # [ doc = "9: Trigger-In 9 is selected." ] _1001 , # [ doc = "10: Trigger-In 10 is selected." ] _1010 , # [ doc = "11: Trigger-In 11 is selected." ] _1011 , # [ doc = "12: Trigger-In 12 is selected." ] _1100 , # [ doc = "13: Trigger-In 13 is selected." ] _1101 , # [ doc = "14: Trigger-In 14 is selected." ] _1110 , # [ doc = "15: Software trigger is selected." ] _1111 } impl From < TRGSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : TRGSEL_A ) -> Self { match variant { TRGSEL_A :: _0000 => 0 , TRGSEL_A :: _0001 => 1 , TRGSEL_A :: _0010 => 2 , TRGSEL_A :: _0011 => 3 , TRGSEL_A :: _0100 => 4 , TRGSEL_A :: _0101 => 5 , TRGSEL_A :: _0110 => 6 , TRGSEL_A :: _0111 => 7 , TRGSEL_A :: _1000 => 8 , TRGSEL_A :: _1001 => 9 , TRGSEL_A :: _1010 => 10 , TRGSEL_A :: _1011 => 11 , TRGSEL_A :: _1100 => 12 , TRGSEL_A :: _1101 => 13 , TRGSEL_A :: _1110 => 14 , TRGSEL_A :: _1111 => 15 } } } # [ doc = "Reader of field `TRGSEL`" ] pub type TRGSEL_R = crate :: R < u8 , TRGSEL_A > ; impl TRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRGSEL_A { match self . bits { 0 => TRGSEL_A :: _0000 , 1 => TRGSEL_A :: _0001 , 2 => TRGSEL_A :: _0010 , 3 => TRGSEL_A :: _0011 , 4 => TRGSEL_A :: _0100 , 5 => TRGSEL_A :: _0101 , 6 => TRGSEL_A :: _0110 , 7 => TRGSEL_A :: _0111 , 8 => TRGSEL_A :: _1000 , 9 => TRGSEL_A :: _1001 , 10 => TRGSEL_A :: _1010 , 11 => TRGSEL_A :: _1011 , 12 => TRGSEL_A :: _1100 , 13 => TRGSEL_A :: _1101 , 14 => TRGSEL_A :: _1110 , 15 => TRGSEL_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == TRGSEL_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == TRGSEL_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == TRGSEL_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == TRGSEL_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == TRGSEL_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == TRGSEL_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == TRGSEL_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == TRGSEL_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == TRGSEL_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == TRGSEL_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == TRGSEL_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == TRGSEL_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == TRGSEL_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == TRGSEL_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == TRGSEL_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == TRGSEL_A :: _1111 } } # [ doc = "Write proxy for field `TRGSEL`" ] pub struct TRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRGSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Trigger-In 0 is selected." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0000 ) } # [ doc = "Trigger-In 1 is selected." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0001 ) } # [ doc = "Trigger-In 2 is selected." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0010 ) } # [ doc = "Trigger-In 3 is selected." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0011 ) } # [ doc = "Trigger-In 4 is selected." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0100 ) } # [ doc = "Trigger-In 5 is selected." ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0101 ) } # [ doc = "Trigger-In 6 is selected." ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0110 ) } # [ doc = "Trigger-In 7 is selected." ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0111 ) } # [ doc = "Trigger-In 8 is selected." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _1000 ) } # [ doc = "Trigger-In 9 is selected." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _1001 ) } # [ doc = "Trigger-In 10 is selected." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _1010 ) } # [ doc = "Trigger-In 11 is selected." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _1011 ) } # [ doc = "Trigger-In 12 is selected." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _1100 ) } # [ doc = "Trigger-In 13 is selected." ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _1101 ) } # [ doc = "Trigger-In 14 is selected." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _1110 ) } # [ doc = "Software trigger is selected." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Prescaler Divider Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRESCALER_A { # [ doc = "0: Counting uses the peripheral clock divided by multiplication factor selected by MULT." ] _000 , # [ doc = "1: Counting uses the peripheral clock divided by twice of the multiplication factor selected by MULT." ] _001 , # [ doc = "2: Counting uses the peripheral clock divided by four times of the multiplication factor selected by MULT." ] _010 , # [ doc = "3: Counting uses the peripheral clock divided by eight times of the multiplication factor selected by MULT." ] _011 , # [ doc = "4: Counting uses the peripheral clock divided by 16 times of the multiplication factor selected by MULT." ] _100 , # [ doc = "5: Counting uses the peripheral clock divided by 32 times of the multiplication factor selected by MULT." ] _101 , # [ doc = "6: Counting uses the peripheral clock divided by 64 times of the multiplication factor selected by MULT." ] _110 , # [ doc = "7: Counting uses the peripheral clock divided by 128 times of the multiplication factor selected by MULT." ] _111 } impl From < PRESCALER_A > for u8 { # [ inline ( always ) ] fn from ( variant : PRESCALER_A ) -> Self { match variant { PRESCALER_A :: _000 => 0 , PRESCALER_A :: _001 => 1 , PRESCALER_A :: _010 => 2 , PRESCALER_A :: _011 => 3 , PRESCALER_A :: _100 => 4 , PRESCALER_A :: _101 => 5 , PRESCALER_A :: _110 => 6 , PRESCALER_A :: _111 => 7 } } } # [ doc = "Reader of field `PRESCALER`" ] pub type PRESCALER_R = crate :: R < u8 , PRESCALER_A > ; impl PRESCALER_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PRESCALER_A { match self . bits { 0 => PRESCALER_A :: _000 , 1 => PRESCALER_A :: _001 , 2 => PRESCALER_A :: _010 , 3 => PRESCALER_A :: _011 , 4 => PRESCALER_A :: _100 , 5 => PRESCALER_A :: _101 , 6 => PRESCALER_A :: _110 , 7 => PRESCALER_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PRESCALER_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PRESCALER_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PRESCALER_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PRESCALER_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PRESCALER_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PRESCALER_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PRESCALER_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PRESCALER_A :: _111 } } # [ doc = "Write proxy for field `PRESCALER`" ] pub struct PRESCALER_W < 'a > { w : & 'a mut W , } impl < 'a > PRESCALER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PRESCALER_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Counting uses the peripheral clock divided by multiplication factor selected by MULT." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PRESCALER_A :: _000 ) } # [ doc = "Counting uses the peripheral clock divided by twice of the multiplication factor selected by MULT." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PRESCALER_A :: _001 ) } # [ doc = "Counting uses the peripheral clock divided by four times of the multiplication factor selected by MULT." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PRESCALER_A :: _010 ) } # [ doc = "Counting uses the peripheral clock divided by eight times of the multiplication factor selected by MULT." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PRESCALER_A :: _011 ) } # [ doc = "Counting uses the peripheral clock divided by 16 times of the multiplication factor selected by MULT." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PRESCALER_A :: _100 ) } # [ doc = "Counting uses the peripheral clock divided by 32 times of the multiplication factor selected by MULT." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PRESCALER_A :: _101 ) } # [ doc = "Counting uses the peripheral clock divided by 64 times of the multiplication factor selected by MULT." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PRESCALER_A :: _110 ) } # [ doc = "Counting uses the peripheral clock divided by 128 times of the multiplication factor selected by MULT." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PRESCALER_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 12 ) ) | ( ( ( value as u32 ) & 0x07 ) << 12 ) ; self . w } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA disabled." ] _0 , # [ doc = "1: DMA enabled." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Write proxy for field `SWTRIG`" ] pub struct SWTRIG_W < 'a > { w : & 'a mut W , } impl < 'a > SWTRIG_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "PDB Sequence Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDBEIE_A { # [ doc = "0: PDB sequence error interrupt disabled." ] _0 , # [ doc = "1: PDB sequence error interrupt enabled." ] _1 } impl From < PDBEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : PDBEIE_A ) -> Self { match variant { PDBEIE_A :: _0 => false , PDBEIE_A :: _1 => true } } } # [ doc = "Reader of field `PDBEIE`" ] pub type PDBEIE_R = crate :: R < bool , PDBEIE_A > ; impl PDBEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDBEIE_A { match self . bits { false => PDBEIE_A :: _0 , true => PDBEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDBEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDBEIE_A :: _1 } } # [ doc = "Write proxy for field `PDBEIE`" ] pub struct PDBEIE_W < 'a > { w : & 'a mut W , } impl < 'a > PDBEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDBEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB sequence error interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDBEIE_A :: _0 ) } # [ doc = "PDB sequence error interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDBEIE_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Load Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LDMOD_A { # [ doc = "0: The internal registers are loaded with the values from their buffers immediately after 1 is written to LDOK." ] _00 , # [ doc = "1: The internal registers are loaded with the values from their buffers when the PDB counter reaches the MOD register value after 1 is written to LDOK." ] _01 , # [ doc = "2: The internal registers are loaded with the values from their buffers when a trigger input event is detected after 1 is written to LDOK." ] _10 , # [ doc = "3: The internal registers are loaded with the values from their buffers when either the PDB counter reaches the MOD register value or a trigger input event is detected, after 1 is written to LDOK." ] _11 } impl From < LDMOD_A > for u8 { # [ inline ( always ) ] fn from ( variant : LDMOD_A ) -> Self { match variant { LDMOD_A :: _00 => 0 , LDMOD_A :: _01 => 1 , LDMOD_A :: _10 => 2 , LDMOD_A :: _11 => 3 } } } # [ doc = "Reader of field `LDMOD`" ] pub type LDMOD_R = crate :: R < u8 , LDMOD_A > ; impl LDMOD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LDMOD_A { match self . bits { 0 => LDMOD_A :: _00 , 1 => LDMOD_A :: _01 , 2 => LDMOD_A :: _10 , 3 => LDMOD_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LDMOD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LDMOD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == LDMOD_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == LDMOD_A :: _11 } } # [ doc = "Write proxy for field `LDMOD`" ] pub struct LDMOD_W < 'a > { w : & 'a mut W , } impl < 'a > LDMOD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LDMOD_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "The internal registers are loaded with the values from their buffers immediately after 1 is written to LDOK." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( LDMOD_A :: _00 ) } # [ doc = "The internal registers are loaded with the values from their buffers when the PDB counter reaches the MOD register value after 1 is written to LDOK." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( LDMOD_A :: _01 ) } # [ doc = "The internal registers are loaded with the values from their buffers when a trigger input event is detected after 1 is written to LDOK." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( LDMOD_A :: _10 ) } # [ doc = "The internal registers are loaded with the values from their buffers when either the PDB counter reaches the MOD register value or a trigger input event is detected, after 1 is written to LDOK." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( LDMOD_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } impl R { # [ doc = "Bit 0 - Load OK" ] # [ inline ( always ) ] pub fn ldok ( & self ) -> LDOK_R { LDOK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Continuous Mode Enable" ] # [ inline ( always ) ] pub fn cont ( & self ) -> CONT_R { CONT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - Multiplication Factor Select for Prescaler" ] # [ inline ( always ) ] pub fn mult ( & self ) -> MULT_R { MULT_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - PDB Interrupt Enable" ] # [ inline ( always ) ] pub fn pdbie ( & self ) -> PDBIE_R { PDBIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PDB Interrupt Flag" ] # [ inline ( always ) ] pub fn pdbif ( & self ) -> PDBIF_R { PDBIF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - PDB Enable" ] # [ inline ( always ) ] pub fn pdben ( & self ) -> PDBEN_R { PDBEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - Trigger Input Source Select" ] # [ inline ( always ) ] pub fn trgsel ( & self ) -> TRGSEL_R { TRGSEL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:14 - Prescaler Divider Select" ] # [ inline ( always ) ] pub fn prescaler ( & self ) -> PRESCALER_R { PRESCALER_R :: new ( ( ( self . bits >> 12 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - PDB Sequence Error Interrupt Enable" ] # [ inline ( always ) ] pub fn pdbeie ( & self ) -> PDBEIE_R { PDBEIE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:19 - Load Mode Select" ] # [ inline ( always ) ] pub fn ldmod ( & self ) -> LDMOD_R { LDMOD_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bit 0 - Load OK" ] # [ inline ( always ) ] pub fn ldok ( & mut self ) -> LDOK_W { LDOK_W { w : self } } # [ doc = "Bit 1 - Continuous Mode Enable" ] # [ inline ( always ) ] pub fn cont ( & mut self ) -> CONT_W { CONT_W { w : self } } # [ doc = "Bits 2:3 - Multiplication Factor Select for Prescaler" ] # [ inline ( always ) ] pub fn mult ( & mut self ) -> MULT_W { MULT_W { w : self } } # [ doc = "Bit 5 - PDB Interrupt Enable" ] # [ inline ( always ) ] pub fn pdbie ( & mut self ) -> PDBIE_W { PDBIE_W { w : self } } # [ doc = "Bit 6 - PDB Interrupt Flag" ] # [ inline ( always ) ] pub fn pdbif ( & mut self ) -> PDBIF_W { PDBIF_W { w : self } } # [ doc = "Bit 7 - PDB Enable" ] # [ inline ( always ) ] pub fn pdben ( & mut self ) -> PDBEN_W { PDBEN_W { w : self } } # [ doc = "Bits 8:11 - Trigger Input Source Select" ] # [ inline ( always ) ] pub fn trgsel ( & mut self ) -> TRGSEL_W { TRGSEL_W { w : self } } # [ doc = "Bits 12:14 - Prescaler Divider Select" ] # [ inline ( always ) ] pub fn prescaler ( & mut self ) -> PRESCALER_W { PRESCALER_W { w : self } } # [ doc = "Bit 15 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bit 16 - Software Trigger" ] # [ inline ( always ) ] pub fn swtrig ( & mut self ) -> SWTRIG_W { SWTRIG_W { w : self } } # [ doc = "Bit 17 - PDB Sequence Error Interrupt Enable" ] # [ inline ( always ) ] pub fn pdbeie ( & mut self ) -> PDBEIE_W { PDBEIE_W { w : self } } # [ doc = "Bits 18:19 - Load Mode Select" ] # [ inline ( always ) ] pub fn ldmod ( & mut self ) -> LDMOD_W { LDMOD_W { w : self } } } } # [ doc = "Modulus register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mod_](mod_) module" ] pub type MOD = crate :: Reg < u32 , _MOD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MOD ; # [ doc = "`read()` method returns [mod_::R](mod_::R) reader structure" ] impl crate :: Readable for MOD { } # [ doc = "`write(|w| ..)` method takes [mod_::W](mod_::W) writer structure" ] impl crate :: Writable for MOD { } # [ doc = "Modulus register" ] pub mod mod_ { # [ doc = "Reader of register MOD" ] pub type R = crate :: R < u32 , super :: MOD > ; # [ doc = "Writer for register MOD" ] pub type W = crate :: W < u32 , super :: MOD > ; # [ doc = "Register MOD `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: MOD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Reader of field `MOD`" ] pub type MOD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MOD`" ] pub struct MOD_W < 'a > { w : & 'a mut W , } impl < 'a > MOD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - PDB Modulus" ] # [ inline ( always ) ] pub fn mod_ ( & self ) -> MOD_R { MOD_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - PDB Modulus" ] # [ inline ( always ) ] pub fn mod_ ( & mut self ) -> MOD_W { MOD_W { w : self } } } } # [ doc = "Counter register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module" ] pub type CNT = crate :: Reg < u32 , _CNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNT ; # [ doc = "`read()` method returns [cnt::R](cnt::R) reader structure" ] impl crate :: Readable for CNT { } # [ doc = "Counter register" ] pub mod cnt { # [ doc = "Reader of register CNT" ] pub type R = crate :: R < u32 , super :: CNT > ; # [ doc = "Reader of field `CNT`" ] pub type CNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - PDB Counter" ] # [ inline ( always ) ] pub fn cnt ( & self ) -> CNT_R { CNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Interrupt Delay register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idly](idly) module" ] pub type IDLY = crate :: Reg < u32 , _IDLY > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IDLY ; # [ doc = "`read()` method returns [idly::R](idly::R) reader structure" ] impl crate :: Readable for IDLY { } # [ doc = "`write(|w| ..)` method takes [idly::W](idly::W) writer structure" ] impl crate :: Writable for IDLY { } # [ doc = "Interrupt Delay register" ] pub mod idly { # [ doc = "Reader of register IDLY" ] pub type R = crate :: R < u32 , super :: IDLY > ; # [ doc = "Writer for register IDLY" ] pub type W = crate :: W < u32 , super :: IDLY > ; # [ doc = "Register IDLY `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: IDLY { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Reader of field `IDLY`" ] pub type IDLY_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `IDLY`" ] pub struct IDLY_W < 'a > { w : & 'a mut W , } impl < 'a > IDLY_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - PDB Interrupt Delay" ] # [ inline ( always ) ] pub fn idly ( & self ) -> IDLY_R { IDLY_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - PDB Interrupt Delay" ] # [ inline ( always ) ] pub fn idly ( & mut self ) -> IDLY_W { IDLY_W { w : self } } } } # [ doc = "Channel n Control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chc1](chc1) module" ] pub type CHC1 = crate :: Reg < u32 , _CHC1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CHC1 ; # [ doc = "`read()` method returns [chc1::R](chc1::R) reader structure" ] impl crate :: Readable for CHC1 { } # [ doc = "`write(|w| ..)` method takes [chc1::W](chc1::W) writer structure" ] impl crate :: Writable for CHC1 { } # [ doc = "Channel n Control register 1" ] pub mod chc1 { # [ doc = "Reader of register CH%sC1" ] pub type R = crate :: R < u32 , super :: CHC1 > ; # [ doc = "Writer for register CH%sC1" ] pub type W = crate :: W < u32 , super :: CHC1 > ; # [ doc = "Register CH%sC1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CHC1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "PDB Channel Pre-Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN0_A { # [ doc = "0: PDB channel's corresponding pre-trigger disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger enabled." ] _1 } impl From < EN0_A > for bool { # [ inline ( always ) ] fn from ( variant : EN0_A ) -> Self { match variant { EN0_A :: _0 => false , EN0_A :: _1 => true } } } # [ doc = "Reader of field `EN0`" ] pub type EN0_R = crate :: R < bool , EN0_A > ; impl EN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN0_A { match self . bits { false => EN0_A :: _0 , true => EN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN0_A :: _1 } } # [ doc = "Write proxy for field `EN0`" ] pub struct EN0_W < 'a > { w : & 'a mut W , } impl < 'a > EN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN0_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN1_A { # [ doc = "0: PDB channel's corresponding pre-trigger disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger enabled." ] _1 } impl From < EN1_A > for bool { # [ inline ( always ) ] fn from ( variant : EN1_A ) -> Self { match variant { EN1_A :: _0 => false , EN1_A :: _1 => true } } } # [ doc = "Reader of field `EN1`" ] pub type EN1_R = crate :: R < bool , EN1_A > ; impl EN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN1_A { match self . bits { false => EN1_A :: _0 , true => EN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN1_A :: _1 } } # [ doc = "Write proxy for field `EN1`" ] pub struct EN1_W < 'a > { w : & 'a mut W , } impl < 'a > EN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN1_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN1_A :: _1 ) } # [ 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 } } # [ doc = "PDB Channel Pre-Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN2_A { # [ doc = "0: PDB channel's corresponding pre-trigger disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger enabled." ] _1 } impl From < EN2_A > for bool { # [ inline ( always ) ] fn from ( variant : EN2_A ) -> Self { match variant { EN2_A :: _0 => false , EN2_A :: _1 => true } } } # [ doc = "Reader of field `EN2`" ] pub type EN2_R = crate :: R < bool , EN2_A > ; impl EN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN2_A { match self . bits { false => EN2_A :: _0 , true => EN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN2_A :: _1 } } # [ doc = "Write proxy for field `EN2`" ] pub struct EN2_W < 'a > { w : & 'a mut W , } impl < 'a > EN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN2_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN2_A :: _1 ) } # [ 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 = "PDB Channel Pre-Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN3_A { # [ doc = "0: PDB channel's corresponding pre-trigger disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger enabled." ] _1 } impl From < EN3_A > for bool { # [ inline ( always ) ] fn from ( variant : EN3_A ) -> Self { match variant { EN3_A :: _0 => false , EN3_A :: _1 => true } } } # [ doc = "Reader of field `EN3`" ] pub type EN3_R = crate :: R < bool , EN3_A > ; impl EN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN3_A { match self . bits { false => EN3_A :: _0 , true => EN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN3_A :: _1 } } # [ doc = "Write proxy for field `EN3`" ] pub struct EN3_W < 'a > { w : & 'a mut W , } impl < 'a > EN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN3_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN4_A { # [ doc = "0: PDB channel's corresponding pre-trigger disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger enabled." ] _1 } impl From < EN4_A > for bool { # [ inline ( always ) ] fn from ( variant : EN4_A ) -> Self { match variant { EN4_A :: _0 => false , EN4_A :: _1 => true } } } # [ doc = "Reader of field `EN4`" ] pub type EN4_R = crate :: R < bool , EN4_A > ; impl EN4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN4_A { match self . bits { false => EN4_A :: _0 , true => EN4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN4_A :: _1 } } # [ doc = "Write proxy for field `EN4`" ] pub struct EN4_W < 'a > { w : & 'a mut W , } impl < 'a > EN4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN4_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN5_A { # [ doc = "0: PDB channel's corresponding pre-trigger disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger enabled." ] _1 } impl From < EN5_A > for bool { # [ inline ( always ) ] fn from ( variant : EN5_A ) -> Self { match variant { EN5_A :: _0 => false , EN5_A :: _1 => true } } } # [ doc = "Reader of field `EN5`" ] pub type EN5_R = crate :: R < bool , EN5_A > ; impl EN5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN5_A { match self . bits { false => EN5_A :: _0 , true => EN5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN5_A :: _1 } } # [ doc = "Write proxy for field `EN5`" ] pub struct EN5_W < 'a > { w : & 'a mut W , } impl < 'a > EN5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN5_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN5_A :: _1 ) } # [ 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 = "PDB Channel Pre-Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN6_A { # [ doc = "0: PDB channel's corresponding pre-trigger disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger enabled." ] _1 } impl From < EN6_A > for bool { # [ inline ( always ) ] fn from ( variant : EN6_A ) -> Self { match variant { EN6_A :: _0 => false , EN6_A :: _1 => true } } } # [ doc = "Reader of field `EN6`" ] pub type EN6_R = crate :: R < bool , EN6_A > ; impl EN6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN6_A { match self . bits { false => EN6_A :: _0 , true => EN6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN6_A :: _1 } } # [ doc = "Write proxy for field `EN6`" ] pub struct EN6_W < 'a > { w : & 'a mut W , } impl < 'a > EN6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN6_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN6_A :: _1 ) } # [ 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 = "PDB Channel Pre-Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN7_A { # [ doc = "0: PDB channel's corresponding pre-trigger disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger enabled." ] _1 } impl From < EN7_A > for bool { # [ inline ( always ) ] fn from ( variant : EN7_A ) -> Self { match variant { EN7_A :: _0 => false , EN7_A :: _1 => true } } } # [ doc = "Reader of field `EN7`" ] pub type EN7_R = crate :: R < bool , EN7_A > ; impl EN7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN7_A { match self . bits { false => EN7_A :: _0 , true => EN7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN7_A :: _1 } } # [ doc = "Write proxy for field `EN7`" ] pub struct EN7_W < 'a > { w : & 'a mut W , } impl < 'a > EN7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN7_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN7_A :: _1 ) } # [ 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 = "PDB Channel Pre-Trigger Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOS0_A { # [ doc = "0: PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] _1 } impl From < TOS0_A > for bool { # [ inline ( always ) ] fn from ( variant : TOS0_A ) -> Self { match variant { TOS0_A :: _0 => false , TOS0_A :: _1 => true } } } # [ doc = "Reader of field `TOS0`" ] pub type TOS0_R = crate :: R < bool , TOS0_A > ; impl TOS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOS0_A { match self . bits { false => TOS0_A :: _0 , true => TOS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOS0_A :: _1 } } # [ doc = "Write proxy for field `TOS0`" ] pub struct TOS0_W < 'a > { w : & 'a mut W , } impl < 'a > TOS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOS0_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOS0_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOS1_A { # [ doc = "0: PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] _1 } impl From < TOS1_A > for bool { # [ inline ( always ) ] fn from ( variant : TOS1_A ) -> Self { match variant { TOS1_A :: _0 => false , TOS1_A :: _1 => true } } } # [ doc = "Reader of field `TOS1`" ] pub type TOS1_R = crate :: R < bool , TOS1_A > ; impl TOS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOS1_A { match self . bits { false => TOS1_A :: _0 , true => TOS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOS1_A :: _1 } } # [ doc = "Write proxy for field `TOS1`" ] pub struct TOS1_W < 'a > { w : & 'a mut W , } impl < 'a > TOS1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOS1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOS1_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOS1_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOS2_A { # [ doc = "0: PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] _1 } impl From < TOS2_A > for bool { # [ inline ( always ) ] fn from ( variant : TOS2_A ) -> Self { match variant { TOS2_A :: _0 => false , TOS2_A :: _1 => true } } } # [ doc = "Reader of field `TOS2`" ] pub type TOS2_R = crate :: R < bool , TOS2_A > ; impl TOS2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOS2_A { match self . bits { false => TOS2_A :: _0 , true => TOS2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOS2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOS2_A :: _1 } } # [ doc = "Write proxy for field `TOS2`" ] pub struct TOS2_W < 'a > { w : & 'a mut W , } impl < 'a > TOS2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOS2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOS2_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOS2_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOS3_A { # [ doc = "0: PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] _1 } impl From < TOS3_A > for bool { # [ inline ( always ) ] fn from ( variant : TOS3_A ) -> Self { match variant { TOS3_A :: _0 => false , TOS3_A :: _1 => true } } } # [ doc = "Reader of field `TOS3`" ] pub type TOS3_R = crate :: R < bool , TOS3_A > ; impl TOS3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOS3_A { match self . bits { false => TOS3_A :: _0 , true => TOS3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOS3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOS3_A :: _1 } } # [ doc = "Write proxy for field `TOS3`" ] pub struct TOS3_W < 'a > { w : & 'a mut W , } impl < 'a > TOS3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOS3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOS3_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOS3_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOS4_A { # [ doc = "0: PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] _1 } impl From < TOS4_A > for bool { # [ inline ( always ) ] fn from ( variant : TOS4_A ) -> Self { match variant { TOS4_A :: _0 => false , TOS4_A :: _1 => true } } } # [ doc = "Reader of field `TOS4`" ] pub type TOS4_R = crate :: R < bool , TOS4_A > ; impl TOS4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOS4_A { match self . bits { false => TOS4_A :: _0 , true => TOS4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOS4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOS4_A :: _1 } } # [ doc = "Write proxy for field `TOS4`" ] pub struct TOS4_W < 'a > { w : & 'a mut W , } impl < 'a > TOS4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOS4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOS4_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOS4_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOS5_A { # [ doc = "0: PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] _1 } impl From < TOS5_A > for bool { # [ inline ( always ) ] fn from ( variant : TOS5_A ) -> Self { match variant { TOS5_A :: _0 => false , TOS5_A :: _1 => true } } } # [ doc = "Reader of field `TOS5`" ] pub type TOS5_R = crate :: R < bool , TOS5_A > ; impl TOS5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOS5_A { match self . bits { false => TOS5_A :: _0 , true => TOS5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOS5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOS5_A :: _1 } } # [ doc = "Write proxy for field `TOS5`" ] pub struct TOS5_W < 'a > { w : & 'a mut W , } impl < 'a > TOS5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOS5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOS5_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOS5_A :: _1 ) } # [ 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 = "PDB Channel Pre-Trigger Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOS6_A { # [ doc = "0: PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] _1 } impl From < TOS6_A > for bool { # [ inline ( always ) ] fn from ( variant : TOS6_A ) -> Self { match variant { TOS6_A :: _0 => false , TOS6_A :: _1 => true } } } # [ doc = "Reader of field `TOS6`" ] pub type TOS6_R = crate :: R < bool , TOS6_A > ; impl TOS6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOS6_A { match self . bits { false => TOS6_A :: _0 , true => TOS6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOS6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOS6_A :: _1 } } # [ doc = "Write proxy for field `TOS6`" ] pub struct TOS6_W < 'a > { w : & 'a mut W , } impl < 'a > TOS6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOS6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOS6_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOS6_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOS7_A { # [ doc = "0: PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] _1 } impl From < TOS7_A > for bool { # [ inline ( always ) ] fn from ( variant : TOS7_A ) -> Self { match variant { TOS7_A :: _0 => false , TOS7_A :: _1 => true } } } # [ doc = "Reader of field `TOS7`" ] pub type TOS7_R = crate :: R < bool , TOS7_A > ; impl TOS7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOS7_A { match self . bits { false => TOS7_A :: _0 , true => TOS7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOS7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOS7_A :: _1 } } # [ doc = "Write proxy for field `TOS7`" ] pub struct TOS7_W < 'a > { w : & 'a mut W , } impl < 'a > TOS7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOS7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOS7_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOS7_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Back-to-Back Operation Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB0_A { # [ doc = "0: PDB channel's corresponding pre-trigger back-to-back operation disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger back-to-back operation enabled." ] _1 } impl From < BB0_A > for bool { # [ inline ( always ) ] fn from ( variant : BB0_A ) -> Self { match variant { BB0_A :: _0 => false , BB0_A :: _1 => true } } } # [ doc = "Reader of field `BB0`" ] pub type BB0_R = crate :: R < bool , BB0_A > ; impl BB0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BB0_A { match self . bits { false => BB0_A :: _0 , true => BB0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BB0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BB0_A :: _1 } } # [ doc = "Write proxy for field `BB0`" ] pub struct BB0_W < 'a > { w : & 'a mut W , } impl < 'a > BB0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BB0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BB0_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BB0_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Back-to-Back Operation Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB1_A { # [ doc = "0: PDB channel's corresponding pre-trigger back-to-back operation disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger back-to-back operation enabled." ] _1 } impl From < BB1_A > for bool { # [ inline ( always ) ] fn from ( variant : BB1_A ) -> Self { match variant { BB1_A :: _0 => false , BB1_A :: _1 => true } } } # [ doc = "Reader of field `BB1`" ] pub type BB1_R = crate :: R < bool , BB1_A > ; impl BB1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BB1_A { match self . bits { false => BB1_A :: _0 , true => BB1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BB1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BB1_A :: _1 } } # [ doc = "Write proxy for field `BB1`" ] pub struct BB1_W < 'a > { w : & 'a mut W , } impl < 'a > BB1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BB1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BB1_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BB1_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Back-to-Back Operation Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB2_A { # [ doc = "0: PDB channel's corresponding pre-trigger back-to-back operation disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger back-to-back operation enabled." ] _1 } impl From < BB2_A > for bool { # [ inline ( always ) ] fn from ( variant : BB2_A ) -> Self { match variant { BB2_A :: _0 => false , BB2_A :: _1 => true } } } # [ doc = "Reader of field `BB2`" ] pub type BB2_R = crate :: R < bool , BB2_A > ; impl BB2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BB2_A { match self . bits { false => BB2_A :: _0 , true => BB2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BB2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BB2_A :: _1 } } # [ doc = "Write proxy for field `BB2`" ] pub struct BB2_W < 'a > { w : & 'a mut W , } impl < 'a > BB2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BB2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BB2_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BB2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Back-to-Back Operation Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB3_A { # [ doc = "0: PDB channel's corresponding pre-trigger back-to-back operation disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger back-to-back operation enabled." ] _1 } impl From < BB3_A > for bool { # [ inline ( always ) ] fn from ( variant : BB3_A ) -> Self { match variant { BB3_A :: _0 => false , BB3_A :: _1 => true } } } # [ doc = "Reader of field `BB3`" ] pub type BB3_R = crate :: R < bool , BB3_A > ; impl BB3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BB3_A { match self . bits { false => BB3_A :: _0 , true => BB3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BB3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BB3_A :: _1 } } # [ doc = "Write proxy for field `BB3`" ] pub struct BB3_W < 'a > { w : & 'a mut W , } impl < 'a > BB3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BB3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BB3_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BB3_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Back-to-Back Operation Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB4_A { # [ doc = "0: PDB channel's corresponding pre-trigger back-to-back operation disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger back-to-back operation enabled." ] _1 } impl From < BB4_A > for bool { # [ inline ( always ) ] fn from ( variant : BB4_A ) -> Self { match variant { BB4_A :: _0 => false , BB4_A :: _1 => true } } } # [ doc = "Reader of field `BB4`" ] pub type BB4_R = crate :: R < bool , BB4_A > ; impl BB4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BB4_A { match self . bits { false => BB4_A :: _0 , true => BB4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BB4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BB4_A :: _1 } } # [ doc = "Write proxy for field `BB4`" ] pub struct BB4_W < 'a > { w : & 'a mut W , } impl < 'a > BB4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BB4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BB4_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BB4_A :: _1 ) } # [ 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 = "PDB Channel Pre-Trigger Back-to-Back Operation Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB5_A { # [ doc = "0: PDB channel's corresponding pre-trigger back-to-back operation disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger back-to-back operation enabled." ] _1 } impl From < BB5_A > for bool { # [ inline ( always ) ] fn from ( variant : BB5_A ) -> Self { match variant { BB5_A :: _0 => false , BB5_A :: _1 => true } } } # [ doc = "Reader of field `BB5`" ] pub type BB5_R = crate :: R < bool , BB5_A > ; impl BB5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BB5_A { match self . bits { false => BB5_A :: _0 , true => BB5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BB5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BB5_A :: _1 } } # [ doc = "Write proxy for field `BB5`" ] pub struct BB5_W < 'a > { w : & 'a mut W , } impl < 'a > BB5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BB5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BB5_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BB5_A :: _1 ) } # [ 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 = "PDB Channel Pre-Trigger Back-to-Back Operation Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB6_A { # [ doc = "0: PDB channel's corresponding pre-trigger back-to-back operation disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger back-to-back operation enabled." ] _1 } impl From < BB6_A > for bool { # [ inline ( always ) ] fn from ( variant : BB6_A ) -> Self { match variant { BB6_A :: _0 => false , BB6_A :: _1 => true } } } # [ doc = "Reader of field `BB6`" ] pub type BB6_R = crate :: R < bool , BB6_A > ; impl BB6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BB6_A { match self . bits { false => BB6_A :: _0 , true => BB6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BB6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BB6_A :: _1 } } # [ doc = "Write proxy for field `BB6`" ] pub struct BB6_W < 'a > { w : & 'a mut W , } impl < 'a > BB6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BB6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BB6_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BB6_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "PDB Channel Pre-Trigger Back-to-Back Operation Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB7_A { # [ doc = "0: PDB channel's corresponding pre-trigger back-to-back operation disabled." ] _0 , # [ doc = "1: PDB channel's corresponding pre-trigger back-to-back operation enabled." ] _1 } impl From < BB7_A > for bool { # [ inline ( always ) ] fn from ( variant : BB7_A ) -> Self { match variant { BB7_A :: _0 => false , BB7_A :: _1 => true } } } # [ doc = "Reader of field `BB7`" ] pub type BB7_R = crate :: R < bool , BB7_A > ; impl BB7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BB7_A { match self . bits { false => BB7_A :: _0 , true => BB7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BB7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BB7_A :: _1 } } # [ doc = "Write proxy for field `BB7`" ] pub struct BB7_W < 'a > { w : & 'a mut W , } impl < 'a > BB7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BB7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BB7_A :: _0 ) } # [ doc = "PDB channel's corresponding pre-trigger back-to-back operation enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BB7_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } impl R { # [ doc = "Bit 0 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en0 ( & self ) -> EN0_R { EN0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en1 ( & self ) -> EN1_R { EN1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en2 ( & self ) -> EN2_R { EN2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en3 ( & self ) -> EN3_R { EN3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en4 ( & self ) -> EN4_R { EN4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en5 ( & self ) -> EN5_R { EN5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en6 ( & self ) -> EN6_R { EN6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en7 ( & self ) -> EN7_R { EN7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos0 ( & self ) -> TOS0_R { TOS0_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos1 ( & self ) -> TOS1_R { TOS1_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos2 ( & self ) -> TOS2_R { TOS2_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos3 ( & self ) -> TOS3_R { TOS3_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos4 ( & self ) -> TOS4_R { TOS4_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos5 ( & self ) -> TOS5_R { TOS5_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos6 ( & self ) -> TOS6_R { TOS6_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos7 ( & self ) -> TOS7_R { TOS7_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb0 ( & self ) -> BB0_R { BB0_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb1 ( & self ) -> BB1_R { BB1_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb2 ( & self ) -> BB2_R { BB2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb3 ( & self ) -> BB3_R { BB3_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb4 ( & self ) -> BB4_R { BB4_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb5 ( & self ) -> BB5_R { BB5_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb6 ( & self ) -> BB6_R { BB6_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb7 ( & self ) -> BB7_R { BB7_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en0 ( & mut self ) -> EN0_W { EN0_W { w : self } } # [ doc = "Bit 1 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en1 ( & mut self ) -> EN1_W { EN1_W { w : self } } # [ doc = "Bit 2 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en2 ( & mut self ) -> EN2_W { EN2_W { w : self } } # [ doc = "Bit 3 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en3 ( & mut self ) -> EN3_W { EN3_W { w : self } } # [ doc = "Bit 4 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en4 ( & mut self ) -> EN4_W { EN4_W { w : self } } # [ doc = "Bit 5 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en5 ( & mut self ) -> EN5_W { EN5_W { w : self } } # [ doc = "Bit 6 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en6 ( & mut self ) -> EN6_W { EN6_W { w : self } } # [ doc = "Bit 7 - PDB Channel Pre-Trigger Enable" ] # [ inline ( always ) ] pub fn en7 ( & mut self ) -> EN7_W { EN7_W { w : self } } # [ doc = "Bit 8 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos0 ( & mut self ) -> TOS0_W { TOS0_W { w : self } } # [ doc = "Bit 9 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos1 ( & mut self ) -> TOS1_W { TOS1_W { w : self } } # [ doc = "Bit 10 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos2 ( & mut self ) -> TOS2_W { TOS2_W { w : self } } # [ doc = "Bit 11 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos3 ( & mut self ) -> TOS3_W { TOS3_W { w : self } } # [ doc = "Bit 12 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos4 ( & mut self ) -> TOS4_W { TOS4_W { w : self } } # [ doc = "Bit 13 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos5 ( & mut self ) -> TOS5_W { TOS5_W { w : self } } # [ doc = "Bit 14 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos6 ( & mut self ) -> TOS6_W { TOS6_W { w : self } } # [ doc = "Bit 15 - PDB Channel Pre-Trigger Output Select" ] # [ inline ( always ) ] pub fn tos7 ( & mut self ) -> TOS7_W { TOS7_W { w : self } } # [ doc = "Bit 16 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb0 ( & mut self ) -> BB0_W { BB0_W { w : self } } # [ doc = "Bit 17 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb1 ( & mut self ) -> BB1_W { BB1_W { w : self } } # [ doc = "Bit 18 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb2 ( & mut self ) -> BB2_W { BB2_W { w : self } } # [ doc = "Bit 19 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb3 ( & mut self ) -> BB3_W { BB3_W { w : self } } # [ doc = "Bit 20 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb4 ( & mut self ) -> BB4_W { BB4_W { w : self } } # [ doc = "Bit 21 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb5 ( & mut self ) -> BB5_W { BB5_W { w : self } } # [ doc = "Bit 22 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb6 ( & mut self ) -> BB6_W { BB6_W { w : self } } # [ doc = "Bit 23 - PDB Channel Pre-Trigger Back-to-Back Operation Enable" ] # [ inline ( always ) ] pub fn bb7 ( & mut self ) -> BB7_W { BB7_W { w : self } } } } # [ doc = "Channel n Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chs](chs) module" ] pub type CHS = crate :: Reg < u32 , _CHS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CHS ; # [ doc = "`read()` method returns [chs::R](chs::R) reader structure" ] impl crate :: Readable for CHS { } # [ doc = "`write(|w| ..)` method takes [chs::W](chs::W) writer structure" ] impl crate :: Writable for CHS { } # [ doc = "Channel n Status register" ] pub mod chs { # [ doc = "Reader of register CH%sS" ] pub type R = crate :: R < u32 , super :: CHS > ; # [ doc = "Writer for register CH%sS" ] pub type W = crate :: W < u32 , super :: CHS > ; # [ doc = "Register CH%sS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CHS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "PDB Channel Sequence Error Flags\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR0_A { # [ doc = "0: Sequence error not detected on PDB channel's corresponding pre-trigger." ] _0 , # [ doc = "1: Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] _1 } impl From < ERR0_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR0_A ) -> Self { match variant { ERR0_A :: _0 => false , ERR0_A :: _1 => true } } } # [ doc = "Reader of field `ERR0`" ] pub type ERR0_R = crate :: R < bool , ERR0_A > ; impl ERR0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR0_A { match self . bits { false => ERR0_A :: _0 , true => ERR0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR0_A :: _1 } } # [ doc = "Write proxy for field `ERR0`" ] pub struct ERR0_W < 'a > { w : & 'a mut W , } impl < 'a > ERR0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sequence error not detected on PDB channel's corresponding pre-trigger." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR0_A :: _0 ) } # [ doc = "Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "PDB Channel Sequence Error Flags\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR1_A { # [ doc = "0: Sequence error not detected on PDB channel's corresponding pre-trigger." ] _0 , # [ doc = "1: Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] _1 } impl From < ERR1_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR1_A ) -> Self { match variant { ERR1_A :: _0 => false , ERR1_A :: _1 => true } } } # [ doc = "Reader of field `ERR1`" ] pub type ERR1_R = crate :: R < bool , ERR1_A > ; impl ERR1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR1_A { match self . bits { false => ERR1_A :: _0 , true => ERR1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR1_A :: _1 } } # [ doc = "Write proxy for field `ERR1`" ] pub struct ERR1_W < 'a > { w : & 'a mut W , } impl < 'a > ERR1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sequence error not detected on PDB channel's corresponding pre-trigger." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR1_A :: _0 ) } # [ doc = "Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR1_A :: _1 ) } # [ 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 } } # [ doc = "PDB Channel Sequence Error Flags\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR2_A { # [ doc = "0: Sequence error not detected on PDB channel's corresponding pre-trigger." ] _0 , # [ doc = "1: Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] _1 } impl From < ERR2_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR2_A ) -> Self { match variant { ERR2_A :: _0 => false , ERR2_A :: _1 => true } } } # [ doc = "Reader of field `ERR2`" ] pub type ERR2_R = crate :: R < bool , ERR2_A > ; impl ERR2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR2_A { match self . bits { false => ERR2_A :: _0 , true => ERR2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR2_A :: _1 } } # [ doc = "Write proxy for field `ERR2`" ] pub struct ERR2_W < 'a > { w : & 'a mut W , } impl < 'a > ERR2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sequence error not detected on PDB channel's corresponding pre-trigger." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR2_A :: _0 ) } # [ doc = "Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR2_A :: _1 ) } # [ 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 = "PDB Channel Sequence Error Flags\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR3_A { # [ doc = "0: Sequence error not detected on PDB channel's corresponding pre-trigger." ] _0 , # [ doc = "1: Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] _1 } impl From < ERR3_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR3_A ) -> Self { match variant { ERR3_A :: _0 => false , ERR3_A :: _1 => true } } } # [ doc = "Reader of field `ERR3`" ] pub type ERR3_R = crate :: R < bool , ERR3_A > ; impl ERR3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR3_A { match self . bits { false => ERR3_A :: _0 , true => ERR3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR3_A :: _1 } } # [ doc = "Write proxy for field `ERR3`" ] pub struct ERR3_W < 'a > { w : & 'a mut W , } impl < 'a > ERR3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sequence error not detected on PDB channel's corresponding pre-trigger." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR3_A :: _0 ) } # [ doc = "Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "PDB Channel Sequence Error Flags\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR4_A { # [ doc = "0: Sequence error not detected on PDB channel's corresponding pre-trigger." ] _0 , # [ doc = "1: Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] _1 } impl From < ERR4_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR4_A ) -> Self { match variant { ERR4_A :: _0 => false , ERR4_A :: _1 => true } } } # [ doc = "Reader of field `ERR4`" ] pub type ERR4_R = crate :: R < bool , ERR4_A > ; impl ERR4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR4_A { match self . bits { false => ERR4_A :: _0 , true => ERR4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR4_A :: _1 } } # [ doc = "Write proxy for field `ERR4`" ] pub struct ERR4_W < 'a > { w : & 'a mut W , } impl < 'a > ERR4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sequence error not detected on PDB channel's corresponding pre-trigger." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR4_A :: _0 ) } # [ doc = "Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "PDB Channel Sequence Error Flags\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR5_A { # [ doc = "0: Sequence error not detected on PDB channel's corresponding pre-trigger." ] _0 , # [ doc = "1: Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] _1 } impl From < ERR5_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR5_A ) -> Self { match variant { ERR5_A :: _0 => false , ERR5_A :: _1 => true } } } # [ doc = "Reader of field `ERR5`" ] pub type ERR5_R = crate :: R < bool , ERR5_A > ; impl ERR5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR5_A { match self . bits { false => ERR5_A :: _0 , true => ERR5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR5_A :: _1 } } # [ doc = "Write proxy for field `ERR5`" ] pub struct ERR5_W < 'a > { w : & 'a mut W , } impl < 'a > ERR5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sequence error not detected on PDB channel's corresponding pre-trigger." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR5_A :: _0 ) } # [ doc = "Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR5_A :: _1 ) } # [ 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 = "PDB Channel Sequence Error Flags\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR6_A { # [ doc = "0: Sequence error not detected on PDB channel's corresponding pre-trigger." ] _0 , # [ doc = "1: Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] _1 } impl From < ERR6_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR6_A ) -> Self { match variant { ERR6_A :: _0 => false , ERR6_A :: _1 => true } } } # [ doc = "Reader of field `ERR6`" ] pub type ERR6_R = crate :: R < bool , ERR6_A > ; impl ERR6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR6_A { match self . bits { false => ERR6_A :: _0 , true => ERR6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR6_A :: _1 } } # [ doc = "Write proxy for field `ERR6`" ] pub struct ERR6_W < 'a > { w : & 'a mut W , } impl < 'a > ERR6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sequence error not detected on PDB channel's corresponding pre-trigger." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR6_A :: _0 ) } # [ doc = "Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR6_A :: _1 ) } # [ 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 = "PDB Channel Sequence Error Flags\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR7_A { # [ doc = "0: Sequence error not detected on PDB channel's corresponding pre-trigger." ] _0 , # [ doc = "1: Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] _1 } impl From < ERR7_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR7_A ) -> Self { match variant { ERR7_A :: _0 => false , ERR7_A :: _1 => true } } } # [ doc = "Reader of field `ERR7`" ] pub type ERR7_R = crate :: R < bool , ERR7_A > ; impl ERR7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR7_A { match self . bits { false => ERR7_A :: _0 , true => ERR7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR7_A :: _1 } } # [ doc = "Write proxy for field `ERR7`" ] pub struct ERR7_W < 'a > { w : & 'a mut W , } impl < 'a > ERR7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERR7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sequence error not detected on PDB channel's corresponding pre-trigger." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERR7_A :: _0 ) } # [ doc = "Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR\\[m\\] is set. Writing 0's to clear the sequence error flags." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERR7_A :: _1 ) } # [ 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 = "Reader of field `CF`" ] pub type CF_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CF`" ] pub struct CF_W < 'a > { w : & 'a mut W , } impl < 'a > CF_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } impl R { # [ doc = "Bit 0 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err0 ( & self ) -> ERR0_R { ERR0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err1 ( & self ) -> ERR1_R { ERR1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err2 ( & self ) -> ERR2_R { ERR2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err3 ( & self ) -> ERR3_R { ERR3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err4 ( & self ) -> ERR4_R { ERR4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err5 ( & self ) -> ERR5_R { ERR5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err6 ( & self ) -> ERR6_R { ERR6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err7 ( & self ) -> ERR7_R { ERR7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:23 - PDB Channel Flags" ] # [ inline ( always ) ] pub fn cf ( & self ) -> CF_R { CF_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bit 0 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err0 ( & mut self ) -> ERR0_W { ERR0_W { w : self } } # [ doc = "Bit 1 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err1 ( & mut self ) -> ERR1_W { ERR1_W { w : self } } # [ doc = "Bit 2 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err2 ( & mut self ) -> ERR2_W { ERR2_W { w : self } } # [ doc = "Bit 3 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err3 ( & mut self ) -> ERR3_W { ERR3_W { w : self } } # [ doc = "Bit 4 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err4 ( & mut self ) -> ERR4_W { ERR4_W { w : self } } # [ doc = "Bit 5 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err5 ( & mut self ) -> ERR5_W { ERR5_W { w : self } } # [ doc = "Bit 6 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err6 ( & mut self ) -> ERR6_W { ERR6_W { w : self } } # [ doc = "Bit 7 - PDB Channel Sequence Error Flags" ] # [ inline ( always ) ] pub fn err7 ( & mut self ) -> ERR7_W { ERR7_W { w : self } } # [ doc = "Bits 16:23 - PDB Channel Flags" ] # [ inline ( always ) ] pub fn cf ( & mut self ) -> CF_W { CF_W { w : self } } } } # [ doc = "Channel n Delay 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chdly0](chdly0) module" ] pub type CHDLY0 = crate :: Reg < u32 , _CHDLY0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CHDLY0 ; # [ doc = "`read()` method returns [chdly0::R](chdly0::R) reader structure" ] impl crate :: Readable for CHDLY0 { } # [ doc = "`write(|w| ..)` method takes [chdly0::W](chdly0::W) writer structure" ] impl crate :: Writable for CHDLY0 { } # [ doc = "Channel n Delay 0 register" ] pub mod chdly0 { # [ doc = "Reader of register CH%sDLY0" ] pub type R = crate :: R < u32 , super :: CHDLY0 > ; # [ doc = "Writer for register CH%sDLY0" ] pub type W = crate :: W < u32 , super :: CHDLY0 > ; # [ doc = "Register CH%sDLY0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CHDLY0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DLY`" ] pub type DLY_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DLY`" ] pub struct DLY_W < 'a > { w : & 'a mut W , } impl < 'a > DLY_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - PDB Channel Delay" ] # [ inline ( always ) ] pub fn dly ( & self ) -> DLY_R { DLY_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - PDB Channel Delay" ] # [ inline ( always ) ] pub fn dly ( & mut self ) -> DLY_W { DLY_W { w : self } } } } # [ doc = "Channel n Delay 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chdly1](chdly1) module" ] pub type CHDLY1 = crate :: Reg < u32 , _CHDLY1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CHDLY1 ; # [ doc = "`read()` method returns [chdly1::R](chdly1::R) reader structure" ] impl crate :: Readable for CHDLY1 { } # [ doc = "`write(|w| ..)` method takes [chdly1::W](chdly1::W) writer structure" ] impl crate :: Writable for CHDLY1 { } # [ doc = "Channel n Delay 1 register" ] pub mod chdly1 { # [ doc = "Reader of register CH%sDLY1" ] pub type R = crate :: R < u32 , super :: CHDLY1 > ; # [ doc = "Writer for register CH%sDLY1" ] pub type W = crate :: W < u32 , super :: CHDLY1 > ; # [ doc = "Register CH%sDLY1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CHDLY1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DLY`" ] pub type DLY_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DLY`" ] pub struct DLY_W < 'a > { w : & 'a mut W , } impl < 'a > DLY_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - PDB Channel Delay" ] # [ inline ( always ) ] pub fn dly ( & self ) -> DLY_R { DLY_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - PDB Channel Delay" ] # [ inline ( always ) ] pub fn dly ( & mut self ) -> DLY_W { DLY_W { w : self } } } } # [ doc = "DAC Interval Trigger n Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dacintc](dacintc) module" ] pub type DACINTC = crate :: Reg < u32 , _DACINTC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DACINTC ; # [ doc = "`read()` method returns [dacintc::R](dacintc::R) reader structure" ] impl crate :: Readable for DACINTC { } # [ doc = "`write(|w| ..)` method takes [dacintc::W](dacintc::W) writer structure" ] impl crate :: Writable for DACINTC { } # [ doc = "DAC Interval Trigger n Control register" ] pub mod dacintc { # [ doc = "Reader of register DACINTC%s" ] pub type R = crate :: R < u32 , super :: DACINTC > ; # [ doc = "Writer for register DACINTC%s" ] pub type W = crate :: W < u32 , super :: DACINTC > ; # [ doc = "Register DACINTC%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DACINTC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DAC Interval Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOE_A { # [ doc = "0: DAC interval trigger disabled." ] _0 , # [ doc = "1: DAC interval trigger enabled." ] _1 } impl From < TOE_A > for bool { # [ inline ( always ) ] fn from ( variant : TOE_A ) -> Self { match variant { TOE_A :: _0 => false , TOE_A :: _1 => true } } } # [ doc = "Reader of field `TOE`" ] pub type TOE_R = crate :: R < bool , TOE_A > ; impl TOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOE_A { match self . bits { false => TOE_A :: _0 , true => TOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOE_A :: _1 } } # [ doc = "Write proxy for field `TOE`" ] pub struct TOE_W < 'a > { w : & 'a mut W , } impl < 'a > TOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DAC interval trigger disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOE_A :: _0 ) } # [ doc = "DAC interval trigger enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "DAC External Trigger Input Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXT_A { # [ doc = "0: DAC external trigger input disabled. DAC interval counter is reset and counting starts when a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] _0 , # [ doc = "1: DAC external trigger input enabled. DAC interval counter is bypassed and DAC external trigger input triggers the DAC interval trigger." ] _1 } impl From < EXT_A > for bool { # [ inline ( always ) ] fn from ( variant : EXT_A ) -> Self { match variant { EXT_A :: _0 => false , EXT_A :: _1 => true } } } # [ doc = "Reader of field `EXT`" ] pub type EXT_R = crate :: R < bool , EXT_A > ; impl EXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EXT_A { match self . bits { false => EXT_A :: _0 , true => EXT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EXT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EXT_A :: _1 } } # [ doc = "Write proxy for field `EXT`" ] pub struct EXT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EXT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DAC external trigger input disabled. DAC interval counter is reset and counting starts when a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EXT_A :: _0 ) } # [ doc = "DAC external trigger input enabled. DAC interval counter is bypassed and DAC external trigger input triggers the DAC interval trigger." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EXT_A :: _1 ) } # [ 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 0 - DAC Interval Trigger Enable" ] # [ inline ( always ) ] pub fn toe ( & self ) -> TOE_R { TOE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - DAC External Trigger Input Enable" ] # [ inline ( always ) ] pub fn ext ( & self ) -> EXT_R { EXT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DAC Interval Trigger Enable" ] # [ inline ( always ) ] pub fn toe ( & mut self ) -> TOE_W { TOE_W { w : self } } # [ doc = "Bit 1 - DAC External Trigger Input Enable" ] # [ inline ( always ) ] pub fn ext ( & mut self ) -> EXT_W { EXT_W { w : self } } } } # [ doc = "DAC Interval n register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dacint](dacint) module" ] pub type DACINT = crate :: Reg < u32 , _DACINT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DACINT ; # [ doc = "`read()` method returns [dacint::R](dacint::R) reader structure" ] impl crate :: Readable for DACINT { } # [ doc = "`write(|w| ..)` method takes [dacint::W](dacint::W) writer structure" ] impl crate :: Writable for DACINT { } # [ doc = "DAC Interval n register" ] pub mod dacint { # [ doc = "Reader of register DACINT%s" ] pub type R = crate :: R < u32 , super :: DACINT > ; # [ doc = "Writer for register DACINT%s" ] pub type W = crate :: W < u32 , super :: DACINT > ; # [ doc = "Register DACINT%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DACINT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `INT`" ] pub type INT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `INT`" ] pub struct INT_W < 'a > { w : & 'a mut W , } impl < 'a > INT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - DAC Interval" ] # [ inline ( always ) ] pub fn int ( & self ) -> INT_R { INT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - DAC Interval" ] # [ inline ( always ) ] pub fn int ( & mut self ) -> INT_W { INT_W { w : self } } } } # [ doc = "Pulse-Out n Enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [poen](poen) module" ] pub type POEN = crate :: Reg < u32 , _POEN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POEN ; # [ doc = "`read()` method returns [poen::R](poen::R) reader structure" ] impl crate :: Readable for POEN { } # [ doc = "`write(|w| ..)` method takes [poen::W](poen::W) writer structure" ] impl crate :: Writable for POEN { } # [ doc = "Pulse-Out n Enable register" ] pub mod poen { # [ doc = "Reader of register POEN" ] pub type R = crate :: R < u32 , super :: POEN > ; # [ doc = "Writer for register POEN" ] pub type W = crate :: W < u32 , super :: POEN > ; # [ doc = "Register POEN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: POEN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "PDB Pulse-Out Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POEN0_A { # [ doc = "0: PDB Pulse-Out disabled" ] _0 , # [ doc = "1: PDB Pulse-Out enabled" ] _1 } impl From < POEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : POEN0_A ) -> Self { match variant { POEN0_A :: _0 => false , POEN0_A :: _1 => true } } } # [ doc = "Reader of field `POEN0`" ] pub type POEN0_R = crate :: R < bool , POEN0_A > ; impl POEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POEN0_A { match self . bits { false => POEN0_A :: _0 , true => POEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POEN0_A :: _1 } } # [ doc = "Write proxy for field `POEN0`" ] pub struct POEN0_W < 'a > { w : & 'a mut W , } impl < 'a > POEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB Pulse-Out disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POEN0_A :: _0 ) } # [ doc = "PDB Pulse-Out enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POEN0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "PDB Pulse-Out Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POEN1_A { # [ doc = "0: PDB Pulse-Out disabled" ] _0 , # [ doc = "1: PDB Pulse-Out enabled" ] _1 } impl From < POEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : POEN1_A ) -> Self { match variant { POEN1_A :: _0 => false , POEN1_A :: _1 => true } } } # [ doc = "Reader of field `POEN1`" ] pub type POEN1_R = crate :: R < bool , POEN1_A > ; impl POEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POEN1_A { match self . bits { false => POEN1_A :: _0 , true => POEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POEN1_A :: _1 } } # [ doc = "Write proxy for field `POEN1`" ] pub struct POEN1_W < 'a > { w : & 'a mut W , } impl < 'a > POEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB Pulse-Out disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POEN1_A :: _0 ) } # [ doc = "PDB Pulse-Out enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POEN1_A :: _1 ) } # [ 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 } } # [ doc = "PDB Pulse-Out Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POEN2_A { # [ doc = "0: PDB Pulse-Out disabled" ] _0 , # [ doc = "1: PDB Pulse-Out enabled" ] _1 } impl From < POEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : POEN2_A ) -> Self { match variant { POEN2_A :: _0 => false , POEN2_A :: _1 => true } } } # [ doc = "Reader of field `POEN2`" ] pub type POEN2_R = crate :: R < bool , POEN2_A > ; impl POEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POEN2_A { match self . bits { false => POEN2_A :: _0 , true => POEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POEN2_A :: _1 } } # [ doc = "Write proxy for field `POEN2`" ] pub struct POEN2_W < 'a > { w : & 'a mut W , } impl < 'a > POEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB Pulse-Out disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POEN2_A :: _0 ) } # [ doc = "PDB Pulse-Out enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POEN2_A :: _1 ) } # [ 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 = "PDB Pulse-Out Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POEN3_A { # [ doc = "0: PDB Pulse-Out disabled" ] _0 , # [ doc = "1: PDB Pulse-Out enabled" ] _1 } impl From < POEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : POEN3_A ) -> Self { match variant { POEN3_A :: _0 => false , POEN3_A :: _1 => true } } } # [ doc = "Reader of field `POEN3`" ] pub type POEN3_R = crate :: R < bool , POEN3_A > ; impl POEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POEN3_A { match self . bits { false => POEN3_A :: _0 , true => POEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POEN3_A :: _1 } } # [ doc = "Write proxy for field `POEN3`" ] pub struct POEN3_W < 'a > { w : & 'a mut W , } impl < 'a > POEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB Pulse-Out disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POEN3_A :: _0 ) } # [ doc = "PDB Pulse-Out enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POEN3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "PDB Pulse-Out Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POEN4_A { # [ doc = "0: PDB Pulse-Out disabled" ] _0 , # [ doc = "1: PDB Pulse-Out enabled" ] _1 } impl From < POEN4_A > for bool { # [ inline ( always ) ] fn from ( variant : POEN4_A ) -> Self { match variant { POEN4_A :: _0 => false , POEN4_A :: _1 => true } } } # [ doc = "Reader of field `POEN4`" ] pub type POEN4_R = crate :: R < bool , POEN4_A > ; impl POEN4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POEN4_A { match self . bits { false => POEN4_A :: _0 , true => POEN4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POEN4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POEN4_A :: _1 } } # [ doc = "Write proxy for field `POEN4`" ] pub struct POEN4_W < 'a > { w : & 'a mut W , } impl < 'a > POEN4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POEN4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB Pulse-Out disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POEN4_A :: _0 ) } # [ doc = "PDB Pulse-Out enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POEN4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "PDB Pulse-Out Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POEN5_A { # [ doc = "0: PDB Pulse-Out disabled" ] _0 , # [ doc = "1: PDB Pulse-Out enabled" ] _1 } impl From < POEN5_A > for bool { # [ inline ( always ) ] fn from ( variant : POEN5_A ) -> Self { match variant { POEN5_A :: _0 => false , POEN5_A :: _1 => true } } } # [ doc = "Reader of field `POEN5`" ] pub type POEN5_R = crate :: R < bool , POEN5_A > ; impl POEN5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POEN5_A { match self . bits { false => POEN5_A :: _0 , true => POEN5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POEN5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POEN5_A :: _1 } } # [ doc = "Write proxy for field `POEN5`" ] pub struct POEN5_W < 'a > { w : & 'a mut W , } impl < 'a > POEN5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POEN5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB Pulse-Out disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POEN5_A :: _0 ) } # [ doc = "PDB Pulse-Out enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POEN5_A :: _1 ) } # [ 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 = "PDB Pulse-Out Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POEN6_A { # [ doc = "0: PDB Pulse-Out disabled" ] _0 , # [ doc = "1: PDB Pulse-Out enabled" ] _1 } impl From < POEN6_A > for bool { # [ inline ( always ) ] fn from ( variant : POEN6_A ) -> Self { match variant { POEN6_A :: _0 => false , POEN6_A :: _1 => true } } } # [ doc = "Reader of field `POEN6`" ] pub type POEN6_R = crate :: R < bool , POEN6_A > ; impl POEN6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POEN6_A { match self . bits { false => POEN6_A :: _0 , true => POEN6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POEN6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POEN6_A :: _1 } } # [ doc = "Write proxy for field `POEN6`" ] pub struct POEN6_W < 'a > { w : & 'a mut W , } impl < 'a > POEN6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POEN6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB Pulse-Out disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POEN6_A :: _0 ) } # [ doc = "PDB Pulse-Out enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POEN6_A :: _1 ) } # [ 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 = "PDB Pulse-Out Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POEN7_A { # [ doc = "0: PDB Pulse-Out disabled" ] _0 , # [ doc = "1: PDB Pulse-Out enabled" ] _1 } impl From < POEN7_A > for bool { # [ inline ( always ) ] fn from ( variant : POEN7_A ) -> Self { match variant { POEN7_A :: _0 => false , POEN7_A :: _1 => true } } } # [ doc = "Reader of field `POEN7`" ] pub type POEN7_R = crate :: R < bool , POEN7_A > ; impl POEN7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POEN7_A { match self . bits { false => POEN7_A :: _0 , true => POEN7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POEN7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POEN7_A :: _1 } } # [ doc = "Write proxy for field `POEN7`" ] pub struct POEN7_W < 'a > { w : & 'a mut W , } impl < 'a > POEN7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POEN7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB Pulse-Out disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POEN7_A :: _0 ) } # [ doc = "PDB Pulse-Out enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POEN7_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen0 ( & self ) -> POEN0_R { POEN0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen1 ( & self ) -> POEN1_R { POEN1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen2 ( & self ) -> POEN2_R { POEN2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen3 ( & self ) -> POEN3_R { POEN3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen4 ( & self ) -> POEN4_R { POEN4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen5 ( & self ) -> POEN5_R { POEN5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen6 ( & self ) -> POEN6_R { POEN6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen7 ( & self ) -> POEN7_R { POEN7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen0 ( & mut self ) -> POEN0_W { POEN0_W { w : self } } # [ doc = "Bit 1 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen1 ( & mut self ) -> POEN1_W { POEN1_W { w : self } } # [ doc = "Bit 2 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen2 ( & mut self ) -> POEN2_W { POEN2_W { w : self } } # [ doc = "Bit 3 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen3 ( & mut self ) -> POEN3_W { POEN3_W { w : self } } # [ doc = "Bit 4 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen4 ( & mut self ) -> POEN4_W { POEN4_W { w : self } } # [ doc = "Bit 5 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen5 ( & mut self ) -> POEN5_W { POEN5_W { w : self } } # [ doc = "Bit 6 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen6 ( & mut self ) -> POEN6_W { POEN6_W { w : self } } # [ doc = "Bit 7 - PDB Pulse-Out Enable" ] # [ inline ( always ) ] pub fn poen7 ( & mut self ) -> POEN7_W { POEN7_W { w : self } } } } # [ doc = "Pulse-Out n Delay register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [podly](podly) module" ] pub type PODLY = crate :: Reg < u32 , _PODLY > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PODLY ; # [ doc = "`read()` method returns [podly::R](podly::R) reader structure" ] impl crate :: Readable for PODLY { } # [ doc = "`write(|w| ..)` method takes [podly::W](podly::W) writer structure" ] impl crate :: Writable for PODLY { } # [ doc = "Pulse-Out n Delay register" ] pub mod podly { # [ doc = "Reader of register PO%sDLY" ] pub type R = crate :: R < u32 , super :: PODLY > ; # [ doc = "Writer for register PO%sDLY" ] pub type W = crate :: W < u32 , super :: PODLY > ; # [ doc = "Register PO%sDLY `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PODLY { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DLY2`" ] pub type DLY2_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DLY2`" ] pub struct DLY2_W < 'a > { w : & 'a mut W , } impl < 'a > DLY2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `DLY1`" ] pub type DLY1_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DLY1`" ] pub struct DLY1_W < 'a > { w : & 'a mut W , } impl < 'a > DLY1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - PDB Pulse-Out Delay 2" ] # [ inline ( always ) ] pub fn dly2 ( & self ) -> DLY2_R { DLY2_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - PDB Pulse-Out Delay 1" ] # [ inline ( always ) ] pub fn dly1 ( & self ) -> DLY1_R { DLY1_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - PDB Pulse-Out Delay 2" ] # [ inline ( always ) ] pub fn dly2 ( & mut self ) -> DLY2_W { DLY2_W { w : self } } # [ doc = "Bits 16:31 - PDB Pulse-Out Delay 1" ] # [ inline ( always ) ] pub fn dly1 ( & mut self ) -> DLY1_W { DLY1_W { w : self } } } } } # [ doc = "Periodic Interrupt Timer" ] pub struct PIT { _marker : PhantomData < * const ( ) > } unsafe impl Send for PIT { } impl PIT { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const pit :: RegisterBlock { 0x4003_7000 as * const _ } } impl Deref for PIT { type Target = pit :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * PIT :: ptr ( ) } } } # [ doc = "Periodic Interrupt Timer" ] pub mod pit { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - PIT Module Control Register" ] pub mcr : MCR , _reserved1 : [ u8 ; 220usize ] , # [ doc = "0xe0 - PIT Upper Lifetime Timer Register" ] pub ltmr64h : LTMR64H , # [ doc = "0xe4 - PIT Lower Lifetime Timer Register" ] pub ltmr64l : LTMR64L , _reserved3 : [ u8 ; 24usize ] , # [ doc = "0x100 - Timer Load Value Register" ] pub ldval0 : LDVAL , # [ doc = "0x104 - Current Timer Value Register" ] pub cval0 : CVAL , # [ doc = "0x108 - Timer Control Register" ] pub tctrl0 : TCTRL , # [ doc = "0x10c - Timer Flag Register" ] pub tflg0 : TFLG , # [ doc = "0x110 - Timer Load Value Register" ] pub ldval1 : LDVAL , # [ doc = "0x114 - Current Timer Value Register" ] pub cval1 : CVAL , # [ doc = "0x118 - Timer Control Register" ] pub tctrl1 : TCTRL , # [ doc = "0x11c - Timer Flag Register" ] pub tflg1 : TFLG , # [ doc = "0x120 - Timer Load Value Register" ] pub ldval2 : LDVAL , # [ doc = "0x124 - Current Timer Value Register" ] pub cval2 : CVAL , # [ doc = "0x128 - Timer Control Register" ] pub tctrl2 : TCTRL , # [ doc = "0x12c - Timer Flag Register" ] pub tflg2 : TFLG , # [ doc = "0x130 - Timer Load Value Register" ] pub ldval3 : LDVAL , # [ doc = "0x134 - Current Timer Value Register" ] pub cval3 : CVAL , # [ doc = "0x138 - Timer Control Register" ] pub tctrl3 : TCTRL , # [ doc = "0x13c - Timer Flag Register" ] pub tflg3 : TFLG , } # [ doc = "PIT Module Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mcr](mcr) module" ] pub type MCR = crate :: Reg < u32 , _MCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCR ; # [ doc = "`read()` method returns [mcr::R](mcr::R) reader structure" ] impl crate :: Readable for MCR { } # [ doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure" ] impl crate :: Writable for MCR { } # [ doc = "PIT Module Control Register" ] pub mod mcr { # [ doc = "Reader of register MCR" ] pub type R = crate :: R < u32 , super :: MCR > ; # [ doc = "Writer for register MCR" ] pub type W = crate :: W < u32 , super :: MCR > ; # [ doc = "Register MCR `reset()`'s with value 0x06" ] impl crate :: ResetValue for super :: MCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x06 } } # [ doc = "Freeze\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRZ_A { # [ doc = "0: Timers continue to run in Debug mode." ] _0 , # [ doc = "1: Timers are stopped in Debug mode." ] _1 } impl From < FRZ_A > for bool { # [ inline ( always ) ] fn from ( variant : FRZ_A ) -> Self { match variant { FRZ_A :: _0 => false , FRZ_A :: _1 => true } } } # [ doc = "Reader of field `FRZ`" ] pub type FRZ_R = crate :: R < bool , FRZ_A > ; impl FRZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRZ_A { match self . bits { false => FRZ_A :: _0 , true => FRZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRZ_A :: _1 } } # [ doc = "Write proxy for field `FRZ`" ] pub struct FRZ_W < 'a > { w : & 'a mut W , } impl < 'a > FRZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timers continue to run in Debug mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _0 ) } # [ doc = "Timers are stopped in Debug mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRZ_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Module Disable - (PIT section)\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MDIS_A { # [ doc = "0: Clock for standard PIT timers is enabled." ] _0 , # [ doc = "1: Clock for standard PIT timers is disabled." ] _1 } impl From < MDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : MDIS_A ) -> Self { match variant { MDIS_A :: _0 => false , MDIS_A :: _1 => true } } } # [ doc = "Reader of field `MDIS`" ] pub type MDIS_R = crate :: R < bool , MDIS_A > ; impl MDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MDIS_A { match self . bits { false => MDIS_A :: _0 , true => MDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MDIS_A :: _1 } } # [ doc = "Write proxy for field `MDIS`" ] pub struct MDIS_W < 'a > { w : & 'a mut W , } impl < 'a > MDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock for standard PIT timers is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _0 ) } # [ doc = "Clock for standard PIT timers is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MDIS_A :: _1 ) } # [ 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 0 - Freeze" ] # [ inline ( always ) ] pub fn frz ( & self ) -> FRZ_R { FRZ_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Module Disable - (PIT section)" ] # [ inline ( always ) ] pub fn mdis ( & self ) -> MDIS_R { MDIS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Freeze" ] # [ inline ( always ) ] pub fn frz ( & mut self ) -> FRZ_W { FRZ_W { w : self } } # [ doc = "Bit 1 - Module Disable - (PIT section)" ] # [ inline ( always ) ] pub fn mdis ( & mut self ) -> MDIS_W { MDIS_W { w : self } } } } # [ doc = "PIT Upper Lifetime Timer Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ltmr64h](ltmr64h) module" ] pub type LTMR64H = crate :: Reg < u32 , _LTMR64H > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _LTMR64H ; # [ doc = "`read()` method returns [ltmr64h::R](ltmr64h::R) reader structure" ] impl crate :: Readable for LTMR64H { } # [ doc = "PIT Upper Lifetime Timer Register" ] pub mod ltmr64h { # [ doc = "Reader of register LTMR64H" ] pub type R = crate :: R < u32 , super :: LTMR64H > ; # [ doc = "Reader of field `LTH`" ] pub type LTH_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Life Timer value" ] # [ inline ( always ) ] pub fn lth ( & self ) -> LTH_R { LTH_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "PIT Lower Lifetime Timer Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ltmr64l](ltmr64l) module" ] pub type LTMR64L = crate :: Reg < u32 , _LTMR64L > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _LTMR64L ; # [ doc = "`read()` method returns [ltmr64l::R](ltmr64l::R) reader structure" ] impl crate :: Readable for LTMR64L { } # [ doc = "PIT Lower Lifetime Timer Register" ] pub mod ltmr64l { # [ doc = "Reader of register LTMR64L" ] pub type R = crate :: R < u32 , super :: LTMR64L > ; # [ doc = "Reader of field `LTL`" ] pub type LTL_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Life Timer value" ] # [ inline ( always ) ] pub fn ltl ( & self ) -> LTL_R { LTL_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Timer Load Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ldval](ldval) module" ] pub type LDVAL = crate :: Reg < u32 , _LDVAL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _LDVAL ; # [ doc = "`read()` method returns [ldval::R](ldval::R) reader structure" ] impl crate :: Readable for LDVAL { } # [ doc = "`write(|w| ..)` method takes [ldval::W](ldval::W) writer structure" ] impl crate :: Writable for LDVAL { } # [ doc = "Timer Load Value Register" ] pub mod ldval { # [ doc = "Reader of register LDVAL%s" ] pub type R = crate :: R < u32 , super :: LDVAL > ; # [ doc = "Writer for register LDVAL%s" ] pub type W = crate :: W < u32 , super :: LDVAL > ; # [ doc = "Register LDVAL%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: LDVAL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TSV`" ] pub type TSV_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `TSV`" ] pub struct TSV_W < 'a > { w : & 'a mut W , } impl < 'a > TSV_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Timer Start Value" ] # [ inline ( always ) ] pub fn tsv ( & self ) -> TSV_R { TSV_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Timer Start Value" ] # [ inline ( always ) ] pub fn tsv ( & mut self ) -> TSV_W { TSV_W { w : self } } } } # [ doc = "Current Timer Value Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cval](cval) module" ] pub type CVAL = crate :: Reg < u32 , _CVAL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CVAL ; # [ doc = "`read()` method returns [cval::R](cval::R) reader structure" ] impl crate :: Readable for CVAL { } # [ doc = "Current Timer Value Register" ] pub mod cval { # [ doc = "Reader of register CVAL%s" ] pub type R = crate :: R < u32 , super :: CVAL > ; # [ doc = "Reader of field `TVL`" ] pub type TVL_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Current Timer Value" ] # [ inline ( always ) ] pub fn tvl ( & self ) -> TVL_R { TVL_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Timer Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tctrl](tctrl) module" ] pub type TCTRL = crate :: Reg < u32 , _TCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCTRL ; # [ doc = "`read()` method returns [tctrl::R](tctrl::R) reader structure" ] impl crate :: Readable for TCTRL { } # [ doc = "`write(|w| ..)` method takes [tctrl::W](tctrl::W) writer structure" ] impl crate :: Writable for TCTRL { } # [ doc = "Timer Control Register" ] pub mod tctrl { # [ doc = "Reader of register TCTRL%s" ] pub type R = crate :: R < u32 , super :: TCTRL > ; # [ doc = "Writer for register TCTRL%s" ] pub type W = crate :: W < u32 , super :: TCTRL > ; # [ doc = "Register TCTRL%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Timer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TEN_A { # [ doc = "0: Timer n is disabled." ] _0 , # [ doc = "1: Timer n is enabled." ] _1 } impl From < TEN_A > for bool { # [ inline ( always ) ] fn from ( variant : TEN_A ) -> Self { match variant { TEN_A :: _0 => false , TEN_A :: _1 => true } } } # [ doc = "Reader of field `TEN`" ] pub type TEN_R = crate :: R < bool , TEN_A > ; impl TEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TEN_A { match self . bits { false => TEN_A :: _0 , true => TEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TEN_A :: _1 } } # [ doc = "Write proxy for field `TEN`" ] pub struct TEN_W < 'a > { w : & 'a mut W , } impl < 'a > TEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer n is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TEN_A :: _0 ) } # [ doc = "Timer n is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Timer Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: Interrupt requests from Timer n are disabled." ] _0 , # [ doc = "1: Interrupt will be requested whenever TIF is set." ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt requests from Timer n are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "Interrupt will be requested whenever TIF is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 } } # [ doc = "Chain Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHN_A { # [ doc = "0: Timer is not chained." ] _0 , # [ doc = "1: Timer is chained to previous timer. For example, for Channel 2, if this field is set, Timer 2 is chained to Timer 1." ] _1 } impl From < CHN_A > for bool { # [ inline ( always ) ] fn from ( variant : CHN_A ) -> Self { match variant { CHN_A :: _0 => false , CHN_A :: _1 => true } } } # [ doc = "Reader of field `CHN`" ] pub type CHN_R = crate :: R < bool , CHN_A > ; impl CHN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHN_A { match self . bits { false => CHN_A :: _0 , true => CHN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHN_A :: _1 } } # [ doc = "Write proxy for field `CHN`" ] pub struct CHN_W < 'a > { w : & 'a mut W , } impl < 'a > CHN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer is not chained." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHN_A :: _0 ) } # [ doc = "Timer is chained to previous timer. For example, for Channel 2, if this field is set, Timer 2 is chained to Timer 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHN_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Timer Enable" ] # [ inline ( always ) ] pub fn ten ( & self ) -> TEN_R { TEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Chain Mode" ] # [ inline ( always ) ] pub fn chn ( & self ) -> CHN_R { CHN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Timer Enable" ] # [ inline ( always ) ] pub fn ten ( & mut self ) -> TEN_W { TEN_W { w : self } } # [ doc = "Bit 1 - Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } # [ doc = "Bit 2 - Chain Mode" ] # [ inline ( always ) ] pub fn chn ( & mut self ) -> CHN_W { CHN_W { w : self } } } } # [ doc = "Timer Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tflg](tflg) module" ] pub type TFLG = crate :: Reg < u32 , _TFLG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TFLG ; # [ doc = "`read()` method returns [tflg::R](tflg::R) reader structure" ] impl crate :: Readable for TFLG { } # [ doc = "`write(|w| ..)` method takes [tflg::W](tflg::W) writer structure" ] impl crate :: Writable for TFLG { } # [ doc = "Timer Flag Register" ] pub mod tflg { # [ doc = "Reader of register TFLG%s" ] pub type R = crate :: R < u32 , super :: TFLG > ; # [ doc = "Writer for register TFLG%s" ] pub type W = crate :: W < u32 , super :: TFLG > ; # [ doc = "Register TFLG%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TFLG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Timer Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIF_A { # [ doc = "0: Timeout has not yet occurred." ] _0 , # [ doc = "1: Timeout has occurred." ] _1 } impl From < TIF_A > for bool { # [ inline ( always ) ] fn from ( variant : TIF_A ) -> Self { match variant { TIF_A :: _0 => false , TIF_A :: _1 => true } } } # [ doc = "Reader of field `TIF`" ] pub type TIF_R = crate :: R < bool , TIF_A > ; impl TIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIF_A { match self . bits { false => TIF_A :: _0 , true => TIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIF_A :: _1 } } # [ doc = "Write proxy for field `TIF`" ] pub struct TIF_W < 'a > { w : & 'a mut W , } impl < 'a > TIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timeout has not yet occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIF_A :: _0 ) } # [ doc = "Timeout has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIF_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } impl R { # [ doc = "Bit 0 - Timer Interrupt Flag" ] # [ inline ( always ) ] pub fn tif ( & self ) -> TIF_R { TIF_R :: new ( ( self . bits & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Timer Interrupt Flag" ] # [ inline ( always ) ] pub fn tif ( & mut self ) -> TIF_W { TIF_W { w : self } } } } } # [ doc = "FlexTimer Module" ] pub struct FTM0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for FTM0 { } impl FTM0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const ftm0 :: RegisterBlock { 0x4003_8000 as * const _ } } impl Deref for FTM0 { type Target = ftm0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * FTM0 :: ptr ( ) } } } # [ doc = "FlexTimer Module" ] pub mod ftm0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Status And Control" ] pub sc : SC , # [ doc = "0x04 - Counter" ] pub cnt : CNT , # [ doc = "0x08 - Modulo" ] pub mod_ : MOD , # [ doc = "0x0c - Channel (n) Status And Control" ] pub c0sc : CSC , # [ doc = "0x10 - Channel (n) Value" ] pub c0v : CV , # [ doc = "0x14 - Channel (n) Status And Control" ] pub c1sc : CSC , # [ doc = "0x18 - Channel (n) Value" ] pub c1v : CV , # [ doc = "0x1c - Channel (n) Status And Control" ] pub c2sc : CSC , # [ doc = "0x20 - Channel (n) Value" ] pub c2v : CV , # [ doc = "0x24 - Channel (n) Status And Control" ] pub c3sc : CSC , # [ doc = "0x28 - Channel (n) Value" ] pub c3v : CV , # [ doc = "0x2c - Channel (n) Status And Control" ] pub c4sc : CSC , # [ doc = "0x30 - Channel (n) Value" ] pub c4v : CV , # [ doc = "0x34 - Channel (n) Status And Control" ] pub c5sc : CSC , # [ doc = "0x38 - Channel (n) Value" ] pub c5v : CV , # [ doc = "0x3c - Channel (n) Status And Control" ] pub c6sc : CSC , # [ doc = "0x40 - Channel (n) Value" ] pub c6v : CV , # [ doc = "0x44 - Channel (n) Status And Control" ] pub c7sc : CSC , # [ doc = "0x48 - Channel (n) Value" ] pub c7v : CV , # [ doc = "0x4c - Counter Initial Value" ] pub cntin : CNTIN , # [ doc = "0x50 - Capture And Compare Status" ] pub status : STATUS , # [ doc = "0x54 - Features Mode Selection" ] pub mode : MODE , # [ doc = "0x58 - Synchronization" ] pub sync : SYNC , # [ doc = "0x5c - Initial State For Channels Output" ] pub outinit : OUTINIT , # [ doc = "0x60 - Output Mask" ] pub outmask : OUTMASK , # [ doc = "0x64 - Function For Linked Channels" ] pub combine : COMBINE , # [ doc = "0x68 - Deadtime Insertion Control" ] pub deadtime : DEADTIME , # [ doc = "0x6c - FTM External Trigger" ] pub exttrig : EXTTRIG , # [ doc = "0x70 - Channels Polarity" ] pub pol : POL , # [ doc = "0x74 - Fault Mode Status" ] pub fms : FMS , # [ doc = "0x78 - Input Capture Filter Control" ] pub filter : FILTER , # [ doc = "0x7c - Fault Control" ] pub fltctrl : FLTCTRL , # [ doc = "0x80 - Quadrature Decoder Control And Status" ] pub qdctrl : QDCTRL , # [ doc = "0x84 - Configuration" ] pub conf : CONF , # [ doc = "0x88 - FTM Fault Input Polarity" ] pub fltpol : FLTPOL , # [ doc = "0x8c - Synchronization Configuration" ] pub synconf : SYNCONF , # [ doc = "0x90 - FTM Inverting Control" ] pub invctrl : INVCTRL , # [ doc = "0x94 - FTM Software Output Control" ] pub swoctrl : SWOCTRL , # [ doc = "0x98 - FTM PWM Load" ] pub pwmload : PWMLOAD , } # [ doc = "Status And Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u32 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "Status And Control" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u32 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u32 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Prescale Factor Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Divide by 1" ] _000 , # [ doc = "1: Divide by 2" ] _001 , # [ doc = "2: Divide by 4" ] _010 , # [ doc = "3: Divide by 8" ] _011 , # [ doc = "4: Divide by 16" ] _100 , # [ doc = "5: Divide by 32" ] _101 , # [ doc = "6: Divide by 64" ] _110 , # [ doc = "7: Divide by 128" ] _111 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _000 => 0 , PS_A :: _001 => 1 , PS_A :: _010 => 2 , PS_A :: _011 => 3 , PS_A :: _100 => 4 , PS_A :: _101 => 5 , PS_A :: _110 => 6 , PS_A :: _111 => 7 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _000 , 1 => PS_A :: _001 , 2 => PS_A :: _010 , 3 => PS_A :: _011 , 4 => PS_A :: _100 , 5 => PS_A :: _101 , 6 => PS_A :: _110 , 7 => PS_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PS_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PS_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PS_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PS_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PS_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PS_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PS_A :: _111 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide by 1" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PS_A :: _000 ) } # [ doc = "Divide by 2" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PS_A :: _001 ) } # [ doc = "Divide by 4" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PS_A :: _010 ) } # [ doc = "Divide by 8" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PS_A :: _011 ) } # [ doc = "Divide by 16" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PS_A :: _100 ) } # [ doc = "Divide by 32" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PS_A :: _101 ) } # [ doc = "Divide by 64" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PS_A :: _110 ) } # [ doc = "Divide by 128" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PS_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Clock Source Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKS_A { # [ doc = "0: No clock selected. This in effect disables the FTM counter." ] _00 , # [ doc = "1: System clock" ] _01 , # [ doc = "2: Fixed frequency clock" ] _10 , # [ doc = "3: External clock" ] _11 } impl From < CLKS_A > for u8 { # [ inline ( always ) ] fn from ( variant : CLKS_A ) -> Self { match variant { CLKS_A :: _00 => 0 , CLKS_A :: _01 => 1 , CLKS_A :: _10 => 2 , CLKS_A :: _11 => 3 } } } # [ doc = "Reader of field `CLKS`" ] pub type CLKS_R = crate :: R < u8 , CLKS_A > ; impl CLKS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKS_A { match self . bits { 0 => CLKS_A :: _00 , 1 => CLKS_A :: _01 , 2 => CLKS_A :: _10 , 3 => CLKS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CLKS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CLKS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CLKS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CLKS_A :: _11 } } # [ doc = "Write proxy for field `CLKS`" ] pub struct CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > CLKS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No clock selected. This in effect disables the FTM counter." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _00 ) } # [ doc = "System clock" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _01 ) } # [ doc = "Fixed frequency clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _10 ) } # [ doc = "External clock" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 3 ) ) | ( ( ( value as u32 ) & 0x03 ) << 3 ) ; self . w } } # [ doc = "Center-Aligned PWM Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPWMS_A { # [ doc = "0: FTM counter operates in Up Counting mode." ] _0 , # [ doc = "1: FTM counter operates in Up-Down Counting mode." ] _1 } impl From < CPWMS_A > for bool { # [ inline ( always ) ] fn from ( variant : CPWMS_A ) -> Self { match variant { CPWMS_A :: _0 => false , CPWMS_A :: _1 => true } } } # [ doc = "Reader of field `CPWMS`" ] pub type CPWMS_R = crate :: R < bool , CPWMS_A > ; impl CPWMS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPWMS_A { match self . bits { false => CPWMS_A :: _0 , true => CPWMS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPWMS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPWMS_A :: _1 } } # [ doc = "Write proxy for field `CPWMS`" ] pub struct CPWMS_W < 'a > { w : & 'a mut W , } impl < 'a > CPWMS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPWMS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter operates in Up Counting mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _0 ) } # [ doc = "FTM counter operates in Up-Down Counting mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _1 ) } # [ 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 = "Timer Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOIE_A { # [ doc = "0: Disable TOF interrupts. Use software polling." ] _0 , # [ doc = "1: Enable TOF interrupts. An interrupt is generated when TOF equals one." ] _1 } impl From < TOIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TOIE_A ) -> Self { match variant { TOIE_A :: _0 => false , TOIE_A :: _1 => true } } } # [ doc = "Reader of field `TOIE`" ] pub type TOIE_R = crate :: R < bool , TOIE_A > ; impl TOIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOIE_A { match self . bits { false => TOIE_A :: _0 , true => TOIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOIE_A :: _1 } } # [ doc = "Write proxy for field `TOIE`" ] pub struct TOIE_W < 'a > { w : & 'a mut W , } impl < 'a > TOIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable TOF interrupts. Use software polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _0 ) } # [ doc = "Enable TOF interrupts. An interrupt is generated when TOF equals one." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _1 ) } # [ 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 = "Timer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: FTM counter has not overflowed." ] _0 , # [ doc = "1: FTM counter has overflowed." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Write proxy for field `TOF`" ] pub struct TOF_W < 'a > { w : & 'a mut W , } impl < 'a > TOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter has not overflowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _0 ) } # [ doc = "FTM counter has overflowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:4 - Clock Source Selection" ] # [ inline ( always ) ] pub fn clks ( & self ) -> CLKS_R { CLKS_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & self ) -> CPWMS_R { CPWMS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & self ) -> TOIE_R { TOIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bits 3:4 - Clock Source Selection" ] # [ inline ( always ) ] pub fn clks ( & mut self ) -> CLKS_W { CLKS_W { w : self } } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & mut self ) -> CPWMS_W { CPWMS_W { w : self } } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & mut self ) -> TOIE_W { TOIE_W { w : self } } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & mut self ) -> TOF_W { TOF_W { w : self } } } } # [ doc = "Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module" ] pub type CNT = crate :: Reg < u32 , _CNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNT ; # [ doc = "`read()` method returns [cnt::R](cnt::R) reader structure" ] impl crate :: Readable for CNT { } # [ doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure" ] impl crate :: Writable for CNT { } # [ doc = "Counter" ] pub mod cnt { # [ doc = "Reader of register CNT" ] pub type R = crate :: R < u32 , super :: CNT > ; # [ doc = "Writer for register CNT" ] pub type W = crate :: W < u32 , super :: CNT > ; # [ doc = "Register CNT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `COUNT`" ] pub struct COUNT_W < 'a > { w : & 'a mut W , } impl < 'a > COUNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn count ( & mut self ) -> COUNT_W { COUNT_W { w : self } } } } # [ doc = "Modulo\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mod_](mod_) module" ] pub type MOD = crate :: Reg < u32 , _MOD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MOD ; # [ doc = "`read()` method returns [mod_::R](mod_::R) reader structure" ] impl crate :: Readable for MOD { } # [ doc = "`write(|w| ..)` method takes [mod_::W](mod_::W) writer structure" ] impl crate :: Writable for MOD { } # [ doc = "Modulo" ] pub mod mod_ { # [ doc = "Reader of register MOD" ] pub type R = crate :: R < u32 , super :: MOD > ; # [ doc = "Writer for register MOD" ] pub type W = crate :: W < u32 , super :: MOD > ; # [ doc = "Register MOD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MOD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MOD`" ] pub type MOD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MOD`" ] pub struct MOD_W < 'a > { w : & 'a mut W , } impl < 'a > MOD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Modulo Value" ] # [ inline ( always ) ] pub fn mod_ ( & self ) -> MOD_R { MOD_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Modulo Value" ] # [ inline ( always ) ] pub fn mod_ ( & mut self ) -> MOD_W { MOD_W { w : self } } } } # [ doc = "Channel (n) Status And Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csc](csc) module" ] pub type CSC = crate :: Reg < u32 , _CSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSC ; # [ doc = "`read()` method returns [csc::R](csc::R) reader structure" ] impl crate :: Readable for CSC { } # [ doc = "`write(|w| ..)` method takes [csc::W](csc::W) writer structure" ] impl crate :: Writable for CSC { } # [ doc = "Channel (n) Status And Control" ] pub mod csc { # [ doc = "Reader of register C%sSC" ] pub type R = crate :: R < u32 , super :: CSC > ; # [ doc = "Writer for register C%sSC" ] pub type W = crate :: W < u32 , super :: CSC > ; # [ doc = "Register C%sSC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Disable DMA transfers." ] _0 , # [ doc = "1: Enable DMA transfers." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable DMA transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Enable DMA transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ELSA`" ] pub type ELSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSA`" ] pub struct ELSA_W < 'a > { w : & 'a mut W , } impl < 'a > ELSA_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 = "Reader of field `ELSB`" ] pub type ELSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSB`" ] pub struct ELSB_W < 'a > { w : & 'a mut W , } impl < 'a > ELSB_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `MSA`" ] pub type MSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSA`" ] pub struct MSA_W < 'a > { w : & 'a mut W , } impl < 'a > MSA_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `MSB`" ] pub type MSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSB`" ] pub struct MSB_W < 'a > { w : & 'a mut W , } impl < 'a > MSB_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 = "Channel Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHIE_A { # [ doc = "0: Disable channel interrupts. Use software polling." ] _0 , # [ doc = "1: Enable channel interrupts." ] _1 } impl From < CHIE_A > for bool { # [ inline ( always ) ] fn from ( variant : CHIE_A ) -> Self { match variant { CHIE_A :: _0 => false , CHIE_A :: _1 => true } } } # [ doc = "Reader of field `CHIE`" ] pub type CHIE_R = crate :: R < bool , CHIE_A > ; impl CHIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHIE_A { match self . bits { false => CHIE_A :: _0 , true => CHIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHIE_A :: _1 } } # [ doc = "Write proxy for field `CHIE`" ] pub struct CHIE_W < 'a > { w : & 'a mut W , } impl < 'a > CHIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable channel interrupts. Use software polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _0 ) } # [ doc = "Enable channel interrupts." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _1 ) } # [ 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 = "Channel Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHF_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CHF_A > for bool { # [ inline ( always ) ] fn from ( variant : CHF_A ) -> Self { match variant { CHF_A :: _0 => false , CHF_A :: _1 => true } } } # [ doc = "Reader of field `CHF`" ] pub type CHF_R = crate :: R < bool , CHF_A > ; impl CHF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHF_A { match self . bits { false => CHF_A :: _0 , true => CHF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHF_A :: _1 } } # [ doc = "Write proxy for field `CHF`" ] pub struct CHF_W < 'a > { w : & 'a mut W , } impl < 'a > CHF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & self ) -> ELSA_R { ELSA_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & self ) -> ELSB_R { ELSB_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & self ) -> MSA_R { MSA_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & self ) -> MSB_R { MSB_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & self ) -> CHIE_R { CHIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & self ) -> CHF_R { CHF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & mut self ) -> ELSA_W { ELSA_W { w : self } } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & mut self ) -> ELSB_W { ELSB_W { w : self } } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & mut self ) -> MSA_W { MSA_W { w : self } } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & mut self ) -> MSB_W { MSB_W { w : self } } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & mut self ) -> CHIE_W { CHIE_W { w : self } } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & mut self ) -> CHF_W { CHF_W { w : self } } } } # [ doc = "Channel (n) Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cv](cv) module" ] pub type CV = crate :: Reg < u32 , _CV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CV ; # [ doc = "`read()` method returns [cv::R](cv::R) reader structure" ] impl crate :: Readable for CV { } # [ doc = "`write(|w| ..)` method takes [cv::W](cv::W) writer structure" ] impl crate :: Writable for CV { } # [ doc = "Channel (n) Value" ] pub mod cv { # [ doc = "Reader of register C%sV" ] pub type R = crate :: R < u32 , super :: CV > ; # [ doc = "Writer for register C%sV" ] pub type W = crate :: W < u32 , super :: CV > ; # [ doc = "Register C%sV `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CV { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VAL`" ] pub type VAL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `VAL`" ] pub struct VAL_W < 'a > { w : & 'a mut W , } impl < 'a > VAL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & self ) -> VAL_R { VAL_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & mut self ) -> VAL_W { VAL_W { w : self } } } } # [ doc = "Counter Initial Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cntin](cntin) module" ] pub type CNTIN = crate :: Reg < u32 , _CNTIN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNTIN ; # [ doc = "`read()` method returns [cntin::R](cntin::R) reader structure" ] impl crate :: Readable for CNTIN { } # [ doc = "`write(|w| ..)` method takes [cntin::W](cntin::W) writer structure" ] impl crate :: Writable for CNTIN { } # [ doc = "Counter Initial Value" ] pub mod cntin { # [ doc = "Reader of register CNTIN" ] pub type R = crate :: R < u32 , super :: CNTIN > ; # [ doc = "Writer for register CNTIN" ] pub type W = crate :: W < u32 , super :: CNTIN > ; # [ doc = "Register CNTIN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNTIN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Initial Value Of The FTM Counter" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Initial Value Of The FTM Counter" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } } } # [ doc = "Capture And Compare Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "`write(|w| ..)` method takes [status::W](status::W) writer structure" ] impl crate :: Writable for STATUS { } # [ doc = "Capture And Compare Status" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Writer for register STATUS" ] pub type W = crate :: W < u32 , super :: STATUS > ; # [ doc = "Register STATUS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: STATUS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH0F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0F_A ) -> Self { match variant { CH0F_A :: _0 => false , CH0F_A :: _1 => true } } } # [ doc = "Reader of field `CH0F`" ] pub type CH0F_R = crate :: R < bool , CH0F_A > ; impl CH0F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0F_A { match self . bits { false => CH0F_A :: _0 , true => CH0F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0F_A :: _1 } } # [ doc = "Write proxy for field `CH0F`" ] pub struct CH0F_W < 'a > { w : & 'a mut W , } impl < 'a > CH0F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH1F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1F_A ) -> Self { match variant { CH1F_A :: _0 => false , CH1F_A :: _1 => true } } } # [ doc = "Reader of field `CH1F`" ] pub type CH1F_R = crate :: R < bool , CH1F_A > ; impl CH1F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1F_A { match self . bits { false => CH1F_A :: _0 , true => CH1F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1F_A :: _1 } } # [ doc = "Write proxy for field `CH1F`" ] pub struct CH1F_W < 'a > { w : & 'a mut W , } impl < 'a > CH1F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH2F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2F_A ) -> Self { match variant { CH2F_A :: _0 => false , CH2F_A :: _1 => true } } } # [ doc = "Reader of field `CH2F`" ] pub type CH2F_R = crate :: R < bool , CH2F_A > ; impl CH2F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2F_A { match self . bits { false => CH2F_A :: _0 , true => CH2F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2F_A :: _1 } } # [ doc = "Write proxy for field `CH2F`" ] pub struct CH2F_W < 'a > { w : & 'a mut W , } impl < 'a > CH2F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2F_A :: _1 ) } # [ 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 = "Channel 3 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH3F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3F_A ) -> Self { match variant { CH3F_A :: _0 => false , CH3F_A :: _1 => true } } } # [ doc = "Reader of field `CH3F`" ] pub type CH3F_R = crate :: R < bool , CH3F_A > ; impl CH3F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3F_A { match self . bits { false => CH3F_A :: _0 , true => CH3F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3F_A :: _1 } } # [ doc = "Write proxy for field `CH3F`" ] pub struct CH3F_W < 'a > { w : & 'a mut W , } impl < 'a > CH3F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3F_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH4F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4F_A ) -> Self { match variant { CH4F_A :: _0 => false , CH4F_A :: _1 => true } } } # [ doc = "Reader of field `CH4F`" ] pub type CH4F_R = crate :: R < bool , CH4F_A > ; impl CH4F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4F_A { match self . bits { false => CH4F_A :: _0 , true => CH4F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4F_A :: _1 } } # [ doc = "Write proxy for field `CH4F`" ] pub struct CH4F_W < 'a > { w : & 'a mut W , } impl < 'a > CH4F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4F_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH5F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5F_A ) -> Self { match variant { CH5F_A :: _0 => false , CH5F_A :: _1 => true } } } # [ doc = "Reader of field `CH5F`" ] pub type CH5F_R = crate :: R < bool , CH5F_A > ; impl CH5F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5F_A { match self . bits { false => CH5F_A :: _0 , true => CH5F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5F_A :: _1 } } # [ doc = "Write proxy for field `CH5F`" ] pub struct CH5F_W < 'a > { w : & 'a mut W , } impl < 'a > CH5F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5F_A :: _1 ) } # [ 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 = "Channel 6 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH6F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6F_A ) -> Self { match variant { CH6F_A :: _0 => false , CH6F_A :: _1 => true } } } # [ doc = "Reader of field `CH6F`" ] pub type CH6F_R = crate :: R < bool , CH6F_A > ; impl CH6F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6F_A { match self . bits { false => CH6F_A :: _0 , true => CH6F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6F_A :: _1 } } # [ doc = "Write proxy for field `CH6F`" ] pub struct CH6F_W < 'a > { w : & 'a mut W , } impl < 'a > CH6F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6F_A :: _1 ) } # [ 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 = "Channel 7 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH7F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7F_A ) -> Self { match variant { CH7F_A :: _0 => false , CH7F_A :: _1 => true } } } # [ doc = "Reader of field `CH7F`" ] pub type CH7F_R = crate :: R < bool , CH7F_A > ; impl CH7F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7F_A { match self . bits { false => CH7F_A :: _0 , true => CH7F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7F_A :: _1 } } # [ doc = "Write proxy for field `CH7F`" ] pub struct CH7F_W < 'a > { w : & 'a mut W , } impl < 'a > CH7F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7F_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & self ) -> CH0F_R { CH0F_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & self ) -> CH1F_R { CH1F_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Flag" ] # [ inline ( always ) ] pub fn ch2f ( & self ) -> CH2F_R { CH2F_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Flag" ] # [ inline ( always ) ] pub fn ch3f ( & self ) -> CH3F_R { CH3F_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Flag" ] # [ inline ( always ) ] pub fn ch4f ( & self ) -> CH4F_R { CH4F_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Flag" ] # [ inline ( always ) ] pub fn ch5f ( & self ) -> CH5F_R { CH5F_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Flag" ] # [ inline ( always ) ] pub fn ch6f ( & self ) -> CH6F_R { CH6F_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Flag" ] # [ inline ( always ) ] pub fn ch7f ( & self ) -> CH7F_R { CH7F_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & mut self ) -> CH0F_W { CH0F_W { w : self } } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & mut self ) -> CH1F_W { CH1F_W { w : self } } # [ doc = "Bit 2 - Channel 2 Flag" ] # [ inline ( always ) ] pub fn ch2f ( & mut self ) -> CH2F_W { CH2F_W { w : self } } # [ doc = "Bit 3 - Channel 3 Flag" ] # [ inline ( always ) ] pub fn ch3f ( & mut self ) -> CH3F_W { CH3F_W { w : self } } # [ doc = "Bit 4 - Channel 4 Flag" ] # [ inline ( always ) ] pub fn ch4f ( & mut self ) -> CH4F_W { CH4F_W { w : self } } # [ doc = "Bit 5 - Channel 5 Flag" ] # [ inline ( always ) ] pub fn ch5f ( & mut self ) -> CH5F_W { CH5F_W { w : self } } # [ doc = "Bit 6 - Channel 6 Flag" ] # [ inline ( always ) ] pub fn ch6f ( & mut self ) -> CH6F_W { CH6F_W { w : self } } # [ doc = "Bit 7 - Channel 7 Flag" ] # [ inline ( always ) ] pub fn ch7f ( & mut self ) -> CH7F_W { CH7F_W { w : self } } } } # [ doc = "Features Mode Selection\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mode](mode) module" ] pub type MODE = crate :: Reg < u32 , _MODE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODE ; # [ doc = "`read()` method returns [mode::R](mode::R) reader structure" ] impl crate :: Readable for MODE { } # [ doc = "`write(|w| ..)` method takes [mode::W](mode::W) writer structure" ] impl crate :: Writable for MODE { } # [ doc = "Features Mode Selection" ] pub mod mode { # [ doc = "Reader of register MODE" ] pub type R = crate :: R < u32 , super :: MODE > ; # [ doc = "Writer for register MODE" ] pub type W = crate :: W < u32 , super :: MODE > ; # [ doc = "Register MODE `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: MODE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "FTM Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTMEN_A { # [ doc = "0: TPM compatibility. Free running counter and synchronization compatible with TPM." ] _0 , # [ doc = "1: Free running counter and synchronization are different from TPM behavior." ] _1 } impl From < FTMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : FTMEN_A ) -> Self { match variant { FTMEN_A :: _0 => false , FTMEN_A :: _1 => true } } } # [ doc = "Reader of field `FTMEN`" ] pub type FTMEN_R = crate :: R < bool , FTMEN_A > ; impl FTMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTMEN_A { match self . bits { false => FTMEN_A :: _0 , true => FTMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTMEN_A :: _1 } } # [ doc = "Write proxy for field `FTMEN`" ] pub struct FTMEN_W < 'a > { w : & 'a mut W , } impl < 'a > FTMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM compatibility. Free running counter and synchronization compatible with TPM." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTMEN_A :: _0 ) } # [ doc = "Free running counter and synchronization are different from TPM behavior." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTMEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_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 } } # [ doc = "Write Protection Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPDIS_A { # [ doc = "0: Write protection is enabled." ] _0 , # [ doc = "1: Write protection is disabled." ] _1 } impl From < WPDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : WPDIS_A ) -> Self { match variant { WPDIS_A :: _0 => false , WPDIS_A :: _1 => true } } } # [ doc = "Reader of field `WPDIS`" ] pub type WPDIS_R = crate :: R < bool , WPDIS_A > ; impl WPDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPDIS_A { match self . bits { false => WPDIS_A :: _0 , true => WPDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPDIS_A :: _1 } } # [ doc = "Write proxy for field `WPDIS`" ] pub struct WPDIS_W < 'a > { w : & 'a mut W , } impl < 'a > WPDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write protection is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPDIS_A :: _0 ) } # [ doc = "Write protection is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPDIS_A :: _1 ) } # [ 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 = "PWM Synchronization Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWMSYNC_A { # [ doc = "0: No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization." ] _0 , # [ doc = "1: Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization." ] _1 } impl From < PWMSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : PWMSYNC_A ) -> Self { match variant { PWMSYNC_A :: _0 => false , PWMSYNC_A :: _1 => true } } } # [ doc = "Reader of field `PWMSYNC`" ] pub type PWMSYNC_R = crate :: R < bool , PWMSYNC_A > ; impl PWMSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PWMSYNC_A { match self . bits { false => PWMSYNC_A :: _0 , true => PWMSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PWMSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PWMSYNC_A :: _1 } } # [ doc = "Write proxy for field `PWMSYNC`" ] pub struct PWMSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > PWMSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PWMSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PWMSYNC_A :: _0 ) } # [ doc = "Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PWMSYNC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Capture Test Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAPTEST_A { # [ doc = "0: Capture test mode is disabled." ] _0 , # [ doc = "1: Capture test mode is enabled." ] _1 } impl From < CAPTEST_A > for bool { # [ inline ( always ) ] fn from ( variant : CAPTEST_A ) -> Self { match variant { CAPTEST_A :: _0 => false , CAPTEST_A :: _1 => true } } } # [ doc = "Reader of field `CAPTEST`" ] pub type CAPTEST_R = crate :: R < bool , CAPTEST_A > ; impl CAPTEST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CAPTEST_A { match self . bits { false => CAPTEST_A :: _0 , true => CAPTEST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CAPTEST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CAPTEST_A :: _1 } } # [ doc = "Write proxy for field `CAPTEST`" ] pub struct CAPTEST_W < 'a > { w : & 'a mut W , } impl < 'a > CAPTEST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAPTEST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Capture test mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAPTEST_A :: _0 ) } # [ doc = "Capture test mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAPTEST_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Fault Control Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTM_A { # [ doc = "0: Fault control is disabled for all channels." ] _00 , # [ doc = "1: Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing." ] _01 , # [ doc = "2: Fault control is enabled for all channels, and the selected mode is the manual fault clearing." ] _10 , # [ doc = "3: Fault control is enabled for all channels, and the selected mode is the automatic fault clearing." ] _11 } impl From < FAULTM_A > for u8 { # [ inline ( always ) ] fn from ( variant : FAULTM_A ) -> Self { match variant { FAULTM_A :: _00 => 0 , FAULTM_A :: _01 => 1 , FAULTM_A :: _10 => 2 , FAULTM_A :: _11 => 3 } } } # [ doc = "Reader of field `FAULTM`" ] pub type FAULTM_R = crate :: R < u8 , FAULTM_A > ; impl FAULTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTM_A { match self . bits { 0 => FAULTM_A :: _00 , 1 => FAULTM_A :: _01 , 2 => FAULTM_A :: _10 , 3 => FAULTM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FAULTM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FAULTM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FAULTM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FAULTM_A :: _11 } } # [ doc = "Write proxy for field `FAULTM`" ] pub struct FAULTM_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Fault control is disabled for all channels." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _00 ) } # [ doc = "Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _01 ) } # [ doc = "Fault control is enabled for all channels, and the selected mode is the manual fault clearing." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _10 ) } # [ doc = "Fault control is enabled for all channels, and the selected mode is the automatic fault clearing." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u32 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Fault Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTIE_A { # [ doc = "0: Fault control interrupt is disabled." ] _0 , # [ doc = "1: Fault control interrupt is enabled." ] _1 } impl From < FAULTIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTIE_A ) -> Self { match variant { FAULTIE_A :: _0 => false , FAULTIE_A :: _1 => true } } } # [ doc = "Reader of field `FAULTIE`" ] pub type FAULTIE_R = crate :: R < bool , FAULTIE_A > ; impl FAULTIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTIE_A { match self . bits { false => FAULTIE_A :: _0 , true => FAULTIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTIE_A :: _1 } } # [ doc = "Write proxy for field `FAULTIE`" ] pub struct FAULTIE_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault control interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTIE_A :: _0 ) } # [ doc = "Fault control interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTIE_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - FTM Enable" ] # [ inline ( always ) ] pub fn ftmen ( & self ) -> FTMEN_R { FTMEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Initialize The Channels Output" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Write Protection Disable" ] # [ inline ( always ) ] pub fn wpdis ( & self ) -> WPDIS_R { WPDIS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - PWM Synchronization Mode" ] # [ inline ( always ) ] pub fn pwmsync ( & self ) -> PWMSYNC_R { PWMSYNC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Capture Test Mode Enable" ] # [ inline ( always ) ] pub fn captest ( & self ) -> CAPTEST_R { CAPTEST_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:6 - Fault Control Mode" ] # [ inline ( always ) ] pub fn faultm ( & self ) -> FAULTM_R { FAULTM_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Fault Interrupt Enable" ] # [ inline ( always ) ] pub fn faultie ( & self ) -> FAULTIE_R { FAULTIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FTM Enable" ] # [ inline ( always ) ] pub fn ftmen ( & mut self ) -> FTMEN_W { FTMEN_W { w : self } } # [ doc = "Bit 1 - Initialize The Channels Output" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } # [ doc = "Bit 2 - Write Protection Disable" ] # [ inline ( always ) ] pub fn wpdis ( & mut self ) -> WPDIS_W { WPDIS_W { w : self } } # [ doc = "Bit 3 - PWM Synchronization Mode" ] # [ inline ( always ) ] pub fn pwmsync ( & mut self ) -> PWMSYNC_W { PWMSYNC_W { w : self } } # [ doc = "Bit 4 - Capture Test Mode Enable" ] # [ inline ( always ) ] pub fn captest ( & mut self ) -> CAPTEST_W { CAPTEST_W { w : self } } # [ doc = "Bits 5:6 - Fault Control Mode" ] # [ inline ( always ) ] pub fn faultm ( & mut self ) -> FAULTM_W { FAULTM_W { w : self } } # [ doc = "Bit 7 - Fault Interrupt Enable" ] # [ inline ( always ) ] pub fn faultie ( & mut self ) -> FAULTIE_W { FAULTIE_W { w : self } } } } # [ doc = "Synchronization\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sync](sync) module" ] pub type SYNC = crate :: Reg < u32 , _SYNC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYNC ; # [ doc = "`read()` method returns [sync::R](sync::R) reader structure" ] impl crate :: Readable for SYNC { } # [ doc = "`write(|w| ..)` method takes [sync::W](sync::W) writer structure" ] impl crate :: Writable for SYNC { } # [ doc = "Synchronization" ] pub mod sync { # [ doc = "Reader of register SYNC" ] pub type R = crate :: R < u32 , super :: SYNC > ; # [ doc = "Writer for register SYNC" ] pub type W = crate :: W < u32 , super :: SYNC > ; # [ doc = "Register SYNC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SYNC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Minimum Loading Point Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTMIN_A { # [ doc = "0: The minimum loading point is disabled." ] _0 , # [ doc = "1: The minimum loading point is enabled." ] _1 } impl From < CNTMIN_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTMIN_A ) -> Self { match variant { CNTMIN_A :: _0 => false , CNTMIN_A :: _1 => true } } } # [ doc = "Reader of field `CNTMIN`" ] pub type CNTMIN_R = crate :: R < bool , CNTMIN_A > ; impl CNTMIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTMIN_A { match self . bits { false => CNTMIN_A :: _0 , true => CNTMIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTMIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTMIN_A :: _1 } } # [ doc = "Write proxy for field `CNTMIN`" ] pub struct CNTMIN_W < 'a > { w : & 'a mut W , } impl < 'a > CNTMIN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTMIN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The minimum loading point is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTMIN_A :: _0 ) } # [ doc = "The minimum loading point is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTMIN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Maximum Loading Point Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTMAX_A { # [ doc = "0: The maximum loading point is disabled." ] _0 , # [ doc = "1: The maximum loading point is enabled." ] _1 } impl From < CNTMAX_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTMAX_A ) -> Self { match variant { CNTMAX_A :: _0 => false , CNTMAX_A :: _1 => true } } } # [ doc = "Reader of field `CNTMAX`" ] pub type CNTMAX_R = crate :: R < bool , CNTMAX_A > ; impl CNTMAX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTMAX_A { match self . bits { false => CNTMAX_A :: _0 , true => CNTMAX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTMAX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTMAX_A :: _1 } } # [ doc = "Write proxy for field `CNTMAX`" ] pub struct CNTMAX_W < 'a > { w : & 'a mut W , } impl < 'a > CNTMAX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTMAX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The maximum loading point is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTMAX_A :: _0 ) } # [ doc = "The maximum loading point is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTMAX_A :: _1 ) } # [ 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 } } # [ doc = "FTM Counter Reinitialization By Synchronization (FTM counter synchronization)\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REINIT_A { # [ doc = "0: FTM counter continues to count normally." ] _0 , # [ doc = "1: FTM counter is updated with its initial value when the selected trigger is detected." ] _1 } impl From < REINIT_A > for bool { # [ inline ( always ) ] fn from ( variant : REINIT_A ) -> Self { match variant { REINIT_A :: _0 => false , REINIT_A :: _1 => true } } } # [ doc = "Reader of field `REINIT`" ] pub type REINIT_R = crate :: R < bool , REINIT_A > ; impl REINIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> REINIT_A { match self . bits { false => REINIT_A :: _0 , true => REINIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == REINIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == REINIT_A :: _1 } } # [ doc = "Write proxy for field `REINIT`" ] pub struct REINIT_W < 'a > { w : & 'a mut W , } impl < 'a > REINIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REINIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter continues to count normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( REINIT_A :: _0 ) } # [ doc = "FTM counter is updated with its initial value when the selected trigger is detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( REINIT_A :: _1 ) } # [ 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 = "Output Mask Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCHOM_A { # [ doc = "0: OUTMASK register is updated with the value of its buffer in all rising edges of the system clock." ] _0 , # [ doc = "1: OUTMASK register is updated with the value of its buffer only by the PWM synchronization." ] _1 } impl From < SYNCHOM_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCHOM_A ) -> Self { match variant { SYNCHOM_A :: _0 => false , SYNCHOM_A :: _1 => true } } } # [ doc = "Reader of field `SYNCHOM`" ] pub type SYNCHOM_R = crate :: R < bool , SYNCHOM_A > ; impl SYNCHOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCHOM_A { match self . bits { false => SYNCHOM_A :: _0 , true => SYNCHOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCHOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCHOM_A :: _1 } } # [ doc = "Write proxy for field `SYNCHOM`" ] pub struct SYNCHOM_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCHOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCHOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OUTMASK register is updated with the value of its buffer in all rising edges of the system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCHOM_A :: _0 ) } # [ doc = "OUTMASK register is updated with the value of its buffer only by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCHOM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "PWM Synchronization Hardware Trigger 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG0_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG0_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG0_A ) -> Self { match variant { TRIG0_A :: _0 => false , TRIG0_A :: _1 => true } } } # [ doc = "Reader of field `TRIG0`" ] pub type TRIG0_R = crate :: R < bool , TRIG0_A > ; impl TRIG0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG0_A { match self . bits { false => TRIG0_A :: _0 , true => TRIG0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG0_A :: _1 } } # [ doc = "Write proxy for field `TRIG0`" ] pub struct TRIG0_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG0_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "PWM Synchronization Hardware Trigger 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG1_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG1_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG1_A ) -> Self { match variant { TRIG1_A :: _0 => false , TRIG1_A :: _1 => true } } } # [ doc = "Reader of field `TRIG1`" ] pub type TRIG1_R = crate :: R < bool , TRIG1_A > ; impl TRIG1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG1_A { match self . bits { false => TRIG1_A :: _0 , true => TRIG1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG1_A :: _1 } } # [ doc = "Write proxy for field `TRIG1`" ] pub struct TRIG1_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG1_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG1_A :: _1 ) } # [ 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 = "PWM Synchronization Hardware Trigger 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG2_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG2_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG2_A ) -> Self { match variant { TRIG2_A :: _0 => false , TRIG2_A :: _1 => true } } } # [ doc = "Reader of field `TRIG2`" ] pub type TRIG2_R = crate :: R < bool , TRIG2_A > ; impl TRIG2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG2_A { match self . bits { false => TRIG2_A :: _0 , true => TRIG2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG2_A :: _1 } } # [ doc = "Write proxy for field `TRIG2`" ] pub struct TRIG2_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG2_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG2_A :: _1 ) } # [ 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 = "PWM Synchronization Software Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSYNC_A { # [ doc = "0: Software trigger is not selected." ] _0 , # [ doc = "1: Software trigger is selected." ] _1 } impl From < SWSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSYNC_A ) -> Self { match variant { SWSYNC_A :: _0 => false , SWSYNC_A :: _1 => true } } } # [ doc = "Reader of field `SWSYNC`" ] pub type SWSYNC_R = crate :: R < bool , SWSYNC_A > ; impl SWSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSYNC_A { match self . bits { false => SWSYNC_A :: _0 , true => SWSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSYNC_A :: _1 } } # [ doc = "Write proxy for field `SWSYNC`" ] pub struct SWSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > SWSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Software trigger is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSYNC_A :: _0 ) } # [ doc = "Software trigger is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSYNC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Minimum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmin ( & self ) -> CNTMIN_R { CNTMIN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Maximum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmax ( & self ) -> CNTMAX_R { CNTMAX_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)" ] # [ inline ( always ) ] pub fn reinit ( & self ) -> REINIT_R { REINIT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Output Mask Synchronization" ] # [ inline ( always ) ] pub fn synchom ( & self ) -> SYNCHOM_R { SYNCHOM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - PWM Synchronization Hardware Trigger 0" ] # [ inline ( always ) ] pub fn trig0 ( & self ) -> TRIG0_R { TRIG0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - PWM Synchronization Hardware Trigger 1" ] # [ inline ( always ) ] pub fn trig1 ( & self ) -> TRIG1_R { TRIG1_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PWM Synchronization Hardware Trigger 2" ] # [ inline ( always ) ] pub fn trig2 ( & self ) -> TRIG2_R { TRIG2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - PWM Synchronization Software Trigger" ] # [ inline ( always ) ] pub fn swsync ( & self ) -> SWSYNC_R { SWSYNC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Minimum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmin ( & mut self ) -> CNTMIN_W { CNTMIN_W { w : self } } # [ doc = "Bit 1 - Maximum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmax ( & mut self ) -> CNTMAX_W { CNTMAX_W { w : self } } # [ doc = "Bit 2 - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)" ] # [ inline ( always ) ] pub fn reinit ( & mut self ) -> REINIT_W { REINIT_W { w : self } } # [ doc = "Bit 3 - Output Mask Synchronization" ] # [ inline ( always ) ] pub fn synchom ( & mut self ) -> SYNCHOM_W { SYNCHOM_W { w : self } } # [ doc = "Bit 4 - PWM Synchronization Hardware Trigger 0" ] # [ inline ( always ) ] pub fn trig0 ( & mut self ) -> TRIG0_W { TRIG0_W { w : self } } # [ doc = "Bit 5 - PWM Synchronization Hardware Trigger 1" ] # [ inline ( always ) ] pub fn trig1 ( & mut self ) -> TRIG1_W { TRIG1_W { w : self } } # [ doc = "Bit 6 - PWM Synchronization Hardware Trigger 2" ] # [ inline ( always ) ] pub fn trig2 ( & mut self ) -> TRIG2_W { TRIG2_W { w : self } } # [ doc = "Bit 7 - PWM Synchronization Software Trigger" ] # [ inline ( always ) ] pub fn swsync ( & mut self ) -> SWSYNC_W { SWSYNC_W { w : self } } } } # [ doc = "Initial State For Channels Output\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [outinit](outinit) module" ] pub type OUTINIT = crate :: Reg < u32 , _OUTINIT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OUTINIT ; # [ doc = "`read()` method returns [outinit::R](outinit::R) reader structure" ] impl crate :: Readable for OUTINIT { } # [ doc = "`write(|w| ..)` method takes [outinit::W](outinit::W) writer structure" ] impl crate :: Writable for OUTINIT { } # [ doc = "Initial State For Channels Output" ] pub mod outinit { # [ doc = "Reader of register OUTINIT" ] pub type R = crate :: R < u32 , super :: OUTINIT > ; # [ doc = "Writer for register OUTINIT" ] pub type W = crate :: W < u32 , super :: OUTINIT > ; # [ doc = "Register OUTINIT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OUTINIT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH0OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OI_A ) -> Self { match variant { CH0OI_A :: _0 => false , CH0OI_A :: _1 => true } } } # [ doc = "Reader of field `CH0OI`" ] pub type CH0OI_R = crate :: R < bool , CH0OI_A > ; impl CH0OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OI_A { match self . bits { false => CH0OI_A :: _0 , true => CH0OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OI_A :: _1 } } # [ doc = "Write proxy for field `CH0OI`" ] pub struct CH0OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OI_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH1OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OI_A ) -> Self { match variant { CH1OI_A :: _0 => false , CH1OI_A :: _1 => true } } } # [ doc = "Reader of field `CH1OI`" ] pub type CH1OI_R = crate :: R < bool , CH1OI_A > ; impl CH1OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OI_A { match self . bits { false => CH1OI_A :: _0 , true => CH1OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OI_A :: _1 } } # [ doc = "Write proxy for field `CH1OI`" ] pub struct CH1OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OI_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH2OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OI_A ) -> Self { match variant { CH2OI_A :: _0 => false , CH2OI_A :: _1 => true } } } # [ doc = "Reader of field `CH2OI`" ] pub type CH2OI_R = crate :: R < bool , CH2OI_A > ; impl CH2OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OI_A { match self . bits { false => CH2OI_A :: _0 , true => CH2OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OI_A :: _1 } } # [ doc = "Write proxy for field `CH2OI`" ] pub struct CH2OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OI_A :: _1 ) } # [ 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 = "Channel 3 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH3OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OI_A ) -> Self { match variant { CH3OI_A :: _0 => false , CH3OI_A :: _1 => true } } } # [ doc = "Reader of field `CH3OI`" ] pub type CH3OI_R = crate :: R < bool , CH3OI_A > ; impl CH3OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OI_A { match self . bits { false => CH3OI_A :: _0 , true => CH3OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OI_A :: _1 } } # [ doc = "Write proxy for field `CH3OI`" ] pub struct CH3OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OI_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH4OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OI_A ) -> Self { match variant { CH4OI_A :: _0 => false , CH4OI_A :: _1 => true } } } # [ doc = "Reader of field `CH4OI`" ] pub type CH4OI_R = crate :: R < bool , CH4OI_A > ; impl CH4OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OI_A { match self . bits { false => CH4OI_A :: _0 , true => CH4OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OI_A :: _1 } } # [ doc = "Write proxy for field `CH4OI`" ] pub struct CH4OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OI_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH5OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OI_A ) -> Self { match variant { CH5OI_A :: _0 => false , CH5OI_A :: _1 => true } } } # [ doc = "Reader of field `CH5OI`" ] pub type CH5OI_R = crate :: R < bool , CH5OI_A > ; impl CH5OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OI_A { match self . bits { false => CH5OI_A :: _0 , true => CH5OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OI_A :: _1 } } # [ doc = "Write proxy for field `CH5OI`" ] pub struct CH5OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OI_A :: _1 ) } # [ 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 = "Channel 6 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH6OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OI_A ) -> Self { match variant { CH6OI_A :: _0 => false , CH6OI_A :: _1 => true } } } # [ doc = "Reader of field `CH6OI`" ] pub type CH6OI_R = crate :: R < bool , CH6OI_A > ; impl CH6OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OI_A { match self . bits { false => CH6OI_A :: _0 , true => CH6OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OI_A :: _1 } } # [ doc = "Write proxy for field `CH6OI`" ] pub struct CH6OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OI_A :: _1 ) } # [ 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 = "Channel 7 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH7OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OI_A ) -> Self { match variant { CH7OI_A :: _0 => false , CH7OI_A :: _1 => true } } } # [ doc = "Reader of field `CH7OI`" ] pub type CH7OI_R = crate :: R < bool , CH7OI_A > ; impl CH7OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OI_A { match self . bits { false => CH7OI_A :: _0 , true => CH7OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OI_A :: _1 } } # [ doc = "Write proxy for field `CH7OI`" ] pub struct CH7OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OI_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch0oi ( & self ) -> CH0OI_R { CH0OI_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch1oi ( & self ) -> CH1OI_R { CH1OI_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch2oi ( & self ) -> CH2OI_R { CH2OI_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch3oi ( & self ) -> CH3OI_R { CH3OI_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch4oi ( & self ) -> CH4OI_R { CH4OI_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch5oi ( & self ) -> CH5OI_R { CH5OI_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch6oi ( & self ) -> CH6OI_R { CH6OI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch7oi ( & self ) -> CH7OI_R { CH7OI_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch0oi ( & mut self ) -> CH0OI_W { CH0OI_W { w : self } } # [ doc = "Bit 1 - Channel 1 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch1oi ( & mut self ) -> CH1OI_W { CH1OI_W { w : self } } # [ doc = "Bit 2 - Channel 2 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch2oi ( & mut self ) -> CH2OI_W { CH2OI_W { w : self } } # [ doc = "Bit 3 - Channel 3 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch3oi ( & mut self ) -> CH3OI_W { CH3OI_W { w : self } } # [ doc = "Bit 4 - Channel 4 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch4oi ( & mut self ) -> CH4OI_W { CH4OI_W { w : self } } # [ doc = "Bit 5 - Channel 5 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch5oi ( & mut self ) -> CH5OI_W { CH5OI_W { w : self } } # [ doc = "Bit 6 - Channel 6 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch6oi ( & mut self ) -> CH6OI_W { CH6OI_W { w : self } } # [ doc = "Bit 7 - Channel 7 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch7oi ( & mut self ) -> CH7OI_W { CH7OI_W { w : self } } } } # [ doc = "Output Mask\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [outmask](outmask) module" ] pub type OUTMASK = crate :: Reg < u32 , _OUTMASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OUTMASK ; # [ doc = "`read()` method returns [outmask::R](outmask::R) reader structure" ] impl crate :: Readable for OUTMASK { } # [ doc = "`write(|w| ..)` method takes [outmask::W](outmask::W) writer structure" ] impl crate :: Writable for OUTMASK { } # [ doc = "Output Mask" ] pub mod outmask { # [ doc = "Reader of register OUTMASK" ] pub type R = crate :: R < u32 , super :: OUTMASK > ; # [ doc = "Writer for register OUTMASK" ] pub type W = crate :: W < u32 , super :: OUTMASK > ; # [ doc = "Register OUTMASK `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OUTMASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH0OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OM_A ) -> Self { match variant { CH0OM_A :: _0 => false , CH0OM_A :: _1 => true } } } # [ doc = "Reader of field `CH0OM`" ] pub type CH0OM_R = crate :: R < bool , CH0OM_A > ; impl CH0OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OM_A { match self . bits { false => CH0OM_A :: _0 , true => CH0OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OM_A :: _1 } } # [ doc = "Write proxy for field `CH0OM`" ] pub struct CH0OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OM_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH1OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OM_A ) -> Self { match variant { CH1OM_A :: _0 => false , CH1OM_A :: _1 => true } } } # [ doc = "Reader of field `CH1OM`" ] pub type CH1OM_R = crate :: R < bool , CH1OM_A > ; impl CH1OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OM_A { match self . bits { false => CH1OM_A :: _0 , true => CH1OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OM_A :: _1 } } # [ doc = "Write proxy for field `CH1OM`" ] pub struct CH1OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OM_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH2OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OM_A ) -> Self { match variant { CH2OM_A :: _0 => false , CH2OM_A :: _1 => true } } } # [ doc = "Reader of field `CH2OM`" ] pub type CH2OM_R = crate :: R < bool , CH2OM_A > ; impl CH2OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OM_A { match self . bits { false => CH2OM_A :: _0 , true => CH2OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OM_A :: _1 } } # [ doc = "Write proxy for field `CH2OM`" ] pub struct CH2OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OM_A :: _1 ) } # [ 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 = "Channel 3 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH3OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OM_A ) -> Self { match variant { CH3OM_A :: _0 => false , CH3OM_A :: _1 => true } } } # [ doc = "Reader of field `CH3OM`" ] pub type CH3OM_R = crate :: R < bool , CH3OM_A > ; impl CH3OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OM_A { match self . bits { false => CH3OM_A :: _0 , true => CH3OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OM_A :: _1 } } # [ doc = "Write proxy for field `CH3OM`" ] pub struct CH3OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH4OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OM_A ) -> Self { match variant { CH4OM_A :: _0 => false , CH4OM_A :: _1 => true } } } # [ doc = "Reader of field `CH4OM`" ] pub type CH4OM_R = crate :: R < bool , CH4OM_A > ; impl CH4OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OM_A { match self . bits { false => CH4OM_A :: _0 , true => CH4OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OM_A :: _1 } } # [ doc = "Write proxy for field `CH4OM`" ] pub struct CH4OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OM_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH5OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OM_A ) -> Self { match variant { CH5OM_A :: _0 => false , CH5OM_A :: _1 => true } } } # [ doc = "Reader of field `CH5OM`" ] pub type CH5OM_R = crate :: R < bool , CH5OM_A > ; impl CH5OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OM_A { match self . bits { false => CH5OM_A :: _0 , true => CH5OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OM_A :: _1 } } # [ doc = "Write proxy for field `CH5OM`" ] pub struct CH5OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OM_A :: _1 ) } # [ 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 = "Channel 6 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH6OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OM_A ) -> Self { match variant { CH6OM_A :: _0 => false , CH6OM_A :: _1 => true } } } # [ doc = "Reader of field `CH6OM`" ] pub type CH6OM_R = crate :: R < bool , CH6OM_A > ; impl CH6OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OM_A { match self . bits { false => CH6OM_A :: _0 , true => CH6OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OM_A :: _1 } } # [ doc = "Write proxy for field `CH6OM`" ] pub struct CH6OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OM_A :: _1 ) } # [ 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 = "Channel 7 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH7OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OM_A ) -> Self { match variant { CH7OM_A :: _0 => false , CH7OM_A :: _1 => true } } } # [ doc = "Reader of field `CH7OM`" ] pub type CH7OM_R = crate :: R < bool , CH7OM_A > ; impl CH7OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OM_A { match self . bits { false => CH7OM_A :: _0 , true => CH7OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OM_A :: _1 } } # [ doc = "Write proxy for field `CH7OM`" ] pub struct CH7OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OM_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Output Mask" ] # [ inline ( always ) ] pub fn ch0om ( & self ) -> CH0OM_R { CH0OM_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Output Mask" ] # [ inline ( always ) ] pub fn ch1om ( & self ) -> CH1OM_R { CH1OM_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Output Mask" ] # [ inline ( always ) ] pub fn ch2om ( & self ) -> CH2OM_R { CH2OM_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Output Mask" ] # [ inline ( always ) ] pub fn ch3om ( & self ) -> CH3OM_R { CH3OM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Output Mask" ] # [ inline ( always ) ] pub fn ch4om ( & self ) -> CH4OM_R { CH4OM_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Output Mask" ] # [ inline ( always ) ] pub fn ch5om ( & self ) -> CH5OM_R { CH5OM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Output Mask" ] # [ inline ( always ) ] pub fn ch6om ( & self ) -> CH6OM_R { CH6OM_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Output Mask" ] # [ inline ( always ) ] pub fn ch7om ( & self ) -> CH7OM_R { CH7OM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Output Mask" ] # [ inline ( always ) ] pub fn ch0om ( & mut self ) -> CH0OM_W { CH0OM_W { w : self } } # [ doc = "Bit 1 - Channel 1 Output Mask" ] # [ inline ( always ) ] pub fn ch1om ( & mut self ) -> CH1OM_W { CH1OM_W { w : self } } # [ doc = "Bit 2 - Channel 2 Output Mask" ] # [ inline ( always ) ] pub fn ch2om ( & mut self ) -> CH2OM_W { CH2OM_W { w : self } } # [ doc = "Bit 3 - Channel 3 Output Mask" ] # [ inline ( always ) ] pub fn ch3om ( & mut self ) -> CH3OM_W { CH3OM_W { w : self } } # [ doc = "Bit 4 - Channel 4 Output Mask" ] # [ inline ( always ) ] pub fn ch4om ( & mut self ) -> CH4OM_W { CH4OM_W { w : self } } # [ doc = "Bit 5 - Channel 5 Output Mask" ] # [ inline ( always ) ] pub fn ch5om ( & mut self ) -> CH5OM_W { CH5OM_W { w : self } } # [ doc = "Bit 6 - Channel 6 Output Mask" ] # [ inline ( always ) ] pub fn ch6om ( & mut self ) -> CH6OM_W { CH6OM_W { w : self } } # [ doc = "Bit 7 - Channel 7 Output Mask" ] # [ inline ( always ) ] pub fn ch7om ( & mut self ) -> CH7OM_W { CH7OM_W { w : self } } } } # [ doc = "Function For Linked Channels\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [combine](combine) module" ] pub type COMBINE = crate :: Reg < u32 , _COMBINE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _COMBINE ; # [ doc = "`read()` method returns [combine::R](combine::R) reader structure" ] impl crate :: Readable for COMBINE { } # [ doc = "`write(|w| ..)` method takes [combine::W](combine::W) writer structure" ] impl crate :: Writable for COMBINE { } # [ doc = "Function For Linked Channels" ] pub mod combine { # [ doc = "Reader of register COMBINE" ] pub type R = crate :: R < u32 , super :: COMBINE > ; # [ doc = "Writer for register COMBINE" ] pub type W = crate :: W < u32 , super :: COMBINE > ; # [ doc = "Register COMBINE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: COMBINE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Combine Channels For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE0_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE0_A ) -> Self { match variant { COMBINE0_A :: _0 => false , COMBINE0_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE0`" ] pub type COMBINE0_R = crate :: R < bool , COMBINE0_A > ; impl COMBINE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE0_A { match self . bits { false => COMBINE0_A :: _0 , true => COMBINE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE0_A :: _1 } } # [ doc = "Write proxy for field `COMBINE0`" ] pub struct COMBINE0_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP0_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP0_A ) -> Self { match variant { COMP0_A :: _0 => false , COMP0_A :: _1 => true } } } # [ doc = "Reader of field `COMP0`" ] pub type COMP0_R = crate :: R < bool , COMP0_A > ; impl COMP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP0_A { match self . bits { false => COMP0_A :: _0 , true => COMP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP0_A :: _1 } } # [ doc = "Write proxy for field `COMP0`" ] pub struct COMP0_W < 'a > { w : & 'a mut W , } impl < 'a > COMP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP0_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP0_A :: _1 ) } # [ 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 } } # [ doc = "Dual Edge Capture Mode Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN0_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN0_A ) -> Self { match variant { DECAPEN0_A :: _0 => false , DECAPEN0_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN0`" ] pub type DECAPEN0_R = crate :: R < bool , DECAPEN0_A > ; impl DECAPEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN0_A { match self . bits { false => DECAPEN0_A :: _0 , true => DECAPEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN0_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN0`" ] pub struct DECAPEN0_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN0_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN0_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Captures For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP0_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP0_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP0_A ) -> Self { match variant { DECAP0_A :: _0 => false , DECAP0_A :: _1 => true } } } # [ doc = "Reader of field `DECAP0`" ] pub type DECAP0_R = crate :: R < bool , DECAP0_A > ; impl DECAP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP0_A { match self . bits { false => DECAP0_A :: _0 , true => DECAP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP0_A :: _1 } } # [ doc = "Write proxy for field `DECAP0`" ] pub struct DECAP0_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP0_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP0_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Deadtime Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN0_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN0_A ) -> Self { match variant { DTEN0_A :: _0 => false , DTEN0_A :: _1 => true } } } # [ doc = "Reader of field `DTEN0`" ] pub type DTEN0_R = crate :: R < bool , DTEN0_A > ; impl DTEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN0_A { match self . bits { false => DTEN0_A :: _0 , true => DTEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN0_A :: _1 } } # [ doc = "Write proxy for field `DTEN0`" ] pub struct DTEN0_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN0_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Synchronization Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN0_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN0_A ) -> Self { match variant { SYNCEN0_A :: _0 => false , SYNCEN0_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN0`" ] pub type SYNCEN0_R = crate :: R < bool , SYNCEN0_A > ; impl SYNCEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN0_A { match self . bits { false => SYNCEN0_A :: _0 , true => SYNCEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN0_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN0`" ] pub struct SYNCEN0_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN0_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN0_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN0_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN0_A ) -> Self { match variant { FAULTEN0_A :: _0 => false , FAULTEN0_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN0`" ] pub type FAULTEN0_R = crate :: R < bool , FAULTEN0_A > ; impl FAULTEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN0_A { match self . bits { false => FAULTEN0_A :: _0 , true => FAULTEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN0_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN0`" ] pub struct FAULTEN0_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN0_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN0_A :: _1 ) } # [ 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 = "Combine Channels For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE1_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE1_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE1_A ) -> Self { match variant { COMBINE1_A :: _0 => false , COMBINE1_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE1`" ] pub type COMBINE1_R = crate :: R < bool , COMBINE1_A > ; impl COMBINE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE1_A { match self . bits { false => COMBINE1_A :: _0 , true => COMBINE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE1_A :: _1 } } # [ doc = "Write proxy for field `COMBINE1`" ] pub struct COMBINE1_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE1_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE1_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP1_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP1_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP1_A ) -> Self { match variant { COMP1_A :: _0 => false , COMP1_A :: _1 => true } } } # [ doc = "Reader of field `COMP1`" ] pub type COMP1_R = crate :: R < bool , COMP1_A > ; impl COMP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP1_A { match self . bits { false => COMP1_A :: _0 , true => COMP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP1_A :: _1 } } # [ doc = "Write proxy for field `COMP1`" ] pub struct COMP1_W < 'a > { w : & 'a mut W , } impl < 'a > COMP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP1_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP1_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN1_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN1_A ) -> Self { match variant { DECAPEN1_A :: _0 => false , DECAPEN1_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN1`" ] pub type DECAPEN1_R = crate :: R < bool , DECAPEN1_A > ; impl DECAPEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN1_A { match self . bits { false => DECAPEN1_A :: _0 , true => DECAPEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN1_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN1`" ] pub struct DECAPEN1_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN1_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN1_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Captures For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP1_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP1_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP1_A ) -> Self { match variant { DECAP1_A :: _0 => false , DECAP1_A :: _1 => true } } } # [ doc = "Reader of field `DECAP1`" ] pub type DECAP1_R = crate :: R < bool , DECAP1_A > ; impl DECAP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP1_A { match self . bits { false => DECAP1_A :: _0 , true => DECAP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP1_A :: _1 } } # [ doc = "Write proxy for field `DECAP1`" ] pub struct DECAP1_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP1_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP1_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Deadtime Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN1_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN1_A ) -> Self { match variant { DTEN1_A :: _0 => false , DTEN1_A :: _1 => true } } } # [ doc = "Reader of field `DTEN1`" ] pub type DTEN1_R = crate :: R < bool , DTEN1_A > ; impl DTEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN1_A { match self . bits { false => DTEN1_A :: _0 , true => DTEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN1_A :: _1 } } # [ doc = "Write proxy for field `DTEN1`" ] pub struct DTEN1_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN1_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN1_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Synchronization Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN1_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN1_A ) -> Self { match variant { SYNCEN1_A :: _0 => false , SYNCEN1_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN1`" ] pub type SYNCEN1_R = crate :: R < bool , SYNCEN1_A > ; impl SYNCEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN1_A { match self . bits { false => SYNCEN1_A :: _0 , true => SYNCEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN1_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN1`" ] pub struct SYNCEN1_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN1_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN1_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN1_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN1_A ) -> Self { match variant { FAULTEN1_A :: _0 => false , FAULTEN1_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN1`" ] pub type FAULTEN1_R = crate :: R < bool , FAULTEN1_A > ; impl FAULTEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN1_A { match self . bits { false => FAULTEN1_A :: _0 , true => FAULTEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN1_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN1`" ] pub struct FAULTEN1_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN1_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN1_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Combine Channels For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE2_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE2_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE2_A ) -> Self { match variant { COMBINE2_A :: _0 => false , COMBINE2_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE2`" ] pub type COMBINE2_R = crate :: R < bool , COMBINE2_A > ; impl COMBINE2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE2_A { match self . bits { false => COMBINE2_A :: _0 , true => COMBINE2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE2_A :: _1 } } # [ doc = "Write proxy for field `COMBINE2`" ] pub struct COMBINE2_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE2_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE2_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP2_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP2_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP2_A ) -> Self { match variant { COMP2_A :: _0 => false , COMP2_A :: _1 => true } } } # [ doc = "Reader of field `COMP2`" ] pub type COMP2_R = crate :: R < bool , COMP2_A > ; impl COMP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP2_A { match self . bits { false => COMP2_A :: _0 , true => COMP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP2_A :: _1 } } # [ doc = "Write proxy for field `COMP2`" ] pub struct COMP2_W < 'a > { w : & 'a mut W , } impl < 'a > COMP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP2_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP2_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN2_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN2_A ) -> Self { match variant { DECAPEN2_A :: _0 => false , DECAPEN2_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN2`" ] pub type DECAPEN2_R = crate :: R < bool , DECAPEN2_A > ; impl DECAPEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN2_A { match self . bits { false => DECAPEN2_A :: _0 , true => DECAPEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN2_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN2`" ] pub struct DECAPEN2_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN2_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Captures For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP2_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP2_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP2_A ) -> Self { match variant { DECAP2_A :: _0 => false , DECAP2_A :: _1 => true } } } # [ doc = "Reader of field `DECAP2`" ] pub type DECAP2_R = crate :: R < bool , DECAP2_A > ; impl DECAP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP2_A { match self . bits { false => DECAP2_A :: _0 , true => DECAP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP2_A :: _1 } } # [ doc = "Write proxy for field `DECAP2`" ] pub struct DECAP2_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP2_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP2_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Deadtime Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN2_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN2_A ) -> Self { match variant { DTEN2_A :: _0 => false , DTEN2_A :: _1 => true } } } # [ doc = "Reader of field `DTEN2`" ] pub type DTEN2_R = crate :: R < bool , DTEN2_A > ; impl DTEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN2_A { match self . bits { false => DTEN2_A :: _0 , true => DTEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN2_A :: _1 } } # [ doc = "Write proxy for field `DTEN2`" ] pub struct DTEN2_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN2_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN2_A :: _1 ) } # [ 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 = "Synchronization Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN2_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN2_A ) -> Self { match variant { SYNCEN2_A :: _0 => false , SYNCEN2_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN2`" ] pub type SYNCEN2_R = crate :: R < bool , SYNCEN2_A > ; impl SYNCEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN2_A { match self . bits { false => SYNCEN2_A :: _0 , true => SYNCEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN2_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN2`" ] pub struct SYNCEN2_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN2_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN2_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN2_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN2_A ) -> Self { match variant { FAULTEN2_A :: _0 => false , FAULTEN2_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN2`" ] pub type FAULTEN2_R = crate :: R < bool , FAULTEN2_A > ; impl FAULTEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN2_A { match self . bits { false => FAULTEN2_A :: _0 , true => FAULTEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN2_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN2`" ] pub struct FAULTEN2_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN2_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Combine Channels For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE3_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE3_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE3_A ) -> Self { match variant { COMBINE3_A :: _0 => false , COMBINE3_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE3`" ] pub type COMBINE3_R = crate :: R < bool , COMBINE3_A > ; impl COMBINE3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE3_A { match self . bits { false => COMBINE3_A :: _0 , true => COMBINE3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE3_A :: _1 } } # [ doc = "Write proxy for field `COMBINE3`" ] pub struct COMBINE3_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE3_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE3_A :: _1 ) } # [ 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 = "Complement Of Channel (n) for n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP3_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP3_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP3_A ) -> Self { match variant { COMP3_A :: _0 => false , COMP3_A :: _1 => true } } } # [ doc = "Reader of field `COMP3`" ] pub type COMP3_R = crate :: R < bool , COMP3_A > ; impl COMP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP3_A { match self . bits { false => COMP3_A :: _0 , true => COMP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP3_A :: _1 } } # [ doc = "Write proxy for field `COMP3`" ] pub struct COMP3_W < 'a > { w : & 'a mut W , } impl < 'a > COMP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP3_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP3_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN3_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN3_A ) -> Self { match variant { DECAPEN3_A :: _0 => false , DECAPEN3_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN3`" ] pub type DECAPEN3_R = crate :: R < bool , DECAPEN3_A > ; impl DECAPEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN3_A { match self . bits { false => DECAPEN3_A :: _0 , true => DECAPEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN3_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN3`" ] pub struct DECAPEN3_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN3_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN3_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Captures For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP3_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP3_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP3_A ) -> Self { match variant { DECAP3_A :: _0 => false , DECAP3_A :: _1 => true } } } # [ doc = "Reader of field `DECAP3`" ] pub type DECAP3_R = crate :: R < bool , DECAP3_A > ; impl DECAP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP3_A { match self . bits { false => DECAP3_A :: _0 , true => DECAP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP3_A :: _1 } } # [ doc = "Write proxy for field `DECAP3`" ] pub struct DECAP3_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP3_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP3_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Deadtime Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN3_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN3_A ) -> Self { match variant { DTEN3_A :: _0 => false , DTEN3_A :: _1 => true } } } # [ doc = "Reader of field `DTEN3`" ] pub type DTEN3_R = crate :: R < bool , DTEN3_A > ; impl DTEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN3_A { match self . bits { false => DTEN3_A :: _0 , true => DTEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN3_A :: _1 } } # [ doc = "Write proxy for field `DTEN3`" ] pub struct DTEN3_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN3_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN3_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Synchronization Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN3_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN3_A ) -> Self { match variant { SYNCEN3_A :: _0 => false , SYNCEN3_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN3`" ] pub type SYNCEN3_R = crate :: R < bool , SYNCEN3_A > ; impl SYNCEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN3_A { match self . bits { false => SYNCEN3_A :: _0 , true => SYNCEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN3_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN3`" ] pub struct SYNCEN3_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN3_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN3_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Fault Control Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN3_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN3_A ) -> Self { match variant { FAULTEN3_A :: _0 => false , FAULTEN3_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN3`" ] pub type FAULTEN3_R = crate :: R < bool , FAULTEN3_A > ; impl FAULTEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN3_A { match self . bits { false => FAULTEN3_A :: _0 , true => FAULTEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN3_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN3`" ] pub struct FAULTEN3_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN3_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN3_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Combine Channels For n = 0" ] # [ inline ( always ) ] pub fn combine0 ( & self ) -> COMBINE0_R { COMBINE0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Complement Of Channel (n) For n = 0" ] # [ inline ( always ) ] pub fn comp0 ( & self ) -> COMP0_R { COMP0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Dual Edge Capture Mode Enable For n = 0" ] # [ inline ( always ) ] pub fn decapen0 ( & self ) -> DECAPEN0_R { DECAPEN0_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Dual Edge Capture Mode Captures For n = 0" ] # [ inline ( always ) ] pub fn decap0 ( & self ) -> DECAP0_R { DECAP0_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Deadtime Enable For n = 0" ] # [ inline ( always ) ] pub fn dten0 ( & self ) -> DTEN0_R { DTEN0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Synchronization Enable For n = 0" ] # [ inline ( always ) ] pub fn syncen0 ( & self ) -> SYNCEN0_R { SYNCEN0_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Fault Control Enable For n = 0" ] # [ inline ( always ) ] pub fn faulten0 ( & self ) -> FAULTEN0_R { FAULTEN0_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Combine Channels For n = 2" ] # [ inline ( always ) ] pub fn combine1 ( & self ) -> COMBINE1_R { COMBINE1_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Complement Of Channel (n) For n = 2" ] # [ inline ( always ) ] pub fn comp1 ( & self ) -> COMP1_R { COMP1_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Dual Edge Capture Mode Enable For n = 2" ] # [ inline ( always ) ] pub fn decapen1 ( & self ) -> DECAPEN1_R { DECAPEN1_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Dual Edge Capture Mode Captures For n = 2" ] # [ inline ( always ) ] pub fn decap1 ( & self ) -> DECAP1_R { DECAP1_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Deadtime Enable For n = 2" ] # [ inline ( always ) ] pub fn dten1 ( & self ) -> DTEN1_R { DTEN1_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Synchronization Enable For n = 2" ] # [ inline ( always ) ] pub fn syncen1 ( & self ) -> SYNCEN1_R { SYNCEN1_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Fault Control Enable For n = 2" ] # [ inline ( always ) ] pub fn faulten1 ( & self ) -> FAULTEN1_R { FAULTEN1_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Combine Channels For n = 4" ] # [ inline ( always ) ] pub fn combine2 ( & self ) -> COMBINE2_R { COMBINE2_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Complement Of Channel (n) For n = 4" ] # [ inline ( always ) ] pub fn comp2 ( & self ) -> COMP2_R { COMP2_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Dual Edge Capture Mode Enable For n = 4" ] # [ inline ( always ) ] pub fn decapen2 ( & self ) -> DECAPEN2_R { DECAPEN2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Dual Edge Capture Mode Captures For n = 4" ] # [ inline ( always ) ] pub fn decap2 ( & self ) -> DECAP2_R { DECAP2_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Deadtime Enable For n = 4" ] # [ inline ( always ) ] pub fn dten2 ( & self ) -> DTEN2_R { DTEN2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Synchronization Enable For n = 4" ] # [ inline ( always ) ] pub fn syncen2 ( & self ) -> SYNCEN2_R { SYNCEN2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Fault Control Enable For n = 4" ] # [ inline ( always ) ] pub fn faulten2 ( & self ) -> FAULTEN2_R { FAULTEN2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Combine Channels For n = 6" ] # [ inline ( always ) ] pub fn combine3 ( & self ) -> COMBINE3_R { COMBINE3_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Complement Of Channel (n) for n = 6" ] # [ inline ( always ) ] pub fn comp3 ( & self ) -> COMP3_R { COMP3_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Dual Edge Capture Mode Enable For n = 6" ] # [ inline ( always ) ] pub fn decapen3 ( & self ) -> DECAPEN3_R { DECAPEN3_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Dual Edge Capture Mode Captures For n = 6" ] # [ inline ( always ) ] pub fn decap3 ( & self ) -> DECAP3_R { DECAP3_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Deadtime Enable For n = 6" ] # [ inline ( always ) ] pub fn dten3 ( & self ) -> DTEN3_R { DTEN3_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Synchronization Enable For n = 6" ] # [ inline ( always ) ] pub fn syncen3 ( & self ) -> SYNCEN3_R { SYNCEN3_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Fault Control Enable For n = 6" ] # [ inline ( always ) ] pub fn faulten3 ( & self ) -> FAULTEN3_R { FAULTEN3_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Combine Channels For n = 0" ] # [ inline ( always ) ] pub fn combine0 ( & mut self ) -> COMBINE0_W { COMBINE0_W { w : self } } # [ doc = "Bit 1 - Complement Of Channel (n) For n = 0" ] # [ inline ( always ) ] pub fn comp0 ( & mut self ) -> COMP0_W { COMP0_W { w : self } } # [ doc = "Bit 2 - Dual Edge Capture Mode Enable For n = 0" ] # [ inline ( always ) ] pub fn decapen0 ( & mut self ) -> DECAPEN0_W { DECAPEN0_W { w : self } } # [ doc = "Bit 3 - Dual Edge Capture Mode Captures For n = 0" ] # [ inline ( always ) ] pub fn decap0 ( & mut self ) -> DECAP0_W { DECAP0_W { w : self } } # [ doc = "Bit 4 - Deadtime Enable For n = 0" ] # [ inline ( always ) ] pub fn dten0 ( & mut self ) -> DTEN0_W { DTEN0_W { w : self } } # [ doc = "Bit 5 - Synchronization Enable For n = 0" ] # [ inline ( always ) ] pub fn syncen0 ( & mut self ) -> SYNCEN0_W { SYNCEN0_W { w : self } } # [ doc = "Bit 6 - Fault Control Enable For n = 0" ] # [ inline ( always ) ] pub fn faulten0 ( & mut self ) -> FAULTEN0_W { FAULTEN0_W { w : self } } # [ doc = "Bit 8 - Combine Channels For n = 2" ] # [ inline ( always ) ] pub fn combine1 ( & mut self ) -> COMBINE1_W { COMBINE1_W { w : self } } # [ doc = "Bit 9 - Complement Of Channel (n) For n = 2" ] # [ inline ( always ) ] pub fn comp1 ( & mut self ) -> COMP1_W { COMP1_W { w : self } } # [ doc = "Bit 10 - Dual Edge Capture Mode Enable For n = 2" ] # [ inline ( always ) ] pub fn decapen1 ( & mut self ) -> DECAPEN1_W { DECAPEN1_W { w : self } } # [ doc = "Bit 11 - Dual Edge Capture Mode Captures For n = 2" ] # [ inline ( always ) ] pub fn decap1 ( & mut self ) -> DECAP1_W { DECAP1_W { w : self } } # [ doc = "Bit 12 - Deadtime Enable For n = 2" ] # [ inline ( always ) ] pub fn dten1 ( & mut self ) -> DTEN1_W { DTEN1_W { w : self } } # [ doc = "Bit 13 - Synchronization Enable For n = 2" ] # [ inline ( always ) ] pub fn syncen1 ( & mut self ) -> SYNCEN1_W { SYNCEN1_W { w : self } } # [ doc = "Bit 14 - Fault Control Enable For n = 2" ] # [ inline ( always ) ] pub fn faulten1 ( & mut self ) -> FAULTEN1_W { FAULTEN1_W { w : self } } # [ doc = "Bit 16 - Combine Channels For n = 4" ] # [ inline ( always ) ] pub fn combine2 ( & mut self ) -> COMBINE2_W { COMBINE2_W { w : self } } # [ doc = "Bit 17 - Complement Of Channel (n) For n = 4" ] # [ inline ( always ) ] pub fn comp2 ( & mut self ) -> COMP2_W { COMP2_W { w : self } } # [ doc = "Bit 18 - Dual Edge Capture Mode Enable For n = 4" ] # [ inline ( always ) ] pub fn decapen2 ( & mut self ) -> DECAPEN2_W { DECAPEN2_W { w : self } } # [ doc = "Bit 19 - Dual Edge Capture Mode Captures For n = 4" ] # [ inline ( always ) ] pub fn decap2 ( & mut self ) -> DECAP2_W { DECAP2_W { w : self } } # [ doc = "Bit 20 - Deadtime Enable For n = 4" ] # [ inline ( always ) ] pub fn dten2 ( & mut self ) -> DTEN2_W { DTEN2_W { w : self } } # [ doc = "Bit 21 - Synchronization Enable For n = 4" ] # [ inline ( always ) ] pub fn syncen2 ( & mut self ) -> SYNCEN2_W { SYNCEN2_W { w : self } } # [ doc = "Bit 22 - Fault Control Enable For n = 4" ] # [ inline ( always ) ] pub fn faulten2 ( & mut self ) -> FAULTEN2_W { FAULTEN2_W { w : self } } # [ doc = "Bit 24 - Combine Channels For n = 6" ] # [ inline ( always ) ] pub fn combine3 ( & mut self ) -> COMBINE3_W { COMBINE3_W { w : self } } # [ doc = "Bit 25 - Complement Of Channel (n) for n = 6" ] # [ inline ( always ) ] pub fn comp3 ( & mut self ) -> COMP3_W { COMP3_W { w : self } } # [ doc = "Bit 26 - Dual Edge Capture Mode Enable For n = 6" ] # [ inline ( always ) ] pub fn decapen3 ( & mut self ) -> DECAPEN3_W { DECAPEN3_W { w : self } } # [ doc = "Bit 27 - Dual Edge Capture Mode Captures For n = 6" ] # [ inline ( always ) ] pub fn decap3 ( & mut self ) -> DECAP3_W { DECAP3_W { w : self } } # [ doc = "Bit 28 - Deadtime Enable For n = 6" ] # [ inline ( always ) ] pub fn dten3 ( & mut self ) -> DTEN3_W { DTEN3_W { w : self } } # [ doc = "Bit 29 - Synchronization Enable For n = 6" ] # [ inline ( always ) ] pub fn syncen3 ( & mut self ) -> SYNCEN3_W { SYNCEN3_W { w : self } } # [ doc = "Bit 30 - Fault Control Enable For n = 6" ] # [ inline ( always ) ] pub fn faulten3 ( & mut self ) -> FAULTEN3_W { FAULTEN3_W { w : self } } } } # [ doc = "Deadtime Insertion Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [deadtime](deadtime) module" ] pub type DEADTIME = crate :: Reg < u32 , _DEADTIME > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEADTIME ; # [ doc = "`read()` method returns [deadtime::R](deadtime::R) reader structure" ] impl crate :: Readable for DEADTIME { } # [ doc = "`write(|w| ..)` method takes [deadtime::W](deadtime::W) writer structure" ] impl crate :: Writable for DEADTIME { } # [ doc = "Deadtime Insertion Control" ] pub mod deadtime { # [ doc = "Reader of register DEADTIME" ] pub type R = crate :: R < u32 , super :: DEADTIME > ; # [ doc = "Writer for register DEADTIME" ] pub type W = crate :: W < u32 , super :: DEADTIME > ; # [ doc = "Register DEADTIME `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DEADTIME { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DTVAL`" ] pub type DTVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DTVAL`" ] pub struct DTVAL_W < 'a > { w : & 'a mut W , } impl < 'a > DTVAL_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } # [ doc = "Deadtime Prescaler Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTPS_A { # [ doc = "2: Divide the system clock by 4." ] _10 , # [ doc = "3: Divide the system clock by 16." ] _11 } impl From < DTPS_A > for u8 { # [ inline ( always ) ] fn from ( variant : DTPS_A ) -> Self { match variant { DTPS_A :: _10 => 2 , DTPS_A :: _11 => 3 } } } # [ doc = "Reader of field `DTPS`" ] pub type DTPS_R = crate :: R < u8 , DTPS_A > ; impl DTPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DTPS_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( DTPS_A :: _10 ) , 3 => Val ( DTPS_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DTPS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DTPS_A :: _11 } } # [ doc = "Write proxy for field `DTPS`" ] pub struct DTPS_W < 'a > { w : & 'a mut W , } impl < 'a > DTPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTPS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Divide the system clock by 4." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DTPS_A :: _10 ) } # [ doc = "Divide the system clock by 16." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DTPS_A :: _11 ) } # [ 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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Deadtime Value" ] # [ inline ( always ) ] pub fn dtval ( & self ) -> DTVAL_R { DTVAL_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 6:7 - Deadtime Prescaler Value" ] # [ inline ( always ) ] pub fn dtps ( & self ) -> DTPS_R { DTPS_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Deadtime Value" ] # [ inline ( always ) ] pub fn dtval ( & mut self ) -> DTVAL_W { DTVAL_W { w : self } } # [ doc = "Bits 6:7 - Deadtime Prescaler Value" ] # [ inline ( always ) ] pub fn dtps ( & mut self ) -> DTPS_W { DTPS_W { w : self } } } } # [ doc = "FTM External Trigger\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [exttrig](exttrig) module" ] pub type EXTTRIG = crate :: Reg < u32 , _EXTTRIG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EXTTRIG ; # [ doc = "`read()` method returns [exttrig::R](exttrig::R) reader structure" ] impl crate :: Readable for EXTTRIG { } # [ doc = "`write(|w| ..)` method takes [exttrig::W](exttrig::W) writer structure" ] impl crate :: Writable for EXTTRIG { } # [ doc = "FTM External Trigger" ] pub mod exttrig { # [ doc = "Reader of register EXTTRIG" ] pub type R = crate :: R < u32 , super :: EXTTRIG > ; # [ doc = "Writer for register EXTTRIG" ] pub type W = crate :: W < u32 , super :: EXTTRIG > ; # [ doc = "Register EXTTRIG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EXTTRIG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 2 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH2TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2TRIG_A ) -> Self { match variant { CH2TRIG_A :: _0 => false , CH2TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH2TRIG`" ] pub type CH2TRIG_R = crate :: R < bool , CH2TRIG_A > ; impl CH2TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2TRIG_A { match self . bits { false => CH2TRIG_A :: _0 , true => CH2TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH2TRIG`" ] pub struct CH2TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH2TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2TRIG_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 3 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH3TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3TRIG_A ) -> Self { match variant { CH3TRIG_A :: _0 => false , CH3TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH3TRIG`" ] pub type CH3TRIG_R = crate :: R < bool , CH3TRIG_A > ; impl CH3TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3TRIG_A { match self . bits { false => CH3TRIG_A :: _0 , true => CH3TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH3TRIG`" ] pub struct CH3TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH3TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3TRIG_A :: _1 ) } # [ 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 } } # [ doc = "Channel 4 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH4TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4TRIG_A ) -> Self { match variant { CH4TRIG_A :: _0 => false , CH4TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH4TRIG`" ] pub type CH4TRIG_R = crate :: R < bool , CH4TRIG_A > ; impl CH4TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4TRIG_A { match self . bits { false => CH4TRIG_A :: _0 , true => CH4TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH4TRIG`" ] pub struct CH4TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH4TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4TRIG_A :: _1 ) } # [ 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 = "Channel 5 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH5TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5TRIG_A ) -> Self { match variant { CH5TRIG_A :: _0 => false , CH5TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH5TRIG`" ] pub type CH5TRIG_R = crate :: R < bool , CH5TRIG_A > ; impl CH5TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5TRIG_A { match self . bits { false => CH5TRIG_A :: _0 , true => CH5TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH5TRIG`" ] pub struct CH5TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH5TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5TRIG_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 0 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH0TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0TRIG_A ) -> Self { match variant { CH0TRIG_A :: _0 => false , CH0TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH0TRIG`" ] pub type CH0TRIG_R = crate :: R < bool , CH0TRIG_A > ; impl CH0TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0TRIG_A { match self . bits { false => CH0TRIG_A :: _0 , true => CH0TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH0TRIG`" ] pub struct CH0TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH0TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0TRIG_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 1 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH1TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1TRIG_A ) -> Self { match variant { CH1TRIG_A :: _0 => false , CH1TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH1TRIG`" ] pub type CH1TRIG_R = crate :: R < bool , CH1TRIG_A > ; impl CH1TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1TRIG_A { match self . bits { false => CH1TRIG_A :: _0 , true => CH1TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH1TRIG`" ] pub struct CH1TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH1TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1TRIG_A :: _1 ) } # [ 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 = "Initialization Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INITTRIGEN_A { # [ doc = "0: The generation of initialization trigger is disabled." ] _0 , # [ doc = "1: The generation of initialization trigger is enabled." ] _1 } impl From < INITTRIGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : INITTRIGEN_A ) -> Self { match variant { INITTRIGEN_A :: _0 => false , INITTRIGEN_A :: _1 => true } } } # [ doc = "Reader of field `INITTRIGEN`" ] pub type INITTRIGEN_R = crate :: R < bool , INITTRIGEN_A > ; impl INITTRIGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INITTRIGEN_A { match self . bits { false => INITTRIGEN_A :: _0 , true => INITTRIGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INITTRIGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INITTRIGEN_A :: _1 } } # [ doc = "Write proxy for field `INITTRIGEN`" ] pub struct INITTRIGEN_W < 'a > { w : & 'a mut W , } impl < 'a > INITTRIGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INITTRIGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of initialization trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INITTRIGEN_A :: _0 ) } # [ doc = "The generation of initialization trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INITTRIGEN_A :: _1 ) } # [ 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 = "Channel Trigger Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGF_A { # [ doc = "0: No channel trigger was generated." ] _0 , # [ doc = "1: A channel trigger was generated." ] _1 } impl From < TRIGF_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIGF_A ) -> Self { match variant { TRIGF_A :: _0 => false , TRIGF_A :: _1 => true } } } # [ doc = "Reader of field `TRIGF`" ] pub type TRIGF_R = crate :: R < bool , TRIGF_A > ; impl TRIGF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIGF_A { match self . bits { false => TRIGF_A :: _0 , true => TRIGF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIGF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIGF_A :: _1 } } # [ doc = "Write proxy for field `TRIGF`" ] pub struct TRIGF_W < 'a > { w : & 'a mut W , } impl < 'a > TRIGF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIGF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel trigger was generated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIGF_A :: _0 ) } # [ doc = "A channel trigger was generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIGF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 2 Trigger Enable" ] # [ inline ( always ) ] pub fn ch2trig ( & self ) -> CH2TRIG_R { CH2TRIG_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 3 Trigger Enable" ] # [ inline ( always ) ] pub fn ch3trig ( & self ) -> CH3TRIG_R { CH3TRIG_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 4 Trigger Enable" ] # [ inline ( always ) ] pub fn ch4trig ( & self ) -> CH4TRIG_R { CH4TRIG_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 5 Trigger Enable" ] # [ inline ( always ) ] pub fn ch5trig ( & self ) -> CH5TRIG_R { CH5TRIG_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 0 Trigger Enable" ] # [ inline ( always ) ] pub fn ch0trig ( & self ) -> CH0TRIG_R { CH0TRIG_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 1 Trigger Enable" ] # [ inline ( always ) ] pub fn ch1trig ( & self ) -> CH1TRIG_R { CH1TRIG_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Initialization Trigger Enable" ] # [ inline ( always ) ] pub fn inittrigen ( & self ) -> INITTRIGEN_R { INITTRIGEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Trigger Flag" ] # [ inline ( always ) ] pub fn trigf ( & self ) -> TRIGF_R { TRIGF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 2 Trigger Enable" ] # [ inline ( always ) ] pub fn ch2trig ( & mut self ) -> CH2TRIG_W { CH2TRIG_W { w : self } } # [ doc = "Bit 1 - Channel 3 Trigger Enable" ] # [ inline ( always ) ] pub fn ch3trig ( & mut self ) -> CH3TRIG_W { CH3TRIG_W { w : self } } # [ doc = "Bit 2 - Channel 4 Trigger Enable" ] # [ inline ( always ) ] pub fn ch4trig ( & mut self ) -> CH4TRIG_W { CH4TRIG_W { w : self } } # [ doc = "Bit 3 - Channel 5 Trigger Enable" ] # [ inline ( always ) ] pub fn ch5trig ( & mut self ) -> CH5TRIG_W { CH5TRIG_W { w : self } } # [ doc = "Bit 4 - Channel 0 Trigger Enable" ] # [ inline ( always ) ] pub fn ch0trig ( & mut self ) -> CH0TRIG_W { CH0TRIG_W { w : self } } # [ doc = "Bit 5 - Channel 1 Trigger Enable" ] # [ inline ( always ) ] pub fn ch1trig ( & mut self ) -> CH1TRIG_W { CH1TRIG_W { w : self } } # [ doc = "Bit 6 - Initialization Trigger Enable" ] # [ inline ( always ) ] pub fn inittrigen ( & mut self ) -> INITTRIGEN_W { INITTRIGEN_W { w : self } } # [ doc = "Bit 7 - Channel Trigger Flag" ] # [ inline ( always ) ] pub fn trigf ( & mut self ) -> TRIGF_W { TRIGF_W { w : self } } } } # [ doc = "Channels Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pol](pol) module" ] pub type POL = crate :: Reg < u32 , _POL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POL ; # [ doc = "`read()` method returns [pol::R](pol::R) reader structure" ] impl crate :: Readable for POL { } # [ doc = "`write(|w| ..)` method takes [pol::W](pol::W) writer structure" ] impl crate :: Writable for POL { } # [ doc = "Channels Polarity" ] pub mod pol { # [ doc = "Reader of register POL" ] pub type R = crate :: R < u32 , super :: POL > ; # [ doc = "Writer for register POL" ] pub type W = crate :: W < u32 , super :: POL > ; # [ doc = "Register POL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: POL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL0_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL0_A > for bool { # [ inline ( always ) ] fn from ( variant : POL0_A ) -> Self { match variant { POL0_A :: _0 => false , POL0_A :: _1 => true } } } # [ doc = "Reader of field `POL0`" ] pub type POL0_R = crate :: R < bool , POL0_A > ; impl POL0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL0_A { match self . bits { false => POL0_A :: _0 , true => POL0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL0_A :: _1 } } # [ doc = "Write proxy for field `POL0`" ] pub struct POL0_W < 'a > { w : & 'a mut W , } impl < 'a > POL0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL1_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL1_A > for bool { # [ inline ( always ) ] fn from ( variant : POL1_A ) -> Self { match variant { POL1_A :: _0 => false , POL1_A :: _1 => true } } } # [ doc = "Reader of field `POL1`" ] pub type POL1_R = crate :: R < bool , POL1_A > ; impl POL1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL1_A { match self . bits { false => POL1_A :: _0 , true => POL1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL1_A :: _1 } } # [ doc = "Write proxy for field `POL1`" ] pub struct POL1_W < 'a > { w : & 'a mut W , } impl < 'a > POL1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL2_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL2_A > for bool { # [ inline ( always ) ] fn from ( variant : POL2_A ) -> Self { match variant { POL2_A :: _0 => false , POL2_A :: _1 => true } } } # [ doc = "Reader of field `POL2`" ] pub type POL2_R = crate :: R < bool , POL2_A > ; impl POL2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL2_A { match self . bits { false => POL2_A :: _0 , true => POL2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL2_A :: _1 } } # [ doc = "Write proxy for field `POL2`" ] pub struct POL2_W < 'a > { w : & 'a mut W , } impl < 'a > POL2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL2_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL2_A :: _1 ) } # [ 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 = "Channel 3 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL3_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL3_A > for bool { # [ inline ( always ) ] fn from ( variant : POL3_A ) -> Self { match variant { POL3_A :: _0 => false , POL3_A :: _1 => true } } } # [ doc = "Reader of field `POL3`" ] pub type POL3_R = crate :: R < bool , POL3_A > ; impl POL3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL3_A { match self . bits { false => POL3_A :: _0 , true => POL3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL3_A :: _1 } } # [ doc = "Write proxy for field `POL3`" ] pub struct POL3_W < 'a > { w : & 'a mut W , } impl < 'a > POL3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL3_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL4_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL4_A > for bool { # [ inline ( always ) ] fn from ( variant : POL4_A ) -> Self { match variant { POL4_A :: _0 => false , POL4_A :: _1 => true } } } # [ doc = "Reader of field `POL4`" ] pub type POL4_R = crate :: R < bool , POL4_A > ; impl POL4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL4_A { match self . bits { false => POL4_A :: _0 , true => POL4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL4_A :: _1 } } # [ doc = "Write proxy for field `POL4`" ] pub struct POL4_W < 'a > { w : & 'a mut W , } impl < 'a > POL4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL4_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL5_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL5_A > for bool { # [ inline ( always ) ] fn from ( variant : POL5_A ) -> Self { match variant { POL5_A :: _0 => false , POL5_A :: _1 => true } } } # [ doc = "Reader of field `POL5`" ] pub type POL5_R = crate :: R < bool , POL5_A > ; impl POL5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL5_A { match self . bits { false => POL5_A :: _0 , true => POL5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL5_A :: _1 } } # [ doc = "Write proxy for field `POL5`" ] pub struct POL5_W < 'a > { w : & 'a mut W , } impl < 'a > POL5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL5_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL5_A :: _1 ) } # [ 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 = "Channel 6 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL6_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL6_A > for bool { # [ inline ( always ) ] fn from ( variant : POL6_A ) -> Self { match variant { POL6_A :: _0 => false , POL6_A :: _1 => true } } } # [ doc = "Reader of field `POL6`" ] pub type POL6_R = crate :: R < bool , POL6_A > ; impl POL6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL6_A { match self . bits { false => POL6_A :: _0 , true => POL6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL6_A :: _1 } } # [ doc = "Write proxy for field `POL6`" ] pub struct POL6_W < 'a > { w : & 'a mut W , } impl < 'a > POL6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL6_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL6_A :: _1 ) } # [ 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 = "Channel 7 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL7_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL7_A > for bool { # [ inline ( always ) ] fn from ( variant : POL7_A ) -> Self { match variant { POL7_A :: _0 => false , POL7_A :: _1 => true } } } # [ doc = "Reader of field `POL7`" ] pub type POL7_R = crate :: R < bool , POL7_A > ; impl POL7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL7_A { match self . bits { false => POL7_A :: _0 , true => POL7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL7_A :: _1 } } # [ doc = "Write proxy for field `POL7`" ] pub struct POL7_W < 'a > { w : & 'a mut W , } impl < 'a > POL7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL7_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL7_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & self ) -> POL0_R { POL0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & self ) -> POL1_R { POL1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Polarity" ] # [ inline ( always ) ] pub fn pol2 ( & self ) -> POL2_R { POL2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Polarity" ] # [ inline ( always ) ] pub fn pol3 ( & self ) -> POL3_R { POL3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Polarity" ] # [ inline ( always ) ] pub fn pol4 ( & self ) -> POL4_R { POL4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Polarity" ] # [ inline ( always ) ] pub fn pol5 ( & self ) -> POL5_R { POL5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Polarity" ] # [ inline ( always ) ] pub fn pol6 ( & self ) -> POL6_R { POL6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Polarity" ] # [ inline ( always ) ] pub fn pol7 ( & self ) -> POL7_R { POL7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & mut self ) -> POL0_W { POL0_W { w : self } } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & mut self ) -> POL1_W { POL1_W { w : self } } # [ doc = "Bit 2 - Channel 2 Polarity" ] # [ inline ( always ) ] pub fn pol2 ( & mut self ) -> POL2_W { POL2_W { w : self } } # [ doc = "Bit 3 - Channel 3 Polarity" ] # [ inline ( always ) ] pub fn pol3 ( & mut self ) -> POL3_W { POL3_W { w : self } } # [ doc = "Bit 4 - Channel 4 Polarity" ] # [ inline ( always ) ] pub fn pol4 ( & mut self ) -> POL4_W { POL4_W { w : self } } # [ doc = "Bit 5 - Channel 5 Polarity" ] # [ inline ( always ) ] pub fn pol5 ( & mut self ) -> POL5_W { POL5_W { w : self } } # [ doc = "Bit 6 - Channel 6 Polarity" ] # [ inline ( always ) ] pub fn pol6 ( & mut self ) -> POL6_W { POL6_W { w : self } } # [ doc = "Bit 7 - Channel 7 Polarity" ] # [ inline ( always ) ] pub fn pol7 ( & mut self ) -> POL7_W { POL7_W { w : self } } } } # [ doc = "Fault Mode Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fms](fms) module" ] pub type FMS = crate :: Reg < u32 , _FMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FMS ; # [ doc = "`read()` method returns [fms::R](fms::R) reader structure" ] impl crate :: Readable for FMS { } # [ doc = "`write(|w| ..)` method takes [fms::W](fms::W) writer structure" ] impl crate :: Writable for FMS { } # [ doc = "Fault Mode Status" ] pub mod fms { # [ doc = "Reader of register FMS" ] pub type R = crate :: R < u32 , super :: FMS > ; # [ doc = "Writer for register FMS" ] pub type W = crate :: W < u32 , super :: FMS > ; # [ doc = "Register FMS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FMS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Detection Flag 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF0_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF0_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF0_A ) -> Self { match variant { FAULTF0_A :: _0 => false , FAULTF0_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF0`" ] pub type FAULTF0_R = crate :: R < bool , FAULTF0_A > ; impl FAULTF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF0_A { match self . bits { false => FAULTF0_A :: _0 , true => FAULTF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF0_A :: _1 } } # [ doc = "Write proxy for field `FAULTF0`" ] pub struct FAULTF0_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF0_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Detection Flag 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF1_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF1_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF1_A ) -> Self { match variant { FAULTF1_A :: _0 => false , FAULTF1_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF1`" ] pub type FAULTF1_R = crate :: R < bool , FAULTF1_A > ; impl FAULTF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF1_A { match self . bits { false => FAULTF1_A :: _0 , true => FAULTF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF1_A :: _1 } } # [ doc = "Write proxy for field `FAULTF1`" ] pub struct FAULTF1_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF1_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF1_A :: _1 ) } # [ 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 } } # [ doc = "Fault Detection Flag 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF2_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF2_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF2_A ) -> Self { match variant { FAULTF2_A :: _0 => false , FAULTF2_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF2`" ] pub type FAULTF2_R = crate :: R < bool , FAULTF2_A > ; impl FAULTF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF2_A { match self . bits { false => FAULTF2_A :: _0 , true => FAULTF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF2_A :: _1 } } # [ doc = "Write proxy for field `FAULTF2`" ] pub struct FAULTF2_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF2_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF2_A :: _1 ) } # [ 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 = "Fault Detection Flag 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF3_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF3_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF3_A ) -> Self { match variant { FAULTF3_A :: _0 => false , FAULTF3_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF3`" ] pub type FAULTF3_R = crate :: R < bool , FAULTF3_A > ; impl FAULTF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF3_A { match self . bits { false => FAULTF3_A :: _0 , true => FAULTF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF3_A :: _1 } } # [ doc = "Write proxy for field `FAULTF3`" ] pub struct FAULTF3_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF3_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Fault Inputs\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTIN_A { # [ doc = "0: The logic OR of the enabled fault inputs is 0." ] _0 , # [ doc = "1: The logic OR of the enabled fault inputs is 1." ] _1 } impl From < FAULTIN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTIN_A ) -> Self { match variant { FAULTIN_A :: _0 => false , FAULTIN_A :: _1 => true } } } # [ doc = "Reader of field `FAULTIN`" ] pub type FAULTIN_R = crate :: R < bool , FAULTIN_A > ; impl FAULTIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTIN_A { match self . bits { false => FAULTIN_A :: _0 , true => FAULTIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTIN_A :: _1 } } # [ doc = "Write Protection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPEN_A { # [ doc = "0: Write protection is disabled. Write protected bits can be written." ] _0 , # [ doc = "1: Write protection is enabled. Write protected bits cannot be written." ] _1 } impl From < WPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WPEN_A ) -> Self { match variant { WPEN_A :: _0 => false , WPEN_A :: _1 => true } } } # [ doc = "Reader of field `WPEN`" ] pub type WPEN_R = crate :: R < bool , WPEN_A > ; impl WPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPEN_A { match self . bits { false => WPEN_A :: _0 , true => WPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPEN_A :: _1 } } # [ doc = "Write proxy for field `WPEN`" ] pub struct WPEN_W < 'a > { w : & 'a mut W , } impl < 'a > WPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write protection is disabled. Write protected bits can be written." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPEN_A :: _0 ) } # [ doc = "Write protection is enabled. Write protected bits cannot be written." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPEN_A :: _1 ) } # [ 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 = "Fault Detection Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF_A { # [ doc = "0: No fault condition was detected." ] _0 , # [ doc = "1: A fault condition was detected." ] _1 } impl From < FAULTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF_A ) -> Self { match variant { FAULTF_A :: _0 => false , FAULTF_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF`" ] pub type FAULTF_R = crate :: R < bool , FAULTF_A > ; impl FAULTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF_A { match self . bits { false => FAULTF_A :: _0 , true => FAULTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF_A :: _1 } } # [ doc = "Write proxy for field `FAULTF`" ] pub struct FAULTF_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF_A :: _0 ) } # [ doc = "A fault condition was detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Fault Detection Flag 0" ] # [ inline ( always ) ] pub fn faultf0 ( & self ) -> FAULTF0_R { FAULTF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Detection Flag 1" ] # [ inline ( always ) ] pub fn faultf1 ( & self ) -> FAULTF1_R { FAULTF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Detection Flag 2" ] # [ inline ( always ) ] pub fn faultf2 ( & self ) -> FAULTF2_R { FAULTF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Detection Flag 3" ] # [ inline ( always ) ] pub fn faultf3 ( & self ) -> FAULTF3_R { FAULTF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Fault Inputs" ] # [ inline ( always ) ] pub fn faultin ( & self ) -> FAULTIN_R { FAULTIN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Write Protection Enable" ] # [ inline ( always ) ] pub fn wpen ( & self ) -> WPEN_R { WPEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fault Detection Flag" ] # [ inline ( always ) ] pub fn faultf ( & self ) -> FAULTF_R { FAULTF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Fault Detection Flag 0" ] # [ inline ( always ) ] pub fn faultf0 ( & mut self ) -> FAULTF0_W { FAULTF0_W { w : self } } # [ doc = "Bit 1 - Fault Detection Flag 1" ] # [ inline ( always ) ] pub fn faultf1 ( & mut self ) -> FAULTF1_W { FAULTF1_W { w : self } } # [ doc = "Bit 2 - Fault Detection Flag 2" ] # [ inline ( always ) ] pub fn faultf2 ( & mut self ) -> FAULTF2_W { FAULTF2_W { w : self } } # [ doc = "Bit 3 - Fault Detection Flag 3" ] # [ inline ( always ) ] pub fn faultf3 ( & mut self ) -> FAULTF3_W { FAULTF3_W { w : self } } # [ doc = "Bit 6 - Write Protection Enable" ] # [ inline ( always ) ] pub fn wpen ( & mut self ) -> WPEN_W { WPEN_W { w : self } } # [ doc = "Bit 7 - Fault Detection Flag" ] # [ inline ( always ) ] pub fn faultf ( & mut self ) -> FAULTF_W { FAULTF_W { w : self } } } } # [ doc = "Input Capture Filter Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filter](filter) module" ] pub type FILTER = crate :: Reg < u32 , _FILTER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILTER ; # [ doc = "`read()` method returns [filter::R](filter::R) reader structure" ] impl crate :: Readable for FILTER { } # [ doc = "`write(|w| ..)` method takes [filter::W](filter::W) writer structure" ] impl crate :: Writable for FILTER { } # [ doc = "Input Capture Filter Control" ] pub mod filter { # [ doc = "Reader of register FILTER" ] pub type R = crate :: R < u32 , super :: FILTER > ; # [ doc = "Writer for register FILTER" ] pub type W = crate :: W < u32 , super :: FILTER > ; # [ doc = "Register FILTER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILTER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CH0FVAL`" ] pub type CH0FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH0FVAL`" ] pub struct CH0FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0FVAL_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `CH1FVAL`" ] pub type CH1FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH1FVAL`" ] pub struct CH1FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1FVAL_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } # [ doc = "Reader of field `CH2FVAL`" ] pub type CH2FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH2FVAL`" ] pub struct CH2FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH2FVAL_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `CH3FVAL`" ] pub type CH3FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH3FVAL`" ] pub struct CH3FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH3FVAL_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 & ! ( 0x0f << 12 ) ) | ( ( ( value as u32 ) & 0x0f ) << 12 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Channel 0 Input Filter" ] # [ inline ( always ) ] pub fn ch0fval ( & self ) -> CH0FVAL_R { CH0FVAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Channel 1 Input Filter" ] # [ inline ( always ) ] pub fn ch1fval ( & self ) -> CH1FVAL_R { CH1FVAL_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Channel 2 Input Filter" ] # [ inline ( always ) ] pub fn ch2fval ( & self ) -> CH2FVAL_R { CH2FVAL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - Channel 3 Input Filter" ] # [ inline ( always ) ] pub fn ch3fval ( & self ) -> CH3FVAL_R { CH3FVAL_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Channel 0 Input Filter" ] # [ inline ( always ) ] pub fn ch0fval ( & mut self ) -> CH0FVAL_W { CH0FVAL_W { w : self } } # [ doc = "Bits 4:7 - Channel 1 Input Filter" ] # [ inline ( always ) ] pub fn ch1fval ( & mut self ) -> CH1FVAL_W { CH1FVAL_W { w : self } } # [ doc = "Bits 8:11 - Channel 2 Input Filter" ] # [ inline ( always ) ] pub fn ch2fval ( & mut self ) -> CH2FVAL_W { CH2FVAL_W { w : self } } # [ doc = "Bits 12:15 - Channel 3 Input Filter" ] # [ inline ( always ) ] pub fn ch3fval ( & mut self ) -> CH3FVAL_W { CH3FVAL_W { w : self } } } } # [ doc = "Fault Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fltctrl](fltctrl) module" ] pub type FLTCTRL = crate :: Reg < u32 , _FLTCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLTCTRL ; # [ doc = "`read()` method returns [fltctrl::R](fltctrl::R) reader structure" ] impl crate :: Readable for FLTCTRL { } # [ doc = "`write(|w| ..)` method takes [fltctrl::W](fltctrl::W) writer structure" ] impl crate :: Writable for FLTCTRL { } # [ doc = "Fault Control" ] pub mod fltctrl { # [ doc = "Reader of register FLTCTRL" ] pub type R = crate :: R < u32 , super :: FLTCTRL > ; # [ doc = "Writer for register FLTCTRL" ] pub type W = crate :: W < u32 , super :: FLTCTRL > ; # [ doc = "Register FLTCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLTCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Input 0 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT0EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT0EN_A ) -> Self { match variant { FAULT0EN_A :: _0 => false , FAULT0EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT0EN`" ] pub type FAULT0EN_R = crate :: R < bool , FAULT0EN_A > ; impl FAULT0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT0EN_A { match self . bits { false => FAULT0EN_A :: _0 , true => FAULT0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT0EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT0EN`" ] pub struct FAULT0EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT0EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT0EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Input 1 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT1EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT1EN_A ) -> Self { match variant { FAULT1EN_A :: _0 => false , FAULT1EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT1EN`" ] pub type FAULT1EN_R = crate :: R < bool , FAULT1EN_A > ; impl FAULT1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT1EN_A { match self . bits { false => FAULT1EN_A :: _0 , true => FAULT1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT1EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT1EN`" ] pub struct FAULT1EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT1EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT1EN_A :: _1 ) } # [ 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 } } # [ doc = "Fault Input 2 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT2EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT2EN_A ) -> Self { match variant { FAULT2EN_A :: _0 => false , FAULT2EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT2EN`" ] pub type FAULT2EN_R = crate :: R < bool , FAULT2EN_A > ; impl FAULT2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT2EN_A { match self . bits { false => FAULT2EN_A :: _0 , true => FAULT2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT2EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT2EN`" ] pub struct FAULT2EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT2EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT2EN_A :: _1 ) } # [ 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 = "Fault Input 3 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT3EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT3EN_A ) -> Self { match variant { FAULT3EN_A :: _0 => false , FAULT3EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT3EN`" ] pub type FAULT3EN_R = crate :: R < bool , FAULT3EN_A > ; impl FAULT3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT3EN_A { match self . bits { false => FAULT3EN_A :: _0 , true => FAULT3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT3EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT3EN`" ] pub struct FAULT3EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT3EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT3EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Fault Input 0 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR0EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR0EN_A ) -> Self { match variant { FFLTR0EN_A :: _0 => false , FFLTR0EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR0EN`" ] pub type FFLTR0EN_R = crate :: R < bool , FFLTR0EN_A > ; impl FFLTR0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR0EN_A { match self . bits { false => FFLTR0EN_A :: _0 , true => FFLTR0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR0EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR0EN`" ] pub struct FFLTR0EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR0EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR0EN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Fault Input 1 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR1EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR1EN_A ) -> Self { match variant { FFLTR1EN_A :: _0 => false , FFLTR1EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR1EN`" ] pub type FFLTR1EN_R = crate :: R < bool , FFLTR1EN_A > ; impl FFLTR1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR1EN_A { match self . bits { false => FFLTR1EN_A :: _0 , true => FFLTR1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR1EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR1EN`" ] pub struct FFLTR1EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR1EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR1EN_A :: _1 ) } # [ 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 = "Fault Input 2 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR2EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR2EN_A ) -> Self { match variant { FFLTR2EN_A :: _0 => false , FFLTR2EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR2EN`" ] pub type FFLTR2EN_R = crate :: R < bool , FFLTR2EN_A > ; impl FFLTR2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR2EN_A { match self . bits { false => FFLTR2EN_A :: _0 , true => FFLTR2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR2EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR2EN`" ] pub struct FFLTR2EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR2EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR2EN_A :: _1 ) } # [ 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 = "Fault Input 3 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR3EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR3EN_A ) -> Self { match variant { FFLTR3EN_A :: _0 => false , FFLTR3EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR3EN`" ] pub type FFLTR3EN_R = crate :: R < bool , FFLTR3EN_A > ; impl FFLTR3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR3EN_A { match self . bits { false => FFLTR3EN_A :: _0 , true => FFLTR3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR3EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR3EN`" ] pub struct FFLTR3EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR3EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR3EN_A :: _1 ) } # [ 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 = "Reader of field `FFVAL`" ] pub type FFVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FFVAL`" ] pub struct FFVAL_W < 'a > { w : & 'a mut W , } impl < 'a > FFVAL_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } impl R { # [ doc = "Bit 0 - Fault Input 0 Enable" ] # [ inline ( always ) ] pub fn fault0en ( & self ) -> FAULT0EN_R { FAULT0EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Input 1 Enable" ] # [ inline ( always ) ] pub fn fault1en ( & self ) -> FAULT1EN_R { FAULT1EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Input 2 Enable" ] # [ inline ( always ) ] pub fn fault2en ( & self ) -> FAULT2EN_R { FAULT2EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Input 3 Enable" ] # [ inline ( always ) ] pub fn fault3en ( & self ) -> FAULT3EN_R { FAULT3EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Fault Input 0 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr0en ( & self ) -> FFLTR0EN_R { FFLTR0EN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Fault Input 1 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr1en ( & self ) -> FFLTR1EN_R { FFLTR1EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Fault Input 2 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr2en ( & self ) -> FFLTR2EN_R { FFLTR2EN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fault Input 3 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr3en ( & self ) -> FFLTR3EN_R { FFLTR3EN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - Fault Input Filter" ] # [ inline ( always ) ] pub fn ffval ( & self ) -> FFVAL_R { FFVAL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Fault Input 0 Enable" ] # [ inline ( always ) ] pub fn fault0en ( & mut self ) -> FAULT0EN_W { FAULT0EN_W { w : self } } # [ doc = "Bit 1 - Fault Input 1 Enable" ] # [ inline ( always ) ] pub fn fault1en ( & mut self ) -> FAULT1EN_W { FAULT1EN_W { w : self } } # [ doc = "Bit 2 - Fault Input 2 Enable" ] # [ inline ( always ) ] pub fn fault2en ( & mut self ) -> FAULT2EN_W { FAULT2EN_W { w : self } } # [ doc = "Bit 3 - Fault Input 3 Enable" ] # [ inline ( always ) ] pub fn fault3en ( & mut self ) -> FAULT3EN_W { FAULT3EN_W { w : self } } # [ doc = "Bit 4 - Fault Input 0 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr0en ( & mut self ) -> FFLTR0EN_W { FFLTR0EN_W { w : self } } # [ doc = "Bit 5 - Fault Input 1 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr1en ( & mut self ) -> FFLTR1EN_W { FFLTR1EN_W { w : self } } # [ doc = "Bit 6 - Fault Input 2 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr2en ( & mut self ) -> FFLTR2EN_W { FFLTR2EN_W { w : self } } # [ doc = "Bit 7 - Fault Input 3 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr3en ( & mut self ) -> FFLTR3EN_W { FFLTR3EN_W { w : self } } # [ doc = "Bits 8:11 - Fault Input Filter" ] # [ inline ( always ) ] pub fn ffval ( & mut self ) -> FFVAL_W { FFVAL_W { w : self } } } } # [ doc = "Quadrature Decoder Control And Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [qdctrl](qdctrl) module" ] pub type QDCTRL = crate :: Reg < u32 , _QDCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _QDCTRL ; # [ doc = "`read()` method returns [qdctrl::R](qdctrl::R) reader structure" ] impl crate :: Readable for QDCTRL { } # [ doc = "`write(|w| ..)` method takes [qdctrl::W](qdctrl::W) writer structure" ] impl crate :: Writable for QDCTRL { } # [ doc = "Quadrature Decoder Control And Status" ] pub mod qdctrl { # [ doc = "Reader of register QDCTRL" ] pub type R = crate :: R < u32 , super :: QDCTRL > ; # [ doc = "Writer for register QDCTRL" ] pub type W = crate :: W < u32 , super :: QDCTRL > ; # [ doc = "Register QDCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: QDCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Quadrature Decoder Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADEN_A { # [ doc = "0: Quadrature Decoder mode is disabled." ] _0 , # [ doc = "1: Quadrature Decoder mode is enabled." ] _1 } impl From < QUADEN_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADEN_A ) -> Self { match variant { QUADEN_A :: _0 => false , QUADEN_A :: _1 => true } } } # [ doc = "Reader of field `QUADEN`" ] pub type QUADEN_R = crate :: R < bool , QUADEN_A > ; impl QUADEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADEN_A { match self . bits { false => QUADEN_A :: _0 , true => QUADEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADEN_A :: _1 } } # [ doc = "Write proxy for field `QUADEN`" ] pub struct QUADEN_W < 'a > { w : & 'a mut W , } impl < 'a > QUADEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Quadrature Decoder mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _0 ) } # [ doc = "Quadrature Decoder mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Timer Overflow Direction In Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOFDIR_A { # [ doc = "0: TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes from its minimum value (CNTIN register) to its maximum value (MOD register)." ] _0 , # [ doc = "1: TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from its maximum value (MOD register) to its minimum value (CNTIN register)." ] _1 } impl From < TOFDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TOFDIR_A ) -> Self { match variant { TOFDIR_A :: _0 => false , TOFDIR_A :: _1 => true } } } # [ doc = "Reader of field `TOFDIR`" ] pub type TOFDIR_R = crate :: R < bool , TOFDIR_A > ; impl TOFDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOFDIR_A { match self . bits { false => TOFDIR_A :: _0 , true => TOFDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOFDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOFDIR_A :: _1 } } # [ doc = "FTM Counter Direction In Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADIR_A { # [ doc = "0: Counting direction is decreasing (FTM counter decrement)." ] _0 , # [ doc = "1: Counting direction is increasing (FTM counter increment)." ] _1 } impl From < QUADIR_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADIR_A ) -> Self { match variant { QUADIR_A :: _0 => false , QUADIR_A :: _1 => true } } } # [ doc = "Reader of field `QUADIR`" ] pub type QUADIR_R = crate :: R < bool , QUADIR_A > ; impl QUADIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADIR_A { match self . bits { false => QUADIR_A :: _0 , true => QUADIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADIR_A :: _1 } } # [ doc = "Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADMODE_A { # [ doc = "0: Phase A and phase B encoding mode." ] _0 , # [ doc = "1: Count and direction encoding mode." ] _1 } impl From < QUADMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADMODE_A ) -> Self { match variant { QUADMODE_A :: _0 => false , QUADMODE_A :: _1 => true } } } # [ doc = "Reader of field `QUADMODE`" ] pub type QUADMODE_R = crate :: R < bool , QUADMODE_A > ; impl QUADMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADMODE_A { match self . bits { false => QUADMODE_A :: _0 , true => QUADMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADMODE_A :: _1 } } # [ doc = "Write proxy for field `QUADMODE`" ] pub struct QUADMODE_W < 'a > { w : & 'a mut W , } impl < 'a > QUADMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase A and phase B encoding mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _0 ) } # [ doc = "Count and direction encoding mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Phase B Input Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHBPOL_A { # [ doc = "0: Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal." ] _0 , # [ doc = "1: Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal." ] _1 } impl From < PHBPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : PHBPOL_A ) -> Self { match variant { PHBPOL_A :: _0 => false , PHBPOL_A :: _1 => true } } } # [ doc = "Reader of field `PHBPOL`" ] pub type PHBPOL_R = crate :: R < bool , PHBPOL_A > ; impl PHBPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHBPOL_A { match self . bits { false => PHBPOL_A :: _0 , true => PHBPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHBPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHBPOL_A :: _1 } } # [ doc = "Write proxy for field `PHBPOL`" ] pub struct PHBPOL_W < 'a > { w : & 'a mut W , } impl < 'a > PHBPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHBPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHBPOL_A :: _0 ) } # [ doc = "Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHBPOL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Phase A Input Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHAPOL_A { # [ doc = "0: Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal." ] _0 , # [ doc = "1: Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal." ] _1 } impl From < PHAPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : PHAPOL_A ) -> Self { match variant { PHAPOL_A :: _0 => false , PHAPOL_A :: _1 => true } } } # [ doc = "Reader of field `PHAPOL`" ] pub type PHAPOL_R = crate :: R < bool , PHAPOL_A > ; impl PHAPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHAPOL_A { match self . bits { false => PHAPOL_A :: _0 , true => PHAPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHAPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHAPOL_A :: _1 } } # [ doc = "Write proxy for field `PHAPOL`" ] pub struct PHAPOL_W < 'a > { w : & 'a mut W , } impl < 'a > PHAPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHAPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHAPOL_A :: _0 ) } # [ doc = "Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHAPOL_A :: _1 ) } # [ 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 = "Phase B Input Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHBFLTREN_A { # [ doc = "0: Phase B input filter is disabled." ] _0 , # [ doc = "1: Phase B input filter is enabled." ] _1 } impl From < PHBFLTREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PHBFLTREN_A ) -> Self { match variant { PHBFLTREN_A :: _0 => false , PHBFLTREN_A :: _1 => true } } } # [ doc = "Reader of field `PHBFLTREN`" ] pub type PHBFLTREN_R = crate :: R < bool , PHBFLTREN_A > ; impl PHBFLTREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHBFLTREN_A { match self . bits { false => PHBFLTREN_A :: _0 , true => PHBFLTREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHBFLTREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHBFLTREN_A :: _1 } } # [ doc = "Write proxy for field `PHBFLTREN`" ] pub struct PHBFLTREN_W < 'a > { w : & 'a mut W , } impl < 'a > PHBFLTREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHBFLTREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase B input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHBFLTREN_A :: _0 ) } # [ doc = "Phase B input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHBFLTREN_A :: _1 ) } # [ 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 = "Phase A Input Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHAFLTREN_A { # [ doc = "0: Phase A input filter is disabled." ] _0 , # [ doc = "1: Phase A input filter is enabled." ] _1 } impl From < PHAFLTREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PHAFLTREN_A ) -> Self { match variant { PHAFLTREN_A :: _0 => false , PHAFLTREN_A :: _1 => true } } } # [ doc = "Reader of field `PHAFLTREN`" ] pub type PHAFLTREN_R = crate :: R < bool , PHAFLTREN_A > ; impl PHAFLTREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHAFLTREN_A { match self . bits { false => PHAFLTREN_A :: _0 , true => PHAFLTREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHAFLTREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHAFLTREN_A :: _1 } } # [ doc = "Write proxy for field `PHAFLTREN`" ] pub struct PHAFLTREN_W < 'a > { w : & 'a mut W , } impl < 'a > PHAFLTREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHAFLTREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase A input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHAFLTREN_A :: _0 ) } # [ doc = "Phase A input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHAFLTREN_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Quadrature Decoder Mode Enable" ] # [ inline ( always ) ] pub fn quaden ( & self ) -> QUADEN_R { QUADEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Timer Overflow Direction In Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn tofdir ( & self ) -> TOFDIR_R { TOFDIR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM Counter Direction In Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadir ( & self ) -> QUADIR_R { QUADIR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & self ) -> QUADMODE_R { QUADMODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Phase B Input Polarity" ] # [ inline ( always ) ] pub fn phbpol ( & self ) -> PHBPOL_R { PHBPOL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Phase A Input Polarity" ] # [ inline ( always ) ] pub fn phapol ( & self ) -> PHAPOL_R { PHAPOL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Phase B Input Filter Enable" ] # [ inline ( always ) ] pub fn phbfltren ( & self ) -> PHBFLTREN_R { PHBFLTREN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Phase A Input Filter Enable" ] # [ inline ( always ) ] pub fn phafltren ( & self ) -> PHAFLTREN_R { PHAFLTREN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Quadrature Decoder Mode Enable" ] # [ inline ( always ) ] pub fn quaden ( & mut self ) -> QUADEN_W { QUADEN_W { w : self } } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & mut self ) -> QUADMODE_W { QUADMODE_W { w : self } } # [ doc = "Bit 4 - Phase B Input Polarity" ] # [ inline ( always ) ] pub fn phbpol ( & mut self ) -> PHBPOL_W { PHBPOL_W { w : self } } # [ doc = "Bit 5 - Phase A Input Polarity" ] # [ inline ( always ) ] pub fn phapol ( & mut self ) -> PHAPOL_W { PHAPOL_W { w : self } } # [ doc = "Bit 6 - Phase B Input Filter Enable" ] # [ inline ( always ) ] pub fn phbfltren ( & mut self ) -> PHBFLTREN_W { PHBFLTREN_W { w : self } } # [ doc = "Bit 7 - Phase A Input Filter Enable" ] # [ inline ( always ) ] pub fn phafltren ( & mut self ) -> PHAFLTREN_W { PHAFLTREN_W { w : self } } } } # [ doc = "Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [conf](conf) module" ] pub type CONF = crate :: Reg < u32 , _CONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONF ; # [ doc = "`read()` method returns [conf::R](conf::R) reader structure" ] impl crate :: Readable for CONF { } # [ doc = "`write(|w| ..)` method takes [conf::W](conf::W) writer structure" ] impl crate :: Writable for CONF { } # [ doc = "Configuration" ] pub mod conf { # [ doc = "Reader of register CONF" ] pub type R = crate :: R < u32 , super :: CONF > ; # [ doc = "Writer for register CONF" ] pub type W = crate :: W < u32 , super :: CONF > ; # [ doc = "Register CONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `NUMTOF`" ] pub type NUMTOF_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `NUMTOF`" ] pub struct NUMTOF_W < 'a > { w : & 'a mut W , } impl < 'a > NUMTOF_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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } # [ doc = "Reader of field `BDMMODE`" ] pub type BDMMODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BDMMODE`" ] pub struct BDMMODE_W < 'a > { w : & 'a mut W , } impl < 'a > BDMMODE_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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Global Time Base Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEEN_A { # [ doc = "0: Use of an external global time base is disabled." ] _0 , # [ doc = "1: Use of an external global time base is enabled." ] _1 } impl From < GTBEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEEN_A ) -> Self { match variant { GTBEEN_A :: _0 => false , GTBEEN_A :: _1 => true } } } # [ doc = "Reader of field `GTBEEN`" ] pub type GTBEEN_R = crate :: R < bool , GTBEEN_A > ; impl GTBEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEEN_A { match self . bits { false => GTBEEN_A :: _0 , true => GTBEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEEN_A :: _1 } } # [ doc = "Write proxy for field `GTBEEN`" ] pub struct GTBEEN_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use of an external global time base is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _0 ) } # [ doc = "Use of an external global time base is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Global Time Base Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEOUT_A { # [ doc = "0: A global time base signal generation is disabled." ] _0 , # [ doc = "1: A global time base signal generation is enabled." ] _1 } impl From < GTBEOUT_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEOUT_A ) -> Self { match variant { GTBEOUT_A :: _0 => false , GTBEOUT_A :: _1 => true } } } # [ doc = "Reader of field `GTBEOUT`" ] pub type GTBEOUT_R = crate :: R < bool , GTBEOUT_A > ; impl GTBEOUT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEOUT_A { match self . bits { false => GTBEOUT_A :: _0 , true => GTBEOUT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEOUT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEOUT_A :: _1 } } # [ doc = "Write proxy for field `GTBEOUT`" ] pub struct GTBEOUT_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEOUT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEOUT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A global time base signal generation is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEOUT_A :: _0 ) } # [ doc = "A global time base signal generation is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEOUT_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - TOF Frequency" ] # [ inline ( always ) ] pub fn numtof ( & self ) -> NUMTOF_R { NUMTOF_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bits 6:7 - BDM Mode" ] # [ inline ( always ) ] pub fn bdmmode ( & self ) -> BDMMODE_R { BDMMODE_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bit 9 - Global Time Base Enable" ] # [ inline ( always ) ] pub fn gtbeen ( & self ) -> GTBEEN_R { GTBEEN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Global Time Base Output" ] # [ inline ( always ) ] pub fn gtbeout ( & self ) -> GTBEOUT_R { GTBEOUT_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - TOF Frequency" ] # [ inline ( always ) ] pub fn numtof ( & mut self ) -> NUMTOF_W { NUMTOF_W { w : self } } # [ doc = "Bits 6:7 - BDM Mode" ] # [ inline ( always ) ] pub fn bdmmode ( & mut self ) -> BDMMODE_W { BDMMODE_W { w : self } } # [ doc = "Bit 9 - Global Time Base Enable" ] # [ inline ( always ) ] pub fn gtbeen ( & mut self ) -> GTBEEN_W { GTBEEN_W { w : self } } # [ doc = "Bit 10 - Global Time Base Output" ] # [ inline ( always ) ] pub fn gtbeout ( & mut self ) -> GTBEOUT_W { GTBEOUT_W { w : self } } } } # [ doc = "FTM Fault Input Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fltpol](fltpol) module" ] pub type FLTPOL = crate :: Reg < u32 , _FLTPOL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLTPOL ; # [ doc = "`read()` method returns [fltpol::R](fltpol::R) reader structure" ] impl crate :: Readable for FLTPOL { } # [ doc = "`write(|w| ..)` method takes [fltpol::W](fltpol::W) writer structure" ] impl crate :: Writable for FLTPOL { } # [ doc = "FTM Fault Input Polarity" ] pub mod fltpol { # [ doc = "Reader of register FLTPOL" ] pub type R = crate :: R < u32 , super :: FLTPOL > ; # [ doc = "Writer for register FLTPOL" ] pub type W = crate :: W < u32 , super :: FLTPOL > ; # [ doc = "Register FLTPOL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLTPOL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Input 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT0POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT0POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT0POL_A ) -> Self { match variant { FLT0POL_A :: _0 => false , FLT0POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT0POL`" ] pub type FLT0POL_R = crate :: R < bool , FLT0POL_A > ; impl FLT0POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT0POL_A { match self . bits { false => FLT0POL_A :: _0 , true => FLT0POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT0POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT0POL_A :: _1 } } # [ doc = "Write proxy for field `FLT0POL`" ] pub struct FLT0POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT0POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT0POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT0POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT0POL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Input 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT1POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT1POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT1POL_A ) -> Self { match variant { FLT1POL_A :: _0 => false , FLT1POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT1POL`" ] pub type FLT1POL_R = crate :: R < bool , FLT1POL_A > ; impl FLT1POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT1POL_A { match self . bits { false => FLT1POL_A :: _0 , true => FLT1POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT1POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT1POL_A :: _1 } } # [ doc = "Write proxy for field `FLT1POL`" ] pub struct FLT1POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT1POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT1POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT1POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT1POL_A :: _1 ) } # [ 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 } } # [ doc = "Fault Input 2 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT2POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT2POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT2POL_A ) -> Self { match variant { FLT2POL_A :: _0 => false , FLT2POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT2POL`" ] pub type FLT2POL_R = crate :: R < bool , FLT2POL_A > ; impl FLT2POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT2POL_A { match self . bits { false => FLT2POL_A :: _0 , true => FLT2POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT2POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT2POL_A :: _1 } } # [ doc = "Write proxy for field `FLT2POL`" ] pub struct FLT2POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT2POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT2POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT2POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT2POL_A :: _1 ) } # [ 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 = "Fault Input 3 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT3POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT3POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT3POL_A ) -> Self { match variant { FLT3POL_A :: _0 => false , FLT3POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT3POL`" ] pub type FLT3POL_R = crate :: R < bool , FLT3POL_A > ; impl FLT3POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT3POL_A { match self . bits { false => FLT3POL_A :: _0 , true => FLT3POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT3POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT3POL_A :: _1 } } # [ doc = "Write proxy for field `FLT3POL`" ] pub struct FLT3POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT3POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT3POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT3POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT3POL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Fault Input 0 Polarity" ] # [ inline ( always ) ] pub fn flt0pol ( & self ) -> FLT0POL_R { FLT0POL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Input 1 Polarity" ] # [ inline ( always ) ] pub fn flt1pol ( & self ) -> FLT1POL_R { FLT1POL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Input 2 Polarity" ] # [ inline ( always ) ] pub fn flt2pol ( & self ) -> FLT2POL_R { FLT2POL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Input 3 Polarity" ] # [ inline ( always ) ] pub fn flt3pol ( & self ) -> FLT3POL_R { FLT3POL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Fault Input 0 Polarity" ] # [ inline ( always ) ] pub fn flt0pol ( & mut self ) -> FLT0POL_W { FLT0POL_W { w : self } } # [ doc = "Bit 1 - Fault Input 1 Polarity" ] # [ inline ( always ) ] pub fn flt1pol ( & mut self ) -> FLT1POL_W { FLT1POL_W { w : self } } # [ doc = "Bit 2 - Fault Input 2 Polarity" ] # [ inline ( always ) ] pub fn flt2pol ( & mut self ) -> FLT2POL_W { FLT2POL_W { w : self } } # [ doc = "Bit 3 - Fault Input 3 Polarity" ] # [ inline ( always ) ] pub fn flt3pol ( & mut self ) -> FLT3POL_W { FLT3POL_W { w : self } } } } # [ doc = "Synchronization Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [synconf](synconf) module" ] pub type SYNCONF = crate :: Reg < u32 , _SYNCONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYNCONF ; # [ doc = "`read()` method returns [synconf::R](synconf::R) reader structure" ] impl crate :: Readable for SYNCONF { } # [ doc = "`write(|w| ..)` method takes [synconf::W](synconf::W) writer structure" ] impl crate :: Writable for SYNCONF { } # [ doc = "Synchronization Configuration" ] pub mod synconf { # [ doc = "Reader of register SYNCONF" ] pub type R = crate :: R < u32 , super :: SYNCONF > ; # [ doc = "Writer for register SYNCONF" ] pub type W = crate :: W < u32 , super :: SYNCONF > ; # [ doc = "Register SYNCONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SYNCONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Hardware Trigger Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWTRIGMODE_A { # [ doc = "0: FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] _0 , # [ doc = "1: FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] _1 } impl From < HWTRIGMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : HWTRIGMODE_A ) -> Self { match variant { HWTRIGMODE_A :: _0 => false , HWTRIGMODE_A :: _1 => true } } } # [ doc = "Reader of field `HWTRIGMODE`" ] pub type HWTRIGMODE_R = crate :: R < bool , HWTRIGMODE_A > ; impl HWTRIGMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWTRIGMODE_A { match self . bits { false => HWTRIGMODE_A :: _0 , true => HWTRIGMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWTRIGMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWTRIGMODE_A :: _1 } } # [ doc = "Write proxy for field `HWTRIGMODE`" ] pub struct HWTRIGMODE_W < 'a > { w : & 'a mut W , } impl < 'a > HWTRIGMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWTRIGMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWTRIGMODE_A :: _0 ) } # [ doc = "FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWTRIGMODE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "CNTIN Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTINC_A { # [ doc = "0: CNTIN register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: CNTIN register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < CNTINC_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTINC_A ) -> Self { match variant { CNTINC_A :: _0 => false , CNTINC_A :: _1 => true } } } # [ doc = "Reader of field `CNTINC`" ] pub type CNTINC_R = crate :: R < bool , CNTINC_A > ; impl CNTINC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTINC_A { match self . bits { false => CNTINC_A :: _0 , true => CNTINC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTINC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTINC_A :: _1 } } # [ doc = "Write proxy for field `CNTINC`" ] pub struct CNTINC_W < 'a > { w : & 'a mut W , } impl < 'a > CNTINC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTINC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CNTIN register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTINC_A :: _0 ) } # [ doc = "CNTIN register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTINC_A :: _1 ) } # [ 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 = "INVCTRL Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INVC_A { # [ doc = "0: INVCTRL register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: INVCTRL register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < INVC_A > for bool { # [ inline ( always ) ] fn from ( variant : INVC_A ) -> Self { match variant { INVC_A :: _0 => false , INVC_A :: _1 => true } } } # [ doc = "Reader of field `INVC`" ] pub type INVC_R = crate :: R < bool , INVC_A > ; impl INVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INVC_A { match self . bits { false => INVC_A :: _0 , true => INVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INVC_A :: _1 } } # [ doc = "Write proxy for field `INVC`" ] pub struct INVC_W < 'a > { w : & 'a mut W , } impl < 'a > INVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "INVCTRL register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INVC_A :: _0 ) } # [ doc = "INVCTRL register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INVC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "SWOCTRL Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWOC_A { # [ doc = "0: SWOCTRL register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: SWOCTRL register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < SWOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWOC_A ) -> Self { match variant { SWOC_A :: _0 => false , SWOC_A :: _1 => true } } } # [ doc = "Reader of field `SWOC`" ] pub type SWOC_R = crate :: R < bool , SWOC_A > ; impl SWOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWOC_A { match self . bits { false => SWOC_A :: _0 , true => SWOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWOC_A :: _1 } } # [ doc = "Write proxy for field `SWOC`" ] pub struct SWOC_W < 'a > { w : & 'a mut W , } impl < 'a > SWOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SWOCTRL register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWOC_A :: _0 ) } # [ doc = "SWOCTRL register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWOC_A :: _1 ) } # [ 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 = "Synchronization Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCMODE_A { # [ doc = "0: Legacy PWM synchronization is selected." ] _0 , # [ doc = "1: Enhanced PWM synchronization is selected." ] _1 } impl From < SYNCMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCMODE_A ) -> Self { match variant { SYNCMODE_A :: _0 => false , SYNCMODE_A :: _1 => true } } } # [ doc = "Reader of field `SYNCMODE`" ] pub type SYNCMODE_R = crate :: R < bool , SYNCMODE_A > ; impl SYNCMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCMODE_A { match self . bits { false => SYNCMODE_A :: _0 , true => SYNCMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCMODE_A :: _1 } } # [ doc = "Write proxy for field `SYNCMODE`" ] pub struct SYNCMODE_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Legacy PWM synchronization is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCMODE_A :: _0 ) } # [ doc = "Enhanced PWM synchronization is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCMODE_A :: _1 ) } # [ 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 = "FTM counter synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWRSTCNT_A { # [ doc = "0: The software trigger does not activate the FTM counter synchronization." ] _0 , # [ doc = "1: The software trigger activates the FTM counter synchronization." ] _1 } impl From < SWRSTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : SWRSTCNT_A ) -> Self { match variant { SWRSTCNT_A :: _0 => false , SWRSTCNT_A :: _1 => true } } } # [ doc = "Reader of field `SWRSTCNT`" ] pub type SWRSTCNT_R = crate :: R < bool , SWRSTCNT_A > ; impl SWRSTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWRSTCNT_A { match self . bits { false => SWRSTCNT_A :: _0 , true => SWRSTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWRSTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWRSTCNT_A :: _1 } } # [ doc = "Write proxy for field `SWRSTCNT`" ] pub struct SWRSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > SWRSTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWRSTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWRSTCNT_A :: _0 ) } # [ doc = "The software trigger activates the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWRSTCNT_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "MOD, CNTIN, and CV registers synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWWRBUF_A { # [ doc = "0: The software trigger does not activate MOD, CNTIN, and CV registers synchronization." ] _0 , # [ doc = "1: The software trigger activates MOD, CNTIN, and CV registers synchronization." ] _1 } impl From < SWWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : SWWRBUF_A ) -> Self { match variant { SWWRBUF_A :: _0 => false , SWWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `SWWRBUF`" ] pub type SWWRBUF_R = crate :: R < bool , SWWRBUF_A > ; impl SWWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWWRBUF_A { match self . bits { false => SWWRBUF_A :: _0 , true => SWWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWWRBUF_A :: _1 } } # [ doc = "Write proxy for field `SWWRBUF`" ] pub struct SWWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > SWWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWWRBUF_A :: _0 ) } # [ doc = "The software trigger activates MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWWRBUF_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Output mask synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWOM_A { # [ doc = "0: The software trigger does not activate the OUTMASK register synchronization." ] _0 , # [ doc = "1: The software trigger activates the OUTMASK register synchronization." ] _1 } impl From < SWOM_A > for bool { # [ inline ( always ) ] fn from ( variant : SWOM_A ) -> Self { match variant { SWOM_A :: _0 => false , SWOM_A :: _1 => true } } } # [ doc = "Reader of field `SWOM`" ] pub type SWOM_R = crate :: R < bool , SWOM_A > ; impl SWOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWOM_A { match self . bits { false => SWOM_A :: _0 , true => SWOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWOM_A :: _1 } } # [ doc = "Write proxy for field `SWOM`" ] pub struct SWOM_W < 'a > { w : & 'a mut W , } impl < 'a > SWOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWOM_A :: _0 ) } # [ doc = "The software trigger activates the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWOM_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Inverting control synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWINVC_A { # [ doc = "0: The software trigger does not activate the INVCTRL register synchronization." ] _0 , # [ doc = "1: The software trigger activates the INVCTRL register synchronization." ] _1 } impl From < SWINVC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWINVC_A ) -> Self { match variant { SWINVC_A :: _0 => false , SWINVC_A :: _1 => true } } } # [ doc = "Reader of field `SWINVC`" ] pub type SWINVC_R = crate :: R < bool , SWINVC_A > ; impl SWINVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWINVC_A { match self . bits { false => SWINVC_A :: _0 , true => SWINVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWINVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWINVC_A :: _1 } } # [ doc = "Write proxy for field `SWINVC`" ] pub struct SWINVC_W < 'a > { w : & 'a mut W , } impl < 'a > SWINVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWINVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWINVC_A :: _0 ) } # [ doc = "The software trigger activates the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWINVC_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Software output control synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSOC_A { # [ doc = "0: The software trigger does not activate the SWOCTRL register synchronization." ] _0 , # [ doc = "1: The software trigger activates the SWOCTRL register synchronization." ] _1 } impl From < SWSOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSOC_A ) -> Self { match variant { SWSOC_A :: _0 => false , SWSOC_A :: _1 => true } } } # [ doc = "Reader of field `SWSOC`" ] pub type SWSOC_R = crate :: R < bool , SWSOC_A > ; impl SWSOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSOC_A { match self . bits { false => SWSOC_A :: _0 , true => SWSOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSOC_A :: _1 } } # [ doc = "Write proxy for field `SWSOC`" ] pub struct SWSOC_W < 'a > { w : & 'a mut W , } impl < 'a > SWSOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSOC_A :: _0 ) } # [ doc = "The software trigger activates the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSOC_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "FTM counter synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWRSTCNT_A { # [ doc = "0: A hardware trigger does not activate the FTM counter synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the FTM counter synchronization." ] _1 } impl From < HWRSTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : HWRSTCNT_A ) -> Self { match variant { HWRSTCNT_A :: _0 => false , HWRSTCNT_A :: _1 => true } } } # [ doc = "Reader of field `HWRSTCNT`" ] pub type HWRSTCNT_R = crate :: R < bool , HWRSTCNT_A > ; impl HWRSTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWRSTCNT_A { match self . bits { false => HWRSTCNT_A :: _0 , true => HWRSTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWRSTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWRSTCNT_A :: _1 } } # [ doc = "Write proxy for field `HWRSTCNT`" ] pub struct HWRSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > HWRSTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWRSTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWRSTCNT_A :: _0 ) } # [ doc = "A hardware trigger activates the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWRSTCNT_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWWRBUF_A { # [ doc = "0: A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization." ] _0 , # [ doc = "1: A hardware trigger activates MOD, CNTIN, and CV registers synchronization." ] _1 } impl From < HWWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : HWWRBUF_A ) -> Self { match variant { HWWRBUF_A :: _0 => false , HWWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `HWWRBUF`" ] pub type HWWRBUF_R = crate :: R < bool , HWWRBUF_A > ; impl HWWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWWRBUF_A { match self . bits { false => HWWRBUF_A :: _0 , true => HWWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWWRBUF_A :: _1 } } # [ doc = "Write proxy for field `HWWRBUF`" ] pub struct HWWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > HWWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWWRBUF_A :: _0 ) } # [ doc = "A hardware trigger activates MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWWRBUF_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Output mask synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWOM_A { # [ doc = "0: A hardware trigger does not activate the OUTMASK register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the OUTMASK register synchronization." ] _1 } impl From < HWOM_A > for bool { # [ inline ( always ) ] fn from ( variant : HWOM_A ) -> Self { match variant { HWOM_A :: _0 => false , HWOM_A :: _1 => true } } } # [ doc = "Reader of field `HWOM`" ] pub type HWOM_R = crate :: R < bool , HWOM_A > ; impl HWOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWOM_A { match self . bits { false => HWOM_A :: _0 , true => HWOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWOM_A :: _1 } } # [ doc = "Write proxy for field `HWOM`" ] pub struct HWOM_W < 'a > { w : & 'a mut W , } impl < 'a > HWOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWOM_A :: _0 ) } # [ doc = "A hardware trigger activates the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWOM_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Inverting control synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWINVC_A { # [ doc = "0: A hardware trigger does not activate the INVCTRL register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the INVCTRL register synchronization." ] _1 } impl From < HWINVC_A > for bool { # [ inline ( always ) ] fn from ( variant : HWINVC_A ) -> Self { match variant { HWINVC_A :: _0 => false , HWINVC_A :: _1 => true } } } # [ doc = "Reader of field `HWINVC`" ] pub type HWINVC_R = crate :: R < bool , HWINVC_A > ; impl HWINVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWINVC_A { match self . bits { false => HWINVC_A :: _0 , true => HWINVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWINVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWINVC_A :: _1 } } # [ doc = "Write proxy for field `HWINVC`" ] pub struct HWINVC_W < 'a > { w : & 'a mut W , } impl < 'a > HWINVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWINVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWINVC_A :: _0 ) } # [ doc = "A hardware trigger activates the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWINVC_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Software output control synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWSOC_A { # [ doc = "0: A hardware trigger does not activate the SWOCTRL register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the SWOCTRL register synchronization." ] _1 } impl From < HWSOC_A > for bool { # [ inline ( always ) ] fn from ( variant : HWSOC_A ) -> Self { match variant { HWSOC_A :: _0 => false , HWSOC_A :: _1 => true } } } # [ doc = "Reader of field `HWSOC`" ] pub type HWSOC_R = crate :: R < bool , HWSOC_A > ; impl HWSOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWSOC_A { match self . bits { false => HWSOC_A :: _0 , true => HWSOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWSOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWSOC_A :: _1 } } # [ doc = "Write proxy for field `HWSOC`" ] pub struct HWSOC_W < 'a > { w : & 'a mut W , } impl < 'a > HWSOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWSOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWSOC_A :: _0 ) } # [ doc = "A hardware trigger activates the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWSOC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Hardware Trigger Mode" ] # [ inline ( always ) ] pub fn hwtrigmode ( & self ) -> HWTRIGMODE_R { HWTRIGMODE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - CNTIN Register Synchronization" ] # [ inline ( always ) ] pub fn cntinc ( & self ) -> CNTINC_R { CNTINC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - INVCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn invc ( & self ) -> INVC_R { INVC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - SWOCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn swoc ( & self ) -> SWOC_R { SWOC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Synchronization Mode" ] # [ inline ( always ) ] pub fn syncmode ( & self ) -> SYNCMODE_R { SYNCMODE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - FTM counter synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swrstcnt ( & self ) -> SWRSTCNT_R { SWRSTCNT_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - MOD, CNTIN, and CV registers synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swwrbuf ( & self ) -> SWWRBUF_R { SWWRBUF_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Output mask synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swom ( & self ) -> SWOM_R { SWOM_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Inverting control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swinvc ( & self ) -> SWINVC_R { SWINVC_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Software output control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swsoc ( & self ) -> SWSOC_R { SWSOC_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - FTM counter synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwrstcnt ( & self ) -> HWRSTCNT_R { HWRSTCNT_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwwrbuf ( & self ) -> HWWRBUF_R { HWWRBUF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Output mask synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwom ( & self ) -> HWOM_R { HWOM_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Inverting control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwinvc ( & self ) -> HWINVC_R { HWINVC_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Software output control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwsoc ( & self ) -> HWSOC_R { HWSOC_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Hardware Trigger Mode" ] # [ inline ( always ) ] pub fn hwtrigmode ( & mut self ) -> HWTRIGMODE_W { HWTRIGMODE_W { w : self } } # [ doc = "Bit 2 - CNTIN Register Synchronization" ] # [ inline ( always ) ] pub fn cntinc ( & mut self ) -> CNTINC_W { CNTINC_W { w : self } } # [ doc = "Bit 4 - INVCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn invc ( & mut self ) -> INVC_W { INVC_W { w : self } } # [ doc = "Bit 5 - SWOCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn swoc ( & mut self ) -> SWOC_W { SWOC_W { w : self } } # [ doc = "Bit 7 - Synchronization Mode" ] # [ inline ( always ) ] pub fn syncmode ( & mut self ) -> SYNCMODE_W { SYNCMODE_W { w : self } } # [ doc = "Bit 8 - FTM counter synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swrstcnt ( & mut self ) -> SWRSTCNT_W { SWRSTCNT_W { w : self } } # [ doc = "Bit 9 - MOD, CNTIN, and CV registers synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swwrbuf ( & mut self ) -> SWWRBUF_W { SWWRBUF_W { w : self } } # [ doc = "Bit 10 - Output mask synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swom ( & mut self ) -> SWOM_W { SWOM_W { w : self } } # [ doc = "Bit 11 - Inverting control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swinvc ( & mut self ) -> SWINVC_W { SWINVC_W { w : self } } # [ doc = "Bit 12 - Software output control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swsoc ( & mut self ) -> SWSOC_W { SWSOC_W { w : self } } # [ doc = "Bit 16 - FTM counter synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwrstcnt ( & mut self ) -> HWRSTCNT_W { HWRSTCNT_W { w : self } } # [ doc = "Bit 17 - MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwwrbuf ( & mut self ) -> HWWRBUF_W { HWWRBUF_W { w : self } } # [ doc = "Bit 18 - Output mask synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwom ( & mut self ) -> HWOM_W { HWOM_W { w : self } } # [ doc = "Bit 19 - Inverting control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwinvc ( & mut self ) -> HWINVC_W { HWINVC_W { w : self } } # [ doc = "Bit 20 - Software output control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwsoc ( & mut self ) -> HWSOC_W { HWSOC_W { w : self } } } } # [ doc = "FTM Inverting Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [invctrl](invctrl) module" ] pub type INVCTRL = crate :: Reg < u32 , _INVCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _INVCTRL ; # [ doc = "`read()` method returns [invctrl::R](invctrl::R) reader structure" ] impl crate :: Readable for INVCTRL { } # [ doc = "`write(|w| ..)` method takes [invctrl::W](invctrl::W) writer structure" ] impl crate :: Writable for INVCTRL { } # [ doc = "FTM Inverting Control" ] pub mod invctrl { # [ doc = "Reader of register INVCTRL" ] pub type R = crate :: R < u32 , super :: INVCTRL > ; # [ doc = "Writer for register INVCTRL" ] pub type W = crate :: W < u32 , super :: INVCTRL > ; # [ doc = "Register INVCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: INVCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pair Channels 0 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV0EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV0EN_A ) -> Self { match variant { INV0EN_A :: _0 => false , INV0EN_A :: _1 => true } } } # [ doc = "Reader of field `INV0EN`" ] pub type INV0EN_R = crate :: R < bool , INV0EN_A > ; impl INV0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV0EN_A { match self . bits { false => INV0EN_A :: _0 , true => INV0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV0EN_A :: _1 } } # [ doc = "Write proxy for field `INV0EN`" ] pub struct INV0EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV0EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV0EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pair Channels 1 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV1EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV1EN_A ) -> Self { match variant { INV1EN_A :: _0 => false , INV1EN_A :: _1 => true } } } # [ doc = "Reader of field `INV1EN`" ] pub type INV1EN_R = crate :: R < bool , INV1EN_A > ; impl INV1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV1EN_A { match self . bits { false => INV1EN_A :: _0 , true => INV1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV1EN_A :: _1 } } # [ doc = "Write proxy for field `INV1EN`" ] pub struct INV1EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV1EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV1EN_A :: _1 ) } # [ 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 } } # [ doc = "Pair Channels 2 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV2EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV2EN_A ) -> Self { match variant { INV2EN_A :: _0 => false , INV2EN_A :: _1 => true } } } # [ doc = "Reader of field `INV2EN`" ] pub type INV2EN_R = crate :: R < bool , INV2EN_A > ; impl INV2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV2EN_A { match self . bits { false => INV2EN_A :: _0 , true => INV2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV2EN_A :: _1 } } # [ doc = "Write proxy for field `INV2EN`" ] pub struct INV2EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV2EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV2EN_A :: _1 ) } # [ 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 = "Pair Channels 3 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV3EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV3EN_A ) -> Self { match variant { INV3EN_A :: _0 => false , INV3EN_A :: _1 => true } } } # [ doc = "Reader of field `INV3EN`" ] pub type INV3EN_R = crate :: R < bool , INV3EN_A > ; impl INV3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV3EN_A { match self . bits { false => INV3EN_A :: _0 , true => INV3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV3EN_A :: _1 } } # [ doc = "Write proxy for field `INV3EN`" ] pub struct INV3EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV3EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV3EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Pair Channels 0 Inverting Enable" ] # [ inline ( always ) ] pub fn inv0en ( & self ) -> INV0EN_R { INV0EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pair Channels 1 Inverting Enable" ] # [ inline ( always ) ] pub fn inv1en ( & self ) -> INV1EN_R { INV1EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Pair Channels 2 Inverting Enable" ] # [ inline ( always ) ] pub fn inv2en ( & self ) -> INV2EN_R { INV2EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Pair Channels 3 Inverting Enable" ] # [ inline ( always ) ] pub fn inv3en ( & self ) -> INV3EN_R { INV3EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pair Channels 0 Inverting Enable" ] # [ inline ( always ) ] pub fn inv0en ( & mut self ) -> INV0EN_W { INV0EN_W { w : self } } # [ doc = "Bit 1 - Pair Channels 1 Inverting Enable" ] # [ inline ( always ) ] pub fn inv1en ( & mut self ) -> INV1EN_W { INV1EN_W { w : self } } # [ doc = "Bit 2 - Pair Channels 2 Inverting Enable" ] # [ inline ( always ) ] pub fn inv2en ( & mut self ) -> INV2EN_W { INV2EN_W { w : self } } # [ doc = "Bit 3 - Pair Channels 3 Inverting Enable" ] # [ inline ( always ) ] pub fn inv3en ( & mut self ) -> INV3EN_W { INV3EN_W { w : self } } } } # [ doc = "FTM Software Output Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swoctrl](swoctrl) module" ] pub type SWOCTRL = crate :: Reg < u32 , _SWOCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SWOCTRL ; # [ doc = "`read()` method returns [swoctrl::R](swoctrl::R) reader structure" ] impl crate :: Readable for SWOCTRL { } # [ doc = "`write(|w| ..)` method takes [swoctrl::W](swoctrl::W) writer structure" ] impl crate :: Writable for SWOCTRL { } # [ doc = "FTM Software Output Control" ] pub mod swoctrl { # [ doc = "Reader of register SWOCTRL" ] pub type R = crate :: R < u32 , super :: SWOCTRL > ; # [ doc = "Writer for register SWOCTRL" ] pub type W = crate :: W < u32 , super :: SWOCTRL > ; # [ doc = "Register SWOCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SWOCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH0OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OC_A ) -> Self { match variant { CH0OC_A :: _0 => false , CH0OC_A :: _1 => true } } } # [ doc = "Reader of field `CH0OC`" ] pub type CH0OC_R = crate :: R < bool , CH0OC_A > ; impl CH0OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OC_A { match self . bits { false => CH0OC_A :: _0 , true => CH0OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OC_A :: _1 } } # [ doc = "Write proxy for field `CH0OC`" ] pub struct CH0OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OC_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH1OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OC_A ) -> Self { match variant { CH1OC_A :: _0 => false , CH1OC_A :: _1 => true } } } # [ doc = "Reader of field `CH1OC`" ] pub type CH1OC_R = crate :: R < bool , CH1OC_A > ; impl CH1OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OC_A { match self . bits { false => CH1OC_A :: _0 , true => CH1OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OC_A :: _1 } } # [ doc = "Write proxy for field `CH1OC`" ] pub struct CH1OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OC_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH2OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OC_A ) -> Self { match variant { CH2OC_A :: _0 => false , CH2OC_A :: _1 => true } } } # [ doc = "Reader of field `CH2OC`" ] pub type CH2OC_R = crate :: R < bool , CH2OC_A > ; impl CH2OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OC_A { match self . bits { false => CH2OC_A :: _0 , true => CH2OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OC_A :: _1 } } # [ doc = "Write proxy for field `CH2OC`" ] pub struct CH2OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OC_A :: _1 ) } # [ 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 = "Channel 3 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH3OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OC_A ) -> Self { match variant { CH3OC_A :: _0 => false , CH3OC_A :: _1 => true } } } # [ doc = "Reader of field `CH3OC`" ] pub type CH3OC_R = crate :: R < bool , CH3OC_A > ; impl CH3OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OC_A { match self . bits { false => CH3OC_A :: _0 , true => CH3OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OC_A :: _1 } } # [ doc = "Write proxy for field `CH3OC`" ] pub struct CH3OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH4OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OC_A ) -> Self { match variant { CH4OC_A :: _0 => false , CH4OC_A :: _1 => true } } } # [ doc = "Reader of field `CH4OC`" ] pub type CH4OC_R = crate :: R < bool , CH4OC_A > ; impl CH4OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OC_A { match self . bits { false => CH4OC_A :: _0 , true => CH4OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OC_A :: _1 } } # [ doc = "Write proxy for field `CH4OC`" ] pub struct CH4OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH5OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OC_A ) -> Self { match variant { CH5OC_A :: _0 => false , CH5OC_A :: _1 => true } } } # [ doc = "Reader of field `CH5OC`" ] pub type CH5OC_R = crate :: R < bool , CH5OC_A > ; impl CH5OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OC_A { match self . bits { false => CH5OC_A :: _0 , true => CH5OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OC_A :: _1 } } # [ doc = "Write proxy for field `CH5OC`" ] pub struct CH5OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OC_A :: _1 ) } # [ 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 = "Channel 6 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH6OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OC_A ) -> Self { match variant { CH6OC_A :: _0 => false , CH6OC_A :: _1 => true } } } # [ doc = "Reader of field `CH6OC`" ] pub type CH6OC_R = crate :: R < bool , CH6OC_A > ; impl CH6OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OC_A { match self . bits { false => CH6OC_A :: _0 , true => CH6OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OC_A :: _1 } } # [ doc = "Write proxy for field `CH6OC`" ] pub struct CH6OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OC_A :: _1 ) } # [ 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 = "Channel 7 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH7OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OC_A ) -> Self { match variant { CH7OC_A :: _0 => false , CH7OC_A :: _1 => true } } } # [ doc = "Reader of field `CH7OC`" ] pub type CH7OC_R = crate :: R < bool , CH7OC_A > ; impl CH7OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OC_A { match self . bits { false => CH7OC_A :: _0 , true => CH7OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OC_A :: _1 } } # [ doc = "Write proxy for field `CH7OC`" ] pub struct CH7OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OC_A :: _1 ) } # [ 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 = "Channel 0 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH0OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OCV_A ) -> Self { match variant { CH0OCV_A :: _0 => false , CH0OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH0OCV`" ] pub type CH0OCV_R = crate :: R < bool , CH0OCV_A > ; impl CH0OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OCV_A { match self . bits { false => CH0OCV_A :: _0 , true => CH0OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OCV_A :: _1 } } # [ doc = "Write proxy for field `CH0OCV`" ] pub struct CH0OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OCV_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Channel 1 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH1OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OCV_A ) -> Self { match variant { CH1OCV_A :: _0 => false , CH1OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH1OCV`" ] pub type CH1OCV_R = crate :: R < bool , CH1OCV_A > ; impl CH1OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OCV_A { match self . bits { false => CH1OCV_A :: _0 , true => CH1OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OCV_A :: _1 } } # [ doc = "Write proxy for field `CH1OCV`" ] pub struct CH1OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OCV_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Channel 2 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH2OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OCV_A ) -> Self { match variant { CH2OCV_A :: _0 => false , CH2OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH2OCV`" ] pub type CH2OCV_R = crate :: R < bool , CH2OCV_A > ; impl CH2OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OCV_A { match self . bits { false => CH2OCV_A :: _0 , true => CH2OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OCV_A :: _1 } } # [ doc = "Write proxy for field `CH2OCV`" ] pub struct CH2OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OCV_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Channel 3 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH3OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OCV_A ) -> Self { match variant { CH3OCV_A :: _0 => false , CH3OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH3OCV`" ] pub type CH3OCV_R = crate :: R < bool , CH3OCV_A > ; impl CH3OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OCV_A { match self . bits { false => CH3OCV_A :: _0 , true => CH3OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OCV_A :: _1 } } # [ doc = "Write proxy for field `CH3OCV`" ] pub struct CH3OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OCV_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Channel 4 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH4OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OCV_A ) -> Self { match variant { CH4OCV_A :: _0 => false , CH4OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH4OCV`" ] pub type CH4OCV_R = crate :: R < bool , CH4OCV_A > ; impl CH4OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OCV_A { match self . bits { false => CH4OCV_A :: _0 , true => CH4OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OCV_A :: _1 } } # [ doc = "Write proxy for field `CH4OCV`" ] pub struct CH4OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OCV_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Channel 5 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH5OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OCV_A ) -> Self { match variant { CH5OCV_A :: _0 => false , CH5OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH5OCV`" ] pub type CH5OCV_R = crate :: R < bool , CH5OCV_A > ; impl CH5OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OCV_A { match self . bits { false => CH5OCV_A :: _0 , true => CH5OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OCV_A :: _1 } } # [ doc = "Write proxy for field `CH5OCV`" ] pub struct CH5OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OCV_A :: _1 ) } # [ 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 = "Channel 6 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH6OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OCV_A ) -> Self { match variant { CH6OCV_A :: _0 => false , CH6OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH6OCV`" ] pub type CH6OCV_R = crate :: R < bool , CH6OCV_A > ; impl CH6OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OCV_A { match self . bits { false => CH6OCV_A :: _0 , true => CH6OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OCV_A :: _1 } } # [ doc = "Write proxy for field `CH6OCV`" ] pub struct CH6OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OCV_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Channel 7 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH7OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OCV_A ) -> Self { match variant { CH7OCV_A :: _0 => false , CH7OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH7OCV`" ] pub type CH7OCV_R = crate :: R < bool , CH7OCV_A > ; impl CH7OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OCV_A { match self . bits { false => CH7OCV_A :: _0 , true => CH7OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OCV_A :: _1 } } # [ doc = "Write proxy for field `CH7OCV`" ] pub struct CH7OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OCV_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch0oc ( & self ) -> CH0OC_R { CH0OC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch1oc ( & self ) -> CH1OC_R { CH1OC_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch2oc ( & self ) -> CH2OC_R { CH2OC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch3oc ( & self ) -> CH3OC_R { CH3OC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch4oc ( & self ) -> CH4OC_R { CH4OC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch5oc ( & self ) -> CH5OC_R { CH5OC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch6oc ( & self ) -> CH6OC_R { CH6OC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch7oc ( & self ) -> CH7OC_R { CH7OC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Channel 0 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch0ocv ( & self ) -> CH0OCV_R { CH0OCV_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Channel 1 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch1ocv ( & self ) -> CH1OCV_R { CH1OCV_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Channel 2 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch2ocv ( & self ) -> CH2OCV_R { CH2OCV_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Channel 3 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch3ocv ( & self ) -> CH3OCV_R { CH3OCV_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Channel 4 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch4ocv ( & self ) -> CH4OCV_R { CH4OCV_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Channel 5 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch5ocv ( & self ) -> CH5OCV_R { CH5OCV_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Channel 6 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch6ocv ( & self ) -> CH6OCV_R { CH6OCV_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Channel 7 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch7ocv ( & self ) -> CH7OCV_R { CH7OCV_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch0oc ( & mut self ) -> CH0OC_W { CH0OC_W { w : self } } # [ doc = "Bit 1 - Channel 1 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch1oc ( & mut self ) -> CH1OC_W { CH1OC_W { w : self } } # [ doc = "Bit 2 - Channel 2 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch2oc ( & mut self ) -> CH2OC_W { CH2OC_W { w : self } } # [ doc = "Bit 3 - Channel 3 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch3oc ( & mut self ) -> CH3OC_W { CH3OC_W { w : self } } # [ doc = "Bit 4 - Channel 4 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch4oc ( & mut self ) -> CH4OC_W { CH4OC_W { w : self } } # [ doc = "Bit 5 - Channel 5 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch5oc ( & mut self ) -> CH5OC_W { CH5OC_W { w : self } } # [ doc = "Bit 6 - Channel 6 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch6oc ( & mut self ) -> CH6OC_W { CH6OC_W { w : self } } # [ doc = "Bit 7 - Channel 7 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch7oc ( & mut self ) -> CH7OC_W { CH7OC_W { w : self } } # [ doc = "Bit 8 - Channel 0 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch0ocv ( & mut self ) -> CH0OCV_W { CH0OCV_W { w : self } } # [ doc = "Bit 9 - Channel 1 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch1ocv ( & mut self ) -> CH1OCV_W { CH1OCV_W { w : self } } # [ doc = "Bit 10 - Channel 2 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch2ocv ( & mut self ) -> CH2OCV_W { CH2OCV_W { w : self } } # [ doc = "Bit 11 - Channel 3 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch3ocv ( & mut self ) -> CH3OCV_W { CH3OCV_W { w : self } } # [ doc = "Bit 12 - Channel 4 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch4ocv ( & mut self ) -> CH4OCV_W { CH4OCV_W { w : self } } # [ doc = "Bit 13 - Channel 5 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch5ocv ( & mut self ) -> CH5OCV_W { CH5OCV_W { w : self } } # [ doc = "Bit 14 - Channel 6 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch6ocv ( & mut self ) -> CH6OCV_W { CH6OCV_W { w : self } } # [ doc = "Bit 15 - Channel 7 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch7ocv ( & mut self ) -> CH7OCV_W { CH7OCV_W { w : self } } } } # [ doc = "FTM PWM Load\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwmload](pwmload) module" ] pub type PWMLOAD = crate :: Reg < u32 , _PWMLOAD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PWMLOAD ; # [ doc = "`read()` method returns [pwmload::R](pwmload::R) reader structure" ] impl crate :: Readable for PWMLOAD { } # [ doc = "`write(|w| ..)` method takes [pwmload::W](pwmload::W) writer structure" ] impl crate :: Writable for PWMLOAD { } # [ doc = "FTM PWM Load" ] pub mod pwmload { # [ doc = "Reader of register PWMLOAD" ] pub type R = crate :: R < u32 , super :: PWMLOAD > ; # [ doc = "Writer for register PWMLOAD" ] pub type W = crate :: W < u32 , super :: PWMLOAD > ; # [ doc = "Register PWMLOAD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PWMLOAD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH0SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0SEL_A ) -> Self { match variant { CH0SEL_A :: _0 => false , CH0SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH0SEL`" ] pub type CH0SEL_R = crate :: R < bool , CH0SEL_A > ; impl CH0SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0SEL_A { match self . bits { false => CH0SEL_A :: _0 , true => CH0SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0SEL_A :: _1 } } # [ doc = "Write proxy for field `CH0SEL`" ] pub struct CH0SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0SEL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH1SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1SEL_A ) -> Self { match variant { CH1SEL_A :: _0 => false , CH1SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH1SEL`" ] pub type CH1SEL_R = crate :: R < bool , CH1SEL_A > ; impl CH1SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1SEL_A { match self . bits { false => CH1SEL_A :: _0 , true => CH1SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1SEL_A :: _1 } } # [ doc = "Write proxy for field `CH1SEL`" ] pub struct CH1SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1SEL_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH2SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2SEL_A ) -> Self { match variant { CH2SEL_A :: _0 => false , CH2SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH2SEL`" ] pub type CH2SEL_R = crate :: R < bool , CH2SEL_A > ; impl CH2SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2SEL_A { match self . bits { false => CH2SEL_A :: _0 , true => CH2SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2SEL_A :: _1 } } # [ doc = "Write proxy for field `CH2SEL`" ] pub struct CH2SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH2SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2SEL_A :: _1 ) } # [ 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 = "Channel 3 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH3SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3SEL_A ) -> Self { match variant { CH3SEL_A :: _0 => false , CH3SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH3SEL`" ] pub type CH3SEL_R = crate :: R < bool , CH3SEL_A > ; impl CH3SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3SEL_A { match self . bits { false => CH3SEL_A :: _0 , true => CH3SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3SEL_A :: _1 } } # [ doc = "Write proxy for field `CH3SEL`" ] pub struct CH3SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH3SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3SEL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH4SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4SEL_A ) -> Self { match variant { CH4SEL_A :: _0 => false , CH4SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH4SEL`" ] pub type CH4SEL_R = crate :: R < bool , CH4SEL_A > ; impl CH4SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4SEL_A { match self . bits { false => CH4SEL_A :: _0 , true => CH4SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4SEL_A :: _1 } } # [ doc = "Write proxy for field `CH4SEL`" ] pub struct CH4SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH4SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4SEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH5SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5SEL_A ) -> Self { match variant { CH5SEL_A :: _0 => false , CH5SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH5SEL`" ] pub type CH5SEL_R = crate :: R < bool , CH5SEL_A > ; impl CH5SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5SEL_A { match self . bits { false => CH5SEL_A :: _0 , true => CH5SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5SEL_A :: _1 } } # [ doc = "Write proxy for field `CH5SEL`" ] pub struct CH5SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH5SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5SEL_A :: _1 ) } # [ 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 = "Channel 6 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH6SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6SEL_A ) -> Self { match variant { CH6SEL_A :: _0 => false , CH6SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH6SEL`" ] pub type CH6SEL_R = crate :: R < bool , CH6SEL_A > ; impl CH6SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6SEL_A { match self . bits { false => CH6SEL_A :: _0 , true => CH6SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6SEL_A :: _1 } } # [ doc = "Write proxy for field `CH6SEL`" ] pub struct CH6SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH6SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6SEL_A :: _1 ) } # [ 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 = "Channel 7 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH7SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7SEL_A ) -> Self { match variant { CH7SEL_A :: _0 => false , CH7SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH7SEL`" ] pub type CH7SEL_R = crate :: R < bool , CH7SEL_A > ; impl CH7SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7SEL_A { match self . bits { false => CH7SEL_A :: _0 , true => CH7SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7SEL_A :: _1 } } # [ doc = "Write proxy for field `CH7SEL`" ] pub struct CH7SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH7SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7SEL_A :: _1 ) } # [ 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 = "Load Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LDOK_A { # [ doc = "0: Loading updated values is disabled." ] _0 , # [ doc = "1: Loading updated values is enabled." ] _1 } impl From < LDOK_A > for bool { # [ inline ( always ) ] fn from ( variant : LDOK_A ) -> Self { match variant { LDOK_A :: _0 => false , LDOK_A :: _1 => true } } } # [ doc = "Reader of field `LDOK`" ] pub type LDOK_R = crate :: R < bool , LDOK_A > ; impl LDOK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LDOK_A { match self . bits { false => LDOK_A :: _0 , true => LDOK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LDOK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LDOK_A :: _1 } } # [ doc = "Write proxy for field `LDOK`" ] pub struct LDOK_W < 'a > { w : & 'a mut W , } impl < 'a > LDOK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LDOK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loading updated values is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LDOK_A :: _0 ) } # [ doc = "Loading updated values is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LDOK_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Select" ] # [ inline ( always ) ] pub fn ch0sel ( & self ) -> CH0SEL_R { CH0SEL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Select" ] # [ inline ( always ) ] pub fn ch1sel ( & self ) -> CH1SEL_R { CH1SEL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Select" ] # [ inline ( always ) ] pub fn ch2sel ( & self ) -> CH2SEL_R { CH2SEL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Select" ] # [ inline ( always ) ] pub fn ch3sel ( & self ) -> CH3SEL_R { CH3SEL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Select" ] # [ inline ( always ) ] pub fn ch4sel ( & self ) -> CH4SEL_R { CH4SEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Select" ] # [ inline ( always ) ] pub fn ch5sel ( & self ) -> CH5SEL_R { CH5SEL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Select" ] # [ inline ( always ) ] pub fn ch6sel ( & self ) -> CH6SEL_R { CH6SEL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Select" ] # [ inline ( always ) ] pub fn ch7sel ( & self ) -> CH7SEL_R { CH7SEL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Load Enable" ] # [ inline ( always ) ] pub fn ldok ( & self ) -> LDOK_R { LDOK_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Select" ] # [ inline ( always ) ] pub fn ch0sel ( & mut self ) -> CH0SEL_W { CH0SEL_W { w : self } } # [ doc = "Bit 1 - Channel 1 Select" ] # [ inline ( always ) ] pub fn ch1sel ( & mut self ) -> CH1SEL_W { CH1SEL_W { w : self } } # [ doc = "Bit 2 - Channel 2 Select" ] # [ inline ( always ) ] pub fn ch2sel ( & mut self ) -> CH2SEL_W { CH2SEL_W { w : self } } # [ doc = "Bit 3 - Channel 3 Select" ] # [ inline ( always ) ] pub fn ch3sel ( & mut self ) -> CH3SEL_W { CH3SEL_W { w : self } } # [ doc = "Bit 4 - Channel 4 Select" ] # [ inline ( always ) ] pub fn ch4sel ( & mut self ) -> CH4SEL_W { CH4SEL_W { w : self } } # [ doc = "Bit 5 - Channel 5 Select" ] # [ inline ( always ) ] pub fn ch5sel ( & mut self ) -> CH5SEL_W { CH5SEL_W { w : self } } # [ doc = "Bit 6 - Channel 6 Select" ] # [ inline ( always ) ] pub fn ch6sel ( & mut self ) -> CH6SEL_W { CH6SEL_W { w : self } } # [ doc = "Bit 7 - Channel 7 Select" ] # [ inline ( always ) ] pub fn ch7sel ( & mut self ) -> CH7SEL_W { CH7SEL_W { w : self } } # [ doc = "Bit 9 - Load Enable" ] # [ inline ( always ) ] pub fn ldok ( & mut self ) -> LDOK_W { LDOK_W { w : self } } } } } # [ doc = "FlexTimer Module" ] pub struct FTM1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for FTM1 { } impl FTM1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const ftm1 :: RegisterBlock { 0x4003_9000 as * const _ } } impl Deref for FTM1 { type Target = ftm1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * FTM1 :: ptr ( ) } } } # [ doc = "FlexTimer Module" ] pub mod ftm1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Status And Control" ] pub sc : SC , # [ doc = "0x04 - Counter" ] pub cnt : CNT , # [ doc = "0x08 - Modulo" ] pub mod_ : MOD , # [ doc = "0x0c - Channel (n) Status And Control" ] pub c0sc : CSC , # [ doc = "0x10 - Channel (n) Value" ] pub c0v : CV , # [ doc = "0x14 - Channel (n) Status And Control" ] pub c1sc : CSC , # [ doc = "0x18 - Channel (n) Value" ] pub c1v : CV , _reserved7 : [ u8 ; 48usize ] , # [ doc = "0x4c - Counter Initial Value" ] pub cntin : CNTIN , # [ doc = "0x50 - Capture And Compare Status" ] pub status : STATUS , # [ doc = "0x54 - Features Mode Selection" ] pub mode : MODE , # [ doc = "0x58 - Synchronization" ] pub sync : SYNC , # [ doc = "0x5c - Initial State For Channels Output" ] pub outinit : OUTINIT , # [ doc = "0x60 - Output Mask" ] pub outmask : OUTMASK , # [ doc = "0x64 - Function For Linked Channels" ] pub combine : COMBINE , # [ doc = "0x68 - Deadtime Insertion Control" ] pub deadtime : DEADTIME , # [ doc = "0x6c - FTM External Trigger" ] pub exttrig : EXTTRIG , # [ doc = "0x70 - Channels Polarity" ] pub pol : POL , # [ doc = "0x74 - Fault Mode Status" ] pub fms : FMS , # [ doc = "0x78 - Input Capture Filter Control" ] pub filter : FILTER , # [ doc = "0x7c - Fault Control" ] pub fltctrl : FLTCTRL , # [ doc = "0x80 - Quadrature Decoder Control And Status" ] pub qdctrl : QDCTRL , # [ doc = "0x84 - Configuration" ] pub conf : CONF , # [ doc = "0x88 - FTM Fault Input Polarity" ] pub fltpol : FLTPOL , # [ doc = "0x8c - Synchronization Configuration" ] pub synconf : SYNCONF , # [ doc = "0x90 - FTM Inverting Control" ] pub invctrl : INVCTRL , # [ doc = "0x94 - FTM Software Output Control" ] pub swoctrl : SWOCTRL , # [ doc = "0x98 - FTM PWM Load" ] pub pwmload : PWMLOAD , } # [ doc = "Status And Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u32 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "Status And Control" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u32 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u32 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Prescale Factor Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Divide by 1" ] _000 , # [ doc = "1: Divide by 2" ] _001 , # [ doc = "2: Divide by 4" ] _010 , # [ doc = "3: Divide by 8" ] _011 , # [ doc = "4: Divide by 16" ] _100 , # [ doc = "5: Divide by 32" ] _101 , # [ doc = "6: Divide by 64" ] _110 , # [ doc = "7: Divide by 128" ] _111 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _000 => 0 , PS_A :: _001 => 1 , PS_A :: _010 => 2 , PS_A :: _011 => 3 , PS_A :: _100 => 4 , PS_A :: _101 => 5 , PS_A :: _110 => 6 , PS_A :: _111 => 7 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _000 , 1 => PS_A :: _001 , 2 => PS_A :: _010 , 3 => PS_A :: _011 , 4 => PS_A :: _100 , 5 => PS_A :: _101 , 6 => PS_A :: _110 , 7 => PS_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PS_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PS_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PS_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PS_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PS_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PS_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PS_A :: _111 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide by 1" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PS_A :: _000 ) } # [ doc = "Divide by 2" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PS_A :: _001 ) } # [ doc = "Divide by 4" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PS_A :: _010 ) } # [ doc = "Divide by 8" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PS_A :: _011 ) } # [ doc = "Divide by 16" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PS_A :: _100 ) } # [ doc = "Divide by 32" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PS_A :: _101 ) } # [ doc = "Divide by 64" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PS_A :: _110 ) } # [ doc = "Divide by 128" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PS_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Clock Source Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKS_A { # [ doc = "0: No clock selected. This in effect disables the FTM counter." ] _00 , # [ doc = "1: System clock" ] _01 , # [ doc = "2: Fixed frequency clock" ] _10 , # [ doc = "3: External clock" ] _11 } impl From < CLKS_A > for u8 { # [ inline ( always ) ] fn from ( variant : CLKS_A ) -> Self { match variant { CLKS_A :: _00 => 0 , CLKS_A :: _01 => 1 , CLKS_A :: _10 => 2 , CLKS_A :: _11 => 3 } } } # [ doc = "Reader of field `CLKS`" ] pub type CLKS_R = crate :: R < u8 , CLKS_A > ; impl CLKS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKS_A { match self . bits { 0 => CLKS_A :: _00 , 1 => CLKS_A :: _01 , 2 => CLKS_A :: _10 , 3 => CLKS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CLKS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CLKS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CLKS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CLKS_A :: _11 } } # [ doc = "Write proxy for field `CLKS`" ] pub struct CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > CLKS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No clock selected. This in effect disables the FTM counter." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _00 ) } # [ doc = "System clock" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _01 ) } # [ doc = "Fixed frequency clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _10 ) } # [ doc = "External clock" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 3 ) ) | ( ( ( value as u32 ) & 0x03 ) << 3 ) ; self . w } } # [ doc = "Center-Aligned PWM Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPWMS_A { # [ doc = "0: FTM counter operates in Up Counting mode." ] _0 , # [ doc = "1: FTM counter operates in Up-Down Counting mode." ] _1 } impl From < CPWMS_A > for bool { # [ inline ( always ) ] fn from ( variant : CPWMS_A ) -> Self { match variant { CPWMS_A :: _0 => false , CPWMS_A :: _1 => true } } } # [ doc = "Reader of field `CPWMS`" ] pub type CPWMS_R = crate :: R < bool , CPWMS_A > ; impl CPWMS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPWMS_A { match self . bits { false => CPWMS_A :: _0 , true => CPWMS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPWMS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPWMS_A :: _1 } } # [ doc = "Write proxy for field `CPWMS`" ] pub struct CPWMS_W < 'a > { w : & 'a mut W , } impl < 'a > CPWMS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPWMS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter operates in Up Counting mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _0 ) } # [ doc = "FTM counter operates in Up-Down Counting mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _1 ) } # [ 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 = "Timer Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOIE_A { # [ doc = "0: Disable TOF interrupts. Use software polling." ] _0 , # [ doc = "1: Enable TOF interrupts. An interrupt is generated when TOF equals one." ] _1 } impl From < TOIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TOIE_A ) -> Self { match variant { TOIE_A :: _0 => false , TOIE_A :: _1 => true } } } # [ doc = "Reader of field `TOIE`" ] pub type TOIE_R = crate :: R < bool , TOIE_A > ; impl TOIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOIE_A { match self . bits { false => TOIE_A :: _0 , true => TOIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOIE_A :: _1 } } # [ doc = "Write proxy for field `TOIE`" ] pub struct TOIE_W < 'a > { w : & 'a mut W , } impl < 'a > TOIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable TOF interrupts. Use software polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _0 ) } # [ doc = "Enable TOF interrupts. An interrupt is generated when TOF equals one." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _1 ) } # [ 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 = "Timer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: FTM counter has not overflowed." ] _0 , # [ doc = "1: FTM counter has overflowed." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Write proxy for field `TOF`" ] pub struct TOF_W < 'a > { w : & 'a mut W , } impl < 'a > TOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter has not overflowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _0 ) } # [ doc = "FTM counter has overflowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:4 - Clock Source Selection" ] # [ inline ( always ) ] pub fn clks ( & self ) -> CLKS_R { CLKS_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & self ) -> CPWMS_R { CPWMS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & self ) -> TOIE_R { TOIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bits 3:4 - Clock Source Selection" ] # [ inline ( always ) ] pub fn clks ( & mut self ) -> CLKS_W { CLKS_W { w : self } } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & mut self ) -> CPWMS_W { CPWMS_W { w : self } } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & mut self ) -> TOIE_W { TOIE_W { w : self } } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & mut self ) -> TOF_W { TOF_W { w : self } } } } # [ doc = "Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module" ] pub type CNT = crate :: Reg < u32 , _CNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNT ; # [ doc = "`read()` method returns [cnt::R](cnt::R) reader structure" ] impl crate :: Readable for CNT { } # [ doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure" ] impl crate :: Writable for CNT { } # [ doc = "Counter" ] pub mod cnt { # [ doc = "Reader of register CNT" ] pub type R = crate :: R < u32 , super :: CNT > ; # [ doc = "Writer for register CNT" ] pub type W = crate :: W < u32 , super :: CNT > ; # [ doc = "Register CNT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `COUNT`" ] pub struct COUNT_W < 'a > { w : & 'a mut W , } impl < 'a > COUNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn count ( & mut self ) -> COUNT_W { COUNT_W { w : self } } } } # [ doc = "Modulo\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mod_](mod_) module" ] pub type MOD = crate :: Reg < u32 , _MOD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MOD ; # [ doc = "`read()` method returns [mod_::R](mod_::R) reader structure" ] impl crate :: Readable for MOD { } # [ doc = "`write(|w| ..)` method takes [mod_::W](mod_::W) writer structure" ] impl crate :: Writable for MOD { } # [ doc = "Modulo" ] pub mod mod_ { # [ doc = "Reader of register MOD" ] pub type R = crate :: R < u32 , super :: MOD > ; # [ doc = "Writer for register MOD" ] pub type W = crate :: W < u32 , super :: MOD > ; # [ doc = "Register MOD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MOD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MOD`" ] pub type MOD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MOD`" ] pub struct MOD_W < 'a > { w : & 'a mut W , } impl < 'a > MOD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Modulo Value" ] # [ inline ( always ) ] pub fn mod_ ( & self ) -> MOD_R { MOD_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Modulo Value" ] # [ inline ( always ) ] pub fn mod_ ( & mut self ) -> MOD_W { MOD_W { w : self } } } } # [ doc = "Channel (n) Status And Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csc](csc) module" ] pub type CSC = crate :: Reg < u32 , _CSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSC ; # [ doc = "`read()` method returns [csc::R](csc::R) reader structure" ] impl crate :: Readable for CSC { } # [ doc = "`write(|w| ..)` method takes [csc::W](csc::W) writer structure" ] impl crate :: Writable for CSC { } # [ doc = "Channel (n) Status And Control" ] pub mod csc { # [ doc = "Reader of register C%sSC" ] pub type R = crate :: R < u32 , super :: CSC > ; # [ doc = "Writer for register C%sSC" ] pub type W = crate :: W < u32 , super :: CSC > ; # [ doc = "Register C%sSC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Disable DMA transfers." ] _0 , # [ doc = "1: Enable DMA transfers." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable DMA transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Enable DMA transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ELSA`" ] pub type ELSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSA`" ] pub struct ELSA_W < 'a > { w : & 'a mut W , } impl < 'a > ELSA_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 = "Reader of field `ELSB`" ] pub type ELSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSB`" ] pub struct ELSB_W < 'a > { w : & 'a mut W , } impl < 'a > ELSB_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `MSA`" ] pub type MSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSA`" ] pub struct MSA_W < 'a > { w : & 'a mut W , } impl < 'a > MSA_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `MSB`" ] pub type MSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSB`" ] pub struct MSB_W < 'a > { w : & 'a mut W , } impl < 'a > MSB_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 = "Channel Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHIE_A { # [ doc = "0: Disable channel interrupts. Use software polling." ] _0 , # [ doc = "1: Enable channel interrupts." ] _1 } impl From < CHIE_A > for bool { # [ inline ( always ) ] fn from ( variant : CHIE_A ) -> Self { match variant { CHIE_A :: _0 => false , CHIE_A :: _1 => true } } } # [ doc = "Reader of field `CHIE`" ] pub type CHIE_R = crate :: R < bool , CHIE_A > ; impl CHIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHIE_A { match self . bits { false => CHIE_A :: _0 , true => CHIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHIE_A :: _1 } } # [ doc = "Write proxy for field `CHIE`" ] pub struct CHIE_W < 'a > { w : & 'a mut W , } impl < 'a > CHIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable channel interrupts. Use software polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _0 ) } # [ doc = "Enable channel interrupts." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _1 ) } # [ 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 = "Channel Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHF_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CHF_A > for bool { # [ inline ( always ) ] fn from ( variant : CHF_A ) -> Self { match variant { CHF_A :: _0 => false , CHF_A :: _1 => true } } } # [ doc = "Reader of field `CHF`" ] pub type CHF_R = crate :: R < bool , CHF_A > ; impl CHF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHF_A { match self . bits { false => CHF_A :: _0 , true => CHF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHF_A :: _1 } } # [ doc = "Write proxy for field `CHF`" ] pub struct CHF_W < 'a > { w : & 'a mut W , } impl < 'a > CHF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & self ) -> ELSA_R { ELSA_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & self ) -> ELSB_R { ELSB_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & self ) -> MSA_R { MSA_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & self ) -> MSB_R { MSB_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & self ) -> CHIE_R { CHIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & self ) -> CHF_R { CHF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & mut self ) -> ELSA_W { ELSA_W { w : self } } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & mut self ) -> ELSB_W { ELSB_W { w : self } } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & mut self ) -> MSA_W { MSA_W { w : self } } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & mut self ) -> MSB_W { MSB_W { w : self } } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & mut self ) -> CHIE_W { CHIE_W { w : self } } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & mut self ) -> CHF_W { CHF_W { w : self } } } } # [ doc = "Channel (n) Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cv](cv) module" ] pub type CV = crate :: Reg < u32 , _CV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CV ; # [ doc = "`read()` method returns [cv::R](cv::R) reader structure" ] impl crate :: Readable for CV { } # [ doc = "`write(|w| ..)` method takes [cv::W](cv::W) writer structure" ] impl crate :: Writable for CV { } # [ doc = "Channel (n) Value" ] pub mod cv { # [ doc = "Reader of register C%sV" ] pub type R = crate :: R < u32 , super :: CV > ; # [ doc = "Writer for register C%sV" ] pub type W = crate :: W < u32 , super :: CV > ; # [ doc = "Register C%sV `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CV { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VAL`" ] pub type VAL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `VAL`" ] pub struct VAL_W < 'a > { w : & 'a mut W , } impl < 'a > VAL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & self ) -> VAL_R { VAL_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & mut self ) -> VAL_W { VAL_W { w : self } } } } # [ doc = "Counter Initial Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cntin](cntin) module" ] pub type CNTIN = crate :: Reg < u32 , _CNTIN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNTIN ; # [ doc = "`read()` method returns [cntin::R](cntin::R) reader structure" ] impl crate :: Readable for CNTIN { } # [ doc = "`write(|w| ..)` method takes [cntin::W](cntin::W) writer structure" ] impl crate :: Writable for CNTIN { } # [ doc = "Counter Initial Value" ] pub mod cntin { # [ doc = "Reader of register CNTIN" ] pub type R = crate :: R < u32 , super :: CNTIN > ; # [ doc = "Writer for register CNTIN" ] pub type W = crate :: W < u32 , super :: CNTIN > ; # [ doc = "Register CNTIN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNTIN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Initial Value Of The FTM Counter" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Initial Value Of The FTM Counter" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } } } # [ doc = "Capture And Compare Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "`write(|w| ..)` method takes [status::W](status::W) writer structure" ] impl crate :: Writable for STATUS { } # [ doc = "Capture And Compare Status" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Writer for register STATUS" ] pub type W = crate :: W < u32 , super :: STATUS > ; # [ doc = "Register STATUS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: STATUS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH0F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0F_A ) -> Self { match variant { CH0F_A :: _0 => false , CH0F_A :: _1 => true } } } # [ doc = "Reader of field `CH0F`" ] pub type CH0F_R = crate :: R < bool , CH0F_A > ; impl CH0F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0F_A { match self . bits { false => CH0F_A :: _0 , true => CH0F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0F_A :: _1 } } # [ doc = "Write proxy for field `CH0F`" ] pub struct CH0F_W < 'a > { w : & 'a mut W , } impl < 'a > CH0F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH1F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1F_A ) -> Self { match variant { CH1F_A :: _0 => false , CH1F_A :: _1 => true } } } # [ doc = "Reader of field `CH1F`" ] pub type CH1F_R = crate :: R < bool , CH1F_A > ; impl CH1F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1F_A { match self . bits { false => CH1F_A :: _0 , true => CH1F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1F_A :: _1 } } # [ doc = "Write proxy for field `CH1F`" ] pub struct CH1F_W < 'a > { w : & 'a mut W , } impl < 'a > CH1F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH2F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2F_A ) -> Self { match variant { CH2F_A :: _0 => false , CH2F_A :: _1 => true } } } # [ doc = "Reader of field `CH2F`" ] pub type CH2F_R = crate :: R < bool , CH2F_A > ; impl CH2F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2F_A { match self . bits { false => CH2F_A :: _0 , true => CH2F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2F_A :: _1 } } # [ doc = "Write proxy for field `CH2F`" ] pub struct CH2F_W < 'a > { w : & 'a mut W , } impl < 'a > CH2F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2F_A :: _1 ) } # [ 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 = "Channel 3 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH3F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3F_A ) -> Self { match variant { CH3F_A :: _0 => false , CH3F_A :: _1 => true } } } # [ doc = "Reader of field `CH3F`" ] pub type CH3F_R = crate :: R < bool , CH3F_A > ; impl CH3F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3F_A { match self . bits { false => CH3F_A :: _0 , true => CH3F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3F_A :: _1 } } # [ doc = "Write proxy for field `CH3F`" ] pub struct CH3F_W < 'a > { w : & 'a mut W , } impl < 'a > CH3F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3F_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH4F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4F_A ) -> Self { match variant { CH4F_A :: _0 => false , CH4F_A :: _1 => true } } } # [ doc = "Reader of field `CH4F`" ] pub type CH4F_R = crate :: R < bool , CH4F_A > ; impl CH4F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4F_A { match self . bits { false => CH4F_A :: _0 , true => CH4F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4F_A :: _1 } } # [ doc = "Write proxy for field `CH4F`" ] pub struct CH4F_W < 'a > { w : & 'a mut W , } impl < 'a > CH4F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4F_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH5F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5F_A ) -> Self { match variant { CH5F_A :: _0 => false , CH5F_A :: _1 => true } } } # [ doc = "Reader of field `CH5F`" ] pub type CH5F_R = crate :: R < bool , CH5F_A > ; impl CH5F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5F_A { match self . bits { false => CH5F_A :: _0 , true => CH5F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5F_A :: _1 } } # [ doc = "Write proxy for field `CH5F`" ] pub struct CH5F_W < 'a > { w : & 'a mut W , } impl < 'a > CH5F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5F_A :: _1 ) } # [ 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 = "Channel 6 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH6F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6F_A ) -> Self { match variant { CH6F_A :: _0 => false , CH6F_A :: _1 => true } } } # [ doc = "Reader of field `CH6F`" ] pub type CH6F_R = crate :: R < bool , CH6F_A > ; impl CH6F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6F_A { match self . bits { false => CH6F_A :: _0 , true => CH6F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6F_A :: _1 } } # [ doc = "Write proxy for field `CH6F`" ] pub struct CH6F_W < 'a > { w : & 'a mut W , } impl < 'a > CH6F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6F_A :: _1 ) } # [ 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 = "Channel 7 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH7F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7F_A ) -> Self { match variant { CH7F_A :: _0 => false , CH7F_A :: _1 => true } } } # [ doc = "Reader of field `CH7F`" ] pub type CH7F_R = crate :: R < bool , CH7F_A > ; impl CH7F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7F_A { match self . bits { false => CH7F_A :: _0 , true => CH7F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7F_A :: _1 } } # [ doc = "Write proxy for field `CH7F`" ] pub struct CH7F_W < 'a > { w : & 'a mut W , } impl < 'a > CH7F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7F_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & self ) -> CH0F_R { CH0F_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & self ) -> CH1F_R { CH1F_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Flag" ] # [ inline ( always ) ] pub fn ch2f ( & self ) -> CH2F_R { CH2F_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Flag" ] # [ inline ( always ) ] pub fn ch3f ( & self ) -> CH3F_R { CH3F_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Flag" ] # [ inline ( always ) ] pub fn ch4f ( & self ) -> CH4F_R { CH4F_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Flag" ] # [ inline ( always ) ] pub fn ch5f ( & self ) -> CH5F_R { CH5F_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Flag" ] # [ inline ( always ) ] pub fn ch6f ( & self ) -> CH6F_R { CH6F_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Flag" ] # [ inline ( always ) ] pub fn ch7f ( & self ) -> CH7F_R { CH7F_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & mut self ) -> CH0F_W { CH0F_W { w : self } } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & mut self ) -> CH1F_W { CH1F_W { w : self } } # [ doc = "Bit 2 - Channel 2 Flag" ] # [ inline ( always ) ] pub fn ch2f ( & mut self ) -> CH2F_W { CH2F_W { w : self } } # [ doc = "Bit 3 - Channel 3 Flag" ] # [ inline ( always ) ] pub fn ch3f ( & mut self ) -> CH3F_W { CH3F_W { w : self } } # [ doc = "Bit 4 - Channel 4 Flag" ] # [ inline ( always ) ] pub fn ch4f ( & mut self ) -> CH4F_W { CH4F_W { w : self } } # [ doc = "Bit 5 - Channel 5 Flag" ] # [ inline ( always ) ] pub fn ch5f ( & mut self ) -> CH5F_W { CH5F_W { w : self } } # [ doc = "Bit 6 - Channel 6 Flag" ] # [ inline ( always ) ] pub fn ch6f ( & mut self ) -> CH6F_W { CH6F_W { w : self } } # [ doc = "Bit 7 - Channel 7 Flag" ] # [ inline ( always ) ] pub fn ch7f ( & mut self ) -> CH7F_W { CH7F_W { w : self } } } } # [ doc = "Features Mode Selection\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mode](mode) module" ] pub type MODE = crate :: Reg < u32 , _MODE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODE ; # [ doc = "`read()` method returns [mode::R](mode::R) reader structure" ] impl crate :: Readable for MODE { } # [ doc = "`write(|w| ..)` method takes [mode::W](mode::W) writer structure" ] impl crate :: Writable for MODE { } # [ doc = "Features Mode Selection" ] pub mod mode { # [ doc = "Reader of register MODE" ] pub type R = crate :: R < u32 , super :: MODE > ; # [ doc = "Writer for register MODE" ] pub type W = crate :: W < u32 , super :: MODE > ; # [ doc = "Register MODE `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: MODE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "FTM Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTMEN_A { # [ doc = "0: TPM compatibility. Free running counter and synchronization compatible with TPM." ] _0 , # [ doc = "1: Free running counter and synchronization are different from TPM behavior." ] _1 } impl From < FTMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : FTMEN_A ) -> Self { match variant { FTMEN_A :: _0 => false , FTMEN_A :: _1 => true } } } # [ doc = "Reader of field `FTMEN`" ] pub type FTMEN_R = crate :: R < bool , FTMEN_A > ; impl FTMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTMEN_A { match self . bits { false => FTMEN_A :: _0 , true => FTMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTMEN_A :: _1 } } # [ doc = "Write proxy for field `FTMEN`" ] pub struct FTMEN_W < 'a > { w : & 'a mut W , } impl < 'a > FTMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM compatibility. Free running counter and synchronization compatible with TPM." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTMEN_A :: _0 ) } # [ doc = "Free running counter and synchronization are different from TPM behavior." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTMEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_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 } } # [ doc = "Write Protection Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPDIS_A { # [ doc = "0: Write protection is enabled." ] _0 , # [ doc = "1: Write protection is disabled." ] _1 } impl From < WPDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : WPDIS_A ) -> Self { match variant { WPDIS_A :: _0 => false , WPDIS_A :: _1 => true } } } # [ doc = "Reader of field `WPDIS`" ] pub type WPDIS_R = crate :: R < bool , WPDIS_A > ; impl WPDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPDIS_A { match self . bits { false => WPDIS_A :: _0 , true => WPDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPDIS_A :: _1 } } # [ doc = "Write proxy for field `WPDIS`" ] pub struct WPDIS_W < 'a > { w : & 'a mut W , } impl < 'a > WPDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write protection is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPDIS_A :: _0 ) } # [ doc = "Write protection is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPDIS_A :: _1 ) } # [ 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 = "PWM Synchronization Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWMSYNC_A { # [ doc = "0: No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization." ] _0 , # [ doc = "1: Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization." ] _1 } impl From < PWMSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : PWMSYNC_A ) -> Self { match variant { PWMSYNC_A :: _0 => false , PWMSYNC_A :: _1 => true } } } # [ doc = "Reader of field `PWMSYNC`" ] pub type PWMSYNC_R = crate :: R < bool , PWMSYNC_A > ; impl PWMSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PWMSYNC_A { match self . bits { false => PWMSYNC_A :: _0 , true => PWMSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PWMSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PWMSYNC_A :: _1 } } # [ doc = "Write proxy for field `PWMSYNC`" ] pub struct PWMSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > PWMSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PWMSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PWMSYNC_A :: _0 ) } # [ doc = "Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PWMSYNC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Capture Test Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAPTEST_A { # [ doc = "0: Capture test mode is disabled." ] _0 , # [ doc = "1: Capture test mode is enabled." ] _1 } impl From < CAPTEST_A > for bool { # [ inline ( always ) ] fn from ( variant : CAPTEST_A ) -> Self { match variant { CAPTEST_A :: _0 => false , CAPTEST_A :: _1 => true } } } # [ doc = "Reader of field `CAPTEST`" ] pub type CAPTEST_R = crate :: R < bool , CAPTEST_A > ; impl CAPTEST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CAPTEST_A { match self . bits { false => CAPTEST_A :: _0 , true => CAPTEST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CAPTEST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CAPTEST_A :: _1 } } # [ doc = "Write proxy for field `CAPTEST`" ] pub struct CAPTEST_W < 'a > { w : & 'a mut W , } impl < 'a > CAPTEST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAPTEST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Capture test mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAPTEST_A :: _0 ) } # [ doc = "Capture test mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAPTEST_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Fault Control Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTM_A { # [ doc = "0: Fault control is disabled for all channels." ] _00 , # [ doc = "1: Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing." ] _01 , # [ doc = "2: Fault control is enabled for all channels, and the selected mode is the manual fault clearing." ] _10 , # [ doc = "3: Fault control is enabled for all channels, and the selected mode is the automatic fault clearing." ] _11 } impl From < FAULTM_A > for u8 { # [ inline ( always ) ] fn from ( variant : FAULTM_A ) -> Self { match variant { FAULTM_A :: _00 => 0 , FAULTM_A :: _01 => 1 , FAULTM_A :: _10 => 2 , FAULTM_A :: _11 => 3 } } } # [ doc = "Reader of field `FAULTM`" ] pub type FAULTM_R = crate :: R < u8 , FAULTM_A > ; impl FAULTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTM_A { match self . bits { 0 => FAULTM_A :: _00 , 1 => FAULTM_A :: _01 , 2 => FAULTM_A :: _10 , 3 => FAULTM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FAULTM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FAULTM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FAULTM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FAULTM_A :: _11 } } # [ doc = "Write proxy for field `FAULTM`" ] pub struct FAULTM_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Fault control is disabled for all channels." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _00 ) } # [ doc = "Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _01 ) } # [ doc = "Fault control is enabled for all channels, and the selected mode is the manual fault clearing." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _10 ) } # [ doc = "Fault control is enabled for all channels, and the selected mode is the automatic fault clearing." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u32 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Fault Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTIE_A { # [ doc = "0: Fault control interrupt is disabled." ] _0 , # [ doc = "1: Fault control interrupt is enabled." ] _1 } impl From < FAULTIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTIE_A ) -> Self { match variant { FAULTIE_A :: _0 => false , FAULTIE_A :: _1 => true } } } # [ doc = "Reader of field `FAULTIE`" ] pub type FAULTIE_R = crate :: R < bool , FAULTIE_A > ; impl FAULTIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTIE_A { match self . bits { false => FAULTIE_A :: _0 , true => FAULTIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTIE_A :: _1 } } # [ doc = "Write proxy for field `FAULTIE`" ] pub struct FAULTIE_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault control interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTIE_A :: _0 ) } # [ doc = "Fault control interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTIE_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - FTM Enable" ] # [ inline ( always ) ] pub fn ftmen ( & self ) -> FTMEN_R { FTMEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Initialize The Channels Output" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Write Protection Disable" ] # [ inline ( always ) ] pub fn wpdis ( & self ) -> WPDIS_R { WPDIS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - PWM Synchronization Mode" ] # [ inline ( always ) ] pub fn pwmsync ( & self ) -> PWMSYNC_R { PWMSYNC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Capture Test Mode Enable" ] # [ inline ( always ) ] pub fn captest ( & self ) -> CAPTEST_R { CAPTEST_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:6 - Fault Control Mode" ] # [ inline ( always ) ] pub fn faultm ( & self ) -> FAULTM_R { FAULTM_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Fault Interrupt Enable" ] # [ inline ( always ) ] pub fn faultie ( & self ) -> FAULTIE_R { FAULTIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FTM Enable" ] # [ inline ( always ) ] pub fn ftmen ( & mut self ) -> FTMEN_W { FTMEN_W { w : self } } # [ doc = "Bit 1 - Initialize The Channels Output" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } # [ doc = "Bit 2 - Write Protection Disable" ] # [ inline ( always ) ] pub fn wpdis ( & mut self ) -> WPDIS_W { WPDIS_W { w : self } } # [ doc = "Bit 3 - PWM Synchronization Mode" ] # [ inline ( always ) ] pub fn pwmsync ( & mut self ) -> PWMSYNC_W { PWMSYNC_W { w : self } } # [ doc = "Bit 4 - Capture Test Mode Enable" ] # [ inline ( always ) ] pub fn captest ( & mut self ) -> CAPTEST_W { CAPTEST_W { w : self } } # [ doc = "Bits 5:6 - Fault Control Mode" ] # [ inline ( always ) ] pub fn faultm ( & mut self ) -> FAULTM_W { FAULTM_W { w : self } } # [ doc = "Bit 7 - Fault Interrupt Enable" ] # [ inline ( always ) ] pub fn faultie ( & mut self ) -> FAULTIE_W { FAULTIE_W { w : self } } } } # [ doc = "Synchronization\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sync](sync) module" ] pub type SYNC = crate :: Reg < u32 , _SYNC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYNC ; # [ doc = "`read()` method returns [sync::R](sync::R) reader structure" ] impl crate :: Readable for SYNC { } # [ doc = "`write(|w| ..)` method takes [sync::W](sync::W) writer structure" ] impl crate :: Writable for SYNC { } # [ doc = "Synchronization" ] pub mod sync { # [ doc = "Reader of register SYNC" ] pub type R = crate :: R < u32 , super :: SYNC > ; # [ doc = "Writer for register SYNC" ] pub type W = crate :: W < u32 , super :: SYNC > ; # [ doc = "Register SYNC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SYNC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Minimum Loading Point Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTMIN_A { # [ doc = "0: The minimum loading point is disabled." ] _0 , # [ doc = "1: The minimum loading point is enabled." ] _1 } impl From < CNTMIN_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTMIN_A ) -> Self { match variant { CNTMIN_A :: _0 => false , CNTMIN_A :: _1 => true } } } # [ doc = "Reader of field `CNTMIN`" ] pub type CNTMIN_R = crate :: R < bool , CNTMIN_A > ; impl CNTMIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTMIN_A { match self . bits { false => CNTMIN_A :: _0 , true => CNTMIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTMIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTMIN_A :: _1 } } # [ doc = "Write proxy for field `CNTMIN`" ] pub struct CNTMIN_W < 'a > { w : & 'a mut W , } impl < 'a > CNTMIN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTMIN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The minimum loading point is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTMIN_A :: _0 ) } # [ doc = "The minimum loading point is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTMIN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Maximum Loading Point Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTMAX_A { # [ doc = "0: The maximum loading point is disabled." ] _0 , # [ doc = "1: The maximum loading point is enabled." ] _1 } impl From < CNTMAX_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTMAX_A ) -> Self { match variant { CNTMAX_A :: _0 => false , CNTMAX_A :: _1 => true } } } # [ doc = "Reader of field `CNTMAX`" ] pub type CNTMAX_R = crate :: R < bool , CNTMAX_A > ; impl CNTMAX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTMAX_A { match self . bits { false => CNTMAX_A :: _0 , true => CNTMAX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTMAX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTMAX_A :: _1 } } # [ doc = "Write proxy for field `CNTMAX`" ] pub struct CNTMAX_W < 'a > { w : & 'a mut W , } impl < 'a > CNTMAX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTMAX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The maximum loading point is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTMAX_A :: _0 ) } # [ doc = "The maximum loading point is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTMAX_A :: _1 ) } # [ 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 } } # [ doc = "FTM Counter Reinitialization By Synchronization (FTM counter synchronization)\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REINIT_A { # [ doc = "0: FTM counter continues to count normally." ] _0 , # [ doc = "1: FTM counter is updated with its initial value when the selected trigger is detected." ] _1 } impl From < REINIT_A > for bool { # [ inline ( always ) ] fn from ( variant : REINIT_A ) -> Self { match variant { REINIT_A :: _0 => false , REINIT_A :: _1 => true } } } # [ doc = "Reader of field `REINIT`" ] pub type REINIT_R = crate :: R < bool , REINIT_A > ; impl REINIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> REINIT_A { match self . bits { false => REINIT_A :: _0 , true => REINIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == REINIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == REINIT_A :: _1 } } # [ doc = "Write proxy for field `REINIT`" ] pub struct REINIT_W < 'a > { w : & 'a mut W , } impl < 'a > REINIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REINIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter continues to count normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( REINIT_A :: _0 ) } # [ doc = "FTM counter is updated with its initial value when the selected trigger is detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( REINIT_A :: _1 ) } # [ 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 = "Output Mask Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCHOM_A { # [ doc = "0: OUTMASK register is updated with the value of its buffer in all rising edges of the system clock." ] _0 , # [ doc = "1: OUTMASK register is updated with the value of its buffer only by the PWM synchronization." ] _1 } impl From < SYNCHOM_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCHOM_A ) -> Self { match variant { SYNCHOM_A :: _0 => false , SYNCHOM_A :: _1 => true } } } # [ doc = "Reader of field `SYNCHOM`" ] pub type SYNCHOM_R = crate :: R < bool , SYNCHOM_A > ; impl SYNCHOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCHOM_A { match self . bits { false => SYNCHOM_A :: _0 , true => SYNCHOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCHOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCHOM_A :: _1 } } # [ doc = "Write proxy for field `SYNCHOM`" ] pub struct SYNCHOM_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCHOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCHOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OUTMASK register is updated with the value of its buffer in all rising edges of the system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCHOM_A :: _0 ) } # [ doc = "OUTMASK register is updated with the value of its buffer only by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCHOM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "PWM Synchronization Hardware Trigger 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG0_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG0_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG0_A ) -> Self { match variant { TRIG0_A :: _0 => false , TRIG0_A :: _1 => true } } } # [ doc = "Reader of field `TRIG0`" ] pub type TRIG0_R = crate :: R < bool , TRIG0_A > ; impl TRIG0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG0_A { match self . bits { false => TRIG0_A :: _0 , true => TRIG0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG0_A :: _1 } } # [ doc = "Write proxy for field `TRIG0`" ] pub struct TRIG0_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG0_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "PWM Synchronization Hardware Trigger 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG1_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG1_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG1_A ) -> Self { match variant { TRIG1_A :: _0 => false , TRIG1_A :: _1 => true } } } # [ doc = "Reader of field `TRIG1`" ] pub type TRIG1_R = crate :: R < bool , TRIG1_A > ; impl TRIG1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG1_A { match self . bits { false => TRIG1_A :: _0 , true => TRIG1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG1_A :: _1 } } # [ doc = "Write proxy for field `TRIG1`" ] pub struct TRIG1_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG1_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG1_A :: _1 ) } # [ 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 = "PWM Synchronization Hardware Trigger 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG2_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG2_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG2_A ) -> Self { match variant { TRIG2_A :: _0 => false , TRIG2_A :: _1 => true } } } # [ doc = "Reader of field `TRIG2`" ] pub type TRIG2_R = crate :: R < bool , TRIG2_A > ; impl TRIG2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG2_A { match self . bits { false => TRIG2_A :: _0 , true => TRIG2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG2_A :: _1 } } # [ doc = "Write proxy for field `TRIG2`" ] pub struct TRIG2_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG2_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG2_A :: _1 ) } # [ 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 = "PWM Synchronization Software Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSYNC_A { # [ doc = "0: Software trigger is not selected." ] _0 , # [ doc = "1: Software trigger is selected." ] _1 } impl From < SWSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSYNC_A ) -> Self { match variant { SWSYNC_A :: _0 => false , SWSYNC_A :: _1 => true } } } # [ doc = "Reader of field `SWSYNC`" ] pub type SWSYNC_R = crate :: R < bool , SWSYNC_A > ; impl SWSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSYNC_A { match self . bits { false => SWSYNC_A :: _0 , true => SWSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSYNC_A :: _1 } } # [ doc = "Write proxy for field `SWSYNC`" ] pub struct SWSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > SWSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Software trigger is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSYNC_A :: _0 ) } # [ doc = "Software trigger is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSYNC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Minimum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmin ( & self ) -> CNTMIN_R { CNTMIN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Maximum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmax ( & self ) -> CNTMAX_R { CNTMAX_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)" ] # [ inline ( always ) ] pub fn reinit ( & self ) -> REINIT_R { REINIT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Output Mask Synchronization" ] # [ inline ( always ) ] pub fn synchom ( & self ) -> SYNCHOM_R { SYNCHOM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - PWM Synchronization Hardware Trigger 0" ] # [ inline ( always ) ] pub fn trig0 ( & self ) -> TRIG0_R { TRIG0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - PWM Synchronization Hardware Trigger 1" ] # [ inline ( always ) ] pub fn trig1 ( & self ) -> TRIG1_R { TRIG1_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PWM Synchronization Hardware Trigger 2" ] # [ inline ( always ) ] pub fn trig2 ( & self ) -> TRIG2_R { TRIG2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - PWM Synchronization Software Trigger" ] # [ inline ( always ) ] pub fn swsync ( & self ) -> SWSYNC_R { SWSYNC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Minimum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmin ( & mut self ) -> CNTMIN_W { CNTMIN_W { w : self } } # [ doc = "Bit 1 - Maximum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmax ( & mut self ) -> CNTMAX_W { CNTMAX_W { w : self } } # [ doc = "Bit 2 - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)" ] # [ inline ( always ) ] pub fn reinit ( & mut self ) -> REINIT_W { REINIT_W { w : self } } # [ doc = "Bit 3 - Output Mask Synchronization" ] # [ inline ( always ) ] pub fn synchom ( & mut self ) -> SYNCHOM_W { SYNCHOM_W { w : self } } # [ doc = "Bit 4 - PWM Synchronization Hardware Trigger 0" ] # [ inline ( always ) ] pub fn trig0 ( & mut self ) -> TRIG0_W { TRIG0_W { w : self } } # [ doc = "Bit 5 - PWM Synchronization Hardware Trigger 1" ] # [ inline ( always ) ] pub fn trig1 ( & mut self ) -> TRIG1_W { TRIG1_W { w : self } } # [ doc = "Bit 6 - PWM Synchronization Hardware Trigger 2" ] # [ inline ( always ) ] pub fn trig2 ( & mut self ) -> TRIG2_W { TRIG2_W { w : self } } # [ doc = "Bit 7 - PWM Synchronization Software Trigger" ] # [ inline ( always ) ] pub fn swsync ( & mut self ) -> SWSYNC_W { SWSYNC_W { w : self } } } } # [ doc = "Initial State For Channels Output\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [outinit](outinit) module" ] pub type OUTINIT = crate :: Reg < u32 , _OUTINIT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OUTINIT ; # [ doc = "`read()` method returns [outinit::R](outinit::R) reader structure" ] impl crate :: Readable for OUTINIT { } # [ doc = "`write(|w| ..)` method takes [outinit::W](outinit::W) writer structure" ] impl crate :: Writable for OUTINIT { } # [ doc = "Initial State For Channels Output" ] pub mod outinit { # [ doc = "Reader of register OUTINIT" ] pub type R = crate :: R < u32 , super :: OUTINIT > ; # [ doc = "Writer for register OUTINIT" ] pub type W = crate :: W < u32 , super :: OUTINIT > ; # [ doc = "Register OUTINIT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OUTINIT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH0OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OI_A ) -> Self { match variant { CH0OI_A :: _0 => false , CH0OI_A :: _1 => true } } } # [ doc = "Reader of field `CH0OI`" ] pub type CH0OI_R = crate :: R < bool , CH0OI_A > ; impl CH0OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OI_A { match self . bits { false => CH0OI_A :: _0 , true => CH0OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OI_A :: _1 } } # [ doc = "Write proxy for field `CH0OI`" ] pub struct CH0OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OI_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH1OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OI_A ) -> Self { match variant { CH1OI_A :: _0 => false , CH1OI_A :: _1 => true } } } # [ doc = "Reader of field `CH1OI`" ] pub type CH1OI_R = crate :: R < bool , CH1OI_A > ; impl CH1OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OI_A { match self . bits { false => CH1OI_A :: _0 , true => CH1OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OI_A :: _1 } } # [ doc = "Write proxy for field `CH1OI`" ] pub struct CH1OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OI_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH2OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OI_A ) -> Self { match variant { CH2OI_A :: _0 => false , CH2OI_A :: _1 => true } } } # [ doc = "Reader of field `CH2OI`" ] pub type CH2OI_R = crate :: R < bool , CH2OI_A > ; impl CH2OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OI_A { match self . bits { false => CH2OI_A :: _0 , true => CH2OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OI_A :: _1 } } # [ doc = "Write proxy for field `CH2OI`" ] pub struct CH2OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OI_A :: _1 ) } # [ 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 = "Channel 3 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH3OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OI_A ) -> Self { match variant { CH3OI_A :: _0 => false , CH3OI_A :: _1 => true } } } # [ doc = "Reader of field `CH3OI`" ] pub type CH3OI_R = crate :: R < bool , CH3OI_A > ; impl CH3OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OI_A { match self . bits { false => CH3OI_A :: _0 , true => CH3OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OI_A :: _1 } } # [ doc = "Write proxy for field `CH3OI`" ] pub struct CH3OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OI_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH4OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OI_A ) -> Self { match variant { CH4OI_A :: _0 => false , CH4OI_A :: _1 => true } } } # [ doc = "Reader of field `CH4OI`" ] pub type CH4OI_R = crate :: R < bool , CH4OI_A > ; impl CH4OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OI_A { match self . bits { false => CH4OI_A :: _0 , true => CH4OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OI_A :: _1 } } # [ doc = "Write proxy for field `CH4OI`" ] pub struct CH4OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OI_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH5OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OI_A ) -> Self { match variant { CH5OI_A :: _0 => false , CH5OI_A :: _1 => true } } } # [ doc = "Reader of field `CH5OI`" ] pub type CH5OI_R = crate :: R < bool , CH5OI_A > ; impl CH5OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OI_A { match self . bits { false => CH5OI_A :: _0 , true => CH5OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OI_A :: _1 } } # [ doc = "Write proxy for field `CH5OI`" ] pub struct CH5OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OI_A :: _1 ) } # [ 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 = "Channel 6 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH6OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OI_A ) -> Self { match variant { CH6OI_A :: _0 => false , CH6OI_A :: _1 => true } } } # [ doc = "Reader of field `CH6OI`" ] pub type CH6OI_R = crate :: R < bool , CH6OI_A > ; impl CH6OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OI_A { match self . bits { false => CH6OI_A :: _0 , true => CH6OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OI_A :: _1 } } # [ doc = "Write proxy for field `CH6OI`" ] pub struct CH6OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OI_A :: _1 ) } # [ 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 = "Channel 7 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH7OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OI_A ) -> Self { match variant { CH7OI_A :: _0 => false , CH7OI_A :: _1 => true } } } # [ doc = "Reader of field `CH7OI`" ] pub type CH7OI_R = crate :: R < bool , CH7OI_A > ; impl CH7OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OI_A { match self . bits { false => CH7OI_A :: _0 , true => CH7OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OI_A :: _1 } } # [ doc = "Write proxy for field `CH7OI`" ] pub struct CH7OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OI_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch0oi ( & self ) -> CH0OI_R { CH0OI_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch1oi ( & self ) -> CH1OI_R { CH1OI_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch2oi ( & self ) -> CH2OI_R { CH2OI_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch3oi ( & self ) -> CH3OI_R { CH3OI_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch4oi ( & self ) -> CH4OI_R { CH4OI_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch5oi ( & self ) -> CH5OI_R { CH5OI_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch6oi ( & self ) -> CH6OI_R { CH6OI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch7oi ( & self ) -> CH7OI_R { CH7OI_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch0oi ( & mut self ) -> CH0OI_W { CH0OI_W { w : self } } # [ doc = "Bit 1 - Channel 1 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch1oi ( & mut self ) -> CH1OI_W { CH1OI_W { w : self } } # [ doc = "Bit 2 - Channel 2 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch2oi ( & mut self ) -> CH2OI_W { CH2OI_W { w : self } } # [ doc = "Bit 3 - Channel 3 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch3oi ( & mut self ) -> CH3OI_W { CH3OI_W { w : self } } # [ doc = "Bit 4 - Channel 4 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch4oi ( & mut self ) -> CH4OI_W { CH4OI_W { w : self } } # [ doc = "Bit 5 - Channel 5 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch5oi ( & mut self ) -> CH5OI_W { CH5OI_W { w : self } } # [ doc = "Bit 6 - Channel 6 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch6oi ( & mut self ) -> CH6OI_W { CH6OI_W { w : self } } # [ doc = "Bit 7 - Channel 7 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch7oi ( & mut self ) -> CH7OI_W { CH7OI_W { w : self } } } } # [ doc = "Output Mask\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [outmask](outmask) module" ] pub type OUTMASK = crate :: Reg < u32 , _OUTMASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OUTMASK ; # [ doc = "`read()` method returns [outmask::R](outmask::R) reader structure" ] impl crate :: Readable for OUTMASK { } # [ doc = "`write(|w| ..)` method takes [outmask::W](outmask::W) writer structure" ] impl crate :: Writable for OUTMASK { } # [ doc = "Output Mask" ] pub mod outmask { # [ doc = "Reader of register OUTMASK" ] pub type R = crate :: R < u32 , super :: OUTMASK > ; # [ doc = "Writer for register OUTMASK" ] pub type W = crate :: W < u32 , super :: OUTMASK > ; # [ doc = "Register OUTMASK `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OUTMASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH0OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OM_A ) -> Self { match variant { CH0OM_A :: _0 => false , CH0OM_A :: _1 => true } } } # [ doc = "Reader of field `CH0OM`" ] pub type CH0OM_R = crate :: R < bool , CH0OM_A > ; impl CH0OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OM_A { match self . bits { false => CH0OM_A :: _0 , true => CH0OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OM_A :: _1 } } # [ doc = "Write proxy for field `CH0OM`" ] pub struct CH0OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OM_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH1OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OM_A ) -> Self { match variant { CH1OM_A :: _0 => false , CH1OM_A :: _1 => true } } } # [ doc = "Reader of field `CH1OM`" ] pub type CH1OM_R = crate :: R < bool , CH1OM_A > ; impl CH1OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OM_A { match self . bits { false => CH1OM_A :: _0 , true => CH1OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OM_A :: _1 } } # [ doc = "Write proxy for field `CH1OM`" ] pub struct CH1OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OM_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH2OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OM_A ) -> Self { match variant { CH2OM_A :: _0 => false , CH2OM_A :: _1 => true } } } # [ doc = "Reader of field `CH2OM`" ] pub type CH2OM_R = crate :: R < bool , CH2OM_A > ; impl CH2OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OM_A { match self . bits { false => CH2OM_A :: _0 , true => CH2OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OM_A :: _1 } } # [ doc = "Write proxy for field `CH2OM`" ] pub struct CH2OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OM_A :: _1 ) } # [ 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 = "Channel 3 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH3OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OM_A ) -> Self { match variant { CH3OM_A :: _0 => false , CH3OM_A :: _1 => true } } } # [ doc = "Reader of field `CH3OM`" ] pub type CH3OM_R = crate :: R < bool , CH3OM_A > ; impl CH3OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OM_A { match self . bits { false => CH3OM_A :: _0 , true => CH3OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OM_A :: _1 } } # [ doc = "Write proxy for field `CH3OM`" ] pub struct CH3OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH4OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OM_A ) -> Self { match variant { CH4OM_A :: _0 => false , CH4OM_A :: _1 => true } } } # [ doc = "Reader of field `CH4OM`" ] pub type CH4OM_R = crate :: R < bool , CH4OM_A > ; impl CH4OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OM_A { match self . bits { false => CH4OM_A :: _0 , true => CH4OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OM_A :: _1 } } # [ doc = "Write proxy for field `CH4OM`" ] pub struct CH4OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OM_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH5OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OM_A ) -> Self { match variant { CH5OM_A :: _0 => false , CH5OM_A :: _1 => true } } } # [ doc = "Reader of field `CH5OM`" ] pub type CH5OM_R = crate :: R < bool , CH5OM_A > ; impl CH5OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OM_A { match self . bits { false => CH5OM_A :: _0 , true => CH5OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OM_A :: _1 } } # [ doc = "Write proxy for field `CH5OM`" ] pub struct CH5OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OM_A :: _1 ) } # [ 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 = "Channel 6 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH6OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OM_A ) -> Self { match variant { CH6OM_A :: _0 => false , CH6OM_A :: _1 => true } } } # [ doc = "Reader of field `CH6OM`" ] pub type CH6OM_R = crate :: R < bool , CH6OM_A > ; impl CH6OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OM_A { match self . bits { false => CH6OM_A :: _0 , true => CH6OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OM_A :: _1 } } # [ doc = "Write proxy for field `CH6OM`" ] pub struct CH6OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OM_A :: _1 ) } # [ 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 = "Channel 7 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH7OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OM_A ) -> Self { match variant { CH7OM_A :: _0 => false , CH7OM_A :: _1 => true } } } # [ doc = "Reader of field `CH7OM`" ] pub type CH7OM_R = crate :: R < bool , CH7OM_A > ; impl CH7OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OM_A { match self . bits { false => CH7OM_A :: _0 , true => CH7OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OM_A :: _1 } } # [ doc = "Write proxy for field `CH7OM`" ] pub struct CH7OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OM_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Output Mask" ] # [ inline ( always ) ] pub fn ch0om ( & self ) -> CH0OM_R { CH0OM_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Output Mask" ] # [ inline ( always ) ] pub fn ch1om ( & self ) -> CH1OM_R { CH1OM_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Output Mask" ] # [ inline ( always ) ] pub fn ch2om ( & self ) -> CH2OM_R { CH2OM_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Output Mask" ] # [ inline ( always ) ] pub fn ch3om ( & self ) -> CH3OM_R { CH3OM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Output Mask" ] # [ inline ( always ) ] pub fn ch4om ( & self ) -> CH4OM_R { CH4OM_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Output Mask" ] # [ inline ( always ) ] pub fn ch5om ( & self ) -> CH5OM_R { CH5OM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Output Mask" ] # [ inline ( always ) ] pub fn ch6om ( & self ) -> CH6OM_R { CH6OM_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Output Mask" ] # [ inline ( always ) ] pub fn ch7om ( & self ) -> CH7OM_R { CH7OM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Output Mask" ] # [ inline ( always ) ] pub fn ch0om ( & mut self ) -> CH0OM_W { CH0OM_W { w : self } } # [ doc = "Bit 1 - Channel 1 Output Mask" ] # [ inline ( always ) ] pub fn ch1om ( & mut self ) -> CH1OM_W { CH1OM_W { w : self } } # [ doc = "Bit 2 - Channel 2 Output Mask" ] # [ inline ( always ) ] pub fn ch2om ( & mut self ) -> CH2OM_W { CH2OM_W { w : self } } # [ doc = "Bit 3 - Channel 3 Output Mask" ] # [ inline ( always ) ] pub fn ch3om ( & mut self ) -> CH3OM_W { CH3OM_W { w : self } } # [ doc = "Bit 4 - Channel 4 Output Mask" ] # [ inline ( always ) ] pub fn ch4om ( & mut self ) -> CH4OM_W { CH4OM_W { w : self } } # [ doc = "Bit 5 - Channel 5 Output Mask" ] # [ inline ( always ) ] pub fn ch5om ( & mut self ) -> CH5OM_W { CH5OM_W { w : self } } # [ doc = "Bit 6 - Channel 6 Output Mask" ] # [ inline ( always ) ] pub fn ch6om ( & mut self ) -> CH6OM_W { CH6OM_W { w : self } } # [ doc = "Bit 7 - Channel 7 Output Mask" ] # [ inline ( always ) ] pub fn ch7om ( & mut self ) -> CH7OM_W { CH7OM_W { w : self } } } } # [ doc = "Function For Linked Channels\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [combine](combine) module" ] pub type COMBINE = crate :: Reg < u32 , _COMBINE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _COMBINE ; # [ doc = "`read()` method returns [combine::R](combine::R) reader structure" ] impl crate :: Readable for COMBINE { } # [ doc = "`write(|w| ..)` method takes [combine::W](combine::W) writer structure" ] impl crate :: Writable for COMBINE { } # [ doc = "Function For Linked Channels" ] pub mod combine { # [ doc = "Reader of register COMBINE" ] pub type R = crate :: R < u32 , super :: COMBINE > ; # [ doc = "Writer for register COMBINE" ] pub type W = crate :: W < u32 , super :: COMBINE > ; # [ doc = "Register COMBINE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: COMBINE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Combine Channels For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE0_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE0_A ) -> Self { match variant { COMBINE0_A :: _0 => false , COMBINE0_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE0`" ] pub type COMBINE0_R = crate :: R < bool , COMBINE0_A > ; impl COMBINE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE0_A { match self . bits { false => COMBINE0_A :: _0 , true => COMBINE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE0_A :: _1 } } # [ doc = "Write proxy for field `COMBINE0`" ] pub struct COMBINE0_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP0_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP0_A ) -> Self { match variant { COMP0_A :: _0 => false , COMP0_A :: _1 => true } } } # [ doc = "Reader of field `COMP0`" ] pub type COMP0_R = crate :: R < bool , COMP0_A > ; impl COMP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP0_A { match self . bits { false => COMP0_A :: _0 , true => COMP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP0_A :: _1 } } # [ doc = "Write proxy for field `COMP0`" ] pub struct COMP0_W < 'a > { w : & 'a mut W , } impl < 'a > COMP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP0_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP0_A :: _1 ) } # [ 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 } } # [ doc = "Dual Edge Capture Mode Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN0_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN0_A ) -> Self { match variant { DECAPEN0_A :: _0 => false , DECAPEN0_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN0`" ] pub type DECAPEN0_R = crate :: R < bool , DECAPEN0_A > ; impl DECAPEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN0_A { match self . bits { false => DECAPEN0_A :: _0 , true => DECAPEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN0_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN0`" ] pub struct DECAPEN0_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN0_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN0_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Captures For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP0_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP0_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP0_A ) -> Self { match variant { DECAP0_A :: _0 => false , DECAP0_A :: _1 => true } } } # [ doc = "Reader of field `DECAP0`" ] pub type DECAP0_R = crate :: R < bool , DECAP0_A > ; impl DECAP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP0_A { match self . bits { false => DECAP0_A :: _0 , true => DECAP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP0_A :: _1 } } # [ doc = "Write proxy for field `DECAP0`" ] pub struct DECAP0_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP0_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP0_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Deadtime Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN0_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN0_A ) -> Self { match variant { DTEN0_A :: _0 => false , DTEN0_A :: _1 => true } } } # [ doc = "Reader of field `DTEN0`" ] pub type DTEN0_R = crate :: R < bool , DTEN0_A > ; impl DTEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN0_A { match self . bits { false => DTEN0_A :: _0 , true => DTEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN0_A :: _1 } } # [ doc = "Write proxy for field `DTEN0`" ] pub struct DTEN0_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN0_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Synchronization Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN0_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN0_A ) -> Self { match variant { SYNCEN0_A :: _0 => false , SYNCEN0_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN0`" ] pub type SYNCEN0_R = crate :: R < bool , SYNCEN0_A > ; impl SYNCEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN0_A { match self . bits { false => SYNCEN0_A :: _0 , true => SYNCEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN0_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN0`" ] pub struct SYNCEN0_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN0_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN0_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN0_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN0_A ) -> Self { match variant { FAULTEN0_A :: _0 => false , FAULTEN0_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN0`" ] pub type FAULTEN0_R = crate :: R < bool , FAULTEN0_A > ; impl FAULTEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN0_A { match self . bits { false => FAULTEN0_A :: _0 , true => FAULTEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN0_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN0`" ] pub struct FAULTEN0_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN0_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN0_A :: _1 ) } # [ 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 = "Combine Channels For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE1_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE1_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE1_A ) -> Self { match variant { COMBINE1_A :: _0 => false , COMBINE1_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE1`" ] pub type COMBINE1_R = crate :: R < bool , COMBINE1_A > ; impl COMBINE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE1_A { match self . bits { false => COMBINE1_A :: _0 , true => COMBINE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE1_A :: _1 } } # [ doc = "Write proxy for field `COMBINE1`" ] pub struct COMBINE1_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE1_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE1_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP1_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP1_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP1_A ) -> Self { match variant { COMP1_A :: _0 => false , COMP1_A :: _1 => true } } } # [ doc = "Reader of field `COMP1`" ] pub type COMP1_R = crate :: R < bool , COMP1_A > ; impl COMP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP1_A { match self . bits { false => COMP1_A :: _0 , true => COMP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP1_A :: _1 } } # [ doc = "Write proxy for field `COMP1`" ] pub struct COMP1_W < 'a > { w : & 'a mut W , } impl < 'a > COMP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP1_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP1_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN1_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN1_A ) -> Self { match variant { DECAPEN1_A :: _0 => false , DECAPEN1_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN1`" ] pub type DECAPEN1_R = crate :: R < bool , DECAPEN1_A > ; impl DECAPEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN1_A { match self . bits { false => DECAPEN1_A :: _0 , true => DECAPEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN1_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN1`" ] pub struct DECAPEN1_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN1_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN1_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Captures For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP1_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP1_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP1_A ) -> Self { match variant { DECAP1_A :: _0 => false , DECAP1_A :: _1 => true } } } # [ doc = "Reader of field `DECAP1`" ] pub type DECAP1_R = crate :: R < bool , DECAP1_A > ; impl DECAP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP1_A { match self . bits { false => DECAP1_A :: _0 , true => DECAP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP1_A :: _1 } } # [ doc = "Write proxy for field `DECAP1`" ] pub struct DECAP1_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP1_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP1_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Deadtime Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN1_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN1_A ) -> Self { match variant { DTEN1_A :: _0 => false , DTEN1_A :: _1 => true } } } # [ doc = "Reader of field `DTEN1`" ] pub type DTEN1_R = crate :: R < bool , DTEN1_A > ; impl DTEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN1_A { match self . bits { false => DTEN1_A :: _0 , true => DTEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN1_A :: _1 } } # [ doc = "Write proxy for field `DTEN1`" ] pub struct DTEN1_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN1_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN1_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Synchronization Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN1_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN1_A ) -> Self { match variant { SYNCEN1_A :: _0 => false , SYNCEN1_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN1`" ] pub type SYNCEN1_R = crate :: R < bool , SYNCEN1_A > ; impl SYNCEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN1_A { match self . bits { false => SYNCEN1_A :: _0 , true => SYNCEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN1_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN1`" ] pub struct SYNCEN1_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN1_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN1_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN1_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN1_A ) -> Self { match variant { FAULTEN1_A :: _0 => false , FAULTEN1_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN1`" ] pub type FAULTEN1_R = crate :: R < bool , FAULTEN1_A > ; impl FAULTEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN1_A { match self . bits { false => FAULTEN1_A :: _0 , true => FAULTEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN1_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN1`" ] pub struct FAULTEN1_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN1_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN1_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Combine Channels For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE2_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE2_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE2_A ) -> Self { match variant { COMBINE2_A :: _0 => false , COMBINE2_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE2`" ] pub type COMBINE2_R = crate :: R < bool , COMBINE2_A > ; impl COMBINE2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE2_A { match self . bits { false => COMBINE2_A :: _0 , true => COMBINE2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE2_A :: _1 } } # [ doc = "Write proxy for field `COMBINE2`" ] pub struct COMBINE2_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE2_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE2_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP2_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP2_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP2_A ) -> Self { match variant { COMP2_A :: _0 => false , COMP2_A :: _1 => true } } } # [ doc = "Reader of field `COMP2`" ] pub type COMP2_R = crate :: R < bool , COMP2_A > ; impl COMP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP2_A { match self . bits { false => COMP2_A :: _0 , true => COMP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP2_A :: _1 } } # [ doc = "Write proxy for field `COMP2`" ] pub struct COMP2_W < 'a > { w : & 'a mut W , } impl < 'a > COMP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP2_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP2_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN2_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN2_A ) -> Self { match variant { DECAPEN2_A :: _0 => false , DECAPEN2_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN2`" ] pub type DECAPEN2_R = crate :: R < bool , DECAPEN2_A > ; impl DECAPEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN2_A { match self . bits { false => DECAPEN2_A :: _0 , true => DECAPEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN2_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN2`" ] pub struct DECAPEN2_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN2_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Captures For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP2_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP2_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP2_A ) -> Self { match variant { DECAP2_A :: _0 => false , DECAP2_A :: _1 => true } } } # [ doc = "Reader of field `DECAP2`" ] pub type DECAP2_R = crate :: R < bool , DECAP2_A > ; impl DECAP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP2_A { match self . bits { false => DECAP2_A :: _0 , true => DECAP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP2_A :: _1 } } # [ doc = "Write proxy for field `DECAP2`" ] pub struct DECAP2_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP2_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP2_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Deadtime Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN2_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN2_A ) -> Self { match variant { DTEN2_A :: _0 => false , DTEN2_A :: _1 => true } } } # [ doc = "Reader of field `DTEN2`" ] pub type DTEN2_R = crate :: R < bool , DTEN2_A > ; impl DTEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN2_A { match self . bits { false => DTEN2_A :: _0 , true => DTEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN2_A :: _1 } } # [ doc = "Write proxy for field `DTEN2`" ] pub struct DTEN2_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN2_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN2_A :: _1 ) } # [ 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 = "Synchronization Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN2_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN2_A ) -> Self { match variant { SYNCEN2_A :: _0 => false , SYNCEN2_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN2`" ] pub type SYNCEN2_R = crate :: R < bool , SYNCEN2_A > ; impl SYNCEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN2_A { match self . bits { false => SYNCEN2_A :: _0 , true => SYNCEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN2_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN2`" ] pub struct SYNCEN2_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN2_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN2_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN2_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN2_A ) -> Self { match variant { FAULTEN2_A :: _0 => false , FAULTEN2_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN2`" ] pub type FAULTEN2_R = crate :: R < bool , FAULTEN2_A > ; impl FAULTEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN2_A { match self . bits { false => FAULTEN2_A :: _0 , true => FAULTEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN2_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN2`" ] pub struct FAULTEN2_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN2_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Combine Channels For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE3_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE3_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE3_A ) -> Self { match variant { COMBINE3_A :: _0 => false , COMBINE3_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE3`" ] pub type COMBINE3_R = crate :: R < bool , COMBINE3_A > ; impl COMBINE3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE3_A { match self . bits { false => COMBINE3_A :: _0 , true => COMBINE3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE3_A :: _1 } } # [ doc = "Write proxy for field `COMBINE3`" ] pub struct COMBINE3_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE3_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE3_A :: _1 ) } # [ 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 = "Complement Of Channel (n) for n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP3_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP3_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP3_A ) -> Self { match variant { COMP3_A :: _0 => false , COMP3_A :: _1 => true } } } # [ doc = "Reader of field `COMP3`" ] pub type COMP3_R = crate :: R < bool , COMP3_A > ; impl COMP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP3_A { match self . bits { false => COMP3_A :: _0 , true => COMP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP3_A :: _1 } } # [ doc = "Write proxy for field `COMP3`" ] pub struct COMP3_W < 'a > { w : & 'a mut W , } impl < 'a > COMP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP3_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP3_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN3_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN3_A ) -> Self { match variant { DECAPEN3_A :: _0 => false , DECAPEN3_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN3`" ] pub type DECAPEN3_R = crate :: R < bool , DECAPEN3_A > ; impl DECAPEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN3_A { match self . bits { false => DECAPEN3_A :: _0 , true => DECAPEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN3_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN3`" ] pub struct DECAPEN3_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN3_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN3_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Captures For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP3_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP3_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP3_A ) -> Self { match variant { DECAP3_A :: _0 => false , DECAP3_A :: _1 => true } } } # [ doc = "Reader of field `DECAP3`" ] pub type DECAP3_R = crate :: R < bool , DECAP3_A > ; impl DECAP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP3_A { match self . bits { false => DECAP3_A :: _0 , true => DECAP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP3_A :: _1 } } # [ doc = "Write proxy for field `DECAP3`" ] pub struct DECAP3_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP3_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP3_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Deadtime Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN3_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN3_A ) -> Self { match variant { DTEN3_A :: _0 => false , DTEN3_A :: _1 => true } } } # [ doc = "Reader of field `DTEN3`" ] pub type DTEN3_R = crate :: R < bool , DTEN3_A > ; impl DTEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN3_A { match self . bits { false => DTEN3_A :: _0 , true => DTEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN3_A :: _1 } } # [ doc = "Write proxy for field `DTEN3`" ] pub struct DTEN3_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN3_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN3_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Synchronization Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN3_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN3_A ) -> Self { match variant { SYNCEN3_A :: _0 => false , SYNCEN3_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN3`" ] pub type SYNCEN3_R = crate :: R < bool , SYNCEN3_A > ; impl SYNCEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN3_A { match self . bits { false => SYNCEN3_A :: _0 , true => SYNCEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN3_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN3`" ] pub struct SYNCEN3_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN3_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN3_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Fault Control Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN3_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN3_A ) -> Self { match variant { FAULTEN3_A :: _0 => false , FAULTEN3_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN3`" ] pub type FAULTEN3_R = crate :: R < bool , FAULTEN3_A > ; impl FAULTEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN3_A { match self . bits { false => FAULTEN3_A :: _0 , true => FAULTEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN3_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN3`" ] pub struct FAULTEN3_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN3_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN3_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Combine Channels For n = 0" ] # [ inline ( always ) ] pub fn combine0 ( & self ) -> COMBINE0_R { COMBINE0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Complement Of Channel (n) For n = 0" ] # [ inline ( always ) ] pub fn comp0 ( & self ) -> COMP0_R { COMP0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Dual Edge Capture Mode Enable For n = 0" ] # [ inline ( always ) ] pub fn decapen0 ( & self ) -> DECAPEN0_R { DECAPEN0_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Dual Edge Capture Mode Captures For n = 0" ] # [ inline ( always ) ] pub fn decap0 ( & self ) -> DECAP0_R { DECAP0_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Deadtime Enable For n = 0" ] # [ inline ( always ) ] pub fn dten0 ( & self ) -> DTEN0_R { DTEN0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Synchronization Enable For n = 0" ] # [ inline ( always ) ] pub fn syncen0 ( & self ) -> SYNCEN0_R { SYNCEN0_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Fault Control Enable For n = 0" ] # [ inline ( always ) ] pub fn faulten0 ( & self ) -> FAULTEN0_R { FAULTEN0_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Combine Channels For n = 2" ] # [ inline ( always ) ] pub fn combine1 ( & self ) -> COMBINE1_R { COMBINE1_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Complement Of Channel (n) For n = 2" ] # [ inline ( always ) ] pub fn comp1 ( & self ) -> COMP1_R { COMP1_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Dual Edge Capture Mode Enable For n = 2" ] # [ inline ( always ) ] pub fn decapen1 ( & self ) -> DECAPEN1_R { DECAPEN1_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Dual Edge Capture Mode Captures For n = 2" ] # [ inline ( always ) ] pub fn decap1 ( & self ) -> DECAP1_R { DECAP1_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Deadtime Enable For n = 2" ] # [ inline ( always ) ] pub fn dten1 ( & self ) -> DTEN1_R { DTEN1_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Synchronization Enable For n = 2" ] # [ inline ( always ) ] pub fn syncen1 ( & self ) -> SYNCEN1_R { SYNCEN1_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Fault Control Enable For n = 2" ] # [ inline ( always ) ] pub fn faulten1 ( & self ) -> FAULTEN1_R { FAULTEN1_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Combine Channels For n = 4" ] # [ inline ( always ) ] pub fn combine2 ( & self ) -> COMBINE2_R { COMBINE2_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Complement Of Channel (n) For n = 4" ] # [ inline ( always ) ] pub fn comp2 ( & self ) -> COMP2_R { COMP2_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Dual Edge Capture Mode Enable For n = 4" ] # [ inline ( always ) ] pub fn decapen2 ( & self ) -> DECAPEN2_R { DECAPEN2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Dual Edge Capture Mode Captures For n = 4" ] # [ inline ( always ) ] pub fn decap2 ( & self ) -> DECAP2_R { DECAP2_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Deadtime Enable For n = 4" ] # [ inline ( always ) ] pub fn dten2 ( & self ) -> DTEN2_R { DTEN2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Synchronization Enable For n = 4" ] # [ inline ( always ) ] pub fn syncen2 ( & self ) -> SYNCEN2_R { SYNCEN2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Fault Control Enable For n = 4" ] # [ inline ( always ) ] pub fn faulten2 ( & self ) -> FAULTEN2_R { FAULTEN2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Combine Channels For n = 6" ] # [ inline ( always ) ] pub fn combine3 ( & self ) -> COMBINE3_R { COMBINE3_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Complement Of Channel (n) for n = 6" ] # [ inline ( always ) ] pub fn comp3 ( & self ) -> COMP3_R { COMP3_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Dual Edge Capture Mode Enable For n = 6" ] # [ inline ( always ) ] pub fn decapen3 ( & self ) -> DECAPEN3_R { DECAPEN3_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Dual Edge Capture Mode Captures For n = 6" ] # [ inline ( always ) ] pub fn decap3 ( & self ) -> DECAP3_R { DECAP3_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Deadtime Enable For n = 6" ] # [ inline ( always ) ] pub fn dten3 ( & self ) -> DTEN3_R { DTEN3_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Synchronization Enable For n = 6" ] # [ inline ( always ) ] pub fn syncen3 ( & self ) -> SYNCEN3_R { SYNCEN3_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Fault Control Enable For n = 6" ] # [ inline ( always ) ] pub fn faulten3 ( & self ) -> FAULTEN3_R { FAULTEN3_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Combine Channels For n = 0" ] # [ inline ( always ) ] pub fn combine0 ( & mut self ) -> COMBINE0_W { COMBINE0_W { w : self } } # [ doc = "Bit 1 - Complement Of Channel (n) For n = 0" ] # [ inline ( always ) ] pub fn comp0 ( & mut self ) -> COMP0_W { COMP0_W { w : self } } # [ doc = "Bit 2 - Dual Edge Capture Mode Enable For n = 0" ] # [ inline ( always ) ] pub fn decapen0 ( & mut self ) -> DECAPEN0_W { DECAPEN0_W { w : self } } # [ doc = "Bit 3 - Dual Edge Capture Mode Captures For n = 0" ] # [ inline ( always ) ] pub fn decap0 ( & mut self ) -> DECAP0_W { DECAP0_W { w : self } } # [ doc = "Bit 4 - Deadtime Enable For n = 0" ] # [ inline ( always ) ] pub fn dten0 ( & mut self ) -> DTEN0_W { DTEN0_W { w : self } } # [ doc = "Bit 5 - Synchronization Enable For n = 0" ] # [ inline ( always ) ] pub fn syncen0 ( & mut self ) -> SYNCEN0_W { SYNCEN0_W { w : self } } # [ doc = "Bit 6 - Fault Control Enable For n = 0" ] # [ inline ( always ) ] pub fn faulten0 ( & mut self ) -> FAULTEN0_W { FAULTEN0_W { w : self } } # [ doc = "Bit 8 - Combine Channels For n = 2" ] # [ inline ( always ) ] pub fn combine1 ( & mut self ) -> COMBINE1_W { COMBINE1_W { w : self } } # [ doc = "Bit 9 - Complement Of Channel (n) For n = 2" ] # [ inline ( always ) ] pub fn comp1 ( & mut self ) -> COMP1_W { COMP1_W { w : self } } # [ doc = "Bit 10 - Dual Edge Capture Mode Enable For n = 2" ] # [ inline ( always ) ] pub fn decapen1 ( & mut self ) -> DECAPEN1_W { DECAPEN1_W { w : self } } # [ doc = "Bit 11 - Dual Edge Capture Mode Captures For n = 2" ] # [ inline ( always ) ] pub fn decap1 ( & mut self ) -> DECAP1_W { DECAP1_W { w : self } } # [ doc = "Bit 12 - Deadtime Enable For n = 2" ] # [ inline ( always ) ] pub fn dten1 ( & mut self ) -> DTEN1_W { DTEN1_W { w : self } } # [ doc = "Bit 13 - Synchronization Enable For n = 2" ] # [ inline ( always ) ] pub fn syncen1 ( & mut self ) -> SYNCEN1_W { SYNCEN1_W { w : self } } # [ doc = "Bit 14 - Fault Control Enable For n = 2" ] # [ inline ( always ) ] pub fn faulten1 ( & mut self ) -> FAULTEN1_W { FAULTEN1_W { w : self } } # [ doc = "Bit 16 - Combine Channels For n = 4" ] # [ inline ( always ) ] pub fn combine2 ( & mut self ) -> COMBINE2_W { COMBINE2_W { w : self } } # [ doc = "Bit 17 - Complement Of Channel (n) For n = 4" ] # [ inline ( always ) ] pub fn comp2 ( & mut self ) -> COMP2_W { COMP2_W { w : self } } # [ doc = "Bit 18 - Dual Edge Capture Mode Enable For n = 4" ] # [ inline ( always ) ] pub fn decapen2 ( & mut self ) -> DECAPEN2_W { DECAPEN2_W { w : self } } # [ doc = "Bit 19 - Dual Edge Capture Mode Captures For n = 4" ] # [ inline ( always ) ] pub fn decap2 ( & mut self ) -> DECAP2_W { DECAP2_W { w : self } } # [ doc = "Bit 20 - Deadtime Enable For n = 4" ] # [ inline ( always ) ] pub fn dten2 ( & mut self ) -> DTEN2_W { DTEN2_W { w : self } } # [ doc = "Bit 21 - Synchronization Enable For n = 4" ] # [ inline ( always ) ] pub fn syncen2 ( & mut self ) -> SYNCEN2_W { SYNCEN2_W { w : self } } # [ doc = "Bit 22 - Fault Control Enable For n = 4" ] # [ inline ( always ) ] pub fn faulten2 ( & mut self ) -> FAULTEN2_W { FAULTEN2_W { w : self } } # [ doc = "Bit 24 - Combine Channels For n = 6" ] # [ inline ( always ) ] pub fn combine3 ( & mut self ) -> COMBINE3_W { COMBINE3_W { w : self } } # [ doc = "Bit 25 - Complement Of Channel (n) for n = 6" ] # [ inline ( always ) ] pub fn comp3 ( & mut self ) -> COMP3_W { COMP3_W { w : self } } # [ doc = "Bit 26 - Dual Edge Capture Mode Enable For n = 6" ] # [ inline ( always ) ] pub fn decapen3 ( & mut self ) -> DECAPEN3_W { DECAPEN3_W { w : self } } # [ doc = "Bit 27 - Dual Edge Capture Mode Captures For n = 6" ] # [ inline ( always ) ] pub fn decap3 ( & mut self ) -> DECAP3_W { DECAP3_W { w : self } } # [ doc = "Bit 28 - Deadtime Enable For n = 6" ] # [ inline ( always ) ] pub fn dten3 ( & mut self ) -> DTEN3_W { DTEN3_W { w : self } } # [ doc = "Bit 29 - Synchronization Enable For n = 6" ] # [ inline ( always ) ] pub fn syncen3 ( & mut self ) -> SYNCEN3_W { SYNCEN3_W { w : self } } # [ doc = "Bit 30 - Fault Control Enable For n = 6" ] # [ inline ( always ) ] pub fn faulten3 ( & mut self ) -> FAULTEN3_W { FAULTEN3_W { w : self } } } } # [ doc = "Deadtime Insertion Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [deadtime](deadtime) module" ] pub type DEADTIME = crate :: Reg < u32 , _DEADTIME > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEADTIME ; # [ doc = "`read()` method returns [deadtime::R](deadtime::R) reader structure" ] impl crate :: Readable for DEADTIME { } # [ doc = "`write(|w| ..)` method takes [deadtime::W](deadtime::W) writer structure" ] impl crate :: Writable for DEADTIME { } # [ doc = "Deadtime Insertion Control" ] pub mod deadtime { # [ doc = "Reader of register DEADTIME" ] pub type R = crate :: R < u32 , super :: DEADTIME > ; # [ doc = "Writer for register DEADTIME" ] pub type W = crate :: W < u32 , super :: DEADTIME > ; # [ doc = "Register DEADTIME `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DEADTIME { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DTVAL`" ] pub type DTVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DTVAL`" ] pub struct DTVAL_W < 'a > { w : & 'a mut W , } impl < 'a > DTVAL_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } # [ doc = "Deadtime Prescaler Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTPS_A { # [ doc = "2: Divide the system clock by 4." ] _10 , # [ doc = "3: Divide the system clock by 16." ] _11 } impl From < DTPS_A > for u8 { # [ inline ( always ) ] fn from ( variant : DTPS_A ) -> Self { match variant { DTPS_A :: _10 => 2 , DTPS_A :: _11 => 3 } } } # [ doc = "Reader of field `DTPS`" ] pub type DTPS_R = crate :: R < u8 , DTPS_A > ; impl DTPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DTPS_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( DTPS_A :: _10 ) , 3 => Val ( DTPS_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DTPS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DTPS_A :: _11 } } # [ doc = "Write proxy for field `DTPS`" ] pub struct DTPS_W < 'a > { w : & 'a mut W , } impl < 'a > DTPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTPS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Divide the system clock by 4." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DTPS_A :: _10 ) } # [ doc = "Divide the system clock by 16." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DTPS_A :: _11 ) } # [ 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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Deadtime Value" ] # [ inline ( always ) ] pub fn dtval ( & self ) -> DTVAL_R { DTVAL_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 6:7 - Deadtime Prescaler Value" ] # [ inline ( always ) ] pub fn dtps ( & self ) -> DTPS_R { DTPS_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Deadtime Value" ] # [ inline ( always ) ] pub fn dtval ( & mut self ) -> DTVAL_W { DTVAL_W { w : self } } # [ doc = "Bits 6:7 - Deadtime Prescaler Value" ] # [ inline ( always ) ] pub fn dtps ( & mut self ) -> DTPS_W { DTPS_W { w : self } } } } # [ doc = "FTM External Trigger\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [exttrig](exttrig) module" ] pub type EXTTRIG = crate :: Reg < u32 , _EXTTRIG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EXTTRIG ; # [ doc = "`read()` method returns [exttrig::R](exttrig::R) reader structure" ] impl crate :: Readable for EXTTRIG { } # [ doc = "`write(|w| ..)` method takes [exttrig::W](exttrig::W) writer structure" ] impl crate :: Writable for EXTTRIG { } # [ doc = "FTM External Trigger" ] pub mod exttrig { # [ doc = "Reader of register EXTTRIG" ] pub type R = crate :: R < u32 , super :: EXTTRIG > ; # [ doc = "Writer for register EXTTRIG" ] pub type W = crate :: W < u32 , super :: EXTTRIG > ; # [ doc = "Register EXTTRIG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EXTTRIG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 2 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH2TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2TRIG_A ) -> Self { match variant { CH2TRIG_A :: _0 => false , CH2TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH2TRIG`" ] pub type CH2TRIG_R = crate :: R < bool , CH2TRIG_A > ; impl CH2TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2TRIG_A { match self . bits { false => CH2TRIG_A :: _0 , true => CH2TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH2TRIG`" ] pub struct CH2TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH2TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2TRIG_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 3 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH3TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3TRIG_A ) -> Self { match variant { CH3TRIG_A :: _0 => false , CH3TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH3TRIG`" ] pub type CH3TRIG_R = crate :: R < bool , CH3TRIG_A > ; impl CH3TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3TRIG_A { match self . bits { false => CH3TRIG_A :: _0 , true => CH3TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH3TRIG`" ] pub struct CH3TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH3TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3TRIG_A :: _1 ) } # [ 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 } } # [ doc = "Channel 4 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH4TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4TRIG_A ) -> Self { match variant { CH4TRIG_A :: _0 => false , CH4TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH4TRIG`" ] pub type CH4TRIG_R = crate :: R < bool , CH4TRIG_A > ; impl CH4TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4TRIG_A { match self . bits { false => CH4TRIG_A :: _0 , true => CH4TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH4TRIG`" ] pub struct CH4TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH4TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4TRIG_A :: _1 ) } # [ 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 = "Channel 5 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH5TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5TRIG_A ) -> Self { match variant { CH5TRIG_A :: _0 => false , CH5TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH5TRIG`" ] pub type CH5TRIG_R = crate :: R < bool , CH5TRIG_A > ; impl CH5TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5TRIG_A { match self . bits { false => CH5TRIG_A :: _0 , true => CH5TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH5TRIG`" ] pub struct CH5TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH5TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5TRIG_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 0 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH0TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0TRIG_A ) -> Self { match variant { CH0TRIG_A :: _0 => false , CH0TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH0TRIG`" ] pub type CH0TRIG_R = crate :: R < bool , CH0TRIG_A > ; impl CH0TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0TRIG_A { match self . bits { false => CH0TRIG_A :: _0 , true => CH0TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH0TRIG`" ] pub struct CH0TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH0TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0TRIG_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 1 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH1TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1TRIG_A ) -> Self { match variant { CH1TRIG_A :: _0 => false , CH1TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH1TRIG`" ] pub type CH1TRIG_R = crate :: R < bool , CH1TRIG_A > ; impl CH1TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1TRIG_A { match self . bits { false => CH1TRIG_A :: _0 , true => CH1TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH1TRIG`" ] pub struct CH1TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH1TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1TRIG_A :: _1 ) } # [ 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 = "Initialization Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INITTRIGEN_A { # [ doc = "0: The generation of initialization trigger is disabled." ] _0 , # [ doc = "1: The generation of initialization trigger is enabled." ] _1 } impl From < INITTRIGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : INITTRIGEN_A ) -> Self { match variant { INITTRIGEN_A :: _0 => false , INITTRIGEN_A :: _1 => true } } } # [ doc = "Reader of field `INITTRIGEN`" ] pub type INITTRIGEN_R = crate :: R < bool , INITTRIGEN_A > ; impl INITTRIGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INITTRIGEN_A { match self . bits { false => INITTRIGEN_A :: _0 , true => INITTRIGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INITTRIGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INITTRIGEN_A :: _1 } } # [ doc = "Write proxy for field `INITTRIGEN`" ] pub struct INITTRIGEN_W < 'a > { w : & 'a mut W , } impl < 'a > INITTRIGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INITTRIGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of initialization trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INITTRIGEN_A :: _0 ) } # [ doc = "The generation of initialization trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INITTRIGEN_A :: _1 ) } # [ 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 = "Channel Trigger Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGF_A { # [ doc = "0: No channel trigger was generated." ] _0 , # [ doc = "1: A channel trigger was generated." ] _1 } impl From < TRIGF_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIGF_A ) -> Self { match variant { TRIGF_A :: _0 => false , TRIGF_A :: _1 => true } } } # [ doc = "Reader of field `TRIGF`" ] pub type TRIGF_R = crate :: R < bool , TRIGF_A > ; impl TRIGF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIGF_A { match self . bits { false => TRIGF_A :: _0 , true => TRIGF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIGF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIGF_A :: _1 } } # [ doc = "Write proxy for field `TRIGF`" ] pub struct TRIGF_W < 'a > { w : & 'a mut W , } impl < 'a > TRIGF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIGF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel trigger was generated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIGF_A :: _0 ) } # [ doc = "A channel trigger was generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIGF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 2 Trigger Enable" ] # [ inline ( always ) ] pub fn ch2trig ( & self ) -> CH2TRIG_R { CH2TRIG_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 3 Trigger Enable" ] # [ inline ( always ) ] pub fn ch3trig ( & self ) -> CH3TRIG_R { CH3TRIG_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 4 Trigger Enable" ] # [ inline ( always ) ] pub fn ch4trig ( & self ) -> CH4TRIG_R { CH4TRIG_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 5 Trigger Enable" ] # [ inline ( always ) ] pub fn ch5trig ( & self ) -> CH5TRIG_R { CH5TRIG_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 0 Trigger Enable" ] # [ inline ( always ) ] pub fn ch0trig ( & self ) -> CH0TRIG_R { CH0TRIG_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 1 Trigger Enable" ] # [ inline ( always ) ] pub fn ch1trig ( & self ) -> CH1TRIG_R { CH1TRIG_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Initialization Trigger Enable" ] # [ inline ( always ) ] pub fn inittrigen ( & self ) -> INITTRIGEN_R { INITTRIGEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Trigger Flag" ] # [ inline ( always ) ] pub fn trigf ( & self ) -> TRIGF_R { TRIGF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 2 Trigger Enable" ] # [ inline ( always ) ] pub fn ch2trig ( & mut self ) -> CH2TRIG_W { CH2TRIG_W { w : self } } # [ doc = "Bit 1 - Channel 3 Trigger Enable" ] # [ inline ( always ) ] pub fn ch3trig ( & mut self ) -> CH3TRIG_W { CH3TRIG_W { w : self } } # [ doc = "Bit 2 - Channel 4 Trigger Enable" ] # [ inline ( always ) ] pub fn ch4trig ( & mut self ) -> CH4TRIG_W { CH4TRIG_W { w : self } } # [ doc = "Bit 3 - Channel 5 Trigger Enable" ] # [ inline ( always ) ] pub fn ch5trig ( & mut self ) -> CH5TRIG_W { CH5TRIG_W { w : self } } # [ doc = "Bit 4 - Channel 0 Trigger Enable" ] # [ inline ( always ) ] pub fn ch0trig ( & mut self ) -> CH0TRIG_W { CH0TRIG_W { w : self } } # [ doc = "Bit 5 - Channel 1 Trigger Enable" ] # [ inline ( always ) ] pub fn ch1trig ( & mut self ) -> CH1TRIG_W { CH1TRIG_W { w : self } } # [ doc = "Bit 6 - Initialization Trigger Enable" ] # [ inline ( always ) ] pub fn inittrigen ( & mut self ) -> INITTRIGEN_W { INITTRIGEN_W { w : self } } # [ doc = "Bit 7 - Channel Trigger Flag" ] # [ inline ( always ) ] pub fn trigf ( & mut self ) -> TRIGF_W { TRIGF_W { w : self } } } } # [ doc = "Channels Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pol](pol) module" ] pub type POL = crate :: Reg < u32 , _POL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POL ; # [ doc = "`read()` method returns [pol::R](pol::R) reader structure" ] impl crate :: Readable for POL { } # [ doc = "`write(|w| ..)` method takes [pol::W](pol::W) writer structure" ] impl crate :: Writable for POL { } # [ doc = "Channels Polarity" ] pub mod pol { # [ doc = "Reader of register POL" ] pub type R = crate :: R < u32 , super :: POL > ; # [ doc = "Writer for register POL" ] pub type W = crate :: W < u32 , super :: POL > ; # [ doc = "Register POL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: POL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL0_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL0_A > for bool { # [ inline ( always ) ] fn from ( variant : POL0_A ) -> Self { match variant { POL0_A :: _0 => false , POL0_A :: _1 => true } } } # [ doc = "Reader of field `POL0`" ] pub type POL0_R = crate :: R < bool , POL0_A > ; impl POL0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL0_A { match self . bits { false => POL0_A :: _0 , true => POL0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL0_A :: _1 } } # [ doc = "Write proxy for field `POL0`" ] pub struct POL0_W < 'a > { w : & 'a mut W , } impl < 'a > POL0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL1_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL1_A > for bool { # [ inline ( always ) ] fn from ( variant : POL1_A ) -> Self { match variant { POL1_A :: _0 => false , POL1_A :: _1 => true } } } # [ doc = "Reader of field `POL1`" ] pub type POL1_R = crate :: R < bool , POL1_A > ; impl POL1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL1_A { match self . bits { false => POL1_A :: _0 , true => POL1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL1_A :: _1 } } # [ doc = "Write proxy for field `POL1`" ] pub struct POL1_W < 'a > { w : & 'a mut W , } impl < 'a > POL1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL2_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL2_A > for bool { # [ inline ( always ) ] fn from ( variant : POL2_A ) -> Self { match variant { POL2_A :: _0 => false , POL2_A :: _1 => true } } } # [ doc = "Reader of field `POL2`" ] pub type POL2_R = crate :: R < bool , POL2_A > ; impl POL2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL2_A { match self . bits { false => POL2_A :: _0 , true => POL2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL2_A :: _1 } } # [ doc = "Write proxy for field `POL2`" ] pub struct POL2_W < 'a > { w : & 'a mut W , } impl < 'a > POL2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL2_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL2_A :: _1 ) } # [ 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 = "Channel 3 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL3_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL3_A > for bool { # [ inline ( always ) ] fn from ( variant : POL3_A ) -> Self { match variant { POL3_A :: _0 => false , POL3_A :: _1 => true } } } # [ doc = "Reader of field `POL3`" ] pub type POL3_R = crate :: R < bool , POL3_A > ; impl POL3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL3_A { match self . bits { false => POL3_A :: _0 , true => POL3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL3_A :: _1 } } # [ doc = "Write proxy for field `POL3`" ] pub struct POL3_W < 'a > { w : & 'a mut W , } impl < 'a > POL3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL3_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL4_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL4_A > for bool { # [ inline ( always ) ] fn from ( variant : POL4_A ) -> Self { match variant { POL4_A :: _0 => false , POL4_A :: _1 => true } } } # [ doc = "Reader of field `POL4`" ] pub type POL4_R = crate :: R < bool , POL4_A > ; impl POL4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL4_A { match self . bits { false => POL4_A :: _0 , true => POL4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL4_A :: _1 } } # [ doc = "Write proxy for field `POL4`" ] pub struct POL4_W < 'a > { w : & 'a mut W , } impl < 'a > POL4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL4_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL5_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL5_A > for bool { # [ inline ( always ) ] fn from ( variant : POL5_A ) -> Self { match variant { POL5_A :: _0 => false , POL5_A :: _1 => true } } } # [ doc = "Reader of field `POL5`" ] pub type POL5_R = crate :: R < bool , POL5_A > ; impl POL5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL5_A { match self . bits { false => POL5_A :: _0 , true => POL5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL5_A :: _1 } } # [ doc = "Write proxy for field `POL5`" ] pub struct POL5_W < 'a > { w : & 'a mut W , } impl < 'a > POL5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL5_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL5_A :: _1 ) } # [ 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 = "Channel 6 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL6_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL6_A > for bool { # [ inline ( always ) ] fn from ( variant : POL6_A ) -> Self { match variant { POL6_A :: _0 => false , POL6_A :: _1 => true } } } # [ doc = "Reader of field `POL6`" ] pub type POL6_R = crate :: R < bool , POL6_A > ; impl POL6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL6_A { match self . bits { false => POL6_A :: _0 , true => POL6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL6_A :: _1 } } # [ doc = "Write proxy for field `POL6`" ] pub struct POL6_W < 'a > { w : & 'a mut W , } impl < 'a > POL6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL6_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL6_A :: _1 ) } # [ 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 = "Channel 7 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL7_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL7_A > for bool { # [ inline ( always ) ] fn from ( variant : POL7_A ) -> Self { match variant { POL7_A :: _0 => false , POL7_A :: _1 => true } } } # [ doc = "Reader of field `POL7`" ] pub type POL7_R = crate :: R < bool , POL7_A > ; impl POL7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL7_A { match self . bits { false => POL7_A :: _0 , true => POL7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL7_A :: _1 } } # [ doc = "Write proxy for field `POL7`" ] pub struct POL7_W < 'a > { w : & 'a mut W , } impl < 'a > POL7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL7_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL7_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & self ) -> POL0_R { POL0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & self ) -> POL1_R { POL1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Polarity" ] # [ inline ( always ) ] pub fn pol2 ( & self ) -> POL2_R { POL2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Polarity" ] # [ inline ( always ) ] pub fn pol3 ( & self ) -> POL3_R { POL3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Polarity" ] # [ inline ( always ) ] pub fn pol4 ( & self ) -> POL4_R { POL4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Polarity" ] # [ inline ( always ) ] pub fn pol5 ( & self ) -> POL5_R { POL5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Polarity" ] # [ inline ( always ) ] pub fn pol6 ( & self ) -> POL6_R { POL6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Polarity" ] # [ inline ( always ) ] pub fn pol7 ( & self ) -> POL7_R { POL7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & mut self ) -> POL0_W { POL0_W { w : self } } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & mut self ) -> POL1_W { POL1_W { w : self } } # [ doc = "Bit 2 - Channel 2 Polarity" ] # [ inline ( always ) ] pub fn pol2 ( & mut self ) -> POL2_W { POL2_W { w : self } } # [ doc = "Bit 3 - Channel 3 Polarity" ] # [ inline ( always ) ] pub fn pol3 ( & mut self ) -> POL3_W { POL3_W { w : self } } # [ doc = "Bit 4 - Channel 4 Polarity" ] # [ inline ( always ) ] pub fn pol4 ( & mut self ) -> POL4_W { POL4_W { w : self } } # [ doc = "Bit 5 - Channel 5 Polarity" ] # [ inline ( always ) ] pub fn pol5 ( & mut self ) -> POL5_W { POL5_W { w : self } } # [ doc = "Bit 6 - Channel 6 Polarity" ] # [ inline ( always ) ] pub fn pol6 ( & mut self ) -> POL6_W { POL6_W { w : self } } # [ doc = "Bit 7 - Channel 7 Polarity" ] # [ inline ( always ) ] pub fn pol7 ( & mut self ) -> POL7_W { POL7_W { w : self } } } } # [ doc = "Fault Mode Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fms](fms) module" ] pub type FMS = crate :: Reg < u32 , _FMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FMS ; # [ doc = "`read()` method returns [fms::R](fms::R) reader structure" ] impl crate :: Readable for FMS { } # [ doc = "`write(|w| ..)` method takes [fms::W](fms::W) writer structure" ] impl crate :: Writable for FMS { } # [ doc = "Fault Mode Status" ] pub mod fms { # [ doc = "Reader of register FMS" ] pub type R = crate :: R < u32 , super :: FMS > ; # [ doc = "Writer for register FMS" ] pub type W = crate :: W < u32 , super :: FMS > ; # [ doc = "Register FMS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FMS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Detection Flag 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF0_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF0_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF0_A ) -> Self { match variant { FAULTF0_A :: _0 => false , FAULTF0_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF0`" ] pub type FAULTF0_R = crate :: R < bool , FAULTF0_A > ; impl FAULTF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF0_A { match self . bits { false => FAULTF0_A :: _0 , true => FAULTF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF0_A :: _1 } } # [ doc = "Write proxy for field `FAULTF0`" ] pub struct FAULTF0_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF0_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Detection Flag 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF1_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF1_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF1_A ) -> Self { match variant { FAULTF1_A :: _0 => false , FAULTF1_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF1`" ] pub type FAULTF1_R = crate :: R < bool , FAULTF1_A > ; impl FAULTF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF1_A { match self . bits { false => FAULTF1_A :: _0 , true => FAULTF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF1_A :: _1 } } # [ doc = "Write proxy for field `FAULTF1`" ] pub struct FAULTF1_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF1_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF1_A :: _1 ) } # [ 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 } } # [ doc = "Fault Detection Flag 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF2_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF2_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF2_A ) -> Self { match variant { FAULTF2_A :: _0 => false , FAULTF2_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF2`" ] pub type FAULTF2_R = crate :: R < bool , FAULTF2_A > ; impl FAULTF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF2_A { match self . bits { false => FAULTF2_A :: _0 , true => FAULTF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF2_A :: _1 } } # [ doc = "Write proxy for field `FAULTF2`" ] pub struct FAULTF2_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF2_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF2_A :: _1 ) } # [ 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 = "Fault Detection Flag 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF3_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF3_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF3_A ) -> Self { match variant { FAULTF3_A :: _0 => false , FAULTF3_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF3`" ] pub type FAULTF3_R = crate :: R < bool , FAULTF3_A > ; impl FAULTF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF3_A { match self . bits { false => FAULTF3_A :: _0 , true => FAULTF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF3_A :: _1 } } # [ doc = "Write proxy for field `FAULTF3`" ] pub struct FAULTF3_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF3_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Fault Inputs\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTIN_A { # [ doc = "0: The logic OR of the enabled fault inputs is 0." ] _0 , # [ doc = "1: The logic OR of the enabled fault inputs is 1." ] _1 } impl From < FAULTIN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTIN_A ) -> Self { match variant { FAULTIN_A :: _0 => false , FAULTIN_A :: _1 => true } } } # [ doc = "Reader of field `FAULTIN`" ] pub type FAULTIN_R = crate :: R < bool , FAULTIN_A > ; impl FAULTIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTIN_A { match self . bits { false => FAULTIN_A :: _0 , true => FAULTIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTIN_A :: _1 } } # [ doc = "Write Protection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPEN_A { # [ doc = "0: Write protection is disabled. Write protected bits can be written." ] _0 , # [ doc = "1: Write protection is enabled. Write protected bits cannot be written." ] _1 } impl From < WPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WPEN_A ) -> Self { match variant { WPEN_A :: _0 => false , WPEN_A :: _1 => true } } } # [ doc = "Reader of field `WPEN`" ] pub type WPEN_R = crate :: R < bool , WPEN_A > ; impl WPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPEN_A { match self . bits { false => WPEN_A :: _0 , true => WPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPEN_A :: _1 } } # [ doc = "Write proxy for field `WPEN`" ] pub struct WPEN_W < 'a > { w : & 'a mut W , } impl < 'a > WPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write protection is disabled. Write protected bits can be written." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPEN_A :: _0 ) } # [ doc = "Write protection is enabled. Write protected bits cannot be written." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPEN_A :: _1 ) } # [ 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 = "Fault Detection Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF_A { # [ doc = "0: No fault condition was detected." ] _0 , # [ doc = "1: A fault condition was detected." ] _1 } impl From < FAULTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF_A ) -> Self { match variant { FAULTF_A :: _0 => false , FAULTF_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF`" ] pub type FAULTF_R = crate :: R < bool , FAULTF_A > ; impl FAULTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF_A { match self . bits { false => FAULTF_A :: _0 , true => FAULTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF_A :: _1 } } # [ doc = "Write proxy for field `FAULTF`" ] pub struct FAULTF_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF_A :: _0 ) } # [ doc = "A fault condition was detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Fault Detection Flag 0" ] # [ inline ( always ) ] pub fn faultf0 ( & self ) -> FAULTF0_R { FAULTF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Detection Flag 1" ] # [ inline ( always ) ] pub fn faultf1 ( & self ) -> FAULTF1_R { FAULTF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Detection Flag 2" ] # [ inline ( always ) ] pub fn faultf2 ( & self ) -> FAULTF2_R { FAULTF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Detection Flag 3" ] # [ inline ( always ) ] pub fn faultf3 ( & self ) -> FAULTF3_R { FAULTF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Fault Inputs" ] # [ inline ( always ) ] pub fn faultin ( & self ) -> FAULTIN_R { FAULTIN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Write Protection Enable" ] # [ inline ( always ) ] pub fn wpen ( & self ) -> WPEN_R { WPEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fault Detection Flag" ] # [ inline ( always ) ] pub fn faultf ( & self ) -> FAULTF_R { FAULTF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Fault Detection Flag 0" ] # [ inline ( always ) ] pub fn faultf0 ( & mut self ) -> FAULTF0_W { FAULTF0_W { w : self } } # [ doc = "Bit 1 - Fault Detection Flag 1" ] # [ inline ( always ) ] pub fn faultf1 ( & mut self ) -> FAULTF1_W { FAULTF1_W { w : self } } # [ doc = "Bit 2 - Fault Detection Flag 2" ] # [ inline ( always ) ] pub fn faultf2 ( & mut self ) -> FAULTF2_W { FAULTF2_W { w : self } } # [ doc = "Bit 3 - Fault Detection Flag 3" ] # [ inline ( always ) ] pub fn faultf3 ( & mut self ) -> FAULTF3_W { FAULTF3_W { w : self } } # [ doc = "Bit 6 - Write Protection Enable" ] # [ inline ( always ) ] pub fn wpen ( & mut self ) -> WPEN_W { WPEN_W { w : self } } # [ doc = "Bit 7 - Fault Detection Flag" ] # [ inline ( always ) ] pub fn faultf ( & mut self ) -> FAULTF_W { FAULTF_W { w : self } } } } # [ doc = "Input Capture Filter Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filter](filter) module" ] pub type FILTER = crate :: Reg < u32 , _FILTER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILTER ; # [ doc = "`read()` method returns [filter::R](filter::R) reader structure" ] impl crate :: Readable for FILTER { } # [ doc = "`write(|w| ..)` method takes [filter::W](filter::W) writer structure" ] impl crate :: Writable for FILTER { } # [ doc = "Input Capture Filter Control" ] pub mod filter { # [ doc = "Reader of register FILTER" ] pub type R = crate :: R < u32 , super :: FILTER > ; # [ doc = "Writer for register FILTER" ] pub type W = crate :: W < u32 , super :: FILTER > ; # [ doc = "Register FILTER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILTER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CH0FVAL`" ] pub type CH0FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH0FVAL`" ] pub struct CH0FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0FVAL_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `CH1FVAL`" ] pub type CH1FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH1FVAL`" ] pub struct CH1FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1FVAL_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } # [ doc = "Reader of field `CH2FVAL`" ] pub type CH2FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH2FVAL`" ] pub struct CH2FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH2FVAL_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `CH3FVAL`" ] pub type CH3FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH3FVAL`" ] pub struct CH3FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH3FVAL_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 & ! ( 0x0f << 12 ) ) | ( ( ( value as u32 ) & 0x0f ) << 12 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Channel 0 Input Filter" ] # [ inline ( always ) ] pub fn ch0fval ( & self ) -> CH0FVAL_R { CH0FVAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Channel 1 Input Filter" ] # [ inline ( always ) ] pub fn ch1fval ( & self ) -> CH1FVAL_R { CH1FVAL_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Channel 2 Input Filter" ] # [ inline ( always ) ] pub fn ch2fval ( & self ) -> CH2FVAL_R { CH2FVAL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - Channel 3 Input Filter" ] # [ inline ( always ) ] pub fn ch3fval ( & self ) -> CH3FVAL_R { CH3FVAL_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Channel 0 Input Filter" ] # [ inline ( always ) ] pub fn ch0fval ( & mut self ) -> CH0FVAL_W { CH0FVAL_W { w : self } } # [ doc = "Bits 4:7 - Channel 1 Input Filter" ] # [ inline ( always ) ] pub fn ch1fval ( & mut self ) -> CH1FVAL_W { CH1FVAL_W { w : self } } # [ doc = "Bits 8:11 - Channel 2 Input Filter" ] # [ inline ( always ) ] pub fn ch2fval ( & mut self ) -> CH2FVAL_W { CH2FVAL_W { w : self } } # [ doc = "Bits 12:15 - Channel 3 Input Filter" ] # [ inline ( always ) ] pub fn ch3fval ( & mut self ) -> CH3FVAL_W { CH3FVAL_W { w : self } } } } # [ doc = "Fault Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fltctrl](fltctrl) module" ] pub type FLTCTRL = crate :: Reg < u32 , _FLTCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLTCTRL ; # [ doc = "`read()` method returns [fltctrl::R](fltctrl::R) reader structure" ] impl crate :: Readable for FLTCTRL { } # [ doc = "`write(|w| ..)` method takes [fltctrl::W](fltctrl::W) writer structure" ] impl crate :: Writable for FLTCTRL { } # [ doc = "Fault Control" ] pub mod fltctrl { # [ doc = "Reader of register FLTCTRL" ] pub type R = crate :: R < u32 , super :: FLTCTRL > ; # [ doc = "Writer for register FLTCTRL" ] pub type W = crate :: W < u32 , super :: FLTCTRL > ; # [ doc = "Register FLTCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLTCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Input 0 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT0EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT0EN_A ) -> Self { match variant { FAULT0EN_A :: _0 => false , FAULT0EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT0EN`" ] pub type FAULT0EN_R = crate :: R < bool , FAULT0EN_A > ; impl FAULT0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT0EN_A { match self . bits { false => FAULT0EN_A :: _0 , true => FAULT0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT0EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT0EN`" ] pub struct FAULT0EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT0EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT0EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Input 1 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT1EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT1EN_A ) -> Self { match variant { FAULT1EN_A :: _0 => false , FAULT1EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT1EN`" ] pub type FAULT1EN_R = crate :: R < bool , FAULT1EN_A > ; impl FAULT1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT1EN_A { match self . bits { false => FAULT1EN_A :: _0 , true => FAULT1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT1EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT1EN`" ] pub struct FAULT1EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT1EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT1EN_A :: _1 ) } # [ 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 } } # [ doc = "Fault Input 2 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT2EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT2EN_A ) -> Self { match variant { FAULT2EN_A :: _0 => false , FAULT2EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT2EN`" ] pub type FAULT2EN_R = crate :: R < bool , FAULT2EN_A > ; impl FAULT2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT2EN_A { match self . bits { false => FAULT2EN_A :: _0 , true => FAULT2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT2EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT2EN`" ] pub struct FAULT2EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT2EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT2EN_A :: _1 ) } # [ 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 = "Fault Input 3 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT3EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT3EN_A ) -> Self { match variant { FAULT3EN_A :: _0 => false , FAULT3EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT3EN`" ] pub type FAULT3EN_R = crate :: R < bool , FAULT3EN_A > ; impl FAULT3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT3EN_A { match self . bits { false => FAULT3EN_A :: _0 , true => FAULT3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT3EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT3EN`" ] pub struct FAULT3EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT3EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT3EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Fault Input 0 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR0EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR0EN_A ) -> Self { match variant { FFLTR0EN_A :: _0 => false , FFLTR0EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR0EN`" ] pub type FFLTR0EN_R = crate :: R < bool , FFLTR0EN_A > ; impl FFLTR0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR0EN_A { match self . bits { false => FFLTR0EN_A :: _0 , true => FFLTR0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR0EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR0EN`" ] pub struct FFLTR0EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR0EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR0EN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Fault Input 1 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR1EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR1EN_A ) -> Self { match variant { FFLTR1EN_A :: _0 => false , FFLTR1EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR1EN`" ] pub type FFLTR1EN_R = crate :: R < bool , FFLTR1EN_A > ; impl FFLTR1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR1EN_A { match self . bits { false => FFLTR1EN_A :: _0 , true => FFLTR1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR1EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR1EN`" ] pub struct FFLTR1EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR1EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR1EN_A :: _1 ) } # [ 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 = "Fault Input 2 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR2EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR2EN_A ) -> Self { match variant { FFLTR2EN_A :: _0 => false , FFLTR2EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR2EN`" ] pub type FFLTR2EN_R = crate :: R < bool , FFLTR2EN_A > ; impl FFLTR2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR2EN_A { match self . bits { false => FFLTR2EN_A :: _0 , true => FFLTR2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR2EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR2EN`" ] pub struct FFLTR2EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR2EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR2EN_A :: _1 ) } # [ 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 = "Fault Input 3 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR3EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR3EN_A ) -> Self { match variant { FFLTR3EN_A :: _0 => false , FFLTR3EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR3EN`" ] pub type FFLTR3EN_R = crate :: R < bool , FFLTR3EN_A > ; impl FFLTR3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR3EN_A { match self . bits { false => FFLTR3EN_A :: _0 , true => FFLTR3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR3EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR3EN`" ] pub struct FFLTR3EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR3EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR3EN_A :: _1 ) } # [ 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 = "Reader of field `FFVAL`" ] pub type FFVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FFVAL`" ] pub struct FFVAL_W < 'a > { w : & 'a mut W , } impl < 'a > FFVAL_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } impl R { # [ doc = "Bit 0 - Fault Input 0 Enable" ] # [ inline ( always ) ] pub fn fault0en ( & self ) -> FAULT0EN_R { FAULT0EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Input 1 Enable" ] # [ inline ( always ) ] pub fn fault1en ( & self ) -> FAULT1EN_R { FAULT1EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Input 2 Enable" ] # [ inline ( always ) ] pub fn fault2en ( & self ) -> FAULT2EN_R { FAULT2EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Input 3 Enable" ] # [ inline ( always ) ] pub fn fault3en ( & self ) -> FAULT3EN_R { FAULT3EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Fault Input 0 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr0en ( & self ) -> FFLTR0EN_R { FFLTR0EN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Fault Input 1 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr1en ( & self ) -> FFLTR1EN_R { FFLTR1EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Fault Input 2 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr2en ( & self ) -> FFLTR2EN_R { FFLTR2EN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fault Input 3 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr3en ( & self ) -> FFLTR3EN_R { FFLTR3EN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - Fault Input Filter" ] # [ inline ( always ) ] pub fn ffval ( & self ) -> FFVAL_R { FFVAL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Fault Input 0 Enable" ] # [ inline ( always ) ] pub fn fault0en ( & mut self ) -> FAULT0EN_W { FAULT0EN_W { w : self } } # [ doc = "Bit 1 - Fault Input 1 Enable" ] # [ inline ( always ) ] pub fn fault1en ( & mut self ) -> FAULT1EN_W { FAULT1EN_W { w : self } } # [ doc = "Bit 2 - Fault Input 2 Enable" ] # [ inline ( always ) ] pub fn fault2en ( & mut self ) -> FAULT2EN_W { FAULT2EN_W { w : self } } # [ doc = "Bit 3 - Fault Input 3 Enable" ] # [ inline ( always ) ] pub fn fault3en ( & mut self ) -> FAULT3EN_W { FAULT3EN_W { w : self } } # [ doc = "Bit 4 - Fault Input 0 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr0en ( & mut self ) -> FFLTR0EN_W { FFLTR0EN_W { w : self } } # [ doc = "Bit 5 - Fault Input 1 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr1en ( & mut self ) -> FFLTR1EN_W { FFLTR1EN_W { w : self } } # [ doc = "Bit 6 - Fault Input 2 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr2en ( & mut self ) -> FFLTR2EN_W { FFLTR2EN_W { w : self } } # [ doc = "Bit 7 - Fault Input 3 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr3en ( & mut self ) -> FFLTR3EN_W { FFLTR3EN_W { w : self } } # [ doc = "Bits 8:11 - Fault Input Filter" ] # [ inline ( always ) ] pub fn ffval ( & mut self ) -> FFVAL_W { FFVAL_W { w : self } } } } # [ doc = "Quadrature Decoder Control And Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [qdctrl](qdctrl) module" ] pub type QDCTRL = crate :: Reg < u32 , _QDCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _QDCTRL ; # [ doc = "`read()` method returns [qdctrl::R](qdctrl::R) reader structure" ] impl crate :: Readable for QDCTRL { } # [ doc = "`write(|w| ..)` method takes [qdctrl::W](qdctrl::W) writer structure" ] impl crate :: Writable for QDCTRL { } # [ doc = "Quadrature Decoder Control And Status" ] pub mod qdctrl { # [ doc = "Reader of register QDCTRL" ] pub type R = crate :: R < u32 , super :: QDCTRL > ; # [ doc = "Writer for register QDCTRL" ] pub type W = crate :: W < u32 , super :: QDCTRL > ; # [ doc = "Register QDCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: QDCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Quadrature Decoder Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADEN_A { # [ doc = "0: Quadrature Decoder mode is disabled." ] _0 , # [ doc = "1: Quadrature Decoder mode is enabled." ] _1 } impl From < QUADEN_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADEN_A ) -> Self { match variant { QUADEN_A :: _0 => false , QUADEN_A :: _1 => true } } } # [ doc = "Reader of field `QUADEN`" ] pub type QUADEN_R = crate :: R < bool , QUADEN_A > ; impl QUADEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADEN_A { match self . bits { false => QUADEN_A :: _0 , true => QUADEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADEN_A :: _1 } } # [ doc = "Write proxy for field `QUADEN`" ] pub struct QUADEN_W < 'a > { w : & 'a mut W , } impl < 'a > QUADEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Quadrature Decoder mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _0 ) } # [ doc = "Quadrature Decoder mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Timer Overflow Direction In Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOFDIR_A { # [ doc = "0: TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes from its minimum value (CNTIN register) to its maximum value (MOD register)." ] _0 , # [ doc = "1: TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from its maximum value (MOD register) to its minimum value (CNTIN register)." ] _1 } impl From < TOFDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TOFDIR_A ) -> Self { match variant { TOFDIR_A :: _0 => false , TOFDIR_A :: _1 => true } } } # [ doc = "Reader of field `TOFDIR`" ] pub type TOFDIR_R = crate :: R < bool , TOFDIR_A > ; impl TOFDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOFDIR_A { match self . bits { false => TOFDIR_A :: _0 , true => TOFDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOFDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOFDIR_A :: _1 } } # [ doc = "FTM Counter Direction In Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADIR_A { # [ doc = "0: Counting direction is decreasing (FTM counter decrement)." ] _0 , # [ doc = "1: Counting direction is increasing (FTM counter increment)." ] _1 } impl From < QUADIR_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADIR_A ) -> Self { match variant { QUADIR_A :: _0 => false , QUADIR_A :: _1 => true } } } # [ doc = "Reader of field `QUADIR`" ] pub type QUADIR_R = crate :: R < bool , QUADIR_A > ; impl QUADIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADIR_A { match self . bits { false => QUADIR_A :: _0 , true => QUADIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADIR_A :: _1 } } # [ doc = "Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADMODE_A { # [ doc = "0: Phase A and phase B encoding mode." ] _0 , # [ doc = "1: Count and direction encoding mode." ] _1 } impl From < QUADMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADMODE_A ) -> Self { match variant { QUADMODE_A :: _0 => false , QUADMODE_A :: _1 => true } } } # [ doc = "Reader of field `QUADMODE`" ] pub type QUADMODE_R = crate :: R < bool , QUADMODE_A > ; impl QUADMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADMODE_A { match self . bits { false => QUADMODE_A :: _0 , true => QUADMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADMODE_A :: _1 } } # [ doc = "Write proxy for field `QUADMODE`" ] pub struct QUADMODE_W < 'a > { w : & 'a mut W , } impl < 'a > QUADMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase A and phase B encoding mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _0 ) } # [ doc = "Count and direction encoding mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Phase B Input Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHBPOL_A { # [ doc = "0: Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal." ] _0 , # [ doc = "1: Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal." ] _1 } impl From < PHBPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : PHBPOL_A ) -> Self { match variant { PHBPOL_A :: _0 => false , PHBPOL_A :: _1 => true } } } # [ doc = "Reader of field `PHBPOL`" ] pub type PHBPOL_R = crate :: R < bool , PHBPOL_A > ; impl PHBPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHBPOL_A { match self . bits { false => PHBPOL_A :: _0 , true => PHBPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHBPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHBPOL_A :: _1 } } # [ doc = "Write proxy for field `PHBPOL`" ] pub struct PHBPOL_W < 'a > { w : & 'a mut W , } impl < 'a > PHBPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHBPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHBPOL_A :: _0 ) } # [ doc = "Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHBPOL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Phase A Input Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHAPOL_A { # [ doc = "0: Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal." ] _0 , # [ doc = "1: Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal." ] _1 } impl From < PHAPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : PHAPOL_A ) -> Self { match variant { PHAPOL_A :: _0 => false , PHAPOL_A :: _1 => true } } } # [ doc = "Reader of field `PHAPOL`" ] pub type PHAPOL_R = crate :: R < bool , PHAPOL_A > ; impl PHAPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHAPOL_A { match self . bits { false => PHAPOL_A :: _0 , true => PHAPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHAPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHAPOL_A :: _1 } } # [ doc = "Write proxy for field `PHAPOL`" ] pub struct PHAPOL_W < 'a > { w : & 'a mut W , } impl < 'a > PHAPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHAPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHAPOL_A :: _0 ) } # [ doc = "Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHAPOL_A :: _1 ) } # [ 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 = "Phase B Input Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHBFLTREN_A { # [ doc = "0: Phase B input filter is disabled." ] _0 , # [ doc = "1: Phase B input filter is enabled." ] _1 } impl From < PHBFLTREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PHBFLTREN_A ) -> Self { match variant { PHBFLTREN_A :: _0 => false , PHBFLTREN_A :: _1 => true } } } # [ doc = "Reader of field `PHBFLTREN`" ] pub type PHBFLTREN_R = crate :: R < bool , PHBFLTREN_A > ; impl PHBFLTREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHBFLTREN_A { match self . bits { false => PHBFLTREN_A :: _0 , true => PHBFLTREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHBFLTREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHBFLTREN_A :: _1 } } # [ doc = "Write proxy for field `PHBFLTREN`" ] pub struct PHBFLTREN_W < 'a > { w : & 'a mut W , } impl < 'a > PHBFLTREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHBFLTREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase B input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHBFLTREN_A :: _0 ) } # [ doc = "Phase B input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHBFLTREN_A :: _1 ) } # [ 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 = "Phase A Input Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHAFLTREN_A { # [ doc = "0: Phase A input filter is disabled." ] _0 , # [ doc = "1: Phase A input filter is enabled." ] _1 } impl From < PHAFLTREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PHAFLTREN_A ) -> Self { match variant { PHAFLTREN_A :: _0 => false , PHAFLTREN_A :: _1 => true } } } # [ doc = "Reader of field `PHAFLTREN`" ] pub type PHAFLTREN_R = crate :: R < bool , PHAFLTREN_A > ; impl PHAFLTREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHAFLTREN_A { match self . bits { false => PHAFLTREN_A :: _0 , true => PHAFLTREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHAFLTREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHAFLTREN_A :: _1 } } # [ doc = "Write proxy for field `PHAFLTREN`" ] pub struct PHAFLTREN_W < 'a > { w : & 'a mut W , } impl < 'a > PHAFLTREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHAFLTREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase A input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHAFLTREN_A :: _0 ) } # [ doc = "Phase A input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHAFLTREN_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Quadrature Decoder Mode Enable" ] # [ inline ( always ) ] pub fn quaden ( & self ) -> QUADEN_R { QUADEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Timer Overflow Direction In Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn tofdir ( & self ) -> TOFDIR_R { TOFDIR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM Counter Direction In Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadir ( & self ) -> QUADIR_R { QUADIR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & self ) -> QUADMODE_R { QUADMODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Phase B Input Polarity" ] # [ inline ( always ) ] pub fn phbpol ( & self ) -> PHBPOL_R { PHBPOL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Phase A Input Polarity" ] # [ inline ( always ) ] pub fn phapol ( & self ) -> PHAPOL_R { PHAPOL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Phase B Input Filter Enable" ] # [ inline ( always ) ] pub fn phbfltren ( & self ) -> PHBFLTREN_R { PHBFLTREN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Phase A Input Filter Enable" ] # [ inline ( always ) ] pub fn phafltren ( & self ) -> PHAFLTREN_R { PHAFLTREN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Quadrature Decoder Mode Enable" ] # [ inline ( always ) ] pub fn quaden ( & mut self ) -> QUADEN_W { QUADEN_W { w : self } } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & mut self ) -> QUADMODE_W { QUADMODE_W { w : self } } # [ doc = "Bit 4 - Phase B Input Polarity" ] # [ inline ( always ) ] pub fn phbpol ( & mut self ) -> PHBPOL_W { PHBPOL_W { w : self } } # [ doc = "Bit 5 - Phase A Input Polarity" ] # [ inline ( always ) ] pub fn phapol ( & mut self ) -> PHAPOL_W { PHAPOL_W { w : self } } # [ doc = "Bit 6 - Phase B Input Filter Enable" ] # [ inline ( always ) ] pub fn phbfltren ( & mut self ) -> PHBFLTREN_W { PHBFLTREN_W { w : self } } # [ doc = "Bit 7 - Phase A Input Filter Enable" ] # [ inline ( always ) ] pub fn phafltren ( & mut self ) -> PHAFLTREN_W { PHAFLTREN_W { w : self } } } } # [ doc = "Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [conf](conf) module" ] pub type CONF = crate :: Reg < u32 , _CONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONF ; # [ doc = "`read()` method returns [conf::R](conf::R) reader structure" ] impl crate :: Readable for CONF { } # [ doc = "`write(|w| ..)` method takes [conf::W](conf::W) writer structure" ] impl crate :: Writable for CONF { } # [ doc = "Configuration" ] pub mod conf { # [ doc = "Reader of register CONF" ] pub type R = crate :: R < u32 , super :: CONF > ; # [ doc = "Writer for register CONF" ] pub type W = crate :: W < u32 , super :: CONF > ; # [ doc = "Register CONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `NUMTOF`" ] pub type NUMTOF_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `NUMTOF`" ] pub struct NUMTOF_W < 'a > { w : & 'a mut W , } impl < 'a > NUMTOF_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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } # [ doc = "Reader of field `BDMMODE`" ] pub type BDMMODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BDMMODE`" ] pub struct BDMMODE_W < 'a > { w : & 'a mut W , } impl < 'a > BDMMODE_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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Global Time Base Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEEN_A { # [ doc = "0: Use of an external global time base is disabled." ] _0 , # [ doc = "1: Use of an external global time base is enabled." ] _1 } impl From < GTBEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEEN_A ) -> Self { match variant { GTBEEN_A :: _0 => false , GTBEEN_A :: _1 => true } } } # [ doc = "Reader of field `GTBEEN`" ] pub type GTBEEN_R = crate :: R < bool , GTBEEN_A > ; impl GTBEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEEN_A { match self . bits { false => GTBEEN_A :: _0 , true => GTBEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEEN_A :: _1 } } # [ doc = "Write proxy for field `GTBEEN`" ] pub struct GTBEEN_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use of an external global time base is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _0 ) } # [ doc = "Use of an external global time base is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Global Time Base Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEOUT_A { # [ doc = "0: A global time base signal generation is disabled." ] _0 , # [ doc = "1: A global time base signal generation is enabled." ] _1 } impl From < GTBEOUT_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEOUT_A ) -> Self { match variant { GTBEOUT_A :: _0 => false , GTBEOUT_A :: _1 => true } } } # [ doc = "Reader of field `GTBEOUT`" ] pub type GTBEOUT_R = crate :: R < bool , GTBEOUT_A > ; impl GTBEOUT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEOUT_A { match self . bits { false => GTBEOUT_A :: _0 , true => GTBEOUT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEOUT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEOUT_A :: _1 } } # [ doc = "Write proxy for field `GTBEOUT`" ] pub struct GTBEOUT_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEOUT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEOUT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A global time base signal generation is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEOUT_A :: _0 ) } # [ doc = "A global time base signal generation is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEOUT_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - TOF Frequency" ] # [ inline ( always ) ] pub fn numtof ( & self ) -> NUMTOF_R { NUMTOF_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bits 6:7 - BDM Mode" ] # [ inline ( always ) ] pub fn bdmmode ( & self ) -> BDMMODE_R { BDMMODE_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bit 9 - Global Time Base Enable" ] # [ inline ( always ) ] pub fn gtbeen ( & self ) -> GTBEEN_R { GTBEEN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Global Time Base Output" ] # [ inline ( always ) ] pub fn gtbeout ( & self ) -> GTBEOUT_R { GTBEOUT_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - TOF Frequency" ] # [ inline ( always ) ] pub fn numtof ( & mut self ) -> NUMTOF_W { NUMTOF_W { w : self } } # [ doc = "Bits 6:7 - BDM Mode" ] # [ inline ( always ) ] pub fn bdmmode ( & mut self ) -> BDMMODE_W { BDMMODE_W { w : self } } # [ doc = "Bit 9 - Global Time Base Enable" ] # [ inline ( always ) ] pub fn gtbeen ( & mut self ) -> GTBEEN_W { GTBEEN_W { w : self } } # [ doc = "Bit 10 - Global Time Base Output" ] # [ inline ( always ) ] pub fn gtbeout ( & mut self ) -> GTBEOUT_W { GTBEOUT_W { w : self } } } } # [ doc = "FTM Fault Input Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fltpol](fltpol) module" ] pub type FLTPOL = crate :: Reg < u32 , _FLTPOL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLTPOL ; # [ doc = "`read()` method returns [fltpol::R](fltpol::R) reader structure" ] impl crate :: Readable for FLTPOL { } # [ doc = "`write(|w| ..)` method takes [fltpol::W](fltpol::W) writer structure" ] impl crate :: Writable for FLTPOL { } # [ doc = "FTM Fault Input Polarity" ] pub mod fltpol { # [ doc = "Reader of register FLTPOL" ] pub type R = crate :: R < u32 , super :: FLTPOL > ; # [ doc = "Writer for register FLTPOL" ] pub type W = crate :: W < u32 , super :: FLTPOL > ; # [ doc = "Register FLTPOL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLTPOL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Input 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT0POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT0POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT0POL_A ) -> Self { match variant { FLT0POL_A :: _0 => false , FLT0POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT0POL`" ] pub type FLT0POL_R = crate :: R < bool , FLT0POL_A > ; impl FLT0POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT0POL_A { match self . bits { false => FLT0POL_A :: _0 , true => FLT0POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT0POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT0POL_A :: _1 } } # [ doc = "Write proxy for field `FLT0POL`" ] pub struct FLT0POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT0POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT0POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT0POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT0POL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Input 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT1POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT1POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT1POL_A ) -> Self { match variant { FLT1POL_A :: _0 => false , FLT1POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT1POL`" ] pub type FLT1POL_R = crate :: R < bool , FLT1POL_A > ; impl FLT1POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT1POL_A { match self . bits { false => FLT1POL_A :: _0 , true => FLT1POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT1POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT1POL_A :: _1 } } # [ doc = "Write proxy for field `FLT1POL`" ] pub struct FLT1POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT1POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT1POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT1POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT1POL_A :: _1 ) } # [ 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 } } # [ doc = "Fault Input 2 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT2POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT2POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT2POL_A ) -> Self { match variant { FLT2POL_A :: _0 => false , FLT2POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT2POL`" ] pub type FLT2POL_R = crate :: R < bool , FLT2POL_A > ; impl FLT2POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT2POL_A { match self . bits { false => FLT2POL_A :: _0 , true => FLT2POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT2POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT2POL_A :: _1 } } # [ doc = "Write proxy for field `FLT2POL`" ] pub struct FLT2POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT2POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT2POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT2POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT2POL_A :: _1 ) } # [ 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 = "Fault Input 3 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT3POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT3POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT3POL_A ) -> Self { match variant { FLT3POL_A :: _0 => false , FLT3POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT3POL`" ] pub type FLT3POL_R = crate :: R < bool , FLT3POL_A > ; impl FLT3POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT3POL_A { match self . bits { false => FLT3POL_A :: _0 , true => FLT3POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT3POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT3POL_A :: _1 } } # [ doc = "Write proxy for field `FLT3POL`" ] pub struct FLT3POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT3POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT3POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT3POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT3POL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Fault Input 0 Polarity" ] # [ inline ( always ) ] pub fn flt0pol ( & self ) -> FLT0POL_R { FLT0POL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Input 1 Polarity" ] # [ inline ( always ) ] pub fn flt1pol ( & self ) -> FLT1POL_R { FLT1POL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Input 2 Polarity" ] # [ inline ( always ) ] pub fn flt2pol ( & self ) -> FLT2POL_R { FLT2POL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Input 3 Polarity" ] # [ inline ( always ) ] pub fn flt3pol ( & self ) -> FLT3POL_R { FLT3POL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Fault Input 0 Polarity" ] # [ inline ( always ) ] pub fn flt0pol ( & mut self ) -> FLT0POL_W { FLT0POL_W { w : self } } # [ doc = "Bit 1 - Fault Input 1 Polarity" ] # [ inline ( always ) ] pub fn flt1pol ( & mut self ) -> FLT1POL_W { FLT1POL_W { w : self } } # [ doc = "Bit 2 - Fault Input 2 Polarity" ] # [ inline ( always ) ] pub fn flt2pol ( & mut self ) -> FLT2POL_W { FLT2POL_W { w : self } } # [ doc = "Bit 3 - Fault Input 3 Polarity" ] # [ inline ( always ) ] pub fn flt3pol ( & mut self ) -> FLT3POL_W { FLT3POL_W { w : self } } } } # [ doc = "Synchronization Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [synconf](synconf) module" ] pub type SYNCONF = crate :: Reg < u32 , _SYNCONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYNCONF ; # [ doc = "`read()` method returns [synconf::R](synconf::R) reader structure" ] impl crate :: Readable for SYNCONF { } # [ doc = "`write(|w| ..)` method takes [synconf::W](synconf::W) writer structure" ] impl crate :: Writable for SYNCONF { } # [ doc = "Synchronization Configuration" ] pub mod synconf { # [ doc = "Reader of register SYNCONF" ] pub type R = crate :: R < u32 , super :: SYNCONF > ; # [ doc = "Writer for register SYNCONF" ] pub type W = crate :: W < u32 , super :: SYNCONF > ; # [ doc = "Register SYNCONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SYNCONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Hardware Trigger Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWTRIGMODE_A { # [ doc = "0: FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] _0 , # [ doc = "1: FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] _1 } impl From < HWTRIGMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : HWTRIGMODE_A ) -> Self { match variant { HWTRIGMODE_A :: _0 => false , HWTRIGMODE_A :: _1 => true } } } # [ doc = "Reader of field `HWTRIGMODE`" ] pub type HWTRIGMODE_R = crate :: R < bool , HWTRIGMODE_A > ; impl HWTRIGMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWTRIGMODE_A { match self . bits { false => HWTRIGMODE_A :: _0 , true => HWTRIGMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWTRIGMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWTRIGMODE_A :: _1 } } # [ doc = "Write proxy for field `HWTRIGMODE`" ] pub struct HWTRIGMODE_W < 'a > { w : & 'a mut W , } impl < 'a > HWTRIGMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWTRIGMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWTRIGMODE_A :: _0 ) } # [ doc = "FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWTRIGMODE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "CNTIN Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTINC_A { # [ doc = "0: CNTIN register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: CNTIN register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < CNTINC_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTINC_A ) -> Self { match variant { CNTINC_A :: _0 => false , CNTINC_A :: _1 => true } } } # [ doc = "Reader of field `CNTINC`" ] pub type CNTINC_R = crate :: R < bool , CNTINC_A > ; impl CNTINC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTINC_A { match self . bits { false => CNTINC_A :: _0 , true => CNTINC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTINC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTINC_A :: _1 } } # [ doc = "Write proxy for field `CNTINC`" ] pub struct CNTINC_W < 'a > { w : & 'a mut W , } impl < 'a > CNTINC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTINC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CNTIN register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTINC_A :: _0 ) } # [ doc = "CNTIN register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTINC_A :: _1 ) } # [ 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 = "INVCTRL Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INVC_A { # [ doc = "0: INVCTRL register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: INVCTRL register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < INVC_A > for bool { # [ inline ( always ) ] fn from ( variant : INVC_A ) -> Self { match variant { INVC_A :: _0 => false , INVC_A :: _1 => true } } } # [ doc = "Reader of field `INVC`" ] pub type INVC_R = crate :: R < bool , INVC_A > ; impl INVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INVC_A { match self . bits { false => INVC_A :: _0 , true => INVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INVC_A :: _1 } } # [ doc = "Write proxy for field `INVC`" ] pub struct INVC_W < 'a > { w : & 'a mut W , } impl < 'a > INVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "INVCTRL register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INVC_A :: _0 ) } # [ doc = "INVCTRL register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INVC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "SWOCTRL Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWOC_A { # [ doc = "0: SWOCTRL register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: SWOCTRL register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < SWOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWOC_A ) -> Self { match variant { SWOC_A :: _0 => false , SWOC_A :: _1 => true } } } # [ doc = "Reader of field `SWOC`" ] pub type SWOC_R = crate :: R < bool , SWOC_A > ; impl SWOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWOC_A { match self . bits { false => SWOC_A :: _0 , true => SWOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWOC_A :: _1 } } # [ doc = "Write proxy for field `SWOC`" ] pub struct SWOC_W < 'a > { w : & 'a mut W , } impl < 'a > SWOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SWOCTRL register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWOC_A :: _0 ) } # [ doc = "SWOCTRL register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWOC_A :: _1 ) } # [ 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 = "Synchronization Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCMODE_A { # [ doc = "0: Legacy PWM synchronization is selected." ] _0 , # [ doc = "1: Enhanced PWM synchronization is selected." ] _1 } impl From < SYNCMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCMODE_A ) -> Self { match variant { SYNCMODE_A :: _0 => false , SYNCMODE_A :: _1 => true } } } # [ doc = "Reader of field `SYNCMODE`" ] pub type SYNCMODE_R = crate :: R < bool , SYNCMODE_A > ; impl SYNCMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCMODE_A { match self . bits { false => SYNCMODE_A :: _0 , true => SYNCMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCMODE_A :: _1 } } # [ doc = "Write proxy for field `SYNCMODE`" ] pub struct SYNCMODE_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Legacy PWM synchronization is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCMODE_A :: _0 ) } # [ doc = "Enhanced PWM synchronization is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCMODE_A :: _1 ) } # [ 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 = "FTM counter synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWRSTCNT_A { # [ doc = "0: The software trigger does not activate the FTM counter synchronization." ] _0 , # [ doc = "1: The software trigger activates the FTM counter synchronization." ] _1 } impl From < SWRSTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : SWRSTCNT_A ) -> Self { match variant { SWRSTCNT_A :: _0 => false , SWRSTCNT_A :: _1 => true } } } # [ doc = "Reader of field `SWRSTCNT`" ] pub type SWRSTCNT_R = crate :: R < bool , SWRSTCNT_A > ; impl SWRSTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWRSTCNT_A { match self . bits { false => SWRSTCNT_A :: _0 , true => SWRSTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWRSTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWRSTCNT_A :: _1 } } # [ doc = "Write proxy for field `SWRSTCNT`" ] pub struct SWRSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > SWRSTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWRSTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWRSTCNT_A :: _0 ) } # [ doc = "The software trigger activates the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWRSTCNT_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "MOD, CNTIN, and CV registers synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWWRBUF_A { # [ doc = "0: The software trigger does not activate MOD, CNTIN, and CV registers synchronization." ] _0 , # [ doc = "1: The software trigger activates MOD, CNTIN, and CV registers synchronization." ] _1 } impl From < SWWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : SWWRBUF_A ) -> Self { match variant { SWWRBUF_A :: _0 => false , SWWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `SWWRBUF`" ] pub type SWWRBUF_R = crate :: R < bool , SWWRBUF_A > ; impl SWWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWWRBUF_A { match self . bits { false => SWWRBUF_A :: _0 , true => SWWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWWRBUF_A :: _1 } } # [ doc = "Write proxy for field `SWWRBUF`" ] pub struct SWWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > SWWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWWRBUF_A :: _0 ) } # [ doc = "The software trigger activates MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWWRBUF_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Output mask synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWOM_A { # [ doc = "0: The software trigger does not activate the OUTMASK register synchronization." ] _0 , # [ doc = "1: The software trigger activates the OUTMASK register synchronization." ] _1 } impl From < SWOM_A > for bool { # [ inline ( always ) ] fn from ( variant : SWOM_A ) -> Self { match variant { SWOM_A :: _0 => false , SWOM_A :: _1 => true } } } # [ doc = "Reader of field `SWOM`" ] pub type SWOM_R = crate :: R < bool , SWOM_A > ; impl SWOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWOM_A { match self . bits { false => SWOM_A :: _0 , true => SWOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWOM_A :: _1 } } # [ doc = "Write proxy for field `SWOM`" ] pub struct SWOM_W < 'a > { w : & 'a mut W , } impl < 'a > SWOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWOM_A :: _0 ) } # [ doc = "The software trigger activates the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWOM_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Inverting control synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWINVC_A { # [ doc = "0: The software trigger does not activate the INVCTRL register synchronization." ] _0 , # [ doc = "1: The software trigger activates the INVCTRL register synchronization." ] _1 } impl From < SWINVC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWINVC_A ) -> Self { match variant { SWINVC_A :: _0 => false , SWINVC_A :: _1 => true } } } # [ doc = "Reader of field `SWINVC`" ] pub type SWINVC_R = crate :: R < bool , SWINVC_A > ; impl SWINVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWINVC_A { match self . bits { false => SWINVC_A :: _0 , true => SWINVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWINVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWINVC_A :: _1 } } # [ doc = "Write proxy for field `SWINVC`" ] pub struct SWINVC_W < 'a > { w : & 'a mut W , } impl < 'a > SWINVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWINVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWINVC_A :: _0 ) } # [ doc = "The software trigger activates the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWINVC_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Software output control synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSOC_A { # [ doc = "0: The software trigger does not activate the SWOCTRL register synchronization." ] _0 , # [ doc = "1: The software trigger activates the SWOCTRL register synchronization." ] _1 } impl From < SWSOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSOC_A ) -> Self { match variant { SWSOC_A :: _0 => false , SWSOC_A :: _1 => true } } } # [ doc = "Reader of field `SWSOC`" ] pub type SWSOC_R = crate :: R < bool , SWSOC_A > ; impl SWSOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSOC_A { match self . bits { false => SWSOC_A :: _0 , true => SWSOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSOC_A :: _1 } } # [ doc = "Write proxy for field `SWSOC`" ] pub struct SWSOC_W < 'a > { w : & 'a mut W , } impl < 'a > SWSOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSOC_A :: _0 ) } # [ doc = "The software trigger activates the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSOC_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "FTM counter synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWRSTCNT_A { # [ doc = "0: A hardware trigger does not activate the FTM counter synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the FTM counter synchronization." ] _1 } impl From < HWRSTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : HWRSTCNT_A ) -> Self { match variant { HWRSTCNT_A :: _0 => false , HWRSTCNT_A :: _1 => true } } } # [ doc = "Reader of field `HWRSTCNT`" ] pub type HWRSTCNT_R = crate :: R < bool , HWRSTCNT_A > ; impl HWRSTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWRSTCNT_A { match self . bits { false => HWRSTCNT_A :: _0 , true => HWRSTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWRSTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWRSTCNT_A :: _1 } } # [ doc = "Write proxy for field `HWRSTCNT`" ] pub struct HWRSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > HWRSTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWRSTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWRSTCNT_A :: _0 ) } # [ doc = "A hardware trigger activates the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWRSTCNT_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWWRBUF_A { # [ doc = "0: A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization." ] _0 , # [ doc = "1: A hardware trigger activates MOD, CNTIN, and CV registers synchronization." ] _1 } impl From < HWWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : HWWRBUF_A ) -> Self { match variant { HWWRBUF_A :: _0 => false , HWWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `HWWRBUF`" ] pub type HWWRBUF_R = crate :: R < bool , HWWRBUF_A > ; impl HWWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWWRBUF_A { match self . bits { false => HWWRBUF_A :: _0 , true => HWWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWWRBUF_A :: _1 } } # [ doc = "Write proxy for field `HWWRBUF`" ] pub struct HWWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > HWWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWWRBUF_A :: _0 ) } # [ doc = "A hardware trigger activates MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWWRBUF_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Output mask synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWOM_A { # [ doc = "0: A hardware trigger does not activate the OUTMASK register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the OUTMASK register synchronization." ] _1 } impl From < HWOM_A > for bool { # [ inline ( always ) ] fn from ( variant : HWOM_A ) -> Self { match variant { HWOM_A :: _0 => false , HWOM_A :: _1 => true } } } # [ doc = "Reader of field `HWOM`" ] pub type HWOM_R = crate :: R < bool , HWOM_A > ; impl HWOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWOM_A { match self . bits { false => HWOM_A :: _0 , true => HWOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWOM_A :: _1 } } # [ doc = "Write proxy for field `HWOM`" ] pub struct HWOM_W < 'a > { w : & 'a mut W , } impl < 'a > HWOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWOM_A :: _0 ) } # [ doc = "A hardware trigger activates the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWOM_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Inverting control synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWINVC_A { # [ doc = "0: A hardware trigger does not activate the INVCTRL register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the INVCTRL register synchronization." ] _1 } impl From < HWINVC_A > for bool { # [ inline ( always ) ] fn from ( variant : HWINVC_A ) -> Self { match variant { HWINVC_A :: _0 => false , HWINVC_A :: _1 => true } } } # [ doc = "Reader of field `HWINVC`" ] pub type HWINVC_R = crate :: R < bool , HWINVC_A > ; impl HWINVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWINVC_A { match self . bits { false => HWINVC_A :: _0 , true => HWINVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWINVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWINVC_A :: _1 } } # [ doc = "Write proxy for field `HWINVC`" ] pub struct HWINVC_W < 'a > { w : & 'a mut W , } impl < 'a > HWINVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWINVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWINVC_A :: _0 ) } # [ doc = "A hardware trigger activates the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWINVC_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Software output control synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWSOC_A { # [ doc = "0: A hardware trigger does not activate the SWOCTRL register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the SWOCTRL register synchronization." ] _1 } impl From < HWSOC_A > for bool { # [ inline ( always ) ] fn from ( variant : HWSOC_A ) -> Self { match variant { HWSOC_A :: _0 => false , HWSOC_A :: _1 => true } } } # [ doc = "Reader of field `HWSOC`" ] pub type HWSOC_R = crate :: R < bool , HWSOC_A > ; impl HWSOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWSOC_A { match self . bits { false => HWSOC_A :: _0 , true => HWSOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWSOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWSOC_A :: _1 } } # [ doc = "Write proxy for field `HWSOC`" ] pub struct HWSOC_W < 'a > { w : & 'a mut W , } impl < 'a > HWSOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWSOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWSOC_A :: _0 ) } # [ doc = "A hardware trigger activates the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWSOC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Hardware Trigger Mode" ] # [ inline ( always ) ] pub fn hwtrigmode ( & self ) -> HWTRIGMODE_R { HWTRIGMODE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - CNTIN Register Synchronization" ] # [ inline ( always ) ] pub fn cntinc ( & self ) -> CNTINC_R { CNTINC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - INVCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn invc ( & self ) -> INVC_R { INVC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - SWOCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn swoc ( & self ) -> SWOC_R { SWOC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Synchronization Mode" ] # [ inline ( always ) ] pub fn syncmode ( & self ) -> SYNCMODE_R { SYNCMODE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - FTM counter synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swrstcnt ( & self ) -> SWRSTCNT_R { SWRSTCNT_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - MOD, CNTIN, and CV registers synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swwrbuf ( & self ) -> SWWRBUF_R { SWWRBUF_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Output mask synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swom ( & self ) -> SWOM_R { SWOM_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Inverting control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swinvc ( & self ) -> SWINVC_R { SWINVC_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Software output control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swsoc ( & self ) -> SWSOC_R { SWSOC_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - FTM counter synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwrstcnt ( & self ) -> HWRSTCNT_R { HWRSTCNT_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwwrbuf ( & self ) -> HWWRBUF_R { HWWRBUF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Output mask synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwom ( & self ) -> HWOM_R { HWOM_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Inverting control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwinvc ( & self ) -> HWINVC_R { HWINVC_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Software output control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwsoc ( & self ) -> HWSOC_R { HWSOC_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Hardware Trigger Mode" ] # [ inline ( always ) ] pub fn hwtrigmode ( & mut self ) -> HWTRIGMODE_W { HWTRIGMODE_W { w : self } } # [ doc = "Bit 2 - CNTIN Register Synchronization" ] # [ inline ( always ) ] pub fn cntinc ( & mut self ) -> CNTINC_W { CNTINC_W { w : self } } # [ doc = "Bit 4 - INVCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn invc ( & mut self ) -> INVC_W { INVC_W { w : self } } # [ doc = "Bit 5 - SWOCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn swoc ( & mut self ) -> SWOC_W { SWOC_W { w : self } } # [ doc = "Bit 7 - Synchronization Mode" ] # [ inline ( always ) ] pub fn syncmode ( & mut self ) -> SYNCMODE_W { SYNCMODE_W { w : self } } # [ doc = "Bit 8 - FTM counter synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swrstcnt ( & mut self ) -> SWRSTCNT_W { SWRSTCNT_W { w : self } } # [ doc = "Bit 9 - MOD, CNTIN, and CV registers synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swwrbuf ( & mut self ) -> SWWRBUF_W { SWWRBUF_W { w : self } } # [ doc = "Bit 10 - Output mask synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swom ( & mut self ) -> SWOM_W { SWOM_W { w : self } } # [ doc = "Bit 11 - Inverting control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swinvc ( & mut self ) -> SWINVC_W { SWINVC_W { w : self } } # [ doc = "Bit 12 - Software output control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swsoc ( & mut self ) -> SWSOC_W { SWSOC_W { w : self } } # [ doc = "Bit 16 - FTM counter synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwrstcnt ( & mut self ) -> HWRSTCNT_W { HWRSTCNT_W { w : self } } # [ doc = "Bit 17 - MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwwrbuf ( & mut self ) -> HWWRBUF_W { HWWRBUF_W { w : self } } # [ doc = "Bit 18 - Output mask synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwom ( & mut self ) -> HWOM_W { HWOM_W { w : self } } # [ doc = "Bit 19 - Inverting control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwinvc ( & mut self ) -> HWINVC_W { HWINVC_W { w : self } } # [ doc = "Bit 20 - Software output control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwsoc ( & mut self ) -> HWSOC_W { HWSOC_W { w : self } } } } # [ doc = "FTM Inverting Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [invctrl](invctrl) module" ] pub type INVCTRL = crate :: Reg < u32 , _INVCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _INVCTRL ; # [ doc = "`read()` method returns [invctrl::R](invctrl::R) reader structure" ] impl crate :: Readable for INVCTRL { } # [ doc = "`write(|w| ..)` method takes [invctrl::W](invctrl::W) writer structure" ] impl crate :: Writable for INVCTRL { } # [ doc = "FTM Inverting Control" ] pub mod invctrl { # [ doc = "Reader of register INVCTRL" ] pub type R = crate :: R < u32 , super :: INVCTRL > ; # [ doc = "Writer for register INVCTRL" ] pub type W = crate :: W < u32 , super :: INVCTRL > ; # [ doc = "Register INVCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: INVCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pair Channels 0 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV0EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV0EN_A ) -> Self { match variant { INV0EN_A :: _0 => false , INV0EN_A :: _1 => true } } } # [ doc = "Reader of field `INV0EN`" ] pub type INV0EN_R = crate :: R < bool , INV0EN_A > ; impl INV0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV0EN_A { match self . bits { false => INV0EN_A :: _0 , true => INV0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV0EN_A :: _1 } } # [ doc = "Write proxy for field `INV0EN`" ] pub struct INV0EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV0EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV0EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pair Channels 1 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV1EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV1EN_A ) -> Self { match variant { INV1EN_A :: _0 => false , INV1EN_A :: _1 => true } } } # [ doc = "Reader of field `INV1EN`" ] pub type INV1EN_R = crate :: R < bool , INV1EN_A > ; impl INV1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV1EN_A { match self . bits { false => INV1EN_A :: _0 , true => INV1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV1EN_A :: _1 } } # [ doc = "Write proxy for field `INV1EN`" ] pub struct INV1EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV1EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV1EN_A :: _1 ) } # [ 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 } } # [ doc = "Pair Channels 2 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV2EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV2EN_A ) -> Self { match variant { INV2EN_A :: _0 => false , INV2EN_A :: _1 => true } } } # [ doc = "Reader of field `INV2EN`" ] pub type INV2EN_R = crate :: R < bool , INV2EN_A > ; impl INV2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV2EN_A { match self . bits { false => INV2EN_A :: _0 , true => INV2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV2EN_A :: _1 } } # [ doc = "Write proxy for field `INV2EN`" ] pub struct INV2EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV2EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV2EN_A :: _1 ) } # [ 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 = "Pair Channels 3 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV3EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV3EN_A ) -> Self { match variant { INV3EN_A :: _0 => false , INV3EN_A :: _1 => true } } } # [ doc = "Reader of field `INV3EN`" ] pub type INV3EN_R = crate :: R < bool , INV3EN_A > ; impl INV3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV3EN_A { match self . bits { false => INV3EN_A :: _0 , true => INV3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV3EN_A :: _1 } } # [ doc = "Write proxy for field `INV3EN`" ] pub struct INV3EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV3EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV3EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Pair Channels 0 Inverting Enable" ] # [ inline ( always ) ] pub fn inv0en ( & self ) -> INV0EN_R { INV0EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pair Channels 1 Inverting Enable" ] # [ inline ( always ) ] pub fn inv1en ( & self ) -> INV1EN_R { INV1EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Pair Channels 2 Inverting Enable" ] # [ inline ( always ) ] pub fn inv2en ( & self ) -> INV2EN_R { INV2EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Pair Channels 3 Inverting Enable" ] # [ inline ( always ) ] pub fn inv3en ( & self ) -> INV3EN_R { INV3EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pair Channels 0 Inverting Enable" ] # [ inline ( always ) ] pub fn inv0en ( & mut self ) -> INV0EN_W { INV0EN_W { w : self } } # [ doc = "Bit 1 - Pair Channels 1 Inverting Enable" ] # [ inline ( always ) ] pub fn inv1en ( & mut self ) -> INV1EN_W { INV1EN_W { w : self } } # [ doc = "Bit 2 - Pair Channels 2 Inverting Enable" ] # [ inline ( always ) ] pub fn inv2en ( & mut self ) -> INV2EN_W { INV2EN_W { w : self } } # [ doc = "Bit 3 - Pair Channels 3 Inverting Enable" ] # [ inline ( always ) ] pub fn inv3en ( & mut self ) -> INV3EN_W { INV3EN_W { w : self } } } } # [ doc = "FTM Software Output Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swoctrl](swoctrl) module" ] pub type SWOCTRL = crate :: Reg < u32 , _SWOCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SWOCTRL ; # [ doc = "`read()` method returns [swoctrl::R](swoctrl::R) reader structure" ] impl crate :: Readable for SWOCTRL { } # [ doc = "`write(|w| ..)` method takes [swoctrl::W](swoctrl::W) writer structure" ] impl crate :: Writable for SWOCTRL { } # [ doc = "FTM Software Output Control" ] pub mod swoctrl { # [ doc = "Reader of register SWOCTRL" ] pub type R = crate :: R < u32 , super :: SWOCTRL > ; # [ doc = "Writer for register SWOCTRL" ] pub type W = crate :: W < u32 , super :: SWOCTRL > ; # [ doc = "Register SWOCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SWOCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH0OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OC_A ) -> Self { match variant { CH0OC_A :: _0 => false , CH0OC_A :: _1 => true } } } # [ doc = "Reader of field `CH0OC`" ] pub type CH0OC_R = crate :: R < bool , CH0OC_A > ; impl CH0OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OC_A { match self . bits { false => CH0OC_A :: _0 , true => CH0OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OC_A :: _1 } } # [ doc = "Write proxy for field `CH0OC`" ] pub struct CH0OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OC_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH1OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OC_A ) -> Self { match variant { CH1OC_A :: _0 => false , CH1OC_A :: _1 => true } } } # [ doc = "Reader of field `CH1OC`" ] pub type CH1OC_R = crate :: R < bool , CH1OC_A > ; impl CH1OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OC_A { match self . bits { false => CH1OC_A :: _0 , true => CH1OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OC_A :: _1 } } # [ doc = "Write proxy for field `CH1OC`" ] pub struct CH1OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OC_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH2OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OC_A ) -> Self { match variant { CH2OC_A :: _0 => false , CH2OC_A :: _1 => true } } } # [ doc = "Reader of field `CH2OC`" ] pub type CH2OC_R = crate :: R < bool , CH2OC_A > ; impl CH2OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OC_A { match self . bits { false => CH2OC_A :: _0 , true => CH2OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OC_A :: _1 } } # [ doc = "Write proxy for field `CH2OC`" ] pub struct CH2OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OC_A :: _1 ) } # [ 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 = "Channel 3 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH3OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OC_A ) -> Self { match variant { CH3OC_A :: _0 => false , CH3OC_A :: _1 => true } } } # [ doc = "Reader of field `CH3OC`" ] pub type CH3OC_R = crate :: R < bool , CH3OC_A > ; impl CH3OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OC_A { match self . bits { false => CH3OC_A :: _0 , true => CH3OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OC_A :: _1 } } # [ doc = "Write proxy for field `CH3OC`" ] pub struct CH3OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH4OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OC_A ) -> Self { match variant { CH4OC_A :: _0 => false , CH4OC_A :: _1 => true } } } # [ doc = "Reader of field `CH4OC`" ] pub type CH4OC_R = crate :: R < bool , CH4OC_A > ; impl CH4OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OC_A { match self . bits { false => CH4OC_A :: _0 , true => CH4OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OC_A :: _1 } } # [ doc = "Write proxy for field `CH4OC`" ] pub struct CH4OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH5OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OC_A ) -> Self { match variant { CH5OC_A :: _0 => false , CH5OC_A :: _1 => true } } } # [ doc = "Reader of field `CH5OC`" ] pub type CH5OC_R = crate :: R < bool , CH5OC_A > ; impl CH5OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OC_A { match self . bits { false => CH5OC_A :: _0 , true => CH5OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OC_A :: _1 } } # [ doc = "Write proxy for field `CH5OC`" ] pub struct CH5OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OC_A :: _1 ) } # [ 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 = "Channel 6 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH6OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OC_A ) -> Self { match variant { CH6OC_A :: _0 => false , CH6OC_A :: _1 => true } } } # [ doc = "Reader of field `CH6OC`" ] pub type CH6OC_R = crate :: R < bool , CH6OC_A > ; impl CH6OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OC_A { match self . bits { false => CH6OC_A :: _0 , true => CH6OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OC_A :: _1 } } # [ doc = "Write proxy for field `CH6OC`" ] pub struct CH6OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OC_A :: _1 ) } # [ 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 = "Channel 7 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH7OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OC_A ) -> Self { match variant { CH7OC_A :: _0 => false , CH7OC_A :: _1 => true } } } # [ doc = "Reader of field `CH7OC`" ] pub type CH7OC_R = crate :: R < bool , CH7OC_A > ; impl CH7OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OC_A { match self . bits { false => CH7OC_A :: _0 , true => CH7OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OC_A :: _1 } } # [ doc = "Write proxy for field `CH7OC`" ] pub struct CH7OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OC_A :: _1 ) } # [ 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 = "Channel 0 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH0OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OCV_A ) -> Self { match variant { CH0OCV_A :: _0 => false , CH0OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH0OCV`" ] pub type CH0OCV_R = crate :: R < bool , CH0OCV_A > ; impl CH0OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OCV_A { match self . bits { false => CH0OCV_A :: _0 , true => CH0OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OCV_A :: _1 } } # [ doc = "Write proxy for field `CH0OCV`" ] pub struct CH0OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OCV_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Channel 1 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH1OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OCV_A ) -> Self { match variant { CH1OCV_A :: _0 => false , CH1OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH1OCV`" ] pub type CH1OCV_R = crate :: R < bool , CH1OCV_A > ; impl CH1OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OCV_A { match self . bits { false => CH1OCV_A :: _0 , true => CH1OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OCV_A :: _1 } } # [ doc = "Write proxy for field `CH1OCV`" ] pub struct CH1OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OCV_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Channel 2 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH2OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OCV_A ) -> Self { match variant { CH2OCV_A :: _0 => false , CH2OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH2OCV`" ] pub type CH2OCV_R = crate :: R < bool , CH2OCV_A > ; impl CH2OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OCV_A { match self . bits { false => CH2OCV_A :: _0 , true => CH2OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OCV_A :: _1 } } # [ doc = "Write proxy for field `CH2OCV`" ] pub struct CH2OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OCV_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Channel 3 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH3OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OCV_A ) -> Self { match variant { CH3OCV_A :: _0 => false , CH3OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH3OCV`" ] pub type CH3OCV_R = crate :: R < bool , CH3OCV_A > ; impl CH3OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OCV_A { match self . bits { false => CH3OCV_A :: _0 , true => CH3OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OCV_A :: _1 } } # [ doc = "Write proxy for field `CH3OCV`" ] pub struct CH3OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OCV_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Channel 4 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH4OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OCV_A ) -> Self { match variant { CH4OCV_A :: _0 => false , CH4OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH4OCV`" ] pub type CH4OCV_R = crate :: R < bool , CH4OCV_A > ; impl CH4OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OCV_A { match self . bits { false => CH4OCV_A :: _0 , true => CH4OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OCV_A :: _1 } } # [ doc = "Write proxy for field `CH4OCV`" ] pub struct CH4OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OCV_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Channel 5 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH5OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OCV_A ) -> Self { match variant { CH5OCV_A :: _0 => false , CH5OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH5OCV`" ] pub type CH5OCV_R = crate :: R < bool , CH5OCV_A > ; impl CH5OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OCV_A { match self . bits { false => CH5OCV_A :: _0 , true => CH5OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OCV_A :: _1 } } # [ doc = "Write proxy for field `CH5OCV`" ] pub struct CH5OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OCV_A :: _1 ) } # [ 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 = "Channel 6 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH6OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OCV_A ) -> Self { match variant { CH6OCV_A :: _0 => false , CH6OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH6OCV`" ] pub type CH6OCV_R = crate :: R < bool , CH6OCV_A > ; impl CH6OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OCV_A { match self . bits { false => CH6OCV_A :: _0 , true => CH6OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OCV_A :: _1 } } # [ doc = "Write proxy for field `CH6OCV`" ] pub struct CH6OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OCV_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Channel 7 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH7OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OCV_A ) -> Self { match variant { CH7OCV_A :: _0 => false , CH7OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH7OCV`" ] pub type CH7OCV_R = crate :: R < bool , CH7OCV_A > ; impl CH7OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OCV_A { match self . bits { false => CH7OCV_A :: _0 , true => CH7OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OCV_A :: _1 } } # [ doc = "Write proxy for field `CH7OCV`" ] pub struct CH7OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OCV_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch0oc ( & self ) -> CH0OC_R { CH0OC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch1oc ( & self ) -> CH1OC_R { CH1OC_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch2oc ( & self ) -> CH2OC_R { CH2OC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch3oc ( & self ) -> CH3OC_R { CH3OC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch4oc ( & self ) -> CH4OC_R { CH4OC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch5oc ( & self ) -> CH5OC_R { CH5OC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch6oc ( & self ) -> CH6OC_R { CH6OC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch7oc ( & self ) -> CH7OC_R { CH7OC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Channel 0 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch0ocv ( & self ) -> CH0OCV_R { CH0OCV_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Channel 1 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch1ocv ( & self ) -> CH1OCV_R { CH1OCV_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Channel 2 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch2ocv ( & self ) -> CH2OCV_R { CH2OCV_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Channel 3 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch3ocv ( & self ) -> CH3OCV_R { CH3OCV_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Channel 4 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch4ocv ( & self ) -> CH4OCV_R { CH4OCV_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Channel 5 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch5ocv ( & self ) -> CH5OCV_R { CH5OCV_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Channel 6 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch6ocv ( & self ) -> CH6OCV_R { CH6OCV_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Channel 7 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch7ocv ( & self ) -> CH7OCV_R { CH7OCV_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch0oc ( & mut self ) -> CH0OC_W { CH0OC_W { w : self } } # [ doc = "Bit 1 - Channel 1 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch1oc ( & mut self ) -> CH1OC_W { CH1OC_W { w : self } } # [ doc = "Bit 2 - Channel 2 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch2oc ( & mut self ) -> CH2OC_W { CH2OC_W { w : self } } # [ doc = "Bit 3 - Channel 3 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch3oc ( & mut self ) -> CH3OC_W { CH3OC_W { w : self } } # [ doc = "Bit 4 - Channel 4 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch4oc ( & mut self ) -> CH4OC_W { CH4OC_W { w : self } } # [ doc = "Bit 5 - Channel 5 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch5oc ( & mut self ) -> CH5OC_W { CH5OC_W { w : self } } # [ doc = "Bit 6 - Channel 6 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch6oc ( & mut self ) -> CH6OC_W { CH6OC_W { w : self } } # [ doc = "Bit 7 - Channel 7 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch7oc ( & mut self ) -> CH7OC_W { CH7OC_W { w : self } } # [ doc = "Bit 8 - Channel 0 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch0ocv ( & mut self ) -> CH0OCV_W { CH0OCV_W { w : self } } # [ doc = "Bit 9 - Channel 1 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch1ocv ( & mut self ) -> CH1OCV_W { CH1OCV_W { w : self } } # [ doc = "Bit 10 - Channel 2 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch2ocv ( & mut self ) -> CH2OCV_W { CH2OCV_W { w : self } } # [ doc = "Bit 11 - Channel 3 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch3ocv ( & mut self ) -> CH3OCV_W { CH3OCV_W { w : self } } # [ doc = "Bit 12 - Channel 4 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch4ocv ( & mut self ) -> CH4OCV_W { CH4OCV_W { w : self } } # [ doc = "Bit 13 - Channel 5 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch5ocv ( & mut self ) -> CH5OCV_W { CH5OCV_W { w : self } } # [ doc = "Bit 14 - Channel 6 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch6ocv ( & mut self ) -> CH6OCV_W { CH6OCV_W { w : self } } # [ doc = "Bit 15 - Channel 7 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch7ocv ( & mut self ) -> CH7OCV_W { CH7OCV_W { w : self } } } } # [ doc = "FTM PWM Load\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwmload](pwmload) module" ] pub type PWMLOAD = crate :: Reg < u32 , _PWMLOAD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PWMLOAD ; # [ doc = "`read()` method returns [pwmload::R](pwmload::R) reader structure" ] impl crate :: Readable for PWMLOAD { } # [ doc = "`write(|w| ..)` method takes [pwmload::W](pwmload::W) writer structure" ] impl crate :: Writable for PWMLOAD { } # [ doc = "FTM PWM Load" ] pub mod pwmload { # [ doc = "Reader of register PWMLOAD" ] pub type R = crate :: R < u32 , super :: PWMLOAD > ; # [ doc = "Writer for register PWMLOAD" ] pub type W = crate :: W < u32 , super :: PWMLOAD > ; # [ doc = "Register PWMLOAD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PWMLOAD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH0SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0SEL_A ) -> Self { match variant { CH0SEL_A :: _0 => false , CH0SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH0SEL`" ] pub type CH0SEL_R = crate :: R < bool , CH0SEL_A > ; impl CH0SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0SEL_A { match self . bits { false => CH0SEL_A :: _0 , true => CH0SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0SEL_A :: _1 } } # [ doc = "Write proxy for field `CH0SEL`" ] pub struct CH0SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0SEL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH1SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1SEL_A ) -> Self { match variant { CH1SEL_A :: _0 => false , CH1SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH1SEL`" ] pub type CH1SEL_R = crate :: R < bool , CH1SEL_A > ; impl CH1SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1SEL_A { match self . bits { false => CH1SEL_A :: _0 , true => CH1SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1SEL_A :: _1 } } # [ doc = "Write proxy for field `CH1SEL`" ] pub struct CH1SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1SEL_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH2SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2SEL_A ) -> Self { match variant { CH2SEL_A :: _0 => false , CH2SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH2SEL`" ] pub type CH2SEL_R = crate :: R < bool , CH2SEL_A > ; impl CH2SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2SEL_A { match self . bits { false => CH2SEL_A :: _0 , true => CH2SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2SEL_A :: _1 } } # [ doc = "Write proxy for field `CH2SEL`" ] pub struct CH2SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH2SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2SEL_A :: _1 ) } # [ 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 = "Channel 3 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH3SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3SEL_A ) -> Self { match variant { CH3SEL_A :: _0 => false , CH3SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH3SEL`" ] pub type CH3SEL_R = crate :: R < bool , CH3SEL_A > ; impl CH3SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3SEL_A { match self . bits { false => CH3SEL_A :: _0 , true => CH3SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3SEL_A :: _1 } } # [ doc = "Write proxy for field `CH3SEL`" ] pub struct CH3SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH3SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3SEL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH4SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4SEL_A ) -> Self { match variant { CH4SEL_A :: _0 => false , CH4SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH4SEL`" ] pub type CH4SEL_R = crate :: R < bool , CH4SEL_A > ; impl CH4SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4SEL_A { match self . bits { false => CH4SEL_A :: _0 , true => CH4SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4SEL_A :: _1 } } # [ doc = "Write proxy for field `CH4SEL`" ] pub struct CH4SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH4SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4SEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH5SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5SEL_A ) -> Self { match variant { CH5SEL_A :: _0 => false , CH5SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH5SEL`" ] pub type CH5SEL_R = crate :: R < bool , CH5SEL_A > ; impl CH5SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5SEL_A { match self . bits { false => CH5SEL_A :: _0 , true => CH5SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5SEL_A :: _1 } } # [ doc = "Write proxy for field `CH5SEL`" ] pub struct CH5SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH5SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5SEL_A :: _1 ) } # [ 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 = "Channel 6 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH6SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6SEL_A ) -> Self { match variant { CH6SEL_A :: _0 => false , CH6SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH6SEL`" ] pub type CH6SEL_R = crate :: R < bool , CH6SEL_A > ; impl CH6SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6SEL_A { match self . bits { false => CH6SEL_A :: _0 , true => CH6SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6SEL_A :: _1 } } # [ doc = "Write proxy for field `CH6SEL`" ] pub struct CH6SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH6SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6SEL_A :: _1 ) } # [ 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 = "Channel 7 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH7SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7SEL_A ) -> Self { match variant { CH7SEL_A :: _0 => false , CH7SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH7SEL`" ] pub type CH7SEL_R = crate :: R < bool , CH7SEL_A > ; impl CH7SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7SEL_A { match self . bits { false => CH7SEL_A :: _0 , true => CH7SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7SEL_A :: _1 } } # [ doc = "Write proxy for field `CH7SEL`" ] pub struct CH7SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH7SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7SEL_A :: _1 ) } # [ 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 = "Load Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LDOK_A { # [ doc = "0: Loading updated values is disabled." ] _0 , # [ doc = "1: Loading updated values is enabled." ] _1 } impl From < LDOK_A > for bool { # [ inline ( always ) ] fn from ( variant : LDOK_A ) -> Self { match variant { LDOK_A :: _0 => false , LDOK_A :: _1 => true } } } # [ doc = "Reader of field `LDOK`" ] pub type LDOK_R = crate :: R < bool , LDOK_A > ; impl LDOK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LDOK_A { match self . bits { false => LDOK_A :: _0 , true => LDOK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LDOK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LDOK_A :: _1 } } # [ doc = "Write proxy for field `LDOK`" ] pub struct LDOK_W < 'a > { w : & 'a mut W , } impl < 'a > LDOK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LDOK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loading updated values is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LDOK_A :: _0 ) } # [ doc = "Loading updated values is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LDOK_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Select" ] # [ inline ( always ) ] pub fn ch0sel ( & self ) -> CH0SEL_R { CH0SEL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Select" ] # [ inline ( always ) ] pub fn ch1sel ( & self ) -> CH1SEL_R { CH1SEL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Select" ] # [ inline ( always ) ] pub fn ch2sel ( & self ) -> CH2SEL_R { CH2SEL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Select" ] # [ inline ( always ) ] pub fn ch3sel ( & self ) -> CH3SEL_R { CH3SEL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Select" ] # [ inline ( always ) ] pub fn ch4sel ( & self ) -> CH4SEL_R { CH4SEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Select" ] # [ inline ( always ) ] pub fn ch5sel ( & self ) -> CH5SEL_R { CH5SEL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Select" ] # [ inline ( always ) ] pub fn ch6sel ( & self ) -> CH6SEL_R { CH6SEL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Select" ] # [ inline ( always ) ] pub fn ch7sel ( & self ) -> CH7SEL_R { CH7SEL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Load Enable" ] # [ inline ( always ) ] pub fn ldok ( & self ) -> LDOK_R { LDOK_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Select" ] # [ inline ( always ) ] pub fn ch0sel ( & mut self ) -> CH0SEL_W { CH0SEL_W { w : self } } # [ doc = "Bit 1 - Channel 1 Select" ] # [ inline ( always ) ] pub fn ch1sel ( & mut self ) -> CH1SEL_W { CH1SEL_W { w : self } } # [ doc = "Bit 2 - Channel 2 Select" ] # [ inline ( always ) ] pub fn ch2sel ( & mut self ) -> CH2SEL_W { CH2SEL_W { w : self } } # [ doc = "Bit 3 - Channel 3 Select" ] # [ inline ( always ) ] pub fn ch3sel ( & mut self ) -> CH3SEL_W { CH3SEL_W { w : self } } # [ doc = "Bit 4 - Channel 4 Select" ] # [ inline ( always ) ] pub fn ch4sel ( & mut self ) -> CH4SEL_W { CH4SEL_W { w : self } } # [ doc = "Bit 5 - Channel 5 Select" ] # [ inline ( always ) ] pub fn ch5sel ( & mut self ) -> CH5SEL_W { CH5SEL_W { w : self } } # [ doc = "Bit 6 - Channel 6 Select" ] # [ inline ( always ) ] pub fn ch6sel ( & mut self ) -> CH6SEL_W { CH6SEL_W { w : self } } # [ doc = "Bit 7 - Channel 7 Select" ] # [ inline ( always ) ] pub fn ch7sel ( & mut self ) -> CH7SEL_W { CH7SEL_W { w : self } } # [ doc = "Bit 9 - Load Enable" ] # [ inline ( always ) ] pub fn ldok ( & mut self ) -> LDOK_W { LDOK_W { w : self } } } } } # [ doc = "FlexTimer Module" ] pub struct FTM2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for FTM2 { } impl FTM2 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const ftm2 :: RegisterBlock { 0x4003_a000 as * const _ } } impl Deref for FTM2 { type Target = ftm2 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * FTM2 :: ptr ( ) } } } # [ doc = "FlexTimer Module" ] pub mod ftm2 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Status And Control" ] pub sc : SC , # [ doc = "0x04 - Counter" ] pub cnt : CNT , # [ doc = "0x08 - Modulo" ] pub mod_ : MOD , # [ doc = "0x0c - Channel (n) Status And Control" ] pub c0sc : CSC , # [ doc = "0x10 - Channel (n) Value" ] pub c0v : CV , # [ doc = "0x14 - Channel (n) Status And Control" ] pub c1sc : CSC , # [ doc = "0x18 - Channel (n) Value" ] pub c1v : CV , _reserved7 : [ u8 ; 48usize ] , # [ doc = "0x4c - Counter Initial Value" ] pub cntin : CNTIN , # [ doc = "0x50 - Capture And Compare Status" ] pub status : STATUS , # [ doc = "0x54 - Features Mode Selection" ] pub mode : MODE , # [ doc = "0x58 - Synchronization" ] pub sync : SYNC , # [ doc = "0x5c - Initial State For Channels Output" ] pub outinit : OUTINIT , # [ doc = "0x60 - Output Mask" ] pub outmask : OUTMASK , # [ doc = "0x64 - Function For Linked Channels" ] pub combine : COMBINE , # [ doc = "0x68 - Deadtime Insertion Control" ] pub deadtime : DEADTIME , # [ doc = "0x6c - FTM External Trigger" ] pub exttrig : EXTTRIG , # [ doc = "0x70 - Channels Polarity" ] pub pol : POL , # [ doc = "0x74 - Fault Mode Status" ] pub fms : FMS , # [ doc = "0x78 - Input Capture Filter Control" ] pub filter : FILTER , # [ doc = "0x7c - Fault Control" ] pub fltctrl : FLTCTRL , # [ doc = "0x80 - Quadrature Decoder Control And Status" ] pub qdctrl : QDCTRL , # [ doc = "0x84 - Configuration" ] pub conf : CONF , # [ doc = "0x88 - FTM Fault Input Polarity" ] pub fltpol : FLTPOL , # [ doc = "0x8c - Synchronization Configuration" ] pub synconf : SYNCONF , # [ doc = "0x90 - FTM Inverting Control" ] pub invctrl : INVCTRL , # [ doc = "0x94 - FTM Software Output Control" ] pub swoctrl : SWOCTRL , # [ doc = "0x98 - FTM PWM Load" ] pub pwmload : PWMLOAD , } # [ doc = "Status And Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u32 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "Status And Control" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u32 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u32 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Prescale Factor Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Divide by 1" ] _000 , # [ doc = "1: Divide by 2" ] _001 , # [ doc = "2: Divide by 4" ] _010 , # [ doc = "3: Divide by 8" ] _011 , # [ doc = "4: Divide by 16" ] _100 , # [ doc = "5: Divide by 32" ] _101 , # [ doc = "6: Divide by 64" ] _110 , # [ doc = "7: Divide by 128" ] _111 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _000 => 0 , PS_A :: _001 => 1 , PS_A :: _010 => 2 , PS_A :: _011 => 3 , PS_A :: _100 => 4 , PS_A :: _101 => 5 , PS_A :: _110 => 6 , PS_A :: _111 => 7 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _000 , 1 => PS_A :: _001 , 2 => PS_A :: _010 , 3 => PS_A :: _011 , 4 => PS_A :: _100 , 5 => PS_A :: _101 , 6 => PS_A :: _110 , 7 => PS_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PS_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PS_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PS_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PS_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PS_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PS_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PS_A :: _111 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide by 1" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PS_A :: _000 ) } # [ doc = "Divide by 2" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PS_A :: _001 ) } # [ doc = "Divide by 4" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PS_A :: _010 ) } # [ doc = "Divide by 8" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PS_A :: _011 ) } # [ doc = "Divide by 16" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PS_A :: _100 ) } # [ doc = "Divide by 32" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PS_A :: _101 ) } # [ doc = "Divide by 64" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PS_A :: _110 ) } # [ doc = "Divide by 128" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PS_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Clock Source Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKS_A { # [ doc = "0: No clock selected. This in effect disables the FTM counter." ] _00 , # [ doc = "1: System clock" ] _01 , # [ doc = "2: Fixed frequency clock" ] _10 , # [ doc = "3: External clock" ] _11 } impl From < CLKS_A > for u8 { # [ inline ( always ) ] fn from ( variant : CLKS_A ) -> Self { match variant { CLKS_A :: _00 => 0 , CLKS_A :: _01 => 1 , CLKS_A :: _10 => 2 , CLKS_A :: _11 => 3 } } } # [ doc = "Reader of field `CLKS`" ] pub type CLKS_R = crate :: R < u8 , CLKS_A > ; impl CLKS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKS_A { match self . bits { 0 => CLKS_A :: _00 , 1 => CLKS_A :: _01 , 2 => CLKS_A :: _10 , 3 => CLKS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CLKS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CLKS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CLKS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CLKS_A :: _11 } } # [ doc = "Write proxy for field `CLKS`" ] pub struct CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > CLKS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No clock selected. This in effect disables the FTM counter." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _00 ) } # [ doc = "System clock" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _01 ) } # [ doc = "Fixed frequency clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _10 ) } # [ doc = "External clock" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 3 ) ) | ( ( ( value as u32 ) & 0x03 ) << 3 ) ; self . w } } # [ doc = "Center-Aligned PWM Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPWMS_A { # [ doc = "0: FTM counter operates in Up Counting mode." ] _0 , # [ doc = "1: FTM counter operates in Up-Down Counting mode." ] _1 } impl From < CPWMS_A > for bool { # [ inline ( always ) ] fn from ( variant : CPWMS_A ) -> Self { match variant { CPWMS_A :: _0 => false , CPWMS_A :: _1 => true } } } # [ doc = "Reader of field `CPWMS`" ] pub type CPWMS_R = crate :: R < bool , CPWMS_A > ; impl CPWMS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPWMS_A { match self . bits { false => CPWMS_A :: _0 , true => CPWMS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPWMS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPWMS_A :: _1 } } # [ doc = "Write proxy for field `CPWMS`" ] pub struct CPWMS_W < 'a > { w : & 'a mut W , } impl < 'a > CPWMS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPWMS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter operates in Up Counting mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _0 ) } # [ doc = "FTM counter operates in Up-Down Counting mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _1 ) } # [ 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 = "Timer Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOIE_A { # [ doc = "0: Disable TOF interrupts. Use software polling." ] _0 , # [ doc = "1: Enable TOF interrupts. An interrupt is generated when TOF equals one." ] _1 } impl From < TOIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TOIE_A ) -> Self { match variant { TOIE_A :: _0 => false , TOIE_A :: _1 => true } } } # [ doc = "Reader of field `TOIE`" ] pub type TOIE_R = crate :: R < bool , TOIE_A > ; impl TOIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOIE_A { match self . bits { false => TOIE_A :: _0 , true => TOIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOIE_A :: _1 } } # [ doc = "Write proxy for field `TOIE`" ] pub struct TOIE_W < 'a > { w : & 'a mut W , } impl < 'a > TOIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable TOF interrupts. Use software polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _0 ) } # [ doc = "Enable TOF interrupts. An interrupt is generated when TOF equals one." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _1 ) } # [ 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 = "Timer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: FTM counter has not overflowed." ] _0 , # [ doc = "1: FTM counter has overflowed." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Write proxy for field `TOF`" ] pub struct TOF_W < 'a > { w : & 'a mut W , } impl < 'a > TOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter has not overflowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _0 ) } # [ doc = "FTM counter has overflowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:4 - Clock Source Selection" ] # [ inline ( always ) ] pub fn clks ( & self ) -> CLKS_R { CLKS_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & self ) -> CPWMS_R { CPWMS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & self ) -> TOIE_R { TOIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bits 3:4 - Clock Source Selection" ] # [ inline ( always ) ] pub fn clks ( & mut self ) -> CLKS_W { CLKS_W { w : self } } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & mut self ) -> CPWMS_W { CPWMS_W { w : self } } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & mut self ) -> TOIE_W { TOIE_W { w : self } } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & mut self ) -> TOF_W { TOF_W { w : self } } } } # [ doc = "Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module" ] pub type CNT = crate :: Reg < u32 , _CNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNT ; # [ doc = "`read()` method returns [cnt::R](cnt::R) reader structure" ] impl crate :: Readable for CNT { } # [ doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure" ] impl crate :: Writable for CNT { } # [ doc = "Counter" ] pub mod cnt { # [ doc = "Reader of register CNT" ] pub type R = crate :: R < u32 , super :: CNT > ; # [ doc = "Writer for register CNT" ] pub type W = crate :: W < u32 , super :: CNT > ; # [ doc = "Register CNT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `COUNT`" ] pub struct COUNT_W < 'a > { w : & 'a mut W , } impl < 'a > COUNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn count ( & mut self ) -> COUNT_W { COUNT_W { w : self } } } } # [ doc = "Modulo\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mod_](mod_) module" ] pub type MOD = crate :: Reg < u32 , _MOD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MOD ; # [ doc = "`read()` method returns [mod_::R](mod_::R) reader structure" ] impl crate :: Readable for MOD { } # [ doc = "`write(|w| ..)` method takes [mod_::W](mod_::W) writer structure" ] impl crate :: Writable for MOD { } # [ doc = "Modulo" ] pub mod mod_ { # [ doc = "Reader of register MOD" ] pub type R = crate :: R < u32 , super :: MOD > ; # [ doc = "Writer for register MOD" ] pub type W = crate :: W < u32 , super :: MOD > ; # [ doc = "Register MOD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MOD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MOD`" ] pub type MOD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MOD`" ] pub struct MOD_W < 'a > { w : & 'a mut W , } impl < 'a > MOD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Modulo Value" ] # [ inline ( always ) ] pub fn mod_ ( & self ) -> MOD_R { MOD_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Modulo Value" ] # [ inline ( always ) ] pub fn mod_ ( & mut self ) -> MOD_W { MOD_W { w : self } } } } # [ doc = "Channel (n) Status And Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csc](csc) module" ] pub type CSC = crate :: Reg < u32 , _CSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSC ; # [ doc = "`read()` method returns [csc::R](csc::R) reader structure" ] impl crate :: Readable for CSC { } # [ doc = "`write(|w| ..)` method takes [csc::W](csc::W) writer structure" ] impl crate :: Writable for CSC { } # [ doc = "Channel (n) Status And Control" ] pub mod csc { # [ doc = "Reader of register C%sSC" ] pub type R = crate :: R < u32 , super :: CSC > ; # [ doc = "Writer for register C%sSC" ] pub type W = crate :: W < u32 , super :: CSC > ; # [ doc = "Register C%sSC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Disable DMA transfers." ] _0 , # [ doc = "1: Enable DMA transfers." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable DMA transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Enable DMA transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ELSA`" ] pub type ELSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSA`" ] pub struct ELSA_W < 'a > { w : & 'a mut W , } impl < 'a > ELSA_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 = "Reader of field `ELSB`" ] pub type ELSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSB`" ] pub struct ELSB_W < 'a > { w : & 'a mut W , } impl < 'a > ELSB_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `MSA`" ] pub type MSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSA`" ] pub struct MSA_W < 'a > { w : & 'a mut W , } impl < 'a > MSA_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `MSB`" ] pub type MSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSB`" ] pub struct MSB_W < 'a > { w : & 'a mut W , } impl < 'a > MSB_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 = "Channel Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHIE_A { # [ doc = "0: Disable channel interrupts. Use software polling." ] _0 , # [ doc = "1: Enable channel interrupts." ] _1 } impl From < CHIE_A > for bool { # [ inline ( always ) ] fn from ( variant : CHIE_A ) -> Self { match variant { CHIE_A :: _0 => false , CHIE_A :: _1 => true } } } # [ doc = "Reader of field `CHIE`" ] pub type CHIE_R = crate :: R < bool , CHIE_A > ; impl CHIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHIE_A { match self . bits { false => CHIE_A :: _0 , true => CHIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHIE_A :: _1 } } # [ doc = "Write proxy for field `CHIE`" ] pub struct CHIE_W < 'a > { w : & 'a mut W , } impl < 'a > CHIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable channel interrupts. Use software polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _0 ) } # [ doc = "Enable channel interrupts." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _1 ) } # [ 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 = "Channel Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHF_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CHF_A > for bool { # [ inline ( always ) ] fn from ( variant : CHF_A ) -> Self { match variant { CHF_A :: _0 => false , CHF_A :: _1 => true } } } # [ doc = "Reader of field `CHF`" ] pub type CHF_R = crate :: R < bool , CHF_A > ; impl CHF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHF_A { match self . bits { false => CHF_A :: _0 , true => CHF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHF_A :: _1 } } # [ doc = "Write proxy for field `CHF`" ] pub struct CHF_W < 'a > { w : & 'a mut W , } impl < 'a > CHF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & self ) -> ELSA_R { ELSA_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & self ) -> ELSB_R { ELSB_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & self ) -> MSA_R { MSA_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & self ) -> MSB_R { MSB_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & self ) -> CHIE_R { CHIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & self ) -> CHF_R { CHF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & mut self ) -> ELSA_W { ELSA_W { w : self } } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & mut self ) -> ELSB_W { ELSB_W { w : self } } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & mut self ) -> MSA_W { MSA_W { w : self } } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & mut self ) -> MSB_W { MSB_W { w : self } } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & mut self ) -> CHIE_W { CHIE_W { w : self } } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & mut self ) -> CHF_W { CHF_W { w : self } } } } # [ doc = "Channel (n) Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cv](cv) module" ] pub type CV = crate :: Reg < u32 , _CV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CV ; # [ doc = "`read()` method returns [cv::R](cv::R) reader structure" ] impl crate :: Readable for CV { } # [ doc = "`write(|w| ..)` method takes [cv::W](cv::W) writer structure" ] impl crate :: Writable for CV { } # [ doc = "Channel (n) Value" ] pub mod cv { # [ doc = "Reader of register C%sV" ] pub type R = crate :: R < u32 , super :: CV > ; # [ doc = "Writer for register C%sV" ] pub type W = crate :: W < u32 , super :: CV > ; # [ doc = "Register C%sV `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CV { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VAL`" ] pub type VAL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `VAL`" ] pub struct VAL_W < 'a > { w : & 'a mut W , } impl < 'a > VAL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & self ) -> VAL_R { VAL_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & mut self ) -> VAL_W { VAL_W { w : self } } } } # [ doc = "Counter Initial Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cntin](cntin) module" ] pub type CNTIN = crate :: Reg < u32 , _CNTIN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNTIN ; # [ doc = "`read()` method returns [cntin::R](cntin::R) reader structure" ] impl crate :: Readable for CNTIN { } # [ doc = "`write(|w| ..)` method takes [cntin::W](cntin::W) writer structure" ] impl crate :: Writable for CNTIN { } # [ doc = "Counter Initial Value" ] pub mod cntin { # [ doc = "Reader of register CNTIN" ] pub type R = crate :: R < u32 , super :: CNTIN > ; # [ doc = "Writer for register CNTIN" ] pub type W = crate :: W < u32 , super :: CNTIN > ; # [ doc = "Register CNTIN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNTIN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Initial Value Of The FTM Counter" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Initial Value Of The FTM Counter" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } } } # [ doc = "Capture And Compare Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "`write(|w| ..)` method takes [status::W](status::W) writer structure" ] impl crate :: Writable for STATUS { } # [ doc = "Capture And Compare Status" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Writer for register STATUS" ] pub type W = crate :: W < u32 , super :: STATUS > ; # [ doc = "Register STATUS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: STATUS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH0F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0F_A ) -> Self { match variant { CH0F_A :: _0 => false , CH0F_A :: _1 => true } } } # [ doc = "Reader of field `CH0F`" ] pub type CH0F_R = crate :: R < bool , CH0F_A > ; impl CH0F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0F_A { match self . bits { false => CH0F_A :: _0 , true => CH0F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0F_A :: _1 } } # [ doc = "Write proxy for field `CH0F`" ] pub struct CH0F_W < 'a > { w : & 'a mut W , } impl < 'a > CH0F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH1F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1F_A ) -> Self { match variant { CH1F_A :: _0 => false , CH1F_A :: _1 => true } } } # [ doc = "Reader of field `CH1F`" ] pub type CH1F_R = crate :: R < bool , CH1F_A > ; impl CH1F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1F_A { match self . bits { false => CH1F_A :: _0 , true => CH1F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1F_A :: _1 } } # [ doc = "Write proxy for field `CH1F`" ] pub struct CH1F_W < 'a > { w : & 'a mut W , } impl < 'a > CH1F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH2F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2F_A ) -> Self { match variant { CH2F_A :: _0 => false , CH2F_A :: _1 => true } } } # [ doc = "Reader of field `CH2F`" ] pub type CH2F_R = crate :: R < bool , CH2F_A > ; impl CH2F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2F_A { match self . bits { false => CH2F_A :: _0 , true => CH2F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2F_A :: _1 } } # [ doc = "Write proxy for field `CH2F`" ] pub struct CH2F_W < 'a > { w : & 'a mut W , } impl < 'a > CH2F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2F_A :: _1 ) } # [ 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 = "Channel 3 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH3F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3F_A ) -> Self { match variant { CH3F_A :: _0 => false , CH3F_A :: _1 => true } } } # [ doc = "Reader of field `CH3F`" ] pub type CH3F_R = crate :: R < bool , CH3F_A > ; impl CH3F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3F_A { match self . bits { false => CH3F_A :: _0 , true => CH3F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3F_A :: _1 } } # [ doc = "Write proxy for field `CH3F`" ] pub struct CH3F_W < 'a > { w : & 'a mut W , } impl < 'a > CH3F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3F_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH4F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4F_A ) -> Self { match variant { CH4F_A :: _0 => false , CH4F_A :: _1 => true } } } # [ doc = "Reader of field `CH4F`" ] pub type CH4F_R = crate :: R < bool , CH4F_A > ; impl CH4F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4F_A { match self . bits { false => CH4F_A :: _0 , true => CH4F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4F_A :: _1 } } # [ doc = "Write proxy for field `CH4F`" ] pub struct CH4F_W < 'a > { w : & 'a mut W , } impl < 'a > CH4F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4F_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH5F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5F_A ) -> Self { match variant { CH5F_A :: _0 => false , CH5F_A :: _1 => true } } } # [ doc = "Reader of field `CH5F`" ] pub type CH5F_R = crate :: R < bool , CH5F_A > ; impl CH5F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5F_A { match self . bits { false => CH5F_A :: _0 , true => CH5F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5F_A :: _1 } } # [ doc = "Write proxy for field `CH5F`" ] pub struct CH5F_W < 'a > { w : & 'a mut W , } impl < 'a > CH5F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5F_A :: _1 ) } # [ 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 = "Channel 6 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH6F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6F_A ) -> Self { match variant { CH6F_A :: _0 => false , CH6F_A :: _1 => true } } } # [ doc = "Reader of field `CH6F`" ] pub type CH6F_R = crate :: R < bool , CH6F_A > ; impl CH6F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6F_A { match self . bits { false => CH6F_A :: _0 , true => CH6F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6F_A :: _1 } } # [ doc = "Write proxy for field `CH6F`" ] pub struct CH6F_W < 'a > { w : & 'a mut W , } impl < 'a > CH6F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6F_A :: _1 ) } # [ 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 = "Channel 7 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH7F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7F_A ) -> Self { match variant { CH7F_A :: _0 => false , CH7F_A :: _1 => true } } } # [ doc = "Reader of field `CH7F`" ] pub type CH7F_R = crate :: R < bool , CH7F_A > ; impl CH7F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7F_A { match self . bits { false => CH7F_A :: _0 , true => CH7F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7F_A :: _1 } } # [ doc = "Write proxy for field `CH7F`" ] pub struct CH7F_W < 'a > { w : & 'a mut W , } impl < 'a > CH7F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7F_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & self ) -> CH0F_R { CH0F_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & self ) -> CH1F_R { CH1F_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Flag" ] # [ inline ( always ) ] pub fn ch2f ( & self ) -> CH2F_R { CH2F_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Flag" ] # [ inline ( always ) ] pub fn ch3f ( & self ) -> CH3F_R { CH3F_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Flag" ] # [ inline ( always ) ] pub fn ch4f ( & self ) -> CH4F_R { CH4F_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Flag" ] # [ inline ( always ) ] pub fn ch5f ( & self ) -> CH5F_R { CH5F_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Flag" ] # [ inline ( always ) ] pub fn ch6f ( & self ) -> CH6F_R { CH6F_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Flag" ] # [ inline ( always ) ] pub fn ch7f ( & self ) -> CH7F_R { CH7F_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & mut self ) -> CH0F_W { CH0F_W { w : self } } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & mut self ) -> CH1F_W { CH1F_W { w : self } } # [ doc = "Bit 2 - Channel 2 Flag" ] # [ inline ( always ) ] pub fn ch2f ( & mut self ) -> CH2F_W { CH2F_W { w : self } } # [ doc = "Bit 3 - Channel 3 Flag" ] # [ inline ( always ) ] pub fn ch3f ( & mut self ) -> CH3F_W { CH3F_W { w : self } } # [ doc = "Bit 4 - Channel 4 Flag" ] # [ inline ( always ) ] pub fn ch4f ( & mut self ) -> CH4F_W { CH4F_W { w : self } } # [ doc = "Bit 5 - Channel 5 Flag" ] # [ inline ( always ) ] pub fn ch5f ( & mut self ) -> CH5F_W { CH5F_W { w : self } } # [ doc = "Bit 6 - Channel 6 Flag" ] # [ inline ( always ) ] pub fn ch6f ( & mut self ) -> CH6F_W { CH6F_W { w : self } } # [ doc = "Bit 7 - Channel 7 Flag" ] # [ inline ( always ) ] pub fn ch7f ( & mut self ) -> CH7F_W { CH7F_W { w : self } } } } # [ doc = "Features Mode Selection\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mode](mode) module" ] pub type MODE = crate :: Reg < u32 , _MODE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODE ; # [ doc = "`read()` method returns [mode::R](mode::R) reader structure" ] impl crate :: Readable for MODE { } # [ doc = "`write(|w| ..)` method takes [mode::W](mode::W) writer structure" ] impl crate :: Writable for MODE { } # [ doc = "Features Mode Selection" ] pub mod mode { # [ doc = "Reader of register MODE" ] pub type R = crate :: R < u32 , super :: MODE > ; # [ doc = "Writer for register MODE" ] pub type W = crate :: W < u32 , super :: MODE > ; # [ doc = "Register MODE `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: MODE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "FTM Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTMEN_A { # [ doc = "0: TPM compatibility. Free running counter and synchronization compatible with TPM." ] _0 , # [ doc = "1: Free running counter and synchronization are different from TPM behavior." ] _1 } impl From < FTMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : FTMEN_A ) -> Self { match variant { FTMEN_A :: _0 => false , FTMEN_A :: _1 => true } } } # [ doc = "Reader of field `FTMEN`" ] pub type FTMEN_R = crate :: R < bool , FTMEN_A > ; impl FTMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTMEN_A { match self . bits { false => FTMEN_A :: _0 , true => FTMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTMEN_A :: _1 } } # [ doc = "Write proxy for field `FTMEN`" ] pub struct FTMEN_W < 'a > { w : & 'a mut W , } impl < 'a > FTMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM compatibility. Free running counter and synchronization compatible with TPM." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTMEN_A :: _0 ) } # [ doc = "Free running counter and synchronization are different from TPM behavior." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTMEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_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 } } # [ doc = "Write Protection Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPDIS_A { # [ doc = "0: Write protection is enabled." ] _0 , # [ doc = "1: Write protection is disabled." ] _1 } impl From < WPDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : WPDIS_A ) -> Self { match variant { WPDIS_A :: _0 => false , WPDIS_A :: _1 => true } } } # [ doc = "Reader of field `WPDIS`" ] pub type WPDIS_R = crate :: R < bool , WPDIS_A > ; impl WPDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPDIS_A { match self . bits { false => WPDIS_A :: _0 , true => WPDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPDIS_A :: _1 } } # [ doc = "Write proxy for field `WPDIS`" ] pub struct WPDIS_W < 'a > { w : & 'a mut W , } impl < 'a > WPDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write protection is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPDIS_A :: _0 ) } # [ doc = "Write protection is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPDIS_A :: _1 ) } # [ 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 = "PWM Synchronization Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWMSYNC_A { # [ doc = "0: No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization." ] _0 , # [ doc = "1: Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization." ] _1 } impl From < PWMSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : PWMSYNC_A ) -> Self { match variant { PWMSYNC_A :: _0 => false , PWMSYNC_A :: _1 => true } } } # [ doc = "Reader of field `PWMSYNC`" ] pub type PWMSYNC_R = crate :: R < bool , PWMSYNC_A > ; impl PWMSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PWMSYNC_A { match self . bits { false => PWMSYNC_A :: _0 , true => PWMSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PWMSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PWMSYNC_A :: _1 } } # [ doc = "Write proxy for field `PWMSYNC`" ] pub struct PWMSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > PWMSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PWMSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PWMSYNC_A :: _0 ) } # [ doc = "Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PWMSYNC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Capture Test Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAPTEST_A { # [ doc = "0: Capture test mode is disabled." ] _0 , # [ doc = "1: Capture test mode is enabled." ] _1 } impl From < CAPTEST_A > for bool { # [ inline ( always ) ] fn from ( variant : CAPTEST_A ) -> Self { match variant { CAPTEST_A :: _0 => false , CAPTEST_A :: _1 => true } } } # [ doc = "Reader of field `CAPTEST`" ] pub type CAPTEST_R = crate :: R < bool , CAPTEST_A > ; impl CAPTEST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CAPTEST_A { match self . bits { false => CAPTEST_A :: _0 , true => CAPTEST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CAPTEST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CAPTEST_A :: _1 } } # [ doc = "Write proxy for field `CAPTEST`" ] pub struct CAPTEST_W < 'a > { w : & 'a mut W , } impl < 'a > CAPTEST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAPTEST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Capture test mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAPTEST_A :: _0 ) } # [ doc = "Capture test mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAPTEST_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Fault Control Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTM_A { # [ doc = "0: Fault control is disabled for all channels." ] _00 , # [ doc = "1: Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing." ] _01 , # [ doc = "2: Fault control is enabled for all channels, and the selected mode is the manual fault clearing." ] _10 , # [ doc = "3: Fault control is enabled for all channels, and the selected mode is the automatic fault clearing." ] _11 } impl From < FAULTM_A > for u8 { # [ inline ( always ) ] fn from ( variant : FAULTM_A ) -> Self { match variant { FAULTM_A :: _00 => 0 , FAULTM_A :: _01 => 1 , FAULTM_A :: _10 => 2 , FAULTM_A :: _11 => 3 } } } # [ doc = "Reader of field `FAULTM`" ] pub type FAULTM_R = crate :: R < u8 , FAULTM_A > ; impl FAULTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTM_A { match self . bits { 0 => FAULTM_A :: _00 , 1 => FAULTM_A :: _01 , 2 => FAULTM_A :: _10 , 3 => FAULTM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FAULTM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FAULTM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FAULTM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FAULTM_A :: _11 } } # [ doc = "Write proxy for field `FAULTM`" ] pub struct FAULTM_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Fault control is disabled for all channels." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _00 ) } # [ doc = "Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _01 ) } # [ doc = "Fault control is enabled for all channels, and the selected mode is the manual fault clearing." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _10 ) } # [ doc = "Fault control is enabled for all channels, and the selected mode is the automatic fault clearing." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u32 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Fault Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTIE_A { # [ doc = "0: Fault control interrupt is disabled." ] _0 , # [ doc = "1: Fault control interrupt is enabled." ] _1 } impl From < FAULTIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTIE_A ) -> Self { match variant { FAULTIE_A :: _0 => false , FAULTIE_A :: _1 => true } } } # [ doc = "Reader of field `FAULTIE`" ] pub type FAULTIE_R = crate :: R < bool , FAULTIE_A > ; impl FAULTIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTIE_A { match self . bits { false => FAULTIE_A :: _0 , true => FAULTIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTIE_A :: _1 } } # [ doc = "Write proxy for field `FAULTIE`" ] pub struct FAULTIE_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault control interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTIE_A :: _0 ) } # [ doc = "Fault control interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTIE_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - FTM Enable" ] # [ inline ( always ) ] pub fn ftmen ( & self ) -> FTMEN_R { FTMEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Initialize The Channels Output" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Write Protection Disable" ] # [ inline ( always ) ] pub fn wpdis ( & self ) -> WPDIS_R { WPDIS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - PWM Synchronization Mode" ] # [ inline ( always ) ] pub fn pwmsync ( & self ) -> PWMSYNC_R { PWMSYNC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Capture Test Mode Enable" ] # [ inline ( always ) ] pub fn captest ( & self ) -> CAPTEST_R { CAPTEST_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:6 - Fault Control Mode" ] # [ inline ( always ) ] pub fn faultm ( & self ) -> FAULTM_R { FAULTM_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Fault Interrupt Enable" ] # [ inline ( always ) ] pub fn faultie ( & self ) -> FAULTIE_R { FAULTIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FTM Enable" ] # [ inline ( always ) ] pub fn ftmen ( & mut self ) -> FTMEN_W { FTMEN_W { w : self } } # [ doc = "Bit 1 - Initialize The Channels Output" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } # [ doc = "Bit 2 - Write Protection Disable" ] # [ inline ( always ) ] pub fn wpdis ( & mut self ) -> WPDIS_W { WPDIS_W { w : self } } # [ doc = "Bit 3 - PWM Synchronization Mode" ] # [ inline ( always ) ] pub fn pwmsync ( & mut self ) -> PWMSYNC_W { PWMSYNC_W { w : self } } # [ doc = "Bit 4 - Capture Test Mode Enable" ] # [ inline ( always ) ] pub fn captest ( & mut self ) -> CAPTEST_W { CAPTEST_W { w : self } } # [ doc = "Bits 5:6 - Fault Control Mode" ] # [ inline ( always ) ] pub fn faultm ( & mut self ) -> FAULTM_W { FAULTM_W { w : self } } # [ doc = "Bit 7 - Fault Interrupt Enable" ] # [ inline ( always ) ] pub fn faultie ( & mut self ) -> FAULTIE_W { FAULTIE_W { w : self } } } } # [ doc = "Synchronization\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sync](sync) module" ] pub type SYNC = crate :: Reg < u32 , _SYNC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYNC ; # [ doc = "`read()` method returns [sync::R](sync::R) reader structure" ] impl crate :: Readable for SYNC { } # [ doc = "`write(|w| ..)` method takes [sync::W](sync::W) writer structure" ] impl crate :: Writable for SYNC { } # [ doc = "Synchronization" ] pub mod sync { # [ doc = "Reader of register SYNC" ] pub type R = crate :: R < u32 , super :: SYNC > ; # [ doc = "Writer for register SYNC" ] pub type W = crate :: W < u32 , super :: SYNC > ; # [ doc = "Register SYNC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SYNC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Minimum Loading Point Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTMIN_A { # [ doc = "0: The minimum loading point is disabled." ] _0 , # [ doc = "1: The minimum loading point is enabled." ] _1 } impl From < CNTMIN_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTMIN_A ) -> Self { match variant { CNTMIN_A :: _0 => false , CNTMIN_A :: _1 => true } } } # [ doc = "Reader of field `CNTMIN`" ] pub type CNTMIN_R = crate :: R < bool , CNTMIN_A > ; impl CNTMIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTMIN_A { match self . bits { false => CNTMIN_A :: _0 , true => CNTMIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTMIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTMIN_A :: _1 } } # [ doc = "Write proxy for field `CNTMIN`" ] pub struct CNTMIN_W < 'a > { w : & 'a mut W , } impl < 'a > CNTMIN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTMIN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The minimum loading point is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTMIN_A :: _0 ) } # [ doc = "The minimum loading point is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTMIN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Maximum Loading Point Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTMAX_A { # [ doc = "0: The maximum loading point is disabled." ] _0 , # [ doc = "1: The maximum loading point is enabled." ] _1 } impl From < CNTMAX_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTMAX_A ) -> Self { match variant { CNTMAX_A :: _0 => false , CNTMAX_A :: _1 => true } } } # [ doc = "Reader of field `CNTMAX`" ] pub type CNTMAX_R = crate :: R < bool , CNTMAX_A > ; impl CNTMAX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTMAX_A { match self . bits { false => CNTMAX_A :: _0 , true => CNTMAX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTMAX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTMAX_A :: _1 } } # [ doc = "Write proxy for field `CNTMAX`" ] pub struct CNTMAX_W < 'a > { w : & 'a mut W , } impl < 'a > CNTMAX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTMAX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The maximum loading point is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTMAX_A :: _0 ) } # [ doc = "The maximum loading point is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTMAX_A :: _1 ) } # [ 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 } } # [ doc = "FTM Counter Reinitialization By Synchronization (FTM counter synchronization)\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REINIT_A { # [ doc = "0: FTM counter continues to count normally." ] _0 , # [ doc = "1: FTM counter is updated with its initial value when the selected trigger is detected." ] _1 } impl From < REINIT_A > for bool { # [ inline ( always ) ] fn from ( variant : REINIT_A ) -> Self { match variant { REINIT_A :: _0 => false , REINIT_A :: _1 => true } } } # [ doc = "Reader of field `REINIT`" ] pub type REINIT_R = crate :: R < bool , REINIT_A > ; impl REINIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> REINIT_A { match self . bits { false => REINIT_A :: _0 , true => REINIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == REINIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == REINIT_A :: _1 } } # [ doc = "Write proxy for field `REINIT`" ] pub struct REINIT_W < 'a > { w : & 'a mut W , } impl < 'a > REINIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REINIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter continues to count normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( REINIT_A :: _0 ) } # [ doc = "FTM counter is updated with its initial value when the selected trigger is detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( REINIT_A :: _1 ) } # [ 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 = "Output Mask Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCHOM_A { # [ doc = "0: OUTMASK register is updated with the value of its buffer in all rising edges of the system clock." ] _0 , # [ doc = "1: OUTMASK register is updated with the value of its buffer only by the PWM synchronization." ] _1 } impl From < SYNCHOM_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCHOM_A ) -> Self { match variant { SYNCHOM_A :: _0 => false , SYNCHOM_A :: _1 => true } } } # [ doc = "Reader of field `SYNCHOM`" ] pub type SYNCHOM_R = crate :: R < bool , SYNCHOM_A > ; impl SYNCHOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCHOM_A { match self . bits { false => SYNCHOM_A :: _0 , true => SYNCHOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCHOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCHOM_A :: _1 } } # [ doc = "Write proxy for field `SYNCHOM`" ] pub struct SYNCHOM_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCHOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCHOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OUTMASK register is updated with the value of its buffer in all rising edges of the system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCHOM_A :: _0 ) } # [ doc = "OUTMASK register is updated with the value of its buffer only by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCHOM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "PWM Synchronization Hardware Trigger 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG0_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG0_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG0_A ) -> Self { match variant { TRIG0_A :: _0 => false , TRIG0_A :: _1 => true } } } # [ doc = "Reader of field `TRIG0`" ] pub type TRIG0_R = crate :: R < bool , TRIG0_A > ; impl TRIG0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG0_A { match self . bits { false => TRIG0_A :: _0 , true => TRIG0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG0_A :: _1 } } # [ doc = "Write proxy for field `TRIG0`" ] pub struct TRIG0_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG0_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "PWM Synchronization Hardware Trigger 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG1_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG1_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG1_A ) -> Self { match variant { TRIG1_A :: _0 => false , TRIG1_A :: _1 => true } } } # [ doc = "Reader of field `TRIG1`" ] pub type TRIG1_R = crate :: R < bool , TRIG1_A > ; impl TRIG1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG1_A { match self . bits { false => TRIG1_A :: _0 , true => TRIG1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG1_A :: _1 } } # [ doc = "Write proxy for field `TRIG1`" ] pub struct TRIG1_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG1_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG1_A :: _1 ) } # [ 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 = "PWM Synchronization Hardware Trigger 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG2_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG2_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG2_A ) -> Self { match variant { TRIG2_A :: _0 => false , TRIG2_A :: _1 => true } } } # [ doc = "Reader of field `TRIG2`" ] pub type TRIG2_R = crate :: R < bool , TRIG2_A > ; impl TRIG2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG2_A { match self . bits { false => TRIG2_A :: _0 , true => TRIG2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG2_A :: _1 } } # [ doc = "Write proxy for field `TRIG2`" ] pub struct TRIG2_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG2_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG2_A :: _1 ) } # [ 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 = "PWM Synchronization Software Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSYNC_A { # [ doc = "0: Software trigger is not selected." ] _0 , # [ doc = "1: Software trigger is selected." ] _1 } impl From < SWSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSYNC_A ) -> Self { match variant { SWSYNC_A :: _0 => false , SWSYNC_A :: _1 => true } } } # [ doc = "Reader of field `SWSYNC`" ] pub type SWSYNC_R = crate :: R < bool , SWSYNC_A > ; impl SWSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSYNC_A { match self . bits { false => SWSYNC_A :: _0 , true => SWSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSYNC_A :: _1 } } # [ doc = "Write proxy for field `SWSYNC`" ] pub struct SWSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > SWSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Software trigger is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSYNC_A :: _0 ) } # [ doc = "Software trigger is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSYNC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Minimum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmin ( & self ) -> CNTMIN_R { CNTMIN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Maximum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmax ( & self ) -> CNTMAX_R { CNTMAX_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)" ] # [ inline ( always ) ] pub fn reinit ( & self ) -> REINIT_R { REINIT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Output Mask Synchronization" ] # [ inline ( always ) ] pub fn synchom ( & self ) -> SYNCHOM_R { SYNCHOM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - PWM Synchronization Hardware Trigger 0" ] # [ inline ( always ) ] pub fn trig0 ( & self ) -> TRIG0_R { TRIG0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - PWM Synchronization Hardware Trigger 1" ] # [ inline ( always ) ] pub fn trig1 ( & self ) -> TRIG1_R { TRIG1_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PWM Synchronization Hardware Trigger 2" ] # [ inline ( always ) ] pub fn trig2 ( & self ) -> TRIG2_R { TRIG2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - PWM Synchronization Software Trigger" ] # [ inline ( always ) ] pub fn swsync ( & self ) -> SWSYNC_R { SWSYNC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Minimum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmin ( & mut self ) -> CNTMIN_W { CNTMIN_W { w : self } } # [ doc = "Bit 1 - Maximum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmax ( & mut self ) -> CNTMAX_W { CNTMAX_W { w : self } } # [ doc = "Bit 2 - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)" ] # [ inline ( always ) ] pub fn reinit ( & mut self ) -> REINIT_W { REINIT_W { w : self } } # [ doc = "Bit 3 - Output Mask Synchronization" ] # [ inline ( always ) ] pub fn synchom ( & mut self ) -> SYNCHOM_W { SYNCHOM_W { w : self } } # [ doc = "Bit 4 - PWM Synchronization Hardware Trigger 0" ] # [ inline ( always ) ] pub fn trig0 ( & mut self ) -> TRIG0_W { TRIG0_W { w : self } } # [ doc = "Bit 5 - PWM Synchronization Hardware Trigger 1" ] # [ inline ( always ) ] pub fn trig1 ( & mut self ) -> TRIG1_W { TRIG1_W { w : self } } # [ doc = "Bit 6 - PWM Synchronization Hardware Trigger 2" ] # [ inline ( always ) ] pub fn trig2 ( & mut self ) -> TRIG2_W { TRIG2_W { w : self } } # [ doc = "Bit 7 - PWM Synchronization Software Trigger" ] # [ inline ( always ) ] pub fn swsync ( & mut self ) -> SWSYNC_W { SWSYNC_W { w : self } } } } # [ doc = "Initial State For Channels Output\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [outinit](outinit) module" ] pub type OUTINIT = crate :: Reg < u32 , _OUTINIT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OUTINIT ; # [ doc = "`read()` method returns [outinit::R](outinit::R) reader structure" ] impl crate :: Readable for OUTINIT { } # [ doc = "`write(|w| ..)` method takes [outinit::W](outinit::W) writer structure" ] impl crate :: Writable for OUTINIT { } # [ doc = "Initial State For Channels Output" ] pub mod outinit { # [ doc = "Reader of register OUTINIT" ] pub type R = crate :: R < u32 , super :: OUTINIT > ; # [ doc = "Writer for register OUTINIT" ] pub type W = crate :: W < u32 , super :: OUTINIT > ; # [ doc = "Register OUTINIT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OUTINIT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH0OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OI_A ) -> Self { match variant { CH0OI_A :: _0 => false , CH0OI_A :: _1 => true } } } # [ doc = "Reader of field `CH0OI`" ] pub type CH0OI_R = crate :: R < bool , CH0OI_A > ; impl CH0OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OI_A { match self . bits { false => CH0OI_A :: _0 , true => CH0OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OI_A :: _1 } } # [ doc = "Write proxy for field `CH0OI`" ] pub struct CH0OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OI_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH1OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OI_A ) -> Self { match variant { CH1OI_A :: _0 => false , CH1OI_A :: _1 => true } } } # [ doc = "Reader of field `CH1OI`" ] pub type CH1OI_R = crate :: R < bool , CH1OI_A > ; impl CH1OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OI_A { match self . bits { false => CH1OI_A :: _0 , true => CH1OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OI_A :: _1 } } # [ doc = "Write proxy for field `CH1OI`" ] pub struct CH1OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OI_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH2OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OI_A ) -> Self { match variant { CH2OI_A :: _0 => false , CH2OI_A :: _1 => true } } } # [ doc = "Reader of field `CH2OI`" ] pub type CH2OI_R = crate :: R < bool , CH2OI_A > ; impl CH2OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OI_A { match self . bits { false => CH2OI_A :: _0 , true => CH2OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OI_A :: _1 } } # [ doc = "Write proxy for field `CH2OI`" ] pub struct CH2OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OI_A :: _1 ) } # [ 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 = "Channel 3 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH3OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OI_A ) -> Self { match variant { CH3OI_A :: _0 => false , CH3OI_A :: _1 => true } } } # [ doc = "Reader of field `CH3OI`" ] pub type CH3OI_R = crate :: R < bool , CH3OI_A > ; impl CH3OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OI_A { match self . bits { false => CH3OI_A :: _0 , true => CH3OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OI_A :: _1 } } # [ doc = "Write proxy for field `CH3OI`" ] pub struct CH3OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OI_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH4OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OI_A ) -> Self { match variant { CH4OI_A :: _0 => false , CH4OI_A :: _1 => true } } } # [ doc = "Reader of field `CH4OI`" ] pub type CH4OI_R = crate :: R < bool , CH4OI_A > ; impl CH4OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OI_A { match self . bits { false => CH4OI_A :: _0 , true => CH4OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OI_A :: _1 } } # [ doc = "Write proxy for field `CH4OI`" ] pub struct CH4OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OI_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH5OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OI_A ) -> Self { match variant { CH5OI_A :: _0 => false , CH5OI_A :: _1 => true } } } # [ doc = "Reader of field `CH5OI`" ] pub type CH5OI_R = crate :: R < bool , CH5OI_A > ; impl CH5OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OI_A { match self . bits { false => CH5OI_A :: _0 , true => CH5OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OI_A :: _1 } } # [ doc = "Write proxy for field `CH5OI`" ] pub struct CH5OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OI_A :: _1 ) } # [ 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 = "Channel 6 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH6OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OI_A ) -> Self { match variant { CH6OI_A :: _0 => false , CH6OI_A :: _1 => true } } } # [ doc = "Reader of field `CH6OI`" ] pub type CH6OI_R = crate :: R < bool , CH6OI_A > ; impl CH6OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OI_A { match self . bits { false => CH6OI_A :: _0 , true => CH6OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OI_A :: _1 } } # [ doc = "Write proxy for field `CH6OI`" ] pub struct CH6OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OI_A :: _1 ) } # [ 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 = "Channel 7 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH7OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OI_A ) -> Self { match variant { CH7OI_A :: _0 => false , CH7OI_A :: _1 => true } } } # [ doc = "Reader of field `CH7OI`" ] pub type CH7OI_R = crate :: R < bool , CH7OI_A > ; impl CH7OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OI_A { match self . bits { false => CH7OI_A :: _0 , true => CH7OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OI_A :: _1 } } # [ doc = "Write proxy for field `CH7OI`" ] pub struct CH7OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OI_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch0oi ( & self ) -> CH0OI_R { CH0OI_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch1oi ( & self ) -> CH1OI_R { CH1OI_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch2oi ( & self ) -> CH2OI_R { CH2OI_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch3oi ( & self ) -> CH3OI_R { CH3OI_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch4oi ( & self ) -> CH4OI_R { CH4OI_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch5oi ( & self ) -> CH5OI_R { CH5OI_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch6oi ( & self ) -> CH6OI_R { CH6OI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch7oi ( & self ) -> CH7OI_R { CH7OI_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch0oi ( & mut self ) -> CH0OI_W { CH0OI_W { w : self } } # [ doc = "Bit 1 - Channel 1 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch1oi ( & mut self ) -> CH1OI_W { CH1OI_W { w : self } } # [ doc = "Bit 2 - Channel 2 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch2oi ( & mut self ) -> CH2OI_W { CH2OI_W { w : self } } # [ doc = "Bit 3 - Channel 3 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch3oi ( & mut self ) -> CH3OI_W { CH3OI_W { w : self } } # [ doc = "Bit 4 - Channel 4 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch4oi ( & mut self ) -> CH4OI_W { CH4OI_W { w : self } } # [ doc = "Bit 5 - Channel 5 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch5oi ( & mut self ) -> CH5OI_W { CH5OI_W { w : self } } # [ doc = "Bit 6 - Channel 6 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch6oi ( & mut self ) -> CH6OI_W { CH6OI_W { w : self } } # [ doc = "Bit 7 - Channel 7 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch7oi ( & mut self ) -> CH7OI_W { CH7OI_W { w : self } } } } # [ doc = "Output Mask\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [outmask](outmask) module" ] pub type OUTMASK = crate :: Reg < u32 , _OUTMASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OUTMASK ; # [ doc = "`read()` method returns [outmask::R](outmask::R) reader structure" ] impl crate :: Readable for OUTMASK { } # [ doc = "`write(|w| ..)` method takes [outmask::W](outmask::W) writer structure" ] impl crate :: Writable for OUTMASK { } # [ doc = "Output Mask" ] pub mod outmask { # [ doc = "Reader of register OUTMASK" ] pub type R = crate :: R < u32 , super :: OUTMASK > ; # [ doc = "Writer for register OUTMASK" ] pub type W = crate :: W < u32 , super :: OUTMASK > ; # [ doc = "Register OUTMASK `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OUTMASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH0OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OM_A ) -> Self { match variant { CH0OM_A :: _0 => false , CH0OM_A :: _1 => true } } } # [ doc = "Reader of field `CH0OM`" ] pub type CH0OM_R = crate :: R < bool , CH0OM_A > ; impl CH0OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OM_A { match self . bits { false => CH0OM_A :: _0 , true => CH0OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OM_A :: _1 } } # [ doc = "Write proxy for field `CH0OM`" ] pub struct CH0OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OM_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH1OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OM_A ) -> Self { match variant { CH1OM_A :: _0 => false , CH1OM_A :: _1 => true } } } # [ doc = "Reader of field `CH1OM`" ] pub type CH1OM_R = crate :: R < bool , CH1OM_A > ; impl CH1OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OM_A { match self . bits { false => CH1OM_A :: _0 , true => CH1OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OM_A :: _1 } } # [ doc = "Write proxy for field `CH1OM`" ] pub struct CH1OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OM_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH2OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OM_A ) -> Self { match variant { CH2OM_A :: _0 => false , CH2OM_A :: _1 => true } } } # [ doc = "Reader of field `CH2OM`" ] pub type CH2OM_R = crate :: R < bool , CH2OM_A > ; impl CH2OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OM_A { match self . bits { false => CH2OM_A :: _0 , true => CH2OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OM_A :: _1 } } # [ doc = "Write proxy for field `CH2OM`" ] pub struct CH2OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OM_A :: _1 ) } # [ 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 = "Channel 3 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH3OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OM_A ) -> Self { match variant { CH3OM_A :: _0 => false , CH3OM_A :: _1 => true } } } # [ doc = "Reader of field `CH3OM`" ] pub type CH3OM_R = crate :: R < bool , CH3OM_A > ; impl CH3OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OM_A { match self . bits { false => CH3OM_A :: _0 , true => CH3OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OM_A :: _1 } } # [ doc = "Write proxy for field `CH3OM`" ] pub struct CH3OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH4OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OM_A ) -> Self { match variant { CH4OM_A :: _0 => false , CH4OM_A :: _1 => true } } } # [ doc = "Reader of field `CH4OM`" ] pub type CH4OM_R = crate :: R < bool , CH4OM_A > ; impl CH4OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OM_A { match self . bits { false => CH4OM_A :: _0 , true => CH4OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OM_A :: _1 } } # [ doc = "Write proxy for field `CH4OM`" ] pub struct CH4OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OM_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH5OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OM_A ) -> Self { match variant { CH5OM_A :: _0 => false , CH5OM_A :: _1 => true } } } # [ doc = "Reader of field `CH5OM`" ] pub type CH5OM_R = crate :: R < bool , CH5OM_A > ; impl CH5OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OM_A { match self . bits { false => CH5OM_A :: _0 , true => CH5OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OM_A :: _1 } } # [ doc = "Write proxy for field `CH5OM`" ] pub struct CH5OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OM_A :: _1 ) } # [ 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 = "Channel 6 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH6OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OM_A ) -> Self { match variant { CH6OM_A :: _0 => false , CH6OM_A :: _1 => true } } } # [ doc = "Reader of field `CH6OM`" ] pub type CH6OM_R = crate :: R < bool , CH6OM_A > ; impl CH6OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OM_A { match self . bits { false => CH6OM_A :: _0 , true => CH6OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OM_A :: _1 } } # [ doc = "Write proxy for field `CH6OM`" ] pub struct CH6OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OM_A :: _1 ) } # [ 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 = "Channel 7 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH7OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OM_A ) -> Self { match variant { CH7OM_A :: _0 => false , CH7OM_A :: _1 => true } } } # [ doc = "Reader of field `CH7OM`" ] pub type CH7OM_R = crate :: R < bool , CH7OM_A > ; impl CH7OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OM_A { match self . bits { false => CH7OM_A :: _0 , true => CH7OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OM_A :: _1 } } # [ doc = "Write proxy for field `CH7OM`" ] pub struct CH7OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OM_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Output Mask" ] # [ inline ( always ) ] pub fn ch0om ( & self ) -> CH0OM_R { CH0OM_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Output Mask" ] # [ inline ( always ) ] pub fn ch1om ( & self ) -> CH1OM_R { CH1OM_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Output Mask" ] # [ inline ( always ) ] pub fn ch2om ( & self ) -> CH2OM_R { CH2OM_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Output Mask" ] # [ inline ( always ) ] pub fn ch3om ( & self ) -> CH3OM_R { CH3OM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Output Mask" ] # [ inline ( always ) ] pub fn ch4om ( & self ) -> CH4OM_R { CH4OM_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Output Mask" ] # [ inline ( always ) ] pub fn ch5om ( & self ) -> CH5OM_R { CH5OM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Output Mask" ] # [ inline ( always ) ] pub fn ch6om ( & self ) -> CH6OM_R { CH6OM_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Output Mask" ] # [ inline ( always ) ] pub fn ch7om ( & self ) -> CH7OM_R { CH7OM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Output Mask" ] # [ inline ( always ) ] pub fn ch0om ( & mut self ) -> CH0OM_W { CH0OM_W { w : self } } # [ doc = "Bit 1 - Channel 1 Output Mask" ] # [ inline ( always ) ] pub fn ch1om ( & mut self ) -> CH1OM_W { CH1OM_W { w : self } } # [ doc = "Bit 2 - Channel 2 Output Mask" ] # [ inline ( always ) ] pub fn ch2om ( & mut self ) -> CH2OM_W { CH2OM_W { w : self } } # [ doc = "Bit 3 - Channel 3 Output Mask" ] # [ inline ( always ) ] pub fn ch3om ( & mut self ) -> CH3OM_W { CH3OM_W { w : self } } # [ doc = "Bit 4 - Channel 4 Output Mask" ] # [ inline ( always ) ] pub fn ch4om ( & mut self ) -> CH4OM_W { CH4OM_W { w : self } } # [ doc = "Bit 5 - Channel 5 Output Mask" ] # [ inline ( always ) ] pub fn ch5om ( & mut self ) -> CH5OM_W { CH5OM_W { w : self } } # [ doc = "Bit 6 - Channel 6 Output Mask" ] # [ inline ( always ) ] pub fn ch6om ( & mut self ) -> CH6OM_W { CH6OM_W { w : self } } # [ doc = "Bit 7 - Channel 7 Output Mask" ] # [ inline ( always ) ] pub fn ch7om ( & mut self ) -> CH7OM_W { CH7OM_W { w : self } } } } # [ doc = "Function For Linked Channels\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [combine](combine) module" ] pub type COMBINE = crate :: Reg < u32 , _COMBINE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _COMBINE ; # [ doc = "`read()` method returns [combine::R](combine::R) reader structure" ] impl crate :: Readable for COMBINE { } # [ doc = "`write(|w| ..)` method takes [combine::W](combine::W) writer structure" ] impl crate :: Writable for COMBINE { } # [ doc = "Function For Linked Channels" ] pub mod combine { # [ doc = "Reader of register COMBINE" ] pub type R = crate :: R < u32 , super :: COMBINE > ; # [ doc = "Writer for register COMBINE" ] pub type W = crate :: W < u32 , super :: COMBINE > ; # [ doc = "Register COMBINE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: COMBINE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Combine Channels For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE0_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE0_A ) -> Self { match variant { COMBINE0_A :: _0 => false , COMBINE0_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE0`" ] pub type COMBINE0_R = crate :: R < bool , COMBINE0_A > ; impl COMBINE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE0_A { match self . bits { false => COMBINE0_A :: _0 , true => COMBINE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE0_A :: _1 } } # [ doc = "Write proxy for field `COMBINE0`" ] pub struct COMBINE0_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP0_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP0_A ) -> Self { match variant { COMP0_A :: _0 => false , COMP0_A :: _1 => true } } } # [ doc = "Reader of field `COMP0`" ] pub type COMP0_R = crate :: R < bool , COMP0_A > ; impl COMP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP0_A { match self . bits { false => COMP0_A :: _0 , true => COMP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP0_A :: _1 } } # [ doc = "Write proxy for field `COMP0`" ] pub struct COMP0_W < 'a > { w : & 'a mut W , } impl < 'a > COMP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP0_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP0_A :: _1 ) } # [ 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 } } # [ doc = "Dual Edge Capture Mode Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN0_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN0_A ) -> Self { match variant { DECAPEN0_A :: _0 => false , DECAPEN0_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN0`" ] pub type DECAPEN0_R = crate :: R < bool , DECAPEN0_A > ; impl DECAPEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN0_A { match self . bits { false => DECAPEN0_A :: _0 , true => DECAPEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN0_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN0`" ] pub struct DECAPEN0_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN0_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN0_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Captures For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP0_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP0_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP0_A ) -> Self { match variant { DECAP0_A :: _0 => false , DECAP0_A :: _1 => true } } } # [ doc = "Reader of field `DECAP0`" ] pub type DECAP0_R = crate :: R < bool , DECAP0_A > ; impl DECAP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP0_A { match self . bits { false => DECAP0_A :: _0 , true => DECAP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP0_A :: _1 } } # [ doc = "Write proxy for field `DECAP0`" ] pub struct DECAP0_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP0_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP0_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Deadtime Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN0_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN0_A ) -> Self { match variant { DTEN0_A :: _0 => false , DTEN0_A :: _1 => true } } } # [ doc = "Reader of field `DTEN0`" ] pub type DTEN0_R = crate :: R < bool , DTEN0_A > ; impl DTEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN0_A { match self . bits { false => DTEN0_A :: _0 , true => DTEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN0_A :: _1 } } # [ doc = "Write proxy for field `DTEN0`" ] pub struct DTEN0_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN0_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Synchronization Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN0_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN0_A ) -> Self { match variant { SYNCEN0_A :: _0 => false , SYNCEN0_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN0`" ] pub type SYNCEN0_R = crate :: R < bool , SYNCEN0_A > ; impl SYNCEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN0_A { match self . bits { false => SYNCEN0_A :: _0 , true => SYNCEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN0_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN0`" ] pub struct SYNCEN0_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN0_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN0_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN0_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN0_A ) -> Self { match variant { FAULTEN0_A :: _0 => false , FAULTEN0_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN0`" ] pub type FAULTEN0_R = crate :: R < bool , FAULTEN0_A > ; impl FAULTEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN0_A { match self . bits { false => FAULTEN0_A :: _0 , true => FAULTEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN0_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN0`" ] pub struct FAULTEN0_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN0_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN0_A :: _1 ) } # [ 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 = "Combine Channels For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE1_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE1_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE1_A ) -> Self { match variant { COMBINE1_A :: _0 => false , COMBINE1_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE1`" ] pub type COMBINE1_R = crate :: R < bool , COMBINE1_A > ; impl COMBINE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE1_A { match self . bits { false => COMBINE1_A :: _0 , true => COMBINE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE1_A :: _1 } } # [ doc = "Write proxy for field `COMBINE1`" ] pub struct COMBINE1_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE1_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE1_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP1_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP1_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP1_A ) -> Self { match variant { COMP1_A :: _0 => false , COMP1_A :: _1 => true } } } # [ doc = "Reader of field `COMP1`" ] pub type COMP1_R = crate :: R < bool , COMP1_A > ; impl COMP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP1_A { match self . bits { false => COMP1_A :: _0 , true => COMP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP1_A :: _1 } } # [ doc = "Write proxy for field `COMP1`" ] pub struct COMP1_W < 'a > { w : & 'a mut W , } impl < 'a > COMP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP1_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP1_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN1_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN1_A ) -> Self { match variant { DECAPEN1_A :: _0 => false , DECAPEN1_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN1`" ] pub type DECAPEN1_R = crate :: R < bool , DECAPEN1_A > ; impl DECAPEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN1_A { match self . bits { false => DECAPEN1_A :: _0 , true => DECAPEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN1_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN1`" ] pub struct DECAPEN1_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN1_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN1_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Captures For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP1_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP1_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP1_A ) -> Self { match variant { DECAP1_A :: _0 => false , DECAP1_A :: _1 => true } } } # [ doc = "Reader of field `DECAP1`" ] pub type DECAP1_R = crate :: R < bool , DECAP1_A > ; impl DECAP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP1_A { match self . bits { false => DECAP1_A :: _0 , true => DECAP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP1_A :: _1 } } # [ doc = "Write proxy for field `DECAP1`" ] pub struct DECAP1_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP1_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP1_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Deadtime Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN1_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN1_A ) -> Self { match variant { DTEN1_A :: _0 => false , DTEN1_A :: _1 => true } } } # [ doc = "Reader of field `DTEN1`" ] pub type DTEN1_R = crate :: R < bool , DTEN1_A > ; impl DTEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN1_A { match self . bits { false => DTEN1_A :: _0 , true => DTEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN1_A :: _1 } } # [ doc = "Write proxy for field `DTEN1`" ] pub struct DTEN1_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN1_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN1_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Synchronization Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN1_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN1_A ) -> Self { match variant { SYNCEN1_A :: _0 => false , SYNCEN1_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN1`" ] pub type SYNCEN1_R = crate :: R < bool , SYNCEN1_A > ; impl SYNCEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN1_A { match self . bits { false => SYNCEN1_A :: _0 , true => SYNCEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN1_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN1`" ] pub struct SYNCEN1_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN1_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN1_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN1_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN1_A ) -> Self { match variant { FAULTEN1_A :: _0 => false , FAULTEN1_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN1`" ] pub type FAULTEN1_R = crate :: R < bool , FAULTEN1_A > ; impl FAULTEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN1_A { match self . bits { false => FAULTEN1_A :: _0 , true => FAULTEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN1_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN1`" ] pub struct FAULTEN1_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN1_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN1_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Combine Channels For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE2_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE2_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE2_A ) -> Self { match variant { COMBINE2_A :: _0 => false , COMBINE2_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE2`" ] pub type COMBINE2_R = crate :: R < bool , COMBINE2_A > ; impl COMBINE2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE2_A { match self . bits { false => COMBINE2_A :: _0 , true => COMBINE2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE2_A :: _1 } } # [ doc = "Write proxy for field `COMBINE2`" ] pub struct COMBINE2_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE2_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE2_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP2_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP2_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP2_A ) -> Self { match variant { COMP2_A :: _0 => false , COMP2_A :: _1 => true } } } # [ doc = "Reader of field `COMP2`" ] pub type COMP2_R = crate :: R < bool , COMP2_A > ; impl COMP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP2_A { match self . bits { false => COMP2_A :: _0 , true => COMP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP2_A :: _1 } } # [ doc = "Write proxy for field `COMP2`" ] pub struct COMP2_W < 'a > { w : & 'a mut W , } impl < 'a > COMP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP2_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP2_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN2_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN2_A ) -> Self { match variant { DECAPEN2_A :: _0 => false , DECAPEN2_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN2`" ] pub type DECAPEN2_R = crate :: R < bool , DECAPEN2_A > ; impl DECAPEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN2_A { match self . bits { false => DECAPEN2_A :: _0 , true => DECAPEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN2_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN2`" ] pub struct DECAPEN2_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN2_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Captures For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP2_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP2_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP2_A ) -> Self { match variant { DECAP2_A :: _0 => false , DECAP2_A :: _1 => true } } } # [ doc = "Reader of field `DECAP2`" ] pub type DECAP2_R = crate :: R < bool , DECAP2_A > ; impl DECAP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP2_A { match self . bits { false => DECAP2_A :: _0 , true => DECAP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP2_A :: _1 } } # [ doc = "Write proxy for field `DECAP2`" ] pub struct DECAP2_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP2_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP2_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Deadtime Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN2_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN2_A ) -> Self { match variant { DTEN2_A :: _0 => false , DTEN2_A :: _1 => true } } } # [ doc = "Reader of field `DTEN2`" ] pub type DTEN2_R = crate :: R < bool , DTEN2_A > ; impl DTEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN2_A { match self . bits { false => DTEN2_A :: _0 , true => DTEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN2_A :: _1 } } # [ doc = "Write proxy for field `DTEN2`" ] pub struct DTEN2_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN2_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN2_A :: _1 ) } # [ 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 = "Synchronization Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN2_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN2_A ) -> Self { match variant { SYNCEN2_A :: _0 => false , SYNCEN2_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN2`" ] pub type SYNCEN2_R = crate :: R < bool , SYNCEN2_A > ; impl SYNCEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN2_A { match self . bits { false => SYNCEN2_A :: _0 , true => SYNCEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN2_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN2`" ] pub struct SYNCEN2_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN2_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN2_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN2_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN2_A ) -> Self { match variant { FAULTEN2_A :: _0 => false , FAULTEN2_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN2`" ] pub type FAULTEN2_R = crate :: R < bool , FAULTEN2_A > ; impl FAULTEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN2_A { match self . bits { false => FAULTEN2_A :: _0 , true => FAULTEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN2_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN2`" ] pub struct FAULTEN2_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN2_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Combine Channels For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE3_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE3_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE3_A ) -> Self { match variant { COMBINE3_A :: _0 => false , COMBINE3_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE3`" ] pub type COMBINE3_R = crate :: R < bool , COMBINE3_A > ; impl COMBINE3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE3_A { match self . bits { false => COMBINE3_A :: _0 , true => COMBINE3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE3_A :: _1 } } # [ doc = "Write proxy for field `COMBINE3`" ] pub struct COMBINE3_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE3_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE3_A :: _1 ) } # [ 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 = "Complement Of Channel (n) for n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP3_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP3_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP3_A ) -> Self { match variant { COMP3_A :: _0 => false , COMP3_A :: _1 => true } } } # [ doc = "Reader of field `COMP3`" ] pub type COMP3_R = crate :: R < bool , COMP3_A > ; impl COMP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP3_A { match self . bits { false => COMP3_A :: _0 , true => COMP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP3_A :: _1 } } # [ doc = "Write proxy for field `COMP3`" ] pub struct COMP3_W < 'a > { w : & 'a mut W , } impl < 'a > COMP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP3_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP3_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN3_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN3_A ) -> Self { match variant { DECAPEN3_A :: _0 => false , DECAPEN3_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN3`" ] pub type DECAPEN3_R = crate :: R < bool , DECAPEN3_A > ; impl DECAPEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN3_A { match self . bits { false => DECAPEN3_A :: _0 , true => DECAPEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN3_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN3`" ] pub struct DECAPEN3_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN3_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN3_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Captures For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP3_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP3_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP3_A ) -> Self { match variant { DECAP3_A :: _0 => false , DECAP3_A :: _1 => true } } } # [ doc = "Reader of field `DECAP3`" ] pub type DECAP3_R = crate :: R < bool , DECAP3_A > ; impl DECAP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP3_A { match self . bits { false => DECAP3_A :: _0 , true => DECAP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP3_A :: _1 } } # [ doc = "Write proxy for field `DECAP3`" ] pub struct DECAP3_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP3_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP3_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Deadtime Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN3_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN3_A ) -> Self { match variant { DTEN3_A :: _0 => false , DTEN3_A :: _1 => true } } } # [ doc = "Reader of field `DTEN3`" ] pub type DTEN3_R = crate :: R < bool , DTEN3_A > ; impl DTEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN3_A { match self . bits { false => DTEN3_A :: _0 , true => DTEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN3_A :: _1 } } # [ doc = "Write proxy for field `DTEN3`" ] pub struct DTEN3_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN3_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN3_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Synchronization Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN3_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN3_A ) -> Self { match variant { SYNCEN3_A :: _0 => false , SYNCEN3_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN3`" ] pub type SYNCEN3_R = crate :: R < bool , SYNCEN3_A > ; impl SYNCEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN3_A { match self . bits { false => SYNCEN3_A :: _0 , true => SYNCEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN3_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN3`" ] pub struct SYNCEN3_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN3_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN3_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Fault Control Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN3_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN3_A ) -> Self { match variant { FAULTEN3_A :: _0 => false , FAULTEN3_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN3`" ] pub type FAULTEN3_R = crate :: R < bool , FAULTEN3_A > ; impl FAULTEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN3_A { match self . bits { false => FAULTEN3_A :: _0 , true => FAULTEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN3_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN3`" ] pub struct FAULTEN3_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN3_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN3_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Combine Channels For n = 0" ] # [ inline ( always ) ] pub fn combine0 ( & self ) -> COMBINE0_R { COMBINE0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Complement Of Channel (n) For n = 0" ] # [ inline ( always ) ] pub fn comp0 ( & self ) -> COMP0_R { COMP0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Dual Edge Capture Mode Enable For n = 0" ] # [ inline ( always ) ] pub fn decapen0 ( & self ) -> DECAPEN0_R { DECAPEN0_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Dual Edge Capture Mode Captures For n = 0" ] # [ inline ( always ) ] pub fn decap0 ( & self ) -> DECAP0_R { DECAP0_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Deadtime Enable For n = 0" ] # [ inline ( always ) ] pub fn dten0 ( & self ) -> DTEN0_R { DTEN0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Synchronization Enable For n = 0" ] # [ inline ( always ) ] pub fn syncen0 ( & self ) -> SYNCEN0_R { SYNCEN0_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Fault Control Enable For n = 0" ] # [ inline ( always ) ] pub fn faulten0 ( & self ) -> FAULTEN0_R { FAULTEN0_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Combine Channels For n = 2" ] # [ inline ( always ) ] pub fn combine1 ( & self ) -> COMBINE1_R { COMBINE1_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Complement Of Channel (n) For n = 2" ] # [ inline ( always ) ] pub fn comp1 ( & self ) -> COMP1_R { COMP1_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Dual Edge Capture Mode Enable For n = 2" ] # [ inline ( always ) ] pub fn decapen1 ( & self ) -> DECAPEN1_R { DECAPEN1_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Dual Edge Capture Mode Captures For n = 2" ] # [ inline ( always ) ] pub fn decap1 ( & self ) -> DECAP1_R { DECAP1_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Deadtime Enable For n = 2" ] # [ inline ( always ) ] pub fn dten1 ( & self ) -> DTEN1_R { DTEN1_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Synchronization Enable For n = 2" ] # [ inline ( always ) ] pub fn syncen1 ( & self ) -> SYNCEN1_R { SYNCEN1_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Fault Control Enable For n = 2" ] # [ inline ( always ) ] pub fn faulten1 ( & self ) -> FAULTEN1_R { FAULTEN1_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Combine Channels For n = 4" ] # [ inline ( always ) ] pub fn combine2 ( & self ) -> COMBINE2_R { COMBINE2_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Complement Of Channel (n) For n = 4" ] # [ inline ( always ) ] pub fn comp2 ( & self ) -> COMP2_R { COMP2_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Dual Edge Capture Mode Enable For n = 4" ] # [ inline ( always ) ] pub fn decapen2 ( & self ) -> DECAPEN2_R { DECAPEN2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Dual Edge Capture Mode Captures For n = 4" ] # [ inline ( always ) ] pub fn decap2 ( & self ) -> DECAP2_R { DECAP2_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Deadtime Enable For n = 4" ] # [ inline ( always ) ] pub fn dten2 ( & self ) -> DTEN2_R { DTEN2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Synchronization Enable For n = 4" ] # [ inline ( always ) ] pub fn syncen2 ( & self ) -> SYNCEN2_R { SYNCEN2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Fault Control Enable For n = 4" ] # [ inline ( always ) ] pub fn faulten2 ( & self ) -> FAULTEN2_R { FAULTEN2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Combine Channels For n = 6" ] # [ inline ( always ) ] pub fn combine3 ( & self ) -> COMBINE3_R { COMBINE3_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Complement Of Channel (n) for n = 6" ] # [ inline ( always ) ] pub fn comp3 ( & self ) -> COMP3_R { COMP3_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Dual Edge Capture Mode Enable For n = 6" ] # [ inline ( always ) ] pub fn decapen3 ( & self ) -> DECAPEN3_R { DECAPEN3_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Dual Edge Capture Mode Captures For n = 6" ] # [ inline ( always ) ] pub fn decap3 ( & self ) -> DECAP3_R { DECAP3_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Deadtime Enable For n = 6" ] # [ inline ( always ) ] pub fn dten3 ( & self ) -> DTEN3_R { DTEN3_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Synchronization Enable For n = 6" ] # [ inline ( always ) ] pub fn syncen3 ( & self ) -> SYNCEN3_R { SYNCEN3_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Fault Control Enable For n = 6" ] # [ inline ( always ) ] pub fn faulten3 ( & self ) -> FAULTEN3_R { FAULTEN3_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Combine Channels For n = 0" ] # [ inline ( always ) ] pub fn combine0 ( & mut self ) -> COMBINE0_W { COMBINE0_W { w : self } } # [ doc = "Bit 1 - Complement Of Channel (n) For n = 0" ] # [ inline ( always ) ] pub fn comp0 ( & mut self ) -> COMP0_W { COMP0_W { w : self } } # [ doc = "Bit 2 - Dual Edge Capture Mode Enable For n = 0" ] # [ inline ( always ) ] pub fn decapen0 ( & mut self ) -> DECAPEN0_W { DECAPEN0_W { w : self } } # [ doc = "Bit 3 - Dual Edge Capture Mode Captures For n = 0" ] # [ inline ( always ) ] pub fn decap0 ( & mut self ) -> DECAP0_W { DECAP0_W { w : self } } # [ doc = "Bit 4 - Deadtime Enable For n = 0" ] # [ inline ( always ) ] pub fn dten0 ( & mut self ) -> DTEN0_W { DTEN0_W { w : self } } # [ doc = "Bit 5 - Synchronization Enable For n = 0" ] # [ inline ( always ) ] pub fn syncen0 ( & mut self ) -> SYNCEN0_W { SYNCEN0_W { w : self } } # [ doc = "Bit 6 - Fault Control Enable For n = 0" ] # [ inline ( always ) ] pub fn faulten0 ( & mut self ) -> FAULTEN0_W { FAULTEN0_W { w : self } } # [ doc = "Bit 8 - Combine Channels For n = 2" ] # [ inline ( always ) ] pub fn combine1 ( & mut self ) -> COMBINE1_W { COMBINE1_W { w : self } } # [ doc = "Bit 9 - Complement Of Channel (n) For n = 2" ] # [ inline ( always ) ] pub fn comp1 ( & mut self ) -> COMP1_W { COMP1_W { w : self } } # [ doc = "Bit 10 - Dual Edge Capture Mode Enable For n = 2" ] # [ inline ( always ) ] pub fn decapen1 ( & mut self ) -> DECAPEN1_W { DECAPEN1_W { w : self } } # [ doc = "Bit 11 - Dual Edge Capture Mode Captures For n = 2" ] # [ inline ( always ) ] pub fn decap1 ( & mut self ) -> DECAP1_W { DECAP1_W { w : self } } # [ doc = "Bit 12 - Deadtime Enable For n = 2" ] # [ inline ( always ) ] pub fn dten1 ( & mut self ) -> DTEN1_W { DTEN1_W { w : self } } # [ doc = "Bit 13 - Synchronization Enable For n = 2" ] # [ inline ( always ) ] pub fn syncen1 ( & mut self ) -> SYNCEN1_W { SYNCEN1_W { w : self } } # [ doc = "Bit 14 - Fault Control Enable For n = 2" ] # [ inline ( always ) ] pub fn faulten1 ( & mut self ) -> FAULTEN1_W { FAULTEN1_W { w : self } } # [ doc = "Bit 16 - Combine Channels For n = 4" ] # [ inline ( always ) ] pub fn combine2 ( & mut self ) -> COMBINE2_W { COMBINE2_W { w : self } } # [ doc = "Bit 17 - Complement Of Channel (n) For n = 4" ] # [ inline ( always ) ] pub fn comp2 ( & mut self ) -> COMP2_W { COMP2_W { w : self } } # [ doc = "Bit 18 - Dual Edge Capture Mode Enable For n = 4" ] # [ inline ( always ) ] pub fn decapen2 ( & mut self ) -> DECAPEN2_W { DECAPEN2_W { w : self } } # [ doc = "Bit 19 - Dual Edge Capture Mode Captures For n = 4" ] # [ inline ( always ) ] pub fn decap2 ( & mut self ) -> DECAP2_W { DECAP2_W { w : self } } # [ doc = "Bit 20 - Deadtime Enable For n = 4" ] # [ inline ( always ) ] pub fn dten2 ( & mut self ) -> DTEN2_W { DTEN2_W { w : self } } # [ doc = "Bit 21 - Synchronization Enable For n = 4" ] # [ inline ( always ) ] pub fn syncen2 ( & mut self ) -> SYNCEN2_W { SYNCEN2_W { w : self } } # [ doc = "Bit 22 - Fault Control Enable For n = 4" ] # [ inline ( always ) ] pub fn faulten2 ( & mut self ) -> FAULTEN2_W { FAULTEN2_W { w : self } } # [ doc = "Bit 24 - Combine Channels For n = 6" ] # [ inline ( always ) ] pub fn combine3 ( & mut self ) -> COMBINE3_W { COMBINE3_W { w : self } } # [ doc = "Bit 25 - Complement Of Channel (n) for n = 6" ] # [ inline ( always ) ] pub fn comp3 ( & mut self ) -> COMP3_W { COMP3_W { w : self } } # [ doc = "Bit 26 - Dual Edge Capture Mode Enable For n = 6" ] # [ inline ( always ) ] pub fn decapen3 ( & mut self ) -> DECAPEN3_W { DECAPEN3_W { w : self } } # [ doc = "Bit 27 - Dual Edge Capture Mode Captures For n = 6" ] # [ inline ( always ) ] pub fn decap3 ( & mut self ) -> DECAP3_W { DECAP3_W { w : self } } # [ doc = "Bit 28 - Deadtime Enable For n = 6" ] # [ inline ( always ) ] pub fn dten3 ( & mut self ) -> DTEN3_W { DTEN3_W { w : self } } # [ doc = "Bit 29 - Synchronization Enable For n = 6" ] # [ inline ( always ) ] pub fn syncen3 ( & mut self ) -> SYNCEN3_W { SYNCEN3_W { w : self } } # [ doc = "Bit 30 - Fault Control Enable For n = 6" ] # [ inline ( always ) ] pub fn faulten3 ( & mut self ) -> FAULTEN3_W { FAULTEN3_W { w : self } } } } # [ doc = "Deadtime Insertion Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [deadtime](deadtime) module" ] pub type DEADTIME = crate :: Reg < u32 , _DEADTIME > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEADTIME ; # [ doc = "`read()` method returns [deadtime::R](deadtime::R) reader structure" ] impl crate :: Readable for DEADTIME { } # [ doc = "`write(|w| ..)` method takes [deadtime::W](deadtime::W) writer structure" ] impl crate :: Writable for DEADTIME { } # [ doc = "Deadtime Insertion Control" ] pub mod deadtime { # [ doc = "Reader of register DEADTIME" ] pub type R = crate :: R < u32 , super :: DEADTIME > ; # [ doc = "Writer for register DEADTIME" ] pub type W = crate :: W < u32 , super :: DEADTIME > ; # [ doc = "Register DEADTIME `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DEADTIME { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DTVAL`" ] pub type DTVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DTVAL`" ] pub struct DTVAL_W < 'a > { w : & 'a mut W , } impl < 'a > DTVAL_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } # [ doc = "Deadtime Prescaler Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTPS_A { # [ doc = "2: Divide the system clock by 4." ] _10 , # [ doc = "3: Divide the system clock by 16." ] _11 } impl From < DTPS_A > for u8 { # [ inline ( always ) ] fn from ( variant : DTPS_A ) -> Self { match variant { DTPS_A :: _10 => 2 , DTPS_A :: _11 => 3 } } } # [ doc = "Reader of field `DTPS`" ] pub type DTPS_R = crate :: R < u8 , DTPS_A > ; impl DTPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DTPS_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( DTPS_A :: _10 ) , 3 => Val ( DTPS_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DTPS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DTPS_A :: _11 } } # [ doc = "Write proxy for field `DTPS`" ] pub struct DTPS_W < 'a > { w : & 'a mut W , } impl < 'a > DTPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTPS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Divide the system clock by 4." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DTPS_A :: _10 ) } # [ doc = "Divide the system clock by 16." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DTPS_A :: _11 ) } # [ 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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Deadtime Value" ] # [ inline ( always ) ] pub fn dtval ( & self ) -> DTVAL_R { DTVAL_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 6:7 - Deadtime Prescaler Value" ] # [ inline ( always ) ] pub fn dtps ( & self ) -> DTPS_R { DTPS_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Deadtime Value" ] # [ inline ( always ) ] pub fn dtval ( & mut self ) -> DTVAL_W { DTVAL_W { w : self } } # [ doc = "Bits 6:7 - Deadtime Prescaler Value" ] # [ inline ( always ) ] pub fn dtps ( & mut self ) -> DTPS_W { DTPS_W { w : self } } } } # [ doc = "FTM External Trigger\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [exttrig](exttrig) module" ] pub type EXTTRIG = crate :: Reg < u32 , _EXTTRIG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EXTTRIG ; # [ doc = "`read()` method returns [exttrig::R](exttrig::R) reader structure" ] impl crate :: Readable for EXTTRIG { } # [ doc = "`write(|w| ..)` method takes [exttrig::W](exttrig::W) writer structure" ] impl crate :: Writable for EXTTRIG { } # [ doc = "FTM External Trigger" ] pub mod exttrig { # [ doc = "Reader of register EXTTRIG" ] pub type R = crate :: R < u32 , super :: EXTTRIG > ; # [ doc = "Writer for register EXTTRIG" ] pub type W = crate :: W < u32 , super :: EXTTRIG > ; # [ doc = "Register EXTTRIG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EXTTRIG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 2 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH2TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2TRIG_A ) -> Self { match variant { CH2TRIG_A :: _0 => false , CH2TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH2TRIG`" ] pub type CH2TRIG_R = crate :: R < bool , CH2TRIG_A > ; impl CH2TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2TRIG_A { match self . bits { false => CH2TRIG_A :: _0 , true => CH2TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH2TRIG`" ] pub struct CH2TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH2TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2TRIG_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 3 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH3TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3TRIG_A ) -> Self { match variant { CH3TRIG_A :: _0 => false , CH3TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH3TRIG`" ] pub type CH3TRIG_R = crate :: R < bool , CH3TRIG_A > ; impl CH3TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3TRIG_A { match self . bits { false => CH3TRIG_A :: _0 , true => CH3TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH3TRIG`" ] pub struct CH3TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH3TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3TRIG_A :: _1 ) } # [ 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 } } # [ doc = "Channel 4 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH4TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4TRIG_A ) -> Self { match variant { CH4TRIG_A :: _0 => false , CH4TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH4TRIG`" ] pub type CH4TRIG_R = crate :: R < bool , CH4TRIG_A > ; impl CH4TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4TRIG_A { match self . bits { false => CH4TRIG_A :: _0 , true => CH4TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH4TRIG`" ] pub struct CH4TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH4TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4TRIG_A :: _1 ) } # [ 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 = "Channel 5 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH5TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5TRIG_A ) -> Self { match variant { CH5TRIG_A :: _0 => false , CH5TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH5TRIG`" ] pub type CH5TRIG_R = crate :: R < bool , CH5TRIG_A > ; impl CH5TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5TRIG_A { match self . bits { false => CH5TRIG_A :: _0 , true => CH5TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH5TRIG`" ] pub struct CH5TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH5TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5TRIG_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 0 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH0TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0TRIG_A ) -> Self { match variant { CH0TRIG_A :: _0 => false , CH0TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH0TRIG`" ] pub type CH0TRIG_R = crate :: R < bool , CH0TRIG_A > ; impl CH0TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0TRIG_A { match self . bits { false => CH0TRIG_A :: _0 , true => CH0TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH0TRIG`" ] pub struct CH0TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH0TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0TRIG_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 1 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH1TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1TRIG_A ) -> Self { match variant { CH1TRIG_A :: _0 => false , CH1TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH1TRIG`" ] pub type CH1TRIG_R = crate :: R < bool , CH1TRIG_A > ; impl CH1TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1TRIG_A { match self . bits { false => CH1TRIG_A :: _0 , true => CH1TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH1TRIG`" ] pub struct CH1TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH1TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1TRIG_A :: _1 ) } # [ 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 = "Initialization Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INITTRIGEN_A { # [ doc = "0: The generation of initialization trigger is disabled." ] _0 , # [ doc = "1: The generation of initialization trigger is enabled." ] _1 } impl From < INITTRIGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : INITTRIGEN_A ) -> Self { match variant { INITTRIGEN_A :: _0 => false , INITTRIGEN_A :: _1 => true } } } # [ doc = "Reader of field `INITTRIGEN`" ] pub type INITTRIGEN_R = crate :: R < bool , INITTRIGEN_A > ; impl INITTRIGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INITTRIGEN_A { match self . bits { false => INITTRIGEN_A :: _0 , true => INITTRIGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INITTRIGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INITTRIGEN_A :: _1 } } # [ doc = "Write proxy for field `INITTRIGEN`" ] pub struct INITTRIGEN_W < 'a > { w : & 'a mut W , } impl < 'a > INITTRIGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INITTRIGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of initialization trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INITTRIGEN_A :: _0 ) } # [ doc = "The generation of initialization trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INITTRIGEN_A :: _1 ) } # [ 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 = "Channel Trigger Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGF_A { # [ doc = "0: No channel trigger was generated." ] _0 , # [ doc = "1: A channel trigger was generated." ] _1 } impl From < TRIGF_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIGF_A ) -> Self { match variant { TRIGF_A :: _0 => false , TRIGF_A :: _1 => true } } } # [ doc = "Reader of field `TRIGF`" ] pub type TRIGF_R = crate :: R < bool , TRIGF_A > ; impl TRIGF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIGF_A { match self . bits { false => TRIGF_A :: _0 , true => TRIGF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIGF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIGF_A :: _1 } } # [ doc = "Write proxy for field `TRIGF`" ] pub struct TRIGF_W < 'a > { w : & 'a mut W , } impl < 'a > TRIGF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIGF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel trigger was generated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIGF_A :: _0 ) } # [ doc = "A channel trigger was generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIGF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 2 Trigger Enable" ] # [ inline ( always ) ] pub fn ch2trig ( & self ) -> CH2TRIG_R { CH2TRIG_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 3 Trigger Enable" ] # [ inline ( always ) ] pub fn ch3trig ( & self ) -> CH3TRIG_R { CH3TRIG_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 4 Trigger Enable" ] # [ inline ( always ) ] pub fn ch4trig ( & self ) -> CH4TRIG_R { CH4TRIG_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 5 Trigger Enable" ] # [ inline ( always ) ] pub fn ch5trig ( & self ) -> CH5TRIG_R { CH5TRIG_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 0 Trigger Enable" ] # [ inline ( always ) ] pub fn ch0trig ( & self ) -> CH0TRIG_R { CH0TRIG_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 1 Trigger Enable" ] # [ inline ( always ) ] pub fn ch1trig ( & self ) -> CH1TRIG_R { CH1TRIG_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Initialization Trigger Enable" ] # [ inline ( always ) ] pub fn inittrigen ( & self ) -> INITTRIGEN_R { INITTRIGEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Trigger Flag" ] # [ inline ( always ) ] pub fn trigf ( & self ) -> TRIGF_R { TRIGF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 2 Trigger Enable" ] # [ inline ( always ) ] pub fn ch2trig ( & mut self ) -> CH2TRIG_W { CH2TRIG_W { w : self } } # [ doc = "Bit 1 - Channel 3 Trigger Enable" ] # [ inline ( always ) ] pub fn ch3trig ( & mut self ) -> CH3TRIG_W { CH3TRIG_W { w : self } } # [ doc = "Bit 2 - Channel 4 Trigger Enable" ] # [ inline ( always ) ] pub fn ch4trig ( & mut self ) -> CH4TRIG_W { CH4TRIG_W { w : self } } # [ doc = "Bit 3 - Channel 5 Trigger Enable" ] # [ inline ( always ) ] pub fn ch5trig ( & mut self ) -> CH5TRIG_W { CH5TRIG_W { w : self } } # [ doc = "Bit 4 - Channel 0 Trigger Enable" ] # [ inline ( always ) ] pub fn ch0trig ( & mut self ) -> CH0TRIG_W { CH0TRIG_W { w : self } } # [ doc = "Bit 5 - Channel 1 Trigger Enable" ] # [ inline ( always ) ] pub fn ch1trig ( & mut self ) -> CH1TRIG_W { CH1TRIG_W { w : self } } # [ doc = "Bit 6 - Initialization Trigger Enable" ] # [ inline ( always ) ] pub fn inittrigen ( & mut self ) -> INITTRIGEN_W { INITTRIGEN_W { w : self } } # [ doc = "Bit 7 - Channel Trigger Flag" ] # [ inline ( always ) ] pub fn trigf ( & mut self ) -> TRIGF_W { TRIGF_W { w : self } } } } # [ doc = "Channels Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pol](pol) module" ] pub type POL = crate :: Reg < u32 , _POL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POL ; # [ doc = "`read()` method returns [pol::R](pol::R) reader structure" ] impl crate :: Readable for POL { } # [ doc = "`write(|w| ..)` method takes [pol::W](pol::W) writer structure" ] impl crate :: Writable for POL { } # [ doc = "Channels Polarity" ] pub mod pol { # [ doc = "Reader of register POL" ] pub type R = crate :: R < u32 , super :: POL > ; # [ doc = "Writer for register POL" ] pub type W = crate :: W < u32 , super :: POL > ; # [ doc = "Register POL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: POL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL0_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL0_A > for bool { # [ inline ( always ) ] fn from ( variant : POL0_A ) -> Self { match variant { POL0_A :: _0 => false , POL0_A :: _1 => true } } } # [ doc = "Reader of field `POL0`" ] pub type POL0_R = crate :: R < bool , POL0_A > ; impl POL0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL0_A { match self . bits { false => POL0_A :: _0 , true => POL0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL0_A :: _1 } } # [ doc = "Write proxy for field `POL0`" ] pub struct POL0_W < 'a > { w : & 'a mut W , } impl < 'a > POL0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL1_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL1_A > for bool { # [ inline ( always ) ] fn from ( variant : POL1_A ) -> Self { match variant { POL1_A :: _0 => false , POL1_A :: _1 => true } } } # [ doc = "Reader of field `POL1`" ] pub type POL1_R = crate :: R < bool , POL1_A > ; impl POL1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL1_A { match self . bits { false => POL1_A :: _0 , true => POL1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL1_A :: _1 } } # [ doc = "Write proxy for field `POL1`" ] pub struct POL1_W < 'a > { w : & 'a mut W , } impl < 'a > POL1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL2_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL2_A > for bool { # [ inline ( always ) ] fn from ( variant : POL2_A ) -> Self { match variant { POL2_A :: _0 => false , POL2_A :: _1 => true } } } # [ doc = "Reader of field `POL2`" ] pub type POL2_R = crate :: R < bool , POL2_A > ; impl POL2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL2_A { match self . bits { false => POL2_A :: _0 , true => POL2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL2_A :: _1 } } # [ doc = "Write proxy for field `POL2`" ] pub struct POL2_W < 'a > { w : & 'a mut W , } impl < 'a > POL2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL2_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL2_A :: _1 ) } # [ 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 = "Channel 3 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL3_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL3_A > for bool { # [ inline ( always ) ] fn from ( variant : POL3_A ) -> Self { match variant { POL3_A :: _0 => false , POL3_A :: _1 => true } } } # [ doc = "Reader of field `POL3`" ] pub type POL3_R = crate :: R < bool , POL3_A > ; impl POL3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL3_A { match self . bits { false => POL3_A :: _0 , true => POL3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL3_A :: _1 } } # [ doc = "Write proxy for field `POL3`" ] pub struct POL3_W < 'a > { w : & 'a mut W , } impl < 'a > POL3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL3_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL4_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL4_A > for bool { # [ inline ( always ) ] fn from ( variant : POL4_A ) -> Self { match variant { POL4_A :: _0 => false , POL4_A :: _1 => true } } } # [ doc = "Reader of field `POL4`" ] pub type POL4_R = crate :: R < bool , POL4_A > ; impl POL4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL4_A { match self . bits { false => POL4_A :: _0 , true => POL4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL4_A :: _1 } } # [ doc = "Write proxy for field `POL4`" ] pub struct POL4_W < 'a > { w : & 'a mut W , } impl < 'a > POL4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL4_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL5_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL5_A > for bool { # [ inline ( always ) ] fn from ( variant : POL5_A ) -> Self { match variant { POL5_A :: _0 => false , POL5_A :: _1 => true } } } # [ doc = "Reader of field `POL5`" ] pub type POL5_R = crate :: R < bool , POL5_A > ; impl POL5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL5_A { match self . bits { false => POL5_A :: _0 , true => POL5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL5_A :: _1 } } # [ doc = "Write proxy for field `POL5`" ] pub struct POL5_W < 'a > { w : & 'a mut W , } impl < 'a > POL5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL5_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL5_A :: _1 ) } # [ 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 = "Channel 6 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL6_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL6_A > for bool { # [ inline ( always ) ] fn from ( variant : POL6_A ) -> Self { match variant { POL6_A :: _0 => false , POL6_A :: _1 => true } } } # [ doc = "Reader of field `POL6`" ] pub type POL6_R = crate :: R < bool , POL6_A > ; impl POL6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL6_A { match self . bits { false => POL6_A :: _0 , true => POL6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL6_A :: _1 } } # [ doc = "Write proxy for field `POL6`" ] pub struct POL6_W < 'a > { w : & 'a mut W , } impl < 'a > POL6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL6_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL6_A :: _1 ) } # [ 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 = "Channel 7 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL7_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL7_A > for bool { # [ inline ( always ) ] fn from ( variant : POL7_A ) -> Self { match variant { POL7_A :: _0 => false , POL7_A :: _1 => true } } } # [ doc = "Reader of field `POL7`" ] pub type POL7_R = crate :: R < bool , POL7_A > ; impl POL7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL7_A { match self . bits { false => POL7_A :: _0 , true => POL7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL7_A :: _1 } } # [ doc = "Write proxy for field `POL7`" ] pub struct POL7_W < 'a > { w : & 'a mut W , } impl < 'a > POL7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL7_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL7_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & self ) -> POL0_R { POL0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & self ) -> POL1_R { POL1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Polarity" ] # [ inline ( always ) ] pub fn pol2 ( & self ) -> POL2_R { POL2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Polarity" ] # [ inline ( always ) ] pub fn pol3 ( & self ) -> POL3_R { POL3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Polarity" ] # [ inline ( always ) ] pub fn pol4 ( & self ) -> POL4_R { POL4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Polarity" ] # [ inline ( always ) ] pub fn pol5 ( & self ) -> POL5_R { POL5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Polarity" ] # [ inline ( always ) ] pub fn pol6 ( & self ) -> POL6_R { POL6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Polarity" ] # [ inline ( always ) ] pub fn pol7 ( & self ) -> POL7_R { POL7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & mut self ) -> POL0_W { POL0_W { w : self } } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & mut self ) -> POL1_W { POL1_W { w : self } } # [ doc = "Bit 2 - Channel 2 Polarity" ] # [ inline ( always ) ] pub fn pol2 ( & mut self ) -> POL2_W { POL2_W { w : self } } # [ doc = "Bit 3 - Channel 3 Polarity" ] # [ inline ( always ) ] pub fn pol3 ( & mut self ) -> POL3_W { POL3_W { w : self } } # [ doc = "Bit 4 - Channel 4 Polarity" ] # [ inline ( always ) ] pub fn pol4 ( & mut self ) -> POL4_W { POL4_W { w : self } } # [ doc = "Bit 5 - Channel 5 Polarity" ] # [ inline ( always ) ] pub fn pol5 ( & mut self ) -> POL5_W { POL5_W { w : self } } # [ doc = "Bit 6 - Channel 6 Polarity" ] # [ inline ( always ) ] pub fn pol6 ( & mut self ) -> POL6_W { POL6_W { w : self } } # [ doc = "Bit 7 - Channel 7 Polarity" ] # [ inline ( always ) ] pub fn pol7 ( & mut self ) -> POL7_W { POL7_W { w : self } } } } # [ doc = "Fault Mode Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fms](fms) module" ] pub type FMS = crate :: Reg < u32 , _FMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FMS ; # [ doc = "`read()` method returns [fms::R](fms::R) reader structure" ] impl crate :: Readable for FMS { } # [ doc = "`write(|w| ..)` method takes [fms::W](fms::W) writer structure" ] impl crate :: Writable for FMS { } # [ doc = "Fault Mode Status" ] pub mod fms { # [ doc = "Reader of register FMS" ] pub type R = crate :: R < u32 , super :: FMS > ; # [ doc = "Writer for register FMS" ] pub type W = crate :: W < u32 , super :: FMS > ; # [ doc = "Register FMS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FMS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Detection Flag 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF0_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF0_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF0_A ) -> Self { match variant { FAULTF0_A :: _0 => false , FAULTF0_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF0`" ] pub type FAULTF0_R = crate :: R < bool , FAULTF0_A > ; impl FAULTF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF0_A { match self . bits { false => FAULTF0_A :: _0 , true => FAULTF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF0_A :: _1 } } # [ doc = "Write proxy for field `FAULTF0`" ] pub struct FAULTF0_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF0_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Detection Flag 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF1_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF1_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF1_A ) -> Self { match variant { FAULTF1_A :: _0 => false , FAULTF1_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF1`" ] pub type FAULTF1_R = crate :: R < bool , FAULTF1_A > ; impl FAULTF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF1_A { match self . bits { false => FAULTF1_A :: _0 , true => FAULTF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF1_A :: _1 } } # [ doc = "Write proxy for field `FAULTF1`" ] pub struct FAULTF1_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF1_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF1_A :: _1 ) } # [ 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 } } # [ doc = "Fault Detection Flag 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF2_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF2_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF2_A ) -> Self { match variant { FAULTF2_A :: _0 => false , FAULTF2_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF2`" ] pub type FAULTF2_R = crate :: R < bool , FAULTF2_A > ; impl FAULTF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF2_A { match self . bits { false => FAULTF2_A :: _0 , true => FAULTF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF2_A :: _1 } } # [ doc = "Write proxy for field `FAULTF2`" ] pub struct FAULTF2_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF2_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF2_A :: _1 ) } # [ 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 = "Fault Detection Flag 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF3_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF3_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF3_A ) -> Self { match variant { FAULTF3_A :: _0 => false , FAULTF3_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF3`" ] pub type FAULTF3_R = crate :: R < bool , FAULTF3_A > ; impl FAULTF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF3_A { match self . bits { false => FAULTF3_A :: _0 , true => FAULTF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF3_A :: _1 } } # [ doc = "Write proxy for field `FAULTF3`" ] pub struct FAULTF3_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF3_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Fault Inputs\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTIN_A { # [ doc = "0: The logic OR of the enabled fault inputs is 0." ] _0 , # [ doc = "1: The logic OR of the enabled fault inputs is 1." ] _1 } impl From < FAULTIN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTIN_A ) -> Self { match variant { FAULTIN_A :: _0 => false , FAULTIN_A :: _1 => true } } } # [ doc = "Reader of field `FAULTIN`" ] pub type FAULTIN_R = crate :: R < bool , FAULTIN_A > ; impl FAULTIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTIN_A { match self . bits { false => FAULTIN_A :: _0 , true => FAULTIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTIN_A :: _1 } } # [ doc = "Write Protection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPEN_A { # [ doc = "0: Write protection is disabled. Write protected bits can be written." ] _0 , # [ doc = "1: Write protection is enabled. Write protected bits cannot be written." ] _1 } impl From < WPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WPEN_A ) -> Self { match variant { WPEN_A :: _0 => false , WPEN_A :: _1 => true } } } # [ doc = "Reader of field `WPEN`" ] pub type WPEN_R = crate :: R < bool , WPEN_A > ; impl WPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPEN_A { match self . bits { false => WPEN_A :: _0 , true => WPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPEN_A :: _1 } } # [ doc = "Write proxy for field `WPEN`" ] pub struct WPEN_W < 'a > { w : & 'a mut W , } impl < 'a > WPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write protection is disabled. Write protected bits can be written." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPEN_A :: _0 ) } # [ doc = "Write protection is enabled. Write protected bits cannot be written." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPEN_A :: _1 ) } # [ 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 = "Fault Detection Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF_A { # [ doc = "0: No fault condition was detected." ] _0 , # [ doc = "1: A fault condition was detected." ] _1 } impl From < FAULTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF_A ) -> Self { match variant { FAULTF_A :: _0 => false , FAULTF_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF`" ] pub type FAULTF_R = crate :: R < bool , FAULTF_A > ; impl FAULTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF_A { match self . bits { false => FAULTF_A :: _0 , true => FAULTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF_A :: _1 } } # [ doc = "Write proxy for field `FAULTF`" ] pub struct FAULTF_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF_A :: _0 ) } # [ doc = "A fault condition was detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Fault Detection Flag 0" ] # [ inline ( always ) ] pub fn faultf0 ( & self ) -> FAULTF0_R { FAULTF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Detection Flag 1" ] # [ inline ( always ) ] pub fn faultf1 ( & self ) -> FAULTF1_R { FAULTF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Detection Flag 2" ] # [ inline ( always ) ] pub fn faultf2 ( & self ) -> FAULTF2_R { FAULTF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Detection Flag 3" ] # [ inline ( always ) ] pub fn faultf3 ( & self ) -> FAULTF3_R { FAULTF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Fault Inputs" ] # [ inline ( always ) ] pub fn faultin ( & self ) -> FAULTIN_R { FAULTIN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Write Protection Enable" ] # [ inline ( always ) ] pub fn wpen ( & self ) -> WPEN_R { WPEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fault Detection Flag" ] # [ inline ( always ) ] pub fn faultf ( & self ) -> FAULTF_R { FAULTF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Fault Detection Flag 0" ] # [ inline ( always ) ] pub fn faultf0 ( & mut self ) -> FAULTF0_W { FAULTF0_W { w : self } } # [ doc = "Bit 1 - Fault Detection Flag 1" ] # [ inline ( always ) ] pub fn faultf1 ( & mut self ) -> FAULTF1_W { FAULTF1_W { w : self } } # [ doc = "Bit 2 - Fault Detection Flag 2" ] # [ inline ( always ) ] pub fn faultf2 ( & mut self ) -> FAULTF2_W { FAULTF2_W { w : self } } # [ doc = "Bit 3 - Fault Detection Flag 3" ] # [ inline ( always ) ] pub fn faultf3 ( & mut self ) -> FAULTF3_W { FAULTF3_W { w : self } } # [ doc = "Bit 6 - Write Protection Enable" ] # [ inline ( always ) ] pub fn wpen ( & mut self ) -> WPEN_W { WPEN_W { w : self } } # [ doc = "Bit 7 - Fault Detection Flag" ] # [ inline ( always ) ] pub fn faultf ( & mut self ) -> FAULTF_W { FAULTF_W { w : self } } } } # [ doc = "Input Capture Filter Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filter](filter) module" ] pub type FILTER = crate :: Reg < u32 , _FILTER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILTER ; # [ doc = "`read()` method returns [filter::R](filter::R) reader structure" ] impl crate :: Readable for FILTER { } # [ doc = "`write(|w| ..)` method takes [filter::W](filter::W) writer structure" ] impl crate :: Writable for FILTER { } # [ doc = "Input Capture Filter Control" ] pub mod filter { # [ doc = "Reader of register FILTER" ] pub type R = crate :: R < u32 , super :: FILTER > ; # [ doc = "Writer for register FILTER" ] pub type W = crate :: W < u32 , super :: FILTER > ; # [ doc = "Register FILTER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILTER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CH0FVAL`" ] pub type CH0FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH0FVAL`" ] pub struct CH0FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0FVAL_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `CH1FVAL`" ] pub type CH1FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH1FVAL`" ] pub struct CH1FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1FVAL_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } # [ doc = "Reader of field `CH2FVAL`" ] pub type CH2FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH2FVAL`" ] pub struct CH2FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH2FVAL_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `CH3FVAL`" ] pub type CH3FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH3FVAL`" ] pub struct CH3FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH3FVAL_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 & ! ( 0x0f << 12 ) ) | ( ( ( value as u32 ) & 0x0f ) << 12 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Channel 0 Input Filter" ] # [ inline ( always ) ] pub fn ch0fval ( & self ) -> CH0FVAL_R { CH0FVAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Channel 1 Input Filter" ] # [ inline ( always ) ] pub fn ch1fval ( & self ) -> CH1FVAL_R { CH1FVAL_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Channel 2 Input Filter" ] # [ inline ( always ) ] pub fn ch2fval ( & self ) -> CH2FVAL_R { CH2FVAL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - Channel 3 Input Filter" ] # [ inline ( always ) ] pub fn ch3fval ( & self ) -> CH3FVAL_R { CH3FVAL_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Channel 0 Input Filter" ] # [ inline ( always ) ] pub fn ch0fval ( & mut self ) -> CH0FVAL_W { CH0FVAL_W { w : self } } # [ doc = "Bits 4:7 - Channel 1 Input Filter" ] # [ inline ( always ) ] pub fn ch1fval ( & mut self ) -> CH1FVAL_W { CH1FVAL_W { w : self } } # [ doc = "Bits 8:11 - Channel 2 Input Filter" ] # [ inline ( always ) ] pub fn ch2fval ( & mut self ) -> CH2FVAL_W { CH2FVAL_W { w : self } } # [ doc = "Bits 12:15 - Channel 3 Input Filter" ] # [ inline ( always ) ] pub fn ch3fval ( & mut self ) -> CH3FVAL_W { CH3FVAL_W { w : self } } } } # [ doc = "Fault Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fltctrl](fltctrl) module" ] pub type FLTCTRL = crate :: Reg < u32 , _FLTCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLTCTRL ; # [ doc = "`read()` method returns [fltctrl::R](fltctrl::R) reader structure" ] impl crate :: Readable for FLTCTRL { } # [ doc = "`write(|w| ..)` method takes [fltctrl::W](fltctrl::W) writer structure" ] impl crate :: Writable for FLTCTRL { } # [ doc = "Fault Control" ] pub mod fltctrl { # [ doc = "Reader of register FLTCTRL" ] pub type R = crate :: R < u32 , super :: FLTCTRL > ; # [ doc = "Writer for register FLTCTRL" ] pub type W = crate :: W < u32 , super :: FLTCTRL > ; # [ doc = "Register FLTCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLTCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Input 0 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT0EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT0EN_A ) -> Self { match variant { FAULT0EN_A :: _0 => false , FAULT0EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT0EN`" ] pub type FAULT0EN_R = crate :: R < bool , FAULT0EN_A > ; impl FAULT0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT0EN_A { match self . bits { false => FAULT0EN_A :: _0 , true => FAULT0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT0EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT0EN`" ] pub struct FAULT0EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT0EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT0EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Input 1 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT1EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT1EN_A ) -> Self { match variant { FAULT1EN_A :: _0 => false , FAULT1EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT1EN`" ] pub type FAULT1EN_R = crate :: R < bool , FAULT1EN_A > ; impl FAULT1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT1EN_A { match self . bits { false => FAULT1EN_A :: _0 , true => FAULT1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT1EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT1EN`" ] pub struct FAULT1EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT1EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT1EN_A :: _1 ) } # [ 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 } } # [ doc = "Fault Input 2 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT2EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT2EN_A ) -> Self { match variant { FAULT2EN_A :: _0 => false , FAULT2EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT2EN`" ] pub type FAULT2EN_R = crate :: R < bool , FAULT2EN_A > ; impl FAULT2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT2EN_A { match self . bits { false => FAULT2EN_A :: _0 , true => FAULT2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT2EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT2EN`" ] pub struct FAULT2EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT2EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT2EN_A :: _1 ) } # [ 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 = "Fault Input 3 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT3EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT3EN_A ) -> Self { match variant { FAULT3EN_A :: _0 => false , FAULT3EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT3EN`" ] pub type FAULT3EN_R = crate :: R < bool , FAULT3EN_A > ; impl FAULT3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT3EN_A { match self . bits { false => FAULT3EN_A :: _0 , true => FAULT3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT3EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT3EN`" ] pub struct FAULT3EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT3EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT3EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Fault Input 0 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR0EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR0EN_A ) -> Self { match variant { FFLTR0EN_A :: _0 => false , FFLTR0EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR0EN`" ] pub type FFLTR0EN_R = crate :: R < bool , FFLTR0EN_A > ; impl FFLTR0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR0EN_A { match self . bits { false => FFLTR0EN_A :: _0 , true => FFLTR0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR0EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR0EN`" ] pub struct FFLTR0EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR0EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR0EN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Fault Input 1 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR1EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR1EN_A ) -> Self { match variant { FFLTR1EN_A :: _0 => false , FFLTR1EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR1EN`" ] pub type FFLTR1EN_R = crate :: R < bool , FFLTR1EN_A > ; impl FFLTR1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR1EN_A { match self . bits { false => FFLTR1EN_A :: _0 , true => FFLTR1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR1EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR1EN`" ] pub struct FFLTR1EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR1EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR1EN_A :: _1 ) } # [ 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 = "Fault Input 2 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR2EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR2EN_A ) -> Self { match variant { FFLTR2EN_A :: _0 => false , FFLTR2EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR2EN`" ] pub type FFLTR2EN_R = crate :: R < bool , FFLTR2EN_A > ; impl FFLTR2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR2EN_A { match self . bits { false => FFLTR2EN_A :: _0 , true => FFLTR2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR2EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR2EN`" ] pub struct FFLTR2EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR2EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR2EN_A :: _1 ) } # [ 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 = "Fault Input 3 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR3EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR3EN_A ) -> Self { match variant { FFLTR3EN_A :: _0 => false , FFLTR3EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR3EN`" ] pub type FFLTR3EN_R = crate :: R < bool , FFLTR3EN_A > ; impl FFLTR3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR3EN_A { match self . bits { false => FFLTR3EN_A :: _0 , true => FFLTR3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR3EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR3EN`" ] pub struct FFLTR3EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR3EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR3EN_A :: _1 ) } # [ 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 = "Reader of field `FFVAL`" ] pub type FFVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FFVAL`" ] pub struct FFVAL_W < 'a > { w : & 'a mut W , } impl < 'a > FFVAL_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } impl R { # [ doc = "Bit 0 - Fault Input 0 Enable" ] # [ inline ( always ) ] pub fn fault0en ( & self ) -> FAULT0EN_R { FAULT0EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Input 1 Enable" ] # [ inline ( always ) ] pub fn fault1en ( & self ) -> FAULT1EN_R { FAULT1EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Input 2 Enable" ] # [ inline ( always ) ] pub fn fault2en ( & self ) -> FAULT2EN_R { FAULT2EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Input 3 Enable" ] # [ inline ( always ) ] pub fn fault3en ( & self ) -> FAULT3EN_R { FAULT3EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Fault Input 0 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr0en ( & self ) -> FFLTR0EN_R { FFLTR0EN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Fault Input 1 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr1en ( & self ) -> FFLTR1EN_R { FFLTR1EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Fault Input 2 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr2en ( & self ) -> FFLTR2EN_R { FFLTR2EN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fault Input 3 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr3en ( & self ) -> FFLTR3EN_R { FFLTR3EN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - Fault Input Filter" ] # [ inline ( always ) ] pub fn ffval ( & self ) -> FFVAL_R { FFVAL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Fault Input 0 Enable" ] # [ inline ( always ) ] pub fn fault0en ( & mut self ) -> FAULT0EN_W { FAULT0EN_W { w : self } } # [ doc = "Bit 1 - Fault Input 1 Enable" ] # [ inline ( always ) ] pub fn fault1en ( & mut self ) -> FAULT1EN_W { FAULT1EN_W { w : self } } # [ doc = "Bit 2 - Fault Input 2 Enable" ] # [ inline ( always ) ] pub fn fault2en ( & mut self ) -> FAULT2EN_W { FAULT2EN_W { w : self } } # [ doc = "Bit 3 - Fault Input 3 Enable" ] # [ inline ( always ) ] pub fn fault3en ( & mut self ) -> FAULT3EN_W { FAULT3EN_W { w : self } } # [ doc = "Bit 4 - Fault Input 0 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr0en ( & mut self ) -> FFLTR0EN_W { FFLTR0EN_W { w : self } } # [ doc = "Bit 5 - Fault Input 1 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr1en ( & mut self ) -> FFLTR1EN_W { FFLTR1EN_W { w : self } } # [ doc = "Bit 6 - Fault Input 2 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr2en ( & mut self ) -> FFLTR2EN_W { FFLTR2EN_W { w : self } } # [ doc = "Bit 7 - Fault Input 3 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr3en ( & mut self ) -> FFLTR3EN_W { FFLTR3EN_W { w : self } } # [ doc = "Bits 8:11 - Fault Input Filter" ] # [ inline ( always ) ] pub fn ffval ( & mut self ) -> FFVAL_W { FFVAL_W { w : self } } } } # [ doc = "Quadrature Decoder Control And Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [qdctrl](qdctrl) module" ] pub type QDCTRL = crate :: Reg < u32 , _QDCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _QDCTRL ; # [ doc = "`read()` method returns [qdctrl::R](qdctrl::R) reader structure" ] impl crate :: Readable for QDCTRL { } # [ doc = "`write(|w| ..)` method takes [qdctrl::W](qdctrl::W) writer structure" ] impl crate :: Writable for QDCTRL { } # [ doc = "Quadrature Decoder Control And Status" ] pub mod qdctrl { # [ doc = "Reader of register QDCTRL" ] pub type R = crate :: R < u32 , super :: QDCTRL > ; # [ doc = "Writer for register QDCTRL" ] pub type W = crate :: W < u32 , super :: QDCTRL > ; # [ doc = "Register QDCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: QDCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Quadrature Decoder Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADEN_A { # [ doc = "0: Quadrature Decoder mode is disabled." ] _0 , # [ doc = "1: Quadrature Decoder mode is enabled." ] _1 } impl From < QUADEN_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADEN_A ) -> Self { match variant { QUADEN_A :: _0 => false , QUADEN_A :: _1 => true } } } # [ doc = "Reader of field `QUADEN`" ] pub type QUADEN_R = crate :: R < bool , QUADEN_A > ; impl QUADEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADEN_A { match self . bits { false => QUADEN_A :: _0 , true => QUADEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADEN_A :: _1 } } # [ doc = "Write proxy for field `QUADEN`" ] pub struct QUADEN_W < 'a > { w : & 'a mut W , } impl < 'a > QUADEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Quadrature Decoder mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _0 ) } # [ doc = "Quadrature Decoder mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Timer Overflow Direction In Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOFDIR_A { # [ doc = "0: TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes from its minimum value (CNTIN register) to its maximum value (MOD register)." ] _0 , # [ doc = "1: TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from its maximum value (MOD register) to its minimum value (CNTIN register)." ] _1 } impl From < TOFDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TOFDIR_A ) -> Self { match variant { TOFDIR_A :: _0 => false , TOFDIR_A :: _1 => true } } } # [ doc = "Reader of field `TOFDIR`" ] pub type TOFDIR_R = crate :: R < bool , TOFDIR_A > ; impl TOFDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOFDIR_A { match self . bits { false => TOFDIR_A :: _0 , true => TOFDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOFDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOFDIR_A :: _1 } } # [ doc = "FTM Counter Direction In Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADIR_A { # [ doc = "0: Counting direction is decreasing (FTM counter decrement)." ] _0 , # [ doc = "1: Counting direction is increasing (FTM counter increment)." ] _1 } impl From < QUADIR_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADIR_A ) -> Self { match variant { QUADIR_A :: _0 => false , QUADIR_A :: _1 => true } } } # [ doc = "Reader of field `QUADIR`" ] pub type QUADIR_R = crate :: R < bool , QUADIR_A > ; impl QUADIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADIR_A { match self . bits { false => QUADIR_A :: _0 , true => QUADIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADIR_A :: _1 } } # [ doc = "Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADMODE_A { # [ doc = "0: Phase A and phase B encoding mode." ] _0 , # [ doc = "1: Count and direction encoding mode." ] _1 } impl From < QUADMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADMODE_A ) -> Self { match variant { QUADMODE_A :: _0 => false , QUADMODE_A :: _1 => true } } } # [ doc = "Reader of field `QUADMODE`" ] pub type QUADMODE_R = crate :: R < bool , QUADMODE_A > ; impl QUADMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADMODE_A { match self . bits { false => QUADMODE_A :: _0 , true => QUADMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADMODE_A :: _1 } } # [ doc = "Write proxy for field `QUADMODE`" ] pub struct QUADMODE_W < 'a > { w : & 'a mut W , } impl < 'a > QUADMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase A and phase B encoding mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _0 ) } # [ doc = "Count and direction encoding mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Phase B Input Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHBPOL_A { # [ doc = "0: Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal." ] _0 , # [ doc = "1: Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal." ] _1 } impl From < PHBPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : PHBPOL_A ) -> Self { match variant { PHBPOL_A :: _0 => false , PHBPOL_A :: _1 => true } } } # [ doc = "Reader of field `PHBPOL`" ] pub type PHBPOL_R = crate :: R < bool , PHBPOL_A > ; impl PHBPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHBPOL_A { match self . bits { false => PHBPOL_A :: _0 , true => PHBPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHBPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHBPOL_A :: _1 } } # [ doc = "Write proxy for field `PHBPOL`" ] pub struct PHBPOL_W < 'a > { w : & 'a mut W , } impl < 'a > PHBPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHBPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHBPOL_A :: _0 ) } # [ doc = "Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHBPOL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Phase A Input Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHAPOL_A { # [ doc = "0: Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal." ] _0 , # [ doc = "1: Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal." ] _1 } impl From < PHAPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : PHAPOL_A ) -> Self { match variant { PHAPOL_A :: _0 => false , PHAPOL_A :: _1 => true } } } # [ doc = "Reader of field `PHAPOL`" ] pub type PHAPOL_R = crate :: R < bool , PHAPOL_A > ; impl PHAPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHAPOL_A { match self . bits { false => PHAPOL_A :: _0 , true => PHAPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHAPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHAPOL_A :: _1 } } # [ doc = "Write proxy for field `PHAPOL`" ] pub struct PHAPOL_W < 'a > { w : & 'a mut W , } impl < 'a > PHAPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHAPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHAPOL_A :: _0 ) } # [ doc = "Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHAPOL_A :: _1 ) } # [ 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 = "Phase B Input Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHBFLTREN_A { # [ doc = "0: Phase B input filter is disabled." ] _0 , # [ doc = "1: Phase B input filter is enabled." ] _1 } impl From < PHBFLTREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PHBFLTREN_A ) -> Self { match variant { PHBFLTREN_A :: _0 => false , PHBFLTREN_A :: _1 => true } } } # [ doc = "Reader of field `PHBFLTREN`" ] pub type PHBFLTREN_R = crate :: R < bool , PHBFLTREN_A > ; impl PHBFLTREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHBFLTREN_A { match self . bits { false => PHBFLTREN_A :: _0 , true => PHBFLTREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHBFLTREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHBFLTREN_A :: _1 } } # [ doc = "Write proxy for field `PHBFLTREN`" ] pub struct PHBFLTREN_W < 'a > { w : & 'a mut W , } impl < 'a > PHBFLTREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHBFLTREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase B input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHBFLTREN_A :: _0 ) } # [ doc = "Phase B input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHBFLTREN_A :: _1 ) } # [ 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 = "Phase A Input Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHAFLTREN_A { # [ doc = "0: Phase A input filter is disabled." ] _0 , # [ doc = "1: Phase A input filter is enabled." ] _1 } impl From < PHAFLTREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PHAFLTREN_A ) -> Self { match variant { PHAFLTREN_A :: _0 => false , PHAFLTREN_A :: _1 => true } } } # [ doc = "Reader of field `PHAFLTREN`" ] pub type PHAFLTREN_R = crate :: R < bool , PHAFLTREN_A > ; impl PHAFLTREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHAFLTREN_A { match self . bits { false => PHAFLTREN_A :: _0 , true => PHAFLTREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHAFLTREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHAFLTREN_A :: _1 } } # [ doc = "Write proxy for field `PHAFLTREN`" ] pub struct PHAFLTREN_W < 'a > { w : & 'a mut W , } impl < 'a > PHAFLTREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHAFLTREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase A input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHAFLTREN_A :: _0 ) } # [ doc = "Phase A input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHAFLTREN_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Quadrature Decoder Mode Enable" ] # [ inline ( always ) ] pub fn quaden ( & self ) -> QUADEN_R { QUADEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Timer Overflow Direction In Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn tofdir ( & self ) -> TOFDIR_R { TOFDIR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM Counter Direction In Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadir ( & self ) -> QUADIR_R { QUADIR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & self ) -> QUADMODE_R { QUADMODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Phase B Input Polarity" ] # [ inline ( always ) ] pub fn phbpol ( & self ) -> PHBPOL_R { PHBPOL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Phase A Input Polarity" ] # [ inline ( always ) ] pub fn phapol ( & self ) -> PHAPOL_R { PHAPOL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Phase B Input Filter Enable" ] # [ inline ( always ) ] pub fn phbfltren ( & self ) -> PHBFLTREN_R { PHBFLTREN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Phase A Input Filter Enable" ] # [ inline ( always ) ] pub fn phafltren ( & self ) -> PHAFLTREN_R { PHAFLTREN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Quadrature Decoder Mode Enable" ] # [ inline ( always ) ] pub fn quaden ( & mut self ) -> QUADEN_W { QUADEN_W { w : self } } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & mut self ) -> QUADMODE_W { QUADMODE_W { w : self } } # [ doc = "Bit 4 - Phase B Input Polarity" ] # [ inline ( always ) ] pub fn phbpol ( & mut self ) -> PHBPOL_W { PHBPOL_W { w : self } } # [ doc = "Bit 5 - Phase A Input Polarity" ] # [ inline ( always ) ] pub fn phapol ( & mut self ) -> PHAPOL_W { PHAPOL_W { w : self } } # [ doc = "Bit 6 - Phase B Input Filter Enable" ] # [ inline ( always ) ] pub fn phbfltren ( & mut self ) -> PHBFLTREN_W { PHBFLTREN_W { w : self } } # [ doc = "Bit 7 - Phase A Input Filter Enable" ] # [ inline ( always ) ] pub fn phafltren ( & mut self ) -> PHAFLTREN_W { PHAFLTREN_W { w : self } } } } # [ doc = "Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [conf](conf) module" ] pub type CONF = crate :: Reg < u32 , _CONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONF ; # [ doc = "`read()` method returns [conf::R](conf::R) reader structure" ] impl crate :: Readable for CONF { } # [ doc = "`write(|w| ..)` method takes [conf::W](conf::W) writer structure" ] impl crate :: Writable for CONF { } # [ doc = "Configuration" ] pub mod conf { # [ doc = "Reader of register CONF" ] pub type R = crate :: R < u32 , super :: CONF > ; # [ doc = "Writer for register CONF" ] pub type W = crate :: W < u32 , super :: CONF > ; # [ doc = "Register CONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `NUMTOF`" ] pub type NUMTOF_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `NUMTOF`" ] pub struct NUMTOF_W < 'a > { w : & 'a mut W , } impl < 'a > NUMTOF_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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } # [ doc = "Reader of field `BDMMODE`" ] pub type BDMMODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BDMMODE`" ] pub struct BDMMODE_W < 'a > { w : & 'a mut W , } impl < 'a > BDMMODE_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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Global Time Base Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEEN_A { # [ doc = "0: Use of an external global time base is disabled." ] _0 , # [ doc = "1: Use of an external global time base is enabled." ] _1 } impl From < GTBEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEEN_A ) -> Self { match variant { GTBEEN_A :: _0 => false , GTBEEN_A :: _1 => true } } } # [ doc = "Reader of field `GTBEEN`" ] pub type GTBEEN_R = crate :: R < bool , GTBEEN_A > ; impl GTBEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEEN_A { match self . bits { false => GTBEEN_A :: _0 , true => GTBEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEEN_A :: _1 } } # [ doc = "Write proxy for field `GTBEEN`" ] pub struct GTBEEN_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use of an external global time base is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _0 ) } # [ doc = "Use of an external global time base is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Global Time Base Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEOUT_A { # [ doc = "0: A global time base signal generation is disabled." ] _0 , # [ doc = "1: A global time base signal generation is enabled." ] _1 } impl From < GTBEOUT_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEOUT_A ) -> Self { match variant { GTBEOUT_A :: _0 => false , GTBEOUT_A :: _1 => true } } } # [ doc = "Reader of field `GTBEOUT`" ] pub type GTBEOUT_R = crate :: R < bool , GTBEOUT_A > ; impl GTBEOUT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEOUT_A { match self . bits { false => GTBEOUT_A :: _0 , true => GTBEOUT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEOUT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEOUT_A :: _1 } } # [ doc = "Write proxy for field `GTBEOUT`" ] pub struct GTBEOUT_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEOUT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEOUT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A global time base signal generation is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEOUT_A :: _0 ) } # [ doc = "A global time base signal generation is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEOUT_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - TOF Frequency" ] # [ inline ( always ) ] pub fn numtof ( & self ) -> NUMTOF_R { NUMTOF_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bits 6:7 - BDM Mode" ] # [ inline ( always ) ] pub fn bdmmode ( & self ) -> BDMMODE_R { BDMMODE_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bit 9 - Global Time Base Enable" ] # [ inline ( always ) ] pub fn gtbeen ( & self ) -> GTBEEN_R { GTBEEN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Global Time Base Output" ] # [ inline ( always ) ] pub fn gtbeout ( & self ) -> GTBEOUT_R { GTBEOUT_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - TOF Frequency" ] # [ inline ( always ) ] pub fn numtof ( & mut self ) -> NUMTOF_W { NUMTOF_W { w : self } } # [ doc = "Bits 6:7 - BDM Mode" ] # [ inline ( always ) ] pub fn bdmmode ( & mut self ) -> BDMMODE_W { BDMMODE_W { w : self } } # [ doc = "Bit 9 - Global Time Base Enable" ] # [ inline ( always ) ] pub fn gtbeen ( & mut self ) -> GTBEEN_W { GTBEEN_W { w : self } } # [ doc = "Bit 10 - Global Time Base Output" ] # [ inline ( always ) ] pub fn gtbeout ( & mut self ) -> GTBEOUT_W { GTBEOUT_W { w : self } } } } # [ doc = "FTM Fault Input Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fltpol](fltpol) module" ] pub type FLTPOL = crate :: Reg < u32 , _FLTPOL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLTPOL ; # [ doc = "`read()` method returns [fltpol::R](fltpol::R) reader structure" ] impl crate :: Readable for FLTPOL { } # [ doc = "`write(|w| ..)` method takes [fltpol::W](fltpol::W) writer structure" ] impl crate :: Writable for FLTPOL { } # [ doc = "FTM Fault Input Polarity" ] pub mod fltpol { # [ doc = "Reader of register FLTPOL" ] pub type R = crate :: R < u32 , super :: FLTPOL > ; # [ doc = "Writer for register FLTPOL" ] pub type W = crate :: W < u32 , super :: FLTPOL > ; # [ doc = "Register FLTPOL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLTPOL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Input 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT0POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT0POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT0POL_A ) -> Self { match variant { FLT0POL_A :: _0 => false , FLT0POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT0POL`" ] pub type FLT0POL_R = crate :: R < bool , FLT0POL_A > ; impl FLT0POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT0POL_A { match self . bits { false => FLT0POL_A :: _0 , true => FLT0POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT0POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT0POL_A :: _1 } } # [ doc = "Write proxy for field `FLT0POL`" ] pub struct FLT0POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT0POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT0POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT0POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT0POL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Input 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT1POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT1POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT1POL_A ) -> Self { match variant { FLT1POL_A :: _0 => false , FLT1POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT1POL`" ] pub type FLT1POL_R = crate :: R < bool , FLT1POL_A > ; impl FLT1POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT1POL_A { match self . bits { false => FLT1POL_A :: _0 , true => FLT1POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT1POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT1POL_A :: _1 } } # [ doc = "Write proxy for field `FLT1POL`" ] pub struct FLT1POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT1POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT1POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT1POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT1POL_A :: _1 ) } # [ 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 } } # [ doc = "Fault Input 2 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT2POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT2POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT2POL_A ) -> Self { match variant { FLT2POL_A :: _0 => false , FLT2POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT2POL`" ] pub type FLT2POL_R = crate :: R < bool , FLT2POL_A > ; impl FLT2POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT2POL_A { match self . bits { false => FLT2POL_A :: _0 , true => FLT2POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT2POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT2POL_A :: _1 } } # [ doc = "Write proxy for field `FLT2POL`" ] pub struct FLT2POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT2POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT2POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT2POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT2POL_A :: _1 ) } # [ 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 = "Fault Input 3 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT3POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT3POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT3POL_A ) -> Self { match variant { FLT3POL_A :: _0 => false , FLT3POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT3POL`" ] pub type FLT3POL_R = crate :: R < bool , FLT3POL_A > ; impl FLT3POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT3POL_A { match self . bits { false => FLT3POL_A :: _0 , true => FLT3POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT3POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT3POL_A :: _1 } } # [ doc = "Write proxy for field `FLT3POL`" ] pub struct FLT3POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT3POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT3POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT3POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT3POL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Fault Input 0 Polarity" ] # [ inline ( always ) ] pub fn flt0pol ( & self ) -> FLT0POL_R { FLT0POL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Input 1 Polarity" ] # [ inline ( always ) ] pub fn flt1pol ( & self ) -> FLT1POL_R { FLT1POL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Input 2 Polarity" ] # [ inline ( always ) ] pub fn flt2pol ( & self ) -> FLT2POL_R { FLT2POL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Input 3 Polarity" ] # [ inline ( always ) ] pub fn flt3pol ( & self ) -> FLT3POL_R { FLT3POL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Fault Input 0 Polarity" ] # [ inline ( always ) ] pub fn flt0pol ( & mut self ) -> FLT0POL_W { FLT0POL_W { w : self } } # [ doc = "Bit 1 - Fault Input 1 Polarity" ] # [ inline ( always ) ] pub fn flt1pol ( & mut self ) -> FLT1POL_W { FLT1POL_W { w : self } } # [ doc = "Bit 2 - Fault Input 2 Polarity" ] # [ inline ( always ) ] pub fn flt2pol ( & mut self ) -> FLT2POL_W { FLT2POL_W { w : self } } # [ doc = "Bit 3 - Fault Input 3 Polarity" ] # [ inline ( always ) ] pub fn flt3pol ( & mut self ) -> FLT3POL_W { FLT3POL_W { w : self } } } } # [ doc = "Synchronization Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [synconf](synconf) module" ] pub type SYNCONF = crate :: Reg < u32 , _SYNCONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYNCONF ; # [ doc = "`read()` method returns [synconf::R](synconf::R) reader structure" ] impl crate :: Readable for SYNCONF { } # [ doc = "`write(|w| ..)` method takes [synconf::W](synconf::W) writer structure" ] impl crate :: Writable for SYNCONF { } # [ doc = "Synchronization Configuration" ] pub mod synconf { # [ doc = "Reader of register SYNCONF" ] pub type R = crate :: R < u32 , super :: SYNCONF > ; # [ doc = "Writer for register SYNCONF" ] pub type W = crate :: W < u32 , super :: SYNCONF > ; # [ doc = "Register SYNCONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SYNCONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Hardware Trigger Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWTRIGMODE_A { # [ doc = "0: FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] _0 , # [ doc = "1: FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] _1 } impl From < HWTRIGMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : HWTRIGMODE_A ) -> Self { match variant { HWTRIGMODE_A :: _0 => false , HWTRIGMODE_A :: _1 => true } } } # [ doc = "Reader of field `HWTRIGMODE`" ] pub type HWTRIGMODE_R = crate :: R < bool , HWTRIGMODE_A > ; impl HWTRIGMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWTRIGMODE_A { match self . bits { false => HWTRIGMODE_A :: _0 , true => HWTRIGMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWTRIGMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWTRIGMODE_A :: _1 } } # [ doc = "Write proxy for field `HWTRIGMODE`" ] pub struct HWTRIGMODE_W < 'a > { w : & 'a mut W , } impl < 'a > HWTRIGMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWTRIGMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWTRIGMODE_A :: _0 ) } # [ doc = "FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWTRIGMODE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "CNTIN Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTINC_A { # [ doc = "0: CNTIN register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: CNTIN register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < CNTINC_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTINC_A ) -> Self { match variant { CNTINC_A :: _0 => false , CNTINC_A :: _1 => true } } } # [ doc = "Reader of field `CNTINC`" ] pub type CNTINC_R = crate :: R < bool , CNTINC_A > ; impl CNTINC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTINC_A { match self . bits { false => CNTINC_A :: _0 , true => CNTINC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTINC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTINC_A :: _1 } } # [ doc = "Write proxy for field `CNTINC`" ] pub struct CNTINC_W < 'a > { w : & 'a mut W , } impl < 'a > CNTINC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTINC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CNTIN register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTINC_A :: _0 ) } # [ doc = "CNTIN register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTINC_A :: _1 ) } # [ 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 = "INVCTRL Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INVC_A { # [ doc = "0: INVCTRL register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: INVCTRL register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < INVC_A > for bool { # [ inline ( always ) ] fn from ( variant : INVC_A ) -> Self { match variant { INVC_A :: _0 => false , INVC_A :: _1 => true } } } # [ doc = "Reader of field `INVC`" ] pub type INVC_R = crate :: R < bool , INVC_A > ; impl INVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INVC_A { match self . bits { false => INVC_A :: _0 , true => INVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INVC_A :: _1 } } # [ doc = "Write proxy for field `INVC`" ] pub struct INVC_W < 'a > { w : & 'a mut W , } impl < 'a > INVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "INVCTRL register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INVC_A :: _0 ) } # [ doc = "INVCTRL register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INVC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "SWOCTRL Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWOC_A { # [ doc = "0: SWOCTRL register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: SWOCTRL register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < SWOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWOC_A ) -> Self { match variant { SWOC_A :: _0 => false , SWOC_A :: _1 => true } } } # [ doc = "Reader of field `SWOC`" ] pub type SWOC_R = crate :: R < bool , SWOC_A > ; impl SWOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWOC_A { match self . bits { false => SWOC_A :: _0 , true => SWOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWOC_A :: _1 } } # [ doc = "Write proxy for field `SWOC`" ] pub struct SWOC_W < 'a > { w : & 'a mut W , } impl < 'a > SWOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SWOCTRL register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWOC_A :: _0 ) } # [ doc = "SWOCTRL register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWOC_A :: _1 ) } # [ 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 = "Synchronization Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCMODE_A { # [ doc = "0: Legacy PWM synchronization is selected." ] _0 , # [ doc = "1: Enhanced PWM synchronization is selected." ] _1 } impl From < SYNCMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCMODE_A ) -> Self { match variant { SYNCMODE_A :: _0 => false , SYNCMODE_A :: _1 => true } } } # [ doc = "Reader of field `SYNCMODE`" ] pub type SYNCMODE_R = crate :: R < bool , SYNCMODE_A > ; impl SYNCMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCMODE_A { match self . bits { false => SYNCMODE_A :: _0 , true => SYNCMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCMODE_A :: _1 } } # [ doc = "Write proxy for field `SYNCMODE`" ] pub struct SYNCMODE_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Legacy PWM synchronization is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCMODE_A :: _0 ) } # [ doc = "Enhanced PWM synchronization is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCMODE_A :: _1 ) } # [ 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 = "FTM counter synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWRSTCNT_A { # [ doc = "0: The software trigger does not activate the FTM counter synchronization." ] _0 , # [ doc = "1: The software trigger activates the FTM counter synchronization." ] _1 } impl From < SWRSTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : SWRSTCNT_A ) -> Self { match variant { SWRSTCNT_A :: _0 => false , SWRSTCNT_A :: _1 => true } } } # [ doc = "Reader of field `SWRSTCNT`" ] pub type SWRSTCNT_R = crate :: R < bool , SWRSTCNT_A > ; impl SWRSTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWRSTCNT_A { match self . bits { false => SWRSTCNT_A :: _0 , true => SWRSTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWRSTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWRSTCNT_A :: _1 } } # [ doc = "Write proxy for field `SWRSTCNT`" ] pub struct SWRSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > SWRSTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWRSTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWRSTCNT_A :: _0 ) } # [ doc = "The software trigger activates the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWRSTCNT_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "MOD, CNTIN, and CV registers synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWWRBUF_A { # [ doc = "0: The software trigger does not activate MOD, CNTIN, and CV registers synchronization." ] _0 , # [ doc = "1: The software trigger activates MOD, CNTIN, and CV registers synchronization." ] _1 } impl From < SWWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : SWWRBUF_A ) -> Self { match variant { SWWRBUF_A :: _0 => false , SWWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `SWWRBUF`" ] pub type SWWRBUF_R = crate :: R < bool , SWWRBUF_A > ; impl SWWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWWRBUF_A { match self . bits { false => SWWRBUF_A :: _0 , true => SWWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWWRBUF_A :: _1 } } # [ doc = "Write proxy for field `SWWRBUF`" ] pub struct SWWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > SWWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWWRBUF_A :: _0 ) } # [ doc = "The software trigger activates MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWWRBUF_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Output mask synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWOM_A { # [ doc = "0: The software trigger does not activate the OUTMASK register synchronization." ] _0 , # [ doc = "1: The software trigger activates the OUTMASK register synchronization." ] _1 } impl From < SWOM_A > for bool { # [ inline ( always ) ] fn from ( variant : SWOM_A ) -> Self { match variant { SWOM_A :: _0 => false , SWOM_A :: _1 => true } } } # [ doc = "Reader of field `SWOM`" ] pub type SWOM_R = crate :: R < bool , SWOM_A > ; impl SWOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWOM_A { match self . bits { false => SWOM_A :: _0 , true => SWOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWOM_A :: _1 } } # [ doc = "Write proxy for field `SWOM`" ] pub struct SWOM_W < 'a > { w : & 'a mut W , } impl < 'a > SWOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWOM_A :: _0 ) } # [ doc = "The software trigger activates the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWOM_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Inverting control synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWINVC_A { # [ doc = "0: The software trigger does not activate the INVCTRL register synchronization." ] _0 , # [ doc = "1: The software trigger activates the INVCTRL register synchronization." ] _1 } impl From < SWINVC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWINVC_A ) -> Self { match variant { SWINVC_A :: _0 => false , SWINVC_A :: _1 => true } } } # [ doc = "Reader of field `SWINVC`" ] pub type SWINVC_R = crate :: R < bool , SWINVC_A > ; impl SWINVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWINVC_A { match self . bits { false => SWINVC_A :: _0 , true => SWINVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWINVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWINVC_A :: _1 } } # [ doc = "Write proxy for field `SWINVC`" ] pub struct SWINVC_W < 'a > { w : & 'a mut W , } impl < 'a > SWINVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWINVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWINVC_A :: _0 ) } # [ doc = "The software trigger activates the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWINVC_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Software output control synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSOC_A { # [ doc = "0: The software trigger does not activate the SWOCTRL register synchronization." ] _0 , # [ doc = "1: The software trigger activates the SWOCTRL register synchronization." ] _1 } impl From < SWSOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSOC_A ) -> Self { match variant { SWSOC_A :: _0 => false , SWSOC_A :: _1 => true } } } # [ doc = "Reader of field `SWSOC`" ] pub type SWSOC_R = crate :: R < bool , SWSOC_A > ; impl SWSOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSOC_A { match self . bits { false => SWSOC_A :: _0 , true => SWSOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSOC_A :: _1 } } # [ doc = "Write proxy for field `SWSOC`" ] pub struct SWSOC_W < 'a > { w : & 'a mut W , } impl < 'a > SWSOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSOC_A :: _0 ) } # [ doc = "The software trigger activates the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSOC_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "FTM counter synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWRSTCNT_A { # [ doc = "0: A hardware trigger does not activate the FTM counter synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the FTM counter synchronization." ] _1 } impl From < HWRSTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : HWRSTCNT_A ) -> Self { match variant { HWRSTCNT_A :: _0 => false , HWRSTCNT_A :: _1 => true } } } # [ doc = "Reader of field `HWRSTCNT`" ] pub type HWRSTCNT_R = crate :: R < bool , HWRSTCNT_A > ; impl HWRSTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWRSTCNT_A { match self . bits { false => HWRSTCNT_A :: _0 , true => HWRSTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWRSTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWRSTCNT_A :: _1 } } # [ doc = "Write proxy for field `HWRSTCNT`" ] pub struct HWRSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > HWRSTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWRSTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWRSTCNT_A :: _0 ) } # [ doc = "A hardware trigger activates the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWRSTCNT_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWWRBUF_A { # [ doc = "0: A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization." ] _0 , # [ doc = "1: A hardware trigger activates MOD, CNTIN, and CV registers synchronization." ] _1 } impl From < HWWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : HWWRBUF_A ) -> Self { match variant { HWWRBUF_A :: _0 => false , HWWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `HWWRBUF`" ] pub type HWWRBUF_R = crate :: R < bool , HWWRBUF_A > ; impl HWWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWWRBUF_A { match self . bits { false => HWWRBUF_A :: _0 , true => HWWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWWRBUF_A :: _1 } } # [ doc = "Write proxy for field `HWWRBUF`" ] pub struct HWWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > HWWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWWRBUF_A :: _0 ) } # [ doc = "A hardware trigger activates MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWWRBUF_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Output mask synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWOM_A { # [ doc = "0: A hardware trigger does not activate the OUTMASK register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the OUTMASK register synchronization." ] _1 } impl From < HWOM_A > for bool { # [ inline ( always ) ] fn from ( variant : HWOM_A ) -> Self { match variant { HWOM_A :: _0 => false , HWOM_A :: _1 => true } } } # [ doc = "Reader of field `HWOM`" ] pub type HWOM_R = crate :: R < bool , HWOM_A > ; impl HWOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWOM_A { match self . bits { false => HWOM_A :: _0 , true => HWOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWOM_A :: _1 } } # [ doc = "Write proxy for field `HWOM`" ] pub struct HWOM_W < 'a > { w : & 'a mut W , } impl < 'a > HWOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWOM_A :: _0 ) } # [ doc = "A hardware trigger activates the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWOM_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Inverting control synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWINVC_A { # [ doc = "0: A hardware trigger does not activate the INVCTRL register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the INVCTRL register synchronization." ] _1 } impl From < HWINVC_A > for bool { # [ inline ( always ) ] fn from ( variant : HWINVC_A ) -> Self { match variant { HWINVC_A :: _0 => false , HWINVC_A :: _1 => true } } } # [ doc = "Reader of field `HWINVC`" ] pub type HWINVC_R = crate :: R < bool , HWINVC_A > ; impl HWINVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWINVC_A { match self . bits { false => HWINVC_A :: _0 , true => HWINVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWINVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWINVC_A :: _1 } } # [ doc = "Write proxy for field `HWINVC`" ] pub struct HWINVC_W < 'a > { w : & 'a mut W , } impl < 'a > HWINVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWINVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWINVC_A :: _0 ) } # [ doc = "A hardware trigger activates the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWINVC_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Software output control synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWSOC_A { # [ doc = "0: A hardware trigger does not activate the SWOCTRL register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the SWOCTRL register synchronization." ] _1 } impl From < HWSOC_A > for bool { # [ inline ( always ) ] fn from ( variant : HWSOC_A ) -> Self { match variant { HWSOC_A :: _0 => false , HWSOC_A :: _1 => true } } } # [ doc = "Reader of field `HWSOC`" ] pub type HWSOC_R = crate :: R < bool , HWSOC_A > ; impl HWSOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWSOC_A { match self . bits { false => HWSOC_A :: _0 , true => HWSOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWSOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWSOC_A :: _1 } } # [ doc = "Write proxy for field `HWSOC`" ] pub struct HWSOC_W < 'a > { w : & 'a mut W , } impl < 'a > HWSOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWSOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWSOC_A :: _0 ) } # [ doc = "A hardware trigger activates the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWSOC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Hardware Trigger Mode" ] # [ inline ( always ) ] pub fn hwtrigmode ( & self ) -> HWTRIGMODE_R { HWTRIGMODE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - CNTIN Register Synchronization" ] # [ inline ( always ) ] pub fn cntinc ( & self ) -> CNTINC_R { CNTINC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - INVCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn invc ( & self ) -> INVC_R { INVC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - SWOCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn swoc ( & self ) -> SWOC_R { SWOC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Synchronization Mode" ] # [ inline ( always ) ] pub fn syncmode ( & self ) -> SYNCMODE_R { SYNCMODE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - FTM counter synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swrstcnt ( & self ) -> SWRSTCNT_R { SWRSTCNT_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - MOD, CNTIN, and CV registers synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swwrbuf ( & self ) -> SWWRBUF_R { SWWRBUF_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Output mask synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swom ( & self ) -> SWOM_R { SWOM_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Inverting control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swinvc ( & self ) -> SWINVC_R { SWINVC_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Software output control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swsoc ( & self ) -> SWSOC_R { SWSOC_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - FTM counter synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwrstcnt ( & self ) -> HWRSTCNT_R { HWRSTCNT_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwwrbuf ( & self ) -> HWWRBUF_R { HWWRBUF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Output mask synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwom ( & self ) -> HWOM_R { HWOM_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Inverting control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwinvc ( & self ) -> HWINVC_R { HWINVC_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Software output control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwsoc ( & self ) -> HWSOC_R { HWSOC_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Hardware Trigger Mode" ] # [ inline ( always ) ] pub fn hwtrigmode ( & mut self ) -> HWTRIGMODE_W { HWTRIGMODE_W { w : self } } # [ doc = "Bit 2 - CNTIN Register Synchronization" ] # [ inline ( always ) ] pub fn cntinc ( & mut self ) -> CNTINC_W { CNTINC_W { w : self } } # [ doc = "Bit 4 - INVCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn invc ( & mut self ) -> INVC_W { INVC_W { w : self } } # [ doc = "Bit 5 - SWOCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn swoc ( & mut self ) -> SWOC_W { SWOC_W { w : self } } # [ doc = "Bit 7 - Synchronization Mode" ] # [ inline ( always ) ] pub fn syncmode ( & mut self ) -> SYNCMODE_W { SYNCMODE_W { w : self } } # [ doc = "Bit 8 - FTM counter synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swrstcnt ( & mut self ) -> SWRSTCNT_W { SWRSTCNT_W { w : self } } # [ doc = "Bit 9 - MOD, CNTIN, and CV registers synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swwrbuf ( & mut self ) -> SWWRBUF_W { SWWRBUF_W { w : self } } # [ doc = "Bit 10 - Output mask synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swom ( & mut self ) -> SWOM_W { SWOM_W { w : self } } # [ doc = "Bit 11 - Inverting control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swinvc ( & mut self ) -> SWINVC_W { SWINVC_W { w : self } } # [ doc = "Bit 12 - Software output control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swsoc ( & mut self ) -> SWSOC_W { SWSOC_W { w : self } } # [ doc = "Bit 16 - FTM counter synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwrstcnt ( & mut self ) -> HWRSTCNT_W { HWRSTCNT_W { w : self } } # [ doc = "Bit 17 - MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwwrbuf ( & mut self ) -> HWWRBUF_W { HWWRBUF_W { w : self } } # [ doc = "Bit 18 - Output mask synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwom ( & mut self ) -> HWOM_W { HWOM_W { w : self } } # [ doc = "Bit 19 - Inverting control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwinvc ( & mut self ) -> HWINVC_W { HWINVC_W { w : self } } # [ doc = "Bit 20 - Software output control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwsoc ( & mut self ) -> HWSOC_W { HWSOC_W { w : self } } } } # [ doc = "FTM Inverting Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [invctrl](invctrl) module" ] pub type INVCTRL = crate :: Reg < u32 , _INVCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _INVCTRL ; # [ doc = "`read()` method returns [invctrl::R](invctrl::R) reader structure" ] impl crate :: Readable for INVCTRL { } # [ doc = "`write(|w| ..)` method takes [invctrl::W](invctrl::W) writer structure" ] impl crate :: Writable for INVCTRL { } # [ doc = "FTM Inverting Control" ] pub mod invctrl { # [ doc = "Reader of register INVCTRL" ] pub type R = crate :: R < u32 , super :: INVCTRL > ; # [ doc = "Writer for register INVCTRL" ] pub type W = crate :: W < u32 , super :: INVCTRL > ; # [ doc = "Register INVCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: INVCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pair Channels 0 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV0EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV0EN_A ) -> Self { match variant { INV0EN_A :: _0 => false , INV0EN_A :: _1 => true } } } # [ doc = "Reader of field `INV0EN`" ] pub type INV0EN_R = crate :: R < bool , INV0EN_A > ; impl INV0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV0EN_A { match self . bits { false => INV0EN_A :: _0 , true => INV0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV0EN_A :: _1 } } # [ doc = "Write proxy for field `INV0EN`" ] pub struct INV0EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV0EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV0EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pair Channels 1 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV1EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV1EN_A ) -> Self { match variant { INV1EN_A :: _0 => false , INV1EN_A :: _1 => true } } } # [ doc = "Reader of field `INV1EN`" ] pub type INV1EN_R = crate :: R < bool , INV1EN_A > ; impl INV1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV1EN_A { match self . bits { false => INV1EN_A :: _0 , true => INV1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV1EN_A :: _1 } } # [ doc = "Write proxy for field `INV1EN`" ] pub struct INV1EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV1EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV1EN_A :: _1 ) } # [ 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 } } # [ doc = "Pair Channels 2 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV2EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV2EN_A ) -> Self { match variant { INV2EN_A :: _0 => false , INV2EN_A :: _1 => true } } } # [ doc = "Reader of field `INV2EN`" ] pub type INV2EN_R = crate :: R < bool , INV2EN_A > ; impl INV2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV2EN_A { match self . bits { false => INV2EN_A :: _0 , true => INV2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV2EN_A :: _1 } } # [ doc = "Write proxy for field `INV2EN`" ] pub struct INV2EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV2EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV2EN_A :: _1 ) } # [ 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 = "Pair Channels 3 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV3EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV3EN_A ) -> Self { match variant { INV3EN_A :: _0 => false , INV3EN_A :: _1 => true } } } # [ doc = "Reader of field `INV3EN`" ] pub type INV3EN_R = crate :: R < bool , INV3EN_A > ; impl INV3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV3EN_A { match self . bits { false => INV3EN_A :: _0 , true => INV3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV3EN_A :: _1 } } # [ doc = "Write proxy for field `INV3EN`" ] pub struct INV3EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV3EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV3EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Pair Channels 0 Inverting Enable" ] # [ inline ( always ) ] pub fn inv0en ( & self ) -> INV0EN_R { INV0EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pair Channels 1 Inverting Enable" ] # [ inline ( always ) ] pub fn inv1en ( & self ) -> INV1EN_R { INV1EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Pair Channels 2 Inverting Enable" ] # [ inline ( always ) ] pub fn inv2en ( & self ) -> INV2EN_R { INV2EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Pair Channels 3 Inverting Enable" ] # [ inline ( always ) ] pub fn inv3en ( & self ) -> INV3EN_R { INV3EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pair Channels 0 Inverting Enable" ] # [ inline ( always ) ] pub fn inv0en ( & mut self ) -> INV0EN_W { INV0EN_W { w : self } } # [ doc = "Bit 1 - Pair Channels 1 Inverting Enable" ] # [ inline ( always ) ] pub fn inv1en ( & mut self ) -> INV1EN_W { INV1EN_W { w : self } } # [ doc = "Bit 2 - Pair Channels 2 Inverting Enable" ] # [ inline ( always ) ] pub fn inv2en ( & mut self ) -> INV2EN_W { INV2EN_W { w : self } } # [ doc = "Bit 3 - Pair Channels 3 Inverting Enable" ] # [ inline ( always ) ] pub fn inv3en ( & mut self ) -> INV3EN_W { INV3EN_W { w : self } } } } # [ doc = "FTM Software Output Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swoctrl](swoctrl) module" ] pub type SWOCTRL = crate :: Reg < u32 , _SWOCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SWOCTRL ; # [ doc = "`read()` method returns [swoctrl::R](swoctrl::R) reader structure" ] impl crate :: Readable for SWOCTRL { } # [ doc = "`write(|w| ..)` method takes [swoctrl::W](swoctrl::W) writer structure" ] impl crate :: Writable for SWOCTRL { } # [ doc = "FTM Software Output Control" ] pub mod swoctrl { # [ doc = "Reader of register SWOCTRL" ] pub type R = crate :: R < u32 , super :: SWOCTRL > ; # [ doc = "Writer for register SWOCTRL" ] pub type W = crate :: W < u32 , super :: SWOCTRL > ; # [ doc = "Register SWOCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SWOCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH0OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OC_A ) -> Self { match variant { CH0OC_A :: _0 => false , CH0OC_A :: _1 => true } } } # [ doc = "Reader of field `CH0OC`" ] pub type CH0OC_R = crate :: R < bool , CH0OC_A > ; impl CH0OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OC_A { match self . bits { false => CH0OC_A :: _0 , true => CH0OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OC_A :: _1 } } # [ doc = "Write proxy for field `CH0OC`" ] pub struct CH0OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OC_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH1OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OC_A ) -> Self { match variant { CH1OC_A :: _0 => false , CH1OC_A :: _1 => true } } } # [ doc = "Reader of field `CH1OC`" ] pub type CH1OC_R = crate :: R < bool , CH1OC_A > ; impl CH1OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OC_A { match self . bits { false => CH1OC_A :: _0 , true => CH1OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OC_A :: _1 } } # [ doc = "Write proxy for field `CH1OC`" ] pub struct CH1OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OC_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH2OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OC_A ) -> Self { match variant { CH2OC_A :: _0 => false , CH2OC_A :: _1 => true } } } # [ doc = "Reader of field `CH2OC`" ] pub type CH2OC_R = crate :: R < bool , CH2OC_A > ; impl CH2OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OC_A { match self . bits { false => CH2OC_A :: _0 , true => CH2OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OC_A :: _1 } } # [ doc = "Write proxy for field `CH2OC`" ] pub struct CH2OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OC_A :: _1 ) } # [ 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 = "Channel 3 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH3OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OC_A ) -> Self { match variant { CH3OC_A :: _0 => false , CH3OC_A :: _1 => true } } } # [ doc = "Reader of field `CH3OC`" ] pub type CH3OC_R = crate :: R < bool , CH3OC_A > ; impl CH3OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OC_A { match self . bits { false => CH3OC_A :: _0 , true => CH3OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OC_A :: _1 } } # [ doc = "Write proxy for field `CH3OC`" ] pub struct CH3OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH4OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OC_A ) -> Self { match variant { CH4OC_A :: _0 => false , CH4OC_A :: _1 => true } } } # [ doc = "Reader of field `CH4OC`" ] pub type CH4OC_R = crate :: R < bool , CH4OC_A > ; impl CH4OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OC_A { match self . bits { false => CH4OC_A :: _0 , true => CH4OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OC_A :: _1 } } # [ doc = "Write proxy for field `CH4OC`" ] pub struct CH4OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH5OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OC_A ) -> Self { match variant { CH5OC_A :: _0 => false , CH5OC_A :: _1 => true } } } # [ doc = "Reader of field `CH5OC`" ] pub type CH5OC_R = crate :: R < bool , CH5OC_A > ; impl CH5OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OC_A { match self . bits { false => CH5OC_A :: _0 , true => CH5OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OC_A :: _1 } } # [ doc = "Write proxy for field `CH5OC`" ] pub struct CH5OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OC_A :: _1 ) } # [ 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 = "Channel 6 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH6OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OC_A ) -> Self { match variant { CH6OC_A :: _0 => false , CH6OC_A :: _1 => true } } } # [ doc = "Reader of field `CH6OC`" ] pub type CH6OC_R = crate :: R < bool , CH6OC_A > ; impl CH6OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OC_A { match self . bits { false => CH6OC_A :: _0 , true => CH6OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OC_A :: _1 } } # [ doc = "Write proxy for field `CH6OC`" ] pub struct CH6OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OC_A :: _1 ) } # [ 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 = "Channel 7 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH7OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OC_A ) -> Self { match variant { CH7OC_A :: _0 => false , CH7OC_A :: _1 => true } } } # [ doc = "Reader of field `CH7OC`" ] pub type CH7OC_R = crate :: R < bool , CH7OC_A > ; impl CH7OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OC_A { match self . bits { false => CH7OC_A :: _0 , true => CH7OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OC_A :: _1 } } # [ doc = "Write proxy for field `CH7OC`" ] pub struct CH7OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OC_A :: _1 ) } # [ 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 = "Channel 0 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH0OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OCV_A ) -> Self { match variant { CH0OCV_A :: _0 => false , CH0OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH0OCV`" ] pub type CH0OCV_R = crate :: R < bool , CH0OCV_A > ; impl CH0OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OCV_A { match self . bits { false => CH0OCV_A :: _0 , true => CH0OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OCV_A :: _1 } } # [ doc = "Write proxy for field `CH0OCV`" ] pub struct CH0OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OCV_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Channel 1 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH1OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OCV_A ) -> Self { match variant { CH1OCV_A :: _0 => false , CH1OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH1OCV`" ] pub type CH1OCV_R = crate :: R < bool , CH1OCV_A > ; impl CH1OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OCV_A { match self . bits { false => CH1OCV_A :: _0 , true => CH1OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OCV_A :: _1 } } # [ doc = "Write proxy for field `CH1OCV`" ] pub struct CH1OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OCV_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Channel 2 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH2OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OCV_A ) -> Self { match variant { CH2OCV_A :: _0 => false , CH2OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH2OCV`" ] pub type CH2OCV_R = crate :: R < bool , CH2OCV_A > ; impl CH2OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OCV_A { match self . bits { false => CH2OCV_A :: _0 , true => CH2OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OCV_A :: _1 } } # [ doc = "Write proxy for field `CH2OCV`" ] pub struct CH2OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OCV_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Channel 3 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH3OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OCV_A ) -> Self { match variant { CH3OCV_A :: _0 => false , CH3OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH3OCV`" ] pub type CH3OCV_R = crate :: R < bool , CH3OCV_A > ; impl CH3OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OCV_A { match self . bits { false => CH3OCV_A :: _0 , true => CH3OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OCV_A :: _1 } } # [ doc = "Write proxy for field `CH3OCV`" ] pub struct CH3OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OCV_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Channel 4 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH4OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OCV_A ) -> Self { match variant { CH4OCV_A :: _0 => false , CH4OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH4OCV`" ] pub type CH4OCV_R = crate :: R < bool , CH4OCV_A > ; impl CH4OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OCV_A { match self . bits { false => CH4OCV_A :: _0 , true => CH4OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OCV_A :: _1 } } # [ doc = "Write proxy for field `CH4OCV`" ] pub struct CH4OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OCV_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Channel 5 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH5OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OCV_A ) -> Self { match variant { CH5OCV_A :: _0 => false , CH5OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH5OCV`" ] pub type CH5OCV_R = crate :: R < bool , CH5OCV_A > ; impl CH5OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OCV_A { match self . bits { false => CH5OCV_A :: _0 , true => CH5OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OCV_A :: _1 } } # [ doc = "Write proxy for field `CH5OCV`" ] pub struct CH5OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OCV_A :: _1 ) } # [ 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 = "Channel 6 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH6OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OCV_A ) -> Self { match variant { CH6OCV_A :: _0 => false , CH6OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH6OCV`" ] pub type CH6OCV_R = crate :: R < bool , CH6OCV_A > ; impl CH6OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OCV_A { match self . bits { false => CH6OCV_A :: _0 , true => CH6OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OCV_A :: _1 } } # [ doc = "Write proxy for field `CH6OCV`" ] pub struct CH6OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OCV_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Channel 7 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH7OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OCV_A ) -> Self { match variant { CH7OCV_A :: _0 => false , CH7OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH7OCV`" ] pub type CH7OCV_R = crate :: R < bool , CH7OCV_A > ; impl CH7OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OCV_A { match self . bits { false => CH7OCV_A :: _0 , true => CH7OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OCV_A :: _1 } } # [ doc = "Write proxy for field `CH7OCV`" ] pub struct CH7OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OCV_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch0oc ( & self ) -> CH0OC_R { CH0OC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch1oc ( & self ) -> CH1OC_R { CH1OC_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch2oc ( & self ) -> CH2OC_R { CH2OC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch3oc ( & self ) -> CH3OC_R { CH3OC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch4oc ( & self ) -> CH4OC_R { CH4OC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch5oc ( & self ) -> CH5OC_R { CH5OC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch6oc ( & self ) -> CH6OC_R { CH6OC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch7oc ( & self ) -> CH7OC_R { CH7OC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Channel 0 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch0ocv ( & self ) -> CH0OCV_R { CH0OCV_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Channel 1 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch1ocv ( & self ) -> CH1OCV_R { CH1OCV_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Channel 2 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch2ocv ( & self ) -> CH2OCV_R { CH2OCV_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Channel 3 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch3ocv ( & self ) -> CH3OCV_R { CH3OCV_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Channel 4 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch4ocv ( & self ) -> CH4OCV_R { CH4OCV_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Channel 5 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch5ocv ( & self ) -> CH5OCV_R { CH5OCV_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Channel 6 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch6ocv ( & self ) -> CH6OCV_R { CH6OCV_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Channel 7 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch7ocv ( & self ) -> CH7OCV_R { CH7OCV_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch0oc ( & mut self ) -> CH0OC_W { CH0OC_W { w : self } } # [ doc = "Bit 1 - Channel 1 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch1oc ( & mut self ) -> CH1OC_W { CH1OC_W { w : self } } # [ doc = "Bit 2 - Channel 2 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch2oc ( & mut self ) -> CH2OC_W { CH2OC_W { w : self } } # [ doc = "Bit 3 - Channel 3 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch3oc ( & mut self ) -> CH3OC_W { CH3OC_W { w : self } } # [ doc = "Bit 4 - Channel 4 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch4oc ( & mut self ) -> CH4OC_W { CH4OC_W { w : self } } # [ doc = "Bit 5 - Channel 5 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch5oc ( & mut self ) -> CH5OC_W { CH5OC_W { w : self } } # [ doc = "Bit 6 - Channel 6 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch6oc ( & mut self ) -> CH6OC_W { CH6OC_W { w : self } } # [ doc = "Bit 7 - Channel 7 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch7oc ( & mut self ) -> CH7OC_W { CH7OC_W { w : self } } # [ doc = "Bit 8 - Channel 0 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch0ocv ( & mut self ) -> CH0OCV_W { CH0OCV_W { w : self } } # [ doc = "Bit 9 - Channel 1 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch1ocv ( & mut self ) -> CH1OCV_W { CH1OCV_W { w : self } } # [ doc = "Bit 10 - Channel 2 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch2ocv ( & mut self ) -> CH2OCV_W { CH2OCV_W { w : self } } # [ doc = "Bit 11 - Channel 3 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch3ocv ( & mut self ) -> CH3OCV_W { CH3OCV_W { w : self } } # [ doc = "Bit 12 - Channel 4 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch4ocv ( & mut self ) -> CH4OCV_W { CH4OCV_W { w : self } } # [ doc = "Bit 13 - Channel 5 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch5ocv ( & mut self ) -> CH5OCV_W { CH5OCV_W { w : self } } # [ doc = "Bit 14 - Channel 6 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch6ocv ( & mut self ) -> CH6OCV_W { CH6OCV_W { w : self } } # [ doc = "Bit 15 - Channel 7 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch7ocv ( & mut self ) -> CH7OCV_W { CH7OCV_W { w : self } } } } # [ doc = "FTM PWM Load\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwmload](pwmload) module" ] pub type PWMLOAD = crate :: Reg < u32 , _PWMLOAD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PWMLOAD ; # [ doc = "`read()` method returns [pwmload::R](pwmload::R) reader structure" ] impl crate :: Readable for PWMLOAD { } # [ doc = "`write(|w| ..)` method takes [pwmload::W](pwmload::W) writer structure" ] impl crate :: Writable for PWMLOAD { } # [ doc = "FTM PWM Load" ] pub mod pwmload { # [ doc = "Reader of register PWMLOAD" ] pub type R = crate :: R < u32 , super :: PWMLOAD > ; # [ doc = "Writer for register PWMLOAD" ] pub type W = crate :: W < u32 , super :: PWMLOAD > ; # [ doc = "Register PWMLOAD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PWMLOAD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH0SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0SEL_A ) -> Self { match variant { CH0SEL_A :: _0 => false , CH0SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH0SEL`" ] pub type CH0SEL_R = crate :: R < bool , CH0SEL_A > ; impl CH0SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0SEL_A { match self . bits { false => CH0SEL_A :: _0 , true => CH0SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0SEL_A :: _1 } } # [ doc = "Write proxy for field `CH0SEL`" ] pub struct CH0SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0SEL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH1SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1SEL_A ) -> Self { match variant { CH1SEL_A :: _0 => false , CH1SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH1SEL`" ] pub type CH1SEL_R = crate :: R < bool , CH1SEL_A > ; impl CH1SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1SEL_A { match self . bits { false => CH1SEL_A :: _0 , true => CH1SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1SEL_A :: _1 } } # [ doc = "Write proxy for field `CH1SEL`" ] pub struct CH1SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1SEL_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH2SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2SEL_A ) -> Self { match variant { CH2SEL_A :: _0 => false , CH2SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH2SEL`" ] pub type CH2SEL_R = crate :: R < bool , CH2SEL_A > ; impl CH2SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2SEL_A { match self . bits { false => CH2SEL_A :: _0 , true => CH2SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2SEL_A :: _1 } } # [ doc = "Write proxy for field `CH2SEL`" ] pub struct CH2SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH2SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2SEL_A :: _1 ) } # [ 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 = "Channel 3 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH3SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3SEL_A ) -> Self { match variant { CH3SEL_A :: _0 => false , CH3SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH3SEL`" ] pub type CH3SEL_R = crate :: R < bool , CH3SEL_A > ; impl CH3SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3SEL_A { match self . bits { false => CH3SEL_A :: _0 , true => CH3SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3SEL_A :: _1 } } # [ doc = "Write proxy for field `CH3SEL`" ] pub struct CH3SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH3SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3SEL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH4SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4SEL_A ) -> Self { match variant { CH4SEL_A :: _0 => false , CH4SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH4SEL`" ] pub type CH4SEL_R = crate :: R < bool , CH4SEL_A > ; impl CH4SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4SEL_A { match self . bits { false => CH4SEL_A :: _0 , true => CH4SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4SEL_A :: _1 } } # [ doc = "Write proxy for field `CH4SEL`" ] pub struct CH4SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH4SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4SEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH5SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5SEL_A ) -> Self { match variant { CH5SEL_A :: _0 => false , CH5SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH5SEL`" ] pub type CH5SEL_R = crate :: R < bool , CH5SEL_A > ; impl CH5SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5SEL_A { match self . bits { false => CH5SEL_A :: _0 , true => CH5SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5SEL_A :: _1 } } # [ doc = "Write proxy for field `CH5SEL`" ] pub struct CH5SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH5SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5SEL_A :: _1 ) } # [ 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 = "Channel 6 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH6SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6SEL_A ) -> Self { match variant { CH6SEL_A :: _0 => false , CH6SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH6SEL`" ] pub type CH6SEL_R = crate :: R < bool , CH6SEL_A > ; impl CH6SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6SEL_A { match self . bits { false => CH6SEL_A :: _0 , true => CH6SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6SEL_A :: _1 } } # [ doc = "Write proxy for field `CH6SEL`" ] pub struct CH6SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH6SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6SEL_A :: _1 ) } # [ 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 = "Channel 7 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH7SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7SEL_A ) -> Self { match variant { CH7SEL_A :: _0 => false , CH7SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH7SEL`" ] pub type CH7SEL_R = crate :: R < bool , CH7SEL_A > ; impl CH7SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7SEL_A { match self . bits { false => CH7SEL_A :: _0 , true => CH7SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7SEL_A :: _1 } } # [ doc = "Write proxy for field `CH7SEL`" ] pub struct CH7SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH7SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7SEL_A :: _1 ) } # [ 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 = "Load Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LDOK_A { # [ doc = "0: Loading updated values is disabled." ] _0 , # [ doc = "1: Loading updated values is enabled." ] _1 } impl From < LDOK_A > for bool { # [ inline ( always ) ] fn from ( variant : LDOK_A ) -> Self { match variant { LDOK_A :: _0 => false , LDOK_A :: _1 => true } } } # [ doc = "Reader of field `LDOK`" ] pub type LDOK_R = crate :: R < bool , LDOK_A > ; impl LDOK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LDOK_A { match self . bits { false => LDOK_A :: _0 , true => LDOK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LDOK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LDOK_A :: _1 } } # [ doc = "Write proxy for field `LDOK`" ] pub struct LDOK_W < 'a > { w : & 'a mut W , } impl < 'a > LDOK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LDOK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loading updated values is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LDOK_A :: _0 ) } # [ doc = "Loading updated values is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LDOK_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Select" ] # [ inline ( always ) ] pub fn ch0sel ( & self ) -> CH0SEL_R { CH0SEL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Select" ] # [ inline ( always ) ] pub fn ch1sel ( & self ) -> CH1SEL_R { CH1SEL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Select" ] # [ inline ( always ) ] pub fn ch2sel ( & self ) -> CH2SEL_R { CH2SEL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Select" ] # [ inline ( always ) ] pub fn ch3sel ( & self ) -> CH3SEL_R { CH3SEL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Select" ] # [ inline ( always ) ] pub fn ch4sel ( & self ) -> CH4SEL_R { CH4SEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Select" ] # [ inline ( always ) ] pub fn ch5sel ( & self ) -> CH5SEL_R { CH5SEL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Select" ] # [ inline ( always ) ] pub fn ch6sel ( & self ) -> CH6SEL_R { CH6SEL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Select" ] # [ inline ( always ) ] pub fn ch7sel ( & self ) -> CH7SEL_R { CH7SEL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Load Enable" ] # [ inline ( always ) ] pub fn ldok ( & self ) -> LDOK_R { LDOK_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Select" ] # [ inline ( always ) ] pub fn ch0sel ( & mut self ) -> CH0SEL_W { CH0SEL_W { w : self } } # [ doc = "Bit 1 - Channel 1 Select" ] # [ inline ( always ) ] pub fn ch1sel ( & mut self ) -> CH1SEL_W { CH1SEL_W { w : self } } # [ doc = "Bit 2 - Channel 2 Select" ] # [ inline ( always ) ] pub fn ch2sel ( & mut self ) -> CH2SEL_W { CH2SEL_W { w : self } } # [ doc = "Bit 3 - Channel 3 Select" ] # [ inline ( always ) ] pub fn ch3sel ( & mut self ) -> CH3SEL_W { CH3SEL_W { w : self } } # [ doc = "Bit 4 - Channel 4 Select" ] # [ inline ( always ) ] pub fn ch4sel ( & mut self ) -> CH4SEL_W { CH4SEL_W { w : self } } # [ doc = "Bit 5 - Channel 5 Select" ] # [ inline ( always ) ] pub fn ch5sel ( & mut self ) -> CH5SEL_W { CH5SEL_W { w : self } } # [ doc = "Bit 6 - Channel 6 Select" ] # [ inline ( always ) ] pub fn ch6sel ( & mut self ) -> CH6SEL_W { CH6SEL_W { w : self } } # [ doc = "Bit 7 - Channel 7 Select" ] # [ inline ( always ) ] pub fn ch7sel ( & mut self ) -> CH7SEL_W { CH7SEL_W { w : self } } # [ doc = "Bit 9 - Load Enable" ] # [ inline ( always ) ] pub fn ldok ( & mut self ) -> LDOK_W { LDOK_W { w : self } } } } } # [ doc = "FlexTimer Module" ] pub struct FTM3 { _marker : PhantomData < * const ( ) > } unsafe impl Send for FTM3 { } impl FTM3 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const ftm3 :: RegisterBlock { 0x400b_9000 as * const _ } } impl Deref for FTM3 { type Target = ftm3 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * FTM3 :: ptr ( ) } } } # [ doc = "FlexTimer Module" ] pub mod ftm3 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Status And Control" ] pub sc : SC , # [ doc = "0x04 - Counter" ] pub cnt : CNT , # [ doc = "0x08 - Modulo" ] pub mod_ : MOD , # [ doc = "0x0c - Channel (n) Status And Control" ] pub c0sc : CSC , # [ doc = "0x10 - Channel (n) Value" ] pub c0v : CV , # [ doc = "0x14 - Channel (n) Status And Control" ] pub c1sc : CSC , # [ doc = "0x18 - Channel (n) Value" ] pub c1v : CV , # [ doc = "0x1c - Channel (n) Status And Control" ] pub c2sc : CSC , # [ doc = "0x20 - Channel (n) Value" ] pub c2v : CV , # [ doc = "0x24 - Channel (n) Status And Control" ] pub c3sc : CSC , # [ doc = "0x28 - Channel (n) Value" ] pub c3v : CV , # [ doc = "0x2c - Channel (n) Status And Control" ] pub c4sc : CSC , # [ doc = "0x30 - Channel (n) Value" ] pub c4v : CV , # [ doc = "0x34 - Channel (n) Status And Control" ] pub c5sc : CSC , # [ doc = "0x38 - Channel (n) Value" ] pub c5v : CV , # [ doc = "0x3c - Channel (n) Status And Control" ] pub c6sc : CSC , # [ doc = "0x40 - Channel (n) Value" ] pub c6v : CV , # [ doc = "0x44 - Channel (n) Status And Control" ] pub c7sc : CSC , # [ doc = "0x48 - Channel (n) Value" ] pub c7v : CV , # [ doc = "0x4c - Counter Initial Value" ] pub cntin : CNTIN , # [ doc = "0x50 - Capture And Compare Status" ] pub status : STATUS , # [ doc = "0x54 - Features Mode Selection" ] pub mode : MODE , # [ doc = "0x58 - Synchronization" ] pub sync : SYNC , # [ doc = "0x5c - Initial State For Channels Output" ] pub outinit : OUTINIT , # [ doc = "0x60 - Output Mask" ] pub outmask : OUTMASK , # [ doc = "0x64 - Function For Linked Channels" ] pub combine : COMBINE , # [ doc = "0x68 - Deadtime Insertion Control" ] pub deadtime : DEADTIME , # [ doc = "0x6c - FTM External Trigger" ] pub exttrig : EXTTRIG , # [ doc = "0x70 - Channels Polarity" ] pub pol : POL , # [ doc = "0x74 - Fault Mode Status" ] pub fms : FMS , # [ doc = "0x78 - Input Capture Filter Control" ] pub filter : FILTER , # [ doc = "0x7c - Fault Control" ] pub fltctrl : FLTCTRL , # [ doc = "0x80 - Quadrature Decoder Control And Status" ] pub qdctrl : QDCTRL , # [ doc = "0x84 - Configuration" ] pub conf : CONF , # [ doc = "0x88 - FTM Fault Input Polarity" ] pub fltpol : FLTPOL , # [ doc = "0x8c - Synchronization Configuration" ] pub synconf : SYNCONF , # [ doc = "0x90 - FTM Inverting Control" ] pub invctrl : INVCTRL , # [ doc = "0x94 - FTM Software Output Control" ] pub swoctrl : SWOCTRL , # [ doc = "0x98 - FTM PWM Load" ] pub pwmload : PWMLOAD , } # [ doc = "Status And Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u32 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "Status And Control" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u32 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u32 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Prescale Factor Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Divide by 1" ] _000 , # [ doc = "1: Divide by 2" ] _001 , # [ doc = "2: Divide by 4" ] _010 , # [ doc = "3: Divide by 8" ] _011 , # [ doc = "4: Divide by 16" ] _100 , # [ doc = "5: Divide by 32" ] _101 , # [ doc = "6: Divide by 64" ] _110 , # [ doc = "7: Divide by 128" ] _111 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _000 => 0 , PS_A :: _001 => 1 , PS_A :: _010 => 2 , PS_A :: _011 => 3 , PS_A :: _100 => 4 , PS_A :: _101 => 5 , PS_A :: _110 => 6 , PS_A :: _111 => 7 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _000 , 1 => PS_A :: _001 , 2 => PS_A :: _010 , 3 => PS_A :: _011 , 4 => PS_A :: _100 , 5 => PS_A :: _101 , 6 => PS_A :: _110 , 7 => PS_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PS_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PS_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PS_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PS_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PS_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PS_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PS_A :: _111 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide by 1" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PS_A :: _000 ) } # [ doc = "Divide by 2" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PS_A :: _001 ) } # [ doc = "Divide by 4" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PS_A :: _010 ) } # [ doc = "Divide by 8" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PS_A :: _011 ) } # [ doc = "Divide by 16" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PS_A :: _100 ) } # [ doc = "Divide by 32" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PS_A :: _101 ) } # [ doc = "Divide by 64" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PS_A :: _110 ) } # [ doc = "Divide by 128" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PS_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Clock Source Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKS_A { # [ doc = "0: No clock selected. This in effect disables the FTM counter." ] _00 , # [ doc = "1: System clock" ] _01 , # [ doc = "2: Fixed frequency clock" ] _10 , # [ doc = "3: External clock" ] _11 } impl From < CLKS_A > for u8 { # [ inline ( always ) ] fn from ( variant : CLKS_A ) -> Self { match variant { CLKS_A :: _00 => 0 , CLKS_A :: _01 => 1 , CLKS_A :: _10 => 2 , CLKS_A :: _11 => 3 } } } # [ doc = "Reader of field `CLKS`" ] pub type CLKS_R = crate :: R < u8 , CLKS_A > ; impl CLKS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKS_A { match self . bits { 0 => CLKS_A :: _00 , 1 => CLKS_A :: _01 , 2 => CLKS_A :: _10 , 3 => CLKS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CLKS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CLKS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CLKS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CLKS_A :: _11 } } # [ doc = "Write proxy for field `CLKS`" ] pub struct CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > CLKS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No clock selected. This in effect disables the FTM counter." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _00 ) } # [ doc = "System clock" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _01 ) } # [ doc = "Fixed frequency clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _10 ) } # [ doc = "External clock" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 3 ) ) | ( ( ( value as u32 ) & 0x03 ) << 3 ) ; self . w } } # [ doc = "Center-Aligned PWM Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPWMS_A { # [ doc = "0: FTM counter operates in Up Counting mode." ] _0 , # [ doc = "1: FTM counter operates in Up-Down Counting mode." ] _1 } impl From < CPWMS_A > for bool { # [ inline ( always ) ] fn from ( variant : CPWMS_A ) -> Self { match variant { CPWMS_A :: _0 => false , CPWMS_A :: _1 => true } } } # [ doc = "Reader of field `CPWMS`" ] pub type CPWMS_R = crate :: R < bool , CPWMS_A > ; impl CPWMS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPWMS_A { match self . bits { false => CPWMS_A :: _0 , true => CPWMS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPWMS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPWMS_A :: _1 } } # [ doc = "Write proxy for field `CPWMS`" ] pub struct CPWMS_W < 'a > { w : & 'a mut W , } impl < 'a > CPWMS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPWMS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter operates in Up Counting mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _0 ) } # [ doc = "FTM counter operates in Up-Down Counting mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _1 ) } # [ 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 = "Timer Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOIE_A { # [ doc = "0: Disable TOF interrupts. Use software polling." ] _0 , # [ doc = "1: Enable TOF interrupts. An interrupt is generated when TOF equals one." ] _1 } impl From < TOIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TOIE_A ) -> Self { match variant { TOIE_A :: _0 => false , TOIE_A :: _1 => true } } } # [ doc = "Reader of field `TOIE`" ] pub type TOIE_R = crate :: R < bool , TOIE_A > ; impl TOIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOIE_A { match self . bits { false => TOIE_A :: _0 , true => TOIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOIE_A :: _1 } } # [ doc = "Write proxy for field `TOIE`" ] pub struct TOIE_W < 'a > { w : & 'a mut W , } impl < 'a > TOIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable TOF interrupts. Use software polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _0 ) } # [ doc = "Enable TOF interrupts. An interrupt is generated when TOF equals one." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _1 ) } # [ 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 = "Timer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: FTM counter has not overflowed." ] _0 , # [ doc = "1: FTM counter has overflowed." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Write proxy for field `TOF`" ] pub struct TOF_W < 'a > { w : & 'a mut W , } impl < 'a > TOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter has not overflowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _0 ) } # [ doc = "FTM counter has overflowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:4 - Clock Source Selection" ] # [ inline ( always ) ] pub fn clks ( & self ) -> CLKS_R { CLKS_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & self ) -> CPWMS_R { CPWMS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & self ) -> TOIE_R { TOIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bits 3:4 - Clock Source Selection" ] # [ inline ( always ) ] pub fn clks ( & mut self ) -> CLKS_W { CLKS_W { w : self } } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & mut self ) -> CPWMS_W { CPWMS_W { w : self } } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & mut self ) -> TOIE_W { TOIE_W { w : self } } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & mut self ) -> TOF_W { TOF_W { w : self } } } } # [ doc = "Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module" ] pub type CNT = crate :: Reg < u32 , _CNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNT ; # [ doc = "`read()` method returns [cnt::R](cnt::R) reader structure" ] impl crate :: Readable for CNT { } # [ doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure" ] impl crate :: Writable for CNT { } # [ doc = "Counter" ] pub mod cnt { # [ doc = "Reader of register CNT" ] pub type R = crate :: R < u32 , super :: CNT > ; # [ doc = "Writer for register CNT" ] pub type W = crate :: W < u32 , super :: CNT > ; # [ doc = "Register CNT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `COUNT`" ] pub struct COUNT_W < 'a > { w : & 'a mut W , } impl < 'a > COUNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn count ( & mut self ) -> COUNT_W { COUNT_W { w : self } } } } # [ doc = "Modulo\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mod_](mod_) module" ] pub type MOD = crate :: Reg < u32 , _MOD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MOD ; # [ doc = "`read()` method returns [mod_::R](mod_::R) reader structure" ] impl crate :: Readable for MOD { } # [ doc = "`write(|w| ..)` method takes [mod_::W](mod_::W) writer structure" ] impl crate :: Writable for MOD { } # [ doc = "Modulo" ] pub mod mod_ { # [ doc = "Reader of register MOD" ] pub type R = crate :: R < u32 , super :: MOD > ; # [ doc = "Writer for register MOD" ] pub type W = crate :: W < u32 , super :: MOD > ; # [ doc = "Register MOD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MOD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MOD`" ] pub type MOD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MOD`" ] pub struct MOD_W < 'a > { w : & 'a mut W , } impl < 'a > MOD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Modulo Value" ] # [ inline ( always ) ] pub fn mod_ ( & self ) -> MOD_R { MOD_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Modulo Value" ] # [ inline ( always ) ] pub fn mod_ ( & mut self ) -> MOD_W { MOD_W { w : self } } } } # [ doc = "Channel (n) Status And Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csc](csc) module" ] pub type CSC = crate :: Reg < u32 , _CSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSC ; # [ doc = "`read()` method returns [csc::R](csc::R) reader structure" ] impl crate :: Readable for CSC { } # [ doc = "`write(|w| ..)` method takes [csc::W](csc::W) writer structure" ] impl crate :: Writable for CSC { } # [ doc = "Channel (n) Status And Control" ] pub mod csc { # [ doc = "Reader of register C%sSC" ] pub type R = crate :: R < u32 , super :: CSC > ; # [ doc = "Writer for register C%sSC" ] pub type W = crate :: W < u32 , super :: CSC > ; # [ doc = "Register C%sSC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Disable DMA transfers." ] _0 , # [ doc = "1: Enable DMA transfers." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable DMA transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Enable DMA transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ELSA`" ] pub type ELSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSA`" ] pub struct ELSA_W < 'a > { w : & 'a mut W , } impl < 'a > ELSA_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 = "Reader of field `ELSB`" ] pub type ELSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSB`" ] pub struct ELSB_W < 'a > { w : & 'a mut W , } impl < 'a > ELSB_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `MSA`" ] pub type MSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSA`" ] pub struct MSA_W < 'a > { w : & 'a mut W , } impl < 'a > MSA_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `MSB`" ] pub type MSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSB`" ] pub struct MSB_W < 'a > { w : & 'a mut W , } impl < 'a > MSB_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 = "Channel Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHIE_A { # [ doc = "0: Disable channel interrupts. Use software polling." ] _0 , # [ doc = "1: Enable channel interrupts." ] _1 } impl From < CHIE_A > for bool { # [ inline ( always ) ] fn from ( variant : CHIE_A ) -> Self { match variant { CHIE_A :: _0 => false , CHIE_A :: _1 => true } } } # [ doc = "Reader of field `CHIE`" ] pub type CHIE_R = crate :: R < bool , CHIE_A > ; impl CHIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHIE_A { match self . bits { false => CHIE_A :: _0 , true => CHIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHIE_A :: _1 } } # [ doc = "Write proxy for field `CHIE`" ] pub struct CHIE_W < 'a > { w : & 'a mut W , } impl < 'a > CHIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable channel interrupts. Use software polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _0 ) } # [ doc = "Enable channel interrupts." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _1 ) } # [ 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 = "Channel Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHF_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CHF_A > for bool { # [ inline ( always ) ] fn from ( variant : CHF_A ) -> Self { match variant { CHF_A :: _0 => false , CHF_A :: _1 => true } } } # [ doc = "Reader of field `CHF`" ] pub type CHF_R = crate :: R < bool , CHF_A > ; impl CHF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHF_A { match self . bits { false => CHF_A :: _0 , true => CHF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHF_A :: _1 } } # [ doc = "Write proxy for field `CHF`" ] pub struct CHF_W < 'a > { w : & 'a mut W , } impl < 'a > CHF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & self ) -> ELSA_R { ELSA_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & self ) -> ELSB_R { ELSB_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & self ) -> MSA_R { MSA_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & self ) -> MSB_R { MSB_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & self ) -> CHIE_R { CHIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & self ) -> CHF_R { CHF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & mut self ) -> ELSA_W { ELSA_W { w : self } } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & mut self ) -> ELSB_W { ELSB_W { w : self } } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & mut self ) -> MSA_W { MSA_W { w : self } } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & mut self ) -> MSB_W { MSB_W { w : self } } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & mut self ) -> CHIE_W { CHIE_W { w : self } } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & mut self ) -> CHF_W { CHF_W { w : self } } } } # [ doc = "Channel (n) Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cv](cv) module" ] pub type CV = crate :: Reg < u32 , _CV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CV ; # [ doc = "`read()` method returns [cv::R](cv::R) reader structure" ] impl crate :: Readable for CV { } # [ doc = "`write(|w| ..)` method takes [cv::W](cv::W) writer structure" ] impl crate :: Writable for CV { } # [ doc = "Channel (n) Value" ] pub mod cv { # [ doc = "Reader of register C%sV" ] pub type R = crate :: R < u32 , super :: CV > ; # [ doc = "Writer for register C%sV" ] pub type W = crate :: W < u32 , super :: CV > ; # [ doc = "Register C%sV `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CV { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VAL`" ] pub type VAL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `VAL`" ] pub struct VAL_W < 'a > { w : & 'a mut W , } impl < 'a > VAL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & self ) -> VAL_R { VAL_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & mut self ) -> VAL_W { VAL_W { w : self } } } } # [ doc = "Counter Initial Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cntin](cntin) module" ] pub type CNTIN = crate :: Reg < u32 , _CNTIN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNTIN ; # [ doc = "`read()` method returns [cntin::R](cntin::R) reader structure" ] impl crate :: Readable for CNTIN { } # [ doc = "`write(|w| ..)` method takes [cntin::W](cntin::W) writer structure" ] impl crate :: Writable for CNTIN { } # [ doc = "Counter Initial Value" ] pub mod cntin { # [ doc = "Reader of register CNTIN" ] pub type R = crate :: R < u32 , super :: CNTIN > ; # [ doc = "Writer for register CNTIN" ] pub type W = crate :: W < u32 , super :: CNTIN > ; # [ doc = "Register CNTIN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNTIN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Initial Value Of The FTM Counter" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Initial Value Of The FTM Counter" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } } } # [ doc = "Capture And Compare Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "`write(|w| ..)` method takes [status::W](status::W) writer structure" ] impl crate :: Writable for STATUS { } # [ doc = "Capture And Compare Status" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Writer for register STATUS" ] pub type W = crate :: W < u32 , super :: STATUS > ; # [ doc = "Register STATUS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: STATUS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH0F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0F_A ) -> Self { match variant { CH0F_A :: _0 => false , CH0F_A :: _1 => true } } } # [ doc = "Reader of field `CH0F`" ] pub type CH0F_R = crate :: R < bool , CH0F_A > ; impl CH0F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0F_A { match self . bits { false => CH0F_A :: _0 , true => CH0F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0F_A :: _1 } } # [ doc = "Write proxy for field `CH0F`" ] pub struct CH0F_W < 'a > { w : & 'a mut W , } impl < 'a > CH0F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH1F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1F_A ) -> Self { match variant { CH1F_A :: _0 => false , CH1F_A :: _1 => true } } } # [ doc = "Reader of field `CH1F`" ] pub type CH1F_R = crate :: R < bool , CH1F_A > ; impl CH1F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1F_A { match self . bits { false => CH1F_A :: _0 , true => CH1F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1F_A :: _1 } } # [ doc = "Write proxy for field `CH1F`" ] pub struct CH1F_W < 'a > { w : & 'a mut W , } impl < 'a > CH1F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH2F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2F_A ) -> Self { match variant { CH2F_A :: _0 => false , CH2F_A :: _1 => true } } } # [ doc = "Reader of field `CH2F`" ] pub type CH2F_R = crate :: R < bool , CH2F_A > ; impl CH2F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2F_A { match self . bits { false => CH2F_A :: _0 , true => CH2F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2F_A :: _1 } } # [ doc = "Write proxy for field `CH2F`" ] pub struct CH2F_W < 'a > { w : & 'a mut W , } impl < 'a > CH2F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2F_A :: _1 ) } # [ 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 = "Channel 3 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH3F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3F_A ) -> Self { match variant { CH3F_A :: _0 => false , CH3F_A :: _1 => true } } } # [ doc = "Reader of field `CH3F`" ] pub type CH3F_R = crate :: R < bool , CH3F_A > ; impl CH3F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3F_A { match self . bits { false => CH3F_A :: _0 , true => CH3F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3F_A :: _1 } } # [ doc = "Write proxy for field `CH3F`" ] pub struct CH3F_W < 'a > { w : & 'a mut W , } impl < 'a > CH3F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3F_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH4F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4F_A ) -> Self { match variant { CH4F_A :: _0 => false , CH4F_A :: _1 => true } } } # [ doc = "Reader of field `CH4F`" ] pub type CH4F_R = crate :: R < bool , CH4F_A > ; impl CH4F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4F_A { match self . bits { false => CH4F_A :: _0 , true => CH4F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4F_A :: _1 } } # [ doc = "Write proxy for field `CH4F`" ] pub struct CH4F_W < 'a > { w : & 'a mut W , } impl < 'a > CH4F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4F_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH5F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5F_A ) -> Self { match variant { CH5F_A :: _0 => false , CH5F_A :: _1 => true } } } # [ doc = "Reader of field `CH5F`" ] pub type CH5F_R = crate :: R < bool , CH5F_A > ; impl CH5F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5F_A { match self . bits { false => CH5F_A :: _0 , true => CH5F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5F_A :: _1 } } # [ doc = "Write proxy for field `CH5F`" ] pub struct CH5F_W < 'a > { w : & 'a mut W , } impl < 'a > CH5F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5F_A :: _1 ) } # [ 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 = "Channel 6 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH6F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6F_A ) -> Self { match variant { CH6F_A :: _0 => false , CH6F_A :: _1 => true } } } # [ doc = "Reader of field `CH6F`" ] pub type CH6F_R = crate :: R < bool , CH6F_A > ; impl CH6F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6F_A { match self . bits { false => CH6F_A :: _0 , true => CH6F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6F_A :: _1 } } # [ doc = "Write proxy for field `CH6F`" ] pub struct CH6F_W < 'a > { w : & 'a mut W , } impl < 'a > CH6F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6F_A :: _1 ) } # [ 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 = "Channel 7 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH7F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7F_A ) -> Self { match variant { CH7F_A :: _0 => false , CH7F_A :: _1 => true } } } # [ doc = "Reader of field `CH7F`" ] pub type CH7F_R = crate :: R < bool , CH7F_A > ; impl CH7F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7F_A { match self . bits { false => CH7F_A :: _0 , true => CH7F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7F_A :: _1 } } # [ doc = "Write proxy for field `CH7F`" ] pub struct CH7F_W < 'a > { w : & 'a mut W , } impl < 'a > CH7F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7F_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & self ) -> CH0F_R { CH0F_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & self ) -> CH1F_R { CH1F_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Flag" ] # [ inline ( always ) ] pub fn ch2f ( & self ) -> CH2F_R { CH2F_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Flag" ] # [ inline ( always ) ] pub fn ch3f ( & self ) -> CH3F_R { CH3F_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Flag" ] # [ inline ( always ) ] pub fn ch4f ( & self ) -> CH4F_R { CH4F_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Flag" ] # [ inline ( always ) ] pub fn ch5f ( & self ) -> CH5F_R { CH5F_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Flag" ] # [ inline ( always ) ] pub fn ch6f ( & self ) -> CH6F_R { CH6F_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Flag" ] # [ inline ( always ) ] pub fn ch7f ( & self ) -> CH7F_R { CH7F_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & mut self ) -> CH0F_W { CH0F_W { w : self } } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & mut self ) -> CH1F_W { CH1F_W { w : self } } # [ doc = "Bit 2 - Channel 2 Flag" ] # [ inline ( always ) ] pub fn ch2f ( & mut self ) -> CH2F_W { CH2F_W { w : self } } # [ doc = "Bit 3 - Channel 3 Flag" ] # [ inline ( always ) ] pub fn ch3f ( & mut self ) -> CH3F_W { CH3F_W { w : self } } # [ doc = "Bit 4 - Channel 4 Flag" ] # [ inline ( always ) ] pub fn ch4f ( & mut self ) -> CH4F_W { CH4F_W { w : self } } # [ doc = "Bit 5 - Channel 5 Flag" ] # [ inline ( always ) ] pub fn ch5f ( & mut self ) -> CH5F_W { CH5F_W { w : self } } # [ doc = "Bit 6 - Channel 6 Flag" ] # [ inline ( always ) ] pub fn ch6f ( & mut self ) -> CH6F_W { CH6F_W { w : self } } # [ doc = "Bit 7 - Channel 7 Flag" ] # [ inline ( always ) ] pub fn ch7f ( & mut self ) -> CH7F_W { CH7F_W { w : self } } } } # [ doc = "Features Mode Selection\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mode](mode) module" ] pub type MODE = crate :: Reg < u32 , _MODE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODE ; # [ doc = "`read()` method returns [mode::R](mode::R) reader structure" ] impl crate :: Readable for MODE { } # [ doc = "`write(|w| ..)` method takes [mode::W](mode::W) writer structure" ] impl crate :: Writable for MODE { } # [ doc = "Features Mode Selection" ] pub mod mode { # [ doc = "Reader of register MODE" ] pub type R = crate :: R < u32 , super :: MODE > ; # [ doc = "Writer for register MODE" ] pub type W = crate :: W < u32 , super :: MODE > ; # [ doc = "Register MODE `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: MODE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "FTM Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTMEN_A { # [ doc = "0: TPM compatibility. Free running counter and synchronization compatible with TPM." ] _0 , # [ doc = "1: Free running counter and synchronization are different from TPM behavior." ] _1 } impl From < FTMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : FTMEN_A ) -> Self { match variant { FTMEN_A :: _0 => false , FTMEN_A :: _1 => true } } } # [ doc = "Reader of field `FTMEN`" ] pub type FTMEN_R = crate :: R < bool , FTMEN_A > ; impl FTMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTMEN_A { match self . bits { false => FTMEN_A :: _0 , true => FTMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTMEN_A :: _1 } } # [ doc = "Write proxy for field `FTMEN`" ] pub struct FTMEN_W < 'a > { w : & 'a mut W , } impl < 'a > FTMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM compatibility. Free running counter and synchronization compatible with TPM." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTMEN_A :: _0 ) } # [ doc = "Free running counter and synchronization are different from TPM behavior." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTMEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_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 } } # [ doc = "Write Protection Disable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPDIS_A { # [ doc = "0: Write protection is enabled." ] _0 , # [ doc = "1: Write protection is disabled." ] _1 } impl From < WPDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : WPDIS_A ) -> Self { match variant { WPDIS_A :: _0 => false , WPDIS_A :: _1 => true } } } # [ doc = "Reader of field `WPDIS`" ] pub type WPDIS_R = crate :: R < bool , WPDIS_A > ; impl WPDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPDIS_A { match self . bits { false => WPDIS_A :: _0 , true => WPDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPDIS_A :: _1 } } # [ doc = "Write proxy for field `WPDIS`" ] pub struct WPDIS_W < 'a > { w : & 'a mut W , } impl < 'a > WPDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write protection is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPDIS_A :: _0 ) } # [ doc = "Write protection is disabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPDIS_A :: _1 ) } # [ 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 = "PWM Synchronization Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWMSYNC_A { # [ doc = "0: No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization." ] _0 , # [ doc = "1: Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization." ] _1 } impl From < PWMSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : PWMSYNC_A ) -> Self { match variant { PWMSYNC_A :: _0 => false , PWMSYNC_A :: _1 => true } } } # [ doc = "Reader of field `PWMSYNC`" ] pub type PWMSYNC_R = crate :: R < bool , PWMSYNC_A > ; impl PWMSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PWMSYNC_A { match self . bits { false => PWMSYNC_A :: _0 , true => PWMSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PWMSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PWMSYNC_A :: _1 } } # [ doc = "Write proxy for field `PWMSYNC`" ] pub struct PWMSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > PWMSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PWMSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PWMSYNC_A :: _0 ) } # [ doc = "Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PWMSYNC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Capture Test Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAPTEST_A { # [ doc = "0: Capture test mode is disabled." ] _0 , # [ doc = "1: Capture test mode is enabled." ] _1 } impl From < CAPTEST_A > for bool { # [ inline ( always ) ] fn from ( variant : CAPTEST_A ) -> Self { match variant { CAPTEST_A :: _0 => false , CAPTEST_A :: _1 => true } } } # [ doc = "Reader of field `CAPTEST`" ] pub type CAPTEST_R = crate :: R < bool , CAPTEST_A > ; impl CAPTEST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CAPTEST_A { match self . bits { false => CAPTEST_A :: _0 , true => CAPTEST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CAPTEST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CAPTEST_A :: _1 } } # [ doc = "Write proxy for field `CAPTEST`" ] pub struct CAPTEST_W < 'a > { w : & 'a mut W , } impl < 'a > CAPTEST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAPTEST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Capture test mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAPTEST_A :: _0 ) } # [ doc = "Capture test mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAPTEST_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Fault Control Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTM_A { # [ doc = "0: Fault control is disabled for all channels." ] _00 , # [ doc = "1: Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing." ] _01 , # [ doc = "2: Fault control is enabled for all channels, and the selected mode is the manual fault clearing." ] _10 , # [ doc = "3: Fault control is enabled for all channels, and the selected mode is the automatic fault clearing." ] _11 } impl From < FAULTM_A > for u8 { # [ inline ( always ) ] fn from ( variant : FAULTM_A ) -> Self { match variant { FAULTM_A :: _00 => 0 , FAULTM_A :: _01 => 1 , FAULTM_A :: _10 => 2 , FAULTM_A :: _11 => 3 } } } # [ doc = "Reader of field `FAULTM`" ] pub type FAULTM_R = crate :: R < u8 , FAULTM_A > ; impl FAULTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTM_A { match self . bits { 0 => FAULTM_A :: _00 , 1 => FAULTM_A :: _01 , 2 => FAULTM_A :: _10 , 3 => FAULTM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FAULTM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FAULTM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FAULTM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FAULTM_A :: _11 } } # [ doc = "Write proxy for field `FAULTM`" ] pub struct FAULTM_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Fault control is disabled for all channels." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _00 ) } # [ doc = "Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _01 ) } # [ doc = "Fault control is enabled for all channels, and the selected mode is the manual fault clearing." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _10 ) } # [ doc = "Fault control is enabled for all channels, and the selected mode is the automatic fault clearing." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FAULTM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u32 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Fault Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTIE_A { # [ doc = "0: Fault control interrupt is disabled." ] _0 , # [ doc = "1: Fault control interrupt is enabled." ] _1 } impl From < FAULTIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTIE_A ) -> Self { match variant { FAULTIE_A :: _0 => false , FAULTIE_A :: _1 => true } } } # [ doc = "Reader of field `FAULTIE`" ] pub type FAULTIE_R = crate :: R < bool , FAULTIE_A > ; impl FAULTIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTIE_A { match self . bits { false => FAULTIE_A :: _0 , true => FAULTIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTIE_A :: _1 } } # [ doc = "Write proxy for field `FAULTIE`" ] pub struct FAULTIE_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault control interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTIE_A :: _0 ) } # [ doc = "Fault control interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTIE_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - FTM Enable" ] # [ inline ( always ) ] pub fn ftmen ( & self ) -> FTMEN_R { FTMEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Initialize The Channels Output" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Write Protection Disable" ] # [ inline ( always ) ] pub fn wpdis ( & self ) -> WPDIS_R { WPDIS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - PWM Synchronization Mode" ] # [ inline ( always ) ] pub fn pwmsync ( & self ) -> PWMSYNC_R { PWMSYNC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Capture Test Mode Enable" ] # [ inline ( always ) ] pub fn captest ( & self ) -> CAPTEST_R { CAPTEST_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:6 - Fault Control Mode" ] # [ inline ( always ) ] pub fn faultm ( & self ) -> FAULTM_R { FAULTM_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Fault Interrupt Enable" ] # [ inline ( always ) ] pub fn faultie ( & self ) -> FAULTIE_R { FAULTIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FTM Enable" ] # [ inline ( always ) ] pub fn ftmen ( & mut self ) -> FTMEN_W { FTMEN_W { w : self } } # [ doc = "Bit 1 - Initialize The Channels Output" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } # [ doc = "Bit 2 - Write Protection Disable" ] # [ inline ( always ) ] pub fn wpdis ( & mut self ) -> WPDIS_W { WPDIS_W { w : self } } # [ doc = "Bit 3 - PWM Synchronization Mode" ] # [ inline ( always ) ] pub fn pwmsync ( & mut self ) -> PWMSYNC_W { PWMSYNC_W { w : self } } # [ doc = "Bit 4 - Capture Test Mode Enable" ] # [ inline ( always ) ] pub fn captest ( & mut self ) -> CAPTEST_W { CAPTEST_W { w : self } } # [ doc = "Bits 5:6 - Fault Control Mode" ] # [ inline ( always ) ] pub fn faultm ( & mut self ) -> FAULTM_W { FAULTM_W { w : self } } # [ doc = "Bit 7 - Fault Interrupt Enable" ] # [ inline ( always ) ] pub fn faultie ( & mut self ) -> FAULTIE_W { FAULTIE_W { w : self } } } } # [ doc = "Synchronization\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sync](sync) module" ] pub type SYNC = crate :: Reg < u32 , _SYNC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYNC ; # [ doc = "`read()` method returns [sync::R](sync::R) reader structure" ] impl crate :: Readable for SYNC { } # [ doc = "`write(|w| ..)` method takes [sync::W](sync::W) writer structure" ] impl crate :: Writable for SYNC { } # [ doc = "Synchronization" ] pub mod sync { # [ doc = "Reader of register SYNC" ] pub type R = crate :: R < u32 , super :: SYNC > ; # [ doc = "Writer for register SYNC" ] pub type W = crate :: W < u32 , super :: SYNC > ; # [ doc = "Register SYNC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SYNC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Minimum Loading Point Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTMIN_A { # [ doc = "0: The minimum loading point is disabled." ] _0 , # [ doc = "1: The minimum loading point is enabled." ] _1 } impl From < CNTMIN_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTMIN_A ) -> Self { match variant { CNTMIN_A :: _0 => false , CNTMIN_A :: _1 => true } } } # [ doc = "Reader of field `CNTMIN`" ] pub type CNTMIN_R = crate :: R < bool , CNTMIN_A > ; impl CNTMIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTMIN_A { match self . bits { false => CNTMIN_A :: _0 , true => CNTMIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTMIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTMIN_A :: _1 } } # [ doc = "Write proxy for field `CNTMIN`" ] pub struct CNTMIN_W < 'a > { w : & 'a mut W , } impl < 'a > CNTMIN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTMIN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The minimum loading point is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTMIN_A :: _0 ) } # [ doc = "The minimum loading point is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTMIN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Maximum Loading Point Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTMAX_A { # [ doc = "0: The maximum loading point is disabled." ] _0 , # [ doc = "1: The maximum loading point is enabled." ] _1 } impl From < CNTMAX_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTMAX_A ) -> Self { match variant { CNTMAX_A :: _0 => false , CNTMAX_A :: _1 => true } } } # [ doc = "Reader of field `CNTMAX`" ] pub type CNTMAX_R = crate :: R < bool , CNTMAX_A > ; impl CNTMAX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTMAX_A { match self . bits { false => CNTMAX_A :: _0 , true => CNTMAX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTMAX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTMAX_A :: _1 } } # [ doc = "Write proxy for field `CNTMAX`" ] pub struct CNTMAX_W < 'a > { w : & 'a mut W , } impl < 'a > CNTMAX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTMAX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The maximum loading point is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTMAX_A :: _0 ) } # [ doc = "The maximum loading point is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTMAX_A :: _1 ) } # [ 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 } } # [ doc = "FTM Counter Reinitialization By Synchronization (FTM counter synchronization)\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REINIT_A { # [ doc = "0: FTM counter continues to count normally." ] _0 , # [ doc = "1: FTM counter is updated with its initial value when the selected trigger is detected." ] _1 } impl From < REINIT_A > for bool { # [ inline ( always ) ] fn from ( variant : REINIT_A ) -> Self { match variant { REINIT_A :: _0 => false , REINIT_A :: _1 => true } } } # [ doc = "Reader of field `REINIT`" ] pub type REINIT_R = crate :: R < bool , REINIT_A > ; impl REINIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> REINIT_A { match self . bits { false => REINIT_A :: _0 , true => REINIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == REINIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == REINIT_A :: _1 } } # [ doc = "Write proxy for field `REINIT`" ] pub struct REINIT_W < 'a > { w : & 'a mut W , } impl < 'a > REINIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REINIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM counter continues to count normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( REINIT_A :: _0 ) } # [ doc = "FTM counter is updated with its initial value when the selected trigger is detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( REINIT_A :: _1 ) } # [ 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 = "Output Mask Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCHOM_A { # [ doc = "0: OUTMASK register is updated with the value of its buffer in all rising edges of the system clock." ] _0 , # [ doc = "1: OUTMASK register is updated with the value of its buffer only by the PWM synchronization." ] _1 } impl From < SYNCHOM_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCHOM_A ) -> Self { match variant { SYNCHOM_A :: _0 => false , SYNCHOM_A :: _1 => true } } } # [ doc = "Reader of field `SYNCHOM`" ] pub type SYNCHOM_R = crate :: R < bool , SYNCHOM_A > ; impl SYNCHOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCHOM_A { match self . bits { false => SYNCHOM_A :: _0 , true => SYNCHOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCHOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCHOM_A :: _1 } } # [ doc = "Write proxy for field `SYNCHOM`" ] pub struct SYNCHOM_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCHOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCHOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OUTMASK register is updated with the value of its buffer in all rising edges of the system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCHOM_A :: _0 ) } # [ doc = "OUTMASK register is updated with the value of its buffer only by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCHOM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "PWM Synchronization Hardware Trigger 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG0_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG0_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG0_A ) -> Self { match variant { TRIG0_A :: _0 => false , TRIG0_A :: _1 => true } } } # [ doc = "Reader of field `TRIG0`" ] pub type TRIG0_R = crate :: R < bool , TRIG0_A > ; impl TRIG0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG0_A { match self . bits { false => TRIG0_A :: _0 , true => TRIG0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG0_A :: _1 } } # [ doc = "Write proxy for field `TRIG0`" ] pub struct TRIG0_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG0_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "PWM Synchronization Hardware Trigger 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG1_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG1_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG1_A ) -> Self { match variant { TRIG1_A :: _0 => false , TRIG1_A :: _1 => true } } } # [ doc = "Reader of field `TRIG1`" ] pub type TRIG1_R = crate :: R < bool , TRIG1_A > ; impl TRIG1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG1_A { match self . bits { false => TRIG1_A :: _0 , true => TRIG1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG1_A :: _1 } } # [ doc = "Write proxy for field `TRIG1`" ] pub struct TRIG1_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG1_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG1_A :: _1 ) } # [ 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 = "PWM Synchronization Hardware Trigger 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIG2_A { # [ doc = "0: Trigger is disabled." ] _0 , # [ doc = "1: Trigger is enabled." ] _1 } impl From < TRIG2_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIG2_A ) -> Self { match variant { TRIG2_A :: _0 => false , TRIG2_A :: _1 => true } } } # [ doc = "Reader of field `TRIG2`" ] pub type TRIG2_R = crate :: R < bool , TRIG2_A > ; impl TRIG2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIG2_A { match self . bits { false => TRIG2_A :: _0 , true => TRIG2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIG2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIG2_A :: _1 } } # [ doc = "Write proxy for field `TRIG2`" ] pub struct TRIG2_W < 'a > { w : & 'a mut W , } impl < 'a > TRIG2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIG2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIG2_A :: _0 ) } # [ doc = "Trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIG2_A :: _1 ) } # [ 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 = "PWM Synchronization Software Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSYNC_A { # [ doc = "0: Software trigger is not selected." ] _0 , # [ doc = "1: Software trigger is selected." ] _1 } impl From < SWSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSYNC_A ) -> Self { match variant { SWSYNC_A :: _0 => false , SWSYNC_A :: _1 => true } } } # [ doc = "Reader of field `SWSYNC`" ] pub type SWSYNC_R = crate :: R < bool , SWSYNC_A > ; impl SWSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSYNC_A { match self . bits { false => SWSYNC_A :: _0 , true => SWSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSYNC_A :: _1 } } # [ doc = "Write proxy for field `SWSYNC`" ] pub struct SWSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > SWSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Software trigger is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSYNC_A :: _0 ) } # [ doc = "Software trigger is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSYNC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Minimum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmin ( & self ) -> CNTMIN_R { CNTMIN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Maximum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmax ( & self ) -> CNTMAX_R { CNTMAX_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)" ] # [ inline ( always ) ] pub fn reinit ( & self ) -> REINIT_R { REINIT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Output Mask Synchronization" ] # [ inline ( always ) ] pub fn synchom ( & self ) -> SYNCHOM_R { SYNCHOM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - PWM Synchronization Hardware Trigger 0" ] # [ inline ( always ) ] pub fn trig0 ( & self ) -> TRIG0_R { TRIG0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - PWM Synchronization Hardware Trigger 1" ] # [ inline ( always ) ] pub fn trig1 ( & self ) -> TRIG1_R { TRIG1_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PWM Synchronization Hardware Trigger 2" ] # [ inline ( always ) ] pub fn trig2 ( & self ) -> TRIG2_R { TRIG2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - PWM Synchronization Software Trigger" ] # [ inline ( always ) ] pub fn swsync ( & self ) -> SWSYNC_R { SWSYNC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Minimum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmin ( & mut self ) -> CNTMIN_W { CNTMIN_W { w : self } } # [ doc = "Bit 1 - Maximum Loading Point Enable" ] # [ inline ( always ) ] pub fn cntmax ( & mut self ) -> CNTMAX_W { CNTMAX_W { w : self } } # [ doc = "Bit 2 - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)" ] # [ inline ( always ) ] pub fn reinit ( & mut self ) -> REINIT_W { REINIT_W { w : self } } # [ doc = "Bit 3 - Output Mask Synchronization" ] # [ inline ( always ) ] pub fn synchom ( & mut self ) -> SYNCHOM_W { SYNCHOM_W { w : self } } # [ doc = "Bit 4 - PWM Synchronization Hardware Trigger 0" ] # [ inline ( always ) ] pub fn trig0 ( & mut self ) -> TRIG0_W { TRIG0_W { w : self } } # [ doc = "Bit 5 - PWM Synchronization Hardware Trigger 1" ] # [ inline ( always ) ] pub fn trig1 ( & mut self ) -> TRIG1_W { TRIG1_W { w : self } } # [ doc = "Bit 6 - PWM Synchronization Hardware Trigger 2" ] # [ inline ( always ) ] pub fn trig2 ( & mut self ) -> TRIG2_W { TRIG2_W { w : self } } # [ doc = "Bit 7 - PWM Synchronization Software Trigger" ] # [ inline ( always ) ] pub fn swsync ( & mut self ) -> SWSYNC_W { SWSYNC_W { w : self } } } } # [ doc = "Initial State For Channels Output\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [outinit](outinit) module" ] pub type OUTINIT = crate :: Reg < u32 , _OUTINIT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OUTINIT ; # [ doc = "`read()` method returns [outinit::R](outinit::R) reader structure" ] impl crate :: Readable for OUTINIT { } # [ doc = "`write(|w| ..)` method takes [outinit::W](outinit::W) writer structure" ] impl crate :: Writable for OUTINIT { } # [ doc = "Initial State For Channels Output" ] pub mod outinit { # [ doc = "Reader of register OUTINIT" ] pub type R = crate :: R < u32 , super :: OUTINIT > ; # [ doc = "Writer for register OUTINIT" ] pub type W = crate :: W < u32 , super :: OUTINIT > ; # [ doc = "Register OUTINIT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OUTINIT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH0OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OI_A ) -> Self { match variant { CH0OI_A :: _0 => false , CH0OI_A :: _1 => true } } } # [ doc = "Reader of field `CH0OI`" ] pub type CH0OI_R = crate :: R < bool , CH0OI_A > ; impl CH0OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OI_A { match self . bits { false => CH0OI_A :: _0 , true => CH0OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OI_A :: _1 } } # [ doc = "Write proxy for field `CH0OI`" ] pub struct CH0OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OI_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH1OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OI_A ) -> Self { match variant { CH1OI_A :: _0 => false , CH1OI_A :: _1 => true } } } # [ doc = "Reader of field `CH1OI`" ] pub type CH1OI_R = crate :: R < bool , CH1OI_A > ; impl CH1OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OI_A { match self . bits { false => CH1OI_A :: _0 , true => CH1OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OI_A :: _1 } } # [ doc = "Write proxy for field `CH1OI`" ] pub struct CH1OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OI_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH2OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OI_A ) -> Self { match variant { CH2OI_A :: _0 => false , CH2OI_A :: _1 => true } } } # [ doc = "Reader of field `CH2OI`" ] pub type CH2OI_R = crate :: R < bool , CH2OI_A > ; impl CH2OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OI_A { match self . bits { false => CH2OI_A :: _0 , true => CH2OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OI_A :: _1 } } # [ doc = "Write proxy for field `CH2OI`" ] pub struct CH2OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OI_A :: _1 ) } # [ 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 = "Channel 3 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH3OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OI_A ) -> Self { match variant { CH3OI_A :: _0 => false , CH3OI_A :: _1 => true } } } # [ doc = "Reader of field `CH3OI`" ] pub type CH3OI_R = crate :: R < bool , CH3OI_A > ; impl CH3OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OI_A { match self . bits { false => CH3OI_A :: _0 , true => CH3OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OI_A :: _1 } } # [ doc = "Write proxy for field `CH3OI`" ] pub struct CH3OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OI_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH4OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OI_A ) -> Self { match variant { CH4OI_A :: _0 => false , CH4OI_A :: _1 => true } } } # [ doc = "Reader of field `CH4OI`" ] pub type CH4OI_R = crate :: R < bool , CH4OI_A > ; impl CH4OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OI_A { match self . bits { false => CH4OI_A :: _0 , true => CH4OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OI_A :: _1 } } # [ doc = "Write proxy for field `CH4OI`" ] pub struct CH4OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OI_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH5OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OI_A ) -> Self { match variant { CH5OI_A :: _0 => false , CH5OI_A :: _1 => true } } } # [ doc = "Reader of field `CH5OI`" ] pub type CH5OI_R = crate :: R < bool , CH5OI_A > ; impl CH5OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OI_A { match self . bits { false => CH5OI_A :: _0 , true => CH5OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OI_A :: _1 } } # [ doc = "Write proxy for field `CH5OI`" ] pub struct CH5OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OI_A :: _1 ) } # [ 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 = "Channel 6 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH6OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OI_A ) -> Self { match variant { CH6OI_A :: _0 => false , CH6OI_A :: _1 => true } } } # [ doc = "Reader of field `CH6OI`" ] pub type CH6OI_R = crate :: R < bool , CH6OI_A > ; impl CH6OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OI_A { match self . bits { false => CH6OI_A :: _0 , true => CH6OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OI_A :: _1 } } # [ doc = "Write proxy for field `CH6OI`" ] pub struct CH6OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OI_A :: _1 ) } # [ 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 = "Channel 7 Output Initialization Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OI_A { # [ doc = "0: The initialization value is 0." ] _0 , # [ doc = "1: The initialization value is 1." ] _1 } impl From < CH7OI_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OI_A ) -> Self { match variant { CH7OI_A :: _0 => false , CH7OI_A :: _1 => true } } } # [ doc = "Reader of field `CH7OI`" ] pub type CH7OI_R = crate :: R < bool , CH7OI_A > ; impl CH7OI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OI_A { match self . bits { false => CH7OI_A :: _0 , true => CH7OI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OI_A :: _1 } } # [ doc = "Write proxy for field `CH7OI`" ] pub struct CH7OI_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The initialization value is 0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OI_A :: _0 ) } # [ doc = "The initialization value is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OI_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch0oi ( & self ) -> CH0OI_R { CH0OI_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch1oi ( & self ) -> CH1OI_R { CH1OI_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch2oi ( & self ) -> CH2OI_R { CH2OI_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch3oi ( & self ) -> CH3OI_R { CH3OI_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch4oi ( & self ) -> CH4OI_R { CH4OI_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch5oi ( & self ) -> CH5OI_R { CH5OI_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch6oi ( & self ) -> CH6OI_R { CH6OI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch7oi ( & self ) -> CH7OI_R { CH7OI_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch0oi ( & mut self ) -> CH0OI_W { CH0OI_W { w : self } } # [ doc = "Bit 1 - Channel 1 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch1oi ( & mut self ) -> CH1OI_W { CH1OI_W { w : self } } # [ doc = "Bit 2 - Channel 2 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch2oi ( & mut self ) -> CH2OI_W { CH2OI_W { w : self } } # [ doc = "Bit 3 - Channel 3 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch3oi ( & mut self ) -> CH3OI_W { CH3OI_W { w : self } } # [ doc = "Bit 4 - Channel 4 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch4oi ( & mut self ) -> CH4OI_W { CH4OI_W { w : self } } # [ doc = "Bit 5 - Channel 5 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch5oi ( & mut self ) -> CH5OI_W { CH5OI_W { w : self } } # [ doc = "Bit 6 - Channel 6 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch6oi ( & mut self ) -> CH6OI_W { CH6OI_W { w : self } } # [ doc = "Bit 7 - Channel 7 Output Initialization Value" ] # [ inline ( always ) ] pub fn ch7oi ( & mut self ) -> CH7OI_W { CH7OI_W { w : self } } } } # [ doc = "Output Mask\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [outmask](outmask) module" ] pub type OUTMASK = crate :: Reg < u32 , _OUTMASK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OUTMASK ; # [ doc = "`read()` method returns [outmask::R](outmask::R) reader structure" ] impl crate :: Readable for OUTMASK { } # [ doc = "`write(|w| ..)` method takes [outmask::W](outmask::W) writer structure" ] impl crate :: Writable for OUTMASK { } # [ doc = "Output Mask" ] pub mod outmask { # [ doc = "Reader of register OUTMASK" ] pub type R = crate :: R < u32 , super :: OUTMASK > ; # [ doc = "Writer for register OUTMASK" ] pub type W = crate :: W < u32 , super :: OUTMASK > ; # [ doc = "Register OUTMASK `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OUTMASK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH0OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OM_A ) -> Self { match variant { CH0OM_A :: _0 => false , CH0OM_A :: _1 => true } } } # [ doc = "Reader of field `CH0OM`" ] pub type CH0OM_R = crate :: R < bool , CH0OM_A > ; impl CH0OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OM_A { match self . bits { false => CH0OM_A :: _0 , true => CH0OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OM_A :: _1 } } # [ doc = "Write proxy for field `CH0OM`" ] pub struct CH0OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OM_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH1OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OM_A ) -> Self { match variant { CH1OM_A :: _0 => false , CH1OM_A :: _1 => true } } } # [ doc = "Reader of field `CH1OM`" ] pub type CH1OM_R = crate :: R < bool , CH1OM_A > ; impl CH1OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OM_A { match self . bits { false => CH1OM_A :: _0 , true => CH1OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OM_A :: _1 } } # [ doc = "Write proxy for field `CH1OM`" ] pub struct CH1OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OM_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH2OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OM_A ) -> Self { match variant { CH2OM_A :: _0 => false , CH2OM_A :: _1 => true } } } # [ doc = "Reader of field `CH2OM`" ] pub type CH2OM_R = crate :: R < bool , CH2OM_A > ; impl CH2OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OM_A { match self . bits { false => CH2OM_A :: _0 , true => CH2OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OM_A :: _1 } } # [ doc = "Write proxy for field `CH2OM`" ] pub struct CH2OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OM_A :: _1 ) } # [ 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 = "Channel 3 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH3OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OM_A ) -> Self { match variant { CH3OM_A :: _0 => false , CH3OM_A :: _1 => true } } } # [ doc = "Reader of field `CH3OM`" ] pub type CH3OM_R = crate :: R < bool , CH3OM_A > ; impl CH3OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OM_A { match self . bits { false => CH3OM_A :: _0 , true => CH3OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OM_A :: _1 } } # [ doc = "Write proxy for field `CH3OM`" ] pub struct CH3OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH4OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OM_A ) -> Self { match variant { CH4OM_A :: _0 => false , CH4OM_A :: _1 => true } } } # [ doc = "Reader of field `CH4OM`" ] pub type CH4OM_R = crate :: R < bool , CH4OM_A > ; impl CH4OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OM_A { match self . bits { false => CH4OM_A :: _0 , true => CH4OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OM_A :: _1 } } # [ doc = "Write proxy for field `CH4OM`" ] pub struct CH4OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OM_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH5OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OM_A ) -> Self { match variant { CH5OM_A :: _0 => false , CH5OM_A :: _1 => true } } } # [ doc = "Reader of field `CH5OM`" ] pub type CH5OM_R = crate :: R < bool , CH5OM_A > ; impl CH5OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OM_A { match self . bits { false => CH5OM_A :: _0 , true => CH5OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OM_A :: _1 } } # [ doc = "Write proxy for field `CH5OM`" ] pub struct CH5OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OM_A :: _1 ) } # [ 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 = "Channel 6 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH6OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OM_A ) -> Self { match variant { CH6OM_A :: _0 => false , CH6OM_A :: _1 => true } } } # [ doc = "Reader of field `CH6OM`" ] pub type CH6OM_R = crate :: R < bool , CH6OM_A > ; impl CH6OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OM_A { match self . bits { false => CH6OM_A :: _0 , true => CH6OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OM_A :: _1 } } # [ doc = "Write proxy for field `CH6OM`" ] pub struct CH6OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OM_A :: _1 ) } # [ 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 = "Channel 7 Output Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OM_A { # [ doc = "0: Channel output is not masked. It continues to operate normally." ] _0 , # [ doc = "1: Channel output is masked. It is forced to its inactive state." ] _1 } impl From < CH7OM_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OM_A ) -> Self { match variant { CH7OM_A :: _0 => false , CH7OM_A :: _1 => true } } } # [ doc = "Reader of field `CH7OM`" ] pub type CH7OM_R = crate :: R < bool , CH7OM_A > ; impl CH7OM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OM_A { match self . bits { false => CH7OM_A :: _0 , true => CH7OM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OM_A :: _1 } } # [ doc = "Write proxy for field `CH7OM`" ] pub struct CH7OM_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channel output is not masked. It continues to operate normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OM_A :: _0 ) } # [ doc = "Channel output is masked. It is forced to its inactive state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OM_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Output Mask" ] # [ inline ( always ) ] pub fn ch0om ( & self ) -> CH0OM_R { CH0OM_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Output Mask" ] # [ inline ( always ) ] pub fn ch1om ( & self ) -> CH1OM_R { CH1OM_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Output Mask" ] # [ inline ( always ) ] pub fn ch2om ( & self ) -> CH2OM_R { CH2OM_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Output Mask" ] # [ inline ( always ) ] pub fn ch3om ( & self ) -> CH3OM_R { CH3OM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Output Mask" ] # [ inline ( always ) ] pub fn ch4om ( & self ) -> CH4OM_R { CH4OM_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Output Mask" ] # [ inline ( always ) ] pub fn ch5om ( & self ) -> CH5OM_R { CH5OM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Output Mask" ] # [ inline ( always ) ] pub fn ch6om ( & self ) -> CH6OM_R { CH6OM_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Output Mask" ] # [ inline ( always ) ] pub fn ch7om ( & self ) -> CH7OM_R { CH7OM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Output Mask" ] # [ inline ( always ) ] pub fn ch0om ( & mut self ) -> CH0OM_W { CH0OM_W { w : self } } # [ doc = "Bit 1 - Channel 1 Output Mask" ] # [ inline ( always ) ] pub fn ch1om ( & mut self ) -> CH1OM_W { CH1OM_W { w : self } } # [ doc = "Bit 2 - Channel 2 Output Mask" ] # [ inline ( always ) ] pub fn ch2om ( & mut self ) -> CH2OM_W { CH2OM_W { w : self } } # [ doc = "Bit 3 - Channel 3 Output Mask" ] # [ inline ( always ) ] pub fn ch3om ( & mut self ) -> CH3OM_W { CH3OM_W { w : self } } # [ doc = "Bit 4 - Channel 4 Output Mask" ] # [ inline ( always ) ] pub fn ch4om ( & mut self ) -> CH4OM_W { CH4OM_W { w : self } } # [ doc = "Bit 5 - Channel 5 Output Mask" ] # [ inline ( always ) ] pub fn ch5om ( & mut self ) -> CH5OM_W { CH5OM_W { w : self } } # [ doc = "Bit 6 - Channel 6 Output Mask" ] # [ inline ( always ) ] pub fn ch6om ( & mut self ) -> CH6OM_W { CH6OM_W { w : self } } # [ doc = "Bit 7 - Channel 7 Output Mask" ] # [ inline ( always ) ] pub fn ch7om ( & mut self ) -> CH7OM_W { CH7OM_W { w : self } } } } # [ doc = "Function For Linked Channels\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [combine](combine) module" ] pub type COMBINE = crate :: Reg < u32 , _COMBINE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _COMBINE ; # [ doc = "`read()` method returns [combine::R](combine::R) reader structure" ] impl crate :: Readable for COMBINE { } # [ doc = "`write(|w| ..)` method takes [combine::W](combine::W) writer structure" ] impl crate :: Writable for COMBINE { } # [ doc = "Function For Linked Channels" ] pub mod combine { # [ doc = "Reader of register COMBINE" ] pub type R = crate :: R < u32 , super :: COMBINE > ; # [ doc = "Writer for register COMBINE" ] pub type W = crate :: W < u32 , super :: COMBINE > ; # [ doc = "Register COMBINE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: COMBINE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Combine Channels For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE0_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE0_A ) -> Self { match variant { COMBINE0_A :: _0 => false , COMBINE0_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE0`" ] pub type COMBINE0_R = crate :: R < bool , COMBINE0_A > ; impl COMBINE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE0_A { match self . bits { false => COMBINE0_A :: _0 , true => COMBINE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE0_A :: _1 } } # [ doc = "Write proxy for field `COMBINE0`" ] pub struct COMBINE0_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP0_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP0_A ) -> Self { match variant { COMP0_A :: _0 => false , COMP0_A :: _1 => true } } } # [ doc = "Reader of field `COMP0`" ] pub type COMP0_R = crate :: R < bool , COMP0_A > ; impl COMP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP0_A { match self . bits { false => COMP0_A :: _0 , true => COMP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP0_A :: _1 } } # [ doc = "Write proxy for field `COMP0`" ] pub struct COMP0_W < 'a > { w : & 'a mut W , } impl < 'a > COMP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP0_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP0_A :: _1 ) } # [ 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 } } # [ doc = "Dual Edge Capture Mode Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN0_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN0_A ) -> Self { match variant { DECAPEN0_A :: _0 => false , DECAPEN0_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN0`" ] pub type DECAPEN0_R = crate :: R < bool , DECAPEN0_A > ; impl DECAPEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN0_A { match self . bits { false => DECAPEN0_A :: _0 , true => DECAPEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN0_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN0`" ] pub struct DECAPEN0_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN0_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN0_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Captures For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP0_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP0_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP0_A ) -> Self { match variant { DECAP0_A :: _0 => false , DECAP0_A :: _1 => true } } } # [ doc = "Reader of field `DECAP0`" ] pub type DECAP0_R = crate :: R < bool , DECAP0_A > ; impl DECAP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP0_A { match self . bits { false => DECAP0_A :: _0 , true => DECAP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP0_A :: _1 } } # [ doc = "Write proxy for field `DECAP0`" ] pub struct DECAP0_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP0_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP0_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Deadtime Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN0_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN0_A ) -> Self { match variant { DTEN0_A :: _0 => false , DTEN0_A :: _1 => true } } } # [ doc = "Reader of field `DTEN0`" ] pub type DTEN0_R = crate :: R < bool , DTEN0_A > ; impl DTEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN0_A { match self . bits { false => DTEN0_A :: _0 , true => DTEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN0_A :: _1 } } # [ doc = "Write proxy for field `DTEN0`" ] pub struct DTEN0_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN0_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Synchronization Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN0_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN0_A ) -> Self { match variant { SYNCEN0_A :: _0 => false , SYNCEN0_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN0`" ] pub type SYNCEN0_R = crate :: R < bool , SYNCEN0_A > ; impl SYNCEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN0_A { match self . bits { false => SYNCEN0_A :: _0 , true => SYNCEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN0_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN0`" ] pub struct SYNCEN0_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN0_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN0_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN0_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN0_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN0_A ) -> Self { match variant { FAULTEN0_A :: _0 => false , FAULTEN0_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN0`" ] pub type FAULTEN0_R = crate :: R < bool , FAULTEN0_A > ; impl FAULTEN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN0_A { match self . bits { false => FAULTEN0_A :: _0 , true => FAULTEN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN0_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN0`" ] pub struct FAULTEN0_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN0_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN0_A :: _1 ) } # [ 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 = "Combine Channels For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE1_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE1_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE1_A ) -> Self { match variant { COMBINE1_A :: _0 => false , COMBINE1_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE1`" ] pub type COMBINE1_R = crate :: R < bool , COMBINE1_A > ; impl COMBINE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE1_A { match self . bits { false => COMBINE1_A :: _0 , true => COMBINE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE1_A :: _1 } } # [ doc = "Write proxy for field `COMBINE1`" ] pub struct COMBINE1_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE1_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE1_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP1_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP1_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP1_A ) -> Self { match variant { COMP1_A :: _0 => false , COMP1_A :: _1 => true } } } # [ doc = "Reader of field `COMP1`" ] pub type COMP1_R = crate :: R < bool , COMP1_A > ; impl COMP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP1_A { match self . bits { false => COMP1_A :: _0 , true => COMP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP1_A :: _1 } } # [ doc = "Write proxy for field `COMP1`" ] pub struct COMP1_W < 'a > { w : & 'a mut W , } impl < 'a > COMP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP1_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP1_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN1_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN1_A ) -> Self { match variant { DECAPEN1_A :: _0 => false , DECAPEN1_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN1`" ] pub type DECAPEN1_R = crate :: R < bool , DECAPEN1_A > ; impl DECAPEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN1_A { match self . bits { false => DECAPEN1_A :: _0 , true => DECAPEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN1_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN1`" ] pub struct DECAPEN1_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN1_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN1_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Captures For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP1_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP1_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP1_A ) -> Self { match variant { DECAP1_A :: _0 => false , DECAP1_A :: _1 => true } } } # [ doc = "Reader of field `DECAP1`" ] pub type DECAP1_R = crate :: R < bool , DECAP1_A > ; impl DECAP1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP1_A { match self . bits { false => DECAP1_A :: _0 , true => DECAP1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP1_A :: _1 } } # [ doc = "Write proxy for field `DECAP1`" ] pub struct DECAP1_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP1_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP1_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Deadtime Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN1_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN1_A ) -> Self { match variant { DTEN1_A :: _0 => false , DTEN1_A :: _1 => true } } } # [ doc = "Reader of field `DTEN1`" ] pub type DTEN1_R = crate :: R < bool , DTEN1_A > ; impl DTEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN1_A { match self . bits { false => DTEN1_A :: _0 , true => DTEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN1_A :: _1 } } # [ doc = "Write proxy for field `DTEN1`" ] pub struct DTEN1_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN1_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN1_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Synchronization Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN1_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN1_A ) -> Self { match variant { SYNCEN1_A :: _0 => false , SYNCEN1_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN1`" ] pub type SYNCEN1_R = crate :: R < bool , SYNCEN1_A > ; impl SYNCEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN1_A { match self . bits { false => SYNCEN1_A :: _0 , true => SYNCEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN1_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN1`" ] pub struct SYNCEN1_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN1_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN1_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN1_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN1_A ) -> Self { match variant { FAULTEN1_A :: _0 => false , FAULTEN1_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN1`" ] pub type FAULTEN1_R = crate :: R < bool , FAULTEN1_A > ; impl FAULTEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN1_A { match self . bits { false => FAULTEN1_A :: _0 , true => FAULTEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN1_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN1`" ] pub struct FAULTEN1_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN1_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN1_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Combine Channels For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE2_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE2_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE2_A ) -> Self { match variant { COMBINE2_A :: _0 => false , COMBINE2_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE2`" ] pub type COMBINE2_R = crate :: R < bool , COMBINE2_A > ; impl COMBINE2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE2_A { match self . bits { false => COMBINE2_A :: _0 , true => COMBINE2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE2_A :: _1 } } # [ doc = "Write proxy for field `COMBINE2`" ] pub struct COMBINE2_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE2_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE2_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Complement Of Channel (n) For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP2_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP2_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP2_A ) -> Self { match variant { COMP2_A :: _0 => false , COMP2_A :: _1 => true } } } # [ doc = "Reader of field `COMP2`" ] pub type COMP2_R = crate :: R < bool , COMP2_A > ; impl COMP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP2_A { match self . bits { false => COMP2_A :: _0 , true => COMP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP2_A :: _1 } } # [ doc = "Write proxy for field `COMP2`" ] pub struct COMP2_W < 'a > { w : & 'a mut W , } impl < 'a > COMP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP2_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP2_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN2_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN2_A ) -> Self { match variant { DECAPEN2_A :: _0 => false , DECAPEN2_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN2`" ] pub type DECAPEN2_R = crate :: R < bool , DECAPEN2_A > ; impl DECAPEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN2_A { match self . bits { false => DECAPEN2_A :: _0 , true => DECAPEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN2_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN2`" ] pub struct DECAPEN2_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN2_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN2_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Dual Edge Capture Mode Captures For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP2_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP2_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP2_A ) -> Self { match variant { DECAP2_A :: _0 => false , DECAP2_A :: _1 => true } } } # [ doc = "Reader of field `DECAP2`" ] pub type DECAP2_R = crate :: R < bool , DECAP2_A > ; impl DECAP2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP2_A { match self . bits { false => DECAP2_A :: _0 , true => DECAP2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP2_A :: _1 } } # [ doc = "Write proxy for field `DECAP2`" ] pub struct DECAP2_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP2_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP2_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Deadtime Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN2_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN2_A ) -> Self { match variant { DTEN2_A :: _0 => false , DTEN2_A :: _1 => true } } } # [ doc = "Reader of field `DTEN2`" ] pub type DTEN2_R = crate :: R < bool , DTEN2_A > ; impl DTEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN2_A { match self . bits { false => DTEN2_A :: _0 , true => DTEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN2_A :: _1 } } # [ doc = "Write proxy for field `DTEN2`" ] pub struct DTEN2_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN2_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN2_A :: _1 ) } # [ 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 = "Synchronization Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN2_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN2_A ) -> Self { match variant { SYNCEN2_A :: _0 => false , SYNCEN2_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN2`" ] pub type SYNCEN2_R = crate :: R < bool , SYNCEN2_A > ; impl SYNCEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN2_A { match self . bits { false => SYNCEN2_A :: _0 , true => SYNCEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN2_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN2`" ] pub struct SYNCEN2_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN2_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN2_A :: _1 ) } # [ 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 = "Fault Control Enable For n = 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN2_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN2_A ) -> Self { match variant { FAULTEN2_A :: _0 => false , FAULTEN2_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN2`" ] pub type FAULTEN2_R = crate :: R < bool , FAULTEN2_A > ; impl FAULTEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN2_A { match self . bits { false => FAULTEN2_A :: _0 , true => FAULTEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN2_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN2`" ] pub struct FAULTEN2_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN2_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN2_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Combine Channels For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE3_A { # [ doc = "0: Channels (n) and (n+1) are independent." ] _0 , # [ doc = "1: Channels (n) and (n+1) are combined." ] _1 } impl From < COMBINE3_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE3_A ) -> Self { match variant { COMBINE3_A :: _0 => false , COMBINE3_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE3`" ] pub type COMBINE3_R = crate :: R < bool , COMBINE3_A > ; impl COMBINE3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE3_A { match self . bits { false => COMBINE3_A :: _0 , true => COMBINE3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE3_A :: _1 } } # [ doc = "Write proxy for field `COMBINE3`" ] pub struct COMBINE3_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels (n) and (n+1) are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE3_A :: _0 ) } # [ doc = "Channels (n) and (n+1) are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE3_A :: _1 ) } # [ 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 = "Complement Of Channel (n) for n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMP3_A { # [ doc = "0: The channel (n+1) output is the same as the channel (n) output." ] _0 , # [ doc = "1: The channel (n+1) output is the complement of the channel (n) output." ] _1 } impl From < COMP3_A > for bool { # [ inline ( always ) ] fn from ( variant : COMP3_A ) -> Self { match variant { COMP3_A :: _0 => false , COMP3_A :: _1 => true } } } # [ doc = "Reader of field `COMP3`" ] pub type COMP3_R = crate :: R < bool , COMP3_A > ; impl COMP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMP3_A { match self . bits { false => COMP3_A :: _0 , true => COMP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMP3_A :: _1 } } # [ doc = "Write proxy for field `COMP3`" ] pub struct COMP3_W < 'a > { w : & 'a mut W , } impl < 'a > COMP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel (n+1) output is the same as the channel (n) output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMP3_A :: _0 ) } # [ doc = "The channel (n+1) output is the complement of the channel (n) output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMP3_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAPEN3_A { # [ doc = "0: The Dual Edge Capture mode in this pair of channels is disabled." ] _0 , # [ doc = "1: The Dual Edge Capture mode in this pair of channels is enabled." ] _1 } impl From < DECAPEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAPEN3_A ) -> Self { match variant { DECAPEN3_A :: _0 => false , DECAPEN3_A :: _1 => true } } } # [ doc = "Reader of field `DECAPEN3`" ] pub type DECAPEN3_R = crate :: R < bool , DECAPEN3_A > ; impl DECAPEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAPEN3_A { match self . bits { false => DECAPEN3_A :: _0 , true => DECAPEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAPEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAPEN3_A :: _1 } } # [ doc = "Write proxy for field `DECAPEN3`" ] pub struct DECAPEN3_W < 'a > { w : & 'a mut W , } impl < 'a > DECAPEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAPEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The Dual Edge Capture mode in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAPEN3_A :: _0 ) } # [ doc = "The Dual Edge Capture mode in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAPEN3_A :: _1 ) } # [ 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 = "Dual Edge Capture Mode Captures For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DECAP3_A { # [ doc = "0: The dual edge captures are inactive." ] _0 , # [ doc = "1: The dual edge captures are active." ] _1 } impl From < DECAP3_A > for bool { # [ inline ( always ) ] fn from ( variant : DECAP3_A ) -> Self { match variant { DECAP3_A :: _0 => false , DECAP3_A :: _1 => true } } } # [ doc = "Reader of field `DECAP3`" ] pub type DECAP3_R = crate :: R < bool , DECAP3_A > ; impl DECAP3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DECAP3_A { match self . bits { false => DECAP3_A :: _0 , true => DECAP3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DECAP3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DECAP3_A :: _1 } } # [ doc = "Write proxy for field `DECAP3`" ] pub struct DECAP3_W < 'a > { w : & 'a mut W , } impl < 'a > DECAP3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DECAP3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dual edge captures are inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DECAP3_A :: _0 ) } # [ doc = "The dual edge captures are active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DECAP3_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Deadtime Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTEN3_A { # [ doc = "0: The deadtime insertion in this pair of channels is disabled." ] _0 , # [ doc = "1: The deadtime insertion in this pair of channels is enabled." ] _1 } impl From < DTEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : DTEN3_A ) -> Self { match variant { DTEN3_A :: _0 => false , DTEN3_A :: _1 => true } } } # [ doc = "Reader of field `DTEN3`" ] pub type DTEN3_R = crate :: R < bool , DTEN3_A > ; impl DTEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTEN3_A { match self . bits { false => DTEN3_A :: _0 , true => DTEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTEN3_A :: _1 } } # [ doc = "Write proxy for field `DTEN3`" ] pub struct DTEN3_W < 'a > { w : & 'a mut W , } impl < 'a > DTEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The deadtime insertion in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTEN3_A :: _0 ) } # [ doc = "The deadtime insertion in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTEN3_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Synchronization Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCEN3_A { # [ doc = "0: The PWM synchronization in this pair of channels is disabled." ] _0 , # [ doc = "1: The PWM synchronization in this pair of channels is enabled." ] _1 } impl From < SYNCEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCEN3_A ) -> Self { match variant { SYNCEN3_A :: _0 => false , SYNCEN3_A :: _1 => true } } } # [ doc = "Reader of field `SYNCEN3`" ] pub type SYNCEN3_R = crate :: R < bool , SYNCEN3_A > ; impl SYNCEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCEN3_A { match self . bits { false => SYNCEN3_A :: _0 , true => SYNCEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCEN3_A :: _1 } } # [ doc = "Write proxy for field `SYNCEN3`" ] pub struct SYNCEN3_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The PWM synchronization in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCEN3_A :: _0 ) } # [ doc = "The PWM synchronization in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCEN3_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Fault Control Enable For n = 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTEN3_A { # [ doc = "0: The fault control in this pair of channels is disabled." ] _0 , # [ doc = "1: The fault control in this pair of channels is enabled." ] _1 } impl From < FAULTEN3_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTEN3_A ) -> Self { match variant { FAULTEN3_A :: _0 => false , FAULTEN3_A :: _1 => true } } } # [ doc = "Reader of field `FAULTEN3`" ] pub type FAULTEN3_R = crate :: R < bool , FAULTEN3_A > ; impl FAULTEN3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTEN3_A { match self . bits { false => FAULTEN3_A :: _0 , true => FAULTEN3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTEN3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTEN3_A :: _1 } } # [ doc = "Write proxy for field `FAULTEN3`" ] pub struct FAULTEN3_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTEN3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTEN3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault control in this pair of channels is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTEN3_A :: _0 ) } # [ doc = "The fault control in this pair of channels is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTEN3_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Combine Channels For n = 0" ] # [ inline ( always ) ] pub fn combine0 ( & self ) -> COMBINE0_R { COMBINE0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Complement Of Channel (n) For n = 0" ] # [ inline ( always ) ] pub fn comp0 ( & self ) -> COMP0_R { COMP0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Dual Edge Capture Mode Enable For n = 0" ] # [ inline ( always ) ] pub fn decapen0 ( & self ) -> DECAPEN0_R { DECAPEN0_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Dual Edge Capture Mode Captures For n = 0" ] # [ inline ( always ) ] pub fn decap0 ( & self ) -> DECAP0_R { DECAP0_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Deadtime Enable For n = 0" ] # [ inline ( always ) ] pub fn dten0 ( & self ) -> DTEN0_R { DTEN0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Synchronization Enable For n = 0" ] # [ inline ( always ) ] pub fn syncen0 ( & self ) -> SYNCEN0_R { SYNCEN0_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Fault Control Enable For n = 0" ] # [ inline ( always ) ] pub fn faulten0 ( & self ) -> FAULTEN0_R { FAULTEN0_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Combine Channels For n = 2" ] # [ inline ( always ) ] pub fn combine1 ( & self ) -> COMBINE1_R { COMBINE1_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Complement Of Channel (n) For n = 2" ] # [ inline ( always ) ] pub fn comp1 ( & self ) -> COMP1_R { COMP1_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Dual Edge Capture Mode Enable For n = 2" ] # [ inline ( always ) ] pub fn decapen1 ( & self ) -> DECAPEN1_R { DECAPEN1_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Dual Edge Capture Mode Captures For n = 2" ] # [ inline ( always ) ] pub fn decap1 ( & self ) -> DECAP1_R { DECAP1_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Deadtime Enable For n = 2" ] # [ inline ( always ) ] pub fn dten1 ( & self ) -> DTEN1_R { DTEN1_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Synchronization Enable For n = 2" ] # [ inline ( always ) ] pub fn syncen1 ( & self ) -> SYNCEN1_R { SYNCEN1_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Fault Control Enable For n = 2" ] # [ inline ( always ) ] pub fn faulten1 ( & self ) -> FAULTEN1_R { FAULTEN1_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Combine Channels For n = 4" ] # [ inline ( always ) ] pub fn combine2 ( & self ) -> COMBINE2_R { COMBINE2_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Complement Of Channel (n) For n = 4" ] # [ inline ( always ) ] pub fn comp2 ( & self ) -> COMP2_R { COMP2_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Dual Edge Capture Mode Enable For n = 4" ] # [ inline ( always ) ] pub fn decapen2 ( & self ) -> DECAPEN2_R { DECAPEN2_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Dual Edge Capture Mode Captures For n = 4" ] # [ inline ( always ) ] pub fn decap2 ( & self ) -> DECAP2_R { DECAP2_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Deadtime Enable For n = 4" ] # [ inline ( always ) ] pub fn dten2 ( & self ) -> DTEN2_R { DTEN2_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Synchronization Enable For n = 4" ] # [ inline ( always ) ] pub fn syncen2 ( & self ) -> SYNCEN2_R { SYNCEN2_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Fault Control Enable For n = 4" ] # [ inline ( always ) ] pub fn faulten2 ( & self ) -> FAULTEN2_R { FAULTEN2_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Combine Channels For n = 6" ] # [ inline ( always ) ] pub fn combine3 ( & self ) -> COMBINE3_R { COMBINE3_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Complement Of Channel (n) for n = 6" ] # [ inline ( always ) ] pub fn comp3 ( & self ) -> COMP3_R { COMP3_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Dual Edge Capture Mode Enable For n = 6" ] # [ inline ( always ) ] pub fn decapen3 ( & self ) -> DECAPEN3_R { DECAPEN3_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Dual Edge Capture Mode Captures For n = 6" ] # [ inline ( always ) ] pub fn decap3 ( & self ) -> DECAP3_R { DECAP3_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Deadtime Enable For n = 6" ] # [ inline ( always ) ] pub fn dten3 ( & self ) -> DTEN3_R { DTEN3_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Synchronization Enable For n = 6" ] # [ inline ( always ) ] pub fn syncen3 ( & self ) -> SYNCEN3_R { SYNCEN3_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Fault Control Enable For n = 6" ] # [ inline ( always ) ] pub fn faulten3 ( & self ) -> FAULTEN3_R { FAULTEN3_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Combine Channels For n = 0" ] # [ inline ( always ) ] pub fn combine0 ( & mut self ) -> COMBINE0_W { COMBINE0_W { w : self } } # [ doc = "Bit 1 - Complement Of Channel (n) For n = 0" ] # [ inline ( always ) ] pub fn comp0 ( & mut self ) -> COMP0_W { COMP0_W { w : self } } # [ doc = "Bit 2 - Dual Edge Capture Mode Enable For n = 0" ] # [ inline ( always ) ] pub fn decapen0 ( & mut self ) -> DECAPEN0_W { DECAPEN0_W { w : self } } # [ doc = "Bit 3 - Dual Edge Capture Mode Captures For n = 0" ] # [ inline ( always ) ] pub fn decap0 ( & mut self ) -> DECAP0_W { DECAP0_W { w : self } } # [ doc = "Bit 4 - Deadtime Enable For n = 0" ] # [ inline ( always ) ] pub fn dten0 ( & mut self ) -> DTEN0_W { DTEN0_W { w : self } } # [ doc = "Bit 5 - Synchronization Enable For n = 0" ] # [ inline ( always ) ] pub fn syncen0 ( & mut self ) -> SYNCEN0_W { SYNCEN0_W { w : self } } # [ doc = "Bit 6 - Fault Control Enable For n = 0" ] # [ inline ( always ) ] pub fn faulten0 ( & mut self ) -> FAULTEN0_W { FAULTEN0_W { w : self } } # [ doc = "Bit 8 - Combine Channels For n = 2" ] # [ inline ( always ) ] pub fn combine1 ( & mut self ) -> COMBINE1_W { COMBINE1_W { w : self } } # [ doc = "Bit 9 - Complement Of Channel (n) For n = 2" ] # [ inline ( always ) ] pub fn comp1 ( & mut self ) -> COMP1_W { COMP1_W { w : self } } # [ doc = "Bit 10 - Dual Edge Capture Mode Enable For n = 2" ] # [ inline ( always ) ] pub fn decapen1 ( & mut self ) -> DECAPEN1_W { DECAPEN1_W { w : self } } # [ doc = "Bit 11 - Dual Edge Capture Mode Captures For n = 2" ] # [ inline ( always ) ] pub fn decap1 ( & mut self ) -> DECAP1_W { DECAP1_W { w : self } } # [ doc = "Bit 12 - Deadtime Enable For n = 2" ] # [ inline ( always ) ] pub fn dten1 ( & mut self ) -> DTEN1_W { DTEN1_W { w : self } } # [ doc = "Bit 13 - Synchronization Enable For n = 2" ] # [ inline ( always ) ] pub fn syncen1 ( & mut self ) -> SYNCEN1_W { SYNCEN1_W { w : self } } # [ doc = "Bit 14 - Fault Control Enable For n = 2" ] # [ inline ( always ) ] pub fn faulten1 ( & mut self ) -> FAULTEN1_W { FAULTEN1_W { w : self } } # [ doc = "Bit 16 - Combine Channels For n = 4" ] # [ inline ( always ) ] pub fn combine2 ( & mut self ) -> COMBINE2_W { COMBINE2_W { w : self } } # [ doc = "Bit 17 - Complement Of Channel (n) For n = 4" ] # [ inline ( always ) ] pub fn comp2 ( & mut self ) -> COMP2_W { COMP2_W { w : self } } # [ doc = "Bit 18 - Dual Edge Capture Mode Enable For n = 4" ] # [ inline ( always ) ] pub fn decapen2 ( & mut self ) -> DECAPEN2_W { DECAPEN2_W { w : self } } # [ doc = "Bit 19 - Dual Edge Capture Mode Captures For n = 4" ] # [ inline ( always ) ] pub fn decap2 ( & mut self ) -> DECAP2_W { DECAP2_W { w : self } } # [ doc = "Bit 20 - Deadtime Enable For n = 4" ] # [ inline ( always ) ] pub fn dten2 ( & mut self ) -> DTEN2_W { DTEN2_W { w : self } } # [ doc = "Bit 21 - Synchronization Enable For n = 4" ] # [ inline ( always ) ] pub fn syncen2 ( & mut self ) -> SYNCEN2_W { SYNCEN2_W { w : self } } # [ doc = "Bit 22 - Fault Control Enable For n = 4" ] # [ inline ( always ) ] pub fn faulten2 ( & mut self ) -> FAULTEN2_W { FAULTEN2_W { w : self } } # [ doc = "Bit 24 - Combine Channels For n = 6" ] # [ inline ( always ) ] pub fn combine3 ( & mut self ) -> COMBINE3_W { COMBINE3_W { w : self } } # [ doc = "Bit 25 - Complement Of Channel (n) for n = 6" ] # [ inline ( always ) ] pub fn comp3 ( & mut self ) -> COMP3_W { COMP3_W { w : self } } # [ doc = "Bit 26 - Dual Edge Capture Mode Enable For n = 6" ] # [ inline ( always ) ] pub fn decapen3 ( & mut self ) -> DECAPEN3_W { DECAPEN3_W { w : self } } # [ doc = "Bit 27 - Dual Edge Capture Mode Captures For n = 6" ] # [ inline ( always ) ] pub fn decap3 ( & mut self ) -> DECAP3_W { DECAP3_W { w : self } } # [ doc = "Bit 28 - Deadtime Enable For n = 6" ] # [ inline ( always ) ] pub fn dten3 ( & mut self ) -> DTEN3_W { DTEN3_W { w : self } } # [ doc = "Bit 29 - Synchronization Enable For n = 6" ] # [ inline ( always ) ] pub fn syncen3 ( & mut self ) -> SYNCEN3_W { SYNCEN3_W { w : self } } # [ doc = "Bit 30 - Fault Control Enable For n = 6" ] # [ inline ( always ) ] pub fn faulten3 ( & mut self ) -> FAULTEN3_W { FAULTEN3_W { w : self } } } } # [ doc = "Deadtime Insertion Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [deadtime](deadtime) module" ] pub type DEADTIME = crate :: Reg < u32 , _DEADTIME > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEADTIME ; # [ doc = "`read()` method returns [deadtime::R](deadtime::R) reader structure" ] impl crate :: Readable for DEADTIME { } # [ doc = "`write(|w| ..)` method takes [deadtime::W](deadtime::W) writer structure" ] impl crate :: Writable for DEADTIME { } # [ doc = "Deadtime Insertion Control" ] pub mod deadtime { # [ doc = "Reader of register DEADTIME" ] pub type R = crate :: R < u32 , super :: DEADTIME > ; # [ doc = "Writer for register DEADTIME" ] pub type W = crate :: W < u32 , super :: DEADTIME > ; # [ doc = "Register DEADTIME `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DEADTIME { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DTVAL`" ] pub type DTVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DTVAL`" ] pub struct DTVAL_W < 'a > { w : & 'a mut W , } impl < 'a > DTVAL_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } # [ doc = "Deadtime Prescaler Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTPS_A { # [ doc = "2: Divide the system clock by 4." ] _10 , # [ doc = "3: Divide the system clock by 16." ] _11 } impl From < DTPS_A > for u8 { # [ inline ( always ) ] fn from ( variant : DTPS_A ) -> Self { match variant { DTPS_A :: _10 => 2 , DTPS_A :: _11 => 3 } } } # [ doc = "Reader of field `DTPS`" ] pub type DTPS_R = crate :: R < u8 , DTPS_A > ; impl DTPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DTPS_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( DTPS_A :: _10 ) , 3 => Val ( DTPS_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DTPS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DTPS_A :: _11 } } # [ doc = "Write proxy for field `DTPS`" ] pub struct DTPS_W < 'a > { w : & 'a mut W , } impl < 'a > DTPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTPS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Divide the system clock by 4." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DTPS_A :: _10 ) } # [ doc = "Divide the system clock by 16." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DTPS_A :: _11 ) } # [ 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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Deadtime Value" ] # [ inline ( always ) ] pub fn dtval ( & self ) -> DTVAL_R { DTVAL_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 6:7 - Deadtime Prescaler Value" ] # [ inline ( always ) ] pub fn dtps ( & self ) -> DTPS_R { DTPS_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Deadtime Value" ] # [ inline ( always ) ] pub fn dtval ( & mut self ) -> DTVAL_W { DTVAL_W { w : self } } # [ doc = "Bits 6:7 - Deadtime Prescaler Value" ] # [ inline ( always ) ] pub fn dtps ( & mut self ) -> DTPS_W { DTPS_W { w : self } } } } # [ doc = "FTM External Trigger\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [exttrig](exttrig) module" ] pub type EXTTRIG = crate :: Reg < u32 , _EXTTRIG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EXTTRIG ; # [ doc = "`read()` method returns [exttrig::R](exttrig::R) reader structure" ] impl crate :: Readable for EXTTRIG { } # [ doc = "`write(|w| ..)` method takes [exttrig::W](exttrig::W) writer structure" ] impl crate :: Writable for EXTTRIG { } # [ doc = "FTM External Trigger" ] pub mod exttrig { # [ doc = "Reader of register EXTTRIG" ] pub type R = crate :: R < u32 , super :: EXTTRIG > ; # [ doc = "Writer for register EXTTRIG" ] pub type W = crate :: W < u32 , super :: EXTTRIG > ; # [ doc = "Register EXTTRIG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EXTTRIG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 2 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH2TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2TRIG_A ) -> Self { match variant { CH2TRIG_A :: _0 => false , CH2TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH2TRIG`" ] pub type CH2TRIG_R = crate :: R < bool , CH2TRIG_A > ; impl CH2TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2TRIG_A { match self . bits { false => CH2TRIG_A :: _0 , true => CH2TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH2TRIG`" ] pub struct CH2TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH2TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2TRIG_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 3 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH3TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3TRIG_A ) -> Self { match variant { CH3TRIG_A :: _0 => false , CH3TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH3TRIG`" ] pub type CH3TRIG_R = crate :: R < bool , CH3TRIG_A > ; impl CH3TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3TRIG_A { match self . bits { false => CH3TRIG_A :: _0 , true => CH3TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH3TRIG`" ] pub struct CH3TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH3TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3TRIG_A :: _1 ) } # [ 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 } } # [ doc = "Channel 4 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH4TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4TRIG_A ) -> Self { match variant { CH4TRIG_A :: _0 => false , CH4TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH4TRIG`" ] pub type CH4TRIG_R = crate :: R < bool , CH4TRIG_A > ; impl CH4TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4TRIG_A { match self . bits { false => CH4TRIG_A :: _0 , true => CH4TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH4TRIG`" ] pub struct CH4TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH4TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4TRIG_A :: _1 ) } # [ 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 = "Channel 5 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH5TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5TRIG_A ) -> Self { match variant { CH5TRIG_A :: _0 => false , CH5TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH5TRIG`" ] pub type CH5TRIG_R = crate :: R < bool , CH5TRIG_A > ; impl CH5TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5TRIG_A { match self . bits { false => CH5TRIG_A :: _0 , true => CH5TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH5TRIG`" ] pub struct CH5TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH5TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5TRIG_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 0 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH0TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0TRIG_A ) -> Self { match variant { CH0TRIG_A :: _0 => false , CH0TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH0TRIG`" ] pub type CH0TRIG_R = crate :: R < bool , CH0TRIG_A > ; impl CH0TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0TRIG_A { match self . bits { false => CH0TRIG_A :: _0 , true => CH0TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH0TRIG`" ] pub struct CH0TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH0TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0TRIG_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 1 Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1TRIG_A { # [ doc = "0: The generation of the channel trigger is disabled." ] _0 , # [ doc = "1: The generation of the channel trigger is enabled." ] _1 } impl From < CH1TRIG_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1TRIG_A ) -> Self { match variant { CH1TRIG_A :: _0 => false , CH1TRIG_A :: _1 => true } } } # [ doc = "Reader of field `CH1TRIG`" ] pub type CH1TRIG_R = crate :: R < bool , CH1TRIG_A > ; impl CH1TRIG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1TRIG_A { match self . bits { false => CH1TRIG_A :: _0 , true => CH1TRIG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1TRIG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1TRIG_A :: _1 } } # [ doc = "Write proxy for field `CH1TRIG`" ] pub struct CH1TRIG_W < 'a > { w : & 'a mut W , } impl < 'a > CH1TRIG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1TRIG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of the channel trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1TRIG_A :: _0 ) } # [ doc = "The generation of the channel trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1TRIG_A :: _1 ) } # [ 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 = "Initialization Trigger Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INITTRIGEN_A { # [ doc = "0: The generation of initialization trigger is disabled." ] _0 , # [ doc = "1: The generation of initialization trigger is enabled." ] _1 } impl From < INITTRIGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : INITTRIGEN_A ) -> Self { match variant { INITTRIGEN_A :: _0 => false , INITTRIGEN_A :: _1 => true } } } # [ doc = "Reader of field `INITTRIGEN`" ] pub type INITTRIGEN_R = crate :: R < bool , INITTRIGEN_A > ; impl INITTRIGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INITTRIGEN_A { match self . bits { false => INITTRIGEN_A :: _0 , true => INITTRIGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INITTRIGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INITTRIGEN_A :: _1 } } # [ doc = "Write proxy for field `INITTRIGEN`" ] pub struct INITTRIGEN_W < 'a > { w : & 'a mut W , } impl < 'a > INITTRIGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INITTRIGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The generation of initialization trigger is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INITTRIGEN_A :: _0 ) } # [ doc = "The generation of initialization trigger is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INITTRIGEN_A :: _1 ) } # [ 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 = "Channel Trigger Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGF_A { # [ doc = "0: No channel trigger was generated." ] _0 , # [ doc = "1: A channel trigger was generated." ] _1 } impl From < TRIGF_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIGF_A ) -> Self { match variant { TRIGF_A :: _0 => false , TRIGF_A :: _1 => true } } } # [ doc = "Reader of field `TRIGF`" ] pub type TRIGF_R = crate :: R < bool , TRIGF_A > ; impl TRIGF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIGF_A { match self . bits { false => TRIGF_A :: _0 , true => TRIGF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIGF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIGF_A :: _1 } } # [ doc = "Write proxy for field `TRIGF`" ] pub struct TRIGF_W < 'a > { w : & 'a mut W , } impl < 'a > TRIGF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIGF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel trigger was generated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIGF_A :: _0 ) } # [ doc = "A channel trigger was generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIGF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 2 Trigger Enable" ] # [ inline ( always ) ] pub fn ch2trig ( & self ) -> CH2TRIG_R { CH2TRIG_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 3 Trigger Enable" ] # [ inline ( always ) ] pub fn ch3trig ( & self ) -> CH3TRIG_R { CH3TRIG_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 4 Trigger Enable" ] # [ inline ( always ) ] pub fn ch4trig ( & self ) -> CH4TRIG_R { CH4TRIG_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 5 Trigger Enable" ] # [ inline ( always ) ] pub fn ch5trig ( & self ) -> CH5TRIG_R { CH5TRIG_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 0 Trigger Enable" ] # [ inline ( always ) ] pub fn ch0trig ( & self ) -> CH0TRIG_R { CH0TRIG_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 1 Trigger Enable" ] # [ inline ( always ) ] pub fn ch1trig ( & self ) -> CH1TRIG_R { CH1TRIG_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Initialization Trigger Enable" ] # [ inline ( always ) ] pub fn inittrigen ( & self ) -> INITTRIGEN_R { INITTRIGEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Trigger Flag" ] # [ inline ( always ) ] pub fn trigf ( & self ) -> TRIGF_R { TRIGF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 2 Trigger Enable" ] # [ inline ( always ) ] pub fn ch2trig ( & mut self ) -> CH2TRIG_W { CH2TRIG_W { w : self } } # [ doc = "Bit 1 - Channel 3 Trigger Enable" ] # [ inline ( always ) ] pub fn ch3trig ( & mut self ) -> CH3TRIG_W { CH3TRIG_W { w : self } } # [ doc = "Bit 2 - Channel 4 Trigger Enable" ] # [ inline ( always ) ] pub fn ch4trig ( & mut self ) -> CH4TRIG_W { CH4TRIG_W { w : self } } # [ doc = "Bit 3 - Channel 5 Trigger Enable" ] # [ inline ( always ) ] pub fn ch5trig ( & mut self ) -> CH5TRIG_W { CH5TRIG_W { w : self } } # [ doc = "Bit 4 - Channel 0 Trigger Enable" ] # [ inline ( always ) ] pub fn ch0trig ( & mut self ) -> CH0TRIG_W { CH0TRIG_W { w : self } } # [ doc = "Bit 5 - Channel 1 Trigger Enable" ] # [ inline ( always ) ] pub fn ch1trig ( & mut self ) -> CH1TRIG_W { CH1TRIG_W { w : self } } # [ doc = "Bit 6 - Initialization Trigger Enable" ] # [ inline ( always ) ] pub fn inittrigen ( & mut self ) -> INITTRIGEN_W { INITTRIGEN_W { w : self } } # [ doc = "Bit 7 - Channel Trigger Flag" ] # [ inline ( always ) ] pub fn trigf ( & mut self ) -> TRIGF_W { TRIGF_W { w : self } } } } # [ doc = "Channels Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pol](pol) module" ] pub type POL = crate :: Reg < u32 , _POL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POL ; # [ doc = "`read()` method returns [pol::R](pol::R) reader structure" ] impl crate :: Readable for POL { } # [ doc = "`write(|w| ..)` method takes [pol::W](pol::W) writer structure" ] impl crate :: Writable for POL { } # [ doc = "Channels Polarity" ] pub mod pol { # [ doc = "Reader of register POL" ] pub type R = crate :: R < u32 , super :: POL > ; # [ doc = "Writer for register POL" ] pub type W = crate :: W < u32 , super :: POL > ; # [ doc = "Register POL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: POL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL0_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL0_A > for bool { # [ inline ( always ) ] fn from ( variant : POL0_A ) -> Self { match variant { POL0_A :: _0 => false , POL0_A :: _1 => true } } } # [ doc = "Reader of field `POL0`" ] pub type POL0_R = crate :: R < bool , POL0_A > ; impl POL0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL0_A { match self . bits { false => POL0_A :: _0 , true => POL0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL0_A :: _1 } } # [ doc = "Write proxy for field `POL0`" ] pub struct POL0_W < 'a > { w : & 'a mut W , } impl < 'a > POL0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL1_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL1_A > for bool { # [ inline ( always ) ] fn from ( variant : POL1_A ) -> Self { match variant { POL1_A :: _0 => false , POL1_A :: _1 => true } } } # [ doc = "Reader of field `POL1`" ] pub type POL1_R = crate :: R < bool , POL1_A > ; impl POL1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL1_A { match self . bits { false => POL1_A :: _0 , true => POL1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL1_A :: _1 } } # [ doc = "Write proxy for field `POL1`" ] pub struct POL1_W < 'a > { w : & 'a mut W , } impl < 'a > POL1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL2_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL2_A > for bool { # [ inline ( always ) ] fn from ( variant : POL2_A ) -> Self { match variant { POL2_A :: _0 => false , POL2_A :: _1 => true } } } # [ doc = "Reader of field `POL2`" ] pub type POL2_R = crate :: R < bool , POL2_A > ; impl POL2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL2_A { match self . bits { false => POL2_A :: _0 , true => POL2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL2_A :: _1 } } # [ doc = "Write proxy for field `POL2`" ] pub struct POL2_W < 'a > { w : & 'a mut W , } impl < 'a > POL2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL2_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL2_A :: _1 ) } # [ 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 = "Channel 3 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL3_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL3_A > for bool { # [ inline ( always ) ] fn from ( variant : POL3_A ) -> Self { match variant { POL3_A :: _0 => false , POL3_A :: _1 => true } } } # [ doc = "Reader of field `POL3`" ] pub type POL3_R = crate :: R < bool , POL3_A > ; impl POL3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL3_A { match self . bits { false => POL3_A :: _0 , true => POL3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL3_A :: _1 } } # [ doc = "Write proxy for field `POL3`" ] pub struct POL3_W < 'a > { w : & 'a mut W , } impl < 'a > POL3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL3_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL4_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL4_A > for bool { # [ inline ( always ) ] fn from ( variant : POL4_A ) -> Self { match variant { POL4_A :: _0 => false , POL4_A :: _1 => true } } } # [ doc = "Reader of field `POL4`" ] pub type POL4_R = crate :: R < bool , POL4_A > ; impl POL4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL4_A { match self . bits { false => POL4_A :: _0 , true => POL4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL4_A :: _1 } } # [ doc = "Write proxy for field `POL4`" ] pub struct POL4_W < 'a > { w : & 'a mut W , } impl < 'a > POL4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL4_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL5_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL5_A > for bool { # [ inline ( always ) ] fn from ( variant : POL5_A ) -> Self { match variant { POL5_A :: _0 => false , POL5_A :: _1 => true } } } # [ doc = "Reader of field `POL5`" ] pub type POL5_R = crate :: R < bool , POL5_A > ; impl POL5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL5_A { match self . bits { false => POL5_A :: _0 , true => POL5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL5_A :: _1 } } # [ doc = "Write proxy for field `POL5`" ] pub struct POL5_W < 'a > { w : & 'a mut W , } impl < 'a > POL5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL5_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL5_A :: _1 ) } # [ 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 = "Channel 6 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL6_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL6_A > for bool { # [ inline ( always ) ] fn from ( variant : POL6_A ) -> Self { match variant { POL6_A :: _0 => false , POL6_A :: _1 => true } } } # [ doc = "Reader of field `POL6`" ] pub type POL6_R = crate :: R < bool , POL6_A > ; impl POL6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL6_A { match self . bits { false => POL6_A :: _0 , true => POL6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL6_A :: _1 } } # [ doc = "Write proxy for field `POL6`" ] pub struct POL6_W < 'a > { w : & 'a mut W , } impl < 'a > POL6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL6_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL6_A :: _1 ) } # [ 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 = "Channel 7 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL7_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL7_A > for bool { # [ inline ( always ) ] fn from ( variant : POL7_A ) -> Self { match variant { POL7_A :: _0 => false , POL7_A :: _1 => true } } } # [ doc = "Reader of field `POL7`" ] pub type POL7_R = crate :: R < bool , POL7_A > ; impl POL7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL7_A { match self . bits { false => POL7_A :: _0 , true => POL7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL7_A :: _1 } } # [ doc = "Write proxy for field `POL7`" ] pub struct POL7_W < 'a > { w : & 'a mut W , } impl < 'a > POL7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL7_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL7_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & self ) -> POL0_R { POL0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & self ) -> POL1_R { POL1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Polarity" ] # [ inline ( always ) ] pub fn pol2 ( & self ) -> POL2_R { POL2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Polarity" ] # [ inline ( always ) ] pub fn pol3 ( & self ) -> POL3_R { POL3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Polarity" ] # [ inline ( always ) ] pub fn pol4 ( & self ) -> POL4_R { POL4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Polarity" ] # [ inline ( always ) ] pub fn pol5 ( & self ) -> POL5_R { POL5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Polarity" ] # [ inline ( always ) ] pub fn pol6 ( & self ) -> POL6_R { POL6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Polarity" ] # [ inline ( always ) ] pub fn pol7 ( & self ) -> POL7_R { POL7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & mut self ) -> POL0_W { POL0_W { w : self } } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & mut self ) -> POL1_W { POL1_W { w : self } } # [ doc = "Bit 2 - Channel 2 Polarity" ] # [ inline ( always ) ] pub fn pol2 ( & mut self ) -> POL2_W { POL2_W { w : self } } # [ doc = "Bit 3 - Channel 3 Polarity" ] # [ inline ( always ) ] pub fn pol3 ( & mut self ) -> POL3_W { POL3_W { w : self } } # [ doc = "Bit 4 - Channel 4 Polarity" ] # [ inline ( always ) ] pub fn pol4 ( & mut self ) -> POL4_W { POL4_W { w : self } } # [ doc = "Bit 5 - Channel 5 Polarity" ] # [ inline ( always ) ] pub fn pol5 ( & mut self ) -> POL5_W { POL5_W { w : self } } # [ doc = "Bit 6 - Channel 6 Polarity" ] # [ inline ( always ) ] pub fn pol6 ( & mut self ) -> POL6_W { POL6_W { w : self } } # [ doc = "Bit 7 - Channel 7 Polarity" ] # [ inline ( always ) ] pub fn pol7 ( & mut self ) -> POL7_W { POL7_W { w : self } } } } # [ doc = "Fault Mode Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fms](fms) module" ] pub type FMS = crate :: Reg < u32 , _FMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FMS ; # [ doc = "`read()` method returns [fms::R](fms::R) reader structure" ] impl crate :: Readable for FMS { } # [ doc = "`write(|w| ..)` method takes [fms::W](fms::W) writer structure" ] impl crate :: Writable for FMS { } # [ doc = "Fault Mode Status" ] pub mod fms { # [ doc = "Reader of register FMS" ] pub type R = crate :: R < u32 , super :: FMS > ; # [ doc = "Writer for register FMS" ] pub type W = crate :: W < u32 , super :: FMS > ; # [ doc = "Register FMS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FMS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Detection Flag 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF0_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF0_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF0_A ) -> Self { match variant { FAULTF0_A :: _0 => false , FAULTF0_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF0`" ] pub type FAULTF0_R = crate :: R < bool , FAULTF0_A > ; impl FAULTF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF0_A { match self . bits { false => FAULTF0_A :: _0 , true => FAULTF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF0_A :: _1 } } # [ doc = "Write proxy for field `FAULTF0`" ] pub struct FAULTF0_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF0_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Detection Flag 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF1_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF1_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF1_A ) -> Self { match variant { FAULTF1_A :: _0 => false , FAULTF1_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF1`" ] pub type FAULTF1_R = crate :: R < bool , FAULTF1_A > ; impl FAULTF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF1_A { match self . bits { false => FAULTF1_A :: _0 , true => FAULTF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF1_A :: _1 } } # [ doc = "Write proxy for field `FAULTF1`" ] pub struct FAULTF1_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF1_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF1_A :: _1 ) } # [ 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 } } # [ doc = "Fault Detection Flag 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF2_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF2_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF2_A ) -> Self { match variant { FAULTF2_A :: _0 => false , FAULTF2_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF2`" ] pub type FAULTF2_R = crate :: R < bool , FAULTF2_A > ; impl FAULTF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF2_A { match self . bits { false => FAULTF2_A :: _0 , true => FAULTF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF2_A :: _1 } } # [ doc = "Write proxy for field `FAULTF2`" ] pub struct FAULTF2_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF2_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF2_A :: _1 ) } # [ 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 = "Fault Detection Flag 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF3_A { # [ doc = "0: No fault condition was detected at the fault input." ] _0 , # [ doc = "1: A fault condition was detected at the fault input." ] _1 } impl From < FAULTF3_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF3_A ) -> Self { match variant { FAULTF3_A :: _0 => false , FAULTF3_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF3`" ] pub type FAULTF3_R = crate :: R < bool , FAULTF3_A > ; impl FAULTF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF3_A { match self . bits { false => FAULTF3_A :: _0 , true => FAULTF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF3_A :: _1 } } # [ doc = "Write proxy for field `FAULTF3`" ] pub struct FAULTF3_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF3_A :: _0 ) } # [ doc = "A fault condition was detected at the fault input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Fault Inputs\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTIN_A { # [ doc = "0: The logic OR of the enabled fault inputs is 0." ] _0 , # [ doc = "1: The logic OR of the enabled fault inputs is 1." ] _1 } impl From < FAULTIN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTIN_A ) -> Self { match variant { FAULTIN_A :: _0 => false , FAULTIN_A :: _1 => true } } } # [ doc = "Reader of field `FAULTIN`" ] pub type FAULTIN_R = crate :: R < bool , FAULTIN_A > ; impl FAULTIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTIN_A { match self . bits { false => FAULTIN_A :: _0 , true => FAULTIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTIN_A :: _1 } } # [ doc = "Write Protection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPEN_A { # [ doc = "0: Write protection is disabled. Write protected bits can be written." ] _0 , # [ doc = "1: Write protection is enabled. Write protected bits cannot be written." ] _1 } impl From < WPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WPEN_A ) -> Self { match variant { WPEN_A :: _0 => false , WPEN_A :: _1 => true } } } # [ doc = "Reader of field `WPEN`" ] pub type WPEN_R = crate :: R < bool , WPEN_A > ; impl WPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPEN_A { match self . bits { false => WPEN_A :: _0 , true => WPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPEN_A :: _1 } } # [ doc = "Write proxy for field `WPEN`" ] pub struct WPEN_W < 'a > { w : & 'a mut W , } impl < 'a > WPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write protection is disabled. Write protected bits can be written." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPEN_A :: _0 ) } # [ doc = "Write protection is enabled. Write protected bits cannot be written." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPEN_A :: _1 ) } # [ 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 = "Fault Detection Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULTF_A { # [ doc = "0: No fault condition was detected." ] _0 , # [ doc = "1: A fault condition was detected." ] _1 } impl From < FAULTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULTF_A ) -> Self { match variant { FAULTF_A :: _0 => false , FAULTF_A :: _1 => true } } } # [ doc = "Reader of field `FAULTF`" ] pub type FAULTF_R = crate :: R < bool , FAULTF_A > ; impl FAULTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULTF_A { match self . bits { false => FAULTF_A :: _0 , true => FAULTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULTF_A :: _1 } } # [ doc = "Write proxy for field `FAULTF`" ] pub struct FAULTF_W < 'a > { w : & 'a mut W , } impl < 'a > FAULTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No fault condition was detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULTF_A :: _0 ) } # [ doc = "A fault condition was detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULTF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Fault Detection Flag 0" ] # [ inline ( always ) ] pub fn faultf0 ( & self ) -> FAULTF0_R { FAULTF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Detection Flag 1" ] # [ inline ( always ) ] pub fn faultf1 ( & self ) -> FAULTF1_R { FAULTF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Detection Flag 2" ] # [ inline ( always ) ] pub fn faultf2 ( & self ) -> FAULTF2_R { FAULTF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Detection Flag 3" ] # [ inline ( always ) ] pub fn faultf3 ( & self ) -> FAULTF3_R { FAULTF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Fault Inputs" ] # [ inline ( always ) ] pub fn faultin ( & self ) -> FAULTIN_R { FAULTIN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Write Protection Enable" ] # [ inline ( always ) ] pub fn wpen ( & self ) -> WPEN_R { WPEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fault Detection Flag" ] # [ inline ( always ) ] pub fn faultf ( & self ) -> FAULTF_R { FAULTF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Fault Detection Flag 0" ] # [ inline ( always ) ] pub fn faultf0 ( & mut self ) -> FAULTF0_W { FAULTF0_W { w : self } } # [ doc = "Bit 1 - Fault Detection Flag 1" ] # [ inline ( always ) ] pub fn faultf1 ( & mut self ) -> FAULTF1_W { FAULTF1_W { w : self } } # [ doc = "Bit 2 - Fault Detection Flag 2" ] # [ inline ( always ) ] pub fn faultf2 ( & mut self ) -> FAULTF2_W { FAULTF2_W { w : self } } # [ doc = "Bit 3 - Fault Detection Flag 3" ] # [ inline ( always ) ] pub fn faultf3 ( & mut self ) -> FAULTF3_W { FAULTF3_W { w : self } } # [ doc = "Bit 6 - Write Protection Enable" ] # [ inline ( always ) ] pub fn wpen ( & mut self ) -> WPEN_W { WPEN_W { w : self } } # [ doc = "Bit 7 - Fault Detection Flag" ] # [ inline ( always ) ] pub fn faultf ( & mut self ) -> FAULTF_W { FAULTF_W { w : self } } } } # [ doc = "Input Capture Filter Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filter](filter) module" ] pub type FILTER = crate :: Reg < u32 , _FILTER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILTER ; # [ doc = "`read()` method returns [filter::R](filter::R) reader structure" ] impl crate :: Readable for FILTER { } # [ doc = "`write(|w| ..)` method takes [filter::W](filter::W) writer structure" ] impl crate :: Writable for FILTER { } # [ doc = "Input Capture Filter Control" ] pub mod filter { # [ doc = "Reader of register FILTER" ] pub type R = crate :: R < u32 , super :: FILTER > ; # [ doc = "Writer for register FILTER" ] pub type W = crate :: W < u32 , super :: FILTER > ; # [ doc = "Register FILTER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILTER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CH0FVAL`" ] pub type CH0FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH0FVAL`" ] pub struct CH0FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0FVAL_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `CH1FVAL`" ] pub type CH1FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH1FVAL`" ] pub struct CH1FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1FVAL_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } # [ doc = "Reader of field `CH2FVAL`" ] pub type CH2FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH2FVAL`" ] pub struct CH2FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH2FVAL_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `CH3FVAL`" ] pub type CH3FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH3FVAL`" ] pub struct CH3FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH3FVAL_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 & ! ( 0x0f << 12 ) ) | ( ( ( value as u32 ) & 0x0f ) << 12 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Channel 0 Input Filter" ] # [ inline ( always ) ] pub fn ch0fval ( & self ) -> CH0FVAL_R { CH0FVAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Channel 1 Input Filter" ] # [ inline ( always ) ] pub fn ch1fval ( & self ) -> CH1FVAL_R { CH1FVAL_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Channel 2 Input Filter" ] # [ inline ( always ) ] pub fn ch2fval ( & self ) -> CH2FVAL_R { CH2FVAL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - Channel 3 Input Filter" ] # [ inline ( always ) ] pub fn ch3fval ( & self ) -> CH3FVAL_R { CH3FVAL_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Channel 0 Input Filter" ] # [ inline ( always ) ] pub fn ch0fval ( & mut self ) -> CH0FVAL_W { CH0FVAL_W { w : self } } # [ doc = "Bits 4:7 - Channel 1 Input Filter" ] # [ inline ( always ) ] pub fn ch1fval ( & mut self ) -> CH1FVAL_W { CH1FVAL_W { w : self } } # [ doc = "Bits 8:11 - Channel 2 Input Filter" ] # [ inline ( always ) ] pub fn ch2fval ( & mut self ) -> CH2FVAL_W { CH2FVAL_W { w : self } } # [ doc = "Bits 12:15 - Channel 3 Input Filter" ] # [ inline ( always ) ] pub fn ch3fval ( & mut self ) -> CH3FVAL_W { CH3FVAL_W { w : self } } } } # [ doc = "Fault Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fltctrl](fltctrl) module" ] pub type FLTCTRL = crate :: Reg < u32 , _FLTCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLTCTRL ; # [ doc = "`read()` method returns [fltctrl::R](fltctrl::R) reader structure" ] impl crate :: Readable for FLTCTRL { } # [ doc = "`write(|w| ..)` method takes [fltctrl::W](fltctrl::W) writer structure" ] impl crate :: Writable for FLTCTRL { } # [ doc = "Fault Control" ] pub mod fltctrl { # [ doc = "Reader of register FLTCTRL" ] pub type R = crate :: R < u32 , super :: FLTCTRL > ; # [ doc = "Writer for register FLTCTRL" ] pub type W = crate :: W < u32 , super :: FLTCTRL > ; # [ doc = "Register FLTCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLTCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Input 0 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT0EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT0EN_A ) -> Self { match variant { FAULT0EN_A :: _0 => false , FAULT0EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT0EN`" ] pub type FAULT0EN_R = crate :: R < bool , FAULT0EN_A > ; impl FAULT0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT0EN_A { match self . bits { false => FAULT0EN_A :: _0 , true => FAULT0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT0EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT0EN`" ] pub struct FAULT0EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT0EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT0EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Input 1 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT1EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT1EN_A ) -> Self { match variant { FAULT1EN_A :: _0 => false , FAULT1EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT1EN`" ] pub type FAULT1EN_R = crate :: R < bool , FAULT1EN_A > ; impl FAULT1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT1EN_A { match self . bits { false => FAULT1EN_A :: _0 , true => FAULT1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT1EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT1EN`" ] pub struct FAULT1EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT1EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT1EN_A :: _1 ) } # [ 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 } } # [ doc = "Fault Input 2 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT2EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT2EN_A ) -> Self { match variant { FAULT2EN_A :: _0 => false , FAULT2EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT2EN`" ] pub type FAULT2EN_R = crate :: R < bool , FAULT2EN_A > ; impl FAULT2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT2EN_A { match self . bits { false => FAULT2EN_A :: _0 , true => FAULT2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT2EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT2EN`" ] pub struct FAULT2EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT2EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT2EN_A :: _1 ) } # [ 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 = "Fault Input 3 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAULT3EN_A { # [ doc = "0: Fault input is disabled." ] _0 , # [ doc = "1: Fault input is enabled." ] _1 } impl From < FAULT3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FAULT3EN_A ) -> Self { match variant { FAULT3EN_A :: _0 => false , FAULT3EN_A :: _1 => true } } } # [ doc = "Reader of field `FAULT3EN`" ] pub type FAULT3EN_R = crate :: R < bool , FAULT3EN_A > ; impl FAULT3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FAULT3EN_A { match self . bits { false => FAULT3EN_A :: _0 , true => FAULT3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FAULT3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FAULT3EN_A :: _1 } } # [ doc = "Write proxy for field `FAULT3EN`" ] pub struct FAULT3EN_W < 'a > { w : & 'a mut W , } impl < 'a > FAULT3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FAULT3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FAULT3EN_A :: _0 ) } # [ doc = "Fault input is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FAULT3EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Fault Input 0 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR0EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR0EN_A ) -> Self { match variant { FFLTR0EN_A :: _0 => false , FFLTR0EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR0EN`" ] pub type FFLTR0EN_R = crate :: R < bool , FFLTR0EN_A > ; impl FFLTR0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR0EN_A { match self . bits { false => FFLTR0EN_A :: _0 , true => FFLTR0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR0EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR0EN`" ] pub struct FFLTR0EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR0EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR0EN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Fault Input 1 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR1EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR1EN_A ) -> Self { match variant { FFLTR1EN_A :: _0 => false , FFLTR1EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR1EN`" ] pub type FFLTR1EN_R = crate :: R < bool , FFLTR1EN_A > ; impl FFLTR1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR1EN_A { match self . bits { false => FFLTR1EN_A :: _0 , true => FFLTR1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR1EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR1EN`" ] pub struct FFLTR1EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR1EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR1EN_A :: _1 ) } # [ 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 = "Fault Input 2 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR2EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR2EN_A ) -> Self { match variant { FFLTR2EN_A :: _0 => false , FFLTR2EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR2EN`" ] pub type FFLTR2EN_R = crate :: R < bool , FFLTR2EN_A > ; impl FFLTR2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR2EN_A { match self . bits { false => FFLTR2EN_A :: _0 , true => FFLTR2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR2EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR2EN`" ] pub struct FFLTR2EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR2EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR2EN_A :: _1 ) } # [ 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 = "Fault Input 3 Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FFLTR3EN_A { # [ doc = "0: Fault input filter is disabled." ] _0 , # [ doc = "1: Fault input filter is enabled." ] _1 } impl From < FFLTR3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : FFLTR3EN_A ) -> Self { match variant { FFLTR3EN_A :: _0 => false , FFLTR3EN_A :: _1 => true } } } # [ doc = "Reader of field `FFLTR3EN`" ] pub type FFLTR3EN_R = crate :: R < bool , FFLTR3EN_A > ; impl FFLTR3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FFLTR3EN_A { match self . bits { false => FFLTR3EN_A :: _0 , true => FFLTR3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FFLTR3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FFLTR3EN_A :: _1 } } # [ doc = "Write proxy for field `FFLTR3EN`" ] pub struct FFLTR3EN_W < 'a > { w : & 'a mut W , } impl < 'a > FFLTR3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FFLTR3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fault input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FFLTR3EN_A :: _0 ) } # [ doc = "Fault input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FFLTR3EN_A :: _1 ) } # [ 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 = "Reader of field `FFVAL`" ] pub type FFVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FFVAL`" ] pub struct FFVAL_W < 'a > { w : & 'a mut W , } impl < 'a > FFVAL_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } impl R { # [ doc = "Bit 0 - Fault Input 0 Enable" ] # [ inline ( always ) ] pub fn fault0en ( & self ) -> FAULT0EN_R { FAULT0EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Input 1 Enable" ] # [ inline ( always ) ] pub fn fault1en ( & self ) -> FAULT1EN_R { FAULT1EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Input 2 Enable" ] # [ inline ( always ) ] pub fn fault2en ( & self ) -> FAULT2EN_R { FAULT2EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Input 3 Enable" ] # [ inline ( always ) ] pub fn fault3en ( & self ) -> FAULT3EN_R { FAULT3EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Fault Input 0 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr0en ( & self ) -> FFLTR0EN_R { FFLTR0EN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Fault Input 1 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr1en ( & self ) -> FFLTR1EN_R { FFLTR1EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Fault Input 2 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr2en ( & self ) -> FFLTR2EN_R { FFLTR2EN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fault Input 3 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr3en ( & self ) -> FFLTR3EN_R { FFLTR3EN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - Fault Input Filter" ] # [ inline ( always ) ] pub fn ffval ( & self ) -> FFVAL_R { FFVAL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Fault Input 0 Enable" ] # [ inline ( always ) ] pub fn fault0en ( & mut self ) -> FAULT0EN_W { FAULT0EN_W { w : self } } # [ doc = "Bit 1 - Fault Input 1 Enable" ] # [ inline ( always ) ] pub fn fault1en ( & mut self ) -> FAULT1EN_W { FAULT1EN_W { w : self } } # [ doc = "Bit 2 - Fault Input 2 Enable" ] # [ inline ( always ) ] pub fn fault2en ( & mut self ) -> FAULT2EN_W { FAULT2EN_W { w : self } } # [ doc = "Bit 3 - Fault Input 3 Enable" ] # [ inline ( always ) ] pub fn fault3en ( & mut self ) -> FAULT3EN_W { FAULT3EN_W { w : self } } # [ doc = "Bit 4 - Fault Input 0 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr0en ( & mut self ) -> FFLTR0EN_W { FFLTR0EN_W { w : self } } # [ doc = "Bit 5 - Fault Input 1 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr1en ( & mut self ) -> FFLTR1EN_W { FFLTR1EN_W { w : self } } # [ doc = "Bit 6 - Fault Input 2 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr2en ( & mut self ) -> FFLTR2EN_W { FFLTR2EN_W { w : self } } # [ doc = "Bit 7 - Fault Input 3 Filter Enable" ] # [ inline ( always ) ] pub fn ffltr3en ( & mut self ) -> FFLTR3EN_W { FFLTR3EN_W { w : self } } # [ doc = "Bits 8:11 - Fault Input Filter" ] # [ inline ( always ) ] pub fn ffval ( & mut self ) -> FFVAL_W { FFVAL_W { w : self } } } } # [ doc = "Quadrature Decoder Control And Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [qdctrl](qdctrl) module" ] pub type QDCTRL = crate :: Reg < u32 , _QDCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _QDCTRL ; # [ doc = "`read()` method returns [qdctrl::R](qdctrl::R) reader structure" ] impl crate :: Readable for QDCTRL { } # [ doc = "`write(|w| ..)` method takes [qdctrl::W](qdctrl::W) writer structure" ] impl crate :: Writable for QDCTRL { } # [ doc = "Quadrature Decoder Control And Status" ] pub mod qdctrl { # [ doc = "Reader of register QDCTRL" ] pub type R = crate :: R < u32 , super :: QDCTRL > ; # [ doc = "Writer for register QDCTRL" ] pub type W = crate :: W < u32 , super :: QDCTRL > ; # [ doc = "Register QDCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: QDCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Quadrature Decoder Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADEN_A { # [ doc = "0: Quadrature Decoder mode is disabled." ] _0 , # [ doc = "1: Quadrature Decoder mode is enabled." ] _1 } impl From < QUADEN_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADEN_A ) -> Self { match variant { QUADEN_A :: _0 => false , QUADEN_A :: _1 => true } } } # [ doc = "Reader of field `QUADEN`" ] pub type QUADEN_R = crate :: R < bool , QUADEN_A > ; impl QUADEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADEN_A { match self . bits { false => QUADEN_A :: _0 , true => QUADEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADEN_A :: _1 } } # [ doc = "Write proxy for field `QUADEN`" ] pub struct QUADEN_W < 'a > { w : & 'a mut W , } impl < 'a > QUADEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Quadrature Decoder mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _0 ) } # [ doc = "Quadrature Decoder mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Timer Overflow Direction In Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOFDIR_A { # [ doc = "0: TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes from its minimum value (CNTIN register) to its maximum value (MOD register)." ] _0 , # [ doc = "1: TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from its maximum value (MOD register) to its minimum value (CNTIN register)." ] _1 } impl From < TOFDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TOFDIR_A ) -> Self { match variant { TOFDIR_A :: _0 => false , TOFDIR_A :: _1 => true } } } # [ doc = "Reader of field `TOFDIR`" ] pub type TOFDIR_R = crate :: R < bool , TOFDIR_A > ; impl TOFDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOFDIR_A { match self . bits { false => TOFDIR_A :: _0 , true => TOFDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOFDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOFDIR_A :: _1 } } # [ doc = "FTM Counter Direction In Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADIR_A { # [ doc = "0: Counting direction is decreasing (FTM counter decrement)." ] _0 , # [ doc = "1: Counting direction is increasing (FTM counter increment)." ] _1 } impl From < QUADIR_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADIR_A ) -> Self { match variant { QUADIR_A :: _0 => false , QUADIR_A :: _1 => true } } } # [ doc = "Reader of field `QUADIR`" ] pub type QUADIR_R = crate :: R < bool , QUADIR_A > ; impl QUADIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADIR_A { match self . bits { false => QUADIR_A :: _0 , true => QUADIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADIR_A :: _1 } } # [ doc = "Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADMODE_A { # [ doc = "0: Phase A and phase B encoding mode." ] _0 , # [ doc = "1: Count and direction encoding mode." ] _1 } impl From < QUADMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADMODE_A ) -> Self { match variant { QUADMODE_A :: _0 => false , QUADMODE_A :: _1 => true } } } # [ doc = "Reader of field `QUADMODE`" ] pub type QUADMODE_R = crate :: R < bool , QUADMODE_A > ; impl QUADMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADMODE_A { match self . bits { false => QUADMODE_A :: _0 , true => QUADMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADMODE_A :: _1 } } # [ doc = "Write proxy for field `QUADMODE`" ] pub struct QUADMODE_W < 'a > { w : & 'a mut W , } impl < 'a > QUADMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase A and phase B encoding mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _0 ) } # [ doc = "Count and direction encoding mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Phase B Input Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHBPOL_A { # [ doc = "0: Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal." ] _0 , # [ doc = "1: Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal." ] _1 } impl From < PHBPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : PHBPOL_A ) -> Self { match variant { PHBPOL_A :: _0 => false , PHBPOL_A :: _1 => true } } } # [ doc = "Reader of field `PHBPOL`" ] pub type PHBPOL_R = crate :: R < bool , PHBPOL_A > ; impl PHBPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHBPOL_A { match self . bits { false => PHBPOL_A :: _0 , true => PHBPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHBPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHBPOL_A :: _1 } } # [ doc = "Write proxy for field `PHBPOL`" ] pub struct PHBPOL_W < 'a > { w : & 'a mut W , } impl < 'a > PHBPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHBPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHBPOL_A :: _0 ) } # [ doc = "Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHBPOL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Phase A Input Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHAPOL_A { # [ doc = "0: Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal." ] _0 , # [ doc = "1: Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal." ] _1 } impl From < PHAPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : PHAPOL_A ) -> Self { match variant { PHAPOL_A :: _0 => false , PHAPOL_A :: _1 => true } } } # [ doc = "Reader of field `PHAPOL`" ] pub type PHAPOL_R = crate :: R < bool , PHAPOL_A > ; impl PHAPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHAPOL_A { match self . bits { false => PHAPOL_A :: _0 , true => PHAPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHAPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHAPOL_A :: _1 } } # [ doc = "Write proxy for field `PHAPOL`" ] pub struct PHAPOL_W < 'a > { w : & 'a mut W , } impl < 'a > PHAPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHAPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHAPOL_A :: _0 ) } # [ doc = "Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHAPOL_A :: _1 ) } # [ 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 = "Phase B Input Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHBFLTREN_A { # [ doc = "0: Phase B input filter is disabled." ] _0 , # [ doc = "1: Phase B input filter is enabled." ] _1 } impl From < PHBFLTREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PHBFLTREN_A ) -> Self { match variant { PHBFLTREN_A :: _0 => false , PHBFLTREN_A :: _1 => true } } } # [ doc = "Reader of field `PHBFLTREN`" ] pub type PHBFLTREN_R = crate :: R < bool , PHBFLTREN_A > ; impl PHBFLTREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHBFLTREN_A { match self . bits { false => PHBFLTREN_A :: _0 , true => PHBFLTREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHBFLTREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHBFLTREN_A :: _1 } } # [ doc = "Write proxy for field `PHBFLTREN`" ] pub struct PHBFLTREN_W < 'a > { w : & 'a mut W , } impl < 'a > PHBFLTREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHBFLTREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase B input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHBFLTREN_A :: _0 ) } # [ doc = "Phase B input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHBFLTREN_A :: _1 ) } # [ 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 = "Phase A Input Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHAFLTREN_A { # [ doc = "0: Phase A input filter is disabled." ] _0 , # [ doc = "1: Phase A input filter is enabled." ] _1 } impl From < PHAFLTREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PHAFLTREN_A ) -> Self { match variant { PHAFLTREN_A :: _0 => false , PHAFLTREN_A :: _1 => true } } } # [ doc = "Reader of field `PHAFLTREN`" ] pub type PHAFLTREN_R = crate :: R < bool , PHAFLTREN_A > ; impl PHAFLTREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PHAFLTREN_A { match self . bits { false => PHAFLTREN_A :: _0 , true => PHAFLTREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PHAFLTREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PHAFLTREN_A :: _1 } } # [ doc = "Write proxy for field `PHAFLTREN`" ] pub struct PHAFLTREN_W < 'a > { w : & 'a mut W , } impl < 'a > PHAFLTREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PHAFLTREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase A input filter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PHAFLTREN_A :: _0 ) } # [ doc = "Phase A input filter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PHAFLTREN_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Quadrature Decoder Mode Enable" ] # [ inline ( always ) ] pub fn quaden ( & self ) -> QUADEN_R { QUADEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Timer Overflow Direction In Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn tofdir ( & self ) -> TOFDIR_R { TOFDIR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM Counter Direction In Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadir ( & self ) -> QUADIR_R { QUADIR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & self ) -> QUADMODE_R { QUADMODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Phase B Input Polarity" ] # [ inline ( always ) ] pub fn phbpol ( & self ) -> PHBPOL_R { PHBPOL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Phase A Input Polarity" ] # [ inline ( always ) ] pub fn phapol ( & self ) -> PHAPOL_R { PHAPOL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Phase B Input Filter Enable" ] # [ inline ( always ) ] pub fn phbfltren ( & self ) -> PHBFLTREN_R { PHBFLTREN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Phase A Input Filter Enable" ] # [ inline ( always ) ] pub fn phafltren ( & self ) -> PHAFLTREN_R { PHAFLTREN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Quadrature Decoder Mode Enable" ] # [ inline ( always ) ] pub fn quaden ( & mut self ) -> QUADEN_W { QUADEN_W { w : self } } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & mut self ) -> QUADMODE_W { QUADMODE_W { w : self } } # [ doc = "Bit 4 - Phase B Input Polarity" ] # [ inline ( always ) ] pub fn phbpol ( & mut self ) -> PHBPOL_W { PHBPOL_W { w : self } } # [ doc = "Bit 5 - Phase A Input Polarity" ] # [ inline ( always ) ] pub fn phapol ( & mut self ) -> PHAPOL_W { PHAPOL_W { w : self } } # [ doc = "Bit 6 - Phase B Input Filter Enable" ] # [ inline ( always ) ] pub fn phbfltren ( & mut self ) -> PHBFLTREN_W { PHBFLTREN_W { w : self } } # [ doc = "Bit 7 - Phase A Input Filter Enable" ] # [ inline ( always ) ] pub fn phafltren ( & mut self ) -> PHAFLTREN_W { PHAFLTREN_W { w : self } } } } # [ doc = "Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [conf](conf) module" ] pub type CONF = crate :: Reg < u32 , _CONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONF ; # [ doc = "`read()` method returns [conf::R](conf::R) reader structure" ] impl crate :: Readable for CONF { } # [ doc = "`write(|w| ..)` method takes [conf::W](conf::W) writer structure" ] impl crate :: Writable for CONF { } # [ doc = "Configuration" ] pub mod conf { # [ doc = "Reader of register CONF" ] pub type R = crate :: R < u32 , super :: CONF > ; # [ doc = "Writer for register CONF" ] pub type W = crate :: W < u32 , super :: CONF > ; # [ doc = "Register CONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `NUMTOF`" ] pub type NUMTOF_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `NUMTOF`" ] pub struct NUMTOF_W < 'a > { w : & 'a mut W , } impl < 'a > NUMTOF_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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } # [ doc = "Reader of field `BDMMODE`" ] pub type BDMMODE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BDMMODE`" ] pub struct BDMMODE_W < 'a > { w : & 'a mut W , } impl < 'a > BDMMODE_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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Global Time Base Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEEN_A { # [ doc = "0: Use of an external global time base is disabled." ] _0 , # [ doc = "1: Use of an external global time base is enabled." ] _1 } impl From < GTBEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEEN_A ) -> Self { match variant { GTBEEN_A :: _0 => false , GTBEEN_A :: _1 => true } } } # [ doc = "Reader of field `GTBEEN`" ] pub type GTBEEN_R = crate :: R < bool , GTBEEN_A > ; impl GTBEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEEN_A { match self . bits { false => GTBEEN_A :: _0 , true => GTBEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEEN_A :: _1 } } # [ doc = "Write proxy for field `GTBEEN`" ] pub struct GTBEEN_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use of an external global time base is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _0 ) } # [ doc = "Use of an external global time base is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Global Time Base Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEOUT_A { # [ doc = "0: A global time base signal generation is disabled." ] _0 , # [ doc = "1: A global time base signal generation is enabled." ] _1 } impl From < GTBEOUT_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEOUT_A ) -> Self { match variant { GTBEOUT_A :: _0 => false , GTBEOUT_A :: _1 => true } } } # [ doc = "Reader of field `GTBEOUT`" ] pub type GTBEOUT_R = crate :: R < bool , GTBEOUT_A > ; impl GTBEOUT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEOUT_A { match self . bits { false => GTBEOUT_A :: _0 , true => GTBEOUT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEOUT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEOUT_A :: _1 } } # [ doc = "Write proxy for field `GTBEOUT`" ] pub struct GTBEOUT_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEOUT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEOUT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A global time base signal generation is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEOUT_A :: _0 ) } # [ doc = "A global time base signal generation is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEOUT_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - TOF Frequency" ] # [ inline ( always ) ] pub fn numtof ( & self ) -> NUMTOF_R { NUMTOF_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bits 6:7 - BDM Mode" ] # [ inline ( always ) ] pub fn bdmmode ( & self ) -> BDMMODE_R { BDMMODE_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bit 9 - Global Time Base Enable" ] # [ inline ( always ) ] pub fn gtbeen ( & self ) -> GTBEEN_R { GTBEEN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Global Time Base Output" ] # [ inline ( always ) ] pub fn gtbeout ( & self ) -> GTBEOUT_R { GTBEOUT_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - TOF Frequency" ] # [ inline ( always ) ] pub fn numtof ( & mut self ) -> NUMTOF_W { NUMTOF_W { w : self } } # [ doc = "Bits 6:7 - BDM Mode" ] # [ inline ( always ) ] pub fn bdmmode ( & mut self ) -> BDMMODE_W { BDMMODE_W { w : self } } # [ doc = "Bit 9 - Global Time Base Enable" ] # [ inline ( always ) ] pub fn gtbeen ( & mut self ) -> GTBEEN_W { GTBEEN_W { w : self } } # [ doc = "Bit 10 - Global Time Base Output" ] # [ inline ( always ) ] pub fn gtbeout ( & mut self ) -> GTBEOUT_W { GTBEOUT_W { w : self } } } } # [ doc = "FTM Fault Input Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fltpol](fltpol) module" ] pub type FLTPOL = crate :: Reg < u32 , _FLTPOL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLTPOL ; # [ doc = "`read()` method returns [fltpol::R](fltpol::R) reader structure" ] impl crate :: Readable for FLTPOL { } # [ doc = "`write(|w| ..)` method takes [fltpol::W](fltpol::W) writer structure" ] impl crate :: Writable for FLTPOL { } # [ doc = "FTM Fault Input Polarity" ] pub mod fltpol { # [ doc = "Reader of register FLTPOL" ] pub type R = crate :: R < u32 , super :: FLTPOL > ; # [ doc = "Writer for register FLTPOL" ] pub type W = crate :: W < u32 , super :: FLTPOL > ; # [ doc = "Register FLTPOL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLTPOL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Fault Input 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT0POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT0POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT0POL_A ) -> Self { match variant { FLT0POL_A :: _0 => false , FLT0POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT0POL`" ] pub type FLT0POL_R = crate :: R < bool , FLT0POL_A > ; impl FLT0POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT0POL_A { match self . bits { false => FLT0POL_A :: _0 , true => FLT0POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT0POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT0POL_A :: _1 } } # [ doc = "Write proxy for field `FLT0POL`" ] pub struct FLT0POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT0POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT0POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT0POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT0POL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Fault Input 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT1POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT1POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT1POL_A ) -> Self { match variant { FLT1POL_A :: _0 => false , FLT1POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT1POL`" ] pub type FLT1POL_R = crate :: R < bool , FLT1POL_A > ; impl FLT1POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT1POL_A { match self . bits { false => FLT1POL_A :: _0 , true => FLT1POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT1POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT1POL_A :: _1 } } # [ doc = "Write proxy for field `FLT1POL`" ] pub struct FLT1POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT1POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT1POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT1POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT1POL_A :: _1 ) } # [ 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 } } # [ doc = "Fault Input 2 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT2POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT2POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT2POL_A ) -> Self { match variant { FLT2POL_A :: _0 => false , FLT2POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT2POL`" ] pub type FLT2POL_R = crate :: R < bool , FLT2POL_A > ; impl FLT2POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT2POL_A { match self . bits { false => FLT2POL_A :: _0 , true => FLT2POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT2POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT2POL_A :: _1 } } # [ doc = "Write proxy for field `FLT2POL`" ] pub struct FLT2POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT2POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT2POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT2POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT2POL_A :: _1 ) } # [ 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 = "Fault Input 3 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT3POL_A { # [ doc = "0: The fault input polarity is active high. A 1 at the fault input indicates a fault." ] _0 , # [ doc = "1: The fault input polarity is active low. A 0 at the fault input indicates a fault." ] _1 } impl From < FLT3POL_A > for bool { # [ inline ( always ) ] fn from ( variant : FLT3POL_A ) -> Self { match variant { FLT3POL_A :: _0 => false , FLT3POL_A :: _1 => true } } } # [ doc = "Reader of field `FLT3POL`" ] pub type FLT3POL_R = crate :: R < bool , FLT3POL_A > ; impl FLT3POL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLT3POL_A { match self . bits { false => FLT3POL_A :: _0 , true => FLT3POL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT3POL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLT3POL_A :: _1 } } # [ doc = "Write proxy for field `FLT3POL`" ] pub struct FLT3POL_W < 'a > { w : & 'a mut W , } impl < 'a > FLT3POL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT3POL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The fault input polarity is active high. A 1 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT3POL_A :: _0 ) } # [ doc = "The fault input polarity is active low. A 0 at the fault input indicates a fault." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLT3POL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Fault Input 0 Polarity" ] # [ inline ( always ) ] pub fn flt0pol ( & self ) -> FLT0POL_R { FLT0POL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Fault Input 1 Polarity" ] # [ inline ( always ) ] pub fn flt1pol ( & self ) -> FLT1POL_R { FLT1POL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Fault Input 2 Polarity" ] # [ inline ( always ) ] pub fn flt2pol ( & self ) -> FLT2POL_R { FLT2POL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Fault Input 3 Polarity" ] # [ inline ( always ) ] pub fn flt3pol ( & self ) -> FLT3POL_R { FLT3POL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Fault Input 0 Polarity" ] # [ inline ( always ) ] pub fn flt0pol ( & mut self ) -> FLT0POL_W { FLT0POL_W { w : self } } # [ doc = "Bit 1 - Fault Input 1 Polarity" ] # [ inline ( always ) ] pub fn flt1pol ( & mut self ) -> FLT1POL_W { FLT1POL_W { w : self } } # [ doc = "Bit 2 - Fault Input 2 Polarity" ] # [ inline ( always ) ] pub fn flt2pol ( & mut self ) -> FLT2POL_W { FLT2POL_W { w : self } } # [ doc = "Bit 3 - Fault Input 3 Polarity" ] # [ inline ( always ) ] pub fn flt3pol ( & mut self ) -> FLT3POL_W { FLT3POL_W { w : self } } } } # [ doc = "Synchronization Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [synconf](synconf) module" ] pub type SYNCONF = crate :: Reg < u32 , _SYNCONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYNCONF ; # [ doc = "`read()` method returns [synconf::R](synconf::R) reader structure" ] impl crate :: Readable for SYNCONF { } # [ doc = "`write(|w| ..)` method takes [synconf::W](synconf::W) writer structure" ] impl crate :: Writable for SYNCONF { } # [ doc = "Synchronization Configuration" ] pub mod synconf { # [ doc = "Reader of register SYNCONF" ] pub type R = crate :: R < u32 , super :: SYNCONF > ; # [ doc = "Writer for register SYNCONF" ] pub type W = crate :: W < u32 , super :: SYNCONF > ; # [ doc = "Register SYNCONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SYNCONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Hardware Trigger Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWTRIGMODE_A { # [ doc = "0: FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] _0 , # [ doc = "1: FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] _1 } impl From < HWTRIGMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : HWTRIGMODE_A ) -> Self { match variant { HWTRIGMODE_A :: _0 => false , HWTRIGMODE_A :: _1 => true } } } # [ doc = "Reader of field `HWTRIGMODE`" ] pub type HWTRIGMODE_R = crate :: R < bool , HWTRIGMODE_A > ; impl HWTRIGMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWTRIGMODE_A { match self . bits { false => HWTRIGMODE_A :: _0 , true => HWTRIGMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWTRIGMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWTRIGMODE_A :: _1 } } # [ doc = "Write proxy for field `HWTRIGMODE`" ] pub struct HWTRIGMODE_W < 'a > { w : & 'a mut W , } impl < 'a > HWTRIGMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWTRIGMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWTRIGMODE_A :: _0 ) } # [ doc = "FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWTRIGMODE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "CNTIN Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTINC_A { # [ doc = "0: CNTIN register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: CNTIN register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < CNTINC_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTINC_A ) -> Self { match variant { CNTINC_A :: _0 => false , CNTINC_A :: _1 => true } } } # [ doc = "Reader of field `CNTINC`" ] pub type CNTINC_R = crate :: R < bool , CNTINC_A > ; impl CNTINC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTINC_A { match self . bits { false => CNTINC_A :: _0 , true => CNTINC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTINC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTINC_A :: _1 } } # [ doc = "Write proxy for field `CNTINC`" ] pub struct CNTINC_W < 'a > { w : & 'a mut W , } impl < 'a > CNTINC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTINC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CNTIN register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTINC_A :: _0 ) } # [ doc = "CNTIN register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTINC_A :: _1 ) } # [ 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 = "INVCTRL Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INVC_A { # [ doc = "0: INVCTRL register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: INVCTRL register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < INVC_A > for bool { # [ inline ( always ) ] fn from ( variant : INVC_A ) -> Self { match variant { INVC_A :: _0 => false , INVC_A :: _1 => true } } } # [ doc = "Reader of field `INVC`" ] pub type INVC_R = crate :: R < bool , INVC_A > ; impl INVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INVC_A { match self . bits { false => INVC_A :: _0 , true => INVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INVC_A :: _1 } } # [ doc = "Write proxy for field `INVC`" ] pub struct INVC_W < 'a > { w : & 'a mut W , } impl < 'a > INVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "INVCTRL register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INVC_A :: _0 ) } # [ doc = "INVCTRL register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INVC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "SWOCTRL Register Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWOC_A { # [ doc = "0: SWOCTRL register is updated with its buffer value at all rising edges of system clock." ] _0 , # [ doc = "1: SWOCTRL register is updated with its buffer value by the PWM synchronization." ] _1 } impl From < SWOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWOC_A ) -> Self { match variant { SWOC_A :: _0 => false , SWOC_A :: _1 => true } } } # [ doc = "Reader of field `SWOC`" ] pub type SWOC_R = crate :: R < bool , SWOC_A > ; impl SWOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWOC_A { match self . bits { false => SWOC_A :: _0 , true => SWOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWOC_A :: _1 } } # [ doc = "Write proxy for field `SWOC`" ] pub struct SWOC_W < 'a > { w : & 'a mut W , } impl < 'a > SWOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SWOCTRL register is updated with its buffer value at all rising edges of system clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWOC_A :: _0 ) } # [ doc = "SWOCTRL register is updated with its buffer value by the PWM synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWOC_A :: _1 ) } # [ 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 = "Synchronization Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNCMODE_A { # [ doc = "0: Legacy PWM synchronization is selected." ] _0 , # [ doc = "1: Enhanced PWM synchronization is selected." ] _1 } impl From < SYNCMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNCMODE_A ) -> Self { match variant { SYNCMODE_A :: _0 => false , SYNCMODE_A :: _1 => true } } } # [ doc = "Reader of field `SYNCMODE`" ] pub type SYNCMODE_R = crate :: R < bool , SYNCMODE_A > ; impl SYNCMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNCMODE_A { match self . bits { false => SYNCMODE_A :: _0 , true => SYNCMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNCMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNCMODE_A :: _1 } } # [ doc = "Write proxy for field `SYNCMODE`" ] pub struct SYNCMODE_W < 'a > { w : & 'a mut W , } impl < 'a > SYNCMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYNCMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Legacy PWM synchronization is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYNCMODE_A :: _0 ) } # [ doc = "Enhanced PWM synchronization is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYNCMODE_A :: _1 ) } # [ 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 = "FTM counter synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWRSTCNT_A { # [ doc = "0: The software trigger does not activate the FTM counter synchronization." ] _0 , # [ doc = "1: The software trigger activates the FTM counter synchronization." ] _1 } impl From < SWRSTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : SWRSTCNT_A ) -> Self { match variant { SWRSTCNT_A :: _0 => false , SWRSTCNT_A :: _1 => true } } } # [ doc = "Reader of field `SWRSTCNT`" ] pub type SWRSTCNT_R = crate :: R < bool , SWRSTCNT_A > ; impl SWRSTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWRSTCNT_A { match self . bits { false => SWRSTCNT_A :: _0 , true => SWRSTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWRSTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWRSTCNT_A :: _1 } } # [ doc = "Write proxy for field `SWRSTCNT`" ] pub struct SWRSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > SWRSTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWRSTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWRSTCNT_A :: _0 ) } # [ doc = "The software trigger activates the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWRSTCNT_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "MOD, CNTIN, and CV registers synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWWRBUF_A { # [ doc = "0: The software trigger does not activate MOD, CNTIN, and CV registers synchronization." ] _0 , # [ doc = "1: The software trigger activates MOD, CNTIN, and CV registers synchronization." ] _1 } impl From < SWWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : SWWRBUF_A ) -> Self { match variant { SWWRBUF_A :: _0 => false , SWWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `SWWRBUF`" ] pub type SWWRBUF_R = crate :: R < bool , SWWRBUF_A > ; impl SWWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWWRBUF_A { match self . bits { false => SWWRBUF_A :: _0 , true => SWWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWWRBUF_A :: _1 } } # [ doc = "Write proxy for field `SWWRBUF`" ] pub struct SWWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > SWWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWWRBUF_A :: _0 ) } # [ doc = "The software trigger activates MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWWRBUF_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Output mask synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWOM_A { # [ doc = "0: The software trigger does not activate the OUTMASK register synchronization." ] _0 , # [ doc = "1: The software trigger activates the OUTMASK register synchronization." ] _1 } impl From < SWOM_A > for bool { # [ inline ( always ) ] fn from ( variant : SWOM_A ) -> Self { match variant { SWOM_A :: _0 => false , SWOM_A :: _1 => true } } } # [ doc = "Reader of field `SWOM`" ] pub type SWOM_R = crate :: R < bool , SWOM_A > ; impl SWOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWOM_A { match self . bits { false => SWOM_A :: _0 , true => SWOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWOM_A :: _1 } } # [ doc = "Write proxy for field `SWOM`" ] pub struct SWOM_W < 'a > { w : & 'a mut W , } impl < 'a > SWOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWOM_A :: _0 ) } # [ doc = "The software trigger activates the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWOM_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Inverting control synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWINVC_A { # [ doc = "0: The software trigger does not activate the INVCTRL register synchronization." ] _0 , # [ doc = "1: The software trigger activates the INVCTRL register synchronization." ] _1 } impl From < SWINVC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWINVC_A ) -> Self { match variant { SWINVC_A :: _0 => false , SWINVC_A :: _1 => true } } } # [ doc = "Reader of field `SWINVC`" ] pub type SWINVC_R = crate :: R < bool , SWINVC_A > ; impl SWINVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWINVC_A { match self . bits { false => SWINVC_A :: _0 , true => SWINVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWINVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWINVC_A :: _1 } } # [ doc = "Write proxy for field `SWINVC`" ] pub struct SWINVC_W < 'a > { w : & 'a mut W , } impl < 'a > SWINVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWINVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWINVC_A :: _0 ) } # [ doc = "The software trigger activates the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWINVC_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Software output control synchronization is activated by the software trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWSOC_A { # [ doc = "0: The software trigger does not activate the SWOCTRL register synchronization." ] _0 , # [ doc = "1: The software trigger activates the SWOCTRL register synchronization." ] _1 } impl From < SWSOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SWSOC_A ) -> Self { match variant { SWSOC_A :: _0 => false , SWSOC_A :: _1 => true } } } # [ doc = "Reader of field `SWSOC`" ] pub type SWSOC_R = crate :: R < bool , SWSOC_A > ; impl SWSOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWSOC_A { match self . bits { false => SWSOC_A :: _0 , true => SWSOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWSOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWSOC_A :: _1 } } # [ doc = "Write proxy for field `SWSOC`" ] pub struct SWSOC_W < 'a > { w : & 'a mut W , } impl < 'a > SWSOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWSOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software trigger does not activate the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWSOC_A :: _0 ) } # [ doc = "The software trigger activates the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWSOC_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "FTM counter synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWRSTCNT_A { # [ doc = "0: A hardware trigger does not activate the FTM counter synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the FTM counter synchronization." ] _1 } impl From < HWRSTCNT_A > for bool { # [ inline ( always ) ] fn from ( variant : HWRSTCNT_A ) -> Self { match variant { HWRSTCNT_A :: _0 => false , HWRSTCNT_A :: _1 => true } } } # [ doc = "Reader of field `HWRSTCNT`" ] pub type HWRSTCNT_R = crate :: R < bool , HWRSTCNT_A > ; impl HWRSTCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWRSTCNT_A { match self . bits { false => HWRSTCNT_A :: _0 , true => HWRSTCNT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWRSTCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWRSTCNT_A :: _1 } } # [ doc = "Write proxy for field `HWRSTCNT`" ] pub struct HWRSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > HWRSTCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWRSTCNT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWRSTCNT_A :: _0 ) } # [ doc = "A hardware trigger activates the FTM counter synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWRSTCNT_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWWRBUF_A { # [ doc = "0: A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization." ] _0 , # [ doc = "1: A hardware trigger activates MOD, CNTIN, and CV registers synchronization." ] _1 } impl From < HWWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : HWWRBUF_A ) -> Self { match variant { HWWRBUF_A :: _0 => false , HWWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `HWWRBUF`" ] pub type HWWRBUF_R = crate :: R < bool , HWWRBUF_A > ; impl HWWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWWRBUF_A { match self . bits { false => HWWRBUF_A :: _0 , true => HWWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWWRBUF_A :: _1 } } # [ doc = "Write proxy for field `HWWRBUF`" ] pub struct HWWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > HWWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWWRBUF_A :: _0 ) } # [ doc = "A hardware trigger activates MOD, CNTIN, and CV registers synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWWRBUF_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Output mask synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWOM_A { # [ doc = "0: A hardware trigger does not activate the OUTMASK register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the OUTMASK register synchronization." ] _1 } impl From < HWOM_A > for bool { # [ inline ( always ) ] fn from ( variant : HWOM_A ) -> Self { match variant { HWOM_A :: _0 => false , HWOM_A :: _1 => true } } } # [ doc = "Reader of field `HWOM`" ] pub type HWOM_R = crate :: R < bool , HWOM_A > ; impl HWOM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWOM_A { match self . bits { false => HWOM_A :: _0 , true => HWOM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWOM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWOM_A :: _1 } } # [ doc = "Write proxy for field `HWOM`" ] pub struct HWOM_W < 'a > { w : & 'a mut W , } impl < 'a > HWOM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWOM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWOM_A :: _0 ) } # [ doc = "A hardware trigger activates the OUTMASK register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWOM_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Inverting control synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWINVC_A { # [ doc = "0: A hardware trigger does not activate the INVCTRL register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the INVCTRL register synchronization." ] _1 } impl From < HWINVC_A > for bool { # [ inline ( always ) ] fn from ( variant : HWINVC_A ) -> Self { match variant { HWINVC_A :: _0 => false , HWINVC_A :: _1 => true } } } # [ doc = "Reader of field `HWINVC`" ] pub type HWINVC_R = crate :: R < bool , HWINVC_A > ; impl HWINVC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWINVC_A { match self . bits { false => HWINVC_A :: _0 , true => HWINVC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWINVC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWINVC_A :: _1 } } # [ doc = "Write proxy for field `HWINVC`" ] pub struct HWINVC_W < 'a > { w : & 'a mut W , } impl < 'a > HWINVC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWINVC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWINVC_A :: _0 ) } # [ doc = "A hardware trigger activates the INVCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWINVC_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Software output control synchronization is activated by a hardware trigger.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWSOC_A { # [ doc = "0: A hardware trigger does not activate the SWOCTRL register synchronization." ] _0 , # [ doc = "1: A hardware trigger activates the SWOCTRL register synchronization." ] _1 } impl From < HWSOC_A > for bool { # [ inline ( always ) ] fn from ( variant : HWSOC_A ) -> Self { match variant { HWSOC_A :: _0 => false , HWSOC_A :: _1 => true } } } # [ doc = "Reader of field `HWSOC`" ] pub type HWSOC_R = crate :: R < bool , HWSOC_A > ; impl HWSOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HWSOC_A { match self . bits { false => HWSOC_A :: _0 , true => HWSOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HWSOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HWSOC_A :: _1 } } # [ doc = "Write proxy for field `HWSOC`" ] pub struct HWSOC_W < 'a > { w : & 'a mut W , } impl < 'a > HWSOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HWSOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A hardware trigger does not activate the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HWSOC_A :: _0 ) } # [ doc = "A hardware trigger activates the SWOCTRL register synchronization." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HWSOC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Hardware Trigger Mode" ] # [ inline ( always ) ] pub fn hwtrigmode ( & self ) -> HWTRIGMODE_R { HWTRIGMODE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - CNTIN Register Synchronization" ] # [ inline ( always ) ] pub fn cntinc ( & self ) -> CNTINC_R { CNTINC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - INVCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn invc ( & self ) -> INVC_R { INVC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - SWOCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn swoc ( & self ) -> SWOC_R { SWOC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Synchronization Mode" ] # [ inline ( always ) ] pub fn syncmode ( & self ) -> SYNCMODE_R { SYNCMODE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - FTM counter synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swrstcnt ( & self ) -> SWRSTCNT_R { SWRSTCNT_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - MOD, CNTIN, and CV registers synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swwrbuf ( & self ) -> SWWRBUF_R { SWWRBUF_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Output mask synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swom ( & self ) -> SWOM_R { SWOM_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Inverting control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swinvc ( & self ) -> SWINVC_R { SWINVC_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Software output control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swsoc ( & self ) -> SWSOC_R { SWSOC_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - FTM counter synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwrstcnt ( & self ) -> HWRSTCNT_R { HWRSTCNT_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwwrbuf ( & self ) -> HWWRBUF_R { HWWRBUF_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Output mask synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwom ( & self ) -> HWOM_R { HWOM_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Inverting control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwinvc ( & self ) -> HWINVC_R { HWINVC_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Software output control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwsoc ( & self ) -> HWSOC_R { HWSOC_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Hardware Trigger Mode" ] # [ inline ( always ) ] pub fn hwtrigmode ( & mut self ) -> HWTRIGMODE_W { HWTRIGMODE_W { w : self } } # [ doc = "Bit 2 - CNTIN Register Synchronization" ] # [ inline ( always ) ] pub fn cntinc ( & mut self ) -> CNTINC_W { CNTINC_W { w : self } } # [ doc = "Bit 4 - INVCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn invc ( & mut self ) -> INVC_W { INVC_W { w : self } } # [ doc = "Bit 5 - SWOCTRL Register Synchronization" ] # [ inline ( always ) ] pub fn swoc ( & mut self ) -> SWOC_W { SWOC_W { w : self } } # [ doc = "Bit 7 - Synchronization Mode" ] # [ inline ( always ) ] pub fn syncmode ( & mut self ) -> SYNCMODE_W { SYNCMODE_W { w : self } } # [ doc = "Bit 8 - FTM counter synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swrstcnt ( & mut self ) -> SWRSTCNT_W { SWRSTCNT_W { w : self } } # [ doc = "Bit 9 - MOD, CNTIN, and CV registers synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swwrbuf ( & mut self ) -> SWWRBUF_W { SWWRBUF_W { w : self } } # [ doc = "Bit 10 - Output mask synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swom ( & mut self ) -> SWOM_W { SWOM_W { w : self } } # [ doc = "Bit 11 - Inverting control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swinvc ( & mut self ) -> SWINVC_W { SWINVC_W { w : self } } # [ doc = "Bit 12 - Software output control synchronization is activated by the software trigger." ] # [ inline ( always ) ] pub fn swsoc ( & mut self ) -> SWSOC_W { SWSOC_W { w : self } } # [ doc = "Bit 16 - FTM counter synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwrstcnt ( & mut self ) -> HWRSTCNT_W { HWRSTCNT_W { w : self } } # [ doc = "Bit 17 - MOD, CNTIN, and CV registers synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwwrbuf ( & mut self ) -> HWWRBUF_W { HWWRBUF_W { w : self } } # [ doc = "Bit 18 - Output mask synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwom ( & mut self ) -> HWOM_W { HWOM_W { w : self } } # [ doc = "Bit 19 - Inverting control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwinvc ( & mut self ) -> HWINVC_W { HWINVC_W { w : self } } # [ doc = "Bit 20 - Software output control synchronization is activated by a hardware trigger." ] # [ inline ( always ) ] pub fn hwsoc ( & mut self ) -> HWSOC_W { HWSOC_W { w : self } } } } # [ doc = "FTM Inverting Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [invctrl](invctrl) module" ] pub type INVCTRL = crate :: Reg < u32 , _INVCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _INVCTRL ; # [ doc = "`read()` method returns [invctrl::R](invctrl::R) reader structure" ] impl crate :: Readable for INVCTRL { } # [ doc = "`write(|w| ..)` method takes [invctrl::W](invctrl::W) writer structure" ] impl crate :: Writable for INVCTRL { } # [ doc = "FTM Inverting Control" ] pub mod invctrl { # [ doc = "Reader of register INVCTRL" ] pub type R = crate :: R < u32 , super :: INVCTRL > ; # [ doc = "Writer for register INVCTRL" ] pub type W = crate :: W < u32 , super :: INVCTRL > ; # [ doc = "Register INVCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: INVCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pair Channels 0 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV0EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV0EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV0EN_A ) -> Self { match variant { INV0EN_A :: _0 => false , INV0EN_A :: _1 => true } } } # [ doc = "Reader of field `INV0EN`" ] pub type INV0EN_R = crate :: R < bool , INV0EN_A > ; impl INV0EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV0EN_A { match self . bits { false => INV0EN_A :: _0 , true => INV0EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV0EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV0EN_A :: _1 } } # [ doc = "Write proxy for field `INV0EN`" ] pub struct INV0EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV0EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV0EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV0EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV0EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pair Channels 1 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV1EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV1EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV1EN_A ) -> Self { match variant { INV1EN_A :: _0 => false , INV1EN_A :: _1 => true } } } # [ doc = "Reader of field `INV1EN`" ] pub type INV1EN_R = crate :: R < bool , INV1EN_A > ; impl INV1EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV1EN_A { match self . bits { false => INV1EN_A :: _0 , true => INV1EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV1EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV1EN_A :: _1 } } # [ doc = "Write proxy for field `INV1EN`" ] pub struct INV1EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV1EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV1EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV1EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV1EN_A :: _1 ) } # [ 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 } } # [ doc = "Pair Channels 2 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV2EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV2EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV2EN_A ) -> Self { match variant { INV2EN_A :: _0 => false , INV2EN_A :: _1 => true } } } # [ doc = "Reader of field `INV2EN`" ] pub type INV2EN_R = crate :: R < bool , INV2EN_A > ; impl INV2EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV2EN_A { match self . bits { false => INV2EN_A :: _0 , true => INV2EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV2EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV2EN_A :: _1 } } # [ doc = "Write proxy for field `INV2EN`" ] pub struct INV2EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV2EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV2EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV2EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV2EN_A :: _1 ) } # [ 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 = "Pair Channels 3 Inverting Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV3EN_A { # [ doc = "0: Inverting is disabled." ] _0 , # [ doc = "1: Inverting is enabled." ] _1 } impl From < INV3EN_A > for bool { # [ inline ( always ) ] fn from ( variant : INV3EN_A ) -> Self { match variant { INV3EN_A :: _0 => false , INV3EN_A :: _1 => true } } } # [ doc = "Reader of field `INV3EN`" ] pub type INV3EN_R = crate :: R < bool , INV3EN_A > ; impl INV3EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV3EN_A { match self . bits { false => INV3EN_A :: _0 , true => INV3EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV3EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV3EN_A :: _1 } } # [ doc = "Write proxy for field `INV3EN`" ] pub struct INV3EN_W < 'a > { w : & 'a mut W , } impl < 'a > INV3EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV3EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inverting is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV3EN_A :: _0 ) } # [ doc = "Inverting is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV3EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Pair Channels 0 Inverting Enable" ] # [ inline ( always ) ] pub fn inv0en ( & self ) -> INV0EN_R { INV0EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pair Channels 1 Inverting Enable" ] # [ inline ( always ) ] pub fn inv1en ( & self ) -> INV1EN_R { INV1EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Pair Channels 2 Inverting Enable" ] # [ inline ( always ) ] pub fn inv2en ( & self ) -> INV2EN_R { INV2EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Pair Channels 3 Inverting Enable" ] # [ inline ( always ) ] pub fn inv3en ( & self ) -> INV3EN_R { INV3EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pair Channels 0 Inverting Enable" ] # [ inline ( always ) ] pub fn inv0en ( & mut self ) -> INV0EN_W { INV0EN_W { w : self } } # [ doc = "Bit 1 - Pair Channels 1 Inverting Enable" ] # [ inline ( always ) ] pub fn inv1en ( & mut self ) -> INV1EN_W { INV1EN_W { w : self } } # [ doc = "Bit 2 - Pair Channels 2 Inverting Enable" ] # [ inline ( always ) ] pub fn inv2en ( & mut self ) -> INV2EN_W { INV2EN_W { w : self } } # [ doc = "Bit 3 - Pair Channels 3 Inverting Enable" ] # [ inline ( always ) ] pub fn inv3en ( & mut self ) -> INV3EN_W { INV3EN_W { w : self } } } } # [ doc = "FTM Software Output Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swoctrl](swoctrl) module" ] pub type SWOCTRL = crate :: Reg < u32 , _SWOCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SWOCTRL ; # [ doc = "`read()` method returns [swoctrl::R](swoctrl::R) reader structure" ] impl crate :: Readable for SWOCTRL { } # [ doc = "`write(|w| ..)` method takes [swoctrl::W](swoctrl::W) writer structure" ] impl crate :: Writable for SWOCTRL { } # [ doc = "FTM Software Output Control" ] pub mod swoctrl { # [ doc = "Reader of register SWOCTRL" ] pub type R = crate :: R < u32 , super :: SWOCTRL > ; # [ doc = "Writer for register SWOCTRL" ] pub type W = crate :: W < u32 , super :: SWOCTRL > ; # [ doc = "Register SWOCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SWOCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH0OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OC_A ) -> Self { match variant { CH0OC_A :: _0 => false , CH0OC_A :: _1 => true } } } # [ doc = "Reader of field `CH0OC`" ] pub type CH0OC_R = crate :: R < bool , CH0OC_A > ; impl CH0OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OC_A { match self . bits { false => CH0OC_A :: _0 , true => CH0OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OC_A :: _1 } } # [ doc = "Write proxy for field `CH0OC`" ] pub struct CH0OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OC_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH1OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OC_A ) -> Self { match variant { CH1OC_A :: _0 => false , CH1OC_A :: _1 => true } } } # [ doc = "Reader of field `CH1OC`" ] pub type CH1OC_R = crate :: R < bool , CH1OC_A > ; impl CH1OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OC_A { match self . bits { false => CH1OC_A :: _0 , true => CH1OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OC_A :: _1 } } # [ doc = "Write proxy for field `CH1OC`" ] pub struct CH1OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OC_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH2OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OC_A ) -> Self { match variant { CH2OC_A :: _0 => false , CH2OC_A :: _1 => true } } } # [ doc = "Reader of field `CH2OC`" ] pub type CH2OC_R = crate :: R < bool , CH2OC_A > ; impl CH2OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OC_A { match self . bits { false => CH2OC_A :: _0 , true => CH2OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OC_A :: _1 } } # [ doc = "Write proxy for field `CH2OC`" ] pub struct CH2OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OC_A :: _1 ) } # [ 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 = "Channel 3 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH3OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OC_A ) -> Self { match variant { CH3OC_A :: _0 => false , CH3OC_A :: _1 => true } } } # [ doc = "Reader of field `CH3OC`" ] pub type CH3OC_R = crate :: R < bool , CH3OC_A > ; impl CH3OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OC_A { match self . bits { false => CH3OC_A :: _0 , true => CH3OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OC_A :: _1 } } # [ doc = "Write proxy for field `CH3OC`" ] pub struct CH3OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH4OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OC_A ) -> Self { match variant { CH4OC_A :: _0 => false , CH4OC_A :: _1 => true } } } # [ doc = "Reader of field `CH4OC`" ] pub type CH4OC_R = crate :: R < bool , CH4OC_A > ; impl CH4OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OC_A { match self . bits { false => CH4OC_A :: _0 , true => CH4OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OC_A :: _1 } } # [ doc = "Write proxy for field `CH4OC`" ] pub struct CH4OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH5OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OC_A ) -> Self { match variant { CH5OC_A :: _0 => false , CH5OC_A :: _1 => true } } } # [ doc = "Reader of field `CH5OC`" ] pub type CH5OC_R = crate :: R < bool , CH5OC_A > ; impl CH5OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OC_A { match self . bits { false => CH5OC_A :: _0 , true => CH5OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OC_A :: _1 } } # [ doc = "Write proxy for field `CH5OC`" ] pub struct CH5OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OC_A :: _1 ) } # [ 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 = "Channel 6 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH6OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OC_A ) -> Self { match variant { CH6OC_A :: _0 => false , CH6OC_A :: _1 => true } } } # [ doc = "Reader of field `CH6OC`" ] pub type CH6OC_R = crate :: R < bool , CH6OC_A > ; impl CH6OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OC_A { match self . bits { false => CH6OC_A :: _0 , true => CH6OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OC_A :: _1 } } # [ doc = "Write proxy for field `CH6OC`" ] pub struct CH6OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OC_A :: _1 ) } # [ 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 = "Channel 7 Software Output Control Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OC_A { # [ doc = "0: The channel output is not affected by software output control." ] _0 , # [ doc = "1: The channel output is affected by software output control." ] _1 } impl From < CH7OC_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OC_A ) -> Self { match variant { CH7OC_A :: _0 => false , CH7OC_A :: _1 => true } } } # [ doc = "Reader of field `CH7OC`" ] pub type CH7OC_R = crate :: R < bool , CH7OC_A > ; impl CH7OC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OC_A { match self . bits { false => CH7OC_A :: _0 , true => CH7OC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OC_A :: _1 } } # [ doc = "Write proxy for field `CH7OC`" ] pub struct CH7OC_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel output is not affected by software output control." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OC_A :: _0 ) } # [ doc = "The channel output is affected by software output control." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OC_A :: _1 ) } # [ 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 = "Channel 0 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH0OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0OCV_A ) -> Self { match variant { CH0OCV_A :: _0 => false , CH0OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH0OCV`" ] pub type CH0OCV_R = crate :: R < bool , CH0OCV_A > ; impl CH0OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0OCV_A { match self . bits { false => CH0OCV_A :: _0 , true => CH0OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0OCV_A :: _1 } } # [ doc = "Write proxy for field `CH0OCV`" ] pub struct CH0OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH0OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0OCV_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Channel 1 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH1OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1OCV_A ) -> Self { match variant { CH1OCV_A :: _0 => false , CH1OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH1OCV`" ] pub type CH1OCV_R = crate :: R < bool , CH1OCV_A > ; impl CH1OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1OCV_A { match self . bits { false => CH1OCV_A :: _0 , true => CH1OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1OCV_A :: _1 } } # [ doc = "Write proxy for field `CH1OCV`" ] pub struct CH1OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH1OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1OCV_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Channel 2 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH2OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2OCV_A ) -> Self { match variant { CH2OCV_A :: _0 => false , CH2OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH2OCV`" ] pub type CH2OCV_R = crate :: R < bool , CH2OCV_A > ; impl CH2OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2OCV_A { match self . bits { false => CH2OCV_A :: _0 , true => CH2OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2OCV_A :: _1 } } # [ doc = "Write proxy for field `CH2OCV`" ] pub struct CH2OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH2OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2OCV_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Channel 3 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH3OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3OCV_A ) -> Self { match variant { CH3OCV_A :: _0 => false , CH3OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH3OCV`" ] pub type CH3OCV_R = crate :: R < bool , CH3OCV_A > ; impl CH3OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3OCV_A { match self . bits { false => CH3OCV_A :: _0 , true => CH3OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3OCV_A :: _1 } } # [ doc = "Write proxy for field `CH3OCV`" ] pub struct CH3OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH3OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3OCV_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Channel 4 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH4OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4OCV_A ) -> Self { match variant { CH4OCV_A :: _0 => false , CH4OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH4OCV`" ] pub type CH4OCV_R = crate :: R < bool , CH4OCV_A > ; impl CH4OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4OCV_A { match self . bits { false => CH4OCV_A :: _0 , true => CH4OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4OCV_A :: _1 } } # [ doc = "Write proxy for field `CH4OCV`" ] pub struct CH4OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH4OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4OCV_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Channel 5 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH5OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5OCV_A ) -> Self { match variant { CH5OCV_A :: _0 => false , CH5OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH5OCV`" ] pub type CH5OCV_R = crate :: R < bool , CH5OCV_A > ; impl CH5OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5OCV_A { match self . bits { false => CH5OCV_A :: _0 , true => CH5OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5OCV_A :: _1 } } # [ doc = "Write proxy for field `CH5OCV`" ] pub struct CH5OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH5OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5OCV_A :: _1 ) } # [ 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 = "Channel 6 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH6OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6OCV_A ) -> Self { match variant { CH6OCV_A :: _0 => false , CH6OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH6OCV`" ] pub type CH6OCV_R = crate :: R < bool , CH6OCV_A > ; impl CH6OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6OCV_A { match self . bits { false => CH6OCV_A :: _0 , true => CH6OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6OCV_A :: _1 } } # [ doc = "Write proxy for field `CH6OCV`" ] pub struct CH6OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH6OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6OCV_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Channel 7 Software Output Control Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7OCV_A { # [ doc = "0: The software output control forces 0 to the channel output." ] _0 , # [ doc = "1: The software output control forces 1 to the channel output." ] _1 } impl From < CH7OCV_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7OCV_A ) -> Self { match variant { CH7OCV_A :: _0 => false , CH7OCV_A :: _1 => true } } } # [ doc = "Reader of field `CH7OCV`" ] pub type CH7OCV_R = crate :: R < bool , CH7OCV_A > ; impl CH7OCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7OCV_A { match self . bits { false => CH7OCV_A :: _0 , true => CH7OCV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7OCV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7OCV_A :: _1 } } # [ doc = "Write proxy for field `CH7OCV`" ] pub struct CH7OCV_W < 'a > { w : & 'a mut W , } impl < 'a > CH7OCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7OCV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The software output control forces 0 to the channel output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7OCV_A :: _0 ) } # [ doc = "The software output control forces 1 to the channel output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7OCV_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch0oc ( & self ) -> CH0OC_R { CH0OC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch1oc ( & self ) -> CH1OC_R { CH1OC_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch2oc ( & self ) -> CH2OC_R { CH2OC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch3oc ( & self ) -> CH3OC_R { CH3OC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch4oc ( & self ) -> CH4OC_R { CH4OC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch5oc ( & self ) -> CH5OC_R { CH5OC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch6oc ( & self ) -> CH6OC_R { CH6OC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch7oc ( & self ) -> CH7OC_R { CH7OC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Channel 0 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch0ocv ( & self ) -> CH0OCV_R { CH0OCV_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Channel 1 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch1ocv ( & self ) -> CH1OCV_R { CH1OCV_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Channel 2 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch2ocv ( & self ) -> CH2OCV_R { CH2OCV_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Channel 3 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch3ocv ( & self ) -> CH3OCV_R { CH3OCV_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Channel 4 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch4ocv ( & self ) -> CH4OCV_R { CH4OCV_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Channel 5 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch5ocv ( & self ) -> CH5OCV_R { CH5OCV_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Channel 6 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch6ocv ( & self ) -> CH6OCV_R { CH6OCV_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Channel 7 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch7ocv ( & self ) -> CH7OCV_R { CH7OCV_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch0oc ( & mut self ) -> CH0OC_W { CH0OC_W { w : self } } # [ doc = "Bit 1 - Channel 1 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch1oc ( & mut self ) -> CH1OC_W { CH1OC_W { w : self } } # [ doc = "Bit 2 - Channel 2 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch2oc ( & mut self ) -> CH2OC_W { CH2OC_W { w : self } } # [ doc = "Bit 3 - Channel 3 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch3oc ( & mut self ) -> CH3OC_W { CH3OC_W { w : self } } # [ doc = "Bit 4 - Channel 4 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch4oc ( & mut self ) -> CH4OC_W { CH4OC_W { w : self } } # [ doc = "Bit 5 - Channel 5 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch5oc ( & mut self ) -> CH5OC_W { CH5OC_W { w : self } } # [ doc = "Bit 6 - Channel 6 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch6oc ( & mut self ) -> CH6OC_W { CH6OC_W { w : self } } # [ doc = "Bit 7 - Channel 7 Software Output Control Enable" ] # [ inline ( always ) ] pub fn ch7oc ( & mut self ) -> CH7OC_W { CH7OC_W { w : self } } # [ doc = "Bit 8 - Channel 0 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch0ocv ( & mut self ) -> CH0OCV_W { CH0OCV_W { w : self } } # [ doc = "Bit 9 - Channel 1 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch1ocv ( & mut self ) -> CH1OCV_W { CH1OCV_W { w : self } } # [ doc = "Bit 10 - Channel 2 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch2ocv ( & mut self ) -> CH2OCV_W { CH2OCV_W { w : self } } # [ doc = "Bit 11 - Channel 3 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch3ocv ( & mut self ) -> CH3OCV_W { CH3OCV_W { w : self } } # [ doc = "Bit 12 - Channel 4 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch4ocv ( & mut self ) -> CH4OCV_W { CH4OCV_W { w : self } } # [ doc = "Bit 13 - Channel 5 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch5ocv ( & mut self ) -> CH5OCV_W { CH5OCV_W { w : self } } # [ doc = "Bit 14 - Channel 6 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch6ocv ( & mut self ) -> CH6OCV_W { CH6OCV_W { w : self } } # [ doc = "Bit 15 - Channel 7 Software Output Control Value" ] # [ inline ( always ) ] pub fn ch7ocv ( & mut self ) -> CH7OCV_W { CH7OCV_W { w : self } } } } # [ doc = "FTM PWM Load\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwmload](pwmload) module" ] pub type PWMLOAD = crate :: Reg < u32 , _PWMLOAD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PWMLOAD ; # [ doc = "`read()` method returns [pwmload::R](pwmload::R) reader structure" ] impl crate :: Readable for PWMLOAD { } # [ doc = "`write(|w| ..)` method takes [pwmload::W](pwmload::W) writer structure" ] impl crate :: Writable for PWMLOAD { } # [ doc = "FTM PWM Load" ] pub mod pwmload { # [ doc = "Reader of register PWMLOAD" ] pub type R = crate :: R < u32 , super :: PWMLOAD > ; # [ doc = "Writer for register PWMLOAD" ] pub type W = crate :: W < u32 , super :: PWMLOAD > ; # [ doc = "Register PWMLOAD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PWMLOAD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH0SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0SEL_A ) -> Self { match variant { CH0SEL_A :: _0 => false , CH0SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH0SEL`" ] pub type CH0SEL_R = crate :: R < bool , CH0SEL_A > ; impl CH0SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0SEL_A { match self . bits { false => CH0SEL_A :: _0 , true => CH0SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0SEL_A :: _1 } } # [ doc = "Write proxy for field `CH0SEL`" ] pub struct CH0SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0SEL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH1SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1SEL_A ) -> Self { match variant { CH1SEL_A :: _0 => false , CH1SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH1SEL`" ] pub type CH1SEL_R = crate :: R < bool , CH1SEL_A > ; impl CH1SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1SEL_A { match self . bits { false => CH1SEL_A :: _0 , true => CH1SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1SEL_A :: _1 } } # [ doc = "Write proxy for field `CH1SEL`" ] pub struct CH1SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1SEL_A :: _1 ) } # [ 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 } } # [ doc = "Channel 2 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH2SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH2SEL_A ) -> Self { match variant { CH2SEL_A :: _0 => false , CH2SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH2SEL`" ] pub type CH2SEL_R = crate :: R < bool , CH2SEL_A > ; impl CH2SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH2SEL_A { match self . bits { false => CH2SEL_A :: _0 , true => CH2SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH2SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH2SEL_A :: _1 } } # [ doc = "Write proxy for field `CH2SEL`" ] pub struct CH2SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH2SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH2SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH2SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH2SEL_A :: _1 ) } # [ 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 = "Channel 3 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH3SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH3SEL_A ) -> Self { match variant { CH3SEL_A :: _0 => false , CH3SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH3SEL`" ] pub type CH3SEL_R = crate :: R < bool , CH3SEL_A > ; impl CH3SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH3SEL_A { match self . bits { false => CH3SEL_A :: _0 , true => CH3SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH3SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH3SEL_A :: _1 } } # [ doc = "Write proxy for field `CH3SEL`" ] pub struct CH3SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH3SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH3SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH3SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH3SEL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Channel 4 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH4SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH4SEL_A ) -> Self { match variant { CH4SEL_A :: _0 => false , CH4SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH4SEL`" ] pub type CH4SEL_R = crate :: R < bool , CH4SEL_A > ; impl CH4SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH4SEL_A { match self . bits { false => CH4SEL_A :: _0 , true => CH4SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH4SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH4SEL_A :: _1 } } # [ doc = "Write proxy for field `CH4SEL`" ] pub struct CH4SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH4SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH4SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH4SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH4SEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Channel 5 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH5SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH5SEL_A ) -> Self { match variant { CH5SEL_A :: _0 => false , CH5SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH5SEL`" ] pub type CH5SEL_R = crate :: R < bool , CH5SEL_A > ; impl CH5SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH5SEL_A { match self . bits { false => CH5SEL_A :: _0 , true => CH5SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH5SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH5SEL_A :: _1 } } # [ doc = "Write proxy for field `CH5SEL`" ] pub struct CH5SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH5SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH5SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH5SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH5SEL_A :: _1 ) } # [ 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 = "Channel 6 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH6SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH6SEL_A ) -> Self { match variant { CH6SEL_A :: _0 => false , CH6SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH6SEL`" ] pub type CH6SEL_R = crate :: R < bool , CH6SEL_A > ; impl CH6SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH6SEL_A { match self . bits { false => CH6SEL_A :: _0 , true => CH6SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH6SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH6SEL_A :: _1 } } # [ doc = "Write proxy for field `CH6SEL`" ] pub struct CH6SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH6SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH6SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH6SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH6SEL_A :: _1 ) } # [ 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 = "Channel 7 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7SEL_A { # [ doc = "0: Do not include the channel in the matching process." ] _0 , # [ doc = "1: Include the channel in the matching process." ] _1 } impl From < CH7SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : CH7SEL_A ) -> Self { match variant { CH7SEL_A :: _0 => false , CH7SEL_A :: _1 => true } } } # [ doc = "Reader of field `CH7SEL`" ] pub type CH7SEL_R = crate :: R < bool , CH7SEL_A > ; impl CH7SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH7SEL_A { match self . bits { false => CH7SEL_A :: _0 , true => CH7SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH7SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH7SEL_A :: _1 } } # [ doc = "Write proxy for field `CH7SEL`" ] pub struct CH7SEL_W < 'a > { w : & 'a mut W , } impl < 'a > CH7SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH7SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not include the channel in the matching process." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH7SEL_A :: _0 ) } # [ doc = "Include the channel in the matching process." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH7SEL_A :: _1 ) } # [ 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 = "Load Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LDOK_A { # [ doc = "0: Loading updated values is disabled." ] _0 , # [ doc = "1: Loading updated values is enabled." ] _1 } impl From < LDOK_A > for bool { # [ inline ( always ) ] fn from ( variant : LDOK_A ) -> Self { match variant { LDOK_A :: _0 => false , LDOK_A :: _1 => true } } } # [ doc = "Reader of field `LDOK`" ] pub type LDOK_R = crate :: R < bool , LDOK_A > ; impl LDOK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LDOK_A { match self . bits { false => LDOK_A :: _0 , true => LDOK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LDOK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LDOK_A :: _1 } } # [ doc = "Write proxy for field `LDOK`" ] pub struct LDOK_W < 'a > { w : & 'a mut W , } impl < 'a > LDOK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LDOK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loading updated values is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LDOK_A :: _0 ) } # [ doc = "Loading updated values is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LDOK_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Select" ] # [ inline ( always ) ] pub fn ch0sel ( & self ) -> CH0SEL_R { CH0SEL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Select" ] # [ inline ( always ) ] pub fn ch1sel ( & self ) -> CH1SEL_R { CH1SEL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Channel 2 Select" ] # [ inline ( always ) ] pub fn ch2sel ( & self ) -> CH2SEL_R { CH2SEL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Channel 3 Select" ] # [ inline ( always ) ] pub fn ch3sel ( & self ) -> CH3SEL_R { CH3SEL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel 4 Select" ] # [ inline ( always ) ] pub fn ch4sel ( & self ) -> CH4SEL_R { CH4SEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel 5 Select" ] # [ inline ( always ) ] pub fn ch5sel ( & self ) -> CH5SEL_R { CH5SEL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel 6 Select" ] # [ inline ( always ) ] pub fn ch6sel ( & self ) -> CH6SEL_R { CH6SEL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel 7 Select" ] # [ inline ( always ) ] pub fn ch7sel ( & self ) -> CH7SEL_R { CH7SEL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Load Enable" ] # [ inline ( always ) ] pub fn ldok ( & self ) -> LDOK_R { LDOK_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Select" ] # [ inline ( always ) ] pub fn ch0sel ( & mut self ) -> CH0SEL_W { CH0SEL_W { w : self } } # [ doc = "Bit 1 - Channel 1 Select" ] # [ inline ( always ) ] pub fn ch1sel ( & mut self ) -> CH1SEL_W { CH1SEL_W { w : self } } # [ doc = "Bit 2 - Channel 2 Select" ] # [ inline ( always ) ] pub fn ch2sel ( & mut self ) -> CH2SEL_W { CH2SEL_W { w : self } } # [ doc = "Bit 3 - Channel 3 Select" ] # [ inline ( always ) ] pub fn ch3sel ( & mut self ) -> CH3SEL_W { CH3SEL_W { w : self } } # [ doc = "Bit 4 - Channel 4 Select" ] # [ inline ( always ) ] pub fn ch4sel ( & mut self ) -> CH4SEL_W { CH4SEL_W { w : self } } # [ doc = "Bit 5 - Channel 5 Select" ] # [ inline ( always ) ] pub fn ch5sel ( & mut self ) -> CH5SEL_W { CH5SEL_W { w : self } } # [ doc = "Bit 6 - Channel 6 Select" ] # [ inline ( always ) ] pub fn ch6sel ( & mut self ) -> CH6SEL_W { CH6SEL_W { w : self } } # [ doc = "Bit 7 - Channel 7 Select" ] # [ inline ( always ) ] pub fn ch7sel ( & mut self ) -> CH7SEL_W { CH7SEL_W { w : self } } # [ doc = "Bit 9 - Load Enable" ] # [ inline ( always ) ] pub fn ldok ( & mut self ) -> LDOK_W { LDOK_W { w : self } } } } } # [ doc = "Analog-to-Digital Converter" ] pub struct ADC0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for ADC0 { } impl ADC0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const adc0 :: RegisterBlock { 0x4003_b000 as * const _ } } impl Deref for ADC0 { type Target = adc0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * ADC0 :: ptr ( ) } } } # [ doc = "Analog-to-Digital Converter" ] pub mod adc0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - ADC Status and Control Registers 1" ] pub sc1a : SC1 , # [ doc = "0x04 - ADC Status and Control Registers 1" ] pub sc1b : SC1 , # [ doc = "0x08 - ADC Configuration Register 1" ] pub cfg1 : CFG1 , # [ doc = "0x0c - ADC Configuration Register 2" ] pub cfg2 : CFG2 , # [ doc = "0x10 - ADC Data Result Register" ] pub ra : R , # [ doc = "0x14 - ADC Data Result Register" ] pub rb : R , # [ doc = "0x18 - Compare Value Registers" ] pub cv1 : CV , # [ doc = "0x1c - Compare Value Registers" ] pub cv2 : CV , # [ doc = "0x20 - Status and Control Register 2" ] pub sc2 : SC2 , # [ doc = "0x24 - Status and Control Register 3" ] pub sc3 : SC3 , # [ doc = "0x28 - ADC Offset Correction Register" ] pub ofs : OFS , # [ doc = "0x2c - ADC Plus-Side Gain Register" ] pub pg : PG , # [ doc = "0x30 - ADC Minus-Side Gain Register" ] pub mg : MG , # [ doc = "0x34 - ADC Plus-Side General Calibration Value Register" ] pub clpd : CLPD , # [ doc = "0x38 - ADC Plus-Side General Calibration Value Register" ] pub clps : CLPS , # [ doc = "0x3c - ADC Plus-Side General Calibration Value Register" ] pub clp4 : CLP4 , # [ doc = "0x40 - ADC Plus-Side General Calibration Value Register" ] pub clp3 : CLP3 , # [ doc = "0x44 - ADC Plus-Side General Calibration Value Register" ] pub clp2 : CLP2 , # [ doc = "0x48 - ADC Plus-Side General Calibration Value Register" ] pub clp1 : CLP1 , # [ doc = "0x4c - ADC Plus-Side General Calibration Value Register" ] pub clp0 : CLP0 , _reserved20 : [ u8 ; 4usize ] , # [ doc = "0x54 - ADC Minus-Side General Calibration Value Register" ] pub clmd : CLMD , # [ doc = "0x58 - ADC Minus-Side General Calibration Value Register" ] pub clms : CLMS , # [ doc = "0x5c - ADC Minus-Side General Calibration Value Register" ] pub clm4 : CLM4 , # [ doc = "0x60 - ADC Minus-Side General Calibration Value Register" ] pub clm3 : CLM3 , # [ doc = "0x64 - ADC Minus-Side General Calibration Value Register" ] pub clm2 : CLM2 , # [ doc = "0x68 - ADC Minus-Side General Calibration Value Register" ] pub clm1 : CLM1 , # [ doc = "0x6c - ADC Minus-Side General Calibration Value Register" ] pub clm0 : CLM0 , } # [ doc = "ADC Status and Control Registers 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc1](sc1) module" ] pub type SC1 = crate :: Reg < u32 , _SC1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC1 ; # [ doc = "`read()` method returns [sc1::R](sc1::R) reader structure" ] impl crate :: Readable for SC1 { } # [ doc = "`write(|w| ..)` method takes [sc1::W](sc1::W) writer structure" ] impl crate :: Writable for SC1 { } # [ doc = "ADC Status and Control Registers 1" ] pub mod sc1 { # [ doc = "Reader of register SC1%s" ] pub type R = crate :: R < u32 , super :: SC1 > ; # [ doc = "Writer for register SC1%s" ] pub type W = crate :: W < u32 , super :: SC1 > ; # [ doc = "Register SC1%s `reset()`'s with value 0x1f" ] impl crate :: ResetValue for super :: SC1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1f } } # [ doc = "Input channel select\n\nValue on reset: 31" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADCH_A { # [ doc = "0: When DIFF=0, DADP0 is selected as input; when DIFF=1, DAD0 is selected as input." ] _00000 , # [ doc = "1: When DIFF=0, DADP1 is selected as input; when DIFF=1, DAD1 is selected as input." ] _00001 , # [ doc = "2: When DIFF=0, DADP2 is selected as input; when DIFF=1, DAD2 is selected as input." ] _00010 , # [ doc = "3: When DIFF=0, DADP3 is selected as input; when DIFF=1, DAD3 is selected as input." ] _00011 , # [ doc = "4: When DIFF=0, AD4 is selected as input; when DIFF=1, it is reserved." ] _00100 , # [ doc = "5: When DIFF=0, AD5 is selected as input; when DIFF=1, it is reserved." ] _00101 , # [ doc = "6: When DIFF=0, AD6 is selected as input; when DIFF=1, it is reserved." ] _00110 , # [ doc = "7: When DIFF=0, AD7 is selected as input; when DIFF=1, it is reserved." ] _00111 , # [ doc = "8: When DIFF=0, AD8 is selected as input; when DIFF=1, it is reserved." ] _01000 , # [ doc = "9: When DIFF=0, AD9 is selected as input; when DIFF=1, it is reserved." ] _01001 , # [ doc = "10: When DIFF=0, AD10 is selected as input; when DIFF=1, it is reserved." ] _01010 , # [ doc = "11: When DIFF=0, AD11 is selected as input; when DIFF=1, it is reserved." ] _01011 , # [ doc = "12: When DIFF=0, AD12 is selected as input; when DIFF=1, it is reserved." ] _01100 , # [ doc = "13: When DIFF=0, AD13 is selected as input; when DIFF=1, it is reserved." ] _01101 , # [ doc = "14: When DIFF=0, AD14 is selected as input; when DIFF=1, it is reserved." ] _01110 , # [ doc = "15: When DIFF=0, AD15 is selected as input; when DIFF=1, it is reserved." ] _01111 , # [ doc = "16: When DIFF=0, AD16 is selected as input; when DIFF=1, it is reserved." ] _10000 , # [ doc = "17: When DIFF=0, AD17 is selected as input; when DIFF=1, it is reserved." ] _10001 , # [ doc = "18: When DIFF=0, AD18 is selected as input; when DIFF=1, it is reserved." ] _10010 , # [ doc = "19: When DIFF=0, AD19 is selected as input; when DIFF=1, it is reserved." ] _10011 , # [ doc = "20: When DIFF=0, AD20 is selected as input; when DIFF=1, it is reserved." ] _10100 , # [ doc = "21: When DIFF=0, AD21 is selected as input; when DIFF=1, it is reserved." ] _10101 , # [ doc = "22: When DIFF=0, AD22 is selected as input; when DIFF=1, it is reserved." ] _10110 , # [ doc = "23: When DIFF=0, AD23 is selected as input; when DIFF=1, it is reserved." ] _10111 , # [ doc = "26: When DIFF=0, Temp Sensor (single-ended) is selected as input; when DIFF=1, Temp Sensor (differential) is selected as input." ] _11010 , # [ doc = "27: When DIFF=0, Bandgap (single-ended) is selected as input; when DIFF=1, Bandgap (differential) is selected as input." ] _11011 , # [ doc = "29: When DIFF=0,VREFSH is selected as input; when DIFF=1, -VREFSH (differential) is selected as input. Voltage reference selected is determined by SC2\\[REFSEL\\]." ] _11101 , # [ doc = "30: When DIFF=0,VREFSL is selected as input; when DIFF=1, it is reserved. Voltage reference selected is determined by SC2\\[REFSEL\\]." ] _11110 , # [ doc = "31: Module is disabled." ] _11111 } impl From < ADCH_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADCH_A ) -> Self { match variant { ADCH_A :: _00000 => 0 , ADCH_A :: _00001 => 1 , ADCH_A :: _00010 => 2 , ADCH_A :: _00011 => 3 , ADCH_A :: _00100 => 4 , ADCH_A :: _00101 => 5 , ADCH_A :: _00110 => 6 , ADCH_A :: _00111 => 7 , ADCH_A :: _01000 => 8 , ADCH_A :: _01001 => 9 , ADCH_A :: _01010 => 10 , ADCH_A :: _01011 => 11 , ADCH_A :: _01100 => 12 , ADCH_A :: _01101 => 13 , ADCH_A :: _01110 => 14 , ADCH_A :: _01111 => 15 , ADCH_A :: _10000 => 16 , ADCH_A :: _10001 => 17 , ADCH_A :: _10010 => 18 , ADCH_A :: _10011 => 19 , ADCH_A :: _10100 => 20 , ADCH_A :: _10101 => 21 , ADCH_A :: _10110 => 22 , ADCH_A :: _10111 => 23 , ADCH_A :: _11010 => 26 , ADCH_A :: _11011 => 27 , ADCH_A :: _11101 => 29 , ADCH_A :: _11110 => 30 , ADCH_A :: _11111 => 31 } } } # [ doc = "Reader of field `ADCH`" ] pub type ADCH_R = crate :: R < u8 , ADCH_A > ; impl ADCH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ADCH_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ADCH_A :: _00000 ) , 1 => Val ( ADCH_A :: _00001 ) , 2 => Val ( ADCH_A :: _00010 ) , 3 => Val ( ADCH_A :: _00011 ) , 4 => Val ( ADCH_A :: _00100 ) , 5 => Val ( ADCH_A :: _00101 ) , 6 => Val ( ADCH_A :: _00110 ) , 7 => Val ( ADCH_A :: _00111 ) , 8 => Val ( ADCH_A :: _01000 ) , 9 => Val ( ADCH_A :: _01001 ) , 10 => Val ( ADCH_A :: _01010 ) , 11 => Val ( ADCH_A :: _01011 ) , 12 => Val ( ADCH_A :: _01100 ) , 13 => Val ( ADCH_A :: _01101 ) , 14 => Val ( ADCH_A :: _01110 ) , 15 => Val ( ADCH_A :: _01111 ) , 16 => Val ( ADCH_A :: _10000 ) , 17 => Val ( ADCH_A :: _10001 ) , 18 => Val ( ADCH_A :: _10010 ) , 19 => Val ( ADCH_A :: _10011 ) , 20 => Val ( ADCH_A :: _10100 ) , 21 => Val ( ADCH_A :: _10101 ) , 22 => Val ( ADCH_A :: _10110 ) , 23 => Val ( ADCH_A :: _10111 ) , 26 => Val ( ADCH_A :: _11010 ) , 27 => Val ( ADCH_A :: _11011 ) , 29 => Val ( ADCH_A :: _11101 ) , 30 => Val ( ADCH_A :: _11110 ) , 31 => Val ( ADCH_A :: _11111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00000`" ] # [ inline ( always ) ] pub fn is_00000 ( & self ) -> bool { * self == ADCH_A :: _00000 } # [ doc = "Checks if the value of the field is `_00001`" ] # [ inline ( always ) ] pub fn is_00001 ( & self ) -> bool { * self == ADCH_A :: _00001 } # [ doc = "Checks if the value of the field is `_00010`" ] # [ inline ( always ) ] pub fn is_00010 ( & self ) -> bool { * self == ADCH_A :: _00010 } # [ doc = "Checks if the value of the field is `_00011`" ] # [ inline ( always ) ] pub fn is_00011 ( & self ) -> bool { * self == ADCH_A :: _00011 } # [ doc = "Checks if the value of the field is `_00100`" ] # [ inline ( always ) ] pub fn is_00100 ( & self ) -> bool { * self == ADCH_A :: _00100 } # [ doc = "Checks if the value of the field is `_00101`" ] # [ inline ( always ) ] pub fn is_00101 ( & self ) -> bool { * self == ADCH_A :: _00101 } # [ doc = "Checks if the value of the field is `_00110`" ] # [ inline ( always ) ] pub fn is_00110 ( & self ) -> bool { * self == ADCH_A :: _00110 } # [ doc = "Checks if the value of the field is `_00111`" ] # [ inline ( always ) ] pub fn is_00111 ( & self ) -> bool { * self == ADCH_A :: _00111 } # [ doc = "Checks if the value of the field is `_01000`" ] # [ inline ( always ) ] pub fn is_01000 ( & self ) -> bool { * self == ADCH_A :: _01000 } # [ doc = "Checks if the value of the field is `_01001`" ] # [ inline ( always ) ] pub fn is_01001 ( & self ) -> bool { * self == ADCH_A :: _01001 } # [ doc = "Checks if the value of the field is `_01010`" ] # [ inline ( always ) ] pub fn is_01010 ( & self ) -> bool { * self == ADCH_A :: _01010 } # [ doc = "Checks if the value of the field is `_01011`" ] # [ inline ( always ) ] pub fn is_01011 ( & self ) -> bool { * self == ADCH_A :: _01011 } # [ doc = "Checks if the value of the field is `_01100`" ] # [ inline ( always ) ] pub fn is_01100 ( & self ) -> bool { * self == ADCH_A :: _01100 } # [ doc = "Checks if the value of the field is `_01101`" ] # [ inline ( always ) ] pub fn is_01101 ( & self ) -> bool { * self == ADCH_A :: _01101 } # [ doc = "Checks if the value of the field is `_01110`" ] # [ inline ( always ) ] pub fn is_01110 ( & self ) -> bool { * self == ADCH_A :: _01110 } # [ doc = "Checks if the value of the field is `_01111`" ] # [ inline ( always ) ] pub fn is_01111 ( & self ) -> bool { * self == ADCH_A :: _01111 } # [ doc = "Checks if the value of the field is `_10000`" ] # [ inline ( always ) ] pub fn is_10000 ( & self ) -> bool { * self == ADCH_A :: _10000 } # [ doc = "Checks if the value of the field is `_10001`" ] # [ inline ( always ) ] pub fn is_10001 ( & self ) -> bool { * self == ADCH_A :: _10001 } # [ doc = "Checks if the value of the field is `_10010`" ] # [ inline ( always ) ] pub fn is_10010 ( & self ) -> bool { * self == ADCH_A :: _10010 } # [ doc = "Checks if the value of the field is `_10011`" ] # [ inline ( always ) ] pub fn is_10011 ( & self ) -> bool { * self == ADCH_A :: _10011 } # [ doc = "Checks if the value of the field is `_10100`" ] # [ inline ( always ) ] pub fn is_10100 ( & self ) -> bool { * self == ADCH_A :: _10100 } # [ doc = "Checks if the value of the field is `_10101`" ] # [ inline ( always ) ] pub fn is_10101 ( & self ) -> bool { * self == ADCH_A :: _10101 } # [ doc = "Checks if the value of the field is `_10110`" ] # [ inline ( always ) ] pub fn is_10110 ( & self ) -> bool { * self == ADCH_A :: _10110 } # [ doc = "Checks if the value of the field is `_10111`" ] # [ inline ( always ) ] pub fn is_10111 ( & self ) -> bool { * self == ADCH_A :: _10111 } # [ doc = "Checks if the value of the field is `_11010`" ] # [ inline ( always ) ] pub fn is_11010 ( & self ) -> bool { * self == ADCH_A :: _11010 } # [ doc = "Checks if the value of the field is `_11011`" ] # [ inline ( always ) ] pub fn is_11011 ( & self ) -> bool { * self == ADCH_A :: _11011 } # [ doc = "Checks if the value of the field is `_11101`" ] # [ inline ( always ) ] pub fn is_11101 ( & self ) -> bool { * self == ADCH_A :: _11101 } # [ doc = "Checks if the value of the field is `_11110`" ] # [ inline ( always ) ] pub fn is_11110 ( & self ) -> bool { * self == ADCH_A :: _11110 } # [ doc = "Checks if the value of the field is `_11111`" ] # [ inline ( always ) ] pub fn is_11111 ( & self ) -> bool { * self == ADCH_A :: _11111 } } # [ doc = "Write proxy for field `ADCH`" ] pub struct ADCH_W < 'a > { w : & 'a mut W , } impl < 'a > ADCH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADCH_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "When DIFF=0, DADP0 is selected as input; when DIFF=1, DAD0 is selected as input." ] # [ inline ( always ) ] pub fn _00000 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00000 ) } # [ doc = "When DIFF=0, DADP1 is selected as input; when DIFF=1, DAD1 is selected as input." ] # [ inline ( always ) ] pub fn _00001 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00001 ) } # [ doc = "When DIFF=0, DADP2 is selected as input; when DIFF=1, DAD2 is selected as input." ] # [ inline ( always ) ] pub fn _00010 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00010 ) } # [ doc = "When DIFF=0, DADP3 is selected as input; when DIFF=1, DAD3 is selected as input." ] # [ inline ( always ) ] pub fn _00011 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00011 ) } # [ doc = "When DIFF=0, AD4 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _00100 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00100 ) } # [ doc = "When DIFF=0, AD5 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _00101 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00101 ) } # [ doc = "When DIFF=0, AD6 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _00110 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00110 ) } # [ doc = "When DIFF=0, AD7 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _00111 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00111 ) } # [ doc = "When DIFF=0, AD8 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01000 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01000 ) } # [ doc = "When DIFF=0, AD9 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01001 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01001 ) } # [ doc = "When DIFF=0, AD10 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01010 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01010 ) } # [ doc = "When DIFF=0, AD11 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01011 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01011 ) } # [ doc = "When DIFF=0, AD12 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01100 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01100 ) } # [ doc = "When DIFF=0, AD13 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01101 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01101 ) } # [ doc = "When DIFF=0, AD14 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01110 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01110 ) } # [ doc = "When DIFF=0, AD15 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01111 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01111 ) } # [ doc = "When DIFF=0, AD16 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10000 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10000 ) } # [ doc = "When DIFF=0, AD17 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10001 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10001 ) } # [ doc = "When DIFF=0, AD18 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10010 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10010 ) } # [ doc = "When DIFF=0, AD19 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10011 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10011 ) } # [ doc = "When DIFF=0, AD20 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10100 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10100 ) } # [ doc = "When DIFF=0, AD21 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10101 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10101 ) } # [ doc = "When DIFF=0, AD22 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10110 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10110 ) } # [ doc = "When DIFF=0, AD23 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10111 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10111 ) } # [ doc = "When DIFF=0, Temp Sensor (single-ended) is selected as input; when DIFF=1, Temp Sensor (differential) is selected as input." ] # [ inline ( always ) ] pub fn _11010 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11010 ) } # [ doc = "When DIFF=0, Bandgap (single-ended) is selected as input; when DIFF=1, Bandgap (differential) is selected as input." ] # [ inline ( always ) ] pub fn _11011 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11011 ) } # [ doc = "When DIFF=0,VREFSH is selected as input; when DIFF=1, -VREFSH (differential) is selected as input. Voltage reference selected is determined by SC2\\[REFSEL\\]." ] # [ inline ( always ) ] pub fn _11101 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11101 ) } # [ doc = "When DIFF=0,VREFSL is selected as input; when DIFF=1, it is reserved. Voltage reference selected is determined by SC2\\[REFSEL\\]." ] # [ inline ( always ) ] pub fn _11110 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11110 ) } # [ doc = "Module is disabled." ] # [ inline ( always ) ] pub fn _11111 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11111 ) } # [ 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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } # [ doc = "Differential Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIFF_A { # [ doc = "0: Single-ended conversions and input channels are selected." ] _0 , # [ doc = "1: Differential conversions and input channels are selected." ] _1 } impl From < DIFF_A > for bool { # [ inline ( always ) ] fn from ( variant : DIFF_A ) -> Self { match variant { DIFF_A :: _0 => false , DIFF_A :: _1 => true } } } # [ doc = "Reader of field `DIFF`" ] pub type DIFF_R = crate :: R < bool , DIFF_A > ; impl DIFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIFF_A { match self . bits { false => DIFF_A :: _0 , true => DIFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIFF_A :: _1 } } # [ doc = "Write proxy for field `DIFF`" ] pub struct DIFF_W < 'a > { w : & 'a mut W , } impl < 'a > DIFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Single-ended conversions and input channels are selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIFF_A :: _0 ) } # [ doc = "Differential conversions and input channels are selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIFF_A :: _1 ) } # [ 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 = "Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AIEN_A { # [ doc = "0: Conversion complete interrupt is disabled." ] _0 , # [ doc = "1: Conversion complete interrupt is enabled." ] _1 } impl From < AIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : AIEN_A ) -> Self { match variant { AIEN_A :: _0 => false , AIEN_A :: _1 => true } } } # [ doc = "Reader of field `AIEN`" ] pub type AIEN_R = crate :: R < bool , AIEN_A > ; impl AIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AIEN_A { match self . bits { false => AIEN_A :: _0 , true => AIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AIEN_A :: _1 } } # [ doc = "Write proxy for field `AIEN`" ] pub struct AIEN_W < 'a > { w : & 'a mut W , } impl < 'a > AIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Conversion complete interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AIEN_A :: _0 ) } # [ doc = "Conversion complete interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AIEN_A :: _1 ) } # [ 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 = "Conversion Complete Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COCO_A { # [ doc = "0: Conversion is not completed." ] _0 , # [ doc = "1: Conversion is completed." ] _1 } impl From < COCO_A > for bool { # [ inline ( always ) ] fn from ( variant : COCO_A ) -> Self { match variant { COCO_A :: _0 => false , COCO_A :: _1 => true } } } # [ doc = "Reader of field `COCO`" ] pub type COCO_R = crate :: R < bool , COCO_A > ; impl COCO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COCO_A { match self . bits { false => COCO_A :: _0 , true => COCO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COCO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COCO_A :: _1 } } impl R { # [ doc = "Bits 0:4 - Input channel select" ] # [ inline ( always ) ] pub fn adch ( & self ) -> ADCH_R { ADCH_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - Differential Mode Enable" ] # [ inline ( always ) ] pub fn diff ( & self ) -> DIFF_R { DIFF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt Enable" ] # [ inline ( always ) ] pub fn aien ( & self ) -> AIEN_R { AIEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Conversion Complete Flag" ] # [ inline ( always ) ] pub fn coco ( & self ) -> COCO_R { COCO_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Input channel select" ] # [ inline ( always ) ] pub fn adch ( & mut self ) -> ADCH_W { ADCH_W { w : self } } # [ doc = "Bit 5 - Differential Mode Enable" ] # [ inline ( always ) ] pub fn diff ( & mut self ) -> DIFF_W { DIFF_W { w : self } } # [ doc = "Bit 6 - Interrupt Enable" ] # [ inline ( always ) ] pub fn aien ( & mut self ) -> AIEN_W { AIEN_W { w : self } } } } # [ doc = "ADC Configuration Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfg1](cfg1) module" ] pub type CFG1 = crate :: Reg < u32 , _CFG1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFG1 ; # [ doc = "`read()` method returns [cfg1::R](cfg1::R) reader structure" ] impl crate :: Readable for CFG1 { } # [ doc = "`write(|w| ..)` method takes [cfg1::W](cfg1::W) writer structure" ] impl crate :: Writable for CFG1 { } # [ doc = "ADC Configuration Register 1" ] pub mod cfg1 { # [ doc = "Reader of register CFG1" ] pub type R = crate :: R < u32 , super :: CFG1 > ; # [ doc = "Writer for register CFG1" ] pub type W = crate :: W < u32 , super :: CFG1 > ; # [ doc = "Register CFG1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFG1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Input Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADICLK_A { # [ doc = "0: Bus clock" ] _00 , # [ doc = "1: Bus clock divided by 2(BUSCLK/2)" ] _01 , # [ doc = "2: Alternate clock (ALTCLK)" ] _10 , # [ doc = "3: Asynchronous clock (ADACK)" ] _11 } impl From < ADICLK_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADICLK_A ) -> Self { match variant { ADICLK_A :: _00 => 0 , ADICLK_A :: _01 => 1 , ADICLK_A :: _10 => 2 , ADICLK_A :: _11 => 3 } } } # [ doc = "Reader of field `ADICLK`" ] pub type ADICLK_R = crate :: R < u8 , ADICLK_A > ; impl ADICLK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADICLK_A { match self . bits { 0 => ADICLK_A :: _00 , 1 => ADICLK_A :: _01 , 2 => ADICLK_A :: _10 , 3 => ADICLK_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ADICLK_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ADICLK_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ADICLK_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ADICLK_A :: _11 } } # [ doc = "Write proxy for field `ADICLK`" ] pub struct ADICLK_W < 'a > { w : & 'a mut W , } impl < 'a > ADICLK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADICLK_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Bus clock" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ADICLK_A :: _00 ) } # [ doc = "Bus clock divided by 2(BUSCLK/2)" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ADICLK_A :: _01 ) } # [ doc = "Alternate clock (ALTCLK)" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ADICLK_A :: _10 ) } # [ doc = "Asynchronous clock (ADACK)" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ADICLK_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Conversion mode selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODE_A { # [ doc = "0: When DIFF=0:It is single-ended 8-bit conversion; when DIFF=1, it is differential 9-bit conversion with 2's complement output." ] _00 , # [ doc = "1: When DIFF=0:It is single-ended 12-bit conversion ; when DIFF=1, it is differential 13-bit conversion with 2's complement output." ] _01 , # [ doc = "2: When DIFF=0:It is single-ended 10-bit conversion. ; when DIFF=1, it is differential 11-bit conversion with 2's complement output" ] _10 , # [ doc = "3: When DIFF=0:It is single-ended 16-bit conversion..; when DIFF=1, it is differential 16-bit conversion with 2's complement output" ] _11 } impl From < MODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : MODE_A ) -> Self { match variant { MODE_A :: _00 => 0 , MODE_A :: _01 => 1 , MODE_A :: _10 => 2 , MODE_A :: _11 => 3 } } } # [ doc = "Reader of field `MODE`" ] pub type MODE_R = crate :: R < u8 , MODE_A > ; impl MODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MODE_A { match self . bits { 0 => MODE_A :: _00 , 1 => MODE_A :: _01 , 2 => MODE_A :: _10 , 3 => MODE_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MODE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MODE_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MODE_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MODE_A :: _11 } } # [ doc = "Write proxy for field `MODE`" ] pub struct MODE_W < 'a > { w : & 'a mut W , } impl < 'a > MODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MODE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "When DIFF=0:It is single-ended 8-bit conversion; when DIFF=1, it is differential 9-bit conversion with 2's complement output." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _00 ) } # [ doc = "When DIFF=0:It is single-ended 12-bit conversion ; when DIFF=1, it is differential 13-bit conversion with 2's complement output." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _01 ) } # [ doc = "When DIFF=0:It is single-ended 10-bit conversion. ; when DIFF=1, it is differential 11-bit conversion with 2's complement output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _10 ) } # [ doc = "When DIFF=0:It is single-ended 16-bit conversion..; when DIFF=1, it is differential 16-bit conversion with 2's complement output" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Sample Time Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADLSMP_A { # [ doc = "0: Short sample time." ] _0 , # [ doc = "1: Long sample time." ] _1 } impl From < ADLSMP_A > for bool { # [ inline ( always ) ] fn from ( variant : ADLSMP_A ) -> Self { match variant { ADLSMP_A :: _0 => false , ADLSMP_A :: _1 => true } } } # [ doc = "Reader of field `ADLSMP`" ] pub type ADLSMP_R = crate :: R < bool , ADLSMP_A > ; impl ADLSMP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADLSMP_A { match self . bits { false => ADLSMP_A :: _0 , true => ADLSMP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADLSMP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADLSMP_A :: _1 } } # [ doc = "Write proxy for field `ADLSMP`" ] pub struct ADLSMP_W < 'a > { w : & 'a mut W , } impl < 'a > ADLSMP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADLSMP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Short sample time." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADLSMP_A :: _0 ) } # [ doc = "Long sample time." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADLSMP_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Clock Divide Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADIV_A { # [ doc = "0: The divide ratio is 1 and the clock rate is input clock." ] _00 , # [ doc = "1: The divide ratio is 2 and the clock rate is (input clock)/2." ] _01 , # [ doc = "2: The divide ratio is 4 and the clock rate is (input clock)/4." ] _10 , # [ doc = "3: The divide ratio is 8 and the clock rate is (input clock)/8." ] _11 } impl From < ADIV_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADIV_A ) -> Self { match variant { ADIV_A :: _00 => 0 , ADIV_A :: _01 => 1 , ADIV_A :: _10 => 2 , ADIV_A :: _11 => 3 } } } # [ doc = "Reader of field `ADIV`" ] pub type ADIV_R = crate :: R < u8 , ADIV_A > ; impl ADIV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADIV_A { match self . bits { 0 => ADIV_A :: _00 , 1 => ADIV_A :: _01 , 2 => ADIV_A :: _10 , 3 => ADIV_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ADIV_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ADIV_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ADIV_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ADIV_A :: _11 } } # [ doc = "Write proxy for field `ADIV`" ] pub struct ADIV_W < 'a > { w : & 'a mut W , } impl < 'a > ADIV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADIV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "The divide ratio is 1 and the clock rate is input clock." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ADIV_A :: _00 ) } # [ doc = "The divide ratio is 2 and the clock rate is (input clock)/2." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ADIV_A :: _01 ) } # [ doc = "The divide ratio is 4 and the clock rate is (input clock)/4." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ADIV_A :: _10 ) } # [ doc = "The divide ratio is 8 and the clock rate is (input clock)/8." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ADIV_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u32 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Low-Power Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADLPC_A { # [ doc = "0: Normal power configuration." ] _0 , # [ doc = "1: Low-power configuration. The power is reduced at the expense of maximum clock speed." ] _1 } impl From < ADLPC_A > for bool { # [ inline ( always ) ] fn from ( variant : ADLPC_A ) -> Self { match variant { ADLPC_A :: _0 => false , ADLPC_A :: _1 => true } } } # [ doc = "Reader of field `ADLPC`" ] pub type ADLPC_R = crate :: R < bool , ADLPC_A > ; impl ADLPC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADLPC_A { match self . bits { false => ADLPC_A :: _0 , true => ADLPC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADLPC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADLPC_A :: _1 } } # [ doc = "Write proxy for field `ADLPC`" ] pub struct ADLPC_W < 'a > { w : & 'a mut W , } impl < 'a > ADLPC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADLPC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal power configuration." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADLPC_A :: _0 ) } # [ doc = "Low-power configuration. The power is reduced at the expense of maximum clock speed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADLPC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 0:1 - Input Clock Select" ] # [ inline ( always ) ] pub fn adiclk ( & self ) -> ADICLK_R { ADICLK_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Conversion mode selection" ] # [ inline ( always ) ] pub fn mode ( & self ) -> MODE_R { MODE_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bit 4 - Sample Time Configuration" ] # [ inline ( always ) ] pub fn adlsmp ( & self ) -> ADLSMP_R { ADLSMP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:6 - Clock Divide Select" ] # [ inline ( always ) ] pub fn adiv ( & self ) -> ADIV_R { ADIV_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Low-Power Configuration" ] # [ inline ( always ) ] pub fn adlpc ( & self ) -> ADLPC_R { ADLPC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Input Clock Select" ] # [ inline ( always ) ] pub fn adiclk ( & mut self ) -> ADICLK_W { ADICLK_W { w : self } } # [ doc = "Bits 2:3 - Conversion mode selection" ] # [ inline ( always ) ] pub fn mode ( & mut self ) -> MODE_W { MODE_W { w : self } } # [ doc = "Bit 4 - Sample Time Configuration" ] # [ inline ( always ) ] pub fn adlsmp ( & mut self ) -> ADLSMP_W { ADLSMP_W { w : self } } # [ doc = "Bits 5:6 - Clock Divide Select" ] # [ inline ( always ) ] pub fn adiv ( & mut self ) -> ADIV_W { ADIV_W { w : self } } # [ doc = "Bit 7 - Low-Power Configuration" ] # [ inline ( always ) ] pub fn adlpc ( & mut self ) -> ADLPC_W { ADLPC_W { w : self } } } } # [ doc = "ADC Configuration Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfg2](cfg2) module" ] pub type CFG2 = crate :: Reg < u32 , _CFG2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFG2 ; # [ doc = "`read()` method returns [cfg2::R](cfg2::R) reader structure" ] impl crate :: Readable for CFG2 { } # [ doc = "`write(|w| ..)` method takes [cfg2::W](cfg2::W) writer structure" ] impl crate :: Writable for CFG2 { } # [ doc = "ADC Configuration Register 2" ] pub mod cfg2 { # [ doc = "Reader of register CFG2" ] pub type R = crate :: R < u32 , super :: CFG2 > ; # [ doc = "Writer for register CFG2" ] pub type W = crate :: W < u32 , super :: CFG2 > ; # [ doc = "Register CFG2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFG2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Long Sample Time Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADLSTS_A { # [ doc = "0: Default longest sample time; 20 extra ADCK cycles; 24 ADCK cycles total." ] _00 , # [ doc = "1: 12 extra ADCK cycles; 16 ADCK cycles total sample time." ] _01 , # [ doc = "2: 6 extra ADCK cycles; 10 ADCK cycles total sample time." ] _10 , # [ doc = "3: 2 extra ADCK cycles; 6 ADCK cycles total sample time." ] _11 } impl From < ADLSTS_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADLSTS_A ) -> Self { match variant { ADLSTS_A :: _00 => 0 , ADLSTS_A :: _01 => 1 , ADLSTS_A :: _10 => 2 , ADLSTS_A :: _11 => 3 } } } # [ doc = "Reader of field `ADLSTS`" ] pub type ADLSTS_R = crate :: R < u8 , ADLSTS_A > ; impl ADLSTS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADLSTS_A { match self . bits { 0 => ADLSTS_A :: _00 , 1 => ADLSTS_A :: _01 , 2 => ADLSTS_A :: _10 , 3 => ADLSTS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ADLSTS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ADLSTS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ADLSTS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ADLSTS_A :: _11 } } # [ doc = "Write proxy for field `ADLSTS`" ] pub struct ADLSTS_W < 'a > { w : & 'a mut W , } impl < 'a > ADLSTS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADLSTS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Default longest sample time; 20 extra ADCK cycles; 24 ADCK cycles total." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ADLSTS_A :: _00 ) } # [ doc = "12 extra ADCK cycles; 16 ADCK cycles total sample time." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ADLSTS_A :: _01 ) } # [ doc = "6 extra ADCK cycles; 10 ADCK cycles total sample time." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ADLSTS_A :: _10 ) } # [ doc = "2 extra ADCK cycles; 6 ADCK cycles total sample time." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ADLSTS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "High-Speed Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADHSC_A { # [ doc = "0: Normal conversion sequence selected." ] _0 , # [ doc = "1: High-speed conversion sequence selected with 2 additional ADCK cycles to total conversion time." ] _1 } impl From < ADHSC_A > for bool { # [ inline ( always ) ] fn from ( variant : ADHSC_A ) -> Self { match variant { ADHSC_A :: _0 => false , ADHSC_A :: _1 => true } } } # [ doc = "Reader of field `ADHSC`" ] pub type ADHSC_R = crate :: R < bool , ADHSC_A > ; impl ADHSC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADHSC_A { match self . bits { false => ADHSC_A :: _0 , true => ADHSC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADHSC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADHSC_A :: _1 } } # [ doc = "Write proxy for field `ADHSC`" ] pub struct ADHSC_W < 'a > { w : & 'a mut W , } impl < 'a > ADHSC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADHSC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal conversion sequence selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADHSC_A :: _0 ) } # [ doc = "High-speed conversion sequence selected with 2 additional ADCK cycles to total conversion time." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADHSC_A :: _1 ) } # [ 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 = "Asynchronous Clock Output Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADACKEN_A { # [ doc = "0: Asynchronous clock output disabled; Asynchronous clock is enabled only if selected by ADICLK and a conversion is active." ] _0 , # [ doc = "1: Asynchronous clock and clock output is enabled regardless of the state of the ADC." ] _1 } impl From < ADACKEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ADACKEN_A ) -> Self { match variant { ADACKEN_A :: _0 => false , ADACKEN_A :: _1 => true } } } # [ doc = "Reader of field `ADACKEN`" ] pub type ADACKEN_R = crate :: R < bool , ADACKEN_A > ; impl ADACKEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADACKEN_A { match self . bits { false => ADACKEN_A :: _0 , true => ADACKEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADACKEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADACKEN_A :: _1 } } # [ doc = "Write proxy for field `ADACKEN`" ] pub struct ADACKEN_W < 'a > { w : & 'a mut W , } impl < 'a > ADACKEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADACKEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Asynchronous clock output disabled; Asynchronous clock is enabled only if selected by ADICLK and a conversion is active." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADACKEN_A :: _0 ) } # [ doc = "Asynchronous clock and clock output is enabled regardless of the state of the ADC." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADACKEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "ADC Mux Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUXSEL_A { # [ doc = "0: ADxxa channels are selected." ] _0 , # [ doc = "1: ADxxb channels are selected." ] _1 } impl From < MUXSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : MUXSEL_A ) -> Self { match variant { MUXSEL_A :: _0 => false , MUXSEL_A :: _1 => true } } } # [ doc = "Reader of field `MUXSEL`" ] pub type MUXSEL_R = crate :: R < bool , MUXSEL_A > ; impl MUXSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUXSEL_A { match self . bits { false => MUXSEL_A :: _0 , true => MUXSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MUXSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MUXSEL_A :: _1 } } # [ doc = "Write proxy for field `MUXSEL`" ] pub struct MUXSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MUXSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUXSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "ADxxa channels are selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MUXSEL_A :: _0 ) } # [ doc = "ADxxb channels are selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MUXSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Long Sample Time Select" ] # [ inline ( always ) ] pub fn adlsts ( & self ) -> ADLSTS_R { ADLSTS_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - High-Speed Configuration" ] # [ inline ( always ) ] pub fn adhsc ( & self ) -> ADHSC_R { ADHSC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Asynchronous Clock Output Enable" ] # [ inline ( always ) ] pub fn adacken ( & self ) -> ADACKEN_R { ADACKEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - ADC Mux Select" ] # [ inline ( always ) ] pub fn muxsel ( & self ) -> MUXSEL_R { MUXSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Long Sample Time Select" ] # [ inline ( always ) ] pub fn adlsts ( & mut self ) -> ADLSTS_W { ADLSTS_W { w : self } } # [ doc = "Bit 2 - High-Speed Configuration" ] # [ inline ( always ) ] pub fn adhsc ( & mut self ) -> ADHSC_W { ADHSC_W { w : self } } # [ doc = "Bit 3 - Asynchronous Clock Output Enable" ] # [ inline ( always ) ] pub fn adacken ( & mut self ) -> ADACKEN_W { ADACKEN_W { w : self } } # [ doc = "Bit 4 - ADC Mux Select" ] # [ inline ( always ) ] pub fn muxsel ( & mut self ) -> MUXSEL_W { MUXSEL_W { w : self } } } } # [ doc = "ADC Data Result Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [r](r) module" ] pub type R = crate :: Reg < u32 , _R > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _R ; # [ doc = "`read()` method returns [r::R](r::R) reader structure" ] impl crate :: Readable for R { } # [ doc = "ADC Data Result Register" ] pub mod r { # [ doc = "Reader of register R%s" ] pub type R = crate :: R < u32 , super :: R > ; # [ doc = "Reader of field `D`" ] pub type D_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Data result" ] # [ inline ( always ) ] pub fn d ( & self ) -> D_R { D_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Compare Value Registers\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cv](cv) module" ] pub type CV = crate :: Reg < u32 , _CV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CV ; # [ doc = "`read()` method returns [cv::R](cv::R) reader structure" ] impl crate :: Readable for CV { } # [ doc = "`write(|w| ..)` method takes [cv::W](cv::W) writer structure" ] impl crate :: Writable for CV { } # [ doc = "Compare Value Registers" ] pub mod cv { # [ doc = "Reader of register CV%s" ] pub type R = crate :: R < u32 , super :: CV > ; # [ doc = "Writer for register CV%s" ] pub type W = crate :: W < u32 , super :: CV > ; # [ doc = "Register CV%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CV { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CV`" ] pub type CV_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CV`" ] pub struct CV_W < 'a > { w : & 'a mut W , } impl < 'a > CV_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Compare Value." ] # [ inline ( always ) ] pub fn cv ( & self ) -> CV_R { CV_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Compare Value." ] # [ inline ( always ) ] pub fn cv ( & mut self ) -> CV_W { CV_W { w : self } } } } # [ doc = "Status and Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc2](sc2) module" ] pub type SC2 = crate :: Reg < u32 , _SC2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC2 ; # [ doc = "`read()` method returns [sc2::R](sc2::R) reader structure" ] impl crate :: Readable for SC2 { } # [ doc = "`write(|w| ..)` method takes [sc2::W](sc2::W) writer structure" ] impl crate :: Writable for SC2 { } # [ doc = "Status and Control Register 2" ] pub mod sc2 { # [ doc = "Reader of register SC2" ] pub type R = crate :: R < u32 , super :: SC2 > ; # [ doc = "Writer for register SC2" ] pub type W = crate :: W < u32 , super :: SC2 > ; # [ doc = "Register SC2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Voltage Reference Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REFSEL_A { # [ doc = "0: Default voltage reference pin pair, that is, external pins VREFH and VREFL" ] _00 , # [ doc = "1: Alternate reference pair, that is, VALTH and VALTL . This pair may be additional external pins or internal sources depending on the MCU configuration. See the chip configuration information for details specific to this MCU" ] _01 } impl From < REFSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : REFSEL_A ) -> Self { match variant { REFSEL_A :: _00 => 0 , REFSEL_A :: _01 => 1 } } } # [ doc = "Reader of field `REFSEL`" ] pub type REFSEL_R = crate :: R < u8 , REFSEL_A > ; impl REFSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , REFSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( REFSEL_A :: _00 ) , 1 => Val ( REFSEL_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == REFSEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == REFSEL_A :: _01 } } # [ doc = "Write proxy for field `REFSEL`" ] pub struct REFSEL_W < 'a > { w : & 'a mut W , } impl < 'a > REFSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REFSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Default voltage reference pin pair, that is, external pins VREFH and VREFL" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( REFSEL_A :: _00 ) } # [ doc = "Alternate reference pair, that is, VALTH and VALTL . This pair may be additional external pins or internal sources depending on the MCU configuration. See the chip configuration information for details specific to this MCU" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( REFSEL_A :: _01 ) } # [ 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 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA is disabled." ] _0 , # [ doc = "1: DMA is enabled and will assert the ADC DMA request during an ADC conversion complete event noted when any of the SC1n\\[COCO\\] flags is asserted." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA is enabled and will assert the ADC DMA request during an ADC conversion complete event noted when any of the SC1n\\[COCO\\] flags is asserted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 = "Compare Function Range Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACREN_A { # [ doc = "0: Range function disabled. Only CV1 is compared." ] _0 , # [ doc = "1: Range function enabled. Both CV1 and CV2 are compared." ] _1 } impl From < ACREN_A > for bool { # [ inline ( always ) ] fn from ( variant : ACREN_A ) -> Self { match variant { ACREN_A :: _0 => false , ACREN_A :: _1 => true } } } # [ doc = "Reader of field `ACREN`" ] pub type ACREN_R = crate :: R < bool , ACREN_A > ; impl ACREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACREN_A { match self . bits { false => ACREN_A :: _0 , true => ACREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACREN_A :: _1 } } # [ doc = "Write proxy for field `ACREN`" ] pub struct ACREN_W < 'a > { w : & 'a mut W , } impl < 'a > ACREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ACREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Range function disabled. Only CV1 is compared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ACREN_A :: _0 ) } # [ doc = "Range function enabled. Both CV1 and CV2 are compared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ACREN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Compare Function Greater Than Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACFGT_A { # [ doc = "0: Configures less than threshold, outside range not inclusive and inside range not inclusive; functionality based on the values placed in CV1 and CV2." ] _0 , # [ doc = "1: Configures greater than or equal to threshold, outside and inside ranges inclusive; functionality based on the values placed in CV1 and CV2." ] _1 } impl From < ACFGT_A > for bool { # [ inline ( always ) ] fn from ( variant : ACFGT_A ) -> Self { match variant { ACFGT_A :: _0 => false , ACFGT_A :: _1 => true } } } # [ doc = "Reader of field `ACFGT`" ] pub type ACFGT_R = crate :: R < bool , ACFGT_A > ; impl ACFGT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACFGT_A { match self . bits { false => ACFGT_A :: _0 , true => ACFGT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACFGT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACFGT_A :: _1 } } # [ doc = "Write proxy for field `ACFGT`" ] pub struct ACFGT_W < 'a > { w : & 'a mut W , } impl < 'a > ACFGT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ACFGT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configures less than threshold, outside range not inclusive and inside range not inclusive; functionality based on the values placed in CV1 and CV2." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ACFGT_A :: _0 ) } # [ doc = "Configures greater than or equal to threshold, outside and inside ranges inclusive; functionality based on the values placed in CV1 and CV2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ACFGT_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Compare Function Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACFE_A { # [ doc = "0: Compare function disabled." ] _0 , # [ doc = "1: Compare function enabled." ] _1 } impl From < ACFE_A > for bool { # [ inline ( always ) ] fn from ( variant : ACFE_A ) -> Self { match variant { ACFE_A :: _0 => false , ACFE_A :: _1 => true } } } # [ doc = "Reader of field `ACFE`" ] pub type ACFE_R = crate :: R < bool , ACFE_A > ; impl ACFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACFE_A { match self . bits { false => ACFE_A :: _0 , true => ACFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACFE_A :: _1 } } # [ doc = "Write proxy for field `ACFE`" ] pub struct ACFE_W < 'a > { w : & 'a mut W , } impl < 'a > ACFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ACFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Compare function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ACFE_A :: _0 ) } # [ doc = "Compare function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ACFE_A :: _1 ) } # [ 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 = "Conversion Trigger Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADTRG_A { # [ doc = "0: Software trigger selected." ] _0 , # [ doc = "1: Hardware trigger selected." ] _1 } impl From < ADTRG_A > for bool { # [ inline ( always ) ] fn from ( variant : ADTRG_A ) -> Self { match variant { ADTRG_A :: _0 => false , ADTRG_A :: _1 => true } } } # [ doc = "Reader of field `ADTRG`" ] pub type ADTRG_R = crate :: R < bool , ADTRG_A > ; impl ADTRG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADTRG_A { match self . bits { false => ADTRG_A :: _0 , true => ADTRG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADTRG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADTRG_A :: _1 } } # [ doc = "Write proxy for field `ADTRG`" ] pub struct ADTRG_W < 'a > { w : & 'a mut W , } impl < 'a > ADTRG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADTRG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Software trigger selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADTRG_A :: _0 ) } # [ doc = "Hardware trigger selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADTRG_A :: _1 ) } # [ 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 = "Conversion Active\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADACT_A { # [ doc = "0: Conversion not in progress." ] _0 , # [ doc = "1: Conversion in progress." ] _1 } impl From < ADACT_A > for bool { # [ inline ( always ) ] fn from ( variant : ADACT_A ) -> Self { match variant { ADACT_A :: _0 => false , ADACT_A :: _1 => true } } } # [ doc = "Reader of field `ADACT`" ] pub type ADACT_R = crate :: R < bool , ADACT_A > ; impl ADACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADACT_A { match self . bits { false => ADACT_A :: _0 , true => ADACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADACT_A :: _1 } } impl R { # [ doc = "Bits 0:1 - Voltage Reference Selection" ] # [ inline ( always ) ] pub fn refsel ( & self ) -> REFSEL_R { REFSEL_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Compare Function Range Enable" ] # [ inline ( always ) ] pub fn acren ( & self ) -> ACREN_R { ACREN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Compare Function Greater Than Enable" ] # [ inline ( always ) ] pub fn acfgt ( & self ) -> ACFGT_R { ACFGT_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Compare Function Enable" ] # [ inline ( always ) ] pub fn acfe ( & self ) -> ACFE_R { ACFE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Conversion Trigger Select" ] # [ inline ( always ) ] pub fn adtrg ( & self ) -> ADTRG_R { ADTRG_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Conversion Active" ] # [ inline ( always ) ] pub fn adact ( & self ) -> ADACT_R { ADACT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Voltage Reference Selection" ] # [ inline ( always ) ] pub fn refsel ( & mut self ) -> REFSEL_W { REFSEL_W { w : self } } # [ doc = "Bit 2 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bit 3 - Compare Function Range Enable" ] # [ inline ( always ) ] pub fn acren ( & mut self ) -> ACREN_W { ACREN_W { w : self } } # [ doc = "Bit 4 - Compare Function Greater Than Enable" ] # [ inline ( always ) ] pub fn acfgt ( & mut self ) -> ACFGT_W { ACFGT_W { w : self } } # [ doc = "Bit 5 - Compare Function Enable" ] # [ inline ( always ) ] pub fn acfe ( & mut self ) -> ACFE_W { ACFE_W { w : self } } # [ doc = "Bit 6 - Conversion Trigger Select" ] # [ inline ( always ) ] pub fn adtrg ( & mut self ) -> ADTRG_W { ADTRG_W { w : self } } } } # [ doc = "Status and Control Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc3](sc3) module" ] pub type SC3 = crate :: Reg < u32 , _SC3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC3 ; # [ doc = "`read()` method returns [sc3::R](sc3::R) reader structure" ] impl crate :: Readable for SC3 { } # [ doc = "`write(|w| ..)` method takes [sc3::W](sc3::W) writer structure" ] impl crate :: Writable for SC3 { } # [ doc = "Status and Control Register 3" ] pub mod sc3 { # [ doc = "Reader of register SC3" ] pub type R = crate :: R < u32 , super :: SC3 > ; # [ doc = "Writer for register SC3" ] pub type W = crate :: W < u32 , super :: SC3 > ; # [ doc = "Register SC3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Hardware Average Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVGS_A { # [ doc = "0: 4 samples averaged." ] _00 , # [ doc = "1: 8 samples averaged." ] _01 , # [ doc = "2: 16 samples averaged." ] _10 , # [ doc = "3: 32 samples averaged." ] _11 } impl From < AVGS_A > for u8 { # [ inline ( always ) ] fn from ( variant : AVGS_A ) -> Self { match variant { AVGS_A :: _00 => 0 , AVGS_A :: _01 => 1 , AVGS_A :: _10 => 2 , AVGS_A :: _11 => 3 } } } # [ doc = "Reader of field `AVGS`" ] pub type AVGS_R = crate :: R < u8 , AVGS_A > ; impl AVGS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVGS_A { match self . bits { 0 => AVGS_A :: _00 , 1 => AVGS_A :: _01 , 2 => AVGS_A :: _10 , 3 => AVGS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == AVGS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == AVGS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == AVGS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == AVGS_A :: _11 } } # [ doc = "Write proxy for field `AVGS`" ] pub struct AVGS_W < 'a > { w : & 'a mut W , } impl < 'a > AVGS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVGS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "4 samples averaged." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( AVGS_A :: _00 ) } # [ doc = "8 samples averaged." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( AVGS_A :: _01 ) } # [ doc = "16 samples averaged." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( AVGS_A :: _10 ) } # [ doc = "32 samples averaged." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( AVGS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Hardware Average Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVGE_A { # [ doc = "0: Hardware average function disabled." ] _0 , # [ doc = "1: Hardware average function enabled." ] _1 } impl From < AVGE_A > for bool { # [ inline ( always ) ] fn from ( variant : AVGE_A ) -> Self { match variant { AVGE_A :: _0 => false , AVGE_A :: _1 => true } } } # [ doc = "Reader of field `AVGE`" ] pub type AVGE_R = crate :: R < bool , AVGE_A > ; impl AVGE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVGE_A { match self . bits { false => AVGE_A :: _0 , true => AVGE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVGE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVGE_A :: _1 } } # [ doc = "Write proxy for field `AVGE`" ] pub struct AVGE_W < 'a > { w : & 'a mut W , } impl < 'a > AVGE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVGE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware average function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AVGE_A :: _0 ) } # [ doc = "Hardware average function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AVGE_A :: _1 ) } # [ 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 = "Continuous Conversion Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADCO_A { # [ doc = "0: One conversion or one set of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion." ] _0 , # [ doc = "1: Continuous conversions or sets of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion." ] _1 } impl From < ADCO_A > for bool { # [ inline ( always ) ] fn from ( variant : ADCO_A ) -> Self { match variant { ADCO_A :: _0 => false , ADCO_A :: _1 => true } } } # [ doc = "Reader of field `ADCO`" ] pub type ADCO_R = crate :: R < bool , ADCO_A > ; impl ADCO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADCO_A { match self . bits { false => ADCO_A :: _0 , true => ADCO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADCO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADCO_A :: _1 } } # [ doc = "Write proxy for field `ADCO`" ] pub struct ADCO_W < 'a > { w : & 'a mut W , } impl < 'a > ADCO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADCO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "One conversion or one set of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADCO_A :: _0 ) } # [ doc = "Continuous conversions or sets of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADCO_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Calibration Failed Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CALF_A { # [ doc = "0: Calibration completed normally." ] _0 , # [ doc = "1: Calibration failed. ADC accuracy specifications are not guaranteed." ] _1 } impl From < CALF_A > for bool { # [ inline ( always ) ] fn from ( variant : CALF_A ) -> Self { match variant { CALF_A :: _0 => false , CALF_A :: _1 => true } } } # [ doc = "Reader of field `CALF`" ] pub type CALF_R = crate :: R < bool , CALF_A > ; impl CALF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CALF_A { match self . bits { false => CALF_A :: _0 , true => CALF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CALF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CALF_A :: _1 } } # [ doc = "Write proxy for field `CALF`" ] pub struct CALF_W < 'a > { w : & 'a mut W , } impl < 'a > CALF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CALF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Calibration completed normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CALF_A :: _0 ) } # [ doc = "Calibration failed. ADC accuracy specifications are not guaranteed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CALF_A :: _1 ) } # [ 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 = "Reader of field `CAL`" ] pub type CAL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CAL`" ] pub struct CAL_W < 'a > { w : & 'a mut W , } impl < 'a > CAL_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 } } impl R { # [ doc = "Bits 0:1 - Hardware Average Select" ] # [ inline ( always ) ] pub fn avgs ( & self ) -> AVGS_R { AVGS_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Hardware Average Enable" ] # [ inline ( always ) ] pub fn avge ( & self ) -> AVGE_R { AVGE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Continuous Conversion Enable" ] # [ inline ( always ) ] pub fn adco ( & self ) -> ADCO_R { ADCO_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Calibration Failed Flag" ] # [ inline ( always ) ] pub fn calf ( & self ) -> CALF_R { CALF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Calibration" ] # [ inline ( always ) ] pub fn cal ( & self ) -> CAL_R { CAL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Hardware Average Select" ] # [ inline ( always ) ] pub fn avgs ( & mut self ) -> AVGS_W { AVGS_W { w : self } } # [ doc = "Bit 2 - Hardware Average Enable" ] # [ inline ( always ) ] pub fn avge ( & mut self ) -> AVGE_W { AVGE_W { w : self } } # [ doc = "Bit 3 - Continuous Conversion Enable" ] # [ inline ( always ) ] pub fn adco ( & mut self ) -> ADCO_W { ADCO_W { w : self } } # [ doc = "Bit 6 - Calibration Failed Flag" ] # [ inline ( always ) ] pub fn calf ( & mut self ) -> CALF_W { CALF_W { w : self } } # [ doc = "Bit 7 - Calibration" ] # [ inline ( always ) ] pub fn cal ( & mut self ) -> CAL_W { CAL_W { w : self } } } } # [ doc = "ADC Offset Correction Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ofs](ofs) module" ] pub type OFS = crate :: Reg < u32 , _OFS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OFS ; # [ doc = "`read()` method returns [ofs::R](ofs::R) reader structure" ] impl crate :: Readable for OFS { } # [ doc = "`write(|w| ..)` method takes [ofs::W](ofs::W) writer structure" ] impl crate :: Writable for OFS { } # [ doc = "ADC Offset Correction Register" ] pub mod ofs { # [ doc = "Reader of register OFS" ] pub type R = crate :: R < u32 , super :: OFS > ; # [ doc = "Writer for register OFS" ] pub type W = crate :: W < u32 , super :: OFS > ; # [ doc = "Register OFS `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: OFS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `OFS`" ] pub type OFS_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `OFS`" ] pub struct OFS_W < 'a > { w : & 'a mut W , } impl < 'a > OFS_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Offset Error Correction Value" ] # [ inline ( always ) ] pub fn ofs ( & self ) -> OFS_R { OFS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Offset Error Correction Value" ] # [ inline ( always ) ] pub fn ofs ( & mut self ) -> OFS_W { OFS_W { w : self } } } } # [ doc = "ADC Plus-Side Gain Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pg](pg) module" ] pub type PG = crate :: Reg < u32 , _PG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PG ; # [ doc = "`read()` method returns [pg::R](pg::R) reader structure" ] impl crate :: Readable for PG { } # [ doc = "`write(|w| ..)` method takes [pg::W](pg::W) writer structure" ] impl crate :: Writable for PG { } # [ doc = "ADC Plus-Side Gain Register" ] pub mod pg { # [ doc = "Reader of register PG" ] pub type R = crate :: R < u32 , super :: PG > ; # [ doc = "Writer for register PG" ] pub type W = crate :: W < u32 , super :: PG > ; # [ doc = "Register PG `reset()`'s with value 0x8200" ] impl crate :: ResetValue for super :: PG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x8200 } } # [ doc = "Reader of field `PG`" ] pub type PG_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `PG`" ] pub struct PG_W < 'a > { w : & 'a mut W , } impl < 'a > PG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Plus-Side Gain" ] # [ inline ( always ) ] pub fn pg ( & self ) -> PG_R { PG_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Plus-Side Gain" ] # [ inline ( always ) ] pub fn pg ( & mut self ) -> PG_W { PG_W { w : self } } } } # [ doc = "ADC Minus-Side Gain Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mg](mg) module" ] pub type MG = crate :: Reg < u32 , _MG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MG ; # [ doc = "`read()` method returns [mg::R](mg::R) reader structure" ] impl crate :: Readable for MG { } # [ doc = "`write(|w| ..)` method takes [mg::W](mg::W) writer structure" ] impl crate :: Writable for MG { } # [ doc = "ADC Minus-Side Gain Register" ] pub mod mg { # [ doc = "Reader of register MG" ] pub type R = crate :: R < u32 , super :: MG > ; # [ doc = "Writer for register MG" ] pub type W = crate :: W < u32 , super :: MG > ; # [ doc = "Register MG `reset()`'s with value 0x8200" ] impl crate :: ResetValue for super :: MG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x8200 } } # [ doc = "Reader of field `MG`" ] pub type MG_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MG`" ] pub struct MG_W < 'a > { w : & 'a mut W , } impl < 'a > MG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Minus-Side Gain" ] # [ inline ( always ) ] pub fn mg ( & self ) -> MG_R { MG_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Minus-Side Gain" ] # [ inline ( always ) ] pub fn mg ( & mut self ) -> MG_W { MG_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clpd](clpd) module" ] pub type CLPD = crate :: Reg < u32 , _CLPD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLPD ; # [ doc = "`read()` method returns [clpd::R](clpd::R) reader structure" ] impl crate :: Readable for CLPD { } # [ doc = "`write(|w| ..)` method takes [clpd::W](clpd::W) writer structure" ] impl crate :: Writable for CLPD { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clpd { # [ doc = "Reader of register CLPD" ] pub type R = crate :: R < u32 , super :: CLPD > ; # [ doc = "Writer for register CLPD" ] pub type W = crate :: W < u32 , super :: CLPD > ; # [ doc = "Register CLPD `reset()`'s with value 0x0a" ] impl crate :: ResetValue for super :: CLPD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0a } } # [ doc = "Reader of field `CLPD`" ] pub type CLPD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLPD`" ] pub struct CLPD_W < 'a > { w : & 'a mut W , } impl < 'a > CLPD_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clpd ( & self ) -> CLPD_R { CLPD_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clpd ( & mut self ) -> CLPD_W { CLPD_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clps](clps) module" ] pub type CLPS = crate :: Reg < u32 , _CLPS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLPS ; # [ doc = "`read()` method returns [clps::R](clps::R) reader structure" ] impl crate :: Readable for CLPS { } # [ doc = "`write(|w| ..)` method takes [clps::W](clps::W) writer structure" ] impl crate :: Writable for CLPS { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clps { # [ doc = "Reader of register CLPS" ] pub type R = crate :: R < u32 , super :: CLPS > ; # [ doc = "Writer for register CLPS" ] pub type W = crate :: W < u32 , super :: CLPS > ; # [ doc = "Register CLPS `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: CLPS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "Reader of field `CLPS`" ] pub type CLPS_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLPS`" ] pub struct CLPS_W < 'a > { w : & 'a mut W , } impl < 'a > CLPS_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clps ( & self ) -> CLPS_R { CLPS_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clps ( & mut self ) -> CLPS_W { CLPS_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp4](clp4) module" ] pub type CLP4 = crate :: Reg < u32 , _CLP4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP4 ; # [ doc = "`read()` method returns [clp4::R](clp4::R) reader structure" ] impl crate :: Readable for CLP4 { } # [ doc = "`write(|w| ..)` method takes [clp4::W](clp4::W) writer structure" ] impl crate :: Writable for CLP4 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp4 { # [ doc = "Reader of register CLP4" ] pub type R = crate :: R < u32 , super :: CLP4 > ; # [ doc = "Writer for register CLP4" ] pub type W = crate :: W < u32 , super :: CLP4 > ; # [ doc = "Register CLP4 `reset()`'s with value 0x0200" ] impl crate :: ResetValue for super :: CLP4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0200 } } # [ doc = "Reader of field `CLP4`" ] pub type CLP4_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLP4`" ] pub struct CLP4_W < 'a > { w : & 'a mut W , } impl < 'a > CLP4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Calibration Value" ] # [ inline ( always ) ] pub fn clp4 ( & self ) -> CLP4_R { CLP4_R :: new ( ( self . bits & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Calibration Value" ] # [ inline ( always ) ] pub fn clp4 ( & mut self ) -> CLP4_W { CLP4_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp3](clp3) module" ] pub type CLP3 = crate :: Reg < u32 , _CLP3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP3 ; # [ doc = "`read()` method returns [clp3::R](clp3::R) reader structure" ] impl crate :: Readable for CLP3 { } # [ doc = "`write(|w| ..)` method takes [clp3::W](clp3::W) writer structure" ] impl crate :: Writable for CLP3 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp3 { # [ doc = "Reader of register CLP3" ] pub type R = crate :: R < u32 , super :: CLP3 > ; # [ doc = "Writer for register CLP3" ] pub type W = crate :: W < u32 , super :: CLP3 > ; # [ doc = "Register CLP3 `reset()`'s with value 0x0100" ] impl crate :: ResetValue for super :: CLP3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0100 } } # [ doc = "Reader of field `CLP3`" ] pub type CLP3_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLP3`" ] pub struct CLP3_W < 'a > { w : & 'a mut W , } impl < 'a > CLP3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x01ff ) | ( ( value as u32 ) & 0x01ff ) ; self . w } } impl R { # [ doc = "Bits 0:8 - Calibration Value" ] # [ inline ( always ) ] pub fn clp3 ( & self ) -> CLP3_R { CLP3_R :: new ( ( self . bits & 0x01ff ) as u16 ) } } impl W { # [ doc = "Bits 0:8 - Calibration Value" ] # [ inline ( always ) ] pub fn clp3 ( & mut self ) -> CLP3_W { CLP3_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp2](clp2) module" ] pub type CLP2 = crate :: Reg < u32 , _CLP2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP2 ; # [ doc = "`read()` method returns [clp2::R](clp2::R) reader structure" ] impl crate :: Readable for CLP2 { } # [ doc = "`write(|w| ..)` method takes [clp2::W](clp2::W) writer structure" ] impl crate :: Writable for CLP2 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp2 { # [ doc = "Reader of register CLP2" ] pub type R = crate :: R < u32 , super :: CLP2 > ; # [ doc = "Writer for register CLP2" ] pub type W = crate :: W < u32 , super :: CLP2 > ; # [ doc = "Register CLP2 `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: CLP2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Reader of field `CLP2`" ] pub type CLP2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLP2`" ] pub struct CLP2_W < 'a > { w : & 'a mut W , } impl < 'a > CLP2_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Calibration Value" ] # [ inline ( always ) ] pub fn clp2 ( & self ) -> CLP2_R { CLP2_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Calibration Value" ] # [ inline ( always ) ] pub fn clp2 ( & mut self ) -> CLP2_W { CLP2_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp1](clp1) module" ] pub type CLP1 = crate :: Reg < u32 , _CLP1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP1 ; # [ doc = "`read()` method returns [clp1::R](clp1::R) reader structure" ] impl crate :: Readable for CLP1 { } # [ doc = "`write(|w| ..)` method takes [clp1::W](clp1::W) writer structure" ] impl crate :: Writable for CLP1 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp1 { # [ doc = "Reader of register CLP1" ] pub type R = crate :: R < u32 , super :: CLP1 > ; # [ doc = "Writer for register CLP1" ] pub type W = crate :: W < u32 , super :: CLP1 > ; # [ doc = "Register CLP1 `reset()`'s with value 0x40" ] impl crate :: ResetValue for super :: CLP1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x40 } } # [ doc = "Reader of field `CLP1`" ] pub type CLP1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLP1`" ] pub struct CLP1_W < 'a > { w : & 'a mut W , } impl < 'a > CLP1_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 & ! 0x7f ) | ( ( value as u32 ) & 0x7f ) ; self . w } } impl R { # [ doc = "Bits 0:6 - Calibration Value" ] # [ inline ( always ) ] pub fn clp1 ( & self ) -> CLP1_R { CLP1_R :: new ( ( self . bits & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 0:6 - Calibration Value" ] # [ inline ( always ) ] pub fn clp1 ( & mut self ) -> CLP1_W { CLP1_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp0](clp0) module" ] pub type CLP0 = crate :: Reg < u32 , _CLP0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP0 ; # [ doc = "`read()` method returns [clp0::R](clp0::R) reader structure" ] impl crate :: Readable for CLP0 { } # [ doc = "`write(|w| ..)` method takes [clp0::W](clp0::W) writer structure" ] impl crate :: Writable for CLP0 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp0 { # [ doc = "Reader of register CLP0" ] pub type R = crate :: R < u32 , super :: CLP0 > ; # [ doc = "Writer for register CLP0" ] pub type W = crate :: W < u32 , super :: CLP0 > ; # [ doc = "Register CLP0 `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: CLP0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "Reader of field `CLP0`" ] pub type CLP0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLP0`" ] pub struct CLP0_W < 'a > { w : & 'a mut W , } impl < 'a > CLP0_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clp0 ( & self ) -> CLP0_R { CLP0_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clp0 ( & mut self ) -> CLP0_W { CLP0_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clmd](clmd) module" ] pub type CLMD = crate :: Reg < u32 , _CLMD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLMD ; # [ doc = "`read()` method returns [clmd::R](clmd::R) reader structure" ] impl crate :: Readable for CLMD { } # [ doc = "`write(|w| ..)` method takes [clmd::W](clmd::W) writer structure" ] impl crate :: Writable for CLMD { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clmd { # [ doc = "Reader of register CLMD" ] pub type R = crate :: R < u32 , super :: CLMD > ; # [ doc = "Writer for register CLMD" ] pub type W = crate :: W < u32 , super :: CLMD > ; # [ doc = "Register CLMD `reset()`'s with value 0x0a" ] impl crate :: ResetValue for super :: CLMD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0a } } # [ doc = "Reader of field `CLMD`" ] pub type CLMD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLMD`" ] pub struct CLMD_W < 'a > { w : & 'a mut W , } impl < 'a > CLMD_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clmd ( & self ) -> CLMD_R { CLMD_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clmd ( & mut self ) -> CLMD_W { CLMD_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clms](clms) module" ] pub type CLMS = crate :: Reg < u32 , _CLMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLMS ; # [ doc = "`read()` method returns [clms::R](clms::R) reader structure" ] impl crate :: Readable for CLMS { } # [ doc = "`write(|w| ..)` method takes [clms::W](clms::W) writer structure" ] impl crate :: Writable for CLMS { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clms { # [ doc = "Reader of register CLMS" ] pub type R = crate :: R < u32 , super :: CLMS > ; # [ doc = "Writer for register CLMS" ] pub type W = crate :: W < u32 , super :: CLMS > ; # [ doc = "Register CLMS `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: CLMS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "Reader of field `CLMS`" ] pub type CLMS_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLMS`" ] pub struct CLMS_W < 'a > { w : & 'a mut W , } impl < 'a > CLMS_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clms ( & self ) -> CLMS_R { CLMS_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clms ( & mut self ) -> CLMS_W { CLMS_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm4](clm4) module" ] pub type CLM4 = crate :: Reg < u32 , _CLM4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM4 ; # [ doc = "`read()` method returns [clm4::R](clm4::R) reader structure" ] impl crate :: Readable for CLM4 { } # [ doc = "`write(|w| ..)` method takes [clm4::W](clm4::W) writer structure" ] impl crate :: Writable for CLM4 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm4 { # [ doc = "Reader of register CLM4" ] pub type R = crate :: R < u32 , super :: CLM4 > ; # [ doc = "Writer for register CLM4" ] pub type W = crate :: W < u32 , super :: CLM4 > ; # [ doc = "Register CLM4 `reset()`'s with value 0x0200" ] impl crate :: ResetValue for super :: CLM4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0200 } } # [ doc = "Reader of field `CLM4`" ] pub type CLM4_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLM4`" ] pub struct CLM4_W < 'a > { w : & 'a mut W , } impl < 'a > CLM4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Calibration Value" ] # [ inline ( always ) ] pub fn clm4 ( & self ) -> CLM4_R { CLM4_R :: new ( ( self . bits & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Calibration Value" ] # [ inline ( always ) ] pub fn clm4 ( & mut self ) -> CLM4_W { CLM4_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm3](clm3) module" ] pub type CLM3 = crate :: Reg < u32 , _CLM3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM3 ; # [ doc = "`read()` method returns [clm3::R](clm3::R) reader structure" ] impl crate :: Readable for CLM3 { } # [ doc = "`write(|w| ..)` method takes [clm3::W](clm3::W) writer structure" ] impl crate :: Writable for CLM3 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm3 { # [ doc = "Reader of register CLM3" ] pub type R = crate :: R < u32 , super :: CLM3 > ; # [ doc = "Writer for register CLM3" ] pub type W = crate :: W < u32 , super :: CLM3 > ; # [ doc = "Register CLM3 `reset()`'s with value 0x0100" ] impl crate :: ResetValue for super :: CLM3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0100 } } # [ doc = "Reader of field `CLM3`" ] pub type CLM3_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLM3`" ] pub struct CLM3_W < 'a > { w : & 'a mut W , } impl < 'a > CLM3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x01ff ) | ( ( value as u32 ) & 0x01ff ) ; self . w } } impl R { # [ doc = "Bits 0:8 - Calibration Value" ] # [ inline ( always ) ] pub fn clm3 ( & self ) -> CLM3_R { CLM3_R :: new ( ( self . bits & 0x01ff ) as u16 ) } } impl W { # [ doc = "Bits 0:8 - Calibration Value" ] # [ inline ( always ) ] pub fn clm3 ( & mut self ) -> CLM3_W { CLM3_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm2](clm2) module" ] pub type CLM2 = crate :: Reg < u32 , _CLM2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM2 ; # [ doc = "`read()` method returns [clm2::R](clm2::R) reader structure" ] impl crate :: Readable for CLM2 { } # [ doc = "`write(|w| ..)` method takes [clm2::W](clm2::W) writer structure" ] impl crate :: Writable for CLM2 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm2 { # [ doc = "Reader of register CLM2" ] pub type R = crate :: R < u32 , super :: CLM2 > ; # [ doc = "Writer for register CLM2" ] pub type W = crate :: W < u32 , super :: CLM2 > ; # [ doc = "Register CLM2 `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: CLM2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Reader of field `CLM2`" ] pub type CLM2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLM2`" ] pub struct CLM2_W < 'a > { w : & 'a mut W , } impl < 'a > CLM2_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Calibration Value" ] # [ inline ( always ) ] pub fn clm2 ( & self ) -> CLM2_R { CLM2_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Calibration Value" ] # [ inline ( always ) ] pub fn clm2 ( & mut self ) -> CLM2_W { CLM2_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm1](clm1) module" ] pub type CLM1 = crate :: Reg < u32 , _CLM1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM1 ; # [ doc = "`read()` method returns [clm1::R](clm1::R) reader structure" ] impl crate :: Readable for CLM1 { } # [ doc = "`write(|w| ..)` method takes [clm1::W](clm1::W) writer structure" ] impl crate :: Writable for CLM1 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm1 { # [ doc = "Reader of register CLM1" ] pub type R = crate :: R < u32 , super :: CLM1 > ; # [ doc = "Writer for register CLM1" ] pub type W = crate :: W < u32 , super :: CLM1 > ; # [ doc = "Register CLM1 `reset()`'s with value 0x40" ] impl crate :: ResetValue for super :: CLM1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x40 } } # [ doc = "Reader of field `CLM1`" ] pub type CLM1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLM1`" ] pub struct CLM1_W < 'a > { w : & 'a mut W , } impl < 'a > CLM1_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 & ! 0x7f ) | ( ( value as u32 ) & 0x7f ) ; self . w } } impl R { # [ doc = "Bits 0:6 - Calibration Value" ] # [ inline ( always ) ] pub fn clm1 ( & self ) -> CLM1_R { CLM1_R :: new ( ( self . bits & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 0:6 - Calibration Value" ] # [ inline ( always ) ] pub fn clm1 ( & mut self ) -> CLM1_W { CLM1_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm0](clm0) module" ] pub type CLM0 = crate :: Reg < u32 , _CLM0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM0 ; # [ doc = "`read()` method returns [clm0::R](clm0::R) reader structure" ] impl crate :: Readable for CLM0 { } # [ doc = "`write(|w| ..)` method takes [clm0::W](clm0::W) writer structure" ] impl crate :: Writable for CLM0 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm0 { # [ doc = "Reader of register CLM0" ] pub type R = crate :: R < u32 , super :: CLM0 > ; # [ doc = "Writer for register CLM0" ] pub type W = crate :: W < u32 , super :: CLM0 > ; # [ doc = "Register CLM0 `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: CLM0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "Reader of field `CLM0`" ] pub type CLM0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLM0`" ] pub struct CLM0_W < 'a > { w : & 'a mut W , } impl < 'a > CLM0_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clm0 ( & self ) -> CLM0_R { CLM0_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clm0 ( & mut self ) -> CLM0_W { CLM0_W { w : self } } } } } # [ doc = "Analog-to-Digital Converter" ] pub struct ADC1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for ADC1 { } impl ADC1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const adc1 :: RegisterBlock { 0x400b_b000 as * const _ } } impl Deref for ADC1 { type Target = adc1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * ADC1 :: ptr ( ) } } } # [ doc = "Analog-to-Digital Converter" ] pub mod adc1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - ADC Status and Control Registers 1" ] pub sc1a : SC1 , # [ doc = "0x04 - ADC Status and Control Registers 1" ] pub sc1b : SC1 , # [ doc = "0x08 - ADC Configuration Register 1" ] pub cfg1 : CFG1 , # [ doc = "0x0c - ADC Configuration Register 2" ] pub cfg2 : CFG2 , # [ doc = "0x10 - ADC Data Result Register" ] pub ra : R , # [ doc = "0x14 - ADC Data Result Register" ] pub rb : R , # [ doc = "0x18 - Compare Value Registers" ] pub cv1 : CV , # [ doc = "0x1c - Compare Value Registers" ] pub cv2 : CV , # [ doc = "0x20 - Status and Control Register 2" ] pub sc2 : SC2 , # [ doc = "0x24 - Status and Control Register 3" ] pub sc3 : SC3 , # [ doc = "0x28 - ADC Offset Correction Register" ] pub ofs : OFS , # [ doc = "0x2c - ADC Plus-Side Gain Register" ] pub pg : PG , # [ doc = "0x30 - ADC Minus-Side Gain Register" ] pub mg : MG , # [ doc = "0x34 - ADC Plus-Side General Calibration Value Register" ] pub clpd : CLPD , # [ doc = "0x38 - ADC Plus-Side General Calibration Value Register" ] pub clps : CLPS , # [ doc = "0x3c - ADC Plus-Side General Calibration Value Register" ] pub clp4 : CLP4 , # [ doc = "0x40 - ADC Plus-Side General Calibration Value Register" ] pub clp3 : CLP3 , # [ doc = "0x44 - ADC Plus-Side General Calibration Value Register" ] pub clp2 : CLP2 , # [ doc = "0x48 - ADC Plus-Side General Calibration Value Register" ] pub clp1 : CLP1 , # [ doc = "0x4c - ADC Plus-Side General Calibration Value Register" ] pub clp0 : CLP0 , _reserved20 : [ u8 ; 4usize ] , # [ doc = "0x54 - ADC Minus-Side General Calibration Value Register" ] pub clmd : CLMD , # [ doc = "0x58 - ADC Minus-Side General Calibration Value Register" ] pub clms : CLMS , # [ doc = "0x5c - ADC Minus-Side General Calibration Value Register" ] pub clm4 : CLM4 , # [ doc = "0x60 - ADC Minus-Side General Calibration Value Register" ] pub clm3 : CLM3 , # [ doc = "0x64 - ADC Minus-Side General Calibration Value Register" ] pub clm2 : CLM2 , # [ doc = "0x68 - ADC Minus-Side General Calibration Value Register" ] pub clm1 : CLM1 , # [ doc = "0x6c - ADC Minus-Side General Calibration Value Register" ] pub clm0 : CLM0 , } # [ doc = "ADC Status and Control Registers 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc1](sc1) module" ] pub type SC1 = crate :: Reg < u32 , _SC1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC1 ; # [ doc = "`read()` method returns [sc1::R](sc1::R) reader structure" ] impl crate :: Readable for SC1 { } # [ doc = "`write(|w| ..)` method takes [sc1::W](sc1::W) writer structure" ] impl crate :: Writable for SC1 { } # [ doc = "ADC Status and Control Registers 1" ] pub mod sc1 { # [ doc = "Reader of register SC1%s" ] pub type R = crate :: R < u32 , super :: SC1 > ; # [ doc = "Writer for register SC1%s" ] pub type W = crate :: W < u32 , super :: SC1 > ; # [ doc = "Register SC1%s `reset()`'s with value 0x1f" ] impl crate :: ResetValue for super :: SC1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1f } } # [ doc = "Input channel select\n\nValue on reset: 31" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADCH_A { # [ doc = "0: When DIFF=0, DADP0 is selected as input; when DIFF=1, DAD0 is selected as input." ] _00000 , # [ doc = "1: When DIFF=0, DADP1 is selected as input; when DIFF=1, DAD1 is selected as input." ] _00001 , # [ doc = "2: When DIFF=0, DADP2 is selected as input; when DIFF=1, DAD2 is selected as input." ] _00010 , # [ doc = "3: When DIFF=0, DADP3 is selected as input; when DIFF=1, DAD3 is selected as input." ] _00011 , # [ doc = "4: When DIFF=0, AD4 is selected as input; when DIFF=1, it is reserved." ] _00100 , # [ doc = "5: When DIFF=0, AD5 is selected as input; when DIFF=1, it is reserved." ] _00101 , # [ doc = "6: When DIFF=0, AD6 is selected as input; when DIFF=1, it is reserved." ] _00110 , # [ doc = "7: When DIFF=0, AD7 is selected as input; when DIFF=1, it is reserved." ] _00111 , # [ doc = "8: When DIFF=0, AD8 is selected as input; when DIFF=1, it is reserved." ] _01000 , # [ doc = "9: When DIFF=0, AD9 is selected as input; when DIFF=1, it is reserved." ] _01001 , # [ doc = "10: When DIFF=0, AD10 is selected as input; when DIFF=1, it is reserved." ] _01010 , # [ doc = "11: When DIFF=0, AD11 is selected as input; when DIFF=1, it is reserved." ] _01011 , # [ doc = "12: When DIFF=0, AD12 is selected as input; when DIFF=1, it is reserved." ] _01100 , # [ doc = "13: When DIFF=0, AD13 is selected as input; when DIFF=1, it is reserved." ] _01101 , # [ doc = "14: When DIFF=0, AD14 is selected as input; when DIFF=1, it is reserved." ] _01110 , # [ doc = "15: When DIFF=0, AD15 is selected as input; when DIFF=1, it is reserved." ] _01111 , # [ doc = "16: When DIFF=0, AD16 is selected as input; when DIFF=1, it is reserved." ] _10000 , # [ doc = "17: When DIFF=0, AD17 is selected as input; when DIFF=1, it is reserved." ] _10001 , # [ doc = "18: When DIFF=0, AD18 is selected as input; when DIFF=1, it is reserved." ] _10010 , # [ doc = "19: When DIFF=0, AD19 is selected as input; when DIFF=1, it is reserved." ] _10011 , # [ doc = "20: When DIFF=0, AD20 is selected as input; when DIFF=1, it is reserved." ] _10100 , # [ doc = "21: When DIFF=0, AD21 is selected as input; when DIFF=1, it is reserved." ] _10101 , # [ doc = "22: When DIFF=0, AD22 is selected as input; when DIFF=1, it is reserved." ] _10110 , # [ doc = "23: When DIFF=0, AD23 is selected as input; when DIFF=1, it is reserved." ] _10111 , # [ doc = "26: When DIFF=0, Temp Sensor (single-ended) is selected as input; when DIFF=1, Temp Sensor (differential) is selected as input." ] _11010 , # [ doc = "27: When DIFF=0, Bandgap (single-ended) is selected as input; when DIFF=1, Bandgap (differential) is selected as input." ] _11011 , # [ doc = "29: When DIFF=0,VREFSH is selected as input; when DIFF=1, -VREFSH (differential) is selected as input. Voltage reference selected is determined by SC2\\[REFSEL\\]." ] _11101 , # [ doc = "30: When DIFF=0,VREFSL is selected as input; when DIFF=1, it is reserved. Voltage reference selected is determined by SC2\\[REFSEL\\]." ] _11110 , # [ doc = "31: Module is disabled." ] _11111 } impl From < ADCH_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADCH_A ) -> Self { match variant { ADCH_A :: _00000 => 0 , ADCH_A :: _00001 => 1 , ADCH_A :: _00010 => 2 , ADCH_A :: _00011 => 3 , ADCH_A :: _00100 => 4 , ADCH_A :: _00101 => 5 , ADCH_A :: _00110 => 6 , ADCH_A :: _00111 => 7 , ADCH_A :: _01000 => 8 , ADCH_A :: _01001 => 9 , ADCH_A :: _01010 => 10 , ADCH_A :: _01011 => 11 , ADCH_A :: _01100 => 12 , ADCH_A :: _01101 => 13 , ADCH_A :: _01110 => 14 , ADCH_A :: _01111 => 15 , ADCH_A :: _10000 => 16 , ADCH_A :: _10001 => 17 , ADCH_A :: _10010 => 18 , ADCH_A :: _10011 => 19 , ADCH_A :: _10100 => 20 , ADCH_A :: _10101 => 21 , ADCH_A :: _10110 => 22 , ADCH_A :: _10111 => 23 , ADCH_A :: _11010 => 26 , ADCH_A :: _11011 => 27 , ADCH_A :: _11101 => 29 , ADCH_A :: _11110 => 30 , ADCH_A :: _11111 => 31 } } } # [ doc = "Reader of field `ADCH`" ] pub type ADCH_R = crate :: R < u8 , ADCH_A > ; impl ADCH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ADCH_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ADCH_A :: _00000 ) , 1 => Val ( ADCH_A :: _00001 ) , 2 => Val ( ADCH_A :: _00010 ) , 3 => Val ( ADCH_A :: _00011 ) , 4 => Val ( ADCH_A :: _00100 ) , 5 => Val ( ADCH_A :: _00101 ) , 6 => Val ( ADCH_A :: _00110 ) , 7 => Val ( ADCH_A :: _00111 ) , 8 => Val ( ADCH_A :: _01000 ) , 9 => Val ( ADCH_A :: _01001 ) , 10 => Val ( ADCH_A :: _01010 ) , 11 => Val ( ADCH_A :: _01011 ) , 12 => Val ( ADCH_A :: _01100 ) , 13 => Val ( ADCH_A :: _01101 ) , 14 => Val ( ADCH_A :: _01110 ) , 15 => Val ( ADCH_A :: _01111 ) , 16 => Val ( ADCH_A :: _10000 ) , 17 => Val ( ADCH_A :: _10001 ) , 18 => Val ( ADCH_A :: _10010 ) , 19 => Val ( ADCH_A :: _10011 ) , 20 => Val ( ADCH_A :: _10100 ) , 21 => Val ( ADCH_A :: _10101 ) , 22 => Val ( ADCH_A :: _10110 ) , 23 => Val ( ADCH_A :: _10111 ) , 26 => Val ( ADCH_A :: _11010 ) , 27 => Val ( ADCH_A :: _11011 ) , 29 => Val ( ADCH_A :: _11101 ) , 30 => Val ( ADCH_A :: _11110 ) , 31 => Val ( ADCH_A :: _11111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00000`" ] # [ inline ( always ) ] pub fn is_00000 ( & self ) -> bool { * self == ADCH_A :: _00000 } # [ doc = "Checks if the value of the field is `_00001`" ] # [ inline ( always ) ] pub fn is_00001 ( & self ) -> bool { * self == ADCH_A :: _00001 } # [ doc = "Checks if the value of the field is `_00010`" ] # [ inline ( always ) ] pub fn is_00010 ( & self ) -> bool { * self == ADCH_A :: _00010 } # [ doc = "Checks if the value of the field is `_00011`" ] # [ inline ( always ) ] pub fn is_00011 ( & self ) -> bool { * self == ADCH_A :: _00011 } # [ doc = "Checks if the value of the field is `_00100`" ] # [ inline ( always ) ] pub fn is_00100 ( & self ) -> bool { * self == ADCH_A :: _00100 } # [ doc = "Checks if the value of the field is `_00101`" ] # [ inline ( always ) ] pub fn is_00101 ( & self ) -> bool { * self == ADCH_A :: _00101 } # [ doc = "Checks if the value of the field is `_00110`" ] # [ inline ( always ) ] pub fn is_00110 ( & self ) -> bool { * self == ADCH_A :: _00110 } # [ doc = "Checks if the value of the field is `_00111`" ] # [ inline ( always ) ] pub fn is_00111 ( & self ) -> bool { * self == ADCH_A :: _00111 } # [ doc = "Checks if the value of the field is `_01000`" ] # [ inline ( always ) ] pub fn is_01000 ( & self ) -> bool { * self == ADCH_A :: _01000 } # [ doc = "Checks if the value of the field is `_01001`" ] # [ inline ( always ) ] pub fn is_01001 ( & self ) -> bool { * self == ADCH_A :: _01001 } # [ doc = "Checks if the value of the field is `_01010`" ] # [ inline ( always ) ] pub fn is_01010 ( & self ) -> bool { * self == ADCH_A :: _01010 } # [ doc = "Checks if the value of the field is `_01011`" ] # [ inline ( always ) ] pub fn is_01011 ( & self ) -> bool { * self == ADCH_A :: _01011 } # [ doc = "Checks if the value of the field is `_01100`" ] # [ inline ( always ) ] pub fn is_01100 ( & self ) -> bool { * self == ADCH_A :: _01100 } # [ doc = "Checks if the value of the field is `_01101`" ] # [ inline ( always ) ] pub fn is_01101 ( & self ) -> bool { * self == ADCH_A :: _01101 } # [ doc = "Checks if the value of the field is `_01110`" ] # [ inline ( always ) ] pub fn is_01110 ( & self ) -> bool { * self == ADCH_A :: _01110 } # [ doc = "Checks if the value of the field is `_01111`" ] # [ inline ( always ) ] pub fn is_01111 ( & self ) -> bool { * self == ADCH_A :: _01111 } # [ doc = "Checks if the value of the field is `_10000`" ] # [ inline ( always ) ] pub fn is_10000 ( & self ) -> bool { * self == ADCH_A :: _10000 } # [ doc = "Checks if the value of the field is `_10001`" ] # [ inline ( always ) ] pub fn is_10001 ( & self ) -> bool { * self == ADCH_A :: _10001 } # [ doc = "Checks if the value of the field is `_10010`" ] # [ inline ( always ) ] pub fn is_10010 ( & self ) -> bool { * self == ADCH_A :: _10010 } # [ doc = "Checks if the value of the field is `_10011`" ] # [ inline ( always ) ] pub fn is_10011 ( & self ) -> bool { * self == ADCH_A :: _10011 } # [ doc = "Checks if the value of the field is `_10100`" ] # [ inline ( always ) ] pub fn is_10100 ( & self ) -> bool { * self == ADCH_A :: _10100 } # [ doc = "Checks if the value of the field is `_10101`" ] # [ inline ( always ) ] pub fn is_10101 ( & self ) -> bool { * self == ADCH_A :: _10101 } # [ doc = "Checks if the value of the field is `_10110`" ] # [ inline ( always ) ] pub fn is_10110 ( & self ) -> bool { * self == ADCH_A :: _10110 } # [ doc = "Checks if the value of the field is `_10111`" ] # [ inline ( always ) ] pub fn is_10111 ( & self ) -> bool { * self == ADCH_A :: _10111 } # [ doc = "Checks if the value of the field is `_11010`" ] # [ inline ( always ) ] pub fn is_11010 ( & self ) -> bool { * self == ADCH_A :: _11010 } # [ doc = "Checks if the value of the field is `_11011`" ] # [ inline ( always ) ] pub fn is_11011 ( & self ) -> bool { * self == ADCH_A :: _11011 } # [ doc = "Checks if the value of the field is `_11101`" ] # [ inline ( always ) ] pub fn is_11101 ( & self ) -> bool { * self == ADCH_A :: _11101 } # [ doc = "Checks if the value of the field is `_11110`" ] # [ inline ( always ) ] pub fn is_11110 ( & self ) -> bool { * self == ADCH_A :: _11110 } # [ doc = "Checks if the value of the field is `_11111`" ] # [ inline ( always ) ] pub fn is_11111 ( & self ) -> bool { * self == ADCH_A :: _11111 } } # [ doc = "Write proxy for field `ADCH`" ] pub struct ADCH_W < 'a > { w : & 'a mut W , } impl < 'a > ADCH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADCH_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "When DIFF=0, DADP0 is selected as input; when DIFF=1, DAD0 is selected as input." ] # [ inline ( always ) ] pub fn _00000 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00000 ) } # [ doc = "When DIFF=0, DADP1 is selected as input; when DIFF=1, DAD1 is selected as input." ] # [ inline ( always ) ] pub fn _00001 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00001 ) } # [ doc = "When DIFF=0, DADP2 is selected as input; when DIFF=1, DAD2 is selected as input." ] # [ inline ( always ) ] pub fn _00010 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00010 ) } # [ doc = "When DIFF=0, DADP3 is selected as input; when DIFF=1, DAD3 is selected as input." ] # [ inline ( always ) ] pub fn _00011 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00011 ) } # [ doc = "When DIFF=0, AD4 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _00100 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00100 ) } # [ doc = "When DIFF=0, AD5 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _00101 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00101 ) } # [ doc = "When DIFF=0, AD6 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _00110 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00110 ) } # [ doc = "When DIFF=0, AD7 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _00111 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _00111 ) } # [ doc = "When DIFF=0, AD8 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01000 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01000 ) } # [ doc = "When DIFF=0, AD9 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01001 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01001 ) } # [ doc = "When DIFF=0, AD10 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01010 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01010 ) } # [ doc = "When DIFF=0, AD11 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01011 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01011 ) } # [ doc = "When DIFF=0, AD12 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01100 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01100 ) } # [ doc = "When DIFF=0, AD13 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01101 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01101 ) } # [ doc = "When DIFF=0, AD14 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01110 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01110 ) } # [ doc = "When DIFF=0, AD15 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _01111 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _01111 ) } # [ doc = "When DIFF=0, AD16 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10000 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10000 ) } # [ doc = "When DIFF=0, AD17 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10001 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10001 ) } # [ doc = "When DIFF=0, AD18 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10010 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10010 ) } # [ doc = "When DIFF=0, AD19 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10011 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10011 ) } # [ doc = "When DIFF=0, AD20 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10100 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10100 ) } # [ doc = "When DIFF=0, AD21 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10101 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10101 ) } # [ doc = "When DIFF=0, AD22 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10110 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10110 ) } # [ doc = "When DIFF=0, AD23 is selected as input; when DIFF=1, it is reserved." ] # [ inline ( always ) ] pub fn _10111 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _10111 ) } # [ doc = "When DIFF=0, Temp Sensor (single-ended) is selected as input; when DIFF=1, Temp Sensor (differential) is selected as input." ] # [ inline ( always ) ] pub fn _11010 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11010 ) } # [ doc = "When DIFF=0, Bandgap (single-ended) is selected as input; when DIFF=1, Bandgap (differential) is selected as input." ] # [ inline ( always ) ] pub fn _11011 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11011 ) } # [ doc = "When DIFF=0,VREFSH is selected as input; when DIFF=1, -VREFSH (differential) is selected as input. Voltage reference selected is determined by SC2\\[REFSEL\\]." ] # [ inline ( always ) ] pub fn _11101 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11101 ) } # [ doc = "When DIFF=0,VREFSL is selected as input; when DIFF=1, it is reserved. Voltage reference selected is determined by SC2\\[REFSEL\\]." ] # [ inline ( always ) ] pub fn _11110 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11110 ) } # [ doc = "Module is disabled." ] # [ inline ( always ) ] pub fn _11111 ( self ) -> & 'a mut W { self . variant ( ADCH_A :: _11111 ) } # [ 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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } # [ doc = "Differential Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIFF_A { # [ doc = "0: Single-ended conversions and input channels are selected." ] _0 , # [ doc = "1: Differential conversions and input channels are selected." ] _1 } impl From < DIFF_A > for bool { # [ inline ( always ) ] fn from ( variant : DIFF_A ) -> Self { match variant { DIFF_A :: _0 => false , DIFF_A :: _1 => true } } } # [ doc = "Reader of field `DIFF`" ] pub type DIFF_R = crate :: R < bool , DIFF_A > ; impl DIFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIFF_A { match self . bits { false => DIFF_A :: _0 , true => DIFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIFF_A :: _1 } } # [ doc = "Write proxy for field `DIFF`" ] pub struct DIFF_W < 'a > { w : & 'a mut W , } impl < 'a > DIFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Single-ended conversions and input channels are selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIFF_A :: _0 ) } # [ doc = "Differential conversions and input channels are selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIFF_A :: _1 ) } # [ 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 = "Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AIEN_A { # [ doc = "0: Conversion complete interrupt is disabled." ] _0 , # [ doc = "1: Conversion complete interrupt is enabled." ] _1 } impl From < AIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : AIEN_A ) -> Self { match variant { AIEN_A :: _0 => false , AIEN_A :: _1 => true } } } # [ doc = "Reader of field `AIEN`" ] pub type AIEN_R = crate :: R < bool , AIEN_A > ; impl AIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AIEN_A { match self . bits { false => AIEN_A :: _0 , true => AIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AIEN_A :: _1 } } # [ doc = "Write proxy for field `AIEN`" ] pub struct AIEN_W < 'a > { w : & 'a mut W , } impl < 'a > AIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Conversion complete interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AIEN_A :: _0 ) } # [ doc = "Conversion complete interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AIEN_A :: _1 ) } # [ 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 = "Conversion Complete Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COCO_A { # [ doc = "0: Conversion is not completed." ] _0 , # [ doc = "1: Conversion is completed." ] _1 } impl From < COCO_A > for bool { # [ inline ( always ) ] fn from ( variant : COCO_A ) -> Self { match variant { COCO_A :: _0 => false , COCO_A :: _1 => true } } } # [ doc = "Reader of field `COCO`" ] pub type COCO_R = crate :: R < bool , COCO_A > ; impl COCO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COCO_A { match self . bits { false => COCO_A :: _0 , true => COCO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COCO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COCO_A :: _1 } } impl R { # [ doc = "Bits 0:4 - Input channel select" ] # [ inline ( always ) ] pub fn adch ( & self ) -> ADCH_R { ADCH_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - Differential Mode Enable" ] # [ inline ( always ) ] pub fn diff ( & self ) -> DIFF_R { DIFF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt Enable" ] # [ inline ( always ) ] pub fn aien ( & self ) -> AIEN_R { AIEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Conversion Complete Flag" ] # [ inline ( always ) ] pub fn coco ( & self ) -> COCO_R { COCO_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Input channel select" ] # [ inline ( always ) ] pub fn adch ( & mut self ) -> ADCH_W { ADCH_W { w : self } } # [ doc = "Bit 5 - Differential Mode Enable" ] # [ inline ( always ) ] pub fn diff ( & mut self ) -> DIFF_W { DIFF_W { w : self } } # [ doc = "Bit 6 - Interrupt Enable" ] # [ inline ( always ) ] pub fn aien ( & mut self ) -> AIEN_W { AIEN_W { w : self } } } } # [ doc = "ADC Configuration Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfg1](cfg1) module" ] pub type CFG1 = crate :: Reg < u32 , _CFG1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFG1 ; # [ doc = "`read()` method returns [cfg1::R](cfg1::R) reader structure" ] impl crate :: Readable for CFG1 { } # [ doc = "`write(|w| ..)` method takes [cfg1::W](cfg1::W) writer structure" ] impl crate :: Writable for CFG1 { } # [ doc = "ADC Configuration Register 1" ] pub mod cfg1 { # [ doc = "Reader of register CFG1" ] pub type R = crate :: R < u32 , super :: CFG1 > ; # [ doc = "Writer for register CFG1" ] pub type W = crate :: W < u32 , super :: CFG1 > ; # [ doc = "Register CFG1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFG1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Input Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADICLK_A { # [ doc = "0: Bus clock" ] _00 , # [ doc = "1: Bus clock divided by 2(BUSCLK/2)" ] _01 , # [ doc = "2: Alternate clock (ALTCLK)" ] _10 , # [ doc = "3: Asynchronous clock (ADACK)" ] _11 } impl From < ADICLK_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADICLK_A ) -> Self { match variant { ADICLK_A :: _00 => 0 , ADICLK_A :: _01 => 1 , ADICLK_A :: _10 => 2 , ADICLK_A :: _11 => 3 } } } # [ doc = "Reader of field `ADICLK`" ] pub type ADICLK_R = crate :: R < u8 , ADICLK_A > ; impl ADICLK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADICLK_A { match self . bits { 0 => ADICLK_A :: _00 , 1 => ADICLK_A :: _01 , 2 => ADICLK_A :: _10 , 3 => ADICLK_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ADICLK_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ADICLK_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ADICLK_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ADICLK_A :: _11 } } # [ doc = "Write proxy for field `ADICLK`" ] pub struct ADICLK_W < 'a > { w : & 'a mut W , } impl < 'a > ADICLK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADICLK_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Bus clock" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ADICLK_A :: _00 ) } # [ doc = "Bus clock divided by 2(BUSCLK/2)" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ADICLK_A :: _01 ) } # [ doc = "Alternate clock (ALTCLK)" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ADICLK_A :: _10 ) } # [ doc = "Asynchronous clock (ADACK)" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ADICLK_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Conversion mode selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODE_A { # [ doc = "0: When DIFF=0:It is single-ended 8-bit conversion; when DIFF=1, it is differential 9-bit conversion with 2's complement output." ] _00 , # [ doc = "1: When DIFF=0:It is single-ended 12-bit conversion ; when DIFF=1, it is differential 13-bit conversion with 2's complement output." ] _01 , # [ doc = "2: When DIFF=0:It is single-ended 10-bit conversion. ; when DIFF=1, it is differential 11-bit conversion with 2's complement output" ] _10 , # [ doc = "3: When DIFF=0:It is single-ended 16-bit conversion..; when DIFF=1, it is differential 16-bit conversion with 2's complement output" ] _11 } impl From < MODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : MODE_A ) -> Self { match variant { MODE_A :: _00 => 0 , MODE_A :: _01 => 1 , MODE_A :: _10 => 2 , MODE_A :: _11 => 3 } } } # [ doc = "Reader of field `MODE`" ] pub type MODE_R = crate :: R < u8 , MODE_A > ; impl MODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MODE_A { match self . bits { 0 => MODE_A :: _00 , 1 => MODE_A :: _01 , 2 => MODE_A :: _10 , 3 => MODE_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MODE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MODE_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MODE_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MODE_A :: _11 } } # [ doc = "Write proxy for field `MODE`" ] pub struct MODE_W < 'a > { w : & 'a mut W , } impl < 'a > MODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MODE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "When DIFF=0:It is single-ended 8-bit conversion; when DIFF=1, it is differential 9-bit conversion with 2's complement output." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _00 ) } # [ doc = "When DIFF=0:It is single-ended 12-bit conversion ; when DIFF=1, it is differential 13-bit conversion with 2's complement output." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _01 ) } # [ doc = "When DIFF=0:It is single-ended 10-bit conversion. ; when DIFF=1, it is differential 11-bit conversion with 2's complement output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _10 ) } # [ doc = "When DIFF=0:It is single-ended 16-bit conversion..; when DIFF=1, it is differential 16-bit conversion with 2's complement output" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Sample Time Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADLSMP_A { # [ doc = "0: Short sample time." ] _0 , # [ doc = "1: Long sample time." ] _1 } impl From < ADLSMP_A > for bool { # [ inline ( always ) ] fn from ( variant : ADLSMP_A ) -> Self { match variant { ADLSMP_A :: _0 => false , ADLSMP_A :: _1 => true } } } # [ doc = "Reader of field `ADLSMP`" ] pub type ADLSMP_R = crate :: R < bool , ADLSMP_A > ; impl ADLSMP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADLSMP_A { match self . bits { false => ADLSMP_A :: _0 , true => ADLSMP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADLSMP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADLSMP_A :: _1 } } # [ doc = "Write proxy for field `ADLSMP`" ] pub struct ADLSMP_W < 'a > { w : & 'a mut W , } impl < 'a > ADLSMP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADLSMP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Short sample time." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADLSMP_A :: _0 ) } # [ doc = "Long sample time." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADLSMP_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Clock Divide Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADIV_A { # [ doc = "0: The divide ratio is 1 and the clock rate is input clock." ] _00 , # [ doc = "1: The divide ratio is 2 and the clock rate is (input clock)/2." ] _01 , # [ doc = "2: The divide ratio is 4 and the clock rate is (input clock)/4." ] _10 , # [ doc = "3: The divide ratio is 8 and the clock rate is (input clock)/8." ] _11 } impl From < ADIV_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADIV_A ) -> Self { match variant { ADIV_A :: _00 => 0 , ADIV_A :: _01 => 1 , ADIV_A :: _10 => 2 , ADIV_A :: _11 => 3 } } } # [ doc = "Reader of field `ADIV`" ] pub type ADIV_R = crate :: R < u8 , ADIV_A > ; impl ADIV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADIV_A { match self . bits { 0 => ADIV_A :: _00 , 1 => ADIV_A :: _01 , 2 => ADIV_A :: _10 , 3 => ADIV_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ADIV_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ADIV_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ADIV_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ADIV_A :: _11 } } # [ doc = "Write proxy for field `ADIV`" ] pub struct ADIV_W < 'a > { w : & 'a mut W , } impl < 'a > ADIV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADIV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "The divide ratio is 1 and the clock rate is input clock." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ADIV_A :: _00 ) } # [ doc = "The divide ratio is 2 and the clock rate is (input clock)/2." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ADIV_A :: _01 ) } # [ doc = "The divide ratio is 4 and the clock rate is (input clock)/4." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ADIV_A :: _10 ) } # [ doc = "The divide ratio is 8 and the clock rate is (input clock)/8." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ADIV_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u32 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Low-Power Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADLPC_A { # [ doc = "0: Normal power configuration." ] _0 , # [ doc = "1: Low-power configuration. The power is reduced at the expense of maximum clock speed." ] _1 } impl From < ADLPC_A > for bool { # [ inline ( always ) ] fn from ( variant : ADLPC_A ) -> Self { match variant { ADLPC_A :: _0 => false , ADLPC_A :: _1 => true } } } # [ doc = "Reader of field `ADLPC`" ] pub type ADLPC_R = crate :: R < bool , ADLPC_A > ; impl ADLPC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADLPC_A { match self . bits { false => ADLPC_A :: _0 , true => ADLPC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADLPC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADLPC_A :: _1 } } # [ doc = "Write proxy for field `ADLPC`" ] pub struct ADLPC_W < 'a > { w : & 'a mut W , } impl < 'a > ADLPC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADLPC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal power configuration." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADLPC_A :: _0 ) } # [ doc = "Low-power configuration. The power is reduced at the expense of maximum clock speed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADLPC_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 0:1 - Input Clock Select" ] # [ inline ( always ) ] pub fn adiclk ( & self ) -> ADICLK_R { ADICLK_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Conversion mode selection" ] # [ inline ( always ) ] pub fn mode ( & self ) -> MODE_R { MODE_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bit 4 - Sample Time Configuration" ] # [ inline ( always ) ] pub fn adlsmp ( & self ) -> ADLSMP_R { ADLSMP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:6 - Clock Divide Select" ] # [ inline ( always ) ] pub fn adiv ( & self ) -> ADIV_R { ADIV_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Low-Power Configuration" ] # [ inline ( always ) ] pub fn adlpc ( & self ) -> ADLPC_R { ADLPC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Input Clock Select" ] # [ inline ( always ) ] pub fn adiclk ( & mut self ) -> ADICLK_W { ADICLK_W { w : self } } # [ doc = "Bits 2:3 - Conversion mode selection" ] # [ inline ( always ) ] pub fn mode ( & mut self ) -> MODE_W { MODE_W { w : self } } # [ doc = "Bit 4 - Sample Time Configuration" ] # [ inline ( always ) ] pub fn adlsmp ( & mut self ) -> ADLSMP_W { ADLSMP_W { w : self } } # [ doc = "Bits 5:6 - Clock Divide Select" ] # [ inline ( always ) ] pub fn adiv ( & mut self ) -> ADIV_W { ADIV_W { w : self } } # [ doc = "Bit 7 - Low-Power Configuration" ] # [ inline ( always ) ] pub fn adlpc ( & mut self ) -> ADLPC_W { ADLPC_W { w : self } } } } # [ doc = "ADC Configuration Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfg2](cfg2) module" ] pub type CFG2 = crate :: Reg < u32 , _CFG2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFG2 ; # [ doc = "`read()` method returns [cfg2::R](cfg2::R) reader structure" ] impl crate :: Readable for CFG2 { } # [ doc = "`write(|w| ..)` method takes [cfg2::W](cfg2::W) writer structure" ] impl crate :: Writable for CFG2 { } # [ doc = "ADC Configuration Register 2" ] pub mod cfg2 { # [ doc = "Reader of register CFG2" ] pub type R = crate :: R < u32 , super :: CFG2 > ; # [ doc = "Writer for register CFG2" ] pub type W = crate :: W < u32 , super :: CFG2 > ; # [ doc = "Register CFG2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFG2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Long Sample Time Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADLSTS_A { # [ doc = "0: Default longest sample time; 20 extra ADCK cycles; 24 ADCK cycles total." ] _00 , # [ doc = "1: 12 extra ADCK cycles; 16 ADCK cycles total sample time." ] _01 , # [ doc = "2: 6 extra ADCK cycles; 10 ADCK cycles total sample time." ] _10 , # [ doc = "3: 2 extra ADCK cycles; 6 ADCK cycles total sample time." ] _11 } impl From < ADLSTS_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADLSTS_A ) -> Self { match variant { ADLSTS_A :: _00 => 0 , ADLSTS_A :: _01 => 1 , ADLSTS_A :: _10 => 2 , ADLSTS_A :: _11 => 3 } } } # [ doc = "Reader of field `ADLSTS`" ] pub type ADLSTS_R = crate :: R < u8 , ADLSTS_A > ; impl ADLSTS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADLSTS_A { match self . bits { 0 => ADLSTS_A :: _00 , 1 => ADLSTS_A :: _01 , 2 => ADLSTS_A :: _10 , 3 => ADLSTS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ADLSTS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ADLSTS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ADLSTS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ADLSTS_A :: _11 } } # [ doc = "Write proxy for field `ADLSTS`" ] pub struct ADLSTS_W < 'a > { w : & 'a mut W , } impl < 'a > ADLSTS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADLSTS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Default longest sample time; 20 extra ADCK cycles; 24 ADCK cycles total." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ADLSTS_A :: _00 ) } # [ doc = "12 extra ADCK cycles; 16 ADCK cycles total sample time." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ADLSTS_A :: _01 ) } # [ doc = "6 extra ADCK cycles; 10 ADCK cycles total sample time." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ADLSTS_A :: _10 ) } # [ doc = "2 extra ADCK cycles; 6 ADCK cycles total sample time." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ADLSTS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "High-Speed Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADHSC_A { # [ doc = "0: Normal conversion sequence selected." ] _0 , # [ doc = "1: High-speed conversion sequence selected with 2 additional ADCK cycles to total conversion time." ] _1 } impl From < ADHSC_A > for bool { # [ inline ( always ) ] fn from ( variant : ADHSC_A ) -> Self { match variant { ADHSC_A :: _0 => false , ADHSC_A :: _1 => true } } } # [ doc = "Reader of field `ADHSC`" ] pub type ADHSC_R = crate :: R < bool , ADHSC_A > ; impl ADHSC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADHSC_A { match self . bits { false => ADHSC_A :: _0 , true => ADHSC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADHSC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADHSC_A :: _1 } } # [ doc = "Write proxy for field `ADHSC`" ] pub struct ADHSC_W < 'a > { w : & 'a mut W , } impl < 'a > ADHSC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADHSC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal conversion sequence selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADHSC_A :: _0 ) } # [ doc = "High-speed conversion sequence selected with 2 additional ADCK cycles to total conversion time." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADHSC_A :: _1 ) } # [ 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 = "Asynchronous Clock Output Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADACKEN_A { # [ doc = "0: Asynchronous clock output disabled; Asynchronous clock is enabled only if selected by ADICLK and a conversion is active." ] _0 , # [ doc = "1: Asynchronous clock and clock output is enabled regardless of the state of the ADC." ] _1 } impl From < ADACKEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ADACKEN_A ) -> Self { match variant { ADACKEN_A :: _0 => false , ADACKEN_A :: _1 => true } } } # [ doc = "Reader of field `ADACKEN`" ] pub type ADACKEN_R = crate :: R < bool , ADACKEN_A > ; impl ADACKEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADACKEN_A { match self . bits { false => ADACKEN_A :: _0 , true => ADACKEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADACKEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADACKEN_A :: _1 } } # [ doc = "Write proxy for field `ADACKEN`" ] pub struct ADACKEN_W < 'a > { w : & 'a mut W , } impl < 'a > ADACKEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADACKEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Asynchronous clock output disabled; Asynchronous clock is enabled only if selected by ADICLK and a conversion is active." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADACKEN_A :: _0 ) } # [ doc = "Asynchronous clock and clock output is enabled regardless of the state of the ADC." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADACKEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "ADC Mux Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUXSEL_A { # [ doc = "0: ADxxa channels are selected." ] _0 , # [ doc = "1: ADxxb channels are selected." ] _1 } impl From < MUXSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : MUXSEL_A ) -> Self { match variant { MUXSEL_A :: _0 => false , MUXSEL_A :: _1 => true } } } # [ doc = "Reader of field `MUXSEL`" ] pub type MUXSEL_R = crate :: R < bool , MUXSEL_A > ; impl MUXSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUXSEL_A { match self . bits { false => MUXSEL_A :: _0 , true => MUXSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MUXSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MUXSEL_A :: _1 } } # [ doc = "Write proxy for field `MUXSEL`" ] pub struct MUXSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MUXSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUXSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "ADxxa channels are selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MUXSEL_A :: _0 ) } # [ doc = "ADxxb channels are selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MUXSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Long Sample Time Select" ] # [ inline ( always ) ] pub fn adlsts ( & self ) -> ADLSTS_R { ADLSTS_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - High-Speed Configuration" ] # [ inline ( always ) ] pub fn adhsc ( & self ) -> ADHSC_R { ADHSC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Asynchronous Clock Output Enable" ] # [ inline ( always ) ] pub fn adacken ( & self ) -> ADACKEN_R { ADACKEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - ADC Mux Select" ] # [ inline ( always ) ] pub fn muxsel ( & self ) -> MUXSEL_R { MUXSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Long Sample Time Select" ] # [ inline ( always ) ] pub fn adlsts ( & mut self ) -> ADLSTS_W { ADLSTS_W { w : self } } # [ doc = "Bit 2 - High-Speed Configuration" ] # [ inline ( always ) ] pub fn adhsc ( & mut self ) -> ADHSC_W { ADHSC_W { w : self } } # [ doc = "Bit 3 - Asynchronous Clock Output Enable" ] # [ inline ( always ) ] pub fn adacken ( & mut self ) -> ADACKEN_W { ADACKEN_W { w : self } } # [ doc = "Bit 4 - ADC Mux Select" ] # [ inline ( always ) ] pub fn muxsel ( & mut self ) -> MUXSEL_W { MUXSEL_W { w : self } } } } # [ doc = "ADC Data Result Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [r](r) module" ] pub type R = crate :: Reg < u32 , _R > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _R ; # [ doc = "`read()` method returns [r::R](r::R) reader structure" ] impl crate :: Readable for R { } # [ doc = "ADC Data Result Register" ] pub mod r { # [ doc = "Reader of register R%s" ] pub type R = crate :: R < u32 , super :: R > ; # [ doc = "Reader of field `D`" ] pub type D_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Data result" ] # [ inline ( always ) ] pub fn d ( & self ) -> D_R { D_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Compare Value Registers\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cv](cv) module" ] pub type CV = crate :: Reg < u32 , _CV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CV ; # [ doc = "`read()` method returns [cv::R](cv::R) reader structure" ] impl crate :: Readable for CV { } # [ doc = "`write(|w| ..)` method takes [cv::W](cv::W) writer structure" ] impl crate :: Writable for CV { } # [ doc = "Compare Value Registers" ] pub mod cv { # [ doc = "Reader of register CV%s" ] pub type R = crate :: R < u32 , super :: CV > ; # [ doc = "Writer for register CV%s" ] pub type W = crate :: W < u32 , super :: CV > ; # [ doc = "Register CV%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CV { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CV`" ] pub type CV_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CV`" ] pub struct CV_W < 'a > { w : & 'a mut W , } impl < 'a > CV_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Compare Value." ] # [ inline ( always ) ] pub fn cv ( & self ) -> CV_R { CV_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Compare Value." ] # [ inline ( always ) ] pub fn cv ( & mut self ) -> CV_W { CV_W { w : self } } } } # [ doc = "Status and Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc2](sc2) module" ] pub type SC2 = crate :: Reg < u32 , _SC2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC2 ; # [ doc = "`read()` method returns [sc2::R](sc2::R) reader structure" ] impl crate :: Readable for SC2 { } # [ doc = "`write(|w| ..)` method takes [sc2::W](sc2::W) writer structure" ] impl crate :: Writable for SC2 { } # [ doc = "Status and Control Register 2" ] pub mod sc2 { # [ doc = "Reader of register SC2" ] pub type R = crate :: R < u32 , super :: SC2 > ; # [ doc = "Writer for register SC2" ] pub type W = crate :: W < u32 , super :: SC2 > ; # [ doc = "Register SC2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Voltage Reference Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REFSEL_A { # [ doc = "0: Default voltage reference pin pair, that is, external pins VREFH and VREFL" ] _00 , # [ doc = "1: Alternate reference pair, that is, VALTH and VALTL . This pair may be additional external pins or internal sources depending on the MCU configuration. See the chip configuration information for details specific to this MCU" ] _01 } impl From < REFSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : REFSEL_A ) -> Self { match variant { REFSEL_A :: _00 => 0 , REFSEL_A :: _01 => 1 } } } # [ doc = "Reader of field `REFSEL`" ] pub type REFSEL_R = crate :: R < u8 , REFSEL_A > ; impl REFSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , REFSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( REFSEL_A :: _00 ) , 1 => Val ( REFSEL_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == REFSEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == REFSEL_A :: _01 } } # [ doc = "Write proxy for field `REFSEL`" ] pub struct REFSEL_W < 'a > { w : & 'a mut W , } impl < 'a > REFSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REFSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Default voltage reference pin pair, that is, external pins VREFH and VREFL" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( REFSEL_A :: _00 ) } # [ doc = "Alternate reference pair, that is, VALTH and VALTL . This pair may be additional external pins or internal sources depending on the MCU configuration. See the chip configuration information for details specific to this MCU" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( REFSEL_A :: _01 ) } # [ 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 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA is disabled." ] _0 , # [ doc = "1: DMA is enabled and will assert the ADC DMA request during an ADC conversion complete event noted when any of the SC1n\\[COCO\\] flags is asserted." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA is enabled and will assert the ADC DMA request during an ADC conversion complete event noted when any of the SC1n\\[COCO\\] flags is asserted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 = "Compare Function Range Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACREN_A { # [ doc = "0: Range function disabled. Only CV1 is compared." ] _0 , # [ doc = "1: Range function enabled. Both CV1 and CV2 are compared." ] _1 } impl From < ACREN_A > for bool { # [ inline ( always ) ] fn from ( variant : ACREN_A ) -> Self { match variant { ACREN_A :: _0 => false , ACREN_A :: _1 => true } } } # [ doc = "Reader of field `ACREN`" ] pub type ACREN_R = crate :: R < bool , ACREN_A > ; impl ACREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACREN_A { match self . bits { false => ACREN_A :: _0 , true => ACREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACREN_A :: _1 } } # [ doc = "Write proxy for field `ACREN`" ] pub struct ACREN_W < 'a > { w : & 'a mut W , } impl < 'a > ACREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ACREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Range function disabled. Only CV1 is compared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ACREN_A :: _0 ) } # [ doc = "Range function enabled. Both CV1 and CV2 are compared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ACREN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Compare Function Greater Than Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACFGT_A { # [ doc = "0: Configures less than threshold, outside range not inclusive and inside range not inclusive; functionality based on the values placed in CV1 and CV2." ] _0 , # [ doc = "1: Configures greater than or equal to threshold, outside and inside ranges inclusive; functionality based on the values placed in CV1 and CV2." ] _1 } impl From < ACFGT_A > for bool { # [ inline ( always ) ] fn from ( variant : ACFGT_A ) -> Self { match variant { ACFGT_A :: _0 => false , ACFGT_A :: _1 => true } } } # [ doc = "Reader of field `ACFGT`" ] pub type ACFGT_R = crate :: R < bool , ACFGT_A > ; impl ACFGT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACFGT_A { match self . bits { false => ACFGT_A :: _0 , true => ACFGT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACFGT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACFGT_A :: _1 } } # [ doc = "Write proxy for field `ACFGT`" ] pub struct ACFGT_W < 'a > { w : & 'a mut W , } impl < 'a > ACFGT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ACFGT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configures less than threshold, outside range not inclusive and inside range not inclusive; functionality based on the values placed in CV1 and CV2." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ACFGT_A :: _0 ) } # [ doc = "Configures greater than or equal to threshold, outside and inside ranges inclusive; functionality based on the values placed in CV1 and CV2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ACFGT_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Compare Function Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACFE_A { # [ doc = "0: Compare function disabled." ] _0 , # [ doc = "1: Compare function enabled." ] _1 } impl From < ACFE_A > for bool { # [ inline ( always ) ] fn from ( variant : ACFE_A ) -> Self { match variant { ACFE_A :: _0 => false , ACFE_A :: _1 => true } } } # [ doc = "Reader of field `ACFE`" ] pub type ACFE_R = crate :: R < bool , ACFE_A > ; impl ACFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACFE_A { match self . bits { false => ACFE_A :: _0 , true => ACFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACFE_A :: _1 } } # [ doc = "Write proxy for field `ACFE`" ] pub struct ACFE_W < 'a > { w : & 'a mut W , } impl < 'a > ACFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ACFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Compare function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ACFE_A :: _0 ) } # [ doc = "Compare function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ACFE_A :: _1 ) } # [ 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 = "Conversion Trigger Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADTRG_A { # [ doc = "0: Software trigger selected." ] _0 , # [ doc = "1: Hardware trigger selected." ] _1 } impl From < ADTRG_A > for bool { # [ inline ( always ) ] fn from ( variant : ADTRG_A ) -> Self { match variant { ADTRG_A :: _0 => false , ADTRG_A :: _1 => true } } } # [ doc = "Reader of field `ADTRG`" ] pub type ADTRG_R = crate :: R < bool , ADTRG_A > ; impl ADTRG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADTRG_A { match self . bits { false => ADTRG_A :: _0 , true => ADTRG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADTRG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADTRG_A :: _1 } } # [ doc = "Write proxy for field `ADTRG`" ] pub struct ADTRG_W < 'a > { w : & 'a mut W , } impl < 'a > ADTRG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADTRG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Software trigger selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADTRG_A :: _0 ) } # [ doc = "Hardware trigger selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADTRG_A :: _1 ) } # [ 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 = "Conversion Active\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADACT_A { # [ doc = "0: Conversion not in progress." ] _0 , # [ doc = "1: Conversion in progress." ] _1 } impl From < ADACT_A > for bool { # [ inline ( always ) ] fn from ( variant : ADACT_A ) -> Self { match variant { ADACT_A :: _0 => false , ADACT_A :: _1 => true } } } # [ doc = "Reader of field `ADACT`" ] pub type ADACT_R = crate :: R < bool , ADACT_A > ; impl ADACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADACT_A { match self . bits { false => ADACT_A :: _0 , true => ADACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADACT_A :: _1 } } impl R { # [ doc = "Bits 0:1 - Voltage Reference Selection" ] # [ inline ( always ) ] pub fn refsel ( & self ) -> REFSEL_R { REFSEL_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Compare Function Range Enable" ] # [ inline ( always ) ] pub fn acren ( & self ) -> ACREN_R { ACREN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Compare Function Greater Than Enable" ] # [ inline ( always ) ] pub fn acfgt ( & self ) -> ACFGT_R { ACFGT_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Compare Function Enable" ] # [ inline ( always ) ] pub fn acfe ( & self ) -> ACFE_R { ACFE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Conversion Trigger Select" ] # [ inline ( always ) ] pub fn adtrg ( & self ) -> ADTRG_R { ADTRG_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Conversion Active" ] # [ inline ( always ) ] pub fn adact ( & self ) -> ADACT_R { ADACT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Voltage Reference Selection" ] # [ inline ( always ) ] pub fn refsel ( & mut self ) -> REFSEL_W { REFSEL_W { w : self } } # [ doc = "Bit 2 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bit 3 - Compare Function Range Enable" ] # [ inline ( always ) ] pub fn acren ( & mut self ) -> ACREN_W { ACREN_W { w : self } } # [ doc = "Bit 4 - Compare Function Greater Than Enable" ] # [ inline ( always ) ] pub fn acfgt ( & mut self ) -> ACFGT_W { ACFGT_W { w : self } } # [ doc = "Bit 5 - Compare Function Enable" ] # [ inline ( always ) ] pub fn acfe ( & mut self ) -> ACFE_W { ACFE_W { w : self } } # [ doc = "Bit 6 - Conversion Trigger Select" ] # [ inline ( always ) ] pub fn adtrg ( & mut self ) -> ADTRG_W { ADTRG_W { w : self } } } } # [ doc = "Status and Control Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc3](sc3) module" ] pub type SC3 = crate :: Reg < u32 , _SC3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC3 ; # [ doc = "`read()` method returns [sc3::R](sc3::R) reader structure" ] impl crate :: Readable for SC3 { } # [ doc = "`write(|w| ..)` method takes [sc3::W](sc3::W) writer structure" ] impl crate :: Writable for SC3 { } # [ doc = "Status and Control Register 3" ] pub mod sc3 { # [ doc = "Reader of register SC3" ] pub type R = crate :: R < u32 , super :: SC3 > ; # [ doc = "Writer for register SC3" ] pub type W = crate :: W < u32 , super :: SC3 > ; # [ doc = "Register SC3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Hardware Average Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVGS_A { # [ doc = "0: 4 samples averaged." ] _00 , # [ doc = "1: 8 samples averaged." ] _01 , # [ doc = "2: 16 samples averaged." ] _10 , # [ doc = "3: 32 samples averaged." ] _11 } impl From < AVGS_A > for u8 { # [ inline ( always ) ] fn from ( variant : AVGS_A ) -> Self { match variant { AVGS_A :: _00 => 0 , AVGS_A :: _01 => 1 , AVGS_A :: _10 => 2 , AVGS_A :: _11 => 3 } } } # [ doc = "Reader of field `AVGS`" ] pub type AVGS_R = crate :: R < u8 , AVGS_A > ; impl AVGS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVGS_A { match self . bits { 0 => AVGS_A :: _00 , 1 => AVGS_A :: _01 , 2 => AVGS_A :: _10 , 3 => AVGS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == AVGS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == AVGS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == AVGS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == AVGS_A :: _11 } } # [ doc = "Write proxy for field `AVGS`" ] pub struct AVGS_W < 'a > { w : & 'a mut W , } impl < 'a > AVGS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVGS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "4 samples averaged." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( AVGS_A :: _00 ) } # [ doc = "8 samples averaged." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( AVGS_A :: _01 ) } # [ doc = "16 samples averaged." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( AVGS_A :: _10 ) } # [ doc = "32 samples averaged." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( AVGS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Hardware Average Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVGE_A { # [ doc = "0: Hardware average function disabled." ] _0 , # [ doc = "1: Hardware average function enabled." ] _1 } impl From < AVGE_A > for bool { # [ inline ( always ) ] fn from ( variant : AVGE_A ) -> Self { match variant { AVGE_A :: _0 => false , AVGE_A :: _1 => true } } } # [ doc = "Reader of field `AVGE`" ] pub type AVGE_R = crate :: R < bool , AVGE_A > ; impl AVGE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVGE_A { match self . bits { false => AVGE_A :: _0 , true => AVGE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVGE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVGE_A :: _1 } } # [ doc = "Write proxy for field `AVGE`" ] pub struct AVGE_W < 'a > { w : & 'a mut W , } impl < 'a > AVGE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVGE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware average function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AVGE_A :: _0 ) } # [ doc = "Hardware average function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AVGE_A :: _1 ) } # [ 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 = "Continuous Conversion Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADCO_A { # [ doc = "0: One conversion or one set of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion." ] _0 , # [ doc = "1: Continuous conversions or sets of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion." ] _1 } impl From < ADCO_A > for bool { # [ inline ( always ) ] fn from ( variant : ADCO_A ) -> Self { match variant { ADCO_A :: _0 => false , ADCO_A :: _1 => true } } } # [ doc = "Reader of field `ADCO`" ] pub type ADCO_R = crate :: R < bool , ADCO_A > ; impl ADCO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADCO_A { match self . bits { false => ADCO_A :: _0 , true => ADCO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADCO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADCO_A :: _1 } } # [ doc = "Write proxy for field `ADCO`" ] pub struct ADCO_W < 'a > { w : & 'a mut W , } impl < 'a > ADCO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADCO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "One conversion or one set of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADCO_A :: _0 ) } # [ doc = "Continuous conversions or sets of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADCO_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Calibration Failed Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CALF_A { # [ doc = "0: Calibration completed normally." ] _0 , # [ doc = "1: Calibration failed. ADC accuracy specifications are not guaranteed." ] _1 } impl From < CALF_A > for bool { # [ inline ( always ) ] fn from ( variant : CALF_A ) -> Self { match variant { CALF_A :: _0 => false , CALF_A :: _1 => true } } } # [ doc = "Reader of field `CALF`" ] pub type CALF_R = crate :: R < bool , CALF_A > ; impl CALF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CALF_A { match self . bits { false => CALF_A :: _0 , true => CALF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CALF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CALF_A :: _1 } } # [ doc = "Write proxy for field `CALF`" ] pub struct CALF_W < 'a > { w : & 'a mut W , } impl < 'a > CALF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CALF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Calibration completed normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CALF_A :: _0 ) } # [ doc = "Calibration failed. ADC accuracy specifications are not guaranteed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CALF_A :: _1 ) } # [ 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 = "Reader of field `CAL`" ] pub type CAL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CAL`" ] pub struct CAL_W < 'a > { w : & 'a mut W , } impl < 'a > CAL_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 } } impl R { # [ doc = "Bits 0:1 - Hardware Average Select" ] # [ inline ( always ) ] pub fn avgs ( & self ) -> AVGS_R { AVGS_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Hardware Average Enable" ] # [ inline ( always ) ] pub fn avge ( & self ) -> AVGE_R { AVGE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Continuous Conversion Enable" ] # [ inline ( always ) ] pub fn adco ( & self ) -> ADCO_R { ADCO_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Calibration Failed Flag" ] # [ inline ( always ) ] pub fn calf ( & self ) -> CALF_R { CALF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Calibration" ] # [ inline ( always ) ] pub fn cal ( & self ) -> CAL_R { CAL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Hardware Average Select" ] # [ inline ( always ) ] pub fn avgs ( & mut self ) -> AVGS_W { AVGS_W { w : self } } # [ doc = "Bit 2 - Hardware Average Enable" ] # [ inline ( always ) ] pub fn avge ( & mut self ) -> AVGE_W { AVGE_W { w : self } } # [ doc = "Bit 3 - Continuous Conversion Enable" ] # [ inline ( always ) ] pub fn adco ( & mut self ) -> ADCO_W { ADCO_W { w : self } } # [ doc = "Bit 6 - Calibration Failed Flag" ] # [ inline ( always ) ] pub fn calf ( & mut self ) -> CALF_W { CALF_W { w : self } } # [ doc = "Bit 7 - Calibration" ] # [ inline ( always ) ] pub fn cal ( & mut self ) -> CAL_W { CAL_W { w : self } } } } # [ doc = "ADC Offset Correction Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ofs](ofs) module" ] pub type OFS = crate :: Reg < u32 , _OFS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OFS ; # [ doc = "`read()` method returns [ofs::R](ofs::R) reader structure" ] impl crate :: Readable for OFS { } # [ doc = "`write(|w| ..)` method takes [ofs::W](ofs::W) writer structure" ] impl crate :: Writable for OFS { } # [ doc = "ADC Offset Correction Register" ] pub mod ofs { # [ doc = "Reader of register OFS" ] pub type R = crate :: R < u32 , super :: OFS > ; # [ doc = "Writer for register OFS" ] pub type W = crate :: W < u32 , super :: OFS > ; # [ doc = "Register OFS `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: OFS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `OFS`" ] pub type OFS_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `OFS`" ] pub struct OFS_W < 'a > { w : & 'a mut W , } impl < 'a > OFS_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Offset Error Correction Value" ] # [ inline ( always ) ] pub fn ofs ( & self ) -> OFS_R { OFS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Offset Error Correction Value" ] # [ inline ( always ) ] pub fn ofs ( & mut self ) -> OFS_W { OFS_W { w : self } } } } # [ doc = "ADC Plus-Side Gain Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pg](pg) module" ] pub type PG = crate :: Reg < u32 , _PG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PG ; # [ doc = "`read()` method returns [pg::R](pg::R) reader structure" ] impl crate :: Readable for PG { } # [ doc = "`write(|w| ..)` method takes [pg::W](pg::W) writer structure" ] impl crate :: Writable for PG { } # [ doc = "ADC Plus-Side Gain Register" ] pub mod pg { # [ doc = "Reader of register PG" ] pub type R = crate :: R < u32 , super :: PG > ; # [ doc = "Writer for register PG" ] pub type W = crate :: W < u32 , super :: PG > ; # [ doc = "Register PG `reset()`'s with value 0x8200" ] impl crate :: ResetValue for super :: PG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x8200 } } # [ doc = "Reader of field `PG`" ] pub type PG_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `PG`" ] pub struct PG_W < 'a > { w : & 'a mut W , } impl < 'a > PG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Plus-Side Gain" ] # [ inline ( always ) ] pub fn pg ( & self ) -> PG_R { PG_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Plus-Side Gain" ] # [ inline ( always ) ] pub fn pg ( & mut self ) -> PG_W { PG_W { w : self } } } } # [ doc = "ADC Minus-Side Gain Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mg](mg) module" ] pub type MG = crate :: Reg < u32 , _MG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MG ; # [ doc = "`read()` method returns [mg::R](mg::R) reader structure" ] impl crate :: Readable for MG { } # [ doc = "`write(|w| ..)` method takes [mg::W](mg::W) writer structure" ] impl crate :: Writable for MG { } # [ doc = "ADC Minus-Side Gain Register" ] pub mod mg { # [ doc = "Reader of register MG" ] pub type R = crate :: R < u32 , super :: MG > ; # [ doc = "Writer for register MG" ] pub type W = crate :: W < u32 , super :: MG > ; # [ doc = "Register MG `reset()`'s with value 0x8200" ] impl crate :: ResetValue for super :: MG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x8200 } } # [ doc = "Reader of field `MG`" ] pub type MG_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MG`" ] pub struct MG_W < 'a > { w : & 'a mut W , } impl < 'a > MG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Minus-Side Gain" ] # [ inline ( always ) ] pub fn mg ( & self ) -> MG_R { MG_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Minus-Side Gain" ] # [ inline ( always ) ] pub fn mg ( & mut self ) -> MG_W { MG_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clpd](clpd) module" ] pub type CLPD = crate :: Reg < u32 , _CLPD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLPD ; # [ doc = "`read()` method returns [clpd::R](clpd::R) reader structure" ] impl crate :: Readable for CLPD { } # [ doc = "`write(|w| ..)` method takes [clpd::W](clpd::W) writer structure" ] impl crate :: Writable for CLPD { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clpd { # [ doc = "Reader of register CLPD" ] pub type R = crate :: R < u32 , super :: CLPD > ; # [ doc = "Writer for register CLPD" ] pub type W = crate :: W < u32 , super :: CLPD > ; # [ doc = "Register CLPD `reset()`'s with value 0x0a" ] impl crate :: ResetValue for super :: CLPD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0a } } # [ doc = "Reader of field `CLPD`" ] pub type CLPD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLPD`" ] pub struct CLPD_W < 'a > { w : & 'a mut W , } impl < 'a > CLPD_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clpd ( & self ) -> CLPD_R { CLPD_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clpd ( & mut self ) -> CLPD_W { CLPD_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clps](clps) module" ] pub type CLPS = crate :: Reg < u32 , _CLPS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLPS ; # [ doc = "`read()` method returns [clps::R](clps::R) reader structure" ] impl crate :: Readable for CLPS { } # [ doc = "`write(|w| ..)` method takes [clps::W](clps::W) writer structure" ] impl crate :: Writable for CLPS { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clps { # [ doc = "Reader of register CLPS" ] pub type R = crate :: R < u32 , super :: CLPS > ; # [ doc = "Writer for register CLPS" ] pub type W = crate :: W < u32 , super :: CLPS > ; # [ doc = "Register CLPS `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: CLPS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "Reader of field `CLPS`" ] pub type CLPS_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLPS`" ] pub struct CLPS_W < 'a > { w : & 'a mut W , } impl < 'a > CLPS_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clps ( & self ) -> CLPS_R { CLPS_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clps ( & mut self ) -> CLPS_W { CLPS_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp4](clp4) module" ] pub type CLP4 = crate :: Reg < u32 , _CLP4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP4 ; # [ doc = "`read()` method returns [clp4::R](clp4::R) reader structure" ] impl crate :: Readable for CLP4 { } # [ doc = "`write(|w| ..)` method takes [clp4::W](clp4::W) writer structure" ] impl crate :: Writable for CLP4 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp4 { # [ doc = "Reader of register CLP4" ] pub type R = crate :: R < u32 , super :: CLP4 > ; # [ doc = "Writer for register CLP4" ] pub type W = crate :: W < u32 , super :: CLP4 > ; # [ doc = "Register CLP4 `reset()`'s with value 0x0200" ] impl crate :: ResetValue for super :: CLP4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0200 } } # [ doc = "Reader of field `CLP4`" ] pub type CLP4_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLP4`" ] pub struct CLP4_W < 'a > { w : & 'a mut W , } impl < 'a > CLP4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Calibration Value" ] # [ inline ( always ) ] pub fn clp4 ( & self ) -> CLP4_R { CLP4_R :: new ( ( self . bits & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Calibration Value" ] # [ inline ( always ) ] pub fn clp4 ( & mut self ) -> CLP4_W { CLP4_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp3](clp3) module" ] pub type CLP3 = crate :: Reg < u32 , _CLP3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP3 ; # [ doc = "`read()` method returns [clp3::R](clp3::R) reader structure" ] impl crate :: Readable for CLP3 { } # [ doc = "`write(|w| ..)` method takes [clp3::W](clp3::W) writer structure" ] impl crate :: Writable for CLP3 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp3 { # [ doc = "Reader of register CLP3" ] pub type R = crate :: R < u32 , super :: CLP3 > ; # [ doc = "Writer for register CLP3" ] pub type W = crate :: W < u32 , super :: CLP3 > ; # [ doc = "Register CLP3 `reset()`'s with value 0x0100" ] impl crate :: ResetValue for super :: CLP3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0100 } } # [ doc = "Reader of field `CLP3`" ] pub type CLP3_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLP3`" ] pub struct CLP3_W < 'a > { w : & 'a mut W , } impl < 'a > CLP3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x01ff ) | ( ( value as u32 ) & 0x01ff ) ; self . w } } impl R { # [ doc = "Bits 0:8 - Calibration Value" ] # [ inline ( always ) ] pub fn clp3 ( & self ) -> CLP3_R { CLP3_R :: new ( ( self . bits & 0x01ff ) as u16 ) } } impl W { # [ doc = "Bits 0:8 - Calibration Value" ] # [ inline ( always ) ] pub fn clp3 ( & mut self ) -> CLP3_W { CLP3_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp2](clp2) module" ] pub type CLP2 = crate :: Reg < u32 , _CLP2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP2 ; # [ doc = "`read()` method returns [clp2::R](clp2::R) reader structure" ] impl crate :: Readable for CLP2 { } # [ doc = "`write(|w| ..)` method takes [clp2::W](clp2::W) writer structure" ] impl crate :: Writable for CLP2 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp2 { # [ doc = "Reader of register CLP2" ] pub type R = crate :: R < u32 , super :: CLP2 > ; # [ doc = "Writer for register CLP2" ] pub type W = crate :: W < u32 , super :: CLP2 > ; # [ doc = "Register CLP2 `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: CLP2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Reader of field `CLP2`" ] pub type CLP2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLP2`" ] pub struct CLP2_W < 'a > { w : & 'a mut W , } impl < 'a > CLP2_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Calibration Value" ] # [ inline ( always ) ] pub fn clp2 ( & self ) -> CLP2_R { CLP2_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Calibration Value" ] # [ inline ( always ) ] pub fn clp2 ( & mut self ) -> CLP2_W { CLP2_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp1](clp1) module" ] pub type CLP1 = crate :: Reg < u32 , _CLP1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP1 ; # [ doc = "`read()` method returns [clp1::R](clp1::R) reader structure" ] impl crate :: Readable for CLP1 { } # [ doc = "`write(|w| ..)` method takes [clp1::W](clp1::W) writer structure" ] impl crate :: Writable for CLP1 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp1 { # [ doc = "Reader of register CLP1" ] pub type R = crate :: R < u32 , super :: CLP1 > ; # [ doc = "Writer for register CLP1" ] pub type W = crate :: W < u32 , super :: CLP1 > ; # [ doc = "Register CLP1 `reset()`'s with value 0x40" ] impl crate :: ResetValue for super :: CLP1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x40 } } # [ doc = "Reader of field `CLP1`" ] pub type CLP1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLP1`" ] pub struct CLP1_W < 'a > { w : & 'a mut W , } impl < 'a > CLP1_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 & ! 0x7f ) | ( ( value as u32 ) & 0x7f ) ; self . w } } impl R { # [ doc = "Bits 0:6 - Calibration Value" ] # [ inline ( always ) ] pub fn clp1 ( & self ) -> CLP1_R { CLP1_R :: new ( ( self . bits & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 0:6 - Calibration Value" ] # [ inline ( always ) ] pub fn clp1 ( & mut self ) -> CLP1_W { CLP1_W { w : self } } } } # [ doc = "ADC Plus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clp0](clp0) module" ] pub type CLP0 = crate :: Reg < u32 , _CLP0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLP0 ; # [ doc = "`read()` method returns [clp0::R](clp0::R) reader structure" ] impl crate :: Readable for CLP0 { } # [ doc = "`write(|w| ..)` method takes [clp0::W](clp0::W) writer structure" ] impl crate :: Writable for CLP0 { } # [ doc = "ADC Plus-Side General Calibration Value Register" ] pub mod clp0 { # [ doc = "Reader of register CLP0" ] pub type R = crate :: R < u32 , super :: CLP0 > ; # [ doc = "Writer for register CLP0" ] pub type W = crate :: W < u32 , super :: CLP0 > ; # [ doc = "Register CLP0 `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: CLP0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "Reader of field `CLP0`" ] pub type CLP0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLP0`" ] pub struct CLP0_W < 'a > { w : & 'a mut W , } impl < 'a > CLP0_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clp0 ( & self ) -> CLP0_R { CLP0_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clp0 ( & mut self ) -> CLP0_W { CLP0_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clmd](clmd) module" ] pub type CLMD = crate :: Reg < u32 , _CLMD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLMD ; # [ doc = "`read()` method returns [clmd::R](clmd::R) reader structure" ] impl crate :: Readable for CLMD { } # [ doc = "`write(|w| ..)` method takes [clmd::W](clmd::W) writer structure" ] impl crate :: Writable for CLMD { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clmd { # [ doc = "Reader of register CLMD" ] pub type R = crate :: R < u32 , super :: CLMD > ; # [ doc = "Writer for register CLMD" ] pub type W = crate :: W < u32 , super :: CLMD > ; # [ doc = "Register CLMD `reset()`'s with value 0x0a" ] impl crate :: ResetValue for super :: CLMD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0a } } # [ doc = "Reader of field `CLMD`" ] pub type CLMD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLMD`" ] pub struct CLMD_W < 'a > { w : & 'a mut W , } impl < 'a > CLMD_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clmd ( & self ) -> CLMD_R { CLMD_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clmd ( & mut self ) -> CLMD_W { CLMD_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clms](clms) module" ] pub type CLMS = crate :: Reg < u32 , _CLMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLMS ; # [ doc = "`read()` method returns [clms::R](clms::R) reader structure" ] impl crate :: Readable for CLMS { } # [ doc = "`write(|w| ..)` method takes [clms::W](clms::W) writer structure" ] impl crate :: Writable for CLMS { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clms { # [ doc = "Reader of register CLMS" ] pub type R = crate :: R < u32 , super :: CLMS > ; # [ doc = "Writer for register CLMS" ] pub type W = crate :: W < u32 , super :: CLMS > ; # [ doc = "Register CLMS `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: CLMS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "Reader of field `CLMS`" ] pub type CLMS_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLMS`" ] pub struct CLMS_W < 'a > { w : & 'a mut W , } impl < 'a > CLMS_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clms ( & self ) -> CLMS_R { CLMS_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clms ( & mut self ) -> CLMS_W { CLMS_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm4](clm4) module" ] pub type CLM4 = crate :: Reg < u32 , _CLM4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM4 ; # [ doc = "`read()` method returns [clm4::R](clm4::R) reader structure" ] impl crate :: Readable for CLM4 { } # [ doc = "`write(|w| ..)` method takes [clm4::W](clm4::W) writer structure" ] impl crate :: Writable for CLM4 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm4 { # [ doc = "Reader of register CLM4" ] pub type R = crate :: R < u32 , super :: CLM4 > ; # [ doc = "Writer for register CLM4" ] pub type W = crate :: W < u32 , super :: CLM4 > ; # [ doc = "Register CLM4 `reset()`'s with value 0x0200" ] impl crate :: ResetValue for super :: CLM4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0200 } } # [ doc = "Reader of field `CLM4`" ] pub type CLM4_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLM4`" ] pub struct CLM4_W < 'a > { w : & 'a mut W , } impl < 'a > CLM4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Calibration Value" ] # [ inline ( always ) ] pub fn clm4 ( & self ) -> CLM4_R { CLM4_R :: new ( ( self . bits & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Calibration Value" ] # [ inline ( always ) ] pub fn clm4 ( & mut self ) -> CLM4_W { CLM4_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm3](clm3) module" ] pub type CLM3 = crate :: Reg < u32 , _CLM3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM3 ; # [ doc = "`read()` method returns [clm3::R](clm3::R) reader structure" ] impl crate :: Readable for CLM3 { } # [ doc = "`write(|w| ..)` method takes [clm3::W](clm3::W) writer structure" ] impl crate :: Writable for CLM3 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm3 { # [ doc = "Reader of register CLM3" ] pub type R = crate :: R < u32 , super :: CLM3 > ; # [ doc = "Writer for register CLM3" ] pub type W = crate :: W < u32 , super :: CLM3 > ; # [ doc = "Register CLM3 `reset()`'s with value 0x0100" ] impl crate :: ResetValue for super :: CLM3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0100 } } # [ doc = "Reader of field `CLM3`" ] pub type CLM3_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLM3`" ] pub struct CLM3_W < 'a > { w : & 'a mut W , } impl < 'a > CLM3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x01ff ) | ( ( value as u32 ) & 0x01ff ) ; self . w } } impl R { # [ doc = "Bits 0:8 - Calibration Value" ] # [ inline ( always ) ] pub fn clm3 ( & self ) -> CLM3_R { CLM3_R :: new ( ( self . bits & 0x01ff ) as u16 ) } } impl W { # [ doc = "Bits 0:8 - Calibration Value" ] # [ inline ( always ) ] pub fn clm3 ( & mut self ) -> CLM3_W { CLM3_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm2](clm2) module" ] pub type CLM2 = crate :: Reg < u32 , _CLM2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM2 ; # [ doc = "`read()` method returns [clm2::R](clm2::R) reader structure" ] impl crate :: Readable for CLM2 { } # [ doc = "`write(|w| ..)` method takes [clm2::W](clm2::W) writer structure" ] impl crate :: Writable for CLM2 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm2 { # [ doc = "Reader of register CLM2" ] pub type R = crate :: R < u32 , super :: CLM2 > ; # [ doc = "Writer for register CLM2" ] pub type W = crate :: W < u32 , super :: CLM2 > ; # [ doc = "Register CLM2 `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: CLM2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Reader of field `CLM2`" ] pub type CLM2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLM2`" ] pub struct CLM2_W < 'a > { w : & 'a mut W , } impl < 'a > CLM2_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Calibration Value" ] # [ inline ( always ) ] pub fn clm2 ( & self ) -> CLM2_R { CLM2_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Calibration Value" ] # [ inline ( always ) ] pub fn clm2 ( & mut self ) -> CLM2_W { CLM2_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm1](clm1) module" ] pub type CLM1 = crate :: Reg < u32 , _CLM1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM1 ; # [ doc = "`read()` method returns [clm1::R](clm1::R) reader structure" ] impl crate :: Readable for CLM1 { } # [ doc = "`write(|w| ..)` method takes [clm1::W](clm1::W) writer structure" ] impl crate :: Writable for CLM1 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm1 { # [ doc = "Reader of register CLM1" ] pub type R = crate :: R < u32 , super :: CLM1 > ; # [ doc = "Writer for register CLM1" ] pub type W = crate :: W < u32 , super :: CLM1 > ; # [ doc = "Register CLM1 `reset()`'s with value 0x40" ] impl crate :: ResetValue for super :: CLM1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x40 } } # [ doc = "Reader of field `CLM1`" ] pub type CLM1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLM1`" ] pub struct CLM1_W < 'a > { w : & 'a mut W , } impl < 'a > CLM1_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 & ! 0x7f ) | ( ( value as u32 ) & 0x7f ) ; self . w } } impl R { # [ doc = "Bits 0:6 - Calibration Value" ] # [ inline ( always ) ] pub fn clm1 ( & self ) -> CLM1_R { CLM1_R :: new ( ( self . bits & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 0:6 - Calibration Value" ] # [ inline ( always ) ] pub fn clm1 ( & mut self ) -> CLM1_W { CLM1_W { w : self } } } } # [ doc = "ADC Minus-Side General Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clm0](clm0) module" ] pub type CLM0 = crate :: Reg < u32 , _CLM0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLM0 ; # [ doc = "`read()` method returns [clm0::R](clm0::R) reader structure" ] impl crate :: Readable for CLM0 { } # [ doc = "`write(|w| ..)` method takes [clm0::W](clm0::W) writer structure" ] impl crate :: Writable for CLM0 { } # [ doc = "ADC Minus-Side General Calibration Value Register" ] pub mod clm0 { # [ doc = "Reader of register CLM0" ] pub type R = crate :: R < u32 , super :: CLM0 > ; # [ doc = "Writer for register CLM0" ] pub type W = crate :: W < u32 , super :: CLM0 > ; # [ doc = "Register CLM0 `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: CLM0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "Reader of field `CLM0`" ] pub type CLM0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CLM0`" ] pub struct CLM0_W < 'a > { w : & 'a mut W , } impl < 'a > CLM0_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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clm0 ( & self ) -> CLM0_R { CLM0_R :: new ( ( self . bits & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - Calibration Value" ] # [ inline ( always ) ] pub fn clm0 ( & mut self ) -> CLM0_W { CLM0_W { w : self } } } } } # [ doc = "Secure Real Time Clock" ] pub struct RTC { _marker : PhantomData < * const ( ) > } unsafe impl Send for RTC { } impl RTC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const rtc :: RegisterBlock { 0x4003_d000 as * const _ } } impl Deref for RTC { type Target = rtc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * RTC :: ptr ( ) } } } # [ doc = "Secure Real Time Clock" ] pub mod rtc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - RTC Time Seconds Register" ] pub tsr : TSR , # [ doc = "0x04 - RTC Time Prescaler Register" ] pub tpr : TPR , # [ doc = "0x08 - RTC Time Alarm Register" ] pub tar : TAR , # [ doc = "0x0c - RTC Time Compensation Register" ] pub tcr : TCR , # [ doc = "0x10 - RTC Control Register" ] pub cr : CR , # [ doc = "0x14 - RTC Status Register" ] pub sr : SR , # [ doc = "0x18 - RTC Lock Register" ] pub lr : LR , # [ doc = "0x1c - RTC Interrupt Enable Register" ] pub ier : IER , # [ doc = "0x20 - RTC Tamper Time Seconds Register" ] pub ttsr : TTSR , # [ doc = "0x24 - RTC Monotonic Enable Register" ] pub mer : MER , # [ doc = "0x28 - RTC Monotonic Counter Low Register" ] pub mclr : MCLR , # [ doc = "0x2c - RTC Monotonic Counter High Register" ] pub mchr : MCHR , _reserved12 : [ u8 ; 2000usize ] , # [ doc = "0x800 - RTC Write Access Register" ] pub war : WAR , # [ doc = "0x804 - RTC Read Access Register" ] pub rar : RAR , } # [ doc = "RTC Time Seconds Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tsr](tsr) module" ] pub type TSR = crate :: Reg < u32 , _TSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TSR ; # [ doc = "`read()` method returns [tsr::R](tsr::R) reader structure" ] impl crate :: Readable for TSR { } # [ doc = "`write(|w| ..)` method takes [tsr::W](tsr::W) writer structure" ] impl crate :: Writable for TSR { } # [ doc = "RTC Time Seconds Register" ] pub mod tsr { # [ doc = "Reader of register TSR" ] pub type R = crate :: R < u32 , super :: TSR > ; # [ doc = "Writer for register TSR" ] pub type W = crate :: W < u32 , super :: TSR > ; # [ doc = "Register TSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TSR`" ] pub type TSR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `TSR`" ] pub struct TSR_W < 'a > { w : & 'a mut W , } impl < 'a > TSR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Time Seconds Register" ] # [ inline ( always ) ] pub fn tsr ( & self ) -> TSR_R { TSR_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Time Seconds Register" ] # [ inline ( always ) ] pub fn tsr ( & mut self ) -> TSR_W { TSR_W { w : self } } } } # [ doc = "RTC Time Prescaler Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tpr](tpr) module" ] pub type TPR = crate :: Reg < u32 , _TPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TPR ; # [ doc = "`read()` method returns [tpr::R](tpr::R) reader structure" ] impl crate :: Readable for TPR { } # [ doc = "`write(|w| ..)` method takes [tpr::W](tpr::W) writer structure" ] impl crate :: Writable for TPR { } # [ doc = "RTC Time Prescaler Register" ] pub mod tpr { # [ doc = "Reader of register TPR" ] pub type R = crate :: R < u32 , super :: TPR > ; # [ doc = "Writer for register TPR" ] pub type W = crate :: W < u32 , super :: TPR > ; # [ doc = "Register TPR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TPR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TPR`" ] pub type TPR_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TPR`" ] pub struct TPR_W < 'a > { w : & 'a mut W , } impl < 'a > TPR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Time Prescaler Register" ] # [ inline ( always ) ] pub fn tpr ( & self ) -> TPR_R { TPR_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Time Prescaler Register" ] # [ inline ( always ) ] pub fn tpr ( & mut self ) -> TPR_W { TPR_W { w : self } } } } # [ doc = "RTC Time Alarm Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tar](tar) module" ] pub type TAR = crate :: Reg < u32 , _TAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TAR ; # [ doc = "`read()` method returns [tar::R](tar::R) reader structure" ] impl crate :: Readable for TAR { } # [ doc = "`write(|w| ..)` method takes [tar::W](tar::W) writer structure" ] impl crate :: Writable for TAR { } # [ doc = "RTC Time Alarm Register" ] pub mod tar { # [ doc = "Reader of register TAR" ] pub type R = crate :: R < u32 , super :: TAR > ; # [ doc = "Writer for register TAR" ] pub type W = crate :: W < u32 , super :: TAR > ; # [ doc = "Register TAR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TAR`" ] pub type TAR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `TAR`" ] pub struct TAR_W < 'a > { w : & 'a mut W , } impl < 'a > TAR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Time Alarm Register" ] # [ inline ( always ) ] pub fn tar ( & self ) -> TAR_R { TAR_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Time Alarm Register" ] # [ inline ( always ) ] pub fn tar ( & mut self ) -> TAR_W { TAR_W { w : self } } } } # [ doc = "RTC Time Compensation Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr](tcr) module" ] pub type TCR = crate :: Reg < u32 , _TCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR ; # [ doc = "`read()` method returns [tcr::R](tcr::R) reader structure" ] impl crate :: Readable for TCR { } # [ doc = "`write(|w| ..)` method takes [tcr::W](tcr::W) writer structure" ] impl crate :: Writable for TCR { } # [ doc = "RTC Time Compensation Register" ] pub mod tcr { # [ doc = "Reader of register TCR" ] pub type R = crate :: R < u32 , super :: TCR > ; # [ doc = "Writer for register TCR" ] pub type W = crate :: W < u32 , super :: TCR > ; # [ doc = "Register TCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Time Compensation Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCR_A { # [ doc = "128: Time Prescaler Register overflows every 32896 clock cycles." ] _10000000 , # [ doc = "255: Time Prescaler Register overflows every 32769 clock cycles." ] _11111111 , # [ doc = "0: Time Prescaler Register overflows every 32768 clock cycles." ] _0 , # [ doc = "1: Time Prescaler Register overflows every 32767 clock cycles." ] _1 , # [ doc = "127: Time Prescaler Register overflows every 32641 clock cycles." ] _1111111 } impl From < TCR_A > for u8 { # [ inline ( always ) ] fn from ( variant : TCR_A ) -> Self { match variant { TCR_A :: _10000000 => 128 , TCR_A :: _11111111 => 255 , TCR_A :: _0 => 0 , TCR_A :: _1 => 1 , TCR_A :: _1111111 => 127 } } } # [ doc = "Reader of field `TCR`" ] pub type TCR_R = crate :: R < u8 , TCR_A > ; impl TCR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TCR_A > { use crate :: Variant :: * ; match self . bits { 128 => Val ( TCR_A :: _10000000 ) , 255 => Val ( TCR_A :: _11111111 ) , 0 => Val ( TCR_A :: _0 ) , 1 => Val ( TCR_A :: _1 ) , 127 => Val ( TCR_A :: _1111111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_10000000`" ] # [ inline ( always ) ] pub fn is_10000000 ( & self ) -> bool { * self == TCR_A :: _10000000 } # [ doc = "Checks if the value of the field is `_11111111`" ] # [ inline ( always ) ] pub fn is_11111111 ( & self ) -> bool { * self == TCR_A :: _11111111 } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCR_A :: _1 } # [ doc = "Checks if the value of the field is `_1111111`" ] # [ inline ( always ) ] pub fn is_1111111 ( & self ) -> bool { * self == TCR_A :: _1111111 } } # [ doc = "Write proxy for field `TCR`" ] pub struct TCR_W < 'a > { w : & 'a mut W , } impl < 'a > TCR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCR_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Time Prescaler Register overflows every 32896 clock cycles." ] # [ inline ( always ) ] pub fn _10000000 ( self ) -> & 'a mut W { self . variant ( TCR_A :: _10000000 ) } # [ doc = "Time Prescaler Register overflows every 32769 clock cycles." ] # [ inline ( always ) ] pub fn _11111111 ( self ) -> & 'a mut W { self . variant ( TCR_A :: _11111111 ) } # [ doc = "Time Prescaler Register overflows every 32768 clock cycles." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCR_A :: _0 ) } # [ doc = "Time Prescaler Register overflows every 32767 clock cycles." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCR_A :: _1 ) } # [ doc = "Time Prescaler Register overflows every 32641 clock cycles." ] # [ inline ( always ) ] pub fn _1111111 ( self ) -> & 'a mut W { self . variant ( TCR_A :: _1111111 ) } # [ 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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `CIR`" ] pub type CIR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CIR`" ] pub struct CIR_W < 'a > { w : & 'a mut W , } impl < 'a > CIR_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `TCV`" ] pub type TCV_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `CIC`" ] pub type CIC_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Time Compensation Register" ] # [ inline ( always ) ] pub fn tcr ( & self ) -> TCR_R { TCR_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Compensation Interval Register" ] # [ inline ( always ) ] pub fn cir ( & self ) -> CIR_R { CIR_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Time Compensation Value" ] # [ inline ( always ) ] pub fn tcv ( & self ) -> TCV_R { TCV_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Compensation Interval Counter" ] # [ inline ( always ) ] pub fn cic ( & self ) -> CIC_R { CIC_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Time Compensation Register" ] # [ inline ( always ) ] pub fn tcr ( & mut self ) -> TCR_W { TCR_W { w : self } } # [ doc = "Bits 8:15 - Compensation Interval Register" ] # [ inline ( always ) ] pub fn cir ( & mut self ) -> CIR_W { CIR_W { w : self } } } } # [ doc = "RTC Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr](cr) module" ] pub type CR = crate :: Reg < u32 , _CR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR ; # [ doc = "`read()` method returns [cr::R](cr::R) reader structure" ] impl crate :: Readable for CR { } # [ doc = "`write(|w| ..)` method takes [cr::W](cr::W) writer structure" ] impl crate :: Writable for CR { } # [ doc = "RTC Control Register" ] pub mod cr { # [ doc = "Reader of register CR" ] pub type R = crate :: R < u32 , super :: CR > ; # [ doc = "Writer for register CR" ] pub type W = crate :: W < u32 , super :: CR > ; # [ doc = "Register CR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Software Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWR_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Resets all RTC registers except for the SWR bit and the RTC_WAR and RTC_RAR registers . The SWR bit is cleared by VBAT POR and by software explicitly clearing it." ] _1 } impl From < SWR_A > for bool { # [ inline ( always ) ] fn from ( variant : SWR_A ) -> Self { match variant { SWR_A :: _0 => false , SWR_A :: _1 => true } } } # [ doc = "Reader of field `SWR`" ] pub type SWR_R = crate :: R < bool , SWR_A > ; impl SWR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWR_A { match self . bits { false => SWR_A :: _0 , true => SWR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWR_A :: _1 } } # [ doc = "Write proxy for field `SWR`" ] pub struct SWR_W < 'a > { w : & 'a mut W , } impl < 'a > SWR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWR_A :: _0 ) } # [ doc = "Resets all RTC registers except for the SWR bit and the RTC_WAR and RTC_RAR registers . The SWR bit is cleared by VBAT POR and by software explicitly clearing it." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWR_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Pin Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPE_A { # [ doc = "0: Wakeup pin is disabled." ] _0 , # [ doc = "1: Wakeup pin is enabled and wakeup pin asserts if the RTC interrupt asserts or the wakeup pin is turned on." ] _1 } impl From < WPE_A > for bool { # [ inline ( always ) ] fn from ( variant : WPE_A ) -> Self { match variant { WPE_A :: _0 => false , WPE_A :: _1 => true } } } # [ doc = "Reader of field `WPE`" ] pub type WPE_R = crate :: R < bool , WPE_A > ; impl WPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPE_A { match self . bits { false => WPE_A :: _0 , true => WPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPE_A :: _1 } } # [ doc = "Write proxy for field `WPE`" ] pub struct WPE_W < 'a > { w : & 'a mut W , } impl < 'a > WPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Wakeup pin is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPE_A :: _0 ) } # [ doc = "Wakeup pin is enabled and wakeup pin asserts if the RTC interrupt asserts or the wakeup pin is turned on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPE_A :: _1 ) } # [ 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 } } # [ doc = "Supervisor Access\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUP_A { # [ doc = "0: Non-supervisor mode write accesses are not supported and generate a bus error." ] _0 , # [ doc = "1: Non-supervisor mode write accesses are supported." ] _1 } impl From < SUP_A > for bool { # [ inline ( always ) ] fn from ( variant : SUP_A ) -> Self { match variant { SUP_A :: _0 => false , SUP_A :: _1 => true } } } # [ doc = "Reader of field `SUP`" ] pub type SUP_R = crate :: R < bool , SUP_A > ; impl SUP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SUP_A { match self . bits { false => SUP_A :: _0 , true => SUP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SUP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SUP_A :: _1 } } # [ doc = "Write proxy for field `SUP`" ] pub struct SUP_W < 'a > { w : & 'a mut W , } impl < 'a > SUP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SUP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Non-supervisor mode write accesses are not supported and generate a bus error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SUP_A :: _0 ) } # [ doc = "Non-supervisor mode write accesses are supported." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SUP_A :: _1 ) } # [ 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 = "Update Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UM_A { # [ doc = "0: Registers cannot be written when locked." ] _0 , # [ doc = "1: Registers can be written when locked under limited conditions." ] _1 } impl From < UM_A > for bool { # [ inline ( always ) ] fn from ( variant : UM_A ) -> Self { match variant { UM_A :: _0 => false , UM_A :: _1 => true } } } # [ doc = "Reader of field `UM`" ] pub type UM_R = crate :: R < bool , UM_A > ; impl UM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UM_A { match self . bits { false => UM_A :: _0 , true => UM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UM_A :: _1 } } # [ doc = "Write proxy for field `UM`" ] pub struct UM_W < 'a > { w : & 'a mut W , } impl < 'a > UM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Registers cannot be written when locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UM_A :: _0 ) } # [ doc = "Registers can be written when locked under limited conditions." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Wakeup Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPS_A { # [ doc = "0: Wakeup pin asserts (active low, open drain) if the RTC interrupt asserts or the wakeup pin is turned on." ] _0 , # [ doc = "1: Wakeup pin instead outputs the RTC 32kHz clock, provided the wakeup pin is turned on and the 32kHz clock is output to other peripherals." ] _1 } impl From < WPS_A > for bool { # [ inline ( always ) ] fn from ( variant : WPS_A ) -> Self { match variant { WPS_A :: _0 => false , WPS_A :: _1 => true } } } # [ doc = "Reader of field `WPS`" ] pub type WPS_R = crate :: R < bool , WPS_A > ; impl WPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPS_A { match self . bits { false => WPS_A :: _0 , true => WPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPS_A :: _1 } } # [ doc = "Write proxy for field `WPS`" ] pub struct WPS_W < 'a > { w : & 'a mut W , } impl < 'a > WPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Wakeup pin asserts (active low, open drain) if the RTC interrupt asserts or the wakeup pin is turned on." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPS_A :: _0 ) } # [ doc = "Wakeup pin instead outputs the RTC 32kHz clock, provided the wakeup pin is turned on and the 32kHz clock is output to other peripherals." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPS_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Oscillator Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OSCE_A { # [ doc = "0: 32.768 kHz oscillator is disabled." ] _0 , # [ doc = "1: 32.768 kHz oscillator is enabled. After setting this bit, wait the oscillator startup time before enabling the time counter to allow the 32.768 kHz clock time to stabilize." ] _1 } impl From < OSCE_A > for bool { # [ inline ( always ) ] fn from ( variant : OSCE_A ) -> Self { match variant { OSCE_A :: _0 => false , OSCE_A :: _1 => true } } } # [ doc = "Reader of field `OSCE`" ] pub type OSCE_R = crate :: R < bool , OSCE_A > ; impl OSCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OSCE_A { match self . bits { false => OSCE_A :: _0 , true => OSCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OSCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OSCE_A :: _1 } } # [ doc = "Write proxy for field `OSCE`" ] pub struct OSCE_W < 'a > { w : & 'a mut W , } impl < 'a > OSCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OSCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "32.768 kHz oscillator is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OSCE_A :: _0 ) } # [ doc = "32.768 kHz oscillator is enabled. After setting this bit, wait the oscillator startup time before enabling the time counter to allow the 32.768 kHz clock time to stabilize." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OSCE_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Clock Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKO_A { # [ doc = "0: The 32 kHz clock is output to other peripherals." ] _0 , # [ doc = "1: The 32 kHz clock is not output to other peripherals." ] _1 } impl From < CLKO_A > for bool { # [ inline ( always ) ] fn from ( variant : CLKO_A ) -> Self { match variant { CLKO_A :: _0 => false , CLKO_A :: _1 => true } } } # [ doc = "Reader of field `CLKO`" ] pub type CLKO_R = crate :: R < bool , CLKO_A > ; impl CLKO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKO_A { match self . bits { false => CLKO_A :: _0 , true => CLKO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLKO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLKO_A :: _1 } } # [ doc = "Write proxy for field `CLKO`" ] pub struct CLKO_W < 'a > { w : & 'a mut W , } impl < 'a > CLKO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The 32 kHz clock is output to other peripherals." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLKO_A :: _0 ) } # [ doc = "The 32 kHz clock is not output to other peripherals." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLKO_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Oscillator 16pF Load Configure\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SC16P_A { # [ doc = "0: Disable the load." ] _0 , # [ doc = "1: Enable the additional load." ] _1 } impl From < SC16P_A > for bool { # [ inline ( always ) ] fn from ( variant : SC16P_A ) -> Self { match variant { SC16P_A :: _0 => false , SC16P_A :: _1 => true } } } # [ doc = "Reader of field `SC16P`" ] pub type SC16P_R = crate :: R < bool , SC16P_A > ; impl SC16P_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SC16P_A { match self . bits { false => SC16P_A :: _0 , true => SC16P_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SC16P_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SC16P_A :: _1 } } # [ doc = "Write proxy for field `SC16P`" ] pub struct SC16P_W < 'a > { w : & 'a mut W , } impl < 'a > SC16P_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SC16P_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the load." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SC16P_A :: _0 ) } # [ doc = "Enable the additional load." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SC16P_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Oscillator 8pF Load Configure\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SC8P_A { # [ doc = "0: Disable the load." ] _0 , # [ doc = "1: Enable the additional load." ] _1 } impl From < SC8P_A > for bool { # [ inline ( always ) ] fn from ( variant : SC8P_A ) -> Self { match variant { SC8P_A :: _0 => false , SC8P_A :: _1 => true } } } # [ doc = "Reader of field `SC8P`" ] pub type SC8P_R = crate :: R < bool , SC8P_A > ; impl SC8P_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SC8P_A { match self . bits { false => SC8P_A :: _0 , true => SC8P_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SC8P_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SC8P_A :: _1 } } # [ doc = "Write proxy for field `SC8P`" ] pub struct SC8P_W < 'a > { w : & 'a mut W , } impl < 'a > SC8P_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SC8P_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the load." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SC8P_A :: _0 ) } # [ doc = "Enable the additional load." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SC8P_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Oscillator 4pF Load Configure\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SC4P_A { # [ doc = "0: Disable the load." ] _0 , # [ doc = "1: Enable the additional load." ] _1 } impl From < SC4P_A > for bool { # [ inline ( always ) ] fn from ( variant : SC4P_A ) -> Self { match variant { SC4P_A :: _0 => false , SC4P_A :: _1 => true } } } # [ doc = "Reader of field `SC4P`" ] pub type SC4P_R = crate :: R < bool , SC4P_A > ; impl SC4P_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SC4P_A { match self . bits { false => SC4P_A :: _0 , true => SC4P_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SC4P_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SC4P_A :: _1 } } # [ doc = "Write proxy for field `SC4P`" ] pub struct SC4P_W < 'a > { w : & 'a mut W , } impl < 'a > SC4P_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SC4P_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the load." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SC4P_A :: _0 ) } # [ doc = "Enable the additional load." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SC4P_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Oscillator 2pF Load Configure\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SC2P_A { # [ doc = "0: Disable the load." ] _0 , # [ doc = "1: Enable the additional load." ] _1 } impl From < SC2P_A > for bool { # [ inline ( always ) ] fn from ( variant : SC2P_A ) -> Self { match variant { SC2P_A :: _0 => false , SC2P_A :: _1 => true } } } # [ doc = "Reader of field `SC2P`" ] pub type SC2P_R = crate :: R < bool , SC2P_A > ; impl SC2P_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SC2P_A { match self . bits { false => SC2P_A :: _0 , true => SC2P_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SC2P_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SC2P_A :: _1 } } # [ doc = "Write proxy for field `SC2P`" ] pub struct SC2P_W < 'a > { w : & 'a mut W , } impl < 'a > SC2P_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SC2P_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the load." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SC2P_A :: _0 ) } # [ doc = "Enable the additional load." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SC2P_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Software Reset" ] # [ inline ( always ) ] pub fn swr ( & self ) -> SWR_R { SWR_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Pin Enable" ] # [ inline ( always ) ] pub fn wpe ( & self ) -> WPE_R { WPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Supervisor Access" ] # [ inline ( always ) ] pub fn sup ( & self ) -> SUP_R { SUP_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Update Mode" ] # [ inline ( always ) ] pub fn um ( & self ) -> UM_R { UM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Wakeup Pin Select" ] # [ inline ( always ) ] pub fn wps ( & self ) -> WPS_R { WPS_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Oscillator Enable" ] # [ inline ( always ) ] pub fn osce ( & self ) -> OSCE_R { OSCE_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Clock Output" ] # [ inline ( always ) ] pub fn clko ( & self ) -> CLKO_R { CLKO_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Oscillator 16pF Load Configure" ] # [ inline ( always ) ] pub fn sc16p ( & self ) -> SC16P_R { SC16P_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Oscillator 8pF Load Configure" ] # [ inline ( always ) ] pub fn sc8p ( & self ) -> SC8P_R { SC8P_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Oscillator 4pF Load Configure" ] # [ inline ( always ) ] pub fn sc4p ( & self ) -> SC4P_R { SC4P_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Oscillator 2pF Load Configure" ] # [ inline ( always ) ] pub fn sc2p ( & self ) -> SC2P_R { SC2P_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Software Reset" ] # [ inline ( always ) ] pub fn swr ( & mut self ) -> SWR_W { SWR_W { w : self } } # [ doc = "Bit 1 - Wakeup Pin Enable" ] # [ inline ( always ) ] pub fn wpe ( & mut self ) -> WPE_W { WPE_W { w : self } } # [ doc = "Bit 2 - Supervisor Access" ] # [ inline ( always ) ] pub fn sup ( & mut self ) -> SUP_W { SUP_W { w : self } } # [ doc = "Bit 3 - Update Mode" ] # [ inline ( always ) ] pub fn um ( & mut self ) -> UM_W { UM_W { w : self } } # [ doc = "Bit 4 - Wakeup Pin Select" ] # [ inline ( always ) ] pub fn wps ( & mut self ) -> WPS_W { WPS_W { w : self } } # [ doc = "Bit 8 - Oscillator Enable" ] # [ inline ( always ) ] pub fn osce ( & mut self ) -> OSCE_W { OSCE_W { w : self } } # [ doc = "Bit 9 - Clock Output" ] # [ inline ( always ) ] pub fn clko ( & mut self ) -> CLKO_W { CLKO_W { w : self } } # [ doc = "Bit 10 - Oscillator 16pF Load Configure" ] # [ inline ( always ) ] pub fn sc16p ( & mut self ) -> SC16P_W { SC16P_W { w : self } } # [ doc = "Bit 11 - Oscillator 8pF Load Configure" ] # [ inline ( always ) ] pub fn sc8p ( & mut self ) -> SC8P_W { SC8P_W { w : self } } # [ doc = "Bit 12 - Oscillator 4pF Load Configure" ] # [ inline ( always ) ] pub fn sc4p ( & mut self ) -> SC4P_W { SC4P_W { w : self } } # [ doc = "Bit 13 - Oscillator 2pF Load Configure" ] # [ inline ( always ) ] pub fn sc2p ( & mut self ) -> SC2P_W { SC2P_W { w : self } } } } # [ doc = "RTC Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sr](sr) module" ] pub type SR = crate :: Reg < u32 , _SR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SR ; # [ doc = "`read()` method returns [sr::R](sr::R) reader structure" ] impl crate :: Readable for SR { } # [ doc = "`write(|w| ..)` method takes [sr::W](sr::W) writer structure" ] impl crate :: Writable for SR { } # [ doc = "RTC Status Register" ] pub mod sr { # [ doc = "Reader of register SR" ] pub type R = crate :: R < u32 , super :: SR > ; # [ doc = "Writer for register SR" ] pub type W = crate :: W < u32 , super :: SR > ; # [ doc = "Register SR `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: SR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Time Invalid Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIF_A { # [ doc = "0: Time is valid." ] _0 , # [ doc = "1: Time is invalid and time counter is read as zero." ] _1 } impl From < TIF_A > for bool { # [ inline ( always ) ] fn from ( variant : TIF_A ) -> Self { match variant { TIF_A :: _0 => false , TIF_A :: _1 => true } } } # [ doc = "Reader of field `TIF`" ] pub type TIF_R = crate :: R < bool , TIF_A > ; impl TIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIF_A { match self . bits { false => TIF_A :: _0 , true => TIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIF_A :: _1 } } # [ doc = "Time Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: Time overflow has not occurred." ] _0 , # [ doc = "1: Time overflow has occurred and time counter is read as zero." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Time Alarm Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TAF_A { # [ doc = "0: Time alarm has not occurred." ] _0 , # [ doc = "1: Time alarm has occurred." ] _1 } impl From < TAF_A > for bool { # [ inline ( always ) ] fn from ( variant : TAF_A ) -> Self { match variant { TAF_A :: _0 => false , TAF_A :: _1 => true } } } # [ doc = "Reader of field `TAF`" ] pub type TAF_R = crate :: R < bool , TAF_A > ; impl TAF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TAF_A { match self . bits { false => TAF_A :: _0 , true => TAF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TAF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TAF_A :: _1 } } # [ doc = "Monotonic Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MOF_A { # [ doc = "0: Monotonic counter overflow has not occurred." ] _0 , # [ doc = "1: Monotonic counter overflow has occurred and monotonic counter is read as zero." ] _1 } impl From < MOF_A > for bool { # [ inline ( always ) ] fn from ( variant : MOF_A ) -> Self { match variant { MOF_A :: _0 => false , MOF_A :: _1 => true } } } # [ doc = "Reader of field `MOF`" ] pub type MOF_R = crate :: R < bool , MOF_A > ; impl MOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MOF_A { match self . bits { false => MOF_A :: _0 , true => MOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MOF_A :: _1 } } # [ doc = "Time Counter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCE_A { # [ doc = "0: Time counter is disabled." ] _0 , # [ doc = "1: Time counter is enabled." ] _1 } impl From < TCE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCE_A ) -> Self { match variant { TCE_A :: _0 => false , TCE_A :: _1 => true } } } # [ doc = "Reader of field `TCE`" ] pub type TCE_R = crate :: R < bool , TCE_A > ; impl TCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCE_A { match self . bits { false => TCE_A :: _0 , true => TCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCE_A :: _1 } } # [ doc = "Write proxy for field `TCE`" ] pub struct TCE_W < 'a > { w : & 'a mut W , } impl < 'a > TCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Time counter is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCE_A :: _0 ) } # [ doc = "Time counter is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 0 - Time Invalid Flag" ] # [ inline ( always ) ] pub fn tif ( & self ) -> TIF_R { TIF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Time Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Time Alarm Flag" ] # [ inline ( always ) ] pub fn taf ( & self ) -> TAF_R { TAF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Monotonic Overflow Flag" ] # [ inline ( always ) ] pub fn mof ( & self ) -> MOF_R { MOF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Time Counter Enable" ] # [ inline ( always ) ] pub fn tce ( & self ) -> TCE_R { TCE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Time Counter Enable" ] # [ inline ( always ) ] pub fn tce ( & mut self ) -> TCE_W { TCE_W { w : self } } } } # [ doc = "RTC Lock Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [lr](lr) module" ] pub type LR = crate :: Reg < u32 , _LR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _LR ; # [ doc = "`read()` method returns [lr::R](lr::R) reader structure" ] impl crate :: Readable for LR { } # [ doc = "`write(|w| ..)` method takes [lr::W](lr::W) writer structure" ] impl crate :: Writable for LR { } # [ doc = "RTC Lock Register" ] pub mod lr { # [ doc = "Reader of register LR" ] pub type R = crate :: R < u32 , super :: LR > ; # [ doc = "Writer for register LR" ] pub type W = crate :: W < u32 , super :: LR > ; # [ doc = "Register LR `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: LR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Time Compensation Lock\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCL_A { # [ doc = "0: Time Compensation Register is locked and writes are ignored." ] _0 , # [ doc = "1: Time Compensation Register is not locked and writes complete as normal." ] _1 } impl From < TCL_A > for bool { # [ inline ( always ) ] fn from ( variant : TCL_A ) -> Self { match variant { TCL_A :: _0 => false , TCL_A :: _1 => true } } } # [ doc = "Reader of field `TCL`" ] pub type TCL_R = crate :: R < bool , TCL_A > ; impl TCL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCL_A { match self . bits { false => TCL_A :: _0 , true => TCL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCL_A :: _1 } } # [ doc = "Write proxy for field `TCL`" ] pub struct TCL_W < 'a > { w : & 'a mut W , } impl < 'a > TCL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Time Compensation Register is locked and writes are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCL_A :: _0 ) } # [ doc = "Time Compensation Register is not locked and writes complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Control Register Lock\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRL_A { # [ doc = "0: Control Register is locked and writes are ignored." ] _0 , # [ doc = "1: Control Register is not locked and writes complete as normal." ] _1 } impl From < CRL_A > for bool { # [ inline ( always ) ] fn from ( variant : CRL_A ) -> Self { match variant { CRL_A :: _0 => false , CRL_A :: _1 => true } } } # [ doc = "Reader of field `CRL`" ] pub type CRL_R = crate :: R < bool , CRL_A > ; impl CRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRL_A { match self . bits { false => CRL_A :: _0 , true => CRL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRL_A :: _1 } } # [ doc = "Write proxy for field `CRL`" ] pub struct CRL_W < 'a > { w : & 'a mut W , } impl < 'a > CRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Control Register is locked and writes are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRL_A :: _0 ) } # [ doc = "Control Register is not locked and writes complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Status Register Lock\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRL_A { # [ doc = "0: Status Register is locked and writes are ignored." ] _0 , # [ doc = "1: Status Register is not locked and writes complete as normal." ] _1 } impl From < SRL_A > for bool { # [ inline ( always ) ] fn from ( variant : SRL_A ) -> Self { match variant { SRL_A :: _0 => false , SRL_A :: _1 => true } } } # [ doc = "Reader of field `SRL`" ] pub type SRL_R = crate :: R < bool , SRL_A > ; impl SRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRL_A { match self . bits { false => SRL_A :: _0 , true => SRL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRL_A :: _1 } } # [ doc = "Write proxy for field `SRL`" ] pub struct SRL_W < 'a > { w : & 'a mut W , } impl < 'a > SRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Status Register is locked and writes are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRL_A :: _0 ) } # [ doc = "Status Register is not locked and writes complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRL_A :: _1 ) } # [ 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 = "Lock Register Lock\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LRL_A { # [ doc = "0: Lock Register is locked and writes are ignored." ] _0 , # [ doc = "1: Lock Register is not locked and writes complete as normal." ] _1 } impl From < LRL_A > for bool { # [ inline ( always ) ] fn from ( variant : LRL_A ) -> Self { match variant { LRL_A :: _0 => false , LRL_A :: _1 => true } } } # [ doc = "Reader of field `LRL`" ] pub type LRL_R = crate :: R < bool , LRL_A > ; impl LRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LRL_A { match self . bits { false => LRL_A :: _0 , true => LRL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LRL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LRL_A :: _1 } } # [ doc = "Write proxy for field `LRL`" ] pub struct LRL_W < 'a > { w : & 'a mut W , } impl < 'a > LRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LRL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Lock Register is locked and writes are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LRL_A :: _0 ) } # [ doc = "Lock Register is not locked and writes complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LRL_A :: _1 ) } # [ 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 = "Tamper Time Seconds Lock\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TTSL_A { # [ doc = "0: Tamper Time Seconds Register is locked and writes are ignored." ] _0 , # [ doc = "1: Tamper Time Seconds Register is not locked and writes complete as normal." ] _1 } impl From < TTSL_A > for bool { # [ inline ( always ) ] fn from ( variant : TTSL_A ) -> Self { match variant { TTSL_A :: _0 => false , TTSL_A :: _1 => true } } } # [ doc = "Reader of field `TTSL`" ] pub type TTSL_R = crate :: R < bool , TTSL_A > ; impl TTSL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TTSL_A { match self . bits { false => TTSL_A :: _0 , true => TTSL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TTSL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TTSL_A :: _1 } } # [ doc = "Write proxy for field `TTSL`" ] pub struct TTSL_W < 'a > { w : & 'a mut W , } impl < 'a > TTSL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TTSL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Tamper Time Seconds Register is locked and writes are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TTSL_A :: _0 ) } # [ doc = "Tamper Time Seconds Register is not locked and writes complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TTSL_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Monotonic Enable Lock\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MEL_A { # [ doc = "0: Monotonic Enable Register is locked and writes are ignored." ] _0 , # [ doc = "1: Monotonic Enable Register is not locked and writes complete as normal." ] _1 } impl From < MEL_A > for bool { # [ inline ( always ) ] fn from ( variant : MEL_A ) -> Self { match variant { MEL_A :: _0 => false , MEL_A :: _1 => true } } } # [ doc = "Reader of field `MEL`" ] pub type MEL_R = crate :: R < bool , MEL_A > ; impl MEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MEL_A { match self . bits { false => MEL_A :: _0 , true => MEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MEL_A :: _1 } } # [ doc = "Write proxy for field `MEL`" ] pub struct MEL_W < 'a > { w : & 'a mut W , } impl < 'a > MEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Monotonic Enable Register is locked and writes are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MEL_A :: _0 ) } # [ doc = "Monotonic Enable Register is not locked and writes complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MEL_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Monotonic Counter Low Lock\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MCLL_A { # [ doc = "0: Monotonic Counter Low Register is locked and writes are ignored." ] _0 , # [ doc = "1: Monotonic Counter Low Register is not locked and writes complete as normal." ] _1 } impl From < MCLL_A > for bool { # [ inline ( always ) ] fn from ( variant : MCLL_A ) -> Self { match variant { MCLL_A :: _0 => false , MCLL_A :: _1 => true } } } # [ doc = "Reader of field `MCLL`" ] pub type MCLL_R = crate :: R < bool , MCLL_A > ; impl MCLL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MCLL_A { match self . bits { false => MCLL_A :: _0 , true => MCLL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MCLL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MCLL_A :: _1 } } # [ doc = "Write proxy for field `MCLL`" ] pub struct MCLL_W < 'a > { w : & 'a mut W , } impl < 'a > MCLL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MCLL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Monotonic Counter Low Register is locked and writes are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MCLL_A :: _0 ) } # [ doc = "Monotonic Counter Low Register is not locked and writes complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MCLL_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Monotonic Counter High Lock\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MCHL_A { # [ doc = "0: Monotonic Counter High Register is locked and writes are ignored." ] _0 , # [ doc = "1: Monotonic Counter High Register is not locked and writes complete as normal." ] _1 } impl From < MCHL_A > for bool { # [ inline ( always ) ] fn from ( variant : MCHL_A ) -> Self { match variant { MCHL_A :: _0 => false , MCHL_A :: _1 => true } } } # [ doc = "Reader of field `MCHL`" ] pub type MCHL_R = crate :: R < bool , MCHL_A > ; impl MCHL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MCHL_A { match self . bits { false => MCHL_A :: _0 , true => MCHL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MCHL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MCHL_A :: _1 } } # [ doc = "Write proxy for field `MCHL`" ] pub struct MCHL_W < 'a > { w : & 'a mut W , } impl < 'a > MCHL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MCHL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Monotonic Counter High Register is locked and writes are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MCHL_A :: _0 ) } # [ doc = "Monotonic Counter High Register is not locked and writes complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MCHL_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } impl R { # [ doc = "Bit 3 - Time Compensation Lock" ] # [ inline ( always ) ] pub fn tcl ( & self ) -> TCL_R { TCL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Control Register Lock" ] # [ inline ( always ) ] pub fn crl ( & self ) -> CRL_R { CRL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Status Register Lock" ] # [ inline ( always ) ] pub fn srl ( & self ) -> SRL_R { SRL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Lock Register Lock" ] # [ inline ( always ) ] pub fn lrl ( & self ) -> LRL_R { LRL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Tamper Time Seconds Lock" ] # [ inline ( always ) ] pub fn ttsl ( & self ) -> TTSL_R { TTSL_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Monotonic Enable Lock" ] # [ inline ( always ) ] pub fn mel ( & self ) -> MEL_R { MEL_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Monotonic Counter Low Lock" ] # [ inline ( always ) ] pub fn mcll ( & self ) -> MCLL_R { MCLL_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Monotonic Counter High Lock" ] # [ inline ( always ) ] pub fn mchl ( & self ) -> MCHL_R { MCHL_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 3 - Time Compensation Lock" ] # [ inline ( always ) ] pub fn tcl ( & mut self ) -> TCL_W { TCL_W { w : self } } # [ doc = "Bit 4 - Control Register Lock" ] # [ inline ( always ) ] pub fn crl ( & mut self ) -> CRL_W { CRL_W { w : self } } # [ doc = "Bit 5 - Status Register Lock" ] # [ inline ( always ) ] pub fn srl ( & mut self ) -> SRL_W { SRL_W { w : self } } # [ doc = "Bit 6 - Lock Register Lock" ] # [ inline ( always ) ] pub fn lrl ( & mut self ) -> LRL_W { LRL_W { w : self } } # [ doc = "Bit 8 - Tamper Time Seconds Lock" ] # [ inline ( always ) ] pub fn ttsl ( & mut self ) -> TTSL_W { TTSL_W { w : self } } # [ doc = "Bit 9 - Monotonic Enable Lock" ] # [ inline ( always ) ] pub fn mel ( & mut self ) -> MEL_W { MEL_W { w : self } } # [ doc = "Bit 10 - Monotonic Counter Low Lock" ] # [ inline ( always ) ] pub fn mcll ( & mut self ) -> MCLL_W { MCLL_W { w : self } } # [ doc = "Bit 11 - Monotonic Counter High Lock" ] # [ inline ( always ) ] pub fn mchl ( & mut self ) -> MCHL_W { MCHL_W { w : self } } } } # [ doc = "RTC Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ier](ier) module" ] pub type IER = crate :: Reg < u32 , _IER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IER ; # [ doc = "`read()` method returns [ier::R](ier::R) reader structure" ] impl crate :: Readable for IER { } # [ doc = "`write(|w| ..)` method takes [ier::W](ier::W) writer structure" ] impl crate :: Writable for IER { } # [ doc = "RTC Interrupt Enable Register" ] pub mod ier { # [ doc = "Reader of register IER" ] pub type R = crate :: R < u32 , super :: IER > ; # [ doc = "Writer for register IER" ] pub type W = crate :: W < u32 , super :: IER > ; # [ doc = "Register IER `reset()`'s with value 0x07" ] impl crate :: ResetValue for super :: IER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x07 } } # [ doc = "Time Invalid Interrupt Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIIE_A { # [ doc = "0: Time invalid flag does not generate an interrupt." ] _0 , # [ doc = "1: Time invalid flag does generate an interrupt." ] _1 } impl From < TIIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIIE_A ) -> Self { match variant { TIIE_A :: _0 => false , TIIE_A :: _1 => true } } } # [ doc = "Reader of field `TIIE`" ] pub type TIIE_R = crate :: R < bool , TIIE_A > ; impl TIIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIIE_A { match self . bits { false => TIIE_A :: _0 , true => TIIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIIE_A :: _1 } } # [ doc = "Write proxy for field `TIIE`" ] pub struct TIIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Time invalid flag does not generate an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIIE_A :: _0 ) } # [ doc = "Time invalid flag does generate an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIIE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Time Overflow Interrupt Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOIE_A { # [ doc = "0: Time overflow flag does not generate an interrupt." ] _0 , # [ doc = "1: Time overflow flag does generate an interrupt." ] _1 } impl From < TOIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TOIE_A ) -> Self { match variant { TOIE_A :: _0 => false , TOIE_A :: _1 => true } } } # [ doc = "Reader of field `TOIE`" ] pub type TOIE_R = crate :: R < bool , TOIE_A > ; impl TOIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOIE_A { match self . bits { false => TOIE_A :: _0 , true => TOIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOIE_A :: _1 } } # [ doc = "Write proxy for field `TOIE`" ] pub struct TOIE_W < 'a > { w : & 'a mut W , } impl < 'a > TOIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Time overflow flag does not generate an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _0 ) } # [ doc = "Time overflow flag does generate an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _1 ) } # [ 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 } } # [ doc = "Time Alarm Interrupt Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TAIE_A { # [ doc = "0: Time alarm flag does not generate an interrupt." ] _0 , # [ doc = "1: Time alarm flag does generate an interrupt." ] _1 } impl From < TAIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TAIE_A ) -> Self { match variant { TAIE_A :: _0 => false , TAIE_A :: _1 => true } } } # [ doc = "Reader of field `TAIE`" ] pub type TAIE_R = crate :: R < bool , TAIE_A > ; impl TAIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TAIE_A { match self . bits { false => TAIE_A :: _0 , true => TAIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TAIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TAIE_A :: _1 } } # [ doc = "Write proxy for field `TAIE`" ] pub struct TAIE_W < 'a > { w : & 'a mut W , } impl < 'a > TAIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TAIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Time alarm flag does not generate an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TAIE_A :: _0 ) } # [ doc = "Time alarm flag does generate an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TAIE_A :: _1 ) } # [ 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 = "Monotonic Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MOIE_A { # [ doc = "0: Monotonic overflow flag does not generate an interrupt." ] _0 , # [ doc = "1: Monotonic overflow flag does generate an interrupt." ] _1 } impl From < MOIE_A > for bool { # [ inline ( always ) ] fn from ( variant : MOIE_A ) -> Self { match variant { MOIE_A :: _0 => false , MOIE_A :: _1 => true } } } # [ doc = "Reader of field `MOIE`" ] pub type MOIE_R = crate :: R < bool , MOIE_A > ; impl MOIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MOIE_A { match self . bits { false => MOIE_A :: _0 , true => MOIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MOIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MOIE_A :: _1 } } # [ doc = "Write proxy for field `MOIE`" ] pub struct MOIE_W < 'a > { w : & 'a mut W , } impl < 'a > MOIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MOIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Monotonic overflow flag does not generate an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MOIE_A :: _0 ) } # [ doc = "Monotonic overflow flag does generate an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MOIE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Time Seconds Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSIE_A { # [ doc = "0: Seconds interrupt is disabled." ] _0 , # [ doc = "1: Seconds interrupt is enabled." ] _1 } impl From < TSIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TSIE_A ) -> Self { match variant { TSIE_A :: _0 => false , TSIE_A :: _1 => true } } } # [ doc = "Reader of field `TSIE`" ] pub type TSIE_R = crate :: R < bool , TSIE_A > ; impl TSIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSIE_A { match self . bits { false => TSIE_A :: _0 , true => TSIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TSIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TSIE_A :: _1 } } # [ doc = "Write proxy for field `TSIE`" ] pub struct TSIE_W < 'a > { w : & 'a mut W , } impl < 'a > TSIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Seconds interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TSIE_A :: _0 ) } # [ doc = "Seconds interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TSIE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin On\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WPON_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: If the wakeup pin is enabled, then the wakeup pin will assert." ] _1 } impl From < WPON_A > for bool { # [ inline ( always ) ] fn from ( variant : WPON_A ) -> Self { match variant { WPON_A :: _0 => false , WPON_A :: _1 => true } } } # [ doc = "Reader of field `WPON`" ] pub type WPON_R = crate :: R < bool , WPON_A > ; impl WPON_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WPON_A { match self . bits { false => WPON_A :: _0 , true => WPON_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WPON_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WPON_A :: _1 } } # [ doc = "Write proxy for field `WPON`" ] pub struct WPON_W < 'a > { w : & 'a mut W , } impl < 'a > WPON_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WPON_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WPON_A :: _0 ) } # [ doc = "If the wakeup pin is enabled, then the wakeup pin will assert." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WPON_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Time Invalid Interrupt Enable" ] # [ inline ( always ) ] pub fn tiie ( & self ) -> TIIE_R { TIIE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Time Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & self ) -> TOIE_R { TOIE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Time Alarm Interrupt Enable" ] # [ inline ( always ) ] pub fn taie ( & self ) -> TAIE_R { TAIE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Monotonic Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn moie ( & self ) -> MOIE_R { MOIE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Time Seconds Interrupt Enable" ] # [ inline ( always ) ] pub fn tsie ( & self ) -> TSIE_R { TSIE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wakeup Pin On" ] # [ inline ( always ) ] pub fn wpon ( & self ) -> WPON_R { WPON_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Time Invalid Interrupt Enable" ] # [ inline ( always ) ] pub fn tiie ( & mut self ) -> TIIE_W { TIIE_W { w : self } } # [ doc = "Bit 1 - Time Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & mut self ) -> TOIE_W { TOIE_W { w : self } } # [ doc = "Bit 2 - Time Alarm Interrupt Enable" ] # [ inline ( always ) ] pub fn taie ( & mut self ) -> TAIE_W { TAIE_W { w : self } } # [ doc = "Bit 3 - Monotonic Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn moie ( & mut self ) -> MOIE_W { MOIE_W { w : self } } # [ doc = "Bit 4 - Time Seconds Interrupt Enable" ] # [ inline ( always ) ] pub fn tsie ( & mut self ) -> TSIE_W { TSIE_W { w : self } } # [ doc = "Bit 7 - Wakeup Pin On" ] # [ inline ( always ) ] pub fn wpon ( & mut self ) -> WPON_W { WPON_W { w : self } } } } # [ doc = "RTC Tamper Time Seconds Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ttsr](ttsr) module" ] pub type TTSR = crate :: Reg < u32 , _TTSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TTSR ; # [ doc = "`read()` method returns [ttsr::R](ttsr::R) reader structure" ] impl crate :: Readable for TTSR { } # [ doc = "RTC Tamper Time Seconds Register" ] pub mod ttsr { # [ doc = "Reader of register TTSR" ] pub type R = crate :: R < u32 , super :: TTSR > ; # [ doc = "Reader of field `TTS`" ] pub type TTS_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Tamper Time Seconds" ] # [ inline ( always ) ] pub fn tts ( & self ) -> TTS_R { TTS_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "RTC Monotonic Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mer](mer) module" ] pub type MER = crate :: Reg < u32 , _MER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MER ; # [ doc = "`read()` method returns [mer::R](mer::R) reader structure" ] impl crate :: Readable for MER { } # [ doc = "`write(|w| ..)` method takes [mer::W](mer::W) writer structure" ] impl crate :: Writable for MER { } # [ doc = "RTC Monotonic Enable Register" ] pub mod mer { # [ doc = "Reader of register MER" ] pub type R = crate :: R < u32 , super :: MER > ; # [ doc = "Writer for register MER" ] pub type W = crate :: W < u32 , super :: MER > ; # [ doc = "Register MER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Monotonic Counter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MCE_A { # [ doc = "0: Writes to the monotonic counter load the counter with the value written." ] _0 , # [ doc = "1: Writes to the monotonic counter increment the counter." ] _1 } impl From < MCE_A > for bool { # [ inline ( always ) ] fn from ( variant : MCE_A ) -> Self { match variant { MCE_A :: _0 => false , MCE_A :: _1 => true } } } # [ doc = "Reader of field `MCE`" ] pub type MCE_R = crate :: R < bool , MCE_A > ; impl MCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MCE_A { match self . bits { false => MCE_A :: _0 , true => MCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MCE_A :: _1 } } # [ doc = "Write proxy for field `MCE`" ] pub struct MCE_W < 'a > { w : & 'a mut W , } impl < 'a > MCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the monotonic counter load the counter with the value written." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MCE_A :: _0 ) } # [ doc = "Writes to the monotonic counter increment the counter." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MCE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 4 - Monotonic Counter Enable" ] # [ inline ( always ) ] pub fn mce ( & self ) -> MCE_R { MCE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Monotonic Counter Enable" ] # [ inline ( always ) ] pub fn mce ( & mut self ) -> MCE_W { MCE_W { w : self } } } } # [ doc = "RTC Monotonic Counter Low Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mclr](mclr) module" ] pub type MCLR = crate :: Reg < u32 , _MCLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCLR ; # [ doc = "`read()` method returns [mclr::R](mclr::R) reader structure" ] impl crate :: Readable for MCLR { } # [ doc = "`write(|w| ..)` method takes [mclr::W](mclr::W) writer structure" ] impl crate :: Writable for MCLR { } # [ doc = "RTC Monotonic Counter Low Register" ] pub mod mclr { # [ doc = "Reader of register MCLR" ] pub type R = crate :: R < u32 , super :: MCLR > ; # [ doc = "Writer for register MCLR" ] pub type W = crate :: W < u32 , super :: MCLR > ; # [ doc = "Register MCLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MCLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MCL`" ] pub type MCL_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `MCL`" ] pub struct MCL_W < 'a > { w : & 'a mut W , } impl < 'a > MCL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Monotonic Counter Low" ] # [ inline ( always ) ] pub fn mcl ( & self ) -> MCL_R { MCL_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Monotonic Counter Low" ] # [ inline ( always ) ] pub fn mcl ( & mut self ) -> MCL_W { MCL_W { w : self } } } } # [ doc = "RTC Monotonic Counter High Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mchr](mchr) module" ] pub type MCHR = crate :: Reg < u32 , _MCHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MCHR ; # [ doc = "`read()` method returns [mchr::R](mchr::R) reader structure" ] impl crate :: Readable for MCHR { } # [ doc = "`write(|w| ..)` method takes [mchr::W](mchr::W) writer structure" ] impl crate :: Writable for MCHR { } # [ doc = "RTC Monotonic Counter High Register" ] pub mod mchr { # [ doc = "Reader of register MCHR" ] pub type R = crate :: R < u32 , super :: MCHR > ; # [ doc = "Writer for register MCHR" ] pub type W = crate :: W < u32 , super :: MCHR > ; # [ doc = "Register MCHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MCHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MCH`" ] pub type MCH_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `MCH`" ] pub struct MCH_W < 'a > { w : & 'a mut W , } impl < 'a > MCH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Monotonic Counter High" ] # [ inline ( always ) ] pub fn mch ( & self ) -> MCH_R { MCH_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Monotonic Counter High" ] # [ inline ( always ) ] pub fn mch ( & mut self ) -> MCH_W { MCH_W { w : self } } } } # [ doc = "RTC Write Access Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [war](war) module" ] pub type WAR = crate :: Reg < u32 , _WAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WAR ; # [ doc = "`read()` method returns [war::R](war::R) reader structure" ] impl crate :: Readable for WAR { } # [ doc = "`write(|w| ..)` method takes [war::W](war::W) writer structure" ] impl crate :: Writable for WAR { } # [ doc = "RTC Write Access Register" ] pub mod war { # [ doc = "Reader of register WAR" ] pub type R = crate :: R < u32 , super :: WAR > ; # [ doc = "Writer for register WAR" ] pub type W = crate :: W < u32 , super :: WAR > ; # [ doc = "Register WAR `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: WAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Time Seconds Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSRW_A { # [ doc = "0: Writes to the Time Seconds Register are ignored." ] _0 , # [ doc = "1: Writes to the Time Seconds Register complete as normal." ] _1 } impl From < TSRW_A > for bool { # [ inline ( always ) ] fn from ( variant : TSRW_A ) -> Self { match variant { TSRW_A :: _0 => false , TSRW_A :: _1 => true } } } # [ doc = "Reader of field `TSRW`" ] pub type TSRW_R = crate :: R < bool , TSRW_A > ; impl TSRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSRW_A { match self . bits { false => TSRW_A :: _0 , true => TSRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TSRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TSRW_A :: _1 } } # [ doc = "Write proxy for field `TSRW`" ] pub struct TSRW_W < 'a > { w : & 'a mut W , } impl < 'a > TSRW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSRW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Time Seconds Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TSRW_A :: _0 ) } # [ doc = "Writes to the Time Seconds Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TSRW_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Time Prescaler Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPRW_A { # [ doc = "0: Writes to the Time Prescaler Register are ignored." ] _0 , # [ doc = "1: Writes to the Time Prescaler Register complete as normal." ] _1 } impl From < TPRW_A > for bool { # [ inline ( always ) ] fn from ( variant : TPRW_A ) -> Self { match variant { TPRW_A :: _0 => false , TPRW_A :: _1 => true } } } # [ doc = "Reader of field `TPRW`" ] pub type TPRW_R = crate :: R < bool , TPRW_A > ; impl TPRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPRW_A { match self . bits { false => TPRW_A :: _0 , true => TPRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TPRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TPRW_A :: _1 } } # [ doc = "Write proxy for field `TPRW`" ] pub struct TPRW_W < 'a > { w : & 'a mut W , } impl < 'a > TPRW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPRW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Time Prescaler Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TPRW_A :: _0 ) } # [ doc = "Writes to the Time Prescaler Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TPRW_A :: _1 ) } # [ 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 } } # [ doc = "Time Alarm Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TARW_A { # [ doc = "0: Writes to the Time Alarm Register are ignored." ] _0 , # [ doc = "1: Writes to the Time Alarm Register complete as normal." ] _1 } impl From < TARW_A > for bool { # [ inline ( always ) ] fn from ( variant : TARW_A ) -> Self { match variant { TARW_A :: _0 => false , TARW_A :: _1 => true } } } # [ doc = "Reader of field `TARW`" ] pub type TARW_R = crate :: R < bool , TARW_A > ; impl TARW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TARW_A { match self . bits { false => TARW_A :: _0 , true => TARW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TARW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TARW_A :: _1 } } # [ doc = "Write proxy for field `TARW`" ] pub struct TARW_W < 'a > { w : & 'a mut W , } impl < 'a > TARW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TARW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Time Alarm Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TARW_A :: _0 ) } # [ doc = "Writes to the Time Alarm Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TARW_A :: _1 ) } # [ 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 = "Time Compensation Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCRW_A { # [ doc = "0: Writes to the Time Compensation Register are ignored." ] _0 , # [ doc = "1: Writes to the Time Compensation Register complete as normal." ] _1 } impl From < TCRW_A > for bool { # [ inline ( always ) ] fn from ( variant : TCRW_A ) -> Self { match variant { TCRW_A :: _0 => false , TCRW_A :: _1 => true } } } # [ doc = "Reader of field `TCRW`" ] pub type TCRW_R = crate :: R < bool , TCRW_A > ; impl TCRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCRW_A { match self . bits { false => TCRW_A :: _0 , true => TCRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCRW_A :: _1 } } # [ doc = "Write proxy for field `TCRW`" ] pub struct TCRW_W < 'a > { w : & 'a mut W , } impl < 'a > TCRW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCRW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Time Compensation Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCRW_A :: _0 ) } # [ doc = "Writes to the Time Compensation Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCRW_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Control Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRW_A { # [ doc = "0: Writes to the Control Register are ignored." ] _0 , # [ doc = "1: Writes to the Control Register complete as normal." ] _1 } impl From < CRW_A > for bool { # [ inline ( always ) ] fn from ( variant : CRW_A ) -> Self { match variant { CRW_A :: _0 => false , CRW_A :: _1 => true } } } # [ doc = "Reader of field `CRW`" ] pub type CRW_R = crate :: R < bool , CRW_A > ; impl CRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRW_A { match self . bits { false => CRW_A :: _0 , true => CRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRW_A :: _1 } } # [ doc = "Write proxy for field `CRW`" ] pub struct CRW_W < 'a > { w : & 'a mut W , } impl < 'a > CRW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Control Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRW_A :: _0 ) } # [ doc = "Writes to the Control Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRW_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Status Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRW_A { # [ doc = "0: Writes to the Status Register are ignored." ] _0 , # [ doc = "1: Writes to the Status Register complete as normal." ] _1 } impl From < SRW_A > for bool { # [ inline ( always ) ] fn from ( variant : SRW_A ) -> Self { match variant { SRW_A :: _0 => false , SRW_A :: _1 => true } } } # [ doc = "Reader of field `SRW`" ] pub type SRW_R = crate :: R < bool , SRW_A > ; impl SRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRW_A { match self . bits { false => SRW_A :: _0 , true => SRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRW_A :: _1 } } # [ doc = "Write proxy for field `SRW`" ] pub struct SRW_W < 'a > { w : & 'a mut W , } impl < 'a > SRW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Status Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRW_A :: _0 ) } # [ doc = "Writes to the Status Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRW_A :: _1 ) } # [ 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 = "Lock Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LRW_A { # [ doc = "0: Writes to the Lock Register are ignored." ] _0 , # [ doc = "1: Writes to the Lock Register complete as normal." ] _1 } impl From < LRW_A > for bool { # [ inline ( always ) ] fn from ( variant : LRW_A ) -> Self { match variant { LRW_A :: _0 => false , LRW_A :: _1 => true } } } # [ doc = "Reader of field `LRW`" ] pub type LRW_R = crate :: R < bool , LRW_A > ; impl LRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LRW_A { match self . bits { false => LRW_A :: _0 , true => LRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LRW_A :: _1 } } # [ doc = "Write proxy for field `LRW`" ] pub struct LRW_W < 'a > { w : & 'a mut W , } impl < 'a > LRW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LRW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Lock Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LRW_A :: _0 ) } # [ doc = "Writes to the Lock Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LRW_A :: _1 ) } # [ 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 = "Interrupt Enable Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IERW_A { # [ doc = "0: Writes to the Interupt Enable Register are ignored." ] _0 , # [ doc = "1: Writes to the Interrupt Enable Register complete as normal." ] _1 } impl From < IERW_A > for bool { # [ inline ( always ) ] fn from ( variant : IERW_A ) -> Self { match variant { IERW_A :: _0 => false , IERW_A :: _1 => true } } } # [ doc = "Reader of field `IERW`" ] pub type IERW_R = crate :: R < bool , IERW_A > ; impl IERW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IERW_A { match self . bits { false => IERW_A :: _0 , true => IERW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IERW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IERW_A :: _1 } } # [ doc = "Write proxy for field `IERW`" ] pub struct IERW_W < 'a > { w : & 'a mut W , } impl < 'a > IERW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IERW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Interupt Enable Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IERW_A :: _0 ) } # [ doc = "Writes to the Interrupt Enable Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IERW_A :: _1 ) } # [ 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 = "Tamper Time Seconds Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TTSW_A { # [ doc = "0: Writes to the Tamper Time Seconds Register are ignored." ] _0 , # [ doc = "1: Writes to the Tamper Time Seconds Register complete as normal." ] _1 } impl From < TTSW_A > for bool { # [ inline ( always ) ] fn from ( variant : TTSW_A ) -> Self { match variant { TTSW_A :: _0 => false , TTSW_A :: _1 => true } } } # [ doc = "Reader of field `TTSW`" ] pub type TTSW_R = crate :: R < bool , TTSW_A > ; impl TTSW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TTSW_A { match self . bits { false => TTSW_A :: _0 , true => TTSW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TTSW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TTSW_A :: _1 } } # [ doc = "Write proxy for field `TTSW`" ] pub struct TTSW_W < 'a > { w : & 'a mut W , } impl < 'a > TTSW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TTSW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Tamper Time Seconds Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TTSW_A :: _0 ) } # [ doc = "Writes to the Tamper Time Seconds Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TTSW_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Monotonic Enable Register Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MERW_A { # [ doc = "0: Writes to the Monotonic Enable Register are ignored." ] _0 , # [ doc = "1: Writes to the Monotonic Enable Register complete as normal." ] _1 } impl From < MERW_A > for bool { # [ inline ( always ) ] fn from ( variant : MERW_A ) -> Self { match variant { MERW_A :: _0 => false , MERW_A :: _1 => true } } } # [ doc = "Reader of field `MERW`" ] pub type MERW_R = crate :: R < bool , MERW_A > ; impl MERW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MERW_A { match self . bits { false => MERW_A :: _0 , true => MERW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MERW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MERW_A :: _1 } } # [ doc = "Write proxy for field `MERW`" ] pub struct MERW_W < 'a > { w : & 'a mut W , } impl < 'a > MERW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MERW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Monotonic Enable Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MERW_A :: _0 ) } # [ doc = "Writes to the Monotonic Enable Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MERW_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Monotonic Counter Low Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MCLW_A { # [ doc = "0: Writes to the Monotonic Counter Low Register are ignored." ] _0 , # [ doc = "1: Writes to the Monotonic Counter Low Register complete as normal." ] _1 } impl From < MCLW_A > for bool { # [ inline ( always ) ] fn from ( variant : MCLW_A ) -> Self { match variant { MCLW_A :: _0 => false , MCLW_A :: _1 => true } } } # [ doc = "Reader of field `MCLW`" ] pub type MCLW_R = crate :: R < bool , MCLW_A > ; impl MCLW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MCLW_A { match self . bits { false => MCLW_A :: _0 , true => MCLW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MCLW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MCLW_A :: _1 } } # [ doc = "Write proxy for field `MCLW`" ] pub struct MCLW_W < 'a > { w : & 'a mut W , } impl < 'a > MCLW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MCLW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Monotonic Counter Low Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MCLW_A :: _0 ) } # [ doc = "Writes to the Monotonic Counter Low Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MCLW_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Monotonic Counter High Write\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MCHW_A { # [ doc = "0: Writes to the Monotonic Counter High Register are ignored." ] _0 , # [ doc = "1: Writes to the Monotonic Counter High Register complete as normal." ] _1 } impl From < MCHW_A > for bool { # [ inline ( always ) ] fn from ( variant : MCHW_A ) -> Self { match variant { MCHW_A :: _0 => false , MCHW_A :: _1 => true } } } # [ doc = "Reader of field `MCHW`" ] pub type MCHW_R = crate :: R < bool , MCHW_A > ; impl MCHW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MCHW_A { match self . bits { false => MCHW_A :: _0 , true => MCHW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MCHW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MCHW_A :: _1 } } # [ doc = "Write proxy for field `MCHW`" ] pub struct MCHW_W < 'a > { w : & 'a mut W , } impl < 'a > MCHW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MCHW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to the Monotonic Counter High Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MCHW_A :: _0 ) } # [ doc = "Writes to the Monotonic Counter High Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MCHW_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } impl R { # [ doc = "Bit 0 - Time Seconds Register Write" ] # [ inline ( always ) ] pub fn tsrw ( & self ) -> TSRW_R { TSRW_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Time Prescaler Register Write" ] # [ inline ( always ) ] pub fn tprw ( & self ) -> TPRW_R { TPRW_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Time Alarm Register Write" ] # [ inline ( always ) ] pub fn tarw ( & self ) -> TARW_R { TARW_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Time Compensation Register Write" ] # [ inline ( always ) ] pub fn tcrw ( & self ) -> TCRW_R { TCRW_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Control Register Write" ] # [ inline ( always ) ] pub fn crw ( & self ) -> CRW_R { CRW_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Status Register Write" ] # [ inline ( always ) ] pub fn srw ( & self ) -> SRW_R { SRW_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Lock Register Write" ] # [ inline ( always ) ] pub fn lrw ( & self ) -> LRW_R { LRW_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Interrupt Enable Register Write" ] # [ inline ( always ) ] pub fn ierw ( & self ) -> IERW_R { IERW_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Tamper Time Seconds Write" ] # [ inline ( always ) ] pub fn ttsw ( & self ) -> TTSW_R { TTSW_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Monotonic Enable Register Write" ] # [ inline ( always ) ] pub fn merw ( & self ) -> MERW_R { MERW_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Monotonic Counter Low Write" ] # [ inline ( always ) ] pub fn mclw ( & self ) -> MCLW_R { MCLW_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Monotonic Counter High Write" ] # [ inline ( always ) ] pub fn mchw ( & self ) -> MCHW_R { MCHW_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Time Seconds Register Write" ] # [ inline ( always ) ] pub fn tsrw ( & mut self ) -> TSRW_W { TSRW_W { w : self } } # [ doc = "Bit 1 - Time Prescaler Register Write" ] # [ inline ( always ) ] pub fn tprw ( & mut self ) -> TPRW_W { TPRW_W { w : self } } # [ doc = "Bit 2 - Time Alarm Register Write" ] # [ inline ( always ) ] pub fn tarw ( & mut self ) -> TARW_W { TARW_W { w : self } } # [ doc = "Bit 3 - Time Compensation Register Write" ] # [ inline ( always ) ] pub fn tcrw ( & mut self ) -> TCRW_W { TCRW_W { w : self } } # [ doc = "Bit 4 - Control Register Write" ] # [ inline ( always ) ] pub fn crw ( & mut self ) -> CRW_W { CRW_W { w : self } } # [ doc = "Bit 5 - Status Register Write" ] # [ inline ( always ) ] pub fn srw ( & mut self ) -> SRW_W { SRW_W { w : self } } # [ doc = "Bit 6 - Lock Register Write" ] # [ inline ( always ) ] pub fn lrw ( & mut self ) -> LRW_W { LRW_W { w : self } } # [ doc = "Bit 7 - Interrupt Enable Register Write" ] # [ inline ( always ) ] pub fn ierw ( & mut self ) -> IERW_W { IERW_W { w : self } } # [ doc = "Bit 8 - Tamper Time Seconds Write" ] # [ inline ( always ) ] pub fn ttsw ( & mut self ) -> TTSW_W { TTSW_W { w : self } } # [ doc = "Bit 9 - Monotonic Enable Register Write" ] # [ inline ( always ) ] pub fn merw ( & mut self ) -> MERW_W { MERW_W { w : self } } # [ doc = "Bit 10 - Monotonic Counter Low Write" ] # [ inline ( always ) ] pub fn mclw ( & mut self ) -> MCLW_W { MCLW_W { w : self } } # [ doc = "Bit 11 - Monotonic Counter High Write" ] # [ inline ( always ) ] pub fn mchw ( & mut self ) -> MCHW_W { MCHW_W { w : self } } } } # [ doc = "RTC Read Access Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rar](rar) module" ] pub type RAR = crate :: Reg < u32 , _RAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RAR ; # [ doc = "`read()` method returns [rar::R](rar::R) reader structure" ] impl crate :: Readable for RAR { } # [ doc = "`write(|w| ..)` method takes [rar::W](rar::W) writer structure" ] impl crate :: Writable for RAR { } # [ doc = "RTC Read Access Register" ] pub mod rar { # [ doc = "Reader of register RAR" ] pub type R = crate :: R < u32 , super :: RAR > ; # [ doc = "Writer for register RAR" ] pub type W = crate :: W < u32 , super :: RAR > ; # [ doc = "Register RAR `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: RAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Time Seconds Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSRR_A { # [ doc = "0: Reads to the Time Seconds Register are ignored." ] _0 , # [ doc = "1: Reads to the Time Seconds Register complete as normal." ] _1 } impl From < TSRR_A > for bool { # [ inline ( always ) ] fn from ( variant : TSRR_A ) -> Self { match variant { TSRR_A :: _0 => false , TSRR_A :: _1 => true } } } # [ doc = "Reader of field `TSRR`" ] pub type TSRR_R = crate :: R < bool , TSRR_A > ; impl TSRR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSRR_A { match self . bits { false => TSRR_A :: _0 , true => TSRR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TSRR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TSRR_A :: _1 } } # [ doc = "Write proxy for field `TSRR`" ] pub struct TSRR_W < 'a > { w : & 'a mut W , } impl < 'a > TSRR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSRR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Time Seconds Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TSRR_A :: _0 ) } # [ doc = "Reads to the Time Seconds Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TSRR_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Time Prescaler Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPRR_A { # [ doc = "0: Reads to the Time Pprescaler Register are ignored." ] _0 , # [ doc = "1: Reads to the Time Prescaler Register complete as normal." ] _1 } impl From < TPRR_A > for bool { # [ inline ( always ) ] fn from ( variant : TPRR_A ) -> Self { match variant { TPRR_A :: _0 => false , TPRR_A :: _1 => true } } } # [ doc = "Reader of field `TPRR`" ] pub type TPRR_R = crate :: R < bool , TPRR_A > ; impl TPRR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPRR_A { match self . bits { false => TPRR_A :: _0 , true => TPRR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TPRR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TPRR_A :: _1 } } # [ doc = "Write proxy for field `TPRR`" ] pub struct TPRR_W < 'a > { w : & 'a mut W , } impl < 'a > TPRR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPRR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Time Pprescaler Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TPRR_A :: _0 ) } # [ doc = "Reads to the Time Prescaler Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TPRR_A :: _1 ) } # [ 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 } } # [ doc = "Time Alarm Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TARR_A { # [ doc = "0: Reads to the Time Alarm Register are ignored." ] _0 , # [ doc = "1: Reads to the Time Alarm Register complete as normal." ] _1 } impl From < TARR_A > for bool { # [ inline ( always ) ] fn from ( variant : TARR_A ) -> Self { match variant { TARR_A :: _0 => false , TARR_A :: _1 => true } } } # [ doc = "Reader of field `TARR`" ] pub type TARR_R = crate :: R < bool , TARR_A > ; impl TARR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TARR_A { match self . bits { false => TARR_A :: _0 , true => TARR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TARR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TARR_A :: _1 } } # [ doc = "Write proxy for field `TARR`" ] pub struct TARR_W < 'a > { w : & 'a mut W , } impl < 'a > TARR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TARR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Time Alarm Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TARR_A :: _0 ) } # [ doc = "Reads to the Time Alarm Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TARR_A :: _1 ) } # [ 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 = "Time Compensation Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCRR_A { # [ doc = "0: Reads to the Time Compensation Register are ignored." ] _0 , # [ doc = "1: Reads to the Time Compensation Register complete as normal." ] _1 } impl From < TCRR_A > for bool { # [ inline ( always ) ] fn from ( variant : TCRR_A ) -> Self { match variant { TCRR_A :: _0 => false , TCRR_A :: _1 => true } } } # [ doc = "Reader of field `TCRR`" ] pub type TCRR_R = crate :: R < bool , TCRR_A > ; impl TCRR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCRR_A { match self . bits { false => TCRR_A :: _0 , true => TCRR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCRR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCRR_A :: _1 } } # [ doc = "Write proxy for field `TCRR`" ] pub struct TCRR_W < 'a > { w : & 'a mut W , } impl < 'a > TCRR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCRR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Time Compensation Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCRR_A :: _0 ) } # [ doc = "Reads to the Time Compensation Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCRR_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Control Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRR_A { # [ doc = "0: Reads to the Control Register are ignored." ] _0 , # [ doc = "1: Reads to the Control Register complete as normal." ] _1 } impl From < CRR_A > for bool { # [ inline ( always ) ] fn from ( variant : CRR_A ) -> Self { match variant { CRR_A :: _0 => false , CRR_A :: _1 => true } } } # [ doc = "Reader of field `CRR`" ] pub type CRR_R = crate :: R < bool , CRR_A > ; impl CRR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRR_A { match self . bits { false => CRR_A :: _0 , true => CRR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRR_A :: _1 } } # [ doc = "Write proxy for field `CRR`" ] pub struct CRR_W < 'a > { w : & 'a mut W , } impl < 'a > CRR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Control Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRR_A :: _0 ) } # [ doc = "Reads to the Control Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRR_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Status Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRR_A { # [ doc = "0: Reads to the Status Register are ignored." ] _0 , # [ doc = "1: Reads to the Status Register complete as normal." ] _1 } impl From < SRR_A > for bool { # [ inline ( always ) ] fn from ( variant : SRR_A ) -> Self { match variant { SRR_A :: _0 => false , SRR_A :: _1 => true } } } # [ doc = "Reader of field `SRR`" ] pub type SRR_R = crate :: R < bool , SRR_A > ; impl SRR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRR_A { match self . bits { false => SRR_A :: _0 , true => SRR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRR_A :: _1 } } # [ doc = "Write proxy for field `SRR`" ] pub struct SRR_W < 'a > { w : & 'a mut W , } impl < 'a > SRR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Status Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRR_A :: _0 ) } # [ doc = "Reads to the Status Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRR_A :: _1 ) } # [ 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 = "Lock Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LRR_A { # [ doc = "0: Reads to the Lock Register are ignored." ] _0 , # [ doc = "1: Reads to the Lock Register complete as normal." ] _1 } impl From < LRR_A > for bool { # [ inline ( always ) ] fn from ( variant : LRR_A ) -> Self { match variant { LRR_A :: _0 => false , LRR_A :: _1 => true } } } # [ doc = "Reader of field `LRR`" ] pub type LRR_R = crate :: R < bool , LRR_A > ; impl LRR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LRR_A { match self . bits { false => LRR_A :: _0 , true => LRR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LRR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LRR_A :: _1 } } # [ doc = "Write proxy for field `LRR`" ] pub struct LRR_W < 'a > { w : & 'a mut W , } impl < 'a > LRR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LRR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Lock Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LRR_A :: _0 ) } # [ doc = "Reads to the Lock Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LRR_A :: _1 ) } # [ 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 = "Interrupt Enable Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IERR_A { # [ doc = "0: Reads to the Interrupt Enable Register are ignored." ] _0 , # [ doc = "1: Reads to the Interrupt Enable Register complete as normal." ] _1 } impl From < IERR_A > for bool { # [ inline ( always ) ] fn from ( variant : IERR_A ) -> Self { match variant { IERR_A :: _0 => false , IERR_A :: _1 => true } } } # [ doc = "Reader of field `IERR`" ] pub type IERR_R = crate :: R < bool , IERR_A > ; impl IERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IERR_A { match self . bits { false => IERR_A :: _0 , true => IERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IERR_A :: _1 } } # [ doc = "Write proxy for field `IERR`" ] pub struct IERR_W < 'a > { w : & 'a mut W , } impl < 'a > IERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Interrupt Enable Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IERR_A :: _0 ) } # [ doc = "Reads to the Interrupt Enable Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IERR_A :: _1 ) } # [ 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 = "Tamper Time Seconds Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TTSR_A { # [ doc = "0: Reads to the Tamper Time Seconds Register are ignored." ] _0 , # [ doc = "1: Reads to the Tamper Time Seconds Register complete as normal." ] _1 } impl From < TTSR_A > for bool { # [ inline ( always ) ] fn from ( variant : TTSR_A ) -> Self { match variant { TTSR_A :: _0 => false , TTSR_A :: _1 => true } } } # [ doc = "Reader of field `TTSR`" ] pub type TTSR_R = crate :: R < bool , TTSR_A > ; impl TTSR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TTSR_A { match self . bits { false => TTSR_A :: _0 , true => TTSR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TTSR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TTSR_A :: _1 } } # [ doc = "Write proxy for field `TTSR`" ] pub struct TTSR_W < 'a > { w : & 'a mut W , } impl < 'a > TTSR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TTSR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Tamper Time Seconds Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TTSR_A :: _0 ) } # [ doc = "Reads to the Tamper Time Seconds Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TTSR_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Monotonic Enable Register Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MERR_A { # [ doc = "0: Reads to the Monotonic Enable Register are ignored." ] _0 , # [ doc = "1: Reads to the Monotonic Enable Register complete as normal." ] _1 } impl From < MERR_A > for bool { # [ inline ( always ) ] fn from ( variant : MERR_A ) -> Self { match variant { MERR_A :: _0 => false , MERR_A :: _1 => true } } } # [ doc = "Reader of field `MERR`" ] pub type MERR_R = crate :: R < bool , MERR_A > ; impl MERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MERR_A { match self . bits { false => MERR_A :: _0 , true => MERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MERR_A :: _1 } } # [ doc = "Write proxy for field `MERR`" ] pub struct MERR_W < 'a > { w : & 'a mut W , } impl < 'a > MERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Monotonic Enable Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MERR_A :: _0 ) } # [ doc = "Reads to the Monotonic Enable Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MERR_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Monotonic Counter Low Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MCLR_A { # [ doc = "0: Reads to the Monotonic Counter Low Register are ignored." ] _0 , # [ doc = "1: Reads to the Monotonic Counter Low Register complete as normal." ] _1 } impl From < MCLR_A > for bool { # [ inline ( always ) ] fn from ( variant : MCLR_A ) -> Self { match variant { MCLR_A :: _0 => false , MCLR_A :: _1 => true } } } # [ doc = "Reader of field `MCLR`" ] pub type MCLR_R = crate :: R < bool , MCLR_A > ; impl MCLR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MCLR_A { match self . bits { false => MCLR_A :: _0 , true => MCLR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MCLR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MCLR_A :: _1 } } # [ doc = "Write proxy for field `MCLR`" ] pub struct MCLR_W < 'a > { w : & 'a mut W , } impl < 'a > MCLR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MCLR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Monotonic Counter Low Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MCLR_A :: _0 ) } # [ doc = "Reads to the Monotonic Counter Low Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MCLR_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Monotonic Counter High Read\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MCHR_A { # [ doc = "0: Reads to the Monotonic Counter High Register are ignored." ] _0 , # [ doc = "1: Reads to the Monotonic Counter High Register complete as normal." ] _1 } impl From < MCHR_A > for bool { # [ inline ( always ) ] fn from ( variant : MCHR_A ) -> Self { match variant { MCHR_A :: _0 => false , MCHR_A :: _1 => true } } } # [ doc = "Reader of field `MCHR`" ] pub type MCHR_R = crate :: R < bool , MCHR_A > ; impl MCHR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MCHR_A { match self . bits { false => MCHR_A :: _0 , true => MCHR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MCHR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MCHR_A :: _1 } } # [ doc = "Write proxy for field `MCHR`" ] pub struct MCHR_W < 'a > { w : & 'a mut W , } impl < 'a > MCHR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MCHR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reads to the Monotonic Counter High Register are ignored." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MCHR_A :: _0 ) } # [ doc = "Reads to the Monotonic Counter High Register complete as normal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MCHR_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } impl R { # [ doc = "Bit 0 - Time Seconds Register Read" ] # [ inline ( always ) ] pub fn tsrr ( & self ) -> TSRR_R { TSRR_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Time Prescaler Register Read" ] # [ inline ( always ) ] pub fn tprr ( & self ) -> TPRR_R { TPRR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Time Alarm Register Read" ] # [ inline ( always ) ] pub fn tarr ( & self ) -> TARR_R { TARR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Time Compensation Register Read" ] # [ inline ( always ) ] pub fn tcrr ( & self ) -> TCRR_R { TCRR_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Control Register Read" ] # [ inline ( always ) ] pub fn crr ( & self ) -> CRR_R { CRR_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Status Register Read" ] # [ inline ( always ) ] pub fn srr ( & self ) -> SRR_R { SRR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Lock Register Read" ] # [ inline ( always ) ] pub fn lrr ( & self ) -> LRR_R { LRR_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Interrupt Enable Register Read" ] # [ inline ( always ) ] pub fn ierr ( & self ) -> IERR_R { IERR_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Tamper Time Seconds Read" ] # [ inline ( always ) ] pub fn ttsr ( & self ) -> TTSR_R { TTSR_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Monotonic Enable Register Read" ] # [ inline ( always ) ] pub fn merr ( & self ) -> MERR_R { MERR_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Monotonic Counter Low Read" ] # [ inline ( always ) ] pub fn mclr ( & self ) -> MCLR_R { MCLR_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Monotonic Counter High Read" ] # [ inline ( always ) ] pub fn mchr ( & self ) -> MCHR_R { MCHR_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Time Seconds Register Read" ] # [ inline ( always ) ] pub fn tsrr ( & mut self ) -> TSRR_W { TSRR_W { w : self } } # [ doc = "Bit 1 - Time Prescaler Register Read" ] # [ inline ( always ) ] pub fn tprr ( & mut self ) -> TPRR_W { TPRR_W { w : self } } # [ doc = "Bit 2 - Time Alarm Register Read" ] # [ inline ( always ) ] pub fn tarr ( & mut self ) -> TARR_W { TARR_W { w : self } } # [ doc = "Bit 3 - Time Compensation Register Read" ] # [ inline ( always ) ] pub fn tcrr ( & mut self ) -> TCRR_W { TCRR_W { w : self } } # [ doc = "Bit 4 - Control Register Read" ] # [ inline ( always ) ] pub fn crr ( & mut self ) -> CRR_W { CRR_W { w : self } } # [ doc = "Bit 5 - Status Register Read" ] # [ inline ( always ) ] pub fn srr ( & mut self ) -> SRR_W { SRR_W { w : self } } # [ doc = "Bit 6 - Lock Register Read" ] # [ inline ( always ) ] pub fn lrr ( & mut self ) -> LRR_W { LRR_W { w : self } } # [ doc = "Bit 7 - Interrupt Enable Register Read" ] # [ inline ( always ) ] pub fn ierr ( & mut self ) -> IERR_W { IERR_W { w : self } } # [ doc = "Bit 8 - Tamper Time Seconds Read" ] # [ inline ( always ) ] pub fn ttsr ( & mut self ) -> TTSR_W { TTSR_W { w : self } } # [ doc = "Bit 9 - Monotonic Enable Register Read" ] # [ inline ( always ) ] pub fn merr ( & mut self ) -> MERR_W { MERR_W { w : self } } # [ doc = "Bit 10 - Monotonic Counter Low Read" ] # [ inline ( always ) ] pub fn mclr ( & mut self ) -> MCLR_W { MCLR_W { w : self } } # [ doc = "Bit 11 - Monotonic Counter High Read" ] # [ inline ( always ) ] pub fn mchr ( & mut self ) -> MCHR_W { MCHR_W { w : self } } } } } # [ doc = "VBAT register file" ] pub struct RFVBAT { _marker : PhantomData < * const ( ) > } unsafe impl Send for RFVBAT { } impl RFVBAT { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const rfvbat :: RegisterBlock { 0x4003_e000 as * const _ } } impl Deref for RFVBAT { type Target = rfvbat :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * RFVBAT :: ptr ( ) } } } # [ doc = "VBAT register file" ] pub mod rfvbat { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - VBAT register file register" ] pub reg : [ REG ; 8 ] , } # [ doc = "VBAT register file register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [reg](reg) module" ] pub type REG = crate :: Reg < u32 , _REG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _REG ; # [ doc = "`read()` method returns [reg::R](reg::R) reader structure" ] impl crate :: Readable for REG { } # [ doc = "`write(|w| ..)` method takes [reg::W](reg::W) writer structure" ] impl crate :: Writable for REG { } # [ doc = "VBAT register file register" ] pub mod reg { # [ doc = "Reader of register REG%s" ] pub type R = crate :: R < u32 , super :: REG > ; # [ doc = "Writer for register REG%s" ] pub type W = crate :: W < u32 , super :: REG > ; # [ doc = "Register REG%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: REG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `LL`" ] pub type LL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `LL`" ] pub struct LL_W < 'a > { w : & 'a mut W , } impl < 'a > LL_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `LH`" ] pub type LH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `LH`" ] pub struct LH_W < 'a > { w : & 'a mut W , } impl < 'a > LH_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `HL`" ] pub type HL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HL`" ] pub struct HL_W < 'a > { w : & 'a mut W , } impl < 'a > HL_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `HH`" ] pub type HH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HH`" ] pub struct HH_W < 'a > { w : & 'a mut W , } impl < 'a > HH_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Low lower byte" ] # [ inline ( always ) ] pub fn ll ( & self ) -> LL_R { LL_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Low higher byte" ] # [ inline ( always ) ] pub fn lh ( & self ) -> LH_R { LH_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - High lower byte" ] # [ inline ( always ) ] pub fn hl ( & self ) -> HL_R { HL_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - High higher byte" ] # [ inline ( always ) ] pub fn hh ( & self ) -> HH_R { HH_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Low lower byte" ] # [ inline ( always ) ] pub fn ll ( & mut self ) -> LL_W { LL_W { w : self } } # [ doc = "Bits 8:15 - Low higher byte" ] # [ inline ( always ) ] pub fn lh ( & mut self ) -> LH_W { LH_W { w : self } } # [ doc = "Bits 16:23 - High lower byte" ] # [ inline ( always ) ] pub fn hl ( & mut self ) -> HL_W { HL_W { w : self } } # [ doc = "Bits 24:31 - High higher byte" ] # [ inline ( always ) ] pub fn hh ( & mut self ) -> HH_W { HH_W { w : self } } } } } # [ doc = "Low Power Timer" ] pub struct LPTMR0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for LPTMR0 { } impl LPTMR0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const lptmr0 :: RegisterBlock { 0x4004_0000 as * const _ } } impl Deref for LPTMR0 { type Target = lptmr0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * LPTMR0 :: ptr ( ) } } } # [ doc = "Low Power Timer" ] pub mod lptmr0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Low Power Timer Control Status Register" ] pub csr : CSR , # [ doc = "0x04 - Low Power Timer Prescale Register" ] pub psr : PSR , # [ doc = "0x08 - Low Power Timer Compare Register" ] pub cmr : CMR , # [ doc = "0x0c - Low Power Timer Counter Register" ] pub cnr : CNR , } # [ doc = "Low Power Timer Control Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csr](csr) module" ] pub type CSR = crate :: Reg < u32 , _CSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSR ; # [ doc = "`read()` method returns [csr::R](csr::R) reader structure" ] impl crate :: Readable for CSR { } # [ doc = "`write(|w| ..)` method takes [csr::W](csr::W) writer structure" ] impl crate :: Writable for CSR { } # [ doc = "Low Power Timer Control Status Register" ] pub mod csr { # [ doc = "Reader of register CSR" ] pub type R = crate :: R < u32 , super :: CSR > ; # [ doc = "Writer for register CSR" ] pub type W = crate :: W < u32 , super :: CSR > ; # [ doc = "Register CSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Timer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TEN_A { # [ doc = "0: LPTMR is disabled and internal logic is reset." ] _0 , # [ doc = "1: LPTMR is enabled." ] _1 } impl From < TEN_A > for bool { # [ inline ( always ) ] fn from ( variant : TEN_A ) -> Self { match variant { TEN_A :: _0 => false , TEN_A :: _1 => true } } } # [ doc = "Reader of field `TEN`" ] pub type TEN_R = crate :: R < bool , TEN_A > ; impl TEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TEN_A { match self . bits { false => TEN_A :: _0 , true => TEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TEN_A :: _1 } } # [ doc = "Write proxy for field `TEN`" ] pub struct TEN_W < 'a > { w : & 'a mut W , } impl < 'a > TEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LPTMR is disabled and internal logic is reset." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TEN_A :: _0 ) } # [ doc = "LPTMR is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Timer Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TMS_A { # [ doc = "0: Time Counter mode." ] _0 , # [ doc = "1: Pulse Counter mode." ] _1 } impl From < TMS_A > for bool { # [ inline ( always ) ] fn from ( variant : TMS_A ) -> Self { match variant { TMS_A :: _0 => false , TMS_A :: _1 => true } } } # [ doc = "Reader of field `TMS`" ] pub type TMS_R = crate :: R < bool , TMS_A > ; impl TMS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TMS_A { match self . bits { false => TMS_A :: _0 , true => TMS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TMS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TMS_A :: _1 } } # [ doc = "Write proxy for field `TMS`" ] pub struct TMS_W < 'a > { w : & 'a mut W , } impl < 'a > TMS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TMS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Time Counter mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TMS_A :: _0 ) } # [ doc = "Pulse Counter mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TMS_A :: _1 ) } # [ 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 } } # [ doc = "Timer Free-Running Counter\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFC_A { # [ doc = "0: CNR is reset whenever TCF is set." ] _0 , # [ doc = "1: CNR is reset on overflow." ] _1 } impl From < TFC_A > for bool { # [ inline ( always ) ] fn from ( variant : TFC_A ) -> Self { match variant { TFC_A :: _0 => false , TFC_A :: _1 => true } } } # [ doc = "Reader of field `TFC`" ] pub type TFC_R = crate :: R < bool , TFC_A > ; impl TFC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFC_A { match self . bits { false => TFC_A :: _0 , true => TFC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFC_A :: _1 } } # [ doc = "Write proxy for field `TFC`" ] pub struct TFC_W < 'a > { w : & 'a mut W , } impl < 'a > TFC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CNR is reset whenever TCF is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFC_A :: _0 ) } # [ doc = "CNR is reset on overflow." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFC_A :: _1 ) } # [ 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 = "Timer Pin Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPP_A { # [ doc = "0: Pulse Counter input source is active-high, and the CNR will increment on the rising-edge." ] _0 , # [ doc = "1: Pulse Counter input source is active-low, and the CNR will increment on the falling-edge." ] _1 } impl From < TPP_A > for bool { # [ inline ( always ) ] fn from ( variant : TPP_A ) -> Self { match variant { TPP_A :: _0 => false , TPP_A :: _1 => true } } } # [ doc = "Reader of field `TPP`" ] pub type TPP_R = crate :: R < bool , TPP_A > ; impl TPP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPP_A { match self . bits { false => TPP_A :: _0 , true => TPP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TPP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TPP_A :: _1 } } # [ doc = "Write proxy for field `TPP`" ] pub struct TPP_W < 'a > { w : & 'a mut W , } impl < 'a > TPP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pulse Counter input source is active-high, and the CNR will increment on the rising-edge." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TPP_A :: _0 ) } # [ doc = "Pulse Counter input source is active-low, and the CNR will increment on the falling-edge." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TPP_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Timer Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPS_A { # [ doc = "0: Pulse counter input 0 is selected." ] _00 , # [ doc = "1: Pulse counter input 1 is selected." ] _01 , # [ doc = "2: Pulse counter input 2 is selected." ] _10 , # [ doc = "3: Pulse counter input 3 is selected." ] _11 } impl From < TPS_A > for u8 { # [ inline ( always ) ] fn from ( variant : TPS_A ) -> Self { match variant { TPS_A :: _00 => 0 , TPS_A :: _01 => 1 , TPS_A :: _10 => 2 , TPS_A :: _11 => 3 } } } # [ doc = "Reader of field `TPS`" ] pub type TPS_R = crate :: R < u8 , TPS_A > ; impl TPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPS_A { match self . bits { 0 => TPS_A :: _00 , 1 => TPS_A :: _01 , 2 => TPS_A :: _10 , 3 => TPS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TPS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TPS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TPS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TPS_A :: _11 } } # [ doc = "Write proxy for field `TPS`" ] pub struct TPS_W < 'a > { w : & 'a mut W , } impl < 'a > TPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pulse counter input 0 is selected." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TPS_A :: _00 ) } # [ doc = "Pulse counter input 1 is selected." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TPS_A :: _01 ) } # [ doc = "Pulse counter input 2 is selected." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TPS_A :: _10 ) } # [ doc = "Pulse counter input 3 is selected." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TPS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Timer Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: Timer interrupt disabled." ] _0 , # [ doc = "1: Timer interrupt enabled." ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer interrupt disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "Timer interrupt enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 = "Timer Compare Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_A { # [ doc = "0: The value of CNR is not equal to CMR and increments." ] _0 , # [ doc = "1: The value of CNR is equal to CMR and increments." ] _1 } impl From < TCF_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_A ) -> Self { match variant { TCF_A :: _0 => false , TCF_A :: _1 => true } } } # [ doc = "Reader of field `TCF`" ] pub type TCF_R = crate :: R < bool , TCF_A > ; impl TCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_A { match self . bits { false => TCF_A :: _0 , true => TCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_A :: _1 } } # [ doc = "Write proxy for field `TCF`" ] pub struct TCF_W < 'a > { w : & 'a mut W , } impl < 'a > TCF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The value of CNR is not equal to CMR and increments." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCF_A :: _0 ) } # [ doc = "The value of CNR is equal to CMR and increments." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Timer Enable" ] # [ inline ( always ) ] pub fn ten ( & self ) -> TEN_R { TEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Timer Mode Select" ] # [ inline ( always ) ] pub fn tms ( & self ) -> TMS_R { TMS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Timer Free-Running Counter" ] # [ inline ( always ) ] pub fn tfc ( & self ) -> TFC_R { TFC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Timer Pin Polarity" ] # [ inline ( always ) ] pub fn tpp ( & self ) -> TPP_R { TPP_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:5 - Timer Pin Select" ] # [ inline ( always ) ] pub fn tps ( & self ) -> TPS_R { TPS_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Timer Compare Flag" ] # [ inline ( always ) ] pub fn tcf ( & self ) -> TCF_R { TCF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Timer Enable" ] # [ inline ( always ) ] pub fn ten ( & mut self ) -> TEN_W { TEN_W { w : self } } # [ doc = "Bit 1 - Timer Mode Select" ] # [ inline ( always ) ] pub fn tms ( & mut self ) -> TMS_W { TMS_W { w : self } } # [ doc = "Bit 2 - Timer Free-Running Counter" ] # [ inline ( always ) ] pub fn tfc ( & mut self ) -> TFC_W { TFC_W { w : self } } # [ doc = "Bit 3 - Timer Pin Polarity" ] # [ inline ( always ) ] pub fn tpp ( & mut self ) -> TPP_W { TPP_W { w : self } } # [ doc = "Bits 4:5 - Timer Pin Select" ] # [ inline ( always ) ] pub fn tps ( & mut self ) -> TPS_W { TPS_W { w : self } } # [ doc = "Bit 6 - Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } # [ doc = "Bit 7 - Timer Compare Flag" ] # [ inline ( always ) ] pub fn tcf ( & mut self ) -> TCF_W { TCF_W { w : self } } } } # [ doc = "Low Power Timer Prescale Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psr](psr) module" ] pub type PSR = crate :: Reg < u32 , _PSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PSR ; # [ doc = "`read()` method returns [psr::R](psr::R) reader structure" ] impl crate :: Readable for PSR { } # [ doc = "`write(|w| ..)` method takes [psr::W](psr::W) writer structure" ] impl crate :: Writable for PSR { } # [ doc = "Low Power Timer Prescale Register" ] pub mod psr { # [ doc = "Reader of register PSR" ] pub type R = crate :: R < u32 , super :: PSR > ; # [ doc = "Writer for register PSR" ] pub type W = crate :: W < u32 , super :: PSR > ; # [ doc = "Register PSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Prescaler Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCS_A { # [ doc = "0: Prescaler/glitch filter clock 0 selected." ] _00 , # [ doc = "1: Prescaler/glitch filter clock 1 selected." ] _01 , # [ doc = "2: Prescaler/glitch filter clock 2 selected." ] _10 , # [ doc = "3: Prescaler/glitch filter clock 3 selected." ] _11 } impl From < PCS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PCS_A ) -> Self { match variant { PCS_A :: _00 => 0 , PCS_A :: _01 => 1 , PCS_A :: _10 => 2 , PCS_A :: _11 => 3 } } } # [ doc = "Reader of field `PCS`" ] pub type PCS_R = crate :: R < u8 , PCS_A > ; impl PCS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCS_A { match self . bits { 0 => PCS_A :: _00 , 1 => PCS_A :: _01 , 2 => PCS_A :: _10 , 3 => PCS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PCS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PCS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PCS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PCS_A :: _11 } } # [ doc = "Write proxy for field `PCS`" ] pub struct PCS_W < 'a > { w : & 'a mut W , } impl < 'a > PCS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Prescaler/glitch filter clock 0 selected." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PCS_A :: _00 ) } # [ doc = "Prescaler/glitch filter clock 1 selected." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PCS_A :: _01 ) } # [ doc = "Prescaler/glitch filter clock 2 selected." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PCS_A :: _10 ) } # [ doc = "Prescaler/glitch filter clock 3 selected." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PCS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Prescaler Bypass\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PBYP_A { # [ doc = "0: Prescaler/glitch filter is enabled." ] _0 , # [ doc = "1: Prescaler/glitch filter is bypassed." ] _1 } impl From < PBYP_A > for bool { # [ inline ( always ) ] fn from ( variant : PBYP_A ) -> Self { match variant { PBYP_A :: _0 => false , PBYP_A :: _1 => true } } } # [ doc = "Reader of field `PBYP`" ] pub type PBYP_R = crate :: R < bool , PBYP_A > ; impl PBYP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PBYP_A { match self . bits { false => PBYP_A :: _0 , true => PBYP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PBYP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PBYP_A :: _1 } } # [ doc = "Write proxy for field `PBYP`" ] pub struct PBYP_W < 'a > { w : & 'a mut W , } impl < 'a > PBYP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PBYP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Prescaler/glitch filter is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PBYP_A :: _0 ) } # [ doc = "Prescaler/glitch filter is bypassed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PBYP_A :: _1 ) } # [ 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 = "Prescale Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRESCALE_A { # [ doc = "0: Prescaler divides the prescaler clock by 2; glitch filter does not support this configuration." ] _0000 , # [ doc = "1: Prescaler divides the prescaler clock by 4; glitch filter recognizes change on input pin after 2 rising clock edges." ] _0001 , # [ doc = "2: Prescaler divides the prescaler clock by 8; glitch filter recognizes change on input pin after 4 rising clock edges." ] _0010 , # [ doc = "3: Prescaler divides the prescaler clock by 16; glitch filter recognizes change on input pin after 8 rising clock edges." ] _0011 , # [ doc = "4: Prescaler divides the prescaler clock by 32; glitch filter recognizes change on input pin after 16 rising clock edges." ] _0100 , # [ doc = "5: Prescaler divides the prescaler clock by 64; glitch filter recognizes change on input pin after 32 rising clock edges." ] _0101 , # [ doc = "6: Prescaler divides the prescaler clock by 128; glitch filter recognizes change on input pin after 64 rising clock edges." ] _0110 , # [ doc = "7: Prescaler divides the prescaler clock by 256; glitch filter recognizes change on input pin after 128 rising clock edges." ] _0111 , # [ doc = "8: Prescaler divides the prescaler clock by 512; glitch filter recognizes change on input pin after 256 rising clock edges." ] _1000 , # [ doc = "9: Prescaler divides the prescaler clock by 1024; glitch filter recognizes change on input pin after 512 rising clock edges." ] _1001 , # [ doc = "10: Prescaler divides the prescaler clock by 2048; glitch filter recognizes change on input pin after 1024 rising clock edges." ] _1010 , # [ doc = "11: Prescaler divides the prescaler clock by 4096; glitch filter recognizes change on input pin after 2048 rising clock edges." ] _1011 , # [ doc = "12: Prescaler divides the prescaler clock by 8192; glitch filter recognizes change on input pin after 4096 rising clock edges." ] _1100 , # [ doc = "13: Prescaler divides the prescaler clock by 16,384; glitch filter recognizes change on input pin after 8192 rising clock edges." ] _1101 , # [ doc = "14: Prescaler divides the prescaler clock by 32,768; glitch filter recognizes change on input pin after 16,384 rising clock edges." ] _1110 , # [ doc = "15: Prescaler divides the prescaler clock by 65,536; glitch filter recognizes change on input pin after 32,768 rising clock edges." ] _1111 } impl From < PRESCALE_A > for u8 { # [ inline ( always ) ] fn from ( variant : PRESCALE_A ) -> Self { match variant { PRESCALE_A :: _0000 => 0 , PRESCALE_A :: _0001 => 1 , PRESCALE_A :: _0010 => 2 , PRESCALE_A :: _0011 => 3 , PRESCALE_A :: _0100 => 4 , PRESCALE_A :: _0101 => 5 , PRESCALE_A :: _0110 => 6 , PRESCALE_A :: _0111 => 7 , PRESCALE_A :: _1000 => 8 , PRESCALE_A :: _1001 => 9 , PRESCALE_A :: _1010 => 10 , PRESCALE_A :: _1011 => 11 , PRESCALE_A :: _1100 => 12 , PRESCALE_A :: _1101 => 13 , PRESCALE_A :: _1110 => 14 , PRESCALE_A :: _1111 => 15 } } } # [ doc = "Reader of field `PRESCALE`" ] pub type PRESCALE_R = crate :: R < u8 , PRESCALE_A > ; impl PRESCALE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PRESCALE_A { match self . bits { 0 => PRESCALE_A :: _0000 , 1 => PRESCALE_A :: _0001 , 2 => PRESCALE_A :: _0010 , 3 => PRESCALE_A :: _0011 , 4 => PRESCALE_A :: _0100 , 5 => PRESCALE_A :: _0101 , 6 => PRESCALE_A :: _0110 , 7 => PRESCALE_A :: _0111 , 8 => PRESCALE_A :: _1000 , 9 => PRESCALE_A :: _1001 , 10 => PRESCALE_A :: _1010 , 11 => PRESCALE_A :: _1011 , 12 => PRESCALE_A :: _1100 , 13 => PRESCALE_A :: _1101 , 14 => PRESCALE_A :: _1110 , 15 => PRESCALE_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == PRESCALE_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == PRESCALE_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == PRESCALE_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == PRESCALE_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == PRESCALE_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == PRESCALE_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == PRESCALE_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == PRESCALE_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == PRESCALE_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == PRESCALE_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == PRESCALE_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == PRESCALE_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == PRESCALE_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == PRESCALE_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == PRESCALE_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == PRESCALE_A :: _1111 } } # [ doc = "Write proxy for field `PRESCALE`" ] pub struct PRESCALE_W < 'a > { w : & 'a mut W , } impl < 'a > PRESCALE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PRESCALE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Prescaler divides the prescaler clock by 2; glitch filter does not support this configuration." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _0000 ) } # [ doc = "Prescaler divides the prescaler clock by 4; glitch filter recognizes change on input pin after 2 rising clock edges." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _0001 ) } # [ doc = "Prescaler divides the prescaler clock by 8; glitch filter recognizes change on input pin after 4 rising clock edges." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _0010 ) } # [ doc = "Prescaler divides the prescaler clock by 16; glitch filter recognizes change on input pin after 8 rising clock edges." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _0011 ) } # [ doc = "Prescaler divides the prescaler clock by 32; glitch filter recognizes change on input pin after 16 rising clock edges." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _0100 ) } # [ doc = "Prescaler divides the prescaler clock by 64; glitch filter recognizes change on input pin after 32 rising clock edges." ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _0101 ) } # [ doc = "Prescaler divides the prescaler clock by 128; glitch filter recognizes change on input pin after 64 rising clock edges." ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _0110 ) } # [ doc = "Prescaler divides the prescaler clock by 256; glitch filter recognizes change on input pin after 128 rising clock edges." ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _0111 ) } # [ doc = "Prescaler divides the prescaler clock by 512; glitch filter recognizes change on input pin after 256 rising clock edges." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _1000 ) } # [ doc = "Prescaler divides the prescaler clock by 1024; glitch filter recognizes change on input pin after 512 rising clock edges." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _1001 ) } # [ doc = "Prescaler divides the prescaler clock by 2048; glitch filter recognizes change on input pin after 1024 rising clock edges." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _1010 ) } # [ doc = "Prescaler divides the prescaler clock by 4096; glitch filter recognizes change on input pin after 2048 rising clock edges." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _1011 ) } # [ doc = "Prescaler divides the prescaler clock by 8192; glitch filter recognizes change on input pin after 4096 rising clock edges." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _1100 ) } # [ doc = "Prescaler divides the prescaler clock by 16,384; glitch filter recognizes change on input pin after 8192 rising clock edges." ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _1101 ) } # [ doc = "Prescaler divides the prescaler clock by 32,768; glitch filter recognizes change on input pin after 16,384 rising clock edges." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _1110 ) } # [ doc = "Prescaler divides the prescaler clock by 65,536; glitch filter recognizes change on input pin after 32,768 rising clock edges." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( PRESCALE_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x0f << 3 ) ) | ( ( ( value as u32 ) & 0x0f ) << 3 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Prescaler Clock Select" ] # [ inline ( always ) ] pub fn pcs ( & self ) -> PCS_R { PCS_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Prescaler Bypass" ] # [ inline ( always ) ] pub fn pbyp ( & self ) -> PBYP_R { PBYP_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bits 3:6 - Prescale Value" ] # [ inline ( always ) ] pub fn prescale ( & self ) -> PRESCALE_R { PRESCALE_R :: new ( ( ( self . bits >> 3 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Prescaler Clock Select" ] # [ inline ( always ) ] pub fn pcs ( & mut self ) -> PCS_W { PCS_W { w : self } } # [ doc = "Bit 2 - Prescaler Bypass" ] # [ inline ( always ) ] pub fn pbyp ( & mut self ) -> PBYP_W { PBYP_W { w : self } } # [ doc = "Bits 3:6 - Prescale Value" ] # [ inline ( always ) ] pub fn prescale ( & mut self ) -> PRESCALE_W { PRESCALE_W { w : self } } } } # [ doc = "Low Power Timer Compare Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmr](cmr) module" ] pub type CMR = crate :: Reg < u32 , _CMR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMR ; # [ doc = "`read()` method returns [cmr::R](cmr::R) reader structure" ] impl crate :: Readable for CMR { } # [ doc = "`write(|w| ..)` method takes [cmr::W](cmr::W) writer structure" ] impl crate :: Writable for CMR { } # [ doc = "Low Power Timer Compare Register" ] pub mod cmr { # [ doc = "Reader of register CMR" ] pub type R = crate :: R < u32 , super :: CMR > ; # [ doc = "Writer for register CMR" ] pub type W = crate :: W < u32 , super :: CMR > ; # [ doc = "Register CMR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CMR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COMPARE`" ] pub type COMPARE_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `COMPARE`" ] pub struct COMPARE_W < 'a > { w : & 'a mut W , } impl < 'a > COMPARE_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Compare Value" ] # [ inline ( always ) ] pub fn compare ( & self ) -> COMPARE_R { COMPARE_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Compare Value" ] # [ inline ( always ) ] pub fn compare ( & mut self ) -> COMPARE_W { COMPARE_W { w : self } } } } # [ doc = "Low Power Timer Counter Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnr](cnr) module" ] pub type CNR = crate :: Reg < u32 , _CNR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNR ; # [ doc = "`read()` method returns [cnr::R](cnr::R) reader structure" ] impl crate :: Readable for CNR { } # [ doc = "`write(|w| ..)` method takes [cnr::W](cnr::W) writer structure" ] impl crate :: Writable for CNR { } # [ doc = "Low Power Timer Counter Register" ] pub mod cnr { # [ doc = "Reader of register CNR" ] pub type R = crate :: R < u32 , super :: CNR > ; # [ doc = "Writer for register CNR" ] pub type W = crate :: W < u32 , super :: CNR > ; # [ doc = "Register CNR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUNTER`" ] pub type COUNTER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `COUNTER`" ] pub struct COUNTER_W < 'a > { w : & 'a mut W , } impl < 'a > COUNTER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn counter ( & self ) -> COUNTER_R { COUNTER_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Counter Value" ] # [ inline ( always ) ] pub fn counter ( & mut self ) -> COUNTER_W { COUNTER_W { w : self } } } } } # [ doc = "System register file" ] pub struct RFSYS { _marker : PhantomData < * const ( ) > } unsafe impl Send for RFSYS { } impl RFSYS { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const rfsys :: RegisterBlock { 0x4004_1000 as * const _ } } impl Deref for RFSYS { type Target = rfsys :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * RFSYS :: ptr ( ) } } } # [ doc = "System register file" ] pub mod rfsys { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Register file register" ] pub reg : [ REG ; 8 ] , } # [ doc = "Register file register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [reg](reg) module" ] pub type REG = crate :: Reg < u32 , _REG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _REG ; # [ doc = "`read()` method returns [reg::R](reg::R) reader structure" ] impl crate :: Readable for REG { } # [ doc = "`write(|w| ..)` method takes [reg::W](reg::W) writer structure" ] impl crate :: Writable for REG { } # [ doc = "Register file register" ] pub mod reg { # [ doc = "Reader of register REG%s" ] pub type R = crate :: R < u32 , super :: REG > ; # [ doc = "Writer for register REG%s" ] pub type W = crate :: W < u32 , super :: REG > ; # [ doc = "Register REG%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: REG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `LL`" ] pub type LL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `LL`" ] pub struct LL_W < 'a > { w : & 'a mut W , } impl < 'a > LL_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `LH`" ] pub type LH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `LH`" ] pub struct LH_W < 'a > { w : & 'a mut W , } impl < 'a > LH_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `HL`" ] pub type HL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HL`" ] pub struct HL_W < 'a > { w : & 'a mut W , } impl < 'a > HL_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `HH`" ] pub type HH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HH`" ] pub struct HH_W < 'a > { w : & 'a mut W , } impl < 'a > HH_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Low lower byte" ] # [ inline ( always ) ] pub fn ll ( & self ) -> LL_R { LL_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Low higher byte" ] # [ inline ( always ) ] pub fn lh ( & self ) -> LH_R { LH_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - High lower byte" ] # [ inline ( always ) ] pub fn hl ( & self ) -> HL_R { HL_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - High higher byte" ] # [ inline ( always ) ] pub fn hh ( & self ) -> HH_R { HH_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Low lower byte" ] # [ inline ( always ) ] pub fn ll ( & mut self ) -> LL_W { LL_W { w : self } } # [ doc = "Bits 8:15 - Low higher byte" ] # [ inline ( always ) ] pub fn lh ( & mut self ) -> LH_W { LH_W { w : self } } # [ doc = "Bits 16:23 - High lower byte" ] # [ inline ( always ) ] pub fn hl ( & mut self ) -> HL_W { HL_W { w : self } } # [ doc = "Bits 24:31 - High higher byte" ] # [ inline ( always ) ] pub fn hh ( & mut self ) -> HH_W { HH_W { w : self } } } } } # [ doc = "Touch sense input" ] pub struct TSI0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TSI0 { } impl TSI0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const tsi0 :: RegisterBlock { 0x4004_5000 as * const _ } } impl Deref for TSI0 { type Target = tsi0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * TSI0 :: ptr ( ) } } } # [ doc = "Touch sense input" ] pub mod tsi0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - TSI General Control and Status Register" ] pub gencs : GENCS , # [ doc = "0x04 - TSI DATA Register" ] pub data : DATA , # [ doc = "0x08 - TSI Threshold Register" ] pub tshd : TSHD , } # [ doc = "TSI General Control and Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gencs](gencs) module" ] pub type GENCS = crate :: Reg < u32 , _GENCS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GENCS ; # [ doc = "`read()` method returns [gencs::R](gencs::R) reader structure" ] impl crate :: Readable for GENCS { } # [ doc = "`write(|w| ..)` method takes [gencs::W](gencs::W) writer structure" ] impl crate :: Writable for GENCS { } # [ doc = "TSI General Control and Status Register" ] pub mod gencs { # [ doc = "Reader of register GENCS" ] pub type R = crate :: R < u32 , super :: GENCS > ; # [ doc = "Writer for register GENCS" ] pub type W = crate :: W < u32 , super :: GENCS > ; # [ doc = "Register GENCS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GENCS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "End-of-Scan DMA Transfer Request Enable Only\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOSDMEO_A { # [ doc = "0: Do not enable the End-of-Scan DMA transfer request only. Depending on ESOR state, either Out-of-Range or End-of-Scan can trigger a DMA transfer request and interrupt." ] _0 , # [ doc = "1: Only the End-of-Scan event can trigger a DMA transfer request. The Out-of-Range event only and always triggers an interrupt if TSIIE is set." ] _1 } impl From < EOSDMEO_A > for bool { # [ inline ( always ) ] fn from ( variant : EOSDMEO_A ) -> Self { match variant { EOSDMEO_A :: _0 => false , EOSDMEO_A :: _1 => true } } } # [ doc = "Reader of field `EOSDMEO`" ] pub type EOSDMEO_R = crate :: R < bool , EOSDMEO_A > ; impl EOSDMEO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOSDMEO_A { match self . bits { false => EOSDMEO_A :: _0 , true => EOSDMEO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOSDMEO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOSDMEO_A :: _1 } } # [ doc = "Write proxy for field `EOSDMEO`" ] pub struct EOSDMEO_W < 'a > { w : & 'a mut W , } impl < 'a > EOSDMEO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOSDMEO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not enable the End-of-Scan DMA transfer request only. Depending on ESOR state, either Out-of-Range or End-of-Scan can trigger a DMA transfer request and interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOSDMEO_A :: _0 ) } # [ doc = "Only the End-of-Scan event can trigger a DMA transfer request. The Out-of-Range event only and always triggers an interrupt if TSIIE is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOSDMEO_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "CURSW\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CURSW_A { # [ doc = "0: The current source pair are not swapped." ] _0 , # [ doc = "1: The current source pair are swapped." ] _1 } impl From < CURSW_A > for bool { # [ inline ( always ) ] fn from ( variant : CURSW_A ) -> Self { match variant { CURSW_A :: _0 => false , CURSW_A :: _1 => true } } } # [ doc = "Reader of field `CURSW`" ] pub type CURSW_R = crate :: R < bool , CURSW_A > ; impl CURSW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CURSW_A { match self . bits { false => CURSW_A :: _0 , true => CURSW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CURSW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CURSW_A :: _1 } } # [ doc = "Write proxy for field `CURSW`" ] pub struct CURSW_W < 'a > { w : & 'a mut W , } impl < 'a > CURSW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CURSW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The current source pair are not swapped." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CURSW_A :: _0 ) } # [ doc = "The current source pair are swapped." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CURSW_A :: _1 ) } # [ 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 } } # [ doc = "End of Scan Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOSF_A { # [ doc = "0: Scan not complete." ] _0 , # [ doc = "1: Scan complete." ] _1 } impl From < EOSF_A > for bool { # [ inline ( always ) ] fn from ( variant : EOSF_A ) -> Self { match variant { EOSF_A :: _0 => false , EOSF_A :: _1 => true } } } # [ doc = "Reader of field `EOSF`" ] pub type EOSF_R = crate :: R < bool , EOSF_A > ; impl EOSF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOSF_A { match self . bits { false => EOSF_A :: _0 , true => EOSF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOSF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOSF_A :: _1 } } # [ doc = "Write proxy for field `EOSF`" ] pub struct EOSF_W < 'a > { w : & 'a mut W , } impl < 'a > EOSF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOSF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Scan not complete." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOSF_A :: _0 ) } # [ doc = "Scan complete." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOSF_A :: _1 ) } # [ 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 = "Scan In Progress Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SCNIP_A { # [ doc = "0: No scan in progress." ] _0 , # [ doc = "1: Scan in progress." ] _1 } impl From < SCNIP_A > for bool { # [ inline ( always ) ] fn from ( variant : SCNIP_A ) -> Self { match variant { SCNIP_A :: _0 => false , SCNIP_A :: _1 => true } } } # [ doc = "Reader of field `SCNIP`" ] pub type SCNIP_R = crate :: R < bool , SCNIP_A > ; impl SCNIP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SCNIP_A { match self . bits { false => SCNIP_A :: _0 , true => SCNIP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SCNIP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SCNIP_A :: _1 } } # [ doc = "Scan Trigger Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STM_A { # [ doc = "0: Software trigger scan." ] _0 , # [ doc = "1: Hardware trigger scan." ] _1 } impl From < STM_A > for bool { # [ inline ( always ) ] fn from ( variant : STM_A ) -> Self { match variant { STM_A :: _0 => false , STM_A :: _1 => true } } } # [ doc = "Reader of field `STM`" ] pub type STM_R = crate :: R < bool , STM_A > ; impl STM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STM_A { match self . bits { false => STM_A :: _0 , true => STM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STM_A :: _1 } } # [ doc = "Write proxy for field `STM`" ] pub struct STM_W < 'a > { w : & 'a mut W , } impl < 'a > STM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Software trigger scan." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STM_A :: _0 ) } # [ doc = "Hardware trigger scan." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STM_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "TSI STOP Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STPE_A { # [ doc = "0: TSI is disabled when MCU goes into low power mode." ] _0 , # [ doc = "1: Allows TSI to continue running in all low power modes." ] _1 } impl From < STPE_A > for bool { # [ inline ( always ) ] fn from ( variant : STPE_A ) -> Self { match variant { STPE_A :: _0 => false , STPE_A :: _1 => true } } } # [ doc = "Reader of field `STPE`" ] pub type STPE_R = crate :: R < bool , STPE_A > ; impl STPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STPE_A { match self . bits { false => STPE_A :: _0 , true => STPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STPE_A :: _1 } } # [ doc = "Write proxy for field `STPE`" ] pub struct STPE_W < 'a > { w : & 'a mut W , } impl < 'a > STPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TSI is disabled when MCU goes into low power mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STPE_A :: _0 ) } # [ doc = "Allows TSI to continue running in all low power modes." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STPE_A :: _1 ) } # [ 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 = "Touch Sensing Input Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSIIEN_A { # [ doc = "0: TSI interrupt is disabled." ] _0 , # [ doc = "1: TSI interrupt is enabled." ] _1 } impl From < TSIIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : TSIIEN_A ) -> Self { match variant { TSIIEN_A :: _0 => false , TSIIEN_A :: _1 => true } } } # [ doc = "Reader of field `TSIIEN`" ] pub type TSIIEN_R = crate :: R < bool , TSIIEN_A > ; impl TSIIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSIIEN_A { match self . bits { false => TSIIEN_A :: _0 , true => TSIIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TSIIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TSIIEN_A :: _1 } } # [ doc = "Write proxy for field `TSIIEN`" ] pub struct TSIIEN_W < 'a > { w : & 'a mut W , } impl < 'a > TSIIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSIIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TSI interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TSIIEN_A :: _0 ) } # [ doc = "TSI interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TSIIEN_A :: _1 ) } # [ 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 = "Touch Sensing Input Module Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSIEN_A { # [ doc = "0: TSI module disabled." ] _0 , # [ doc = "1: TSI module enabled." ] _1 } impl From < TSIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : TSIEN_A ) -> Self { match variant { TSIEN_A :: _0 => false , TSIEN_A :: _1 => true } } } # [ doc = "Reader of field `TSIEN`" ] pub type TSIEN_R = crate :: R < bool , TSIEN_A > ; impl TSIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSIEN_A { match self . bits { false => TSIEN_A :: _0 , true => TSIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TSIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TSIEN_A :: _1 } } # [ doc = "Write proxy for field `TSIEN`" ] pub struct TSIEN_W < 'a > { w : & 'a mut W , } impl < 'a > TSIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TSI module disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TSIEN_A :: _0 ) } # [ doc = "TSI module enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TSIEN_A :: _1 ) } # [ 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 = "NSCN\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NSCN_A { # [ doc = "0: Once per electrode" ] _00000 , # [ doc = "1: Twice per electrode" ] _00001 , # [ doc = "2: 3 times per electrode" ] _00010 , # [ doc = "3: 4 times per electrode" ] _00011 , # [ doc = "4: 5 times per electrode" ] _00100 , # [ doc = "5: 6 times per electrode" ] _00101 , # [ doc = "6: 7 times per electrode" ] _00110 , # [ doc = "7: 8 times per electrode" ] _00111 , # [ doc = "8: 9 times per electrode" ] _01000 , # [ doc = "9: 10 times per electrode" ] _01001 , # [ doc = "10: 11 times per electrode" ] _01010 , # [ doc = "11: 12 times per electrode" ] _01011 , # [ doc = "12: 13 times per electrode" ] _01100 , # [ doc = "13: 14 times per electrode" ] _01101 , # [ doc = "14: 15 times per electrode" ] _01110 , # [ doc = "15: 16 times per electrode" ] _01111 , # [ doc = "16: 17 times per electrode" ] _10000 , # [ doc = "17: 18 times per electrode" ] _10001 , # [ doc = "18: 19 times per electrode" ] _10010 , # [ doc = "19: 20 times per electrode" ] _10011 , # [ doc = "20: 21 times per electrode" ] _10100 , # [ doc = "21: 22 times per electrode" ] _10101 , # [ doc = "22: 23 times per electrode" ] _10110 , # [ doc = "23: 24 times per electrode" ] _10111 , # [ doc = "24: 25 times per electrode" ] _11000 , # [ doc = "25: 26 times per electrode" ] _11001 , # [ doc = "26: 27 times per electrode" ] _11010 , # [ doc = "27: 28 times per electrode" ] _11011 , # [ doc = "28: 29 times per electrode" ] _11100 , # [ doc = "29: 30 times per electrode" ] _11101 , # [ doc = "30: 31 times per electrode" ] _11110 , # [ doc = "31: 32 times per electrode" ] _11111 } impl From < NSCN_A > for u8 { # [ inline ( always ) ] fn from ( variant : NSCN_A ) -> Self { match variant { NSCN_A :: _00000 => 0 , NSCN_A :: _00001 => 1 , NSCN_A :: _00010 => 2 , NSCN_A :: _00011 => 3 , NSCN_A :: _00100 => 4 , NSCN_A :: _00101 => 5 , NSCN_A :: _00110 => 6 , NSCN_A :: _00111 => 7 , NSCN_A :: _01000 => 8 , NSCN_A :: _01001 => 9 , NSCN_A :: _01010 => 10 , NSCN_A :: _01011 => 11 , NSCN_A :: _01100 => 12 , NSCN_A :: _01101 => 13 , NSCN_A :: _01110 => 14 , NSCN_A :: _01111 => 15 , NSCN_A :: _10000 => 16 , NSCN_A :: _10001 => 17 , NSCN_A :: _10010 => 18 , NSCN_A :: _10011 => 19 , NSCN_A :: _10100 => 20 , NSCN_A :: _10101 => 21 , NSCN_A :: _10110 => 22 , NSCN_A :: _10111 => 23 , NSCN_A :: _11000 => 24 , NSCN_A :: _11001 => 25 , NSCN_A :: _11010 => 26 , NSCN_A :: _11011 => 27 , NSCN_A :: _11100 => 28 , NSCN_A :: _11101 => 29 , NSCN_A :: _11110 => 30 , NSCN_A :: _11111 => 31 } } } # [ doc = "Reader of field `NSCN`" ] pub type NSCN_R = crate :: R < u8 , NSCN_A > ; impl NSCN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NSCN_A { match self . bits { 0 => NSCN_A :: _00000 , 1 => NSCN_A :: _00001 , 2 => NSCN_A :: _00010 , 3 => NSCN_A :: _00011 , 4 => NSCN_A :: _00100 , 5 => NSCN_A :: _00101 , 6 => NSCN_A :: _00110 , 7 => NSCN_A :: _00111 , 8 => NSCN_A :: _01000 , 9 => NSCN_A :: _01001 , 10 => NSCN_A :: _01010 , 11 => NSCN_A :: _01011 , 12 => NSCN_A :: _01100 , 13 => NSCN_A :: _01101 , 14 => NSCN_A :: _01110 , 15 => NSCN_A :: _01111 , 16 => NSCN_A :: _10000 , 17 => NSCN_A :: _10001 , 18 => NSCN_A :: _10010 , 19 => NSCN_A :: _10011 , 20 => NSCN_A :: _10100 , 21 => NSCN_A :: _10101 , 22 => NSCN_A :: _10110 , 23 => NSCN_A :: _10111 , 24 => NSCN_A :: _11000 , 25 => NSCN_A :: _11001 , 26 => NSCN_A :: _11010 , 27 => NSCN_A :: _11011 , 28 => NSCN_A :: _11100 , 29 => NSCN_A :: _11101 , 30 => NSCN_A :: _11110 , 31 => NSCN_A :: _11111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00000`" ] # [ inline ( always ) ] pub fn is_00000 ( & self ) -> bool { * self == NSCN_A :: _00000 } # [ doc = "Checks if the value of the field is `_00001`" ] # [ inline ( always ) ] pub fn is_00001 ( & self ) -> bool { * self == NSCN_A :: _00001 } # [ doc = "Checks if the value of the field is `_00010`" ] # [ inline ( always ) ] pub fn is_00010 ( & self ) -> bool { * self == NSCN_A :: _00010 } # [ doc = "Checks if the value of the field is `_00011`" ] # [ inline ( always ) ] pub fn is_00011 ( & self ) -> bool { * self == NSCN_A :: _00011 } # [ doc = "Checks if the value of the field is `_00100`" ] # [ inline ( always ) ] pub fn is_00100 ( & self ) -> bool { * self == NSCN_A :: _00100 } # [ doc = "Checks if the value of the field is `_00101`" ] # [ inline ( always ) ] pub fn is_00101 ( & self ) -> bool { * self == NSCN_A :: _00101 } # [ doc = "Checks if the value of the field is `_00110`" ] # [ inline ( always ) ] pub fn is_00110 ( & self ) -> bool { * self == NSCN_A :: _00110 } # [ doc = "Checks if the value of the field is `_00111`" ] # [ inline ( always ) ] pub fn is_00111 ( & self ) -> bool { * self == NSCN_A :: _00111 } # [ doc = "Checks if the value of the field is `_01000`" ] # [ inline ( always ) ] pub fn is_01000 ( & self ) -> bool { * self == NSCN_A :: _01000 } # [ doc = "Checks if the value of the field is `_01001`" ] # [ inline ( always ) ] pub fn is_01001 ( & self ) -> bool { * self == NSCN_A :: _01001 } # [ doc = "Checks if the value of the field is `_01010`" ] # [ inline ( always ) ] pub fn is_01010 ( & self ) -> bool { * self == NSCN_A :: _01010 } # [ doc = "Checks if the value of the field is `_01011`" ] # [ inline ( always ) ] pub fn is_01011 ( & self ) -> bool { * self == NSCN_A :: _01011 } # [ doc = "Checks if the value of the field is `_01100`" ] # [ inline ( always ) ] pub fn is_01100 ( & self ) -> bool { * self == NSCN_A :: _01100 } # [ doc = "Checks if the value of the field is `_01101`" ] # [ inline ( always ) ] pub fn is_01101 ( & self ) -> bool { * self == NSCN_A :: _01101 } # [ doc = "Checks if the value of the field is `_01110`" ] # [ inline ( always ) ] pub fn is_01110 ( & self ) -> bool { * self == NSCN_A :: _01110 } # [ doc = "Checks if the value of the field is `_01111`" ] # [ inline ( always ) ] pub fn is_01111 ( & self ) -> bool { * self == NSCN_A :: _01111 } # [ doc = "Checks if the value of the field is `_10000`" ] # [ inline ( always ) ] pub fn is_10000 ( & self ) -> bool { * self == NSCN_A :: _10000 } # [ doc = "Checks if the value of the field is `_10001`" ] # [ inline ( always ) ] pub fn is_10001 ( & self ) -> bool { * self == NSCN_A :: _10001 } # [ doc = "Checks if the value of the field is `_10010`" ] # [ inline ( always ) ] pub fn is_10010 ( & self ) -> bool { * self == NSCN_A :: _10010 } # [ doc = "Checks if the value of the field is `_10011`" ] # [ inline ( always ) ] pub fn is_10011 ( & self ) -> bool { * self == NSCN_A :: _10011 } # [ doc = "Checks if the value of the field is `_10100`" ] # [ inline ( always ) ] pub fn is_10100 ( & self ) -> bool { * self == NSCN_A :: _10100 } # [ doc = "Checks if the value of the field is `_10101`" ] # [ inline ( always ) ] pub fn is_10101 ( & self ) -> bool { * self == NSCN_A :: _10101 } # [ doc = "Checks if the value of the field is `_10110`" ] # [ inline ( always ) ] pub fn is_10110 ( & self ) -> bool { * self == NSCN_A :: _10110 } # [ doc = "Checks if the value of the field is `_10111`" ] # [ inline ( always ) ] pub fn is_10111 ( & self ) -> bool { * self == NSCN_A :: _10111 } # [ doc = "Checks if the value of the field is `_11000`" ] # [ inline ( always ) ] pub fn is_11000 ( & self ) -> bool { * self == NSCN_A :: _11000 } # [ doc = "Checks if the value of the field is `_11001`" ] # [ inline ( always ) ] pub fn is_11001 ( & self ) -> bool { * self == NSCN_A :: _11001 } # [ doc = "Checks if the value of the field is `_11010`" ] # [ inline ( always ) ] pub fn is_11010 ( & self ) -> bool { * self == NSCN_A :: _11010 } # [ doc = "Checks if the value of the field is `_11011`" ] # [ inline ( always ) ] pub fn is_11011 ( & self ) -> bool { * self == NSCN_A :: _11011 } # [ doc = "Checks if the value of the field is `_11100`" ] # [ inline ( always ) ] pub fn is_11100 ( & self ) -> bool { * self == NSCN_A :: _11100 } # [ doc = "Checks if the value of the field is `_11101`" ] # [ inline ( always ) ] pub fn is_11101 ( & self ) -> bool { * self == NSCN_A :: _11101 } # [ doc = "Checks if the value of the field is `_11110`" ] # [ inline ( always ) ] pub fn is_11110 ( & self ) -> bool { * self == NSCN_A :: _11110 } # [ doc = "Checks if the value of the field is `_11111`" ] # [ inline ( always ) ] pub fn is_11111 ( & self ) -> bool { * self == NSCN_A :: _11111 } } # [ doc = "Write proxy for field `NSCN`" ] pub struct NSCN_W < 'a > { w : & 'a mut W , } impl < 'a > NSCN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NSCN_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Once per electrode" ] # [ inline ( always ) ] pub fn _00000 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _00000 ) } # [ doc = "Twice per electrode" ] # [ inline ( always ) ] pub fn _00001 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _00001 ) } # [ doc = "3 times per electrode" ] # [ inline ( always ) ] pub fn _00010 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _00010 ) } # [ doc = "4 times per electrode" ] # [ inline ( always ) ] pub fn _00011 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _00011 ) } # [ doc = "5 times per electrode" ] # [ inline ( always ) ] pub fn _00100 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _00100 ) } # [ doc = "6 times per electrode" ] # [ inline ( always ) ] pub fn _00101 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _00101 ) } # [ doc = "7 times per electrode" ] # [ inline ( always ) ] pub fn _00110 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _00110 ) } # [ doc = "8 times per electrode" ] # [ inline ( always ) ] pub fn _00111 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _00111 ) } # [ doc = "9 times per electrode" ] # [ inline ( always ) ] pub fn _01000 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _01000 ) } # [ doc = "10 times per electrode" ] # [ inline ( always ) ] pub fn _01001 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _01001 ) } # [ doc = "11 times per electrode" ] # [ inline ( always ) ] pub fn _01010 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _01010 ) } # [ doc = "12 times per electrode" ] # [ inline ( always ) ] pub fn _01011 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _01011 ) } # [ doc = "13 times per electrode" ] # [ inline ( always ) ] pub fn _01100 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _01100 ) } # [ doc = "14 times per electrode" ] # [ inline ( always ) ] pub fn _01101 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _01101 ) } # [ doc = "15 times per electrode" ] # [ inline ( always ) ] pub fn _01110 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _01110 ) } # [ doc = "16 times per electrode" ] # [ inline ( always ) ] pub fn _01111 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _01111 ) } # [ doc = "17 times per electrode" ] # [ inline ( always ) ] pub fn _10000 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _10000 ) } # [ doc = "18 times per electrode" ] # [ inline ( always ) ] pub fn _10001 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _10001 ) } # [ doc = "19 times per electrode" ] # [ inline ( always ) ] pub fn _10010 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _10010 ) } # [ doc = "20 times per electrode" ] # [ inline ( always ) ] pub fn _10011 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _10011 ) } # [ doc = "21 times per electrode" ] # [ inline ( always ) ] pub fn _10100 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _10100 ) } # [ doc = "22 times per electrode" ] # [ inline ( always ) ] pub fn _10101 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _10101 ) } # [ doc = "23 times per electrode" ] # [ inline ( always ) ] pub fn _10110 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _10110 ) } # [ doc = "24 times per electrode" ] # [ inline ( always ) ] pub fn _10111 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _10111 ) } # [ doc = "25 times per electrode" ] # [ inline ( always ) ] pub fn _11000 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _11000 ) } # [ doc = "26 times per electrode" ] # [ inline ( always ) ] pub fn _11001 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _11001 ) } # [ doc = "27 times per electrode" ] # [ inline ( always ) ] pub fn _11010 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _11010 ) } # [ doc = "28 times per electrode" ] # [ inline ( always ) ] pub fn _11011 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _11011 ) } # [ doc = "29 times per electrode" ] # [ inline ( always ) ] pub fn _11100 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _11100 ) } # [ doc = "30 times per electrode" ] # [ inline ( always ) ] pub fn _11101 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _11101 ) } # [ doc = "31 times per electrode" ] # [ inline ( always ) ] pub fn _11110 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _11110 ) } # [ doc = "32 times per electrode" ] # [ inline ( always ) ] pub fn _11111 ( self ) -> & 'a mut W { self . variant ( NSCN_A :: _11111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x1f << 8 ) ) | ( ( ( value as u32 ) & 0x1f ) << 8 ) ; self . w } } # [ doc = "PS\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Electrode Oscillator Frequency divided by 1" ] _000 , # [ doc = "1: Electrode Oscillator Frequency divided by 2" ] _001 , # [ doc = "2: Electrode Oscillator Frequency divided by 4" ] _010 , # [ doc = "3: Electrode Oscillator Frequency divided by 8" ] _011 , # [ doc = "4: Electrode Oscillator Frequency divided by 16" ] _100 , # [ doc = "5: Electrode Oscillator Frequency divided by 32" ] _101 , # [ doc = "6: Electrode Oscillator Frequency divided by 64" ] _110 , # [ doc = "7: Electrode Oscillator Frequency divided by 128" ] _111 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _000 => 0 , PS_A :: _001 => 1 , PS_A :: _010 => 2 , PS_A :: _011 => 3 , PS_A :: _100 => 4 , PS_A :: _101 => 5 , PS_A :: _110 => 6 , PS_A :: _111 => 7 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _000 , 1 => PS_A :: _001 , 2 => PS_A :: _010 , 3 => PS_A :: _011 , 4 => PS_A :: _100 , 5 => PS_A :: _101 , 6 => PS_A :: _110 , 7 => PS_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PS_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PS_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PS_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PS_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PS_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PS_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PS_A :: _111 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Electrode Oscillator Frequency divided by 1" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PS_A :: _000 ) } # [ doc = "Electrode Oscillator Frequency divided by 2" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PS_A :: _001 ) } # [ doc = "Electrode Oscillator Frequency divided by 4" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PS_A :: _010 ) } # [ doc = "Electrode Oscillator Frequency divided by 8" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PS_A :: _011 ) } # [ doc = "Electrode Oscillator Frequency divided by 16" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PS_A :: _100 ) } # [ doc = "Electrode Oscillator Frequency divided by 32" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PS_A :: _101 ) } # [ doc = "Electrode Oscillator Frequency divided by 64" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PS_A :: _110 ) } # [ doc = "Electrode Oscillator Frequency divided by 128" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PS_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 13 ) ) | ( ( ( value as u32 ) & 0x07 ) << 13 ) ; self . w } } # [ doc = "EXTCHRG\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXTCHRG_A { # [ doc = "0: 500 nA." ] _000 , # [ doc = "1: 1 uA." ] _001 , # [ doc = "2: 2 uA." ] _010 , # [ doc = "3: 4 uA." ] _011 , # [ doc = "4: 8 uA." ] _100 , # [ doc = "5: 16 uA." ] _101 , # [ doc = "6: 32 uA." ] _110 , # [ doc = "7: 64 uA." ] _111 } impl From < EXTCHRG_A > for u8 { # [ inline ( always ) ] fn from ( variant : EXTCHRG_A ) -> Self { match variant { EXTCHRG_A :: _000 => 0 , EXTCHRG_A :: _001 => 1 , EXTCHRG_A :: _010 => 2 , EXTCHRG_A :: _011 => 3 , EXTCHRG_A :: _100 => 4 , EXTCHRG_A :: _101 => 5 , EXTCHRG_A :: _110 => 6 , EXTCHRG_A :: _111 => 7 } } } # [ doc = "Reader of field `EXTCHRG`" ] pub type EXTCHRG_R = crate :: R < u8 , EXTCHRG_A > ; impl EXTCHRG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EXTCHRG_A { match self . bits { 0 => EXTCHRG_A :: _000 , 1 => EXTCHRG_A :: _001 , 2 => EXTCHRG_A :: _010 , 3 => EXTCHRG_A :: _011 , 4 => EXTCHRG_A :: _100 , 5 => EXTCHRG_A :: _101 , 6 => EXTCHRG_A :: _110 , 7 => EXTCHRG_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == EXTCHRG_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == EXTCHRG_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == EXTCHRG_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == EXTCHRG_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == EXTCHRG_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == EXTCHRG_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == EXTCHRG_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == EXTCHRG_A :: _111 } } # [ doc = "Write proxy for field `EXTCHRG`" ] pub struct EXTCHRG_W < 'a > { w : & 'a mut W , } impl < 'a > EXTCHRG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EXTCHRG_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "500 nA." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( EXTCHRG_A :: _000 ) } # [ doc = "1 uA." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( EXTCHRG_A :: _001 ) } # [ doc = "2 uA." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( EXTCHRG_A :: _010 ) } # [ doc = "4 uA." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( EXTCHRG_A :: _011 ) } # [ doc = "8 uA." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( EXTCHRG_A :: _100 ) } # [ doc = "16 uA." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( EXTCHRG_A :: _101 ) } # [ doc = "32 uA." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( EXTCHRG_A :: _110 ) } # [ doc = "64 uA." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( EXTCHRG_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 16 ) ) | ( ( ( value as u32 ) & 0x07 ) << 16 ) ; self . w } } # [ doc = "DVOLT\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DVOLT_A { # [ doc = "0: DV = 1.026 V; VP = 1.328 V; Vm = 0.302 V." ] _00 , # [ doc = "1: DV = 0.592 V; VP = 1.111 V; Vm = 0.519 V." ] _01 , # [ doc = "2: DV = 0.342 V; VP = 0.986 V; Vm = 0.644 V." ] _10 , # [ doc = "3: DV = 0.197 V; VP = 0.914 V; Vm = 0.716 V." ] _11 } impl From < DVOLT_A > for u8 { # [ inline ( always ) ] fn from ( variant : DVOLT_A ) -> Self { match variant { DVOLT_A :: _00 => 0 , DVOLT_A :: _01 => 1 , DVOLT_A :: _10 => 2 , DVOLT_A :: _11 => 3 } } } # [ doc = "Reader of field `DVOLT`" ] pub type DVOLT_R = crate :: R < u8 , DVOLT_A > ; impl DVOLT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DVOLT_A { match self . bits { 0 => DVOLT_A :: _00 , 1 => DVOLT_A :: _01 , 2 => DVOLT_A :: _10 , 3 => DVOLT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DVOLT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == DVOLT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DVOLT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DVOLT_A :: _11 } } # [ doc = "Write proxy for field `DVOLT`" ] pub struct DVOLT_W < 'a > { w : & 'a mut W , } impl < 'a > DVOLT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DVOLT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "DV = 1.026 V; VP = 1.328 V; Vm = 0.302 V." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DVOLT_A :: _00 ) } # [ doc = "DV = 0.592 V; VP = 1.111 V; Vm = 0.519 V." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( DVOLT_A :: _01 ) } # [ doc = "DV = 0.342 V; VP = 0.986 V; Vm = 0.644 V." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DVOLT_A :: _10 ) } # [ doc = "DV = 0.197 V; VP = 0.914 V; Vm = 0.716 V." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DVOLT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 19 ) ) | ( ( ( value as u32 ) & 0x03 ) << 19 ) ; self . w } } # [ doc = "REFCHRG\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REFCHRG_A { # [ doc = "0: 500 nA." ] _000 , # [ doc = "1: 1 uA." ] _001 , # [ doc = "2: 2 uA." ] _010 , # [ doc = "3: 4 uA." ] _011 , # [ doc = "4: 8 uA." ] _100 , # [ doc = "5: 16 uA." ] _101 , # [ doc = "6: 32 uA." ] _110 , # [ doc = "7: 64 uA." ] _111 } impl From < REFCHRG_A > for u8 { # [ inline ( always ) ] fn from ( variant : REFCHRG_A ) -> Self { match variant { REFCHRG_A :: _000 => 0 , REFCHRG_A :: _001 => 1 , REFCHRG_A :: _010 => 2 , REFCHRG_A :: _011 => 3 , REFCHRG_A :: _100 => 4 , REFCHRG_A :: _101 => 5 , REFCHRG_A :: _110 => 6 , REFCHRG_A :: _111 => 7 } } } # [ doc = "Reader of field `REFCHRG`" ] pub type REFCHRG_R = crate :: R < u8 , REFCHRG_A > ; impl REFCHRG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> REFCHRG_A { match self . bits { 0 => REFCHRG_A :: _000 , 1 => REFCHRG_A :: _001 , 2 => REFCHRG_A :: _010 , 3 => REFCHRG_A :: _011 , 4 => REFCHRG_A :: _100 , 5 => REFCHRG_A :: _101 , 6 => REFCHRG_A :: _110 , 7 => REFCHRG_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == REFCHRG_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == REFCHRG_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == REFCHRG_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == REFCHRG_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == REFCHRG_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == REFCHRG_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == REFCHRG_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == REFCHRG_A :: _111 } } # [ doc = "Write proxy for field `REFCHRG`" ] pub struct REFCHRG_W < 'a > { w : & 'a mut W , } impl < 'a > REFCHRG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REFCHRG_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "500 nA." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( REFCHRG_A :: _000 ) } # [ doc = "1 uA." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( REFCHRG_A :: _001 ) } # [ doc = "2 uA." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( REFCHRG_A :: _010 ) } # [ doc = "4 uA." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( REFCHRG_A :: _011 ) } # [ doc = "8 uA." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( REFCHRG_A :: _100 ) } # [ doc = "16 uA." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( REFCHRG_A :: _101 ) } # [ doc = "32 uA." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( REFCHRG_A :: _110 ) } # [ doc = "64 uA." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( REFCHRG_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 21 ) ) | ( ( ( value as u32 ) & 0x07 ) << 21 ) ; self . w } } # [ doc = "TSI analog modes setup and status bits.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODE_A { # [ doc = "0: Set TSI in capacitive sensing(non-noise detection) mode." ] _0000 , # [ doc = "4: Set TSI analog to work in single threshold noise detection mode and the frequency limitation circuit is disabled." ] _0100 , # [ doc = "8: Set TSI analog to work in single threshold noise detection mode and the frequency limitation circuit is enabled to work in higher frequencies operations." ] _1000 , # [ doc = "12: Set TSI analog to work in automatic noise detection mode." ] _1100 } impl From < MODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : MODE_A ) -> Self { match variant { MODE_A :: _0000 => 0 , MODE_A :: _0100 => 4 , MODE_A :: _1000 => 8 , MODE_A :: _1100 => 12 } } } # [ doc = "Reader of field `MODE`" ] pub type MODE_R = crate :: R < u8 , MODE_A > ; impl MODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , MODE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( MODE_A :: _0000 ) , 4 => Val ( MODE_A :: _0100 ) , 8 => Val ( MODE_A :: _1000 ) , 12 => Val ( MODE_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == MODE_A :: _0000 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == MODE_A :: _0100 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == MODE_A :: _1000 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == MODE_A :: _1100 } } # [ doc = "Write proxy for field `MODE`" ] pub struct MODE_W < 'a > { w : & 'a mut W , } impl < 'a > MODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MODE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Set TSI in capacitive sensing(non-noise detection) mode." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _0000 ) } # [ doc = "Set TSI analog to work in single threshold noise detection mode and the frequency limitation circuit is disabled." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _0100 ) } # [ doc = "Set TSI analog to work in single threshold noise detection mode and the frequency limitation circuit is enabled to work in higher frequencies operations." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _1000 ) } # [ doc = "Set TSI analog to work in automatic noise detection mode." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _1100 ) } # [ 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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } # [ doc = "End-of-scan or Out-of-Range Interrupt Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ESOR_A { # [ doc = "0: Out-of-range interrupt is allowed." ] _0 , # [ doc = "1: End-of-scan interrupt is allowed." ] _1 } impl From < ESOR_A > for bool { # [ inline ( always ) ] fn from ( variant : ESOR_A ) -> Self { match variant { ESOR_A :: _0 => false , ESOR_A :: _1 => true } } } # [ doc = "Reader of field `ESOR`" ] pub type ESOR_R = crate :: R < bool , ESOR_A > ; impl ESOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ESOR_A { match self . bits { false => ESOR_A :: _0 , true => ESOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ESOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ESOR_A :: _1 } } # [ doc = "Write proxy for field `ESOR`" ] pub struct ESOR_W < 'a > { w : & 'a mut W , } impl < 'a > ESOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ESOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Out-of-range interrupt is allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ESOR_A :: _0 ) } # [ doc = "End-of-scan interrupt is allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ESOR_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Reader of field `OUTRGF`" ] pub type OUTRGF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `OUTRGF`" ] pub struct OUTRGF_W < 'a > { w : & 'a mut W , } impl < 'a > OUTRGF_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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - End-of-Scan DMA Transfer Request Enable Only" ] # [ inline ( always ) ] pub fn eosdmeo ( & self ) -> EOSDMEO_R { EOSDMEO_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - CURSW" ] # [ inline ( always ) ] pub fn cursw ( & self ) -> CURSW_R { CURSW_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - End of Scan Flag" ] # [ inline ( always ) ] pub fn eosf ( & self ) -> EOSF_R { EOSF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Scan In Progress Status" ] # [ inline ( always ) ] pub fn scnip ( & self ) -> SCNIP_R { SCNIP_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Scan Trigger Mode" ] # [ inline ( always ) ] pub fn stm ( & self ) -> STM_R { STM_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - TSI STOP Enable" ] # [ inline ( always ) ] pub fn stpe ( & self ) -> STPE_R { STPE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Touch Sensing Input Interrupt Enable" ] # [ inline ( always ) ] pub fn tsiien ( & self ) -> TSIIEN_R { TSIIEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Touch Sensing Input Module Enable" ] # [ inline ( always ) ] pub fn tsien ( & self ) -> TSIEN_R { TSIEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:12 - NSCN" ] # [ inline ( always ) ] pub fn nscn ( & self ) -> NSCN_R { NSCN_R :: new ( ( ( self . bits >> 8 ) & 0x1f ) as u8 ) } # [ doc = "Bits 13:15 - PS" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( ( self . bits >> 13 ) & 0x07 ) as u8 ) } # [ doc = "Bits 16:18 - EXTCHRG" ] # [ inline ( always ) ] pub fn extchrg ( & self ) -> EXTCHRG_R { EXTCHRG_R :: new ( ( ( self . bits >> 16 ) & 0x07 ) as u8 ) } # [ doc = "Bits 19:20 - DVOLT" ] # [ inline ( always ) ] pub fn dvolt ( & self ) -> DVOLT_R { DVOLT_R :: new ( ( ( self . bits >> 19 ) & 0x03 ) as u8 ) } # [ doc = "Bits 21:23 - REFCHRG" ] # [ inline ( always ) ] pub fn refchrg ( & self ) -> REFCHRG_R { REFCHRG_R :: new ( ( ( self . bits >> 21 ) & 0x07 ) as u8 ) } # [ doc = "Bits 24:27 - TSI analog modes setup and status bits." ] # [ inline ( always ) ] pub fn mode ( & self ) -> MODE_R { MODE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bit 28 - End-of-scan or Out-of-Range Interrupt Selection" ] # [ inline ( always ) ] pub fn esor ( & self ) -> ESOR_R { ESOR_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Out of Range Flag." ] # [ inline ( always ) ] pub fn outrgf ( & self ) -> OUTRGF_R { OUTRGF_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - End-of-Scan DMA Transfer Request Enable Only" ] # [ inline ( always ) ] pub fn eosdmeo ( & mut self ) -> EOSDMEO_W { EOSDMEO_W { w : self } } # [ doc = "Bit 1 - CURSW" ] # [ inline ( always ) ] pub fn cursw ( & mut self ) -> CURSW_W { CURSW_W { w : self } } # [ doc = "Bit 2 - End of Scan Flag" ] # [ inline ( always ) ] pub fn eosf ( & mut self ) -> EOSF_W { EOSF_W { w : self } } # [ doc = "Bit 4 - Scan Trigger Mode" ] # [ inline ( always ) ] pub fn stm ( & mut self ) -> STM_W { STM_W { w : self } } # [ doc = "Bit 5 - TSI STOP Enable" ] # [ inline ( always ) ] pub fn stpe ( & mut self ) -> STPE_W { STPE_W { w : self } } # [ doc = "Bit 6 - Touch Sensing Input Interrupt Enable" ] # [ inline ( always ) ] pub fn tsiien ( & mut self ) -> TSIIEN_W { TSIIEN_W { w : self } } # [ doc = "Bit 7 - Touch Sensing Input Module Enable" ] # [ inline ( always ) ] pub fn tsien ( & mut self ) -> TSIEN_W { TSIEN_W { w : self } } # [ doc = "Bits 8:12 - NSCN" ] # [ inline ( always ) ] pub fn nscn ( & mut self ) -> NSCN_W { NSCN_W { w : self } } # [ doc = "Bits 13:15 - PS" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bits 16:18 - EXTCHRG" ] # [ inline ( always ) ] pub fn extchrg ( & mut self ) -> EXTCHRG_W { EXTCHRG_W { w : self } } # [ doc = "Bits 19:20 - DVOLT" ] # [ inline ( always ) ] pub fn dvolt ( & mut self ) -> DVOLT_W { DVOLT_W { w : self } } # [ doc = "Bits 21:23 - REFCHRG" ] # [ inline ( always ) ] pub fn refchrg ( & mut self ) -> REFCHRG_W { REFCHRG_W { w : self } } # [ doc = "Bits 24:27 - TSI analog modes setup and status bits." ] # [ inline ( always ) ] pub fn mode ( & mut self ) -> MODE_W { MODE_W { w : self } } # [ doc = "Bit 28 - End-of-scan or Out-of-Range Interrupt Selection" ] # [ inline ( always ) ] pub fn esor ( & mut self ) -> ESOR_W { ESOR_W { w : self } } # [ doc = "Bit 31 - Out of Range Flag." ] # [ inline ( always ) ] pub fn outrgf ( & mut self ) -> OUTRGF_W { OUTRGF_W { w : self } } } } # [ doc = "TSI DATA Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data](data) module" ] pub type DATA = crate :: Reg < u32 , _DATA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATA ; # [ doc = "`read()` method returns [data::R](data::R) reader structure" ] impl crate :: Readable for DATA { } # [ doc = "`write(|w| ..)` method takes [data::W](data::W) writer structure" ] impl crate :: Writable for DATA { } # [ doc = "TSI DATA Register" ] pub mod data { # [ doc = "Reader of register DATA" ] pub type R = crate :: R < u32 , super :: DATA > ; # [ doc = "Writer for register DATA" ] pub type W = crate :: W < u32 , super :: DATA > ; # [ doc = "Register DATA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TSICNT`" ] pub type TSICNT_R = crate :: R < u16 , u16 > ; # [ doc = "Software Trigger Start\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWTS_AW { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Start a scan to determine which channel is specified by TSI_DATA\\[TSICH\\]." ] _1 } impl From < SWTS_AW > for bool { # [ inline ( always ) ] fn from ( variant : SWTS_AW ) -> Self { match variant { SWTS_AW :: _0 => false , SWTS_AW :: _1 => true } } } # [ doc = "Write proxy for field `SWTS`" ] pub struct SWTS_W < 'a > { w : & 'a mut W , } impl < 'a > SWTS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWTS_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWTS_AW :: _0 ) } # [ doc = "Start a scan to determine which channel is specified by TSI_DATA\\[TSICH\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWTS_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "DMA Transfer Enabled\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: Interrupt is selected when the interrupt enable bit is set and the corresponding TSI events assert." ] _0 , # [ doc = "1: DMA transfer request is selected when the interrupt enable bit is set and the corresponding TSI events assert." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is selected when the interrupt enable bit is set and the corresponding TSI events assert." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA transfer request is selected when the interrupt enable bit is set and the corresponding TSI events assert." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "TSICH\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSICH_A { # [ doc = "0: Channel 0." ] _0000 , # [ doc = "1: Channel 1." ] _0001 , # [ doc = "2: Channel 2." ] _0010 , # [ doc = "3: Channel 3." ] _0011 , # [ doc = "4: Channel 4." ] _0100 , # [ doc = "5: Channel 5." ] _0101 , # [ doc = "6: Channel 6." ] _0110 , # [ doc = "7: Channel 7." ] _0111 , # [ doc = "8: Channel 8." ] _1000 , # [ doc = "9: Channel 9." ] _1001 , # [ doc = "10: Channel 10." ] _1010 , # [ doc = "11: Channel 11." ] _1011 , # [ doc = "12: Channel 12." ] _1100 , # [ doc = "13: Channel 13." ] _1101 , # [ doc = "14: Channel 14." ] _1110 , # [ doc = "15: Channel 15." ] _1111 } impl From < TSICH_A > for u8 { # [ inline ( always ) ] fn from ( variant : TSICH_A ) -> Self { match variant { TSICH_A :: _0000 => 0 , TSICH_A :: _0001 => 1 , TSICH_A :: _0010 => 2 , TSICH_A :: _0011 => 3 , TSICH_A :: _0100 => 4 , TSICH_A :: _0101 => 5 , TSICH_A :: _0110 => 6 , TSICH_A :: _0111 => 7 , TSICH_A :: _1000 => 8 , TSICH_A :: _1001 => 9 , TSICH_A :: _1010 => 10 , TSICH_A :: _1011 => 11 , TSICH_A :: _1100 => 12 , TSICH_A :: _1101 => 13 , TSICH_A :: _1110 => 14 , TSICH_A :: _1111 => 15 } } } # [ doc = "Reader of field `TSICH`" ] pub type TSICH_R = crate :: R < u8 , TSICH_A > ; impl TSICH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSICH_A { match self . bits { 0 => TSICH_A :: _0000 , 1 => TSICH_A :: _0001 , 2 => TSICH_A :: _0010 , 3 => TSICH_A :: _0011 , 4 => TSICH_A :: _0100 , 5 => TSICH_A :: _0101 , 6 => TSICH_A :: _0110 , 7 => TSICH_A :: _0111 , 8 => TSICH_A :: _1000 , 9 => TSICH_A :: _1001 , 10 => TSICH_A :: _1010 , 11 => TSICH_A :: _1011 , 12 => TSICH_A :: _1100 , 13 => TSICH_A :: _1101 , 14 => TSICH_A :: _1110 , 15 => TSICH_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == TSICH_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == TSICH_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == TSICH_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == TSICH_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == TSICH_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == TSICH_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == TSICH_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == TSICH_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == TSICH_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == TSICH_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == TSICH_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == TSICH_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == TSICH_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == TSICH_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == TSICH_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == TSICH_A :: _1111 } } # [ doc = "Write proxy for field `TSICH`" ] pub struct TSICH_W < 'a > { w : & 'a mut W , } impl < 'a > TSICH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSICH_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Channel 0." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _0000 ) } # [ doc = "Channel 1." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _0001 ) } # [ doc = "Channel 2." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _0010 ) } # [ doc = "Channel 3." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _0011 ) } # [ doc = "Channel 4." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _0100 ) } # [ doc = "Channel 5." ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _0101 ) } # [ doc = "Channel 6." ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _0110 ) } # [ doc = "Channel 7." ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _0111 ) } # [ doc = "Channel 8." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _1000 ) } # [ doc = "Channel 9." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _1001 ) } # [ doc = "Channel 10." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _1010 ) } # [ doc = "Channel 11." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _1011 ) } # [ doc = "Channel 12." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _1100 ) } # [ doc = "Channel 13." ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _1101 ) } # [ doc = "Channel 14." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _1110 ) } # [ doc = "Channel 15." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( TSICH_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - TSI Conversion Counter Value" ] # [ inline ( always ) ] pub fn tsicnt ( & self ) -> TSICNT_R { TSICNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bit 23 - DMA Transfer Enabled" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:31 - TSICH" ] # [ inline ( always ) ] pub fn tsich ( & self ) -> TSICH_R { TSICH_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 22 - Software Trigger Start" ] # [ inline ( always ) ] pub fn swts ( & mut self ) -> SWTS_W { SWTS_W { w : self } } # [ doc = "Bit 23 - DMA Transfer Enabled" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bits 28:31 - TSICH" ] # [ inline ( always ) ] pub fn tsich ( & mut self ) -> TSICH_W { TSICH_W { w : self } } } } # [ doc = "TSI Threshold Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tshd](tshd) module" ] pub type TSHD = crate :: Reg < u32 , _TSHD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TSHD ; # [ doc = "`read()` method returns [tshd::R](tshd::R) reader structure" ] impl crate :: Readable for TSHD { } # [ doc = "`write(|w| ..)` method takes [tshd::W](tshd::W) writer structure" ] impl crate :: Writable for TSHD { } # [ doc = "TSI Threshold Register" ] pub mod tshd { # [ doc = "Reader of register TSHD" ] pub type R = crate :: R < u32 , super :: TSHD > ; # [ doc = "Writer for register TSHD" ] pub type W = crate :: W < u32 , super :: TSHD > ; # [ doc = "Register TSHD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TSHD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `THRESL`" ] pub type THRESL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `THRESL`" ] pub struct THRESL_W < 'a > { w : & 'a mut W , } impl < 'a > THRESL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `THRESH`" ] pub type THRESH_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `THRESH`" ] pub struct THRESH_W < 'a > { w : & 'a mut W , } impl < 'a > THRESH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - TSI Wakeup Channel Low-threshold" ] # [ inline ( always ) ] pub fn thresl ( & self ) -> THRESL_R { THRESL_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - TSI Wakeup Channel High-threshold" ] # [ inline ( always ) ] pub fn thresh ( & self ) -> THRESH_R { THRESH_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - TSI Wakeup Channel Low-threshold" ] # [ inline ( always ) ] pub fn thresl ( & mut self ) -> THRESL_W { THRESL_W { w : self } } # [ doc = "Bits 16:31 - TSI Wakeup Channel High-threshold" ] # [ inline ( always ) ] pub fn thresh ( & mut self ) -> THRESH_W { THRESH_W { w : self } } } } } # [ doc = "System Integration Module" ] pub struct SIM { _marker : PhantomData < * const ( ) > } unsafe impl Send for SIM { } impl SIM { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const sim :: RegisterBlock { 0x4004_7000 as * const _ } } impl Deref for SIM { type Target = sim :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SIM :: ptr ( ) } } } # [ doc = "System Integration Module" ] pub mod sim { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - System Options Register 1" ] pub sopt1 : SOPT1 , # [ doc = "0x04 - SOPT1 Configuration Register" ] pub sopt1cfg : SOPT1CFG , # [ doc = "0x08 - USB PHY Control Register" ] pub usbphyctl : USBPHYCTL , _reserved3 : [ u8 ; 4088usize ] , # [ doc = "0x1004 - System Options Register 2" ] pub sopt2 : SOPT2 , _reserved4 : [ u8 ; 4usize ] , # [ doc = "0x100c - System Options Register 4" ] pub sopt4 : SOPT4 , # [ doc = "0x1010 - System Options Register 5" ] pub sopt5 : SOPT5 , _reserved6 : [ u8 ; 4usize ] , # [ doc = "0x1018 - System Options Register 7" ] pub sopt7 : SOPT7 , # [ doc = "0x101c - System Options Register 8" ] pub sopt8 : SOPT8 , # [ doc = "0x1020 - System Options Register 9" ] pub sopt9 : SOPT9 , # [ doc = "0x1024 - System Device Identification Register" ] pub sdid : SDID , # [ doc = "0x1028 - System Clock Gating Control Register 1" ] pub scgc1 : SCGC1 , # [ doc = "0x102c - System Clock Gating Control Register 2" ] pub scgc2 : SCGC2 , # [ doc = "0x1030 - System Clock Gating Control Register 3" ] pub scgc3 : SCGC3 , # [ doc = "0x1034 - System Clock Gating Control Register 4" ] pub scgc4 : SCGC4 , # [ doc = "0x1038 - System Clock Gating Control Register 5" ] pub scgc5 : SCGC5 , # [ doc = "0x103c - System Clock Gating Control Register 6" ] pub scgc6 : SCGC6 , # [ doc = "0x1040 - System Clock Gating Control Register 7" ] pub scgc7 : SCGC7 , # [ doc = "0x1044 - System Clock Divider Register 1" ] pub clkdiv1 : CLKDIV1 , # [ doc = "0x1048 - System Clock Divider Register 2" ] pub clkdiv2 : CLKDIV2 , # [ doc = "0x104c - Flash Configuration Register 1" ] pub fcfg1 : FCFG1 , # [ doc = "0x1050 - Flash Configuration Register 2" ] pub fcfg2 : FCFG2 , # [ doc = "0x1054 - Unique Identification Register High" ] pub uidh : UIDH , # [ doc = "0x1058 - Unique Identification Register Mid-High" ] pub uidmh : UIDMH , # [ doc = "0x105c - Unique Identification Register Mid Low" ] pub uidml : UIDML , # [ doc = "0x1060 - Unique Identification Register Low" ] pub uidl : UIDL , # [ doc = "0x1064 - System Clock Divider Register 3" ] pub clkdiv3 : CLKDIV3 , # [ doc = "0x1068 - System Clock Divider Register 4" ] pub clkdiv4 : CLKDIV4 , } # [ doc = "System Options Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sopt1](sopt1) module" ] pub type SOPT1 = crate :: Reg < u32 , _SOPT1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOPT1 ; # [ doc = "`read()` method returns [sopt1::R](sopt1::R) reader structure" ] impl crate :: Readable for SOPT1 { } # [ doc = "`write(|w| ..)` method takes [sopt1::W](sopt1::W) writer structure" ] impl crate :: Writable for SOPT1 { } # [ doc = "System Options Register 1" ] pub mod sopt1 { # [ doc = "Reader of register SOPT1" ] pub type R = crate :: R < u32 , super :: SOPT1 > ; # [ doc = "Writer for register SOPT1" ] pub type W = crate :: W < u32 , super :: SOPT1 > ; # [ doc = "Register SOPT1 `reset()`'s with value 0x8000_0000" ] impl crate :: ResetValue for super :: SOPT1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x8000_0000 } } # [ doc = "RAM size\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAMSIZE_A { # [ doc = "1: 8 KB" ] _0001 , # [ doc = "3: 16 KB" ] _0011 , # [ doc = "4: 24 KB" ] _0100 , # [ doc = "5: 32 KB" ] _0101 , # [ doc = "6: 48 KB" ] _0110 , # [ doc = "7: 64 KB" ] _0111 , # [ doc = "8: 96 KB" ] _1000 , # [ doc = "9: 128 KB" ] _1001 , # [ doc = "11: 256 KB" ] _1011 } impl From < RAMSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : RAMSIZE_A ) -> Self { match variant { RAMSIZE_A :: _0001 => 1 , RAMSIZE_A :: _0011 => 3 , RAMSIZE_A :: _0100 => 4 , RAMSIZE_A :: _0101 => 5 , RAMSIZE_A :: _0110 => 6 , RAMSIZE_A :: _0111 => 7 , RAMSIZE_A :: _1000 => 8 , RAMSIZE_A :: _1001 => 9 , RAMSIZE_A :: _1011 => 11 } } } # [ doc = "Reader of field `RAMSIZE`" ] pub type RAMSIZE_R = crate :: R < u8 , RAMSIZE_A > ; impl RAMSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RAMSIZE_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( RAMSIZE_A :: _0001 ) , 3 => Val ( RAMSIZE_A :: _0011 ) , 4 => Val ( RAMSIZE_A :: _0100 ) , 5 => Val ( RAMSIZE_A :: _0101 ) , 6 => Val ( RAMSIZE_A :: _0110 ) , 7 => Val ( RAMSIZE_A :: _0111 ) , 8 => Val ( RAMSIZE_A :: _1000 ) , 9 => Val ( RAMSIZE_A :: _1001 ) , 11 => Val ( RAMSIZE_A :: _1011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == RAMSIZE_A :: _0001 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == RAMSIZE_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == RAMSIZE_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == RAMSIZE_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == RAMSIZE_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == RAMSIZE_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == RAMSIZE_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == RAMSIZE_A :: _1001 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == RAMSIZE_A :: _1011 } } # [ doc = "32K oscillator clock select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OSC32KSEL_A { # [ doc = "0: System oscillator (OSC32KCLK)" ] _00 , # [ doc = "2: RTC 32.768kHz oscillator" ] _10 , # [ doc = "3: LPO 1 kHz" ] _11 } impl From < OSC32KSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : OSC32KSEL_A ) -> Self { match variant { OSC32KSEL_A :: _00 => 0 , OSC32KSEL_A :: _10 => 2 , OSC32KSEL_A :: _11 => 3 } } } # [ doc = "Reader of field `OSC32KSEL`" ] pub type OSC32KSEL_R = crate :: R < u8 , OSC32KSEL_A > ; impl OSC32KSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , OSC32KSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( OSC32KSEL_A :: _00 ) , 2 => Val ( OSC32KSEL_A :: _10 ) , 3 => Val ( OSC32KSEL_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == OSC32KSEL_A :: _00 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == OSC32KSEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == OSC32KSEL_A :: _11 } } # [ doc = "Write proxy for field `OSC32KSEL`" ] pub struct OSC32KSEL_W < 'a > { w : & 'a mut W , } impl < 'a > OSC32KSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OSC32KSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "System oscillator (OSC32KCLK)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( OSC32KSEL_A :: _00 ) } # [ doc = "RTC 32.768kHz oscillator" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( OSC32KSEL_A :: _10 ) } # [ doc = "LPO 1 kHz" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( OSC32KSEL_A :: _11 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "USB voltage regulator in standby mode during VLPR and VLPW modes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBVSTBY_A { # [ doc = "0: USB voltage regulator not in standby during VLPR and VLPW modes." ] _0 , # [ doc = "1: USB voltage regulator in standby during VLPR and VLPW modes." ] _1 } impl From < USBVSTBY_A > for bool { # [ inline ( always ) ] fn from ( variant : USBVSTBY_A ) -> Self { match variant { USBVSTBY_A :: _0 => false , USBVSTBY_A :: _1 => true } } } # [ doc = "Reader of field `USBVSTBY`" ] pub type USBVSTBY_R = crate :: R < bool , USBVSTBY_A > ; impl USBVSTBY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBVSTBY_A { match self . bits { false => USBVSTBY_A :: _0 , true => USBVSTBY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBVSTBY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBVSTBY_A :: _1 } } # [ doc = "Write proxy for field `USBVSTBY`" ] pub struct USBVSTBY_W < 'a > { w : & 'a mut W , } impl < 'a > USBVSTBY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBVSTBY_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "USB voltage regulator not in standby during VLPR and VLPW modes." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBVSTBY_A :: _0 ) } # [ doc = "USB voltage regulator in standby during VLPR and VLPW modes." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBVSTBY_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "USB voltage regulator in standby mode during Stop, VLPS, LLS and VLLS modes.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBSSTBY_A { # [ doc = "0: USB voltage regulator not in standby during Stop, VLPS, LLS and VLLS modes." ] _0 , # [ doc = "1: USB voltage regulator in standby during Stop, VLPS, LLS and VLLS modes." ] _1 } impl From < USBSSTBY_A > for bool { # [ inline ( always ) ] fn from ( variant : USBSSTBY_A ) -> Self { match variant { USBSSTBY_A :: _0 => false , USBSSTBY_A :: _1 => true } } } # [ doc = "Reader of field `USBSSTBY`" ] pub type USBSSTBY_R = crate :: R < bool , USBSSTBY_A > ; impl USBSSTBY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBSSTBY_A { match self . bits { false => USBSSTBY_A :: _0 , true => USBSSTBY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBSSTBY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBSSTBY_A :: _1 } } # [ doc = "Write proxy for field `USBSSTBY`" ] pub struct USBSSTBY_W < 'a > { w : & 'a mut W , } impl < 'a > USBSSTBY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBSSTBY_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "USB voltage regulator not in standby during Stop, VLPS, LLS and VLLS modes." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBSSTBY_A :: _0 ) } # [ doc = "USB voltage regulator in standby during Stop, VLPS, LLS and VLLS modes." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBSSTBY_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "USB voltage regulator enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBREGEN_A { # [ doc = "0: USB voltage regulator is disabled." ] _0 , # [ doc = "1: USB voltage regulator is enabled." ] _1 } impl From < USBREGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : USBREGEN_A ) -> Self { match variant { USBREGEN_A :: _0 => false , USBREGEN_A :: _1 => true } } } # [ doc = "Reader of field `USBREGEN`" ] pub type USBREGEN_R = crate :: R < bool , USBREGEN_A > ; impl USBREGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBREGEN_A { match self . bits { false => USBREGEN_A :: _0 , true => USBREGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBREGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBREGEN_A :: _1 } } # [ doc = "Write proxy for field `USBREGEN`" ] pub struct USBREGEN_W < 'a > { w : & 'a mut W , } impl < 'a > USBREGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBREGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "USB voltage regulator is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBREGEN_A :: _0 ) } # [ doc = "USB voltage regulator is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBREGEN_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 12:15 - RAM size" ] # [ inline ( always ) ] pub fn ramsize ( & self ) -> RAMSIZE_R { RAMSIZE_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bits 18:19 - 32K oscillator clock select" ] # [ inline ( always ) ] pub fn osc32ksel ( & self ) -> OSC32KSEL_R { OSC32KSEL_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bit 29 - USB voltage regulator in standby mode during VLPR and VLPW modes" ] # [ inline ( always ) ] pub fn usbvstby ( & self ) -> USBVSTBY_R { USBVSTBY_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - USB voltage regulator in standby mode during Stop, VLPS, LLS and VLLS modes." ] # [ inline ( always ) ] pub fn usbsstby ( & self ) -> USBSSTBY_R { USBSSTBY_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - USB voltage regulator enable" ] # [ inline ( always ) ] pub fn usbregen ( & self ) -> USBREGEN_R { USBREGEN_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 18:19 - 32K oscillator clock select" ] # [ inline ( always ) ] pub fn osc32ksel ( & mut self ) -> OSC32KSEL_W { OSC32KSEL_W { w : self } } # [ doc = "Bit 29 - USB voltage regulator in standby mode during VLPR and VLPW modes" ] # [ inline ( always ) ] pub fn usbvstby ( & mut self ) -> USBVSTBY_W { USBVSTBY_W { w : self } } # [ doc = "Bit 30 - USB voltage regulator in standby mode during Stop, VLPS, LLS and VLLS modes." ] # [ inline ( always ) ] pub fn usbsstby ( & mut self ) -> USBSSTBY_W { USBSSTBY_W { w : self } } # [ doc = "Bit 31 - USB voltage regulator enable" ] # [ inline ( always ) ] pub fn usbregen ( & mut self ) -> USBREGEN_W { USBREGEN_W { w : self } } } } # [ doc = "SOPT1 Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sopt1cfg](sopt1cfg) module" ] pub type SOPT1CFG = crate :: Reg < u32 , _SOPT1CFG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOPT1CFG ; # [ doc = "`read()` method returns [sopt1cfg::R](sopt1cfg::R) reader structure" ] impl crate :: Readable for SOPT1CFG { } # [ doc = "`write(|w| ..)` method takes [sopt1cfg::W](sopt1cfg::W) writer structure" ] impl crate :: Writable for SOPT1CFG { } # [ doc = "SOPT1 Configuration Register" ] pub mod sopt1cfg { # [ doc = "Reader of register SOPT1CFG" ] pub type R = crate :: R < u32 , super :: SOPT1CFG > ; # [ doc = "Writer for register SOPT1CFG" ] pub type W = crate :: W < u32 , super :: SOPT1CFG > ; # [ doc = "Register SOPT1CFG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SOPT1CFG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "USB voltage regulator enable write enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum URWE_A { # [ doc = "0: SOPT1 USBREGEN cannot be written." ] _0 , # [ doc = "1: SOPT1 USBREGEN can be written." ] _1 } impl From < URWE_A > for bool { # [ inline ( always ) ] fn from ( variant : URWE_A ) -> Self { match variant { URWE_A :: _0 => false , URWE_A :: _1 => true } } } # [ doc = "Reader of field `URWE`" ] pub type URWE_R = crate :: R < bool , URWE_A > ; impl URWE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> URWE_A { match self . bits { false => URWE_A :: _0 , true => URWE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == URWE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == URWE_A :: _1 } } # [ doc = "Write proxy for field `URWE`" ] pub struct URWE_W < 'a > { w : & 'a mut W , } impl < 'a > URWE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : URWE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SOPT1 USBREGEN cannot be written." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( URWE_A :: _0 ) } # [ doc = "SOPT1 USBREGEN can be written." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( URWE_A :: _1 ) } # [ 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 = "USB voltage regulator VLP standby write enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UVSWE_A { # [ doc = "0: SOPT1 USBVSTBY cannot be written." ] _0 , # [ doc = "1: SOPT1 USBVSTBY can be written." ] _1 } impl From < UVSWE_A > for bool { # [ inline ( always ) ] fn from ( variant : UVSWE_A ) -> Self { match variant { UVSWE_A :: _0 => false , UVSWE_A :: _1 => true } } } # [ doc = "Reader of field `UVSWE`" ] pub type UVSWE_R = crate :: R < bool , UVSWE_A > ; impl UVSWE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UVSWE_A { match self . bits { false => UVSWE_A :: _0 , true => UVSWE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UVSWE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UVSWE_A :: _1 } } # [ doc = "Write proxy for field `UVSWE`" ] pub struct UVSWE_W < 'a > { w : & 'a mut W , } impl < 'a > UVSWE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UVSWE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SOPT1 USBVSTBY cannot be written." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UVSWE_A :: _0 ) } # [ doc = "SOPT1 USBVSTBY can be written." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UVSWE_A :: _1 ) } # [ 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 = "USB voltage regulator stop standby write enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USSWE_A { # [ doc = "0: SOPT1 USBSSTBY cannot be written." ] _0 , # [ doc = "1: SOPT1 USBSSTBY can be written." ] _1 } impl From < USSWE_A > for bool { # [ inline ( always ) ] fn from ( variant : USSWE_A ) -> Self { match variant { USSWE_A :: _0 => false , USSWE_A :: _1 => true } } } # [ doc = "Reader of field `USSWE`" ] pub type USSWE_R = crate :: R < bool , USSWE_A > ; impl USSWE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USSWE_A { match self . bits { false => USSWE_A :: _0 , true => USSWE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USSWE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USSWE_A :: _1 } } # [ doc = "Write proxy for field `USSWE`" ] pub struct USSWE_W < 'a > { w : & 'a mut W , } impl < 'a > USSWE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USSWE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SOPT1 USBSSTBY cannot be written." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USSWE_A :: _0 ) } # [ doc = "SOPT1 USBSSTBY can be written." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USSWE_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 24 - USB voltage regulator enable write enable" ] # [ inline ( always ) ] pub fn urwe ( & self ) -> URWE_R { URWE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - USB voltage regulator VLP standby write enable" ] # [ inline ( always ) ] pub fn uvswe ( & self ) -> UVSWE_R { UVSWE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - USB voltage regulator stop standby write enable" ] # [ inline ( always ) ] pub fn usswe ( & self ) -> USSWE_R { USSWE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 24 - USB voltage regulator enable write enable" ] # [ inline ( always ) ] pub fn urwe ( & mut self ) -> URWE_W { URWE_W { w : self } } # [ doc = "Bit 25 - USB voltage regulator VLP standby write enable" ] # [ inline ( always ) ] pub fn uvswe ( & mut self ) -> UVSWE_W { UVSWE_W { w : self } } # [ doc = "Bit 26 - USB voltage regulator stop standby write enable" ] # [ inline ( always ) ] pub fn usswe ( & mut self ) -> USSWE_W { USSWE_W { w : self } } } } # [ doc = "USB PHY Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbphyctl](usbphyctl) module" ] pub type USBPHYCTL = crate :: Reg < u32 , _USBPHYCTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBPHYCTL ; # [ doc = "`read()` method returns [usbphyctl::R](usbphyctl::R) reader structure" ] impl crate :: Readable for USBPHYCTL { } # [ doc = "`write(|w| ..)` method takes [usbphyctl::W](usbphyctl::W) writer structure" ] impl crate :: Writable for USBPHYCTL { } # [ doc = "USB PHY Control Register" ] pub mod usbphyctl { # [ doc = "Reader of register USBPHYCTL" ] pub type R = crate :: R < u32 , super :: USBPHYCTL > ; # [ doc = "Writer for register USBPHYCTL" ] pub type W = crate :: W < u32 , super :: USBPHYCTL > ; # [ doc = "Register USBPHYCTL `reset()`'s with value 0x0060_0000" ] impl crate :: ResetValue for super :: USBPHYCTL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0060_0000 } } # [ doc = "Selects the default input voltage source to the USB Regulator in case both VREG_IN0 and VREG_IN1 are powered\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBVREGSEL_A { # [ doc = "0: VREG_IN0 will be selected if both regulator inputs are powered" ] _0 , # [ doc = "1: VREG_IN1 will be selected if both regulator inputs are powered" ] _1 } impl From < USBVREGSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : USBVREGSEL_A ) -> Self { match variant { USBVREGSEL_A :: _0 => false , USBVREGSEL_A :: _1 => true } } } # [ doc = "Reader of field `USBVREGSEL`" ] pub type USBVREGSEL_R = crate :: R < bool , USBVREGSEL_A > ; impl USBVREGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBVREGSEL_A { match self . bits { false => USBVREGSEL_A :: _0 , true => USBVREGSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBVREGSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBVREGSEL_A :: _1 } } # [ doc = "Write proxy for field `USBVREGSEL`" ] pub struct USBVREGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > USBVREGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBVREGSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "VREG_IN0 will be selected if both regulator inputs are powered" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBVREGSEL_A :: _0 ) } # [ doc = "VREG_IN1 will be selected if both regulator inputs are powered" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBVREGSEL_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Enables the pulldown on the output of the USB Regulator.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBVREGPD_A { # [ doc = "0: Regulator output pulldown resistor is not enabled" ] _0 , # [ doc = "1: Regulator output pulldown resistor is enabled" ] _1 } impl From < USBVREGPD_A > for bool { # [ inline ( always ) ] fn from ( variant : USBVREGPD_A ) -> Self { match variant { USBVREGPD_A :: _0 => false , USBVREGPD_A :: _1 => true } } } # [ doc = "Reader of field `USBVREGPD`" ] pub type USBVREGPD_R = crate :: R < bool , USBVREGPD_A > ; impl USBVREGPD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBVREGPD_A { match self . bits { false => USBVREGPD_A :: _0 , true => USBVREGPD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBVREGPD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBVREGPD_A :: _1 } } # [ doc = "Write proxy for field `USBVREGPD`" ] pub struct USBVREGPD_W < 'a > { w : & 'a mut W , } impl < 'a > USBVREGPD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBVREGPD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Regulator output pulldown resistor is not enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBVREGPD_A :: _0 ) } # [ doc = "Regulator output pulldown resistor is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBVREGPD_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "USB 3.3V Output Target\n\nValue on reset: 6" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USB3VOUTTRG_A { # [ doc = "0: 2.733V" ] _000 , # [ doc = "1: 3.020V" ] _001 , # [ doc = "2: 3.074V" ] _010 , # [ doc = "3: 3.130V" ] _011 , # [ doc = "4: 3.188V" ] _100 , # [ doc = "5: 3.248V" ] _101 , # [ doc = "6: 3.310V (default)" ] _110 , # [ doc = "7: 3.662V (For Freescale use only, not for customer use)" ] _111 } impl From < USB3VOUTTRG_A > for u8 { # [ inline ( always ) ] fn from ( variant : USB3VOUTTRG_A ) -> Self { match variant { USB3VOUTTRG_A :: _000 => 0 , USB3VOUTTRG_A :: _001 => 1 , USB3VOUTTRG_A :: _010 => 2 , USB3VOUTTRG_A :: _011 => 3 , USB3VOUTTRG_A :: _100 => 4 , USB3VOUTTRG_A :: _101 => 5 , USB3VOUTTRG_A :: _110 => 6 , USB3VOUTTRG_A :: _111 => 7 } } } # [ doc = "Reader of field `USB3VOUTTRG`" ] pub type USB3VOUTTRG_R = crate :: R < u8 , USB3VOUTTRG_A > ; impl USB3VOUTTRG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USB3VOUTTRG_A { match self . bits { 0 => USB3VOUTTRG_A :: _000 , 1 => USB3VOUTTRG_A :: _001 , 2 => USB3VOUTTRG_A :: _010 , 3 => USB3VOUTTRG_A :: _011 , 4 => USB3VOUTTRG_A :: _100 , 5 => USB3VOUTTRG_A :: _101 , 6 => USB3VOUTTRG_A :: _110 , 7 => USB3VOUTTRG_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == USB3VOUTTRG_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == USB3VOUTTRG_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == USB3VOUTTRG_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == USB3VOUTTRG_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == USB3VOUTTRG_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == USB3VOUTTRG_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == USB3VOUTTRG_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == USB3VOUTTRG_A :: _111 } } # [ doc = "Write proxy for field `USB3VOUTTRG`" ] pub struct USB3VOUTTRG_W < 'a > { w : & 'a mut W , } impl < 'a > USB3VOUTTRG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USB3VOUTTRG_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "2.733V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( USB3VOUTTRG_A :: _000 ) } # [ doc = "3.020V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( USB3VOUTTRG_A :: _001 ) } # [ doc = "3.074V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( USB3VOUTTRG_A :: _010 ) } # [ doc = "3.130V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( USB3VOUTTRG_A :: _011 ) } # [ doc = "3.188V" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( USB3VOUTTRG_A :: _100 ) } # [ doc = "3.248V" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( USB3VOUTTRG_A :: _101 ) } # [ doc = "3.310V (default)" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( USB3VOUTTRG_A :: _110 ) } # [ doc = "3.662V (For Freescale use only, not for customer use)" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( USB3VOUTTRG_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 20 ) ) | ( ( ( value as u32 ) & 0x07 ) << 20 ) ; self . w } } # [ doc = "USB Disable Inrush Current Limit\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBDISILIM_A { # [ doc = "0: The current limiter for the USB Voltage Regulator is enabled" ] _0 , # [ doc = "1: The current limiter for the USB Voltage Regulator is disabled" ] _1 } impl From < USBDISILIM_A > for bool { # [ inline ( always ) ] fn from ( variant : USBDISILIM_A ) -> Self { match variant { USBDISILIM_A :: _0 => false , USBDISILIM_A :: _1 => true } } } # [ doc = "Reader of field `USBDISILIM`" ] pub type USBDISILIM_R = crate :: R < bool , USBDISILIM_A > ; impl USBDISILIM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBDISILIM_A { match self . bits { false => USBDISILIM_A :: _0 , true => USBDISILIM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBDISILIM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBDISILIM_A :: _1 } } # [ doc = "Write proxy for field `USBDISILIM`" ] pub struct USBDISILIM_W < 'a > { w : & 'a mut W , } impl < 'a > USBDISILIM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBDISILIM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The current limiter for the USB Voltage Regulator is enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBDISILIM_A :: _0 ) } # [ doc = "The current limiter for the USB Voltage Regulator is disabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBDISILIM_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } impl R { # [ doc = "Bit 8 - Selects the default input voltage source to the USB Regulator in case both VREG_IN0 and VREG_IN1 are powered" ] # [ inline ( always ) ] pub fn usbvregsel ( & self ) -> USBVREGSEL_R { USBVREGSEL_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Enables the pulldown on the output of the USB Regulator." ] # [ inline ( always ) ] pub fn usbvregpd ( & self ) -> USBVREGPD_R { USBVREGPD_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bits 20:22 - USB 3.3V Output Target" ] # [ inline ( always ) ] pub fn usb3vouttrg ( & self ) -> USB3VOUTTRG_R { USB3VOUTTRG_R :: new ( ( ( self . bits >> 20 ) & 0x07 ) as u8 ) } # [ doc = "Bit 23 - USB Disable Inrush Current Limit" ] # [ inline ( always ) ] pub fn usbdisilim ( & self ) -> USBDISILIM_R { USBDISILIM_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 8 - Selects the default input voltage source to the USB Regulator in case both VREG_IN0 and VREG_IN1 are powered" ] # [ inline ( always ) ] pub fn usbvregsel ( & mut self ) -> USBVREGSEL_W { USBVREGSEL_W { w : self } } # [ doc = "Bit 9 - Enables the pulldown on the output of the USB Regulator." ] # [ inline ( always ) ] pub fn usbvregpd ( & mut self ) -> USBVREGPD_W { USBVREGPD_W { w : self } } # [ doc = "Bits 20:22 - USB 3.3V Output Target" ] # [ inline ( always ) ] pub fn usb3vouttrg ( & mut self ) -> USB3VOUTTRG_W { USB3VOUTTRG_W { w : self } } # [ doc = "Bit 23 - USB Disable Inrush Current Limit" ] # [ inline ( always ) ] pub fn usbdisilim ( & mut self ) -> USBDISILIM_W { USBDISILIM_W { w : self } } } } # [ doc = "System Options Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sopt2](sopt2) module" ] pub type SOPT2 = crate :: Reg < u32 , _SOPT2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOPT2 ; # [ doc = "`read()` method returns [sopt2::R](sopt2::R) reader structure" ] impl crate :: Readable for SOPT2 { } # [ doc = "`write(|w| ..)` method takes [sopt2::W](sopt2::W) writer structure" ] impl crate :: Writable for SOPT2 { } # [ doc = "System Options Register 2" ] pub mod sopt2 { # [ doc = "Reader of register SOPT2" ] pub type R = crate :: R < u32 , super :: SOPT2 > ; # [ doc = "Writer for register SOPT2" ] pub type W = crate :: W < u32 , super :: SOPT2 > ; # [ doc = "Register SOPT2 `reset()`'s with value 0x1000" ] impl crate :: ResetValue for super :: SOPT2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1000 } } # [ doc = "USB Slow Clock Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBSLSRC_A { # [ doc = "0: MCGIRCLK" ] _0 , # [ doc = "1: RTC 32.768kHz clock" ] _1 } impl From < USBSLSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : USBSLSRC_A ) -> Self { match variant { USBSLSRC_A :: _0 => false , USBSLSRC_A :: _1 => true } } } # [ doc = "Reader of field `USBSLSRC`" ] pub type USBSLSRC_R = crate :: R < bool , USBSLSRC_A > ; impl USBSLSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBSLSRC_A { match self . bits { false => USBSLSRC_A :: _0 , true => USBSLSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBSLSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBSLSRC_A :: _1 } } # [ doc = "Write proxy for field `USBSLSRC`" ] pub struct USBSLSRC_W < 'a > { w : & 'a mut W , } impl < 'a > USBSLSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBSLSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MCGIRCLK" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBSLSRC_A :: _0 ) } # [ doc = "RTC 32.768kHz clock" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBSLSRC_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "USB PHY PLL Regulator Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBREGEN_A { # [ doc = "0: USB PHY PLL Regulator disabled." ] _0 , # [ doc = "1: USB PHY PLL Regulator enabled." ] _1 } impl From < USBREGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : USBREGEN_A ) -> Self { match variant { USBREGEN_A :: _0 => false , USBREGEN_A :: _1 => true } } } # [ doc = "Reader of field `USBREGEN`" ] pub type USBREGEN_R = crate :: R < bool , USBREGEN_A > ; impl USBREGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBREGEN_A { match self . bits { false => USBREGEN_A :: _0 , true => USBREGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBREGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBREGEN_A :: _1 } } # [ doc = "Write proxy for field `USBREGEN`" ] pub struct USBREGEN_W < 'a > { w : & 'a mut W , } impl < 'a > USBREGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBREGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "USB PHY PLL Regulator disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBREGEN_A :: _0 ) } # [ doc = "USB PHY PLL Regulator enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBREGEN_A :: _1 ) } # [ 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 } } # [ doc = "RTC clock out select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RTCCLKOUTSEL_A { # [ doc = "0: RTC 1 Hz clock is output on the RTC_CLKOUT pin." ] _0 , # [ doc = "1: RTC 32.768kHz clock is output on the RTC_CLKOUT pin." ] _1 } impl From < RTCCLKOUTSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : RTCCLKOUTSEL_A ) -> Self { match variant { RTCCLKOUTSEL_A :: _0 => false , RTCCLKOUTSEL_A :: _1 => true } } } # [ doc = "Reader of field `RTCCLKOUTSEL`" ] pub type RTCCLKOUTSEL_R = crate :: R < bool , RTCCLKOUTSEL_A > ; impl RTCCLKOUTSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RTCCLKOUTSEL_A { match self . bits { false => RTCCLKOUTSEL_A :: _0 , true => RTCCLKOUTSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RTCCLKOUTSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RTCCLKOUTSEL_A :: _1 } } # [ doc = "Write proxy for field `RTCCLKOUTSEL`" ] pub struct RTCCLKOUTSEL_W < 'a > { w : & 'a mut W , } impl < 'a > RTCCLKOUTSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RTCCLKOUTSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RTC 1 Hz clock is output on the RTC_CLKOUT pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RTCCLKOUTSEL_A :: _0 ) } # [ doc = "RTC 32.768kHz clock is output on the RTC_CLKOUT pin." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RTCCLKOUTSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "CLKOUT select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKOUTSEL_A { # [ doc = "0: FlexBus CLKOUT" ] _000 , # [ doc = "2: Flash clock" ] _010 , # [ doc = "3: LPO clock (1 kHz)" ] _011 , # [ doc = "4: MCGIRCLK" ] _100 , # [ doc = "5: RTC 32.768kHz clock" ] _101 , # [ doc = "6: OSCERCLK0" ] _110 , # [ doc = "7: IRC 48 MHz clock" ] _111 } impl From < CLKOUTSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : CLKOUTSEL_A ) -> Self { match variant { CLKOUTSEL_A :: _000 => 0 , CLKOUTSEL_A :: _010 => 2 , CLKOUTSEL_A :: _011 => 3 , CLKOUTSEL_A :: _100 => 4 , CLKOUTSEL_A :: _101 => 5 , CLKOUTSEL_A :: _110 => 6 , CLKOUTSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `CLKOUTSEL`" ] pub type CLKOUTSEL_R = crate :: R < u8 , CLKOUTSEL_A > ; impl CLKOUTSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CLKOUTSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CLKOUTSEL_A :: _000 ) , 2 => Val ( CLKOUTSEL_A :: _010 ) , 3 => Val ( CLKOUTSEL_A :: _011 ) , 4 => Val ( CLKOUTSEL_A :: _100 ) , 5 => Val ( CLKOUTSEL_A :: _101 ) , 6 => Val ( CLKOUTSEL_A :: _110 ) , 7 => Val ( CLKOUTSEL_A :: _111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == CLKOUTSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == CLKOUTSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == CLKOUTSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == CLKOUTSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == CLKOUTSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == CLKOUTSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == CLKOUTSEL_A :: _111 } } # [ doc = "Write proxy for field `CLKOUTSEL`" ] pub struct CLKOUTSEL_W < 'a > { w : & 'a mut W , } impl < 'a > CLKOUTSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKOUTSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FlexBus CLKOUT" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( CLKOUTSEL_A :: _000 ) } # [ doc = "Flash clock" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( CLKOUTSEL_A :: _010 ) } # [ doc = "LPO clock (1 kHz)" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( CLKOUTSEL_A :: _011 ) } # [ doc = "MCGIRCLK" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( CLKOUTSEL_A :: _100 ) } # [ doc = "RTC 32.768kHz clock" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( CLKOUTSEL_A :: _101 ) } # [ doc = "OSCERCLK0" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( CLKOUTSEL_A :: _110 ) } # [ doc = "IRC 48 MHz clock" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( CLKOUTSEL_A :: _111 ) } # [ 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 << 5 ) ) | ( ( ( value as u32 ) & 0x07 ) << 5 ) ; self . w } } # [ doc = "FlexBus security level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FBSL_A { # [ doc = "0: All off-chip accesses (instruction and data) via the FlexBus or SDRAM are disallowed." ] _00 , # [ doc = "1: All off-chip accesses (instruction and data) via the FlexBus or SDRAM are disallowed." ] _01 , # [ doc = "2: Off-chip instruction accesses are disallowed. Data accesses are allowed." ] _10 , # [ doc = "3: Off-chip instruction accesses and data accesses are allowed." ] _11 } impl From < FBSL_A > for u8 { # [ inline ( always ) ] fn from ( variant : FBSL_A ) -> Self { match variant { FBSL_A :: _00 => 0 , FBSL_A :: _01 => 1 , FBSL_A :: _10 => 2 , FBSL_A :: _11 => 3 } } } # [ doc = "Reader of field `FBSL`" ] pub type FBSL_R = crate :: R < u8 , FBSL_A > ; impl FBSL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FBSL_A { match self . bits { 0 => FBSL_A :: _00 , 1 => FBSL_A :: _01 , 2 => FBSL_A :: _10 , 3 => FBSL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FBSL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FBSL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FBSL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FBSL_A :: _11 } } # [ doc = "Write proxy for field `FBSL`" ] pub struct FBSL_W < 'a > { w : & 'a mut W , } impl < 'a > FBSL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FBSL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "All off-chip accesses (instruction and data) via the FlexBus or SDRAM are disallowed." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FBSL_A :: _00 ) } # [ doc = "All off-chip accesses (instruction and data) via the FlexBus or SDRAM are disallowed." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FBSL_A :: _01 ) } # [ doc = "Off-chip instruction accesses are disallowed. Data accesses are allowed." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FBSL_A :: _10 ) } # [ doc = "Off-chip instruction accesses and data accesses are allowed." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FBSL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "Debug trace clock select\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRACECLKSEL_A { # [ doc = "0: MCGOUTCLK, divided by the TRACECLK fractional divider as configured by SIM_CLKDIV4\\[TRACEFRAC, TRACEDIV\\]" ] _0 , # [ doc = "1: Core/system clock" ] _1 } impl From < TRACECLKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TRACECLKSEL_A ) -> Self { match variant { TRACECLKSEL_A :: _0 => false , TRACECLKSEL_A :: _1 => true } } } # [ doc = "Reader of field `TRACECLKSEL`" ] pub type TRACECLKSEL_R = crate :: R < bool , TRACECLKSEL_A > ; impl TRACECLKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRACECLKSEL_A { match self . bits { false => TRACECLKSEL_A :: _0 , true => TRACECLKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRACECLKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRACECLKSEL_A :: _1 } } # [ doc = "Write proxy for field `TRACECLKSEL`" ] pub struct TRACECLKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TRACECLKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRACECLKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MCGOUTCLK, divided by the TRACECLK fractional divider as configured by SIM_CLKDIV4\\[TRACEFRAC, TRACEDIV\\]" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRACECLKSEL_A :: _0 ) } # [ doc = "Core/system clock" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRACECLKSEL_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "PLL/FLL clock select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLLFLLSEL_A { # [ doc = "0: MCGFLLCLK clock" ] _00 , # [ doc = "1: MCGPLLCLK clock" ] _01 , # [ doc = "2: USB1 PFD clock" ] _10 , # [ doc = "3: IRC48 MHz clock" ] _11 } impl From < PLLFLLSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PLLFLLSEL_A ) -> Self { match variant { PLLFLLSEL_A :: _00 => 0 , PLLFLLSEL_A :: _01 => 1 , PLLFLLSEL_A :: _10 => 2 , PLLFLLSEL_A :: _11 => 3 } } } # [ doc = "Reader of field `PLLFLLSEL`" ] pub type PLLFLLSEL_R = crate :: R < u8 , PLLFLLSEL_A > ; impl PLLFLLSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLLFLLSEL_A { match self . bits { 0 => PLLFLLSEL_A :: _00 , 1 => PLLFLLSEL_A :: _01 , 2 => PLLFLLSEL_A :: _10 , 3 => PLLFLLSEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PLLFLLSEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PLLFLLSEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PLLFLLSEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PLLFLLSEL_A :: _11 } } # [ doc = "Write proxy for field `PLLFLLSEL`" ] pub struct PLLFLLSEL_W < 'a > { w : & 'a mut W , } impl < 'a > PLLFLLSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLLFLLSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "MCGFLLCLK clock" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PLLFLLSEL_A :: _00 ) } # [ doc = "MCGPLLCLK clock" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PLLFLLSEL_A :: _01 ) } # [ doc = "USB1 PFD clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PLLFLLSEL_A :: _10 ) } # [ doc = "IRC48 MHz clock" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PLLFLLSEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "USB clock source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBSRC_A { # [ doc = "0: External bypass clock (USB_CLKIN)." ] _0 , # [ doc = "1: MCGFLLCLK, or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\], and then divided by the USB fractional divider as configured by SIM_CLKDIV2\\[USBFRAC, USBDIV\\]." ] _1 } impl From < USBSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : USBSRC_A ) -> Self { match variant { USBSRC_A :: _0 => false , USBSRC_A :: _1 => true } } } # [ doc = "Reader of field `USBSRC`" ] pub type USBSRC_R = crate :: R < bool , USBSRC_A > ; impl USBSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBSRC_A { match self . bits { false => USBSRC_A :: _0 , true => USBSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBSRC_A :: _1 } } # [ doc = "Write proxy for field `USBSRC`" ] pub struct USBSRC_W < 'a > { w : & 'a mut W , } impl < 'a > USBSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "External bypass clock (USB_CLKIN)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBSRC_A :: _0 ) } # [ doc = "MCGFLLCLK, or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\], and then divided by the USB fractional divider as configured by SIM_CLKDIV2\\[USBFRAC, USBDIV\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBSRC_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "RMII clock source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RMIISRC_A { # [ doc = "0: EXTAL clock" ] _0 , # [ doc = "1: External bypass clock (ENET_1588_CLKIN)." ] _1 } impl From < RMIISRC_A > for bool { # [ inline ( always ) ] fn from ( variant : RMIISRC_A ) -> Self { match variant { RMIISRC_A :: _0 => false , RMIISRC_A :: _1 => true } } } # [ doc = "Reader of field `RMIISRC`" ] pub type RMIISRC_R = crate :: R < bool , RMIISRC_A > ; impl RMIISRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RMIISRC_A { match self . bits { false => RMIISRC_A :: _0 , true => RMIISRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RMIISRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RMIISRC_A :: _1 } } # [ doc = "Write proxy for field `RMIISRC`" ] pub struct RMIISRC_W < 'a > { w : & 'a mut W , } impl < 'a > RMIISRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RMIISRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "EXTAL clock" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RMIISRC_A :: _0 ) } # [ doc = "External bypass clock (ENET_1588_CLKIN)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RMIISRC_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "IEEE 1588 timestamp clock source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIMESRC_A { # [ doc = "0: Core/system clock." ] _00 , # [ doc = "1: MCGFLLCLK , or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\]." ] _01 , # [ doc = "2: OSCERCLK clock" ] _10 , # [ doc = "3: External bypass clock (ENET_1588_CLKIN)." ] _11 } impl From < TIMESRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : TIMESRC_A ) -> Self { match variant { TIMESRC_A :: _00 => 0 , TIMESRC_A :: _01 => 1 , TIMESRC_A :: _10 => 2 , TIMESRC_A :: _11 => 3 } } } # [ doc = "Reader of field `TIMESRC`" ] pub type TIMESRC_R = crate :: R < u8 , TIMESRC_A > ; impl TIMESRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIMESRC_A { match self . bits { 0 => TIMESRC_A :: _00 , 1 => TIMESRC_A :: _01 , 2 => TIMESRC_A :: _10 , 3 => TIMESRC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TIMESRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TIMESRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TIMESRC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TIMESRC_A :: _11 } } # [ doc = "Write proxy for field `TIMESRC`" ] pub struct TIMESRC_W < 'a > { w : & 'a mut W , } impl < 'a > TIMESRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIMESRC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Core/system clock." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TIMESRC_A :: _00 ) } # [ doc = "MCGFLLCLK , or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\]." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TIMESRC_A :: _01 ) } # [ doc = "OSCERCLK clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TIMESRC_A :: _10 ) } # [ doc = "External bypass clock (ENET_1588_CLKIN)." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TIMESRC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "TPM clock source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPMSRC_A { # [ doc = "0: Clock disabled" ] _00 , # [ doc = "1: MCGFLLCLK , or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\], and then divided by the PLLFLLCLK fractional divider as configured by SIM_CLKDIV3\\[PLLFLLFRAC, PLLFLLDIV\\]." ] _01 , # [ doc = "2: OSCERCLK clock" ] _10 , # [ doc = "3: MCGIRCLK clock" ] _11 } impl From < TPMSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : TPMSRC_A ) -> Self { match variant { TPMSRC_A :: _00 => 0 , TPMSRC_A :: _01 => 1 , TPMSRC_A :: _10 => 2 , TPMSRC_A :: _11 => 3 } } } # [ doc = "Reader of field `TPMSRC`" ] pub type TPMSRC_R = crate :: R < u8 , TPMSRC_A > ; impl TPMSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPMSRC_A { match self . bits { 0 => TPMSRC_A :: _00 , 1 => TPMSRC_A :: _01 , 2 => TPMSRC_A :: _10 , 3 => TPMSRC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TPMSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TPMSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TPMSRC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TPMSRC_A :: _11 } } # [ doc = "Write proxy for field `TPMSRC`" ] pub struct TPMSRC_W < 'a > { w : & 'a mut W , } impl < 'a > TPMSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPMSRC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TPMSRC_A :: _00 ) } # [ doc = "MCGFLLCLK , or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\], and then divided by the PLLFLLCLK fractional divider as configured by SIM_CLKDIV3\\[PLLFLLFRAC, PLLFLLDIV\\]." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TPMSRC_A :: _01 ) } # [ doc = "OSCERCLK clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TPMSRC_A :: _10 ) } # [ doc = "MCGIRCLK clock" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TPMSRC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 24 ) ) | ( ( ( value as u32 ) & 0x03 ) << 24 ) ; self . w } } # [ doc = "LPUART clock source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPUARTSRC_A { # [ doc = "0: Clock disabled" ] _00 , # [ doc = "1: MCGFLLCLK , or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\], and then divided by the PLLFLLCLK fractional divider as configured by SIM_CLKDIV3\\[PLLFLLFRAC, PLLFLLDIV\\]." ] _01 , # [ doc = "2: OSCERCLK clock" ] _10 , # [ doc = "3: MCGIRCLK clock" ] _11 } impl From < LPUARTSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : LPUARTSRC_A ) -> Self { match variant { LPUARTSRC_A :: _00 => 0 , LPUARTSRC_A :: _01 => 1 , LPUARTSRC_A :: _10 => 2 , LPUARTSRC_A :: _11 => 3 } } } # [ doc = "Reader of field `LPUARTSRC`" ] pub type LPUARTSRC_R = crate :: R < u8 , LPUARTSRC_A > ; impl LPUARTSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPUARTSRC_A { match self . bits { 0 => LPUARTSRC_A :: _00 , 1 => LPUARTSRC_A :: _01 , 2 => LPUARTSRC_A :: _10 , 3 => LPUARTSRC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LPUARTSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LPUARTSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == LPUARTSRC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == LPUARTSRC_A :: _11 } } # [ doc = "Write proxy for field `LPUARTSRC`" ] pub struct LPUARTSRC_W < 'a > { w : & 'a mut W , } impl < 'a > LPUARTSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPUARTSRC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( LPUARTSRC_A :: _00 ) } # [ doc = "MCGFLLCLK , or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\], and then divided by the PLLFLLCLK fractional divider as configured by SIM_CLKDIV3\\[PLLFLLFRAC, PLLFLLDIV\\]." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( LPUARTSRC_A :: _01 ) } # [ doc = "OSCERCLK clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( LPUARTSRC_A :: _10 ) } # [ doc = "MCGIRCLK clock" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( LPUARTSRC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 26 ) ) | ( ( ( value as u32 ) & 0x03 ) << 26 ) ; self . w } } # [ doc = "SDHC clock source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SDHCSRC_A { # [ doc = "0: Core/system clock." ] _00 , # [ doc = "1: MCGFLLCLK, or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\]." ] _01 , # [ doc = "2: OSCERCLK clock" ] _10 , # [ doc = "3: External bypass clock (SDHC0_CLKIN)" ] _11 } impl From < SDHCSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : SDHCSRC_A ) -> Self { match variant { SDHCSRC_A :: _00 => 0 , SDHCSRC_A :: _01 => 1 , SDHCSRC_A :: _10 => 2 , SDHCSRC_A :: _11 => 3 } } } # [ doc = "Reader of field `SDHCSRC`" ] pub type SDHCSRC_R = crate :: R < u8 , SDHCSRC_A > ; impl SDHCSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SDHCSRC_A { match self . bits { 0 => SDHCSRC_A :: _00 , 1 => SDHCSRC_A :: _01 , 2 => SDHCSRC_A :: _10 , 3 => SDHCSRC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SDHCSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SDHCSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SDHCSRC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SDHCSRC_A :: _11 } } # [ doc = "Write proxy for field `SDHCSRC`" ] pub struct SDHCSRC_W < 'a > { w : & 'a mut W , } impl < 'a > SDHCSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SDHCSRC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Core/system clock." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( SDHCSRC_A :: _00 ) } # [ doc = "MCGFLLCLK, or MCGPLLCLK , or IRC48M , or USB1 PFD clock as selected by SOPT2\\[PLLFLLSEL\\]." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( SDHCSRC_A :: _01 ) } # [ doc = "OSCERCLK clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SDHCSRC_A :: _10 ) } # [ doc = "External bypass clock (SDHC0_CLKIN)" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( SDHCSRC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 28 ) ) | ( ( ( value as u32 ) & 0x03 ) << 28 ) ; self . w } } impl R { # [ doc = "Bit 0 - USB Slow Clock Source" ] # [ inline ( always ) ] pub fn usbslsrc ( & self ) -> USBSLSRC_R { USBSLSRC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - USB PHY PLL Regulator Enable" ] # [ inline ( always ) ] pub fn usbregen ( & self ) -> USBREGEN_R { USBREGEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - RTC clock out select" ] # [ inline ( always ) ] pub fn rtcclkoutsel ( & self ) -> RTCCLKOUTSEL_R { RTCCLKOUTSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:7 - CLKOUT select" ] # [ inline ( always ) ] pub fn clkoutsel ( & self ) -> CLKOUTSEL_R { CLKOUTSEL_R :: new ( ( ( self . bits >> 5 ) & 0x07 ) as u8 ) } # [ doc = "Bits 8:9 - FlexBus security level" ] # [ inline ( always ) ] pub fn fbsl ( & self ) -> FBSL_R { FBSL_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 12 - Debug trace clock select" ] # [ inline ( always ) ] pub fn traceclksel ( & self ) -> TRACECLKSEL_R { TRACECLKSEL_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:17 - PLL/FLL clock select" ] # [ inline ( always ) ] pub fn pllfllsel ( & self ) -> PLLFLLSEL_R { PLLFLLSEL_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bit 18 - USB clock source select" ] # [ inline ( always ) ] pub fn usbsrc ( & self ) -> USBSRC_R { USBSRC_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - RMII clock source select" ] # [ inline ( always ) ] pub fn rmiisrc ( & self ) -> RMIISRC_R { RMIISRC_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bits 20:21 - IEEE 1588 timestamp clock source select" ] # [ inline ( always ) ] pub fn timesrc ( & self ) -> TIMESRC_R { TIMESRC_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bits 24:25 - TPM clock source select" ] # [ inline ( always ) ] pub fn tpmsrc ( & self ) -> TPMSRC_R { TPMSRC_R :: new ( ( ( self . bits >> 24 ) & 0x03 ) as u8 ) } # [ doc = "Bits 26:27 - LPUART clock source select" ] # [ inline ( always ) ] pub fn lpuartsrc ( & self ) -> LPUARTSRC_R { LPUARTSRC_R :: new ( ( ( self . bits >> 26 ) & 0x03 ) as u8 ) } # [ doc = "Bits 28:29 - SDHC clock source select" ] # [ inline ( always ) ] pub fn sdhcsrc ( & self ) -> SDHCSRC_R { SDHCSRC_R :: new ( ( ( self . bits >> 28 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bit 0 - USB Slow Clock Source" ] # [ inline ( always ) ] pub fn usbslsrc ( & mut self ) -> USBSLSRC_W { USBSLSRC_W { w : self } } # [ doc = "Bit 1 - USB PHY PLL Regulator Enable" ] # [ inline ( always ) ] pub fn usbregen ( & mut self ) -> USBREGEN_W { USBREGEN_W { w : self } } # [ doc = "Bit 4 - RTC clock out select" ] # [ inline ( always ) ] pub fn rtcclkoutsel ( & mut self ) -> RTCCLKOUTSEL_W { RTCCLKOUTSEL_W { w : self } } # [ doc = "Bits 5:7 - CLKOUT select" ] # [ inline ( always ) ] pub fn clkoutsel ( & mut self ) -> CLKOUTSEL_W { CLKOUTSEL_W { w : self } } # [ doc = "Bits 8:9 - FlexBus security level" ] # [ inline ( always ) ] pub fn fbsl ( & mut self ) -> FBSL_W { FBSL_W { w : self } } # [ doc = "Bit 12 - Debug trace clock select" ] # [ inline ( always ) ] pub fn traceclksel ( & mut self ) -> TRACECLKSEL_W { TRACECLKSEL_W { w : self } } # [ doc = "Bits 16:17 - PLL/FLL clock select" ] # [ inline ( always ) ] pub fn pllfllsel ( & mut self ) -> PLLFLLSEL_W { PLLFLLSEL_W { w : self } } # [ doc = "Bit 18 - USB clock source select" ] # [ inline ( always ) ] pub fn usbsrc ( & mut self ) -> USBSRC_W { USBSRC_W { w : self } } # [ doc = "Bit 19 - RMII clock source select" ] # [ inline ( always ) ] pub fn rmiisrc ( & mut self ) -> RMIISRC_W { RMIISRC_W { w : self } } # [ doc = "Bits 20:21 - IEEE 1588 timestamp clock source select" ] # [ inline ( always ) ] pub fn timesrc ( & mut self ) -> TIMESRC_W { TIMESRC_W { w : self } } # [ doc = "Bits 24:25 - TPM clock source select" ] # [ inline ( always ) ] pub fn tpmsrc ( & mut self ) -> TPMSRC_W { TPMSRC_W { w : self } } # [ doc = "Bits 26:27 - LPUART clock source select" ] # [ inline ( always ) ] pub fn lpuartsrc ( & mut self ) -> LPUARTSRC_W { LPUARTSRC_W { w : self } } # [ doc = "Bits 28:29 - SDHC clock source select" ] # [ inline ( always ) ] pub fn sdhcsrc ( & mut self ) -> SDHCSRC_W { SDHCSRC_W { w : self } } } } # [ doc = "System Options Register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sopt4](sopt4) module" ] pub type SOPT4 = crate :: Reg < u32 , _SOPT4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOPT4 ; # [ doc = "`read()` method returns [sopt4::R](sopt4::R) reader structure" ] impl crate :: Readable for SOPT4 { } # [ doc = "`write(|w| ..)` method takes [sopt4::W](sopt4::W) writer structure" ] impl crate :: Writable for SOPT4 { } # [ doc = "System Options Register 4" ] pub mod sopt4 { # [ doc = "Reader of register SOPT4" ] pub type R = crate :: R < u32 , super :: SOPT4 > ; # [ doc = "Writer for register SOPT4" ] pub type W = crate :: W < u32 , super :: SOPT4 > ; # [ doc = "Register SOPT4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SOPT4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "FTM0 Fault 0 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0FLT0_A { # [ doc = "0: FTM0_FLT0 pin" ] _0 , # [ doc = "1: CMP0 out" ] _1 } impl From < FTM0FLT0_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0FLT0_A ) -> Self { match variant { FTM0FLT0_A :: _0 => false , FTM0FLT0_A :: _1 => true } } } # [ doc = "Reader of field `FTM0FLT0`" ] pub type FTM0FLT0_R = crate :: R < bool , FTM0FLT0_A > ; impl FTM0FLT0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0FLT0_A { match self . bits { false => FTM0FLT0_A :: _0 , true => FTM0FLT0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0FLT0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0FLT0_A :: _1 } } # [ doc = "Write proxy for field `FTM0FLT0`" ] pub struct FTM0FLT0_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0FLT0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0FLT0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_FLT0 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0FLT0_A :: _0 ) } # [ doc = "CMP0 out" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0FLT0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "FTM0 Fault 1 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0FLT1_A { # [ doc = "0: FTM0_FLT1 pin" ] _0 , # [ doc = "1: CMP1 out" ] _1 } impl From < FTM0FLT1_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0FLT1_A ) -> Self { match variant { FTM0FLT1_A :: _0 => false , FTM0FLT1_A :: _1 => true } } } # [ doc = "Reader of field `FTM0FLT1`" ] pub type FTM0FLT1_R = crate :: R < bool , FTM0FLT1_A > ; impl FTM0FLT1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0FLT1_A { match self . bits { false => FTM0FLT1_A :: _0 , true => FTM0FLT1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0FLT1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0FLT1_A :: _1 } } # [ doc = "Write proxy for field `FTM0FLT1`" ] pub struct FTM0FLT1_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0FLT1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0FLT1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_FLT1 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0FLT1_A :: _0 ) } # [ doc = "CMP1 out" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0FLT1_A :: _1 ) } # [ 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 } } # [ doc = "FTM0 Fault 2 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0FLT2_A { # [ doc = "0: FTM0_FLT2 pin" ] _0 , # [ doc = "1: CMP2 out" ] _1 } impl From < FTM0FLT2_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0FLT2_A ) -> Self { match variant { FTM0FLT2_A :: _0 => false , FTM0FLT2_A :: _1 => true } } } # [ doc = "Reader of field `FTM0FLT2`" ] pub type FTM0FLT2_R = crate :: R < bool , FTM0FLT2_A > ; impl FTM0FLT2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0FLT2_A { match self . bits { false => FTM0FLT2_A :: _0 , true => FTM0FLT2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0FLT2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0FLT2_A :: _1 } } # [ doc = "Write proxy for field `FTM0FLT2`" ] pub struct FTM0FLT2_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0FLT2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0FLT2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_FLT2 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0FLT2_A :: _0 ) } # [ doc = "CMP2 out" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0FLT2_A :: _1 ) } # [ 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 = "FTM0 Fault 3 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0FLT3_A { # [ doc = "0: FTM0_FLT3 pin" ] _0 , # [ doc = "1: CMP3 out" ] _1 } impl From < FTM0FLT3_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0FLT3_A ) -> Self { match variant { FTM0FLT3_A :: _0 => false , FTM0FLT3_A :: _1 => true } } } # [ doc = "Reader of field `FTM0FLT3`" ] pub type FTM0FLT3_R = crate :: R < bool , FTM0FLT3_A > ; impl FTM0FLT3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0FLT3_A { match self . bits { false => FTM0FLT3_A :: _0 , true => FTM0FLT3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0FLT3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0FLT3_A :: _1 } } # [ doc = "Write proxy for field `FTM0FLT3`" ] pub struct FTM0FLT3_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0FLT3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0FLT3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_FLT3 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0FLT3_A :: _0 ) } # [ doc = "CMP3 out" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0FLT3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "FTM1 Fault 0 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM1FLT0_A { # [ doc = "0: FTM1_FLT0 pin" ] _0 , # [ doc = "1: CMP0 out" ] _1 } impl From < FTM1FLT0_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM1FLT0_A ) -> Self { match variant { FTM1FLT0_A :: _0 => false , FTM1FLT0_A :: _1 => true } } } # [ doc = "Reader of field `FTM1FLT0`" ] pub type FTM1FLT0_R = crate :: R < bool , FTM1FLT0_A > ; impl FTM1FLT0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM1FLT0_A { match self . bits { false => FTM1FLT0_A :: _0 , true => FTM1FLT0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM1FLT0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM1FLT0_A :: _1 } } # [ doc = "Write proxy for field `FTM1FLT0`" ] pub struct FTM1FLT0_W < 'a > { w : & 'a mut W , } impl < 'a > FTM1FLT0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM1FLT0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM1_FLT0 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM1FLT0_A :: _0 ) } # [ doc = "CMP0 out" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM1FLT0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "FTM2 Fault 0 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM2FLT0_A { # [ doc = "0: FTM2_FLT0 pin" ] _0 , # [ doc = "1: CMP0 out" ] _1 } impl From < FTM2FLT0_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM2FLT0_A ) -> Self { match variant { FTM2FLT0_A :: _0 => false , FTM2FLT0_A :: _1 => true } } } # [ doc = "Reader of field `FTM2FLT0`" ] pub type FTM2FLT0_R = crate :: R < bool , FTM2FLT0_A > ; impl FTM2FLT0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM2FLT0_A { match self . bits { false => FTM2FLT0_A :: _0 , true => FTM2FLT0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM2FLT0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM2FLT0_A :: _1 } } # [ doc = "Write proxy for field `FTM2FLT0`" ] pub struct FTM2FLT0_W < 'a > { w : & 'a mut W , } impl < 'a > FTM2FLT0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM2FLT0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM2_FLT0 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM2FLT0_A :: _0 ) } # [ doc = "CMP0 out" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM2FLT0_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "FTM3 Fault 0 Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3FLT0_A { # [ doc = "0: FTM3_FLT0 pin" ] _0 , # [ doc = "1: CMP0 out" ] _1 } impl From < FTM3FLT0_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3FLT0_A ) -> Self { match variant { FTM3FLT0_A :: _0 => false , FTM3FLT0_A :: _1 => true } } } # [ doc = "Reader of field `FTM3FLT0`" ] pub type FTM3FLT0_R = crate :: R < bool , FTM3FLT0_A > ; impl FTM3FLT0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3FLT0_A { match self . bits { false => FTM3FLT0_A :: _0 , true => FTM3FLT0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3FLT0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3FLT0_A :: _1 } } # [ doc = "Write proxy for field `FTM3FLT0`" ] pub struct FTM3FLT0_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3FLT0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3FLT0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_FLT0 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3FLT0_A :: _0 ) } # [ doc = "CMP0 out" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3FLT0_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "FTM1 channel 0 input capture source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM1CH0SRC_A { # [ doc = "0: FTM1_CH0 signal" ] _00 , # [ doc = "1: CMP0 output" ] _01 , # [ doc = "2: CMP1 output" ] _10 , # [ doc = "3: USB start of frame pulse" ] _11 } impl From < FTM1CH0SRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : FTM1CH0SRC_A ) -> Self { match variant { FTM1CH0SRC_A :: _00 => 0 , FTM1CH0SRC_A :: _01 => 1 , FTM1CH0SRC_A :: _10 => 2 , FTM1CH0SRC_A :: _11 => 3 } } } # [ doc = "Reader of field `FTM1CH0SRC`" ] pub type FTM1CH0SRC_R = crate :: R < u8 , FTM1CH0SRC_A > ; impl FTM1CH0SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM1CH0SRC_A { match self . bits { 0 => FTM1CH0SRC_A :: _00 , 1 => FTM1CH0SRC_A :: _01 , 2 => FTM1CH0SRC_A :: _10 , 3 => FTM1CH0SRC_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FTM1CH0SRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FTM1CH0SRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FTM1CH0SRC_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FTM1CH0SRC_A :: _11 } } # [ doc = "Write proxy for field `FTM1CH0SRC`" ] pub struct FTM1CH0SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM1CH0SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM1CH0SRC_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "FTM1_CH0 signal" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FTM1CH0SRC_A :: _00 ) } # [ doc = "CMP0 output" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FTM1CH0SRC_A :: _01 ) } # [ doc = "CMP1 output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FTM1CH0SRC_A :: _10 ) } # [ doc = "USB start of frame pulse" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FTM1CH0SRC_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "FTM2 channel 0 input capture source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM2CH0SRC_A { # [ doc = "0: FTM2_CH0 signal" ] _00 , # [ doc = "1: CMP0 output" ] _01 , # [ doc = "2: CMP1 output" ] _10 } impl From < FTM2CH0SRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : FTM2CH0SRC_A ) -> Self { match variant { FTM2CH0SRC_A :: _00 => 0 , FTM2CH0SRC_A :: _01 => 1 , FTM2CH0SRC_A :: _10 => 2 } } } # [ doc = "Reader of field `FTM2CH0SRC`" ] pub type FTM2CH0SRC_R = crate :: R < u8 , FTM2CH0SRC_A > ; impl FTM2CH0SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FTM2CH0SRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FTM2CH0SRC_A :: _00 ) , 1 => Val ( FTM2CH0SRC_A :: _01 ) , 2 => Val ( FTM2CH0SRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FTM2CH0SRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FTM2CH0SRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FTM2CH0SRC_A :: _10 } } # [ doc = "Write proxy for field `FTM2CH0SRC`" ] pub struct FTM2CH0SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM2CH0SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM2CH0SRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "FTM2_CH0 signal" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FTM2CH0SRC_A :: _00 ) } # [ doc = "CMP0 output" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FTM2CH0SRC_A :: _01 ) } # [ doc = "CMP1 output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FTM2CH0SRC_A :: _10 ) } # [ 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 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "FTM2 channel 1 input capture source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM2CH1SRC_A { # [ doc = "0: FTM2_CH1 signal" ] _0 , # [ doc = "1: Exclusive OR of FTM2_CH1, FTM2_CH0 and FTM1_CH1." ] _1 } impl From < FTM2CH1SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM2CH1SRC_A ) -> Self { match variant { FTM2CH1SRC_A :: _0 => false , FTM2CH1SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM2CH1SRC`" ] pub type FTM2CH1SRC_R = crate :: R < bool , FTM2CH1SRC_A > ; impl FTM2CH1SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM2CH1SRC_A { match self . bits { false => FTM2CH1SRC_A :: _0 , true => FTM2CH1SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM2CH1SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM2CH1SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM2CH1SRC`" ] pub struct FTM2CH1SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM2CH1SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM2CH1SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM2_CH1 signal" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM2CH1SRC_A :: _0 ) } # [ doc = "Exclusive OR of FTM2_CH1, FTM2_CH0 and FTM1_CH1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM2CH1SRC_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "FlexTimer 0 External Clock Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0CLKSEL_A { # [ doc = "0: FTM_CLK0 pin" ] _0 , # [ doc = "1: FTM_CLK1 pin" ] _1 } impl From < FTM0CLKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0CLKSEL_A ) -> Self { match variant { FTM0CLKSEL_A :: _0 => false , FTM0CLKSEL_A :: _1 => true } } } # [ doc = "Reader of field `FTM0CLKSEL`" ] pub type FTM0CLKSEL_R = crate :: R < bool , FTM0CLKSEL_A > ; impl FTM0CLKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0CLKSEL_A { match self . bits { false => FTM0CLKSEL_A :: _0 , true => FTM0CLKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0CLKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0CLKSEL_A :: _1 } } # [ doc = "Write proxy for field `FTM0CLKSEL`" ] pub struct FTM0CLKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0CLKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0CLKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM_CLK0 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0CLKSEL_A :: _0 ) } # [ doc = "FTM_CLK1 pin" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0CLKSEL_A :: _1 ) } # [ 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 = "FTM1 External Clock Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM1CLKSEL_A { # [ doc = "0: FTM_CLK0 pin" ] _0 , # [ doc = "1: FTM_CLK1 pin" ] _1 } impl From < FTM1CLKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM1CLKSEL_A ) -> Self { match variant { FTM1CLKSEL_A :: _0 => false , FTM1CLKSEL_A :: _1 => true } } } # [ doc = "Reader of field `FTM1CLKSEL`" ] pub type FTM1CLKSEL_R = crate :: R < bool , FTM1CLKSEL_A > ; impl FTM1CLKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM1CLKSEL_A { match self . bits { false => FTM1CLKSEL_A :: _0 , true => FTM1CLKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM1CLKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM1CLKSEL_A :: _1 } } # [ doc = "Write proxy for field `FTM1CLKSEL`" ] pub struct FTM1CLKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > FTM1CLKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM1CLKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM_CLK0 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM1CLKSEL_A :: _0 ) } # [ doc = "FTM_CLK1 pin" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM1CLKSEL_A :: _1 ) } # [ 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 = "FlexTimer 2 External Clock Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM2CLKSEL_A { # [ doc = "0: FTM2 external clock driven by FTM_CLK0 pin." ] _0 , # [ doc = "1: FTM2 external clock driven by FTM_CLK1 pin." ] _1 } impl From < FTM2CLKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM2CLKSEL_A ) -> Self { match variant { FTM2CLKSEL_A :: _0 => false , FTM2CLKSEL_A :: _1 => true } } } # [ doc = "Reader of field `FTM2CLKSEL`" ] pub type FTM2CLKSEL_R = crate :: R < bool , FTM2CLKSEL_A > ; impl FTM2CLKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM2CLKSEL_A { match self . bits { false => FTM2CLKSEL_A :: _0 , true => FTM2CLKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM2CLKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM2CLKSEL_A :: _1 } } # [ doc = "Write proxy for field `FTM2CLKSEL`" ] pub struct FTM2CLKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > FTM2CLKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM2CLKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM2 external clock driven by FTM_CLK0 pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM2CLKSEL_A :: _0 ) } # [ doc = "FTM2 external clock driven by FTM_CLK1 pin." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM2CLKSEL_A :: _1 ) } # [ 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 = "FlexTimer 3 External Clock Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3CLKSEL_A { # [ doc = "0: FTM3 external clock driven by FTM_CLK0 pin." ] _0 , # [ doc = "1: FTM3 external clock driven by FTM_CLK1 pin." ] _1 } impl From < FTM3CLKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3CLKSEL_A ) -> Self { match variant { FTM3CLKSEL_A :: _0 => false , FTM3CLKSEL_A :: _1 => true } } } # [ doc = "Reader of field `FTM3CLKSEL`" ] pub type FTM3CLKSEL_R = crate :: R < bool , FTM3CLKSEL_A > ; impl FTM3CLKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3CLKSEL_A { match self . bits { false => FTM3CLKSEL_A :: _0 , true => FTM3CLKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3CLKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3CLKSEL_A :: _1 } } # [ doc = "Write proxy for field `FTM3CLKSEL`" ] pub struct FTM3CLKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3CLKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3CLKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3 external clock driven by FTM_CLK0 pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3CLKSEL_A :: _0 ) } # [ doc = "FTM3 external clock driven by FTM_CLK1 pin." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3CLKSEL_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "FlexTimer 0 Hardware Trigger 0 Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0TRG0SRC_A { # [ doc = "0: HSCMP0 output drives FTM0 hardware trigger 0" ] _0 , # [ doc = "1: FTM1 channel match drives FTM0 hardware trigger 0" ] _1 } impl From < FTM0TRG0SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0TRG0SRC_A ) -> Self { match variant { FTM0TRG0SRC_A :: _0 => false , FTM0TRG0SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0TRG0SRC`" ] pub type FTM0TRG0SRC_R = crate :: R < bool , FTM0TRG0SRC_A > ; impl FTM0TRG0SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0TRG0SRC_A { match self . bits { false => FTM0TRG0SRC_A :: _0 , true => FTM0TRG0SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0TRG0SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0TRG0SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0TRG0SRC`" ] pub struct FTM0TRG0SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0TRG0SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0TRG0SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "HSCMP0 output drives FTM0 hardware trigger 0" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0TRG0SRC_A :: _0 ) } # [ doc = "FTM1 channel match drives FTM0 hardware trigger 0" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0TRG0SRC_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "FlexTimer 0 Hardware Trigger 1 Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0TRG1SRC_A { # [ doc = "0: PDB output trigger 1 drives FTM0 hardware trigger 1" ] _0 , # [ doc = "1: FTM2 channel match drives FTM0 hardware trigger 1" ] _1 } impl From < FTM0TRG1SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0TRG1SRC_A ) -> Self { match variant { FTM0TRG1SRC_A :: _0 => false , FTM0TRG1SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0TRG1SRC`" ] pub type FTM0TRG1SRC_R = crate :: R < bool , FTM0TRG1SRC_A > ; impl FTM0TRG1SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0TRG1SRC_A { match self . bits { false => FTM0TRG1SRC_A :: _0 , true => FTM0TRG1SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0TRG1SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0TRG1SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0TRG1SRC`" ] pub struct FTM0TRG1SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0TRG1SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0TRG1SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB output trigger 1 drives FTM0 hardware trigger 1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0TRG1SRC_A :: _0 ) } # [ doc = "FTM2 channel match drives FTM0 hardware trigger 1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0TRG1SRC_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "FlexTimer 3 Hardware Trigger 0 Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3TRG0SRC_A { # [ doc = "1: FTM1 channel match drives FTM3 hardware trigger 0" ] _1 } impl From < FTM3TRG0SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3TRG0SRC_A ) -> Self { match variant { FTM3TRG0SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3TRG0SRC`" ] pub type FTM3TRG0SRC_R = crate :: R < bool , FTM3TRG0SRC_A > ; impl FTM3TRG0SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < bool , FTM3TRG0SRC_A > { use crate :: Variant :: * ; match self . bits { true => Val ( FTM3TRG0SRC_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3TRG0SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3TRG0SRC`" ] pub struct FTM3TRG0SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3TRG0SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3TRG0SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM1 channel match drives FTM3 hardware trigger 0" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3TRG0SRC_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "FlexTimer 3 Hardware Trigger 1 Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3TRG1SRC_A { # [ doc = "1: FTM2 channel match drives FTM3 hardware trigger 1" ] _1 } impl From < FTM3TRG1SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3TRG1SRC_A ) -> Self { match variant { FTM3TRG1SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3TRG1SRC`" ] pub type FTM3TRG1SRC_R = crate :: R < bool , FTM3TRG1SRC_A > ; impl FTM3TRG1SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < bool , FTM3TRG1SRC_A > { use crate :: Variant :: * ; match self . bits { true => Val ( FTM3TRG1SRC_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3TRG1SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3TRG1SRC`" ] pub struct FTM3TRG1SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3TRG1SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3TRG1SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM2 channel match drives FTM3 hardware trigger 1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3TRG1SRC_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - FTM0 Fault 0 Select" ] # [ inline ( always ) ] pub fn ftm0flt0 ( & self ) -> FTM0FLT0_R { FTM0FLT0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - FTM0 Fault 1 Select" ] # [ inline ( always ) ] pub fn ftm0flt1 ( & self ) -> FTM0FLT1_R { FTM0FLT1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM0 Fault 2 Select" ] # [ inline ( always ) ] pub fn ftm0flt2 ( & self ) -> FTM0FLT2_R { FTM0FLT2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - FTM0 Fault 3 Select" ] # [ inline ( always ) ] pub fn ftm0flt3 ( & self ) -> FTM0FLT3_R { FTM0FLT3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - FTM1 Fault 0 Select" ] # [ inline ( always ) ] pub fn ftm1flt0 ( & self ) -> FTM1FLT0_R { FTM1FLT0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - FTM2 Fault 0 Select" ] # [ inline ( always ) ] pub fn ftm2flt0 ( & self ) -> FTM2FLT0_R { FTM2FLT0_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - FTM3 Fault 0 Select" ] # [ inline ( always ) ] pub fn ftm3flt0 ( & self ) -> FTM3FLT0_R { FTM3FLT0_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:19 - FTM1 channel 0 input capture source select" ] # [ inline ( always ) ] pub fn ftm1ch0src ( & self ) -> FTM1CH0SRC_R { FTM1CH0SRC_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:21 - FTM2 channel 0 input capture source select" ] # [ inline ( always ) ] pub fn ftm2ch0src ( & self ) -> FTM2CH0SRC_R { FTM2CH0SRC_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bit 22 - FTM2 channel 1 input capture source select" ] # [ inline ( always ) ] pub fn ftm2ch1src ( & self ) -> FTM2CH1SRC_R { FTM2CH1SRC_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - FlexTimer 0 External Clock Pin Select" ] # [ inline ( always ) ] pub fn ftm0clksel ( & self ) -> FTM0CLKSEL_R { FTM0CLKSEL_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - FTM1 External Clock Pin Select" ] # [ inline ( always ) ] pub fn ftm1clksel ( & self ) -> FTM1CLKSEL_R { FTM1CLKSEL_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - FlexTimer 2 External Clock Pin Select" ] # [ inline ( always ) ] pub fn ftm2clksel ( & self ) -> FTM2CLKSEL_R { FTM2CLKSEL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - FlexTimer 3 External Clock Pin Select" ] # [ inline ( always ) ] pub fn ftm3clksel ( & self ) -> FTM3CLKSEL_R { FTM3CLKSEL_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - FlexTimer 0 Hardware Trigger 0 Source Select" ] # [ inline ( always ) ] pub fn ftm0trg0src ( & self ) -> FTM0TRG0SRC_R { FTM0TRG0SRC_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - FlexTimer 0 Hardware Trigger 1 Source Select" ] # [ inline ( always ) ] pub fn ftm0trg1src ( & self ) -> FTM0TRG1SRC_R { FTM0TRG1SRC_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - FlexTimer 3 Hardware Trigger 0 Source Select" ] # [ inline ( always ) ] pub fn ftm3trg0src ( & self ) -> FTM3TRG0SRC_R { FTM3TRG0SRC_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - FlexTimer 3 Hardware Trigger 1 Source Select" ] # [ inline ( always ) ] pub fn ftm3trg1src ( & self ) -> FTM3TRG1SRC_R { FTM3TRG1SRC_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FTM0 Fault 0 Select" ] # [ inline ( always ) ] pub fn ftm0flt0 ( & mut self ) -> FTM0FLT0_W { FTM0FLT0_W { w : self } } # [ doc = "Bit 1 - FTM0 Fault 1 Select" ] # [ inline ( always ) ] pub fn ftm0flt1 ( & mut self ) -> FTM0FLT1_W { FTM0FLT1_W { w : self } } # [ doc = "Bit 2 - FTM0 Fault 2 Select" ] # [ inline ( always ) ] pub fn ftm0flt2 ( & mut self ) -> FTM0FLT2_W { FTM0FLT2_W { w : self } } # [ doc = "Bit 3 - FTM0 Fault 3 Select" ] # [ inline ( always ) ] pub fn ftm0flt3 ( & mut self ) -> FTM0FLT3_W { FTM0FLT3_W { w : self } } # [ doc = "Bit 4 - FTM1 Fault 0 Select" ] # [ inline ( always ) ] pub fn ftm1flt0 ( & mut self ) -> FTM1FLT0_W { FTM1FLT0_W { w : self } } # [ doc = "Bit 8 - FTM2 Fault 0 Select" ] # [ inline ( always ) ] pub fn ftm2flt0 ( & mut self ) -> FTM2FLT0_W { FTM2FLT0_W { w : self } } # [ doc = "Bit 12 - FTM3 Fault 0 Select" ] # [ inline ( always ) ] pub fn ftm3flt0 ( & mut self ) -> FTM3FLT0_W { FTM3FLT0_W { w : self } } # [ doc = "Bits 18:19 - FTM1 channel 0 input capture source select" ] # [ inline ( always ) ] pub fn ftm1ch0src ( & mut self ) -> FTM1CH0SRC_W { FTM1CH0SRC_W { w : self } } # [ doc = "Bits 20:21 - FTM2 channel 0 input capture source select" ] # [ inline ( always ) ] pub fn ftm2ch0src ( & mut self ) -> FTM2CH0SRC_W { FTM2CH0SRC_W { w : self } } # [ doc = "Bit 22 - FTM2 channel 1 input capture source select" ] # [ inline ( always ) ] pub fn ftm2ch1src ( & mut self ) -> FTM2CH1SRC_W { FTM2CH1SRC_W { w : self } } # [ doc = "Bit 24 - FlexTimer 0 External Clock Pin Select" ] # [ inline ( always ) ] pub fn ftm0clksel ( & mut self ) -> FTM0CLKSEL_W { FTM0CLKSEL_W { w : self } } # [ doc = "Bit 25 - FTM1 External Clock Pin Select" ] # [ inline ( always ) ] pub fn ftm1clksel ( & mut self ) -> FTM1CLKSEL_W { FTM1CLKSEL_W { w : self } } # [ doc = "Bit 26 - FlexTimer 2 External Clock Pin Select" ] # [ inline ( always ) ] pub fn ftm2clksel ( & mut self ) -> FTM2CLKSEL_W { FTM2CLKSEL_W { w : self } } # [ doc = "Bit 27 - FlexTimer 3 External Clock Pin Select" ] # [ inline ( always ) ] pub fn ftm3clksel ( & mut self ) -> FTM3CLKSEL_W { FTM3CLKSEL_W { w : self } } # [ doc = "Bit 28 - FlexTimer 0 Hardware Trigger 0 Source Select" ] # [ inline ( always ) ] pub fn ftm0trg0src ( & mut self ) -> FTM0TRG0SRC_W { FTM0TRG0SRC_W { w : self } } # [ doc = "Bit 29 - FlexTimer 0 Hardware Trigger 1 Source Select" ] # [ inline ( always ) ] pub fn ftm0trg1src ( & mut self ) -> FTM0TRG1SRC_W { FTM0TRG1SRC_W { w : self } } # [ doc = "Bit 30 - FlexTimer 3 Hardware Trigger 0 Source Select" ] # [ inline ( always ) ] pub fn ftm3trg0src ( & mut self ) -> FTM3TRG0SRC_W { FTM3TRG0SRC_W { w : self } } # [ doc = "Bit 31 - FlexTimer 3 Hardware Trigger 1 Source Select" ] # [ inline ( always ) ] pub fn ftm3trg1src ( & mut self ) -> FTM3TRG1SRC_W { FTM3TRG1SRC_W { w : self } } } } # [ doc = "System Options Register 5\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sopt5](sopt5) module" ] pub type SOPT5 = crate :: Reg < u32 , _SOPT5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOPT5 ; # [ doc = "`read()` method returns [sopt5::R](sopt5::R) reader structure" ] impl crate :: Readable for SOPT5 { } # [ doc = "`write(|w| ..)` method takes [sopt5::W](sopt5::W) writer structure" ] impl crate :: Writable for SOPT5 { } # [ doc = "System Options Register 5" ] pub mod sopt5 { # [ doc = "Reader of register SOPT5" ] pub type R = crate :: R < u32 , super :: SOPT5 > ; # [ doc = "Writer for register SOPT5" ] pub type W = crate :: W < u32 , super :: SOPT5 > ; # [ doc = "Register SOPT5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SOPT5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "UART 0 transmit data source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART0TXSRC_A { # [ doc = "0: UART0_TX pin" ] _00 , # [ doc = "1: UART0_TX pin modulated with FTM1 channel 0 output" ] _01 , # [ doc = "2: UART0_TX pin modulated with FTM2 channel 0 output" ] _10 } impl From < UART0TXSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : UART0TXSRC_A ) -> Self { match variant { UART0TXSRC_A :: _00 => 0 , UART0TXSRC_A :: _01 => 1 , UART0TXSRC_A :: _10 => 2 } } } # [ doc = "Reader of field `UART0TXSRC`" ] pub type UART0TXSRC_R = crate :: R < u8 , UART0TXSRC_A > ; impl UART0TXSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , UART0TXSRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( UART0TXSRC_A :: _00 ) , 1 => Val ( UART0TXSRC_A :: _01 ) , 2 => Val ( UART0TXSRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == UART0TXSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == UART0TXSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == UART0TXSRC_A :: _10 } } # [ doc = "Write proxy for field `UART0TXSRC`" ] pub struct UART0TXSRC_W < 'a > { w : & 'a mut W , } impl < 'a > UART0TXSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART0TXSRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "UART0_TX pin" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( UART0TXSRC_A :: _00 ) } # [ doc = "UART0_TX pin modulated with FTM1 channel 0 output" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( UART0TXSRC_A :: _01 ) } # [ doc = "UART0_TX pin modulated with FTM2 channel 0 output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( UART0TXSRC_A :: _10 ) } # [ 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 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "UART 0 receive data source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART0RXSRC_A { # [ doc = "0: UART0_RX pin" ] _00 , # [ doc = "1: CMP0" ] _01 , # [ doc = "2: CMP1" ] _10 } impl From < UART0RXSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : UART0RXSRC_A ) -> Self { match variant { UART0RXSRC_A :: _00 => 0 , UART0RXSRC_A :: _01 => 1 , UART0RXSRC_A :: _10 => 2 } } } # [ doc = "Reader of field `UART0RXSRC`" ] pub type UART0RXSRC_R = crate :: R < u8 , UART0RXSRC_A > ; impl UART0RXSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , UART0RXSRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( UART0RXSRC_A :: _00 ) , 1 => Val ( UART0RXSRC_A :: _01 ) , 2 => Val ( UART0RXSRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == UART0RXSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == UART0RXSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == UART0RXSRC_A :: _10 } } # [ doc = "Write proxy for field `UART0RXSRC`" ] pub struct UART0RXSRC_W < 'a > { w : & 'a mut W , } impl < 'a > UART0RXSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART0RXSRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "UART0_RX pin" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( UART0RXSRC_A :: _00 ) } # [ doc = "CMP0" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( UART0RXSRC_A :: _01 ) } # [ doc = "CMP1" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( UART0RXSRC_A :: _10 ) } # [ 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 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "UART 1 transmit data source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART1TXSRC_A { # [ doc = "0: UART1_TX pin" ] _00 , # [ doc = "1: UART1_TX pin modulated with FTM1 channel 0 output" ] _01 , # [ doc = "2: UART1_TX pin modulated with FTM2 channel 0 output" ] _10 } impl From < UART1TXSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : UART1TXSRC_A ) -> Self { match variant { UART1TXSRC_A :: _00 => 0 , UART1TXSRC_A :: _01 => 1 , UART1TXSRC_A :: _10 => 2 } } } # [ doc = "Reader of field `UART1TXSRC`" ] pub type UART1TXSRC_R = crate :: R < u8 , UART1TXSRC_A > ; impl UART1TXSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , UART1TXSRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( UART1TXSRC_A :: _00 ) , 1 => Val ( UART1TXSRC_A :: _01 ) , 2 => Val ( UART1TXSRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == UART1TXSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == UART1TXSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == UART1TXSRC_A :: _10 } } # [ doc = "Write proxy for field `UART1TXSRC`" ] pub struct UART1TXSRC_W < 'a > { w : & 'a mut W , } impl < 'a > UART1TXSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART1TXSRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "UART1_TX pin" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( UART1TXSRC_A :: _00 ) } # [ doc = "UART1_TX pin modulated with FTM1 channel 0 output" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( UART1TXSRC_A :: _01 ) } # [ doc = "UART1_TX pin modulated with FTM2 channel 0 output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( UART1TXSRC_A :: _10 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "UART 1 receive data source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART1RXSRC_A { # [ doc = "0: UART1_RX pin" ] _00 , # [ doc = "1: CMP0" ] _01 , # [ doc = "2: CMP1" ] _10 } impl From < UART1RXSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : UART1RXSRC_A ) -> Self { match variant { UART1RXSRC_A :: _00 => 0 , UART1RXSRC_A :: _01 => 1 , UART1RXSRC_A :: _10 => 2 } } } # [ doc = "Reader of field `UART1RXSRC`" ] pub type UART1RXSRC_R = crate :: R < u8 , UART1RXSRC_A > ; impl UART1RXSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , UART1RXSRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( UART1RXSRC_A :: _00 ) , 1 => Val ( UART1RXSRC_A :: _01 ) , 2 => Val ( UART1RXSRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == UART1RXSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == UART1RXSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == UART1RXSRC_A :: _10 } } # [ doc = "Write proxy for field `UART1RXSRC`" ] pub struct UART1RXSRC_W < 'a > { w : & 'a mut W , } impl < 'a > UART1RXSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART1RXSRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "UART1_RX pin" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( UART1RXSRC_A :: _00 ) } # [ doc = "CMP0" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( UART1RXSRC_A :: _01 ) } # [ doc = "CMP1" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( UART1RXSRC_A :: _10 ) } # [ 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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "LPUART0 transmit data source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPUART0TXSRC_A { # [ doc = "0: LPUART0_TX pin" ] _00 , # [ doc = "1: LPUART0_TX pin modulated with TPM1 channel 0 output" ] _01 , # [ doc = "2: LPUART0_TX pin modulated with TPM2 channel 0 output" ] _10 } impl From < LPUART0TXSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : LPUART0TXSRC_A ) -> Self { match variant { LPUART0TXSRC_A :: _00 => 0 , LPUART0TXSRC_A :: _01 => 1 , LPUART0TXSRC_A :: _10 => 2 } } } # [ doc = "Reader of field `LPUART0TXSRC`" ] pub type LPUART0TXSRC_R = crate :: R < u8 , LPUART0TXSRC_A > ; impl LPUART0TXSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , LPUART0TXSRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( LPUART0TXSRC_A :: _00 ) , 1 => Val ( LPUART0TXSRC_A :: _01 ) , 2 => Val ( LPUART0TXSRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LPUART0TXSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LPUART0TXSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == LPUART0TXSRC_A :: _10 } } # [ doc = "Write proxy for field `LPUART0TXSRC`" ] pub struct LPUART0TXSRC_W < 'a > { w : & 'a mut W , } impl < 'a > LPUART0TXSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPUART0TXSRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "LPUART0_TX pin" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( LPUART0TXSRC_A :: _00 ) } # [ doc = "LPUART0_TX pin modulated with TPM1 channel 0 output" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( LPUART0TXSRC_A :: _01 ) } # [ doc = "LPUART0_TX pin modulated with TPM2 channel 0 output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( LPUART0TXSRC_A :: _10 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "LPUART0 receive data source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPUART0RXSRC_A { # [ doc = "0: LPUART0_RX pin" ] _00 , # [ doc = "1: CMP0 output" ] _01 , # [ doc = "2: CMP1 output" ] _10 } impl From < LPUART0RXSRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : LPUART0RXSRC_A ) -> Self { match variant { LPUART0RXSRC_A :: _00 => 0 , LPUART0RXSRC_A :: _01 => 1 , LPUART0RXSRC_A :: _10 => 2 } } } # [ doc = "Reader of field `LPUART0RXSRC`" ] pub type LPUART0RXSRC_R = crate :: R < u8 , LPUART0RXSRC_A > ; impl LPUART0RXSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , LPUART0RXSRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( LPUART0RXSRC_A :: _00 ) , 1 => Val ( LPUART0RXSRC_A :: _01 ) , 2 => Val ( LPUART0RXSRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LPUART0RXSRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LPUART0RXSRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == LPUART0RXSRC_A :: _10 } } # [ doc = "Write proxy for field `LPUART0RXSRC`" ] pub struct LPUART0RXSRC_W < 'a > { w : & 'a mut W , } impl < 'a > LPUART0RXSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPUART0RXSRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "LPUART0_RX pin" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( LPUART0RXSRC_A :: _00 ) } # [ doc = "CMP0 output" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( LPUART0RXSRC_A :: _01 ) } # [ doc = "CMP1 output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( LPUART0RXSRC_A :: _10 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - UART 0 transmit data source select" ] # [ inline ( always ) ] pub fn uart0txsrc ( & self ) -> UART0TXSRC_R { UART0TXSRC_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - UART 0 receive data source select" ] # [ inline ( always ) ] pub fn uart0rxsrc ( & self ) -> UART0RXSRC_R { UART0RXSRC_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - UART 1 transmit data source select" ] # [ inline ( always ) ] pub fn uart1txsrc ( & self ) -> UART1TXSRC_R { UART1TXSRC_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - UART 1 receive data source select" ] # [ inline ( always ) ] pub fn uart1rxsrc ( & self ) -> UART1RXSRC_R { UART1RXSRC_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bits 16:17 - LPUART0 transmit data source select" ] # [ inline ( always ) ] pub fn lpuart0txsrc ( & self ) -> LPUART0TXSRC_R { LPUART0TXSRC_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - LPUART0 receive data source select" ] # [ inline ( always ) ] pub fn lpuart0rxsrc ( & self ) -> LPUART0RXSRC_R { LPUART0RXSRC_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - UART 0 transmit data source select" ] # [ inline ( always ) ] pub fn uart0txsrc ( & mut self ) -> UART0TXSRC_W { UART0TXSRC_W { w : self } } # [ doc = "Bits 2:3 - UART 0 receive data source select" ] # [ inline ( always ) ] pub fn uart0rxsrc ( & mut self ) -> UART0RXSRC_W { UART0RXSRC_W { w : self } } # [ doc = "Bits 4:5 - UART 1 transmit data source select" ] # [ inline ( always ) ] pub fn uart1txsrc ( & mut self ) -> UART1TXSRC_W { UART1TXSRC_W { w : self } } # [ doc = "Bits 6:7 - UART 1 receive data source select" ] # [ inline ( always ) ] pub fn uart1rxsrc ( & mut self ) -> UART1RXSRC_W { UART1RXSRC_W { w : self } } # [ doc = "Bits 16:17 - LPUART0 transmit data source select" ] # [ inline ( always ) ] pub fn lpuart0txsrc ( & mut self ) -> LPUART0TXSRC_W { LPUART0TXSRC_W { w : self } } # [ doc = "Bits 18:19 - LPUART0 receive data source select" ] # [ inline ( always ) ] pub fn lpuart0rxsrc ( & mut self ) -> LPUART0RXSRC_W { LPUART0RXSRC_W { w : self } } } } # [ doc = "System Options Register 7\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sopt7](sopt7) module" ] pub type SOPT7 = crate :: Reg < u32 , _SOPT7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOPT7 ; # [ doc = "`read()` method returns [sopt7::R](sopt7::R) reader structure" ] impl crate :: Readable for SOPT7 { } # [ doc = "`write(|w| ..)` method takes [sopt7::W](sopt7::W) writer structure" ] impl crate :: Writable for SOPT7 { } # [ doc = "System Options Register 7" ] pub mod sopt7 { # [ doc = "Reader of register SOPT7" ] pub type R = crate :: R < u32 , super :: SOPT7 > ; # [ doc = "Writer for register SOPT7" ] pub type W = crate :: W < u32 , super :: SOPT7 > ; # [ doc = "Register SOPT7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SOPT7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "ADC0 trigger select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADC0TRGSEL_A { # [ doc = "0: PDB external trigger pin input (PDB0_EXTRG)" ] _0000 , # [ doc = "1: High speed comparator 0 output" ] _0001 , # [ doc = "2: High speed comparator 1 output" ] _0010 , # [ doc = "3: High speed comparator 2 output" ] _0011 , # [ doc = "4: PIT trigger 0" ] _0100 , # [ doc = "5: PIT trigger 1" ] _0101 , # [ doc = "6: PIT trigger 2" ] _0110 , # [ doc = "7: PIT trigger 3" ] _0111 , # [ doc = "8: FTM0 trigger" ] _1000 , # [ doc = "9: FTM1 trigger" ] _1001 , # [ doc = "10: FTM2 trigger" ] _1010 , # [ doc = "11: FTM3 trigger" ] _1011 , # [ doc = "12: RTC alarm" ] _1100 , # [ doc = "13: RTC seconds" ] _1101 , # [ doc = "14: Low-power timer (LPTMR) trigger" ] _1110 , # [ doc = "15: TPM1 channel 0 (A pretrigger) and channel 1 (B pretrigger)" ] _1111 } impl From < ADC0TRGSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADC0TRGSEL_A ) -> Self { match variant { ADC0TRGSEL_A :: _0000 => 0 , ADC0TRGSEL_A :: _0001 => 1 , ADC0TRGSEL_A :: _0010 => 2 , ADC0TRGSEL_A :: _0011 => 3 , ADC0TRGSEL_A :: _0100 => 4 , ADC0TRGSEL_A :: _0101 => 5 , ADC0TRGSEL_A :: _0110 => 6 , ADC0TRGSEL_A :: _0111 => 7 , ADC0TRGSEL_A :: _1000 => 8 , ADC0TRGSEL_A :: _1001 => 9 , ADC0TRGSEL_A :: _1010 => 10 , ADC0TRGSEL_A :: _1011 => 11 , ADC0TRGSEL_A :: _1100 => 12 , ADC0TRGSEL_A :: _1101 => 13 , ADC0TRGSEL_A :: _1110 => 14 , ADC0TRGSEL_A :: _1111 => 15 } } } # [ doc = "Reader of field `ADC0TRGSEL`" ] pub type ADC0TRGSEL_R = crate :: R < u8 , ADC0TRGSEL_A > ; impl ADC0TRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADC0TRGSEL_A { match self . bits { 0 => ADC0TRGSEL_A :: _0000 , 1 => ADC0TRGSEL_A :: _0001 , 2 => ADC0TRGSEL_A :: _0010 , 3 => ADC0TRGSEL_A :: _0011 , 4 => ADC0TRGSEL_A :: _0100 , 5 => ADC0TRGSEL_A :: _0101 , 6 => ADC0TRGSEL_A :: _0110 , 7 => ADC0TRGSEL_A :: _0111 , 8 => ADC0TRGSEL_A :: _1000 , 9 => ADC0TRGSEL_A :: _1001 , 10 => ADC0TRGSEL_A :: _1010 , 11 => ADC0TRGSEL_A :: _1011 , 12 => ADC0TRGSEL_A :: _1100 , 13 => ADC0TRGSEL_A :: _1101 , 14 => ADC0TRGSEL_A :: _1110 , 15 => ADC0TRGSEL_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == ADC0TRGSEL_A :: _1111 } } # [ doc = "Write proxy for field `ADC0TRGSEL`" ] pub struct ADC0TRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > ADC0TRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADC0TRGSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "PDB external trigger pin input (PDB0_EXTRG)" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _0000 ) } # [ doc = "High speed comparator 0 output" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _0001 ) } # [ doc = "High speed comparator 1 output" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _0010 ) } # [ doc = "High speed comparator 2 output" ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _0011 ) } # [ doc = "PIT trigger 0" ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _0100 ) } # [ doc = "PIT trigger 1" ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _0101 ) } # [ doc = "PIT trigger 2" ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _0110 ) } # [ doc = "PIT trigger 3" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _0111 ) } # [ doc = "FTM0 trigger" ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _1000 ) } # [ doc = "FTM1 trigger" ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _1001 ) } # [ doc = "FTM2 trigger" ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _1010 ) } # [ doc = "FTM3 trigger" ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _1011 ) } # [ doc = "RTC alarm" ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _1100 ) } # [ doc = "RTC seconds" ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _1101 ) } # [ doc = "Low-power timer (LPTMR) trigger" ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _1110 ) } # [ doc = "TPM1 channel 0 (A pretrigger) and channel 1 (B pretrigger)" ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( ADC0TRGSEL_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "ADC0 pretrigger select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADC0PRETRGSEL_A { # [ doc = "0: Pre-trigger A" ] _0 , # [ doc = "1: Pre-trigger B" ] _1 } impl From < ADC0PRETRGSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : ADC0PRETRGSEL_A ) -> Self { match variant { ADC0PRETRGSEL_A :: _0 => false , ADC0PRETRGSEL_A :: _1 => true } } } # [ doc = "Reader of field `ADC0PRETRGSEL`" ] pub type ADC0PRETRGSEL_R = crate :: R < bool , ADC0PRETRGSEL_A > ; impl ADC0PRETRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADC0PRETRGSEL_A { match self . bits { false => ADC0PRETRGSEL_A :: _0 , true => ADC0PRETRGSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADC0PRETRGSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADC0PRETRGSEL_A :: _1 } } # [ doc = "Write proxy for field `ADC0PRETRGSEL`" ] pub struct ADC0PRETRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > ADC0PRETRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADC0PRETRGSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pre-trigger A" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADC0PRETRGSEL_A :: _0 ) } # [ doc = "Pre-trigger B" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADC0PRETRGSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "ADC0 alternate trigger enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADC0ALTTRGEN_A { # [ doc = "0: PDB trigger selected for ADC0." ] _0 , # [ doc = "1: Alternate trigger selected for ADC0." ] _1 } impl From < ADC0ALTTRGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ADC0ALTTRGEN_A ) -> Self { match variant { ADC0ALTTRGEN_A :: _0 => false , ADC0ALTTRGEN_A :: _1 => true } } } # [ doc = "Reader of field `ADC0ALTTRGEN`" ] pub type ADC0ALTTRGEN_R = crate :: R < bool , ADC0ALTTRGEN_A > ; impl ADC0ALTTRGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADC0ALTTRGEN_A { match self . bits { false => ADC0ALTTRGEN_A :: _0 , true => ADC0ALTTRGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADC0ALTTRGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADC0ALTTRGEN_A :: _1 } } # [ doc = "Write proxy for field `ADC0ALTTRGEN`" ] pub struct ADC0ALTTRGEN_W < 'a > { w : & 'a mut W , } impl < 'a > ADC0ALTTRGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADC0ALTTRGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB trigger selected for ADC0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADC0ALTTRGEN_A :: _0 ) } # [ doc = "Alternate trigger selected for ADC0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADC0ALTTRGEN_A :: _1 ) } # [ 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 = "ADC1 trigger select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADC1TRGSEL_A { # [ doc = "0: PDB external trigger pin input (PDB0_EXTRG)" ] _0000 , # [ doc = "1: High speed comparator 0 output" ] _0001 , # [ doc = "2: High speed comparator 1 output" ] _0010 , # [ doc = "3: High speed comparator 2 output" ] _0011 , # [ doc = "4: PIT trigger 0" ] _0100 , # [ doc = "5: PIT trigger 1" ] _0101 , # [ doc = "6: PIT trigger 2" ] _0110 , # [ doc = "7: PIT trigger 3" ] _0111 , # [ doc = "8: FTM0 trigger" ] _1000 , # [ doc = "9: FTM1 trigger" ] _1001 , # [ doc = "10: FTM2 trigger" ] _1010 , # [ doc = "11: FTM3 trigger" ] _1011 , # [ doc = "12: RTC alarm" ] _1100 , # [ doc = "13: RTC seconds" ] _1101 , # [ doc = "14: Low-power timer (LPTMR) trigger" ] _1110 , # [ doc = "15: TPM2 channel 0 (A pretrigger) and channel 1 (B pretrigger)" ] _1111 } impl From < ADC1TRGSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADC1TRGSEL_A ) -> Self { match variant { ADC1TRGSEL_A :: _0000 => 0 , ADC1TRGSEL_A :: _0001 => 1 , ADC1TRGSEL_A :: _0010 => 2 , ADC1TRGSEL_A :: _0011 => 3 , ADC1TRGSEL_A :: _0100 => 4 , ADC1TRGSEL_A :: _0101 => 5 , ADC1TRGSEL_A :: _0110 => 6 , ADC1TRGSEL_A :: _0111 => 7 , ADC1TRGSEL_A :: _1000 => 8 , ADC1TRGSEL_A :: _1001 => 9 , ADC1TRGSEL_A :: _1010 => 10 , ADC1TRGSEL_A :: _1011 => 11 , ADC1TRGSEL_A :: _1100 => 12 , ADC1TRGSEL_A :: _1101 => 13 , ADC1TRGSEL_A :: _1110 => 14 , ADC1TRGSEL_A :: _1111 => 15 } } } # [ doc = "Reader of field `ADC1TRGSEL`" ] pub type ADC1TRGSEL_R = crate :: R < u8 , ADC1TRGSEL_A > ; impl ADC1TRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADC1TRGSEL_A { match self . bits { 0 => ADC1TRGSEL_A :: _0000 , 1 => ADC1TRGSEL_A :: _0001 , 2 => ADC1TRGSEL_A :: _0010 , 3 => ADC1TRGSEL_A :: _0011 , 4 => ADC1TRGSEL_A :: _0100 , 5 => ADC1TRGSEL_A :: _0101 , 6 => ADC1TRGSEL_A :: _0110 , 7 => ADC1TRGSEL_A :: _0111 , 8 => ADC1TRGSEL_A :: _1000 , 9 => ADC1TRGSEL_A :: _1001 , 10 => ADC1TRGSEL_A :: _1010 , 11 => ADC1TRGSEL_A :: _1011 , 12 => ADC1TRGSEL_A :: _1100 , 13 => ADC1TRGSEL_A :: _1101 , 14 => ADC1TRGSEL_A :: _1110 , 15 => ADC1TRGSEL_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == ADC1TRGSEL_A :: _1111 } } # [ doc = "Write proxy for field `ADC1TRGSEL`" ] pub struct ADC1TRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > ADC1TRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADC1TRGSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "PDB external trigger pin input (PDB0_EXTRG)" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _0000 ) } # [ doc = "High speed comparator 0 output" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _0001 ) } # [ doc = "High speed comparator 1 output" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _0010 ) } # [ doc = "High speed comparator 2 output" ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _0011 ) } # [ doc = "PIT trigger 0" ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _0100 ) } # [ doc = "PIT trigger 1" ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _0101 ) } # [ doc = "PIT trigger 2" ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _0110 ) } # [ doc = "PIT trigger 3" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _0111 ) } # [ doc = "FTM0 trigger" ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _1000 ) } # [ doc = "FTM1 trigger" ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _1001 ) } # [ doc = "FTM2 trigger" ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _1010 ) } # [ doc = "FTM3 trigger" ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _1011 ) } # [ doc = "RTC alarm" ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _1100 ) } # [ doc = "RTC seconds" ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _1101 ) } # [ doc = "Low-power timer (LPTMR) trigger" ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _1110 ) } # [ doc = "TPM2 channel 0 (A pretrigger) and channel 1 (B pretrigger)" ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( ADC1TRGSEL_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "ADC1 pre-trigger select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADC1PRETRGSEL_A { # [ doc = "0: Pre-trigger A selected for ADC1." ] _0 , # [ doc = "1: Pre-trigger B selected for ADC1." ] _1 } impl From < ADC1PRETRGSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : ADC1PRETRGSEL_A ) -> Self { match variant { ADC1PRETRGSEL_A :: _0 => false , ADC1PRETRGSEL_A :: _1 => true } } } # [ doc = "Reader of field `ADC1PRETRGSEL`" ] pub type ADC1PRETRGSEL_R = crate :: R < bool , ADC1PRETRGSEL_A > ; impl ADC1PRETRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADC1PRETRGSEL_A { match self . bits { false => ADC1PRETRGSEL_A :: _0 , true => ADC1PRETRGSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADC1PRETRGSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADC1PRETRGSEL_A :: _1 } } # [ doc = "Write proxy for field `ADC1PRETRGSEL`" ] pub struct ADC1PRETRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > ADC1PRETRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADC1PRETRGSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pre-trigger A selected for ADC1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADC1PRETRGSEL_A :: _0 ) } # [ doc = "Pre-trigger B selected for ADC1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADC1PRETRGSEL_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "ADC1 alternate trigger enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADC1ALTTRGEN_A { # [ doc = "0: PDB trigger selected for ADC1" ] _0 , # [ doc = "1: Alternate trigger selected for ADC1 as defined by ADC1TRGSEL." ] _1 } impl From < ADC1ALTTRGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ADC1ALTTRGEN_A ) -> Self { match variant { ADC1ALTTRGEN_A :: _0 => false , ADC1ALTTRGEN_A :: _1 => true } } } # [ doc = "Reader of field `ADC1ALTTRGEN`" ] pub type ADC1ALTTRGEN_R = crate :: R < bool , ADC1ALTTRGEN_A > ; impl ADC1ALTTRGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADC1ALTTRGEN_A { match self . bits { false => ADC1ALTTRGEN_A :: _0 , true => ADC1ALTTRGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADC1ALTTRGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADC1ALTTRGEN_A :: _1 } } # [ doc = "Write proxy for field `ADC1ALTTRGEN`" ] pub struct ADC1ALTTRGEN_W < 'a > { w : & 'a mut W , } impl < 'a > ADC1ALTTRGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADC1ALTTRGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PDB trigger selected for ADC1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADC1ALTTRGEN_A :: _0 ) } # [ doc = "Alternate trigger selected for ADC1 as defined by ADC1TRGSEL." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADC1ALTTRGEN_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - ADC0 trigger select" ] # [ inline ( always ) ] pub fn adc0trgsel ( & self ) -> ADC0TRGSEL_R { ADC0TRGSEL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bit 4 - ADC0 pretrigger select" ] # [ inline ( always ) ] pub fn adc0pretrgsel ( & self ) -> ADC0PRETRGSEL_R { ADC0PRETRGSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - ADC0 alternate trigger enable" ] # [ inline ( always ) ] pub fn adc0alttrgen ( & self ) -> ADC0ALTTRGEN_R { ADC0ALTTRGEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - ADC1 trigger select" ] # [ inline ( always ) ] pub fn adc1trgsel ( & self ) -> ADC1TRGSEL_R { ADC1TRGSEL_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bit 12 - ADC1 pre-trigger select" ] # [ inline ( always ) ] pub fn adc1pretrgsel ( & self ) -> ADC1PRETRGSEL_R { ADC1PRETRGSEL_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - ADC1 alternate trigger enable" ] # [ inline ( always ) ] pub fn adc1alttrgen ( & self ) -> ADC1ALTTRGEN_R { ADC1ALTTRGEN_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - ADC0 trigger select" ] # [ inline ( always ) ] pub fn adc0trgsel ( & mut self ) -> ADC0TRGSEL_W { ADC0TRGSEL_W { w : self } } # [ doc = "Bit 4 - ADC0 pretrigger select" ] # [ inline ( always ) ] pub fn adc0pretrgsel ( & mut self ) -> ADC0PRETRGSEL_W { ADC0PRETRGSEL_W { w : self } } # [ doc = "Bit 7 - ADC0 alternate trigger enable" ] # [ inline ( always ) ] pub fn adc0alttrgen ( & mut self ) -> ADC0ALTTRGEN_W { ADC0ALTTRGEN_W { w : self } } # [ doc = "Bits 8:11 - ADC1 trigger select" ] # [ inline ( always ) ] pub fn adc1trgsel ( & mut self ) -> ADC1TRGSEL_W { ADC1TRGSEL_W { w : self } } # [ doc = "Bit 12 - ADC1 pre-trigger select" ] # [ inline ( always ) ] pub fn adc1pretrgsel ( & mut self ) -> ADC1PRETRGSEL_W { ADC1PRETRGSEL_W { w : self } } # [ doc = "Bit 15 - ADC1 alternate trigger enable" ] # [ inline ( always ) ] pub fn adc1alttrgen ( & mut self ) -> ADC1ALTTRGEN_W { ADC1ALTTRGEN_W { w : self } } } } # [ doc = "System Options Register 8\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sopt8](sopt8) module" ] pub type SOPT8 = crate :: Reg < u32 , _SOPT8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOPT8 ; # [ doc = "`read()` method returns [sopt8::R](sopt8::R) reader structure" ] impl crate :: Readable for SOPT8 { } # [ doc = "`write(|w| ..)` method takes [sopt8::W](sopt8::W) writer structure" ] impl crate :: Writable for SOPT8 { } # [ doc = "System Options Register 8" ] pub mod sopt8 { # [ doc = "Reader of register SOPT8" ] pub type R = crate :: R < u32 , super :: SOPT8 > ; # [ doc = "Writer for register SOPT8" ] pub type W = crate :: W < u32 , super :: SOPT8 > ; # [ doc = "Register SOPT8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SOPT8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "FTM0 Hardware Trigger 0 Software Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0SYNCBIT_A { # [ doc = "0: No effect" ] _0 , # [ doc = "1: Write 1 to assert the TRIG0 input to FTM0, software must clear this bit to allow other trigger sources to assert." ] _1 } impl From < FTM0SYNCBIT_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0SYNCBIT_A ) -> Self { match variant { FTM0SYNCBIT_A :: _0 => false , FTM0SYNCBIT_A :: _1 => true } } } # [ doc = "Reader of field `FTM0SYNCBIT`" ] pub type FTM0SYNCBIT_R = crate :: R < bool , FTM0SYNCBIT_A > ; impl FTM0SYNCBIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0SYNCBIT_A { match self . bits { false => FTM0SYNCBIT_A :: _0 , true => FTM0SYNCBIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0SYNCBIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0SYNCBIT_A :: _1 } } # [ doc = "Write proxy for field `FTM0SYNCBIT`" ] pub struct FTM0SYNCBIT_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0SYNCBIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0SYNCBIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0SYNCBIT_A :: _0 ) } # [ doc = "Write 1 to assert the TRIG0 input to FTM0, software must clear this bit to allow other trigger sources to assert." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0SYNCBIT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "FTM1 Hardware Trigger 0 Software Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM1SYNCBIT_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Write 1 to assert the TRIG0 input to FTM1, software must clear this bit to allow other trigger sources to assert." ] _1 } impl From < FTM1SYNCBIT_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM1SYNCBIT_A ) -> Self { match variant { FTM1SYNCBIT_A :: _0 => false , FTM1SYNCBIT_A :: _1 => true } } } # [ doc = "Reader of field `FTM1SYNCBIT`" ] pub type FTM1SYNCBIT_R = crate :: R < bool , FTM1SYNCBIT_A > ; impl FTM1SYNCBIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM1SYNCBIT_A { match self . bits { false => FTM1SYNCBIT_A :: _0 , true => FTM1SYNCBIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM1SYNCBIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM1SYNCBIT_A :: _1 } } # [ doc = "Write proxy for field `FTM1SYNCBIT`" ] pub struct FTM1SYNCBIT_W < 'a > { w : & 'a mut W , } impl < 'a > FTM1SYNCBIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM1SYNCBIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM1SYNCBIT_A :: _0 ) } # [ doc = "Write 1 to assert the TRIG0 input to FTM1, software must clear this bit to allow other trigger sources to assert." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM1SYNCBIT_A :: _1 ) } # [ 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 } } # [ doc = "FTM2 Hardware Trigger 0 Software Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM2SYNCBIT_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Write 1 to assert the TRIG0 input to FTM2, software must clear this bit to allow other trigger sources to assert." ] _1 } impl From < FTM2SYNCBIT_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM2SYNCBIT_A ) -> Self { match variant { FTM2SYNCBIT_A :: _0 => false , FTM2SYNCBIT_A :: _1 => true } } } # [ doc = "Reader of field `FTM2SYNCBIT`" ] pub type FTM2SYNCBIT_R = crate :: R < bool , FTM2SYNCBIT_A > ; impl FTM2SYNCBIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM2SYNCBIT_A { match self . bits { false => FTM2SYNCBIT_A :: _0 , true => FTM2SYNCBIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM2SYNCBIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM2SYNCBIT_A :: _1 } } # [ doc = "Write proxy for field `FTM2SYNCBIT`" ] pub struct FTM2SYNCBIT_W < 'a > { w : & 'a mut W , } impl < 'a > FTM2SYNCBIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM2SYNCBIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM2SYNCBIT_A :: _0 ) } # [ doc = "Write 1 to assert the TRIG0 input to FTM2, software must clear this bit to allow other trigger sources to assert." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM2SYNCBIT_A :: _1 ) } # [ 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 = "FTM3 Hardware Trigger 0 Software Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3SYNCBIT_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Write 1 to assert the TRIG0 input to FTM3, software must clear this bit to allow other trigger sources to assert." ] _1 } impl From < FTM3SYNCBIT_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3SYNCBIT_A ) -> Self { match variant { FTM3SYNCBIT_A :: _0 => false , FTM3SYNCBIT_A :: _1 => true } } } # [ doc = "Reader of field `FTM3SYNCBIT`" ] pub type FTM3SYNCBIT_R = crate :: R < bool , FTM3SYNCBIT_A > ; impl FTM3SYNCBIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3SYNCBIT_A { match self . bits { false => FTM3SYNCBIT_A :: _0 , true => FTM3SYNCBIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3SYNCBIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3SYNCBIT_A :: _1 } } # [ doc = "Write proxy for field `FTM3SYNCBIT`" ] pub struct FTM3SYNCBIT_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3SYNCBIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3SYNCBIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3SYNCBIT_A :: _0 ) } # [ doc = "Write 1 to assert the TRIG0 input to FTM3, software must clear this bit to allow other trigger sources to assert." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3SYNCBIT_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "FTM0 channel 0 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0OCH0SRC_A { # [ doc = "0: FTM0_CH0 pin is output of FTM0 channel 0 output" ] _0 , # [ doc = "1: FTM0_CH0 pin is output of FTM0 channel 0 output, modulated by FTM1 channel 1 output" ] _1 } impl From < FTM0OCH0SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0OCH0SRC_A ) -> Self { match variant { FTM0OCH0SRC_A :: _0 => false , FTM0OCH0SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0OCH0SRC`" ] pub type FTM0OCH0SRC_R = crate :: R < bool , FTM0OCH0SRC_A > ; impl FTM0OCH0SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0OCH0SRC_A { match self . bits { false => FTM0OCH0SRC_A :: _0 , true => FTM0OCH0SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0OCH0SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0OCH0SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0OCH0SRC`" ] pub struct FTM0OCH0SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0OCH0SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0OCH0SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_CH0 pin is output of FTM0 channel 0 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0OCH0SRC_A :: _0 ) } # [ doc = "FTM0_CH0 pin is output of FTM0 channel 0 output, modulated by FTM1 channel 1 output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0OCH0SRC_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "FTM0 channel 1 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0OCH1SRC_A { # [ doc = "0: FTM0_CH1 pin is output of FTM0 channel 1 output" ] _0 , # [ doc = "1: FTM0_CH1 pin is output of FTM0 channel 1 output, modulated by FTM1 channel 1 output" ] _1 } impl From < FTM0OCH1SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0OCH1SRC_A ) -> Self { match variant { FTM0OCH1SRC_A :: _0 => false , FTM0OCH1SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0OCH1SRC`" ] pub type FTM0OCH1SRC_R = crate :: R < bool , FTM0OCH1SRC_A > ; impl FTM0OCH1SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0OCH1SRC_A { match self . bits { false => FTM0OCH1SRC_A :: _0 , true => FTM0OCH1SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0OCH1SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0OCH1SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0OCH1SRC`" ] pub struct FTM0OCH1SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0OCH1SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0OCH1SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_CH1 pin is output of FTM0 channel 1 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0OCH1SRC_A :: _0 ) } # [ doc = "FTM0_CH1 pin is output of FTM0 channel 1 output, modulated by FTM1 channel 1 output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0OCH1SRC_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "FTM0 channel 2 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0OCH2SRC_A { # [ doc = "0: FTM0_CH2 pin is output of FTM0 channel 2 output" ] _0 , # [ doc = "1: FTM0_CH2 pin is output of FTM0 channel 2 output, modulated by FTM1 channel 1 output" ] _1 } impl From < FTM0OCH2SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0OCH2SRC_A ) -> Self { match variant { FTM0OCH2SRC_A :: _0 => false , FTM0OCH2SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0OCH2SRC`" ] pub type FTM0OCH2SRC_R = crate :: R < bool , FTM0OCH2SRC_A > ; impl FTM0OCH2SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0OCH2SRC_A { match self . bits { false => FTM0OCH2SRC_A :: _0 , true => FTM0OCH2SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0OCH2SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0OCH2SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0OCH2SRC`" ] pub struct FTM0OCH2SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0OCH2SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0OCH2SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_CH2 pin is output of FTM0 channel 2 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0OCH2SRC_A :: _0 ) } # [ doc = "FTM0_CH2 pin is output of FTM0 channel 2 output, modulated by FTM1 channel 1 output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0OCH2SRC_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "FTM0 channel 3 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0OCH3SRC_A { # [ doc = "0: FTM0_CH3 pin is output of FTM0 channel 3 output" ] _0 , # [ doc = "1: FTM0_CH3 pin is output of FTM0 channel 3 output, modulated by FTM1 channel 1 output" ] _1 } impl From < FTM0OCH3SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0OCH3SRC_A ) -> Self { match variant { FTM0OCH3SRC_A :: _0 => false , FTM0OCH3SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0OCH3SRC`" ] pub type FTM0OCH3SRC_R = crate :: R < bool , FTM0OCH3SRC_A > ; impl FTM0OCH3SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0OCH3SRC_A { match self . bits { false => FTM0OCH3SRC_A :: _0 , true => FTM0OCH3SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0OCH3SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0OCH3SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0OCH3SRC`" ] pub struct FTM0OCH3SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0OCH3SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0OCH3SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_CH3 pin is output of FTM0 channel 3 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0OCH3SRC_A :: _0 ) } # [ doc = "FTM0_CH3 pin is output of FTM0 channel 3 output, modulated by FTM1 channel 1 output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0OCH3SRC_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "FTM0 channel 4 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0OCH4SRC_A { # [ doc = "0: FTM0_CH4 pin is output of FTM0 channel 4 output" ] _0 , # [ doc = "1: FTM0_CH4 pin is output of FTM0 channel 4 output, modulated by FTM1 channel 1 output" ] _1 } impl From < FTM0OCH4SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0OCH4SRC_A ) -> Self { match variant { FTM0OCH4SRC_A :: _0 => false , FTM0OCH4SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0OCH4SRC`" ] pub type FTM0OCH4SRC_R = crate :: R < bool , FTM0OCH4SRC_A > ; impl FTM0OCH4SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0OCH4SRC_A { match self . bits { false => FTM0OCH4SRC_A :: _0 , true => FTM0OCH4SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0OCH4SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0OCH4SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0OCH4SRC`" ] pub struct FTM0OCH4SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0OCH4SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0OCH4SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_CH4 pin is output of FTM0 channel 4 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0OCH4SRC_A :: _0 ) } # [ doc = "FTM0_CH4 pin is output of FTM0 channel 4 output, modulated by FTM1 channel 1 output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0OCH4SRC_A :: _1 ) } # [ 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 = "FTM0 channel 5 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0OCH5SRC_A { # [ doc = "0: FTM0_CH5 pin is output of FTM0 channel 5 output" ] _0 , # [ doc = "1: FTM0_CH5 pin is output of FTM0 channel 5 output, modulated by FTM1 channel 1 output" ] _1 } impl From < FTM0OCH5SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0OCH5SRC_A ) -> Self { match variant { FTM0OCH5SRC_A :: _0 => false , FTM0OCH5SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0OCH5SRC`" ] pub type FTM0OCH5SRC_R = crate :: R < bool , FTM0OCH5SRC_A > ; impl FTM0OCH5SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0OCH5SRC_A { match self . bits { false => FTM0OCH5SRC_A :: _0 , true => FTM0OCH5SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0OCH5SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0OCH5SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0OCH5SRC`" ] pub struct FTM0OCH5SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0OCH5SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0OCH5SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_CH5 pin is output of FTM0 channel 5 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0OCH5SRC_A :: _0 ) } # [ doc = "FTM0_CH5 pin is output of FTM0 channel 5 output, modulated by FTM1 channel 1 output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0OCH5SRC_A :: _1 ) } # [ 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 = "FTM0 channel 6 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0OCH6SRC_A { # [ doc = "0: FTM0_CH6 pin is output of FTM0 channel 6 output" ] _0 , # [ doc = "1: FTM0_CH6 pin is output of FTM0 channel 6 output, modulated by FTM1 channel 1 output" ] _1 } impl From < FTM0OCH6SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0OCH6SRC_A ) -> Self { match variant { FTM0OCH6SRC_A :: _0 => false , FTM0OCH6SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0OCH6SRC`" ] pub type FTM0OCH6SRC_R = crate :: R < bool , FTM0OCH6SRC_A > ; impl FTM0OCH6SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0OCH6SRC_A { match self . bits { false => FTM0OCH6SRC_A :: _0 , true => FTM0OCH6SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0OCH6SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0OCH6SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0OCH6SRC`" ] pub struct FTM0OCH6SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0OCH6SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0OCH6SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_CH6 pin is output of FTM0 channel 6 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0OCH6SRC_A :: _0 ) } # [ doc = "FTM0_CH6 pin is output of FTM0 channel 6 output, modulated by FTM1 channel 1 output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0OCH6SRC_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "FTM0 channel 7 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0OCH7SRC_A { # [ doc = "0: FTM0_CH7 pin is output of FTM0 channel 7 output" ] _0 , # [ doc = "1: FTM0_CH7 pin is output of FTM0 channel 7 output, modulated by FTM1 channel 1 output" ] _1 } impl From < FTM0OCH7SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0OCH7SRC_A ) -> Self { match variant { FTM0OCH7SRC_A :: _0 => false , FTM0OCH7SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM0OCH7SRC`" ] pub type FTM0OCH7SRC_R = crate :: R < bool , FTM0OCH7SRC_A > ; impl FTM0OCH7SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0OCH7SRC_A { match self . bits { false => FTM0OCH7SRC_A :: _0 , true => FTM0OCH7SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0OCH7SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0OCH7SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM0OCH7SRC`" ] pub struct FTM0OCH7SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0OCH7SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0OCH7SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM0_CH7 pin is output of FTM0 channel 7 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0OCH7SRC_A :: _0 ) } # [ doc = "FTM0_CH7 pin is output of FTM0 channel 7 output, modulated by FTM1 channel 1 output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0OCH7SRC_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "FTM3 channel 0 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3OCH0SRC_A { # [ doc = "0: FTM3_CH0 pin is output of FTM3 channel 0 output" ] _0 , # [ doc = "1: FTM3_CH0 pin is output of FTM3 channel 0 output modulated by FTM2 channel 1 output." ] _1 } impl From < FTM3OCH0SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3OCH0SRC_A ) -> Self { match variant { FTM3OCH0SRC_A :: _0 => false , FTM3OCH0SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3OCH0SRC`" ] pub type FTM3OCH0SRC_R = crate :: R < bool , FTM3OCH0SRC_A > ; impl FTM3OCH0SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3OCH0SRC_A { match self . bits { false => FTM3OCH0SRC_A :: _0 , true => FTM3OCH0SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3OCH0SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3OCH0SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3OCH0SRC`" ] pub struct FTM3OCH0SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3OCH0SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3OCH0SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_CH0 pin is output of FTM3 channel 0 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3OCH0SRC_A :: _0 ) } # [ doc = "FTM3_CH0 pin is output of FTM3 channel 0 output modulated by FTM2 channel 1 output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3OCH0SRC_A :: _1 ) } # [ 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 = "FTM3 channel 1 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3OCH1SRC_A { # [ doc = "0: FTM3_CH1 pin is output of FTM3 channel 1 output" ] _0 , # [ doc = "1: FTM3_CH1 pin is output of FTM3 channel 1 output modulated by FTM2 channel 1 output." ] _1 } impl From < FTM3OCH1SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3OCH1SRC_A ) -> Self { match variant { FTM3OCH1SRC_A :: _0 => false , FTM3OCH1SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3OCH1SRC`" ] pub type FTM3OCH1SRC_R = crate :: R < bool , FTM3OCH1SRC_A > ; impl FTM3OCH1SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3OCH1SRC_A { match self . bits { false => FTM3OCH1SRC_A :: _0 , true => FTM3OCH1SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3OCH1SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3OCH1SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3OCH1SRC`" ] pub struct FTM3OCH1SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3OCH1SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3OCH1SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_CH1 pin is output of FTM3 channel 1 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3OCH1SRC_A :: _0 ) } # [ doc = "FTM3_CH1 pin is output of FTM3 channel 1 output modulated by FTM2 channel 1 output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3OCH1SRC_A :: _1 ) } # [ 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 = "FTM3 channel 2 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3OCH2SRC_A { # [ doc = "0: FTM3_CH2 pin is output of FTM3 channel 2 output" ] _0 , # [ doc = "1: FTM3_CH2 pin is output of FTM3 channel 2 output modulated by FTM2 channel 1 output." ] _1 } impl From < FTM3OCH2SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3OCH2SRC_A ) -> Self { match variant { FTM3OCH2SRC_A :: _0 => false , FTM3OCH2SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3OCH2SRC`" ] pub type FTM3OCH2SRC_R = crate :: R < bool , FTM3OCH2SRC_A > ; impl FTM3OCH2SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3OCH2SRC_A { match self . bits { false => FTM3OCH2SRC_A :: _0 , true => FTM3OCH2SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3OCH2SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3OCH2SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3OCH2SRC`" ] pub struct FTM3OCH2SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3OCH2SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3OCH2SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_CH2 pin is output of FTM3 channel 2 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3OCH2SRC_A :: _0 ) } # [ doc = "FTM3_CH2 pin is output of FTM3 channel 2 output modulated by FTM2 channel 1 output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3OCH2SRC_A :: _1 ) } # [ 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 = "FTM3 channel 3 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3OCH3SRC_A { # [ doc = "0: FTM3_CH3 pin is output of FTM3 channel 3 output" ] _0 , # [ doc = "1: FTM3_CH3 pin is output of FTM3 channel 3 output modulated by FTM2 channel 1 output." ] _1 } impl From < FTM3OCH3SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3OCH3SRC_A ) -> Self { match variant { FTM3OCH3SRC_A :: _0 => false , FTM3OCH3SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3OCH3SRC`" ] pub type FTM3OCH3SRC_R = crate :: R < bool , FTM3OCH3SRC_A > ; impl FTM3OCH3SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3OCH3SRC_A { match self . bits { false => FTM3OCH3SRC_A :: _0 , true => FTM3OCH3SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3OCH3SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3OCH3SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3OCH3SRC`" ] pub struct FTM3OCH3SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3OCH3SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3OCH3SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_CH3 pin is output of FTM3 channel 3 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3OCH3SRC_A :: _0 ) } # [ doc = "FTM3_CH3 pin is output of FTM3 channel 3 output modulated by FTM2 channel 1 output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3OCH3SRC_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "FTM3 channel 4 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3OCH4SRC_A { # [ doc = "0: FTM3_CH4 pin is output of FTM3 channel 4 output" ] _0 , # [ doc = "1: FTM3_CH4 pin is output of FTM3 channel 4 output modulated by FTM2 channel 1 output." ] _1 } impl From < FTM3OCH4SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3OCH4SRC_A ) -> Self { match variant { FTM3OCH4SRC_A :: _0 => false , FTM3OCH4SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3OCH4SRC`" ] pub type FTM3OCH4SRC_R = crate :: R < bool , FTM3OCH4SRC_A > ; impl FTM3OCH4SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3OCH4SRC_A { match self . bits { false => FTM3OCH4SRC_A :: _0 , true => FTM3OCH4SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3OCH4SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3OCH4SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3OCH4SRC`" ] pub struct FTM3OCH4SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3OCH4SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3OCH4SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_CH4 pin is output of FTM3 channel 4 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3OCH4SRC_A :: _0 ) } # [ doc = "FTM3_CH4 pin is output of FTM3 channel 4 output modulated by FTM2 channel 1 output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3OCH4SRC_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "FTM3 channel 5 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3OCH5SRC_A { # [ doc = "0: FTM3_CH5 pin is output of FTM3 channel 5 output" ] _0 , # [ doc = "1: FTM3_CH5 pin is output of FTM3 channel 5 output modulated by FTM2 channel 1 output." ] _1 } impl From < FTM3OCH5SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3OCH5SRC_A ) -> Self { match variant { FTM3OCH5SRC_A :: _0 => false , FTM3OCH5SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3OCH5SRC`" ] pub type FTM3OCH5SRC_R = crate :: R < bool , FTM3OCH5SRC_A > ; impl FTM3OCH5SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3OCH5SRC_A { match self . bits { false => FTM3OCH5SRC_A :: _0 , true => FTM3OCH5SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3OCH5SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3OCH5SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3OCH5SRC`" ] pub struct FTM3OCH5SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3OCH5SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3OCH5SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_CH5 pin is output of FTM3 channel 5 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3OCH5SRC_A :: _0 ) } # [ doc = "FTM3_CH5 pin is output of FTM3 channel 5 output modulated by FTM2 channel 1 output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3OCH5SRC_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "FTM3 channel 6 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3OCH6SRC_A { # [ doc = "0: FTM3_CH6 pin is output of FTM3 channel 6 output" ] _0 , # [ doc = "1: FTM3_CH6 pin is output of FTM3 channel 6 output modulated by FTM2 channel 1 output." ] _1 } impl From < FTM3OCH6SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3OCH6SRC_A ) -> Self { match variant { FTM3OCH6SRC_A :: _0 => false , FTM3OCH6SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3OCH6SRC`" ] pub type FTM3OCH6SRC_R = crate :: R < bool , FTM3OCH6SRC_A > ; impl FTM3OCH6SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3OCH6SRC_A { match self . bits { false => FTM3OCH6SRC_A :: _0 , true => FTM3OCH6SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3OCH6SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3OCH6SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3OCH6SRC`" ] pub struct FTM3OCH6SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3OCH6SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3OCH6SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_CH6 pin is output of FTM3 channel 6 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3OCH6SRC_A :: _0 ) } # [ doc = "FTM3_CH6 pin is output of FTM3 channel 6 output modulated by FTM2 channel 1 output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3OCH6SRC_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "FTM3 channel 7 output source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3OCH7SRC_A { # [ doc = "0: FTM3_CH7 pin is output of FTM3 channel 7 output" ] _0 , # [ doc = "1: FTM3_CH7 pin is output of FTM3 channel 7 output modulated by FTM2 channel 1 output." ] _1 } impl From < FTM3OCH7SRC_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3OCH7SRC_A ) -> Self { match variant { FTM3OCH7SRC_A :: _0 => false , FTM3OCH7SRC_A :: _1 => true } } } # [ doc = "Reader of field `FTM3OCH7SRC`" ] pub type FTM3OCH7SRC_R = crate :: R < bool , FTM3OCH7SRC_A > ; impl FTM3OCH7SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3OCH7SRC_A { match self . bits { false => FTM3OCH7SRC_A :: _0 , true => FTM3OCH7SRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3OCH7SRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3OCH7SRC_A :: _1 } } # [ doc = "Write proxy for field `FTM3OCH7SRC`" ] pub struct FTM3OCH7SRC_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3OCH7SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3OCH7SRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FTM3_CH7 pin is output of FTM3 channel 7 output" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3OCH7SRC_A :: _0 ) } # [ doc = "FTM3_CH7 pin is output of FTM3 channel 7 output modulated by FTM2 channel 1 output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3OCH7SRC_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - FTM0 Hardware Trigger 0 Software Synchronization" ] # [ inline ( always ) ] pub fn ftm0syncbit ( & self ) -> FTM0SYNCBIT_R { FTM0SYNCBIT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - FTM1 Hardware Trigger 0 Software Synchronization" ] # [ inline ( always ) ] pub fn ftm1syncbit ( & self ) -> FTM1SYNCBIT_R { FTM1SYNCBIT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FTM2 Hardware Trigger 0 Software Synchronization" ] # [ inline ( always ) ] pub fn ftm2syncbit ( & self ) -> FTM2SYNCBIT_R { FTM2SYNCBIT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - FTM3 Hardware Trigger 0 Software Synchronization" ] # [ inline ( always ) ] pub fn ftm3syncbit ( & self ) -> FTM3SYNCBIT_R { FTM3SYNCBIT_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - FTM0 channel 0 output source" ] # [ inline ( always ) ] pub fn ftm0och0src ( & self ) -> FTM0OCH0SRC_R { FTM0OCH0SRC_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - FTM0 channel 1 output source" ] # [ inline ( always ) ] pub fn ftm0och1src ( & self ) -> FTM0OCH1SRC_R { FTM0OCH1SRC_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - FTM0 channel 2 output source" ] # [ inline ( always ) ] pub fn ftm0och2src ( & self ) -> FTM0OCH2SRC_R { FTM0OCH2SRC_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - FTM0 channel 3 output source" ] # [ inline ( always ) ] pub fn ftm0och3src ( & self ) -> FTM0OCH3SRC_R { FTM0OCH3SRC_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - FTM0 channel 4 output source" ] # [ inline ( always ) ] pub fn ftm0och4src ( & self ) -> FTM0OCH4SRC_R { FTM0OCH4SRC_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - FTM0 channel 5 output source" ] # [ inline ( always ) ] pub fn ftm0och5src ( & self ) -> FTM0OCH5SRC_R { FTM0OCH5SRC_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - FTM0 channel 6 output source" ] # [ inline ( always ) ] pub fn ftm0och6src ( & self ) -> FTM0OCH6SRC_R { FTM0OCH6SRC_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - FTM0 channel 7 output source" ] # [ inline ( always ) ] pub fn ftm0och7src ( & self ) -> FTM0OCH7SRC_R { FTM0OCH7SRC_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - FTM3 channel 0 output source" ] # [ inline ( always ) ] pub fn ftm3och0src ( & self ) -> FTM3OCH0SRC_R { FTM3OCH0SRC_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - FTM3 channel 1 output source" ] # [ inline ( always ) ] pub fn ftm3och1src ( & self ) -> FTM3OCH1SRC_R { FTM3OCH1SRC_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - FTM3 channel 2 output source" ] # [ inline ( always ) ] pub fn ftm3och2src ( & self ) -> FTM3OCH2SRC_R { FTM3OCH2SRC_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - FTM3 channel 3 output source" ] # [ inline ( always ) ] pub fn ftm3och3src ( & self ) -> FTM3OCH3SRC_R { FTM3OCH3SRC_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - FTM3 channel 4 output source" ] # [ inline ( always ) ] pub fn ftm3och4src ( & self ) -> FTM3OCH4SRC_R { FTM3OCH4SRC_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - FTM3 channel 5 output source" ] # [ inline ( always ) ] pub fn ftm3och5src ( & self ) -> FTM3OCH5SRC_R { FTM3OCH5SRC_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - FTM3 channel 6 output source" ] # [ inline ( always ) ] pub fn ftm3och6src ( & self ) -> FTM3OCH6SRC_R { FTM3OCH6SRC_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - FTM3 channel 7 output source" ] # [ inline ( always ) ] pub fn ftm3och7src ( & self ) -> FTM3OCH7SRC_R { FTM3OCH7SRC_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FTM0 Hardware Trigger 0 Software Synchronization" ] # [ inline ( always ) ] pub fn ftm0syncbit ( & mut self ) -> FTM0SYNCBIT_W { FTM0SYNCBIT_W { w : self } } # [ doc = "Bit 1 - FTM1 Hardware Trigger 0 Software Synchronization" ] # [ inline ( always ) ] pub fn ftm1syncbit ( & mut self ) -> FTM1SYNCBIT_W { FTM1SYNCBIT_W { w : self } } # [ doc = "Bit 2 - FTM2 Hardware Trigger 0 Software Synchronization" ] # [ inline ( always ) ] pub fn ftm2syncbit ( & mut self ) -> FTM2SYNCBIT_W { FTM2SYNCBIT_W { w : self } } # [ doc = "Bit 3 - FTM3 Hardware Trigger 0 Software Synchronization" ] # [ inline ( always ) ] pub fn ftm3syncbit ( & mut self ) -> FTM3SYNCBIT_W { FTM3SYNCBIT_W { w : self } } # [ doc = "Bit 16 - FTM0 channel 0 output source" ] # [ inline ( always ) ] pub fn ftm0och0src ( & mut self ) -> FTM0OCH0SRC_W { FTM0OCH0SRC_W { w : self } } # [ doc = "Bit 17 - FTM0 channel 1 output source" ] # [ inline ( always ) ] pub fn ftm0och1src ( & mut self ) -> FTM0OCH1SRC_W { FTM0OCH1SRC_W { w : self } } # [ doc = "Bit 18 - FTM0 channel 2 output source" ] # [ inline ( always ) ] pub fn ftm0och2src ( & mut self ) -> FTM0OCH2SRC_W { FTM0OCH2SRC_W { w : self } } # [ doc = "Bit 19 - FTM0 channel 3 output source" ] # [ inline ( always ) ] pub fn ftm0och3src ( & mut self ) -> FTM0OCH3SRC_W { FTM0OCH3SRC_W { w : self } } # [ doc = "Bit 20 - FTM0 channel 4 output source" ] # [ inline ( always ) ] pub fn ftm0och4src ( & mut self ) -> FTM0OCH4SRC_W { FTM0OCH4SRC_W { w : self } } # [ doc = "Bit 21 - FTM0 channel 5 output source" ] # [ inline ( always ) ] pub fn ftm0och5src ( & mut self ) -> FTM0OCH5SRC_W { FTM0OCH5SRC_W { w : self } } # [ doc = "Bit 22 - FTM0 channel 6 output source" ] # [ inline ( always ) ] pub fn ftm0och6src ( & mut self ) -> FTM0OCH6SRC_W { FTM0OCH6SRC_W { w : self } } # [ doc = "Bit 23 - FTM0 channel 7 output source" ] # [ inline ( always ) ] pub fn ftm0och7src ( & mut self ) -> FTM0OCH7SRC_W { FTM0OCH7SRC_W { w : self } } # [ doc = "Bit 24 - FTM3 channel 0 output source" ] # [ inline ( always ) ] pub fn ftm3och0src ( & mut self ) -> FTM3OCH0SRC_W { FTM3OCH0SRC_W { w : self } } # [ doc = "Bit 25 - FTM3 channel 1 output source" ] # [ inline ( always ) ] pub fn ftm3och1src ( & mut self ) -> FTM3OCH1SRC_W { FTM3OCH1SRC_W { w : self } } # [ doc = "Bit 26 - FTM3 channel 2 output source" ] # [ inline ( always ) ] pub fn ftm3och2src ( & mut self ) -> FTM3OCH2SRC_W { FTM3OCH2SRC_W { w : self } } # [ doc = "Bit 27 - FTM3 channel 3 output source" ] # [ inline ( always ) ] pub fn ftm3och3src ( & mut self ) -> FTM3OCH3SRC_W { FTM3OCH3SRC_W { w : self } } # [ doc = "Bit 28 - FTM3 channel 4 output source" ] # [ inline ( always ) ] pub fn ftm3och4src ( & mut self ) -> FTM3OCH4SRC_W { FTM3OCH4SRC_W { w : self } } # [ doc = "Bit 29 - FTM3 channel 5 output source" ] # [ inline ( always ) ] pub fn ftm3och5src ( & mut self ) -> FTM3OCH5SRC_W { FTM3OCH5SRC_W { w : self } } # [ doc = "Bit 30 - FTM3 channel 6 output source" ] # [ inline ( always ) ] pub fn ftm3och6src ( & mut self ) -> FTM3OCH6SRC_W { FTM3OCH6SRC_W { w : self } } # [ doc = "Bit 31 - FTM3 channel 7 output source" ] # [ inline ( always ) ] pub fn ftm3och7src ( & mut self ) -> FTM3OCH7SRC_W { FTM3OCH7SRC_W { w : self } } } } # [ doc = "System Options Register 9\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sopt9](sopt9) module" ] pub type SOPT9 = crate :: Reg < u32 , _SOPT9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOPT9 ; # [ doc = "`read()` method returns [sopt9::R](sopt9::R) reader structure" ] impl crate :: Readable for SOPT9 { } # [ doc = "`write(|w| ..)` method takes [sopt9::W](sopt9::W) writer structure" ] impl crate :: Writable for SOPT9 { } # [ doc = "System Options Register 9" ] pub mod sopt9 { # [ doc = "Reader of register SOPT9" ] pub type R = crate :: R < u32 , super :: SOPT9 > ; # [ doc = "Writer for register SOPT9" ] pub type W = crate :: W < u32 , super :: SOPT9 > ; # [ doc = "Register SOPT9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SOPT9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "TPM1 channel 0 input capture source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPM1CH0SRC_A { # [ doc = "0: TPM1_CH0 signal" ] _00 , # [ doc = "1: CMP0 output" ] _01 , # [ doc = "2: CMP1 output" ] _10 } impl From < TPM1CH0SRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : TPM1CH0SRC_A ) -> Self { match variant { TPM1CH0SRC_A :: _00 => 0 , TPM1CH0SRC_A :: _01 => 1 , TPM1CH0SRC_A :: _10 => 2 } } } # [ doc = "Reader of field `TPM1CH0SRC`" ] pub type TPM1CH0SRC_R = crate :: R < u8 , TPM1CH0SRC_A > ; impl TPM1CH0SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TPM1CH0SRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TPM1CH0SRC_A :: _00 ) , 1 => Val ( TPM1CH0SRC_A :: _01 ) , 2 => Val ( TPM1CH0SRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TPM1CH0SRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TPM1CH0SRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TPM1CH0SRC_A :: _10 } } # [ doc = "Write proxy for field `TPM1CH0SRC`" ] pub struct TPM1CH0SRC_W < 'a > { w : & 'a mut W , } impl < 'a > TPM1CH0SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPM1CH0SRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "TPM1_CH0 signal" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TPM1CH0SRC_A :: _00 ) } # [ doc = "CMP0 output" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TPM1CH0SRC_A :: _01 ) } # [ doc = "CMP1 output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TPM1CH0SRC_A :: _10 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "TPM2 channel 0 input capture source select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPM2CH0SRC_A { # [ doc = "0: TPM2_CH0 signal" ] _00 , # [ doc = "1: CMP0 output" ] _01 , # [ doc = "2: CMP1 output" ] _10 } impl From < TPM2CH0SRC_A > for u8 { # [ inline ( always ) ] fn from ( variant : TPM2CH0SRC_A ) -> Self { match variant { TPM2CH0SRC_A :: _00 => 0 , TPM2CH0SRC_A :: _01 => 1 , TPM2CH0SRC_A :: _10 => 2 } } } # [ doc = "Reader of field `TPM2CH0SRC`" ] pub type TPM2CH0SRC_R = crate :: R < u8 , TPM2CH0SRC_A > ; impl TPM2CH0SRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TPM2CH0SRC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TPM2CH0SRC_A :: _00 ) , 1 => Val ( TPM2CH0SRC_A :: _01 ) , 2 => Val ( TPM2CH0SRC_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TPM2CH0SRC_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TPM2CH0SRC_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TPM2CH0SRC_A :: _10 } } # [ doc = "Write proxy for field `TPM2CH0SRC`" ] pub struct TPM2CH0SRC_W < 'a > { w : & 'a mut W , } impl < 'a > TPM2CH0SRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPM2CH0SRC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "TPM2_CH0 signal" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TPM2CH0SRC_A :: _00 ) } # [ doc = "CMP0 output" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TPM2CH0SRC_A :: _01 ) } # [ doc = "CMP1 output" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TPM2CH0SRC_A :: _10 ) } # [ 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 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "TPM1 External Clock Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPM1CLKSEL_A { # [ doc = "0: TPM_CLKIN0 pin" ] _0 , # [ doc = "1: TPM_CLKIN1 pin" ] _1 } impl From < TPM1CLKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TPM1CLKSEL_A ) -> Self { match variant { TPM1CLKSEL_A :: _0 => false , TPM1CLKSEL_A :: _1 => true } } } # [ doc = "Reader of field `TPM1CLKSEL`" ] pub type TPM1CLKSEL_R = crate :: R < bool , TPM1CLKSEL_A > ; impl TPM1CLKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPM1CLKSEL_A { match self . bits { false => TPM1CLKSEL_A :: _0 , true => TPM1CLKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TPM1CLKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TPM1CLKSEL_A :: _1 } } # [ doc = "Write proxy for field `TPM1CLKSEL`" ] pub struct TPM1CLKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TPM1CLKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPM1CLKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM_CLKIN0 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TPM1CLKSEL_A :: _0 ) } # [ doc = "TPM_CLKIN1 pin" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TPM1CLKSEL_A :: _1 ) } # [ 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 = "TPM2 External Clock Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPM2CLKSEL_A { # [ doc = "0: TPM_CLKIN0 pin" ] _0 , # [ doc = "1: TPM_CLKIN1 pin" ] _1 } impl From < TPM2CLKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TPM2CLKSEL_A ) -> Self { match variant { TPM2CLKSEL_A :: _0 => false , TPM2CLKSEL_A :: _1 => true } } } # [ doc = "Reader of field `TPM2CLKSEL`" ] pub type TPM2CLKSEL_R = crate :: R < bool , TPM2CLKSEL_A > ; impl TPM2CLKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPM2CLKSEL_A { match self . bits { false => TPM2CLKSEL_A :: _0 , true => TPM2CLKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TPM2CLKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TPM2CLKSEL_A :: _1 } } # [ doc = "Write proxy for field `TPM2CLKSEL`" ] pub struct TPM2CLKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TPM2CLKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPM2CLKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM_CLKIN0 pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TPM2CLKSEL_A :: _0 ) } # [ doc = "TPM_CLKIN1 pin" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TPM2CLKSEL_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 18:19 - TPM1 channel 0 input capture source select" ] # [ inline ( always ) ] pub fn tpm1ch0src ( & self ) -> TPM1CH0SRC_R { TPM1CH0SRC_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:21 - TPM2 channel 0 input capture source select" ] # [ inline ( always ) ] pub fn tpm2ch0src ( & self ) -> TPM2CH0SRC_R { TPM2CH0SRC_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bit 25 - TPM1 External Clock Pin Select" ] # [ inline ( always ) ] pub fn tpm1clksel ( & self ) -> TPM1CLKSEL_R { TPM1CLKSEL_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - TPM2 External Clock Pin Select" ] # [ inline ( always ) ] pub fn tpm2clksel ( & self ) -> TPM2CLKSEL_R { TPM2CLKSEL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 18:19 - TPM1 channel 0 input capture source select" ] # [ inline ( always ) ] pub fn tpm1ch0src ( & mut self ) -> TPM1CH0SRC_W { TPM1CH0SRC_W { w : self } } # [ doc = "Bits 20:21 - TPM2 channel 0 input capture source select" ] # [ inline ( always ) ] pub fn tpm2ch0src ( & mut self ) -> TPM2CH0SRC_W { TPM2CH0SRC_W { w : self } } # [ doc = "Bit 25 - TPM1 External Clock Pin Select" ] # [ inline ( always ) ] pub fn tpm1clksel ( & mut self ) -> TPM1CLKSEL_W { TPM1CLKSEL_W { w : self } } # [ doc = "Bit 26 - TPM2 External Clock Pin Select" ] # [ inline ( always ) ] pub fn tpm2clksel ( & mut self ) -> TPM2CLKSEL_W { TPM2CLKSEL_W { w : self } } } } # [ doc = "System Device Identification Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sdid](sdid) module" ] pub type SDID = crate :: Reg < u32 , _SDID > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SDID ; # [ doc = "`read()` method returns [sdid::R](sdid::R) reader structure" ] impl crate :: Readable for SDID { } # [ doc = "System Device Identification Register" ] pub mod sdid { # [ doc = "Reader of register SDID" ] pub type R = crate :: R < u32 , super :: SDID > ; # [ doc = "Pincount identification\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PINID_A { # [ doc = "2: 32-pin" ] _0010 , # [ doc = "4: 48-pin" ] _0100 , # [ doc = "5: 64-pin" ] _0101 , # [ doc = "6: 80-pin" ] _0110 , # [ doc = "7: 81-pin or 121-pin" ] _0111 , # [ doc = "8: 100-pin" ] _1000 , # [ doc = "9: 121-pin" ] _1001 , # [ doc = "10: 144-pin" ] _1010 , # [ doc = "11: Custom pinout (WLCSP)" ] _1011 , # [ doc = "12: 169-pin" ] _1100 , # [ doc = "14: 256-pin" ] _1110 } impl From < PINID_A > for u8 { # [ inline ( always ) ] fn from ( variant : PINID_A ) -> Self { match variant { PINID_A :: _0010 => 2 , PINID_A :: _0100 => 4 , PINID_A :: _0101 => 5 , PINID_A :: _0110 => 6 , PINID_A :: _0111 => 7 , PINID_A :: _1000 => 8 , PINID_A :: _1001 => 9 , PINID_A :: _1010 => 10 , PINID_A :: _1011 => 11 , PINID_A :: _1100 => 12 , PINID_A :: _1110 => 14 } } } # [ doc = "Reader of field `PINID`" ] pub type PINID_R = crate :: R < u8 , PINID_A > ; impl PINID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PINID_A > { use crate :: Variant :: * ; match self . bits { 2 => Val ( PINID_A :: _0010 ) , 4 => Val ( PINID_A :: _0100 ) , 5 => Val ( PINID_A :: _0101 ) , 6 => Val ( PINID_A :: _0110 ) , 7 => Val ( PINID_A :: _0111 ) , 8 => Val ( PINID_A :: _1000 ) , 9 => Val ( PINID_A :: _1001 ) , 10 => Val ( PINID_A :: _1010 ) , 11 => Val ( PINID_A :: _1011 ) , 12 => Val ( PINID_A :: _1100 ) , 14 => Val ( PINID_A :: _1110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == PINID_A :: _0010 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == PINID_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == PINID_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == PINID_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == PINID_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == PINID_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == PINID_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == PINID_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == PINID_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == PINID_A :: _1100 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == PINID_A :: _1110 } } # [ doc = "Kinetis family identification\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAMID_A { # [ doc = "0: K1x Family (without tamper)" ] _000 , # [ doc = "1: K2x Family (without tamper)" ] _001 , # [ doc = "2: K3x Family or K1x/K6x Family (with tamper)" ] _010 , # [ doc = "3: K4x Family or K2x Family (with tamper)" ] _011 , # [ doc = "4: K6x Family (without tamper)" ] _100 , # [ doc = "5: K7x Family" ] _101 } impl From < FAMID_A > for u8 { # [ inline ( always ) ] fn from ( variant : FAMID_A ) -> Self { match variant { FAMID_A :: _000 => 0 , FAMID_A :: _001 => 1 , FAMID_A :: _010 => 2 , FAMID_A :: _011 => 3 , FAMID_A :: _100 => 4 , FAMID_A :: _101 => 5 } } } # [ doc = "Reader of field `FAMID`" ] pub type FAMID_R = crate :: R < u8 , FAMID_A > ; impl FAMID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FAMID_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FAMID_A :: _000 ) , 1 => Val ( FAMID_A :: _001 ) , 2 => Val ( FAMID_A :: _010 ) , 3 => Val ( FAMID_A :: _011 ) , 4 => Val ( FAMID_A :: _100 ) , 5 => Val ( FAMID_A :: _101 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == FAMID_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == FAMID_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == FAMID_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == FAMID_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == FAMID_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == FAMID_A :: _101 } } # [ doc = "Reader of field `DIEID`" ] pub type DIEID_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `REVID`" ] pub type REVID_R = crate :: R < u8 , u8 > ; # [ doc = "Kinetis Series ID\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SERIESID_A { # [ doc = "0: Kinetis K series" ] _0000 , # [ doc = "1: Kinetis L series" ] _0001 , # [ doc = "5: Kinetis W series" ] _0101 , # [ doc = "6: Kinetis V series" ] _0110 } impl From < SERIESID_A > for u8 { # [ inline ( always ) ] fn from ( variant : SERIESID_A ) -> Self { match variant { SERIESID_A :: _0000 => 0 , SERIESID_A :: _0001 => 1 , SERIESID_A :: _0101 => 5 , SERIESID_A :: _0110 => 6 } } } # [ doc = "Reader of field `SERIESID`" ] pub type SERIESID_R = crate :: R < u8 , SERIESID_A > ; impl SERIESID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SERIESID_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SERIESID_A :: _0000 ) , 1 => Val ( SERIESID_A :: _0001 ) , 5 => Val ( SERIESID_A :: _0101 ) , 6 => Val ( SERIESID_A :: _0110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == SERIESID_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == SERIESID_A :: _0001 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == SERIESID_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == SERIESID_A :: _0110 } } # [ doc = "Kinetis Sub-Family ID\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUBFAMID_A { # [ doc = "0: Kx0 Subfamily" ] _0000 , # [ doc = "1: Kx1 Subfamily (tamper detect)" ] _0001 , # [ doc = "2: Kx2 Subfamily" ] _0010 , # [ doc = "3: Kx3 Subfamily (tamper detect)" ] _0011 , # [ doc = "4: Kx4 Subfamily" ] _0100 , # [ doc = "5: Kx5 Subfamily (tamper detect)" ] _0101 , # [ doc = "6: Kx6 Subfamily" ] _0110 } impl From < SUBFAMID_A > for u8 { # [ inline ( always ) ] fn from ( variant : SUBFAMID_A ) -> Self { match variant { SUBFAMID_A :: _0000 => 0 , SUBFAMID_A :: _0001 => 1 , SUBFAMID_A :: _0010 => 2 , SUBFAMID_A :: _0011 => 3 , SUBFAMID_A :: _0100 => 4 , SUBFAMID_A :: _0101 => 5 , SUBFAMID_A :: _0110 => 6 } } } # [ doc = "Reader of field `SUBFAMID`" ] pub type SUBFAMID_R = crate :: R < u8 , SUBFAMID_A > ; impl SUBFAMID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SUBFAMID_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SUBFAMID_A :: _0000 ) , 1 => Val ( SUBFAMID_A :: _0001 ) , 2 => Val ( SUBFAMID_A :: _0010 ) , 3 => Val ( SUBFAMID_A :: _0011 ) , 4 => Val ( SUBFAMID_A :: _0100 ) , 5 => Val ( SUBFAMID_A :: _0101 ) , 6 => Val ( SUBFAMID_A :: _0110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == SUBFAMID_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == SUBFAMID_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == SUBFAMID_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == SUBFAMID_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == SUBFAMID_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == SUBFAMID_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == SUBFAMID_A :: _0110 } } # [ doc = "Kinetis Family ID\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FAMILYID_A { # [ doc = "0: K0x Family" ] _0000 , # [ doc = "1: K1x Family" ] _0001 , # [ doc = "2: K2x Family" ] _0010 , # [ doc = "3: K3x Family" ] _0011 , # [ doc = "4: K4x Family" ] _0100 , # [ doc = "6: K6x Family" ] _0110 , # [ doc = "7: K7x Family" ] _0111 , # [ doc = "8: K8x Family" ] _1000 } impl From < FAMILYID_A > for u8 { # [ inline ( always ) ] fn from ( variant : FAMILYID_A ) -> Self { match variant { FAMILYID_A :: _0000 => 0 , FAMILYID_A :: _0001 => 1 , FAMILYID_A :: _0010 => 2 , FAMILYID_A :: _0011 => 3 , FAMILYID_A :: _0100 => 4 , FAMILYID_A :: _0110 => 6 , FAMILYID_A :: _0111 => 7 , FAMILYID_A :: _1000 => 8 } } } # [ doc = "Reader of field `FAMILYID`" ] pub type FAMILYID_R = crate :: R < u8 , FAMILYID_A > ; impl FAMILYID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FAMILYID_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FAMILYID_A :: _0000 ) , 1 => Val ( FAMILYID_A :: _0001 ) , 2 => Val ( FAMILYID_A :: _0010 ) , 3 => Val ( FAMILYID_A :: _0011 ) , 4 => Val ( FAMILYID_A :: _0100 ) , 6 => Val ( FAMILYID_A :: _0110 ) , 7 => Val ( FAMILYID_A :: _0111 ) , 8 => Val ( FAMILYID_A :: _1000 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == FAMILYID_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == FAMILYID_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == FAMILYID_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == FAMILYID_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == FAMILYID_A :: _0100 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == FAMILYID_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == FAMILYID_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == FAMILYID_A :: _1000 } } impl R { # [ doc = "Bits 0:3 - Pincount identification" ] # [ inline ( always ) ] pub fn pinid ( & self ) -> PINID_R { PINID_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:6 - Kinetis family identification" ] # [ inline ( always ) ] pub fn famid ( & self ) -> FAMID_R { FAMID_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bits 7:11 - Device Die ID" ] # [ inline ( always ) ] pub fn dieid ( & self ) -> DIEID_R { DIEID_R :: new ( ( ( self . bits >> 7 ) & 0x1f ) as u8 ) } # [ doc = "Bits 12:15 - Device revision number" ] # [ inline ( always ) ] pub fn revid ( & self ) -> REVID_R { REVID_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bits 20:23 - Kinetis Series ID" ] # [ inline ( always ) ] pub fn seriesid ( & self ) -> SERIESID_R { SERIESID_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - Kinetis Sub-Family ID" ] # [ inline ( always ) ] pub fn subfamid ( & self ) -> SUBFAMID_R { SUBFAMID_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - Kinetis Family ID" ] # [ inline ( always ) ] pub fn familyid ( & self ) -> FAMILYID_R { FAMILYID_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } } # [ doc = "System Clock Gating Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scgc1](scgc1) module" ] pub type SCGC1 = crate :: Reg < u32 , _SCGC1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCGC1 ; # [ doc = "`read()` method returns [scgc1::R](scgc1::R) reader structure" ] impl crate :: Readable for SCGC1 { } # [ doc = "`write(|w| ..)` method takes [scgc1::W](scgc1::W) writer structure" ] impl crate :: Writable for SCGC1 { } # [ doc = "System Clock Gating Control Register 1" ] pub mod scgc1 { # [ doc = "Reader of register SCGC1" ] pub type R = crate :: R < u32 , super :: SCGC1 > ; # [ doc = "Writer for register SCGC1" ] pub type W = crate :: W < u32 , super :: SCGC1 > ; # [ doc = "Register SCGC1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SCGC1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "I2C2 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum I2C2_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < I2C2_A > for bool { # [ inline ( always ) ] fn from ( variant : I2C2_A ) -> Self { match variant { I2C2_A :: _0 => false , I2C2_A :: _1 => true } } } # [ doc = "Reader of field `I2C2`" ] pub type I2C2_R = crate :: R < bool , I2C2_A > ; impl I2C2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> I2C2_A { match self . bits { false => I2C2_A :: _0 , true => I2C2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == I2C2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == I2C2_A :: _1 } } # [ doc = "Write proxy for field `I2C2`" ] pub struct I2C2_W < 'a > { w : & 'a mut W , } impl < 'a > I2C2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : I2C2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( I2C2_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( I2C2_A :: _1 ) } # [ 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 = "I2C3 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum I2C3_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < I2C3_A > for bool { # [ inline ( always ) ] fn from ( variant : I2C3_A ) -> Self { match variant { I2C3_A :: _0 => false , I2C3_A :: _1 => true } } } # [ doc = "Reader of field `I2C3`" ] pub type I2C3_R = crate :: R < bool , I2C3_A > ; impl I2C3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> I2C3_A { match self . bits { false => I2C3_A :: _0 , true => I2C3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == I2C3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == I2C3_A :: _1 } } # [ doc = "Write proxy for field `I2C3`" ] pub struct I2C3_W < 'a > { w : & 'a mut W , } impl < 'a > I2C3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : I2C3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( I2C3_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( I2C3_A :: _1 ) } # [ 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 = "UART4 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART4_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < UART4_A > for bool { # [ inline ( always ) ] fn from ( variant : UART4_A ) -> Self { match variant { UART4_A :: _0 => false , UART4_A :: _1 => true } } } # [ doc = "Reader of field `UART4`" ] pub type UART4_R = crate :: R < bool , UART4_A > ; impl UART4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UART4_A { match self . bits { false => UART4_A :: _0 , true => UART4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UART4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UART4_A :: _1 } } # [ doc = "Write proxy for field `UART4`" ] pub struct UART4_W < 'a > { w : & 'a mut W , } impl < 'a > UART4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UART4_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UART4_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } impl R { # [ doc = "Bit 6 - I2C2 Clock Gate Control" ] # [ inline ( always ) ] pub fn i2c2 ( & self ) -> I2C2_R { I2C2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - I2C3 Clock Gate Control" ] # [ inline ( always ) ] pub fn i2c3 ( & self ) -> I2C3_R { I2C3_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - UART4 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart4 ( & self ) -> UART4_R { UART4_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 6 - I2C2 Clock Gate Control" ] # [ inline ( always ) ] pub fn i2c2 ( & mut self ) -> I2C2_W { I2C2_W { w : self } } # [ doc = "Bit 7 - I2C3 Clock Gate Control" ] # [ inline ( always ) ] pub fn i2c3 ( & mut self ) -> I2C3_W { I2C3_W { w : self } } # [ doc = "Bit 10 - UART4 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart4 ( & mut self ) -> UART4_W { UART4_W { w : self } } } } # [ doc = "System Clock Gating Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scgc2](scgc2) module" ] pub type SCGC2 = crate :: Reg < u32 , _SCGC2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCGC2 ; # [ doc = "`read()` method returns [scgc2::R](scgc2::R) reader structure" ] impl crate :: Readable for SCGC2 { } # [ doc = "`write(|w| ..)` method takes [scgc2::W](scgc2::W) writer structure" ] impl crate :: Writable for SCGC2 { } # [ doc = "System Clock Gating Control Register 2" ] pub mod scgc2 { # [ doc = "Reader of register SCGC2" ] pub type R = crate :: R < u32 , super :: SCGC2 > ; # [ doc = "Writer for register SCGC2" ] pub type W = crate :: W < u32 , super :: SCGC2 > ; # [ doc = "Register SCGC2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SCGC2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "ENET Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENET_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < ENET_A > for bool { # [ inline ( always ) ] fn from ( variant : ENET_A ) -> Self { match variant { ENET_A :: _0 => false , ENET_A :: _1 => true } } } # [ doc = "Reader of field `ENET`" ] pub type ENET_R = crate :: R < bool , ENET_A > ; impl ENET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENET_A { match self . bits { false => ENET_A :: _0 , true => ENET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENET_A :: _1 } } # [ doc = "Write proxy for field `ENET`" ] pub struct ENET_W < 'a > { w : & 'a mut W , } impl < 'a > ENET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENET_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENET_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENET_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "LPUART0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPUART0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < LPUART0_A > for bool { # [ inline ( always ) ] fn from ( variant : LPUART0_A ) -> Self { match variant { LPUART0_A :: _0 => false , LPUART0_A :: _1 => true } } } # [ doc = "Reader of field `LPUART0`" ] pub type LPUART0_R = crate :: R < bool , LPUART0_A > ; impl LPUART0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPUART0_A { match self . bits { false => LPUART0_A :: _0 , true => LPUART0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPUART0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPUART0_A :: _1 } } # [ doc = "Write proxy for field `LPUART0`" ] pub struct LPUART0_W < 'a > { w : & 'a mut W , } impl < 'a > LPUART0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPUART0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LPUART0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LPUART0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "TPM1 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPM1_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < TPM1_A > for bool { # [ inline ( always ) ] fn from ( variant : TPM1_A ) -> Self { match variant { TPM1_A :: _0 => false , TPM1_A :: _1 => true } } } # [ doc = "Reader of field `TPM1`" ] pub type TPM1_R = crate :: R < bool , TPM1_A > ; impl TPM1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPM1_A { match self . bits { false => TPM1_A :: _0 , true => TPM1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TPM1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TPM1_A :: _1 } } # [ doc = "Write proxy for field `TPM1`" ] pub struct TPM1_W < 'a > { w : & 'a mut W , } impl < 'a > TPM1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPM1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TPM1_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TPM1_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "TPM2 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TPM2_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < TPM2_A > for bool { # [ inline ( always ) ] fn from ( variant : TPM2_A ) -> Self { match variant { TPM2_A :: _0 => false , TPM2_A :: _1 => true } } } # [ doc = "Reader of field `TPM2`" ] pub type TPM2_R = crate :: R < bool , TPM2_A > ; impl TPM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TPM2_A { match self . bits { false => TPM2_A :: _0 , true => TPM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TPM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TPM2_A :: _1 } } # [ doc = "Write proxy for field `TPM2`" ] pub struct TPM2_W < 'a > { w : & 'a mut W , } impl < 'a > TPM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TPM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TPM2_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TPM2_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "DAC0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DAC0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < DAC0_A > for bool { # [ inline ( always ) ] fn from ( variant : DAC0_A ) -> Self { match variant { DAC0_A :: _0 => false , DAC0_A :: _1 => true } } } # [ doc = "Reader of field `DAC0`" ] pub type DAC0_R = crate :: R < bool , DAC0_A > ; impl DAC0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DAC0_A { match self . bits { false => DAC0_A :: _0 , true => DAC0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DAC0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DAC0_A :: _1 } } # [ doc = "Write proxy for field `DAC0`" ] pub struct DAC0_W < 'a > { w : & 'a mut W , } impl < 'a > DAC0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DAC0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DAC0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DAC0_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "DAC1 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DAC1_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < DAC1_A > for bool { # [ inline ( always ) ] fn from ( variant : DAC1_A ) -> Self { match variant { DAC1_A :: _0 => false , DAC1_A :: _1 => true } } } # [ doc = "Reader of field `DAC1`" ] pub type DAC1_R = crate :: R < bool , DAC1_A > ; impl DAC1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DAC1_A { match self . bits { false => DAC1_A :: _0 , true => DAC1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DAC1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DAC1_A :: _1 } } # [ doc = "Write proxy for field `DAC1`" ] pub struct DAC1_W < 'a > { w : & 'a mut W , } impl < 'a > DAC1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DAC1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DAC1_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DAC1_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - ENET Clock Gate Control" ] # [ inline ( always ) ] pub fn enet ( & self ) -> ENET_R { ENET_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 4 - LPUART0 Clock Gate Control" ] # [ inline ( always ) ] pub fn lpuart0 ( & self ) -> LPUART0_R { LPUART0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - TPM1 Clock Gate Control" ] # [ inline ( always ) ] pub fn tpm1 ( & self ) -> TPM1_R { TPM1_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - TPM2 Clock Gate Control" ] # [ inline ( always ) ] pub fn tpm2 ( & self ) -> TPM2_R { TPM2_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - DAC0 Clock Gate Control" ] # [ inline ( always ) ] pub fn dac0 ( & self ) -> DAC0_R { DAC0_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - DAC1 Clock Gate Control" ] # [ inline ( always ) ] pub fn dac1 ( & self ) -> DAC1_R { DAC1_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - ENET Clock Gate Control" ] # [ inline ( always ) ] pub fn enet ( & mut self ) -> ENET_W { ENET_W { w : self } } # [ doc = "Bit 4 - LPUART0 Clock Gate Control" ] # [ inline ( always ) ] pub fn lpuart0 ( & mut self ) -> LPUART0_W { LPUART0_W { w : self } } # [ doc = "Bit 9 - TPM1 Clock Gate Control" ] # [ inline ( always ) ] pub fn tpm1 ( & mut self ) -> TPM1_W { TPM1_W { w : self } } # [ doc = "Bit 10 - TPM2 Clock Gate Control" ] # [ inline ( always ) ] pub fn tpm2 ( & mut self ) -> TPM2_W { TPM2_W { w : self } } # [ doc = "Bit 12 - DAC0 Clock Gate Control" ] # [ inline ( always ) ] pub fn dac0 ( & mut self ) -> DAC0_W { DAC0_W { w : self } } # [ doc = "Bit 13 - DAC1 Clock Gate Control" ] # [ inline ( always ) ] pub fn dac1 ( & mut self ) -> DAC1_W { DAC1_W { w : self } } } } # [ doc = "System Clock Gating Control Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scgc3](scgc3) module" ] pub type SCGC3 = crate :: Reg < u32 , _SCGC3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCGC3 ; # [ doc = "`read()` method returns [scgc3::R](scgc3::R) reader structure" ] impl crate :: Readable for SCGC3 { } # [ doc = "`write(|w| ..)` method takes [scgc3::W](scgc3::W) writer structure" ] impl crate :: Writable for SCGC3 { } # [ doc = "System Clock Gating Control Register 3" ] pub mod scgc3 { # [ doc = "Reader of register SCGC3" ] pub type R = crate :: R < u32 , super :: SCGC3 > ; # [ doc = "Writer for register SCGC3" ] pub type W = crate :: W < u32 , super :: SCGC3 > ; # [ doc = "Register SCGC3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SCGC3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "RNGA Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RNGA_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < RNGA_A > for bool { # [ inline ( always ) ] fn from ( variant : RNGA_A ) -> Self { match variant { RNGA_A :: _0 => false , RNGA_A :: _1 => true } } } # [ doc = "Reader of field `RNGA`" ] pub type RNGA_R = crate :: R < bool , RNGA_A > ; impl RNGA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RNGA_A { match self . bits { false => RNGA_A :: _0 , true => RNGA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RNGA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RNGA_A :: _1 } } # [ doc = "Write proxy for field `RNGA`" ] pub struct RNGA_W < 'a > { w : & 'a mut W , } impl < 'a > RNGA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RNGA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RNGA_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RNGA_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "USBHS Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBHS_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < USBHS_A > for bool { # [ inline ( always ) ] fn from ( variant : USBHS_A ) -> Self { match variant { USBHS_A :: _0 => false , USBHS_A :: _1 => true } } } # [ doc = "Reader of field `USBHS`" ] pub type USBHS_R = crate :: R < bool , USBHS_A > ; impl USBHS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBHS_A { match self . bits { false => USBHS_A :: _0 , true => USBHS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBHS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBHS_A :: _1 } } # [ doc = "Write proxy for field `USBHS`" ] pub struct USBHS_W < 'a > { w : & 'a mut W , } impl < 'a > USBHS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBHS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBHS_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBHS_A :: _1 ) } # [ 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 } } # [ doc = "USBHS PHY Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBHSPHY_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < USBHSPHY_A > for bool { # [ inline ( always ) ] fn from ( variant : USBHSPHY_A ) -> Self { match variant { USBHSPHY_A :: _0 => false , USBHSPHY_A :: _1 => true } } } # [ doc = "Reader of field `USBHSPHY`" ] pub type USBHSPHY_R = crate :: R < bool , USBHSPHY_A > ; impl USBHSPHY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBHSPHY_A { match self . bits { false => USBHSPHY_A :: _0 , true => USBHSPHY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBHSPHY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBHSPHY_A :: _1 } } # [ doc = "Write proxy for field `USBHSPHY`" ] pub struct USBHSPHY_W < 'a > { w : & 'a mut W , } impl < 'a > USBHSPHY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBHSPHY_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBHSPHY_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBHSPHY_A :: _1 ) } # [ 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 = "USBHS DCD Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBHSDCD_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < USBHSDCD_A > for bool { # [ inline ( always ) ] fn from ( variant : USBHSDCD_A ) -> Self { match variant { USBHSDCD_A :: _0 => false , USBHSDCD_A :: _1 => true } } } # [ doc = "Reader of field `USBHSDCD`" ] pub type USBHSDCD_R = crate :: R < bool , USBHSDCD_A > ; impl USBHSDCD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBHSDCD_A { match self . bits { false => USBHSDCD_A :: _0 , true => USBHSDCD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBHSDCD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBHSDCD_A :: _1 } } # [ doc = "Write proxy for field `USBHSDCD`" ] pub struct USBHSDCD_W < 'a > { w : & 'a mut W , } impl < 'a > USBHSDCD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBHSDCD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBHSDCD_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBHSDCD_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "FlexCAN1 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLEXCAN1_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FLEXCAN1_A > for bool { # [ inline ( always ) ] fn from ( variant : FLEXCAN1_A ) -> Self { match variant { FLEXCAN1_A :: _0 => false , FLEXCAN1_A :: _1 => true } } } # [ doc = "Reader of field `FLEXCAN1`" ] pub type FLEXCAN1_R = crate :: R < bool , FLEXCAN1_A > ; impl FLEXCAN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLEXCAN1_A { match self . bits { false => FLEXCAN1_A :: _0 , true => FLEXCAN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLEXCAN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLEXCAN1_A :: _1 } } # [ doc = "Write proxy for field `FLEXCAN1`" ] pub struct FLEXCAN1_W < 'a > { w : & 'a mut W , } impl < 'a > FLEXCAN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLEXCAN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLEXCAN1_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLEXCAN1_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "SPI2 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SPI2_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < SPI2_A > for bool { # [ inline ( always ) ] fn from ( variant : SPI2_A ) -> Self { match variant { SPI2_A :: _0 => false , SPI2_A :: _1 => true } } } # [ doc = "Reader of field `SPI2`" ] pub type SPI2_R = crate :: R < bool , SPI2_A > ; impl SPI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SPI2_A { match self . bits { false => SPI2_A :: _0 , true => SPI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SPI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SPI2_A :: _1 } } # [ doc = "Write proxy for field `SPI2`" ] pub struct SPI2_W < 'a > { w : & 'a mut W , } impl < 'a > SPI2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SPI2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SPI2_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SPI2_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "SDHC Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SDHC_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < SDHC_A > for bool { # [ inline ( always ) ] fn from ( variant : SDHC_A ) -> Self { match variant { SDHC_A :: _0 => false , SDHC_A :: _1 => true } } } # [ doc = "Reader of field `SDHC`" ] pub type SDHC_R = crate :: R < bool , SDHC_A > ; impl SDHC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SDHC_A { match self . bits { false => SDHC_A :: _0 , true => SDHC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SDHC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SDHC_A :: _1 } } # [ doc = "Write proxy for field `SDHC`" ] pub struct SDHC_W < 'a > { w : & 'a mut W , } impl < 'a > SDHC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SDHC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SDHC_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SDHC_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "FTM2 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM2_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FTM2_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM2_A ) -> Self { match variant { FTM2_A :: _0 => false , FTM2_A :: _1 => true } } } # [ doc = "Reader of field `FTM2`" ] pub type FTM2_R = crate :: R < bool , FTM2_A > ; impl FTM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM2_A { match self . bits { false => FTM2_A :: _0 , true => FTM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM2_A :: _1 } } # [ doc = "Write proxy for field `FTM2`" ] pub struct FTM2_W < 'a > { w : & 'a mut W , } impl < 'a > FTM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM2_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM2_A :: _1 ) } # [ 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 = "FTM3 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM3_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FTM3_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM3_A ) -> Self { match variant { FTM3_A :: _0 => false , FTM3_A :: _1 => true } } } # [ doc = "Reader of field `FTM3`" ] pub type FTM3_R = crate :: R < bool , FTM3_A > ; impl FTM3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM3_A { match self . bits { false => FTM3_A :: _0 , true => FTM3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM3_A :: _1 } } # [ doc = "Write proxy for field `FTM3`" ] pub struct FTM3_W < 'a > { w : & 'a mut W , } impl < 'a > FTM3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM3_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM3_A :: _1 ) } # [ 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 = "ADC1 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADC1_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < ADC1_A > for bool { # [ inline ( always ) ] fn from ( variant : ADC1_A ) -> Self { match variant { ADC1_A :: _0 => false , ADC1_A :: _1 => true } } } # [ doc = "Reader of field `ADC1`" ] pub type ADC1_R = crate :: R < bool , ADC1_A > ; impl ADC1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADC1_A { match self . bits { false => ADC1_A :: _0 , true => ADC1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADC1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADC1_A :: _1 } } # [ doc = "Write proxy for field `ADC1`" ] pub struct ADC1_W < 'a > { w : & 'a mut W , } impl < 'a > ADC1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADC1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADC1_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADC1_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } impl R { # [ doc = "Bit 0 - RNGA Clock Gate Control" ] # [ inline ( always ) ] pub fn rnga ( & self ) -> RNGA_R { RNGA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - USBHS Clock Gate Control" ] # [ inline ( always ) ] pub fn usbhs ( & self ) -> USBHS_R { USBHS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - USBHS PHY Clock Gate Control" ] # [ inline ( always ) ] pub fn usbhsphy ( & self ) -> USBHSPHY_R { USBHSPHY_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - USBHS DCD Clock Gate Control" ] # [ inline ( always ) ] pub fn usbhsdcd ( & self ) -> USBHSDCD_R { USBHSDCD_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - FlexCAN1 Clock Gate Control" ] # [ inline ( always ) ] pub fn flexcan1 ( & self ) -> FLEXCAN1_R { FLEXCAN1_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - SPI2 Clock Gate Control" ] # [ inline ( always ) ] pub fn spi2 ( & self ) -> SPI2_R { SPI2_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - SDHC Clock Gate Control" ] # [ inline ( always ) ] pub fn sdhc ( & self ) -> SDHC_R { SDHC_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - FTM2 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm2 ( & self ) -> FTM2_R { FTM2_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - FTM3 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm3 ( & self ) -> FTM3_R { FTM3_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - ADC1 Clock Gate Control" ] # [ inline ( always ) ] pub fn adc1 ( & self ) -> ADC1_R { ADC1_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - RNGA Clock Gate Control" ] # [ inline ( always ) ] pub fn rnga ( & mut self ) -> RNGA_W { RNGA_W { w : self } } # [ doc = "Bit 1 - USBHS Clock Gate Control" ] # [ inline ( always ) ] pub fn usbhs ( & mut self ) -> USBHS_W { USBHS_W { w : self } } # [ doc = "Bit 2 - USBHS PHY Clock Gate Control" ] # [ inline ( always ) ] pub fn usbhsphy ( & mut self ) -> USBHSPHY_W { USBHSPHY_W { w : self } } # [ doc = "Bit 3 - USBHS DCD Clock Gate Control" ] # [ inline ( always ) ] pub fn usbhsdcd ( & mut self ) -> USBHSDCD_W { USBHSDCD_W { w : self } } # [ doc = "Bit 4 - FlexCAN1 Clock Gate Control" ] # [ inline ( always ) ] pub fn flexcan1 ( & mut self ) -> FLEXCAN1_W { FLEXCAN1_W { w : self } } # [ doc = "Bit 12 - SPI2 Clock Gate Control" ] # [ inline ( always ) ] pub fn spi2 ( & mut self ) -> SPI2_W { SPI2_W { w : self } } # [ doc = "Bit 17 - SDHC Clock Gate Control" ] # [ inline ( always ) ] pub fn sdhc ( & mut self ) -> SDHC_W { SDHC_W { w : self } } # [ doc = "Bit 24 - FTM2 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm2 ( & mut self ) -> FTM2_W { FTM2_W { w : self } } # [ doc = "Bit 25 - FTM3 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm3 ( & mut self ) -> FTM3_W { FTM3_W { w : self } } # [ doc = "Bit 27 - ADC1 Clock Gate Control" ] # [ inline ( always ) ] pub fn adc1 ( & mut self ) -> ADC1_W { ADC1_W { w : self } } } } # [ doc = "System Clock Gating Control Register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scgc4](scgc4) module" ] pub type SCGC4 = crate :: Reg < u32 , _SCGC4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCGC4 ; # [ doc = "`read()` method returns [scgc4::R](scgc4::R) reader structure" ] impl crate :: Readable for SCGC4 { } # [ doc = "`write(|w| ..)` method takes [scgc4::W](scgc4::W) writer structure" ] impl crate :: Writable for SCGC4 { } # [ doc = "System Clock Gating Control Register 4" ] pub mod scgc4 { # [ doc = "Reader of register SCGC4" ] pub type R = crate :: R < u32 , super :: SCGC4 > ; # [ doc = "Writer for register SCGC4" ] pub type W = crate :: W < u32 , super :: SCGC4 > ; # [ doc = "Register SCGC4 `reset()`'s with value 0xf010_0030" ] impl crate :: ResetValue for super :: SCGC4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xf010_0030 } } # [ doc = "EWM Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EWM_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < EWM_A > for bool { # [ inline ( always ) ] fn from ( variant : EWM_A ) -> Self { match variant { EWM_A :: _0 => false , EWM_A :: _1 => true } } } # [ doc = "Reader of field `EWM`" ] pub type EWM_R = crate :: R < bool , EWM_A > ; impl EWM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EWM_A { match self . bits { false => EWM_A :: _0 , true => EWM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EWM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EWM_A :: _1 } } # [ doc = "Write proxy for field `EWM`" ] pub struct EWM_W < 'a > { w : & 'a mut W , } impl < 'a > EWM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EWM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EWM_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EWM_A :: _1 ) } # [ 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 } } # [ doc = "CMT Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CMT_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < CMT_A > for bool { # [ inline ( always ) ] fn from ( variant : CMT_A ) -> Self { match variant { CMT_A :: _0 => false , CMT_A :: _1 => true } } } # [ doc = "Reader of field `CMT`" ] pub type CMT_R = crate :: R < bool , CMT_A > ; impl CMT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CMT_A { match self . bits { false => CMT_A :: _0 , true => CMT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CMT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CMT_A :: _1 } } # [ doc = "Write proxy for field `CMT`" ] pub struct CMT_W < 'a > { w : & 'a mut W , } impl < 'a > CMT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CMT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CMT_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CMT_A :: _1 ) } # [ 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 = "I2C0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum I2C0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < I2C0_A > for bool { # [ inline ( always ) ] fn from ( variant : I2C0_A ) -> Self { match variant { I2C0_A :: _0 => false , I2C0_A :: _1 => true } } } # [ doc = "Reader of field `I2C0`" ] pub type I2C0_R = crate :: R < bool , I2C0_A > ; impl I2C0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> I2C0_A { match self . bits { false => I2C0_A :: _0 , true => I2C0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == I2C0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == I2C0_A :: _1 } } # [ doc = "Write proxy for field `I2C0`" ] pub struct I2C0_W < 'a > { w : & 'a mut W , } impl < 'a > I2C0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : I2C0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( I2C0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( I2C0_A :: _1 ) } # [ 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 = "I2C1 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum I2C1_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < I2C1_A > for bool { # [ inline ( always ) ] fn from ( variant : I2C1_A ) -> Self { match variant { I2C1_A :: _0 => false , I2C1_A :: _1 => true } } } # [ doc = "Reader of field `I2C1`" ] pub type I2C1_R = crate :: R < bool , I2C1_A > ; impl I2C1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> I2C1_A { match self . bits { false => I2C1_A :: _0 , true => I2C1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == I2C1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == I2C1_A :: _1 } } # [ doc = "Write proxy for field `I2C1`" ] pub struct I2C1_W < 'a > { w : & 'a mut W , } impl < 'a > I2C1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : I2C1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( I2C1_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( I2C1_A :: _1 ) } # [ 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 = "UART0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < UART0_A > for bool { # [ inline ( always ) ] fn from ( variant : UART0_A ) -> Self { match variant { UART0_A :: _0 => false , UART0_A :: _1 => true } } } # [ doc = "Reader of field `UART0`" ] pub type UART0_R = crate :: R < bool , UART0_A > ; impl UART0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UART0_A { match self . bits { false => UART0_A :: _0 , true => UART0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UART0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UART0_A :: _1 } } # [ doc = "Write proxy for field `UART0`" ] pub struct UART0_W < 'a > { w : & 'a mut W , } impl < 'a > UART0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UART0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UART0_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "UART1 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART1_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < UART1_A > for bool { # [ inline ( always ) ] fn from ( variant : UART1_A ) -> Self { match variant { UART1_A :: _0 => false , UART1_A :: _1 => true } } } # [ doc = "Reader of field `UART1`" ] pub type UART1_R = crate :: R < bool , UART1_A > ; impl UART1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UART1_A { match self . bits { false => UART1_A :: _0 , true => UART1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UART1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UART1_A :: _1 } } # [ doc = "Write proxy for field `UART1`" ] pub struct UART1_W < 'a > { w : & 'a mut W , } impl < 'a > UART1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UART1_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UART1_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "UART2 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART2_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < UART2_A > for bool { # [ inline ( always ) ] fn from ( variant : UART2_A ) -> Self { match variant { UART2_A :: _0 => false , UART2_A :: _1 => true } } } # [ doc = "Reader of field `UART2`" ] pub type UART2_R = crate :: R < bool , UART2_A > ; impl UART2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UART2_A { match self . bits { false => UART2_A :: _0 , true => UART2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UART2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UART2_A :: _1 } } # [ doc = "Write proxy for field `UART2`" ] pub struct UART2_W < 'a > { w : & 'a mut W , } impl < 'a > UART2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UART2_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UART2_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "UART3 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UART3_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < UART3_A > for bool { # [ inline ( always ) ] fn from ( variant : UART3_A ) -> Self { match variant { UART3_A :: _0 => false , UART3_A :: _1 => true } } } # [ doc = "Reader of field `UART3`" ] pub type UART3_R = crate :: R < bool , UART3_A > ; impl UART3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UART3_A { match self . bits { false => UART3_A :: _0 , true => UART3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UART3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UART3_A :: _1 } } # [ doc = "Write proxy for field `UART3`" ] pub struct UART3_W < 'a > { w : & 'a mut W , } impl < 'a > UART3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UART3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UART3_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UART3_A :: _1 ) } # [ 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 = "USB Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBOTG_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < USBOTG_A > for bool { # [ inline ( always ) ] fn from ( variant : USBOTG_A ) -> Self { match variant { USBOTG_A :: _0 => false , USBOTG_A :: _1 => true } } } # [ doc = "Reader of field `USBOTG`" ] pub type USBOTG_R = crate :: R < bool , USBOTG_A > ; impl USBOTG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBOTG_A { match self . bits { false => USBOTG_A :: _0 , true => USBOTG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBOTG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBOTG_A :: _1 } } # [ doc = "Write proxy for field `USBOTG`" ] pub struct USBOTG_W < 'a > { w : & 'a mut W , } impl < 'a > USBOTG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBOTG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBOTG_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBOTG_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Comparator Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CMP_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < CMP_A > for bool { # [ inline ( always ) ] fn from ( variant : CMP_A ) -> Self { match variant { CMP_A :: _0 => false , CMP_A :: _1 => true } } } # [ doc = "Reader of field `CMP`" ] pub type CMP_R = crate :: R < bool , CMP_A > ; impl CMP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CMP_A { match self . bits { false => CMP_A :: _0 , true => CMP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CMP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CMP_A :: _1 } } # [ doc = "Write proxy for field `CMP`" ] pub struct CMP_W < 'a > { w : & 'a mut W , } impl < 'a > CMP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CMP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CMP_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CMP_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "VREF Clock Gate Control\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VREF_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < VREF_A > for bool { # [ inline ( always ) ] fn from ( variant : VREF_A ) -> Self { match variant { VREF_A :: _0 => false , VREF_A :: _1 => true } } } # [ doc = "Reader of field `VREF`" ] pub type VREF_R = crate :: R < bool , VREF_A > ; impl VREF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VREF_A { match self . bits { false => VREF_A :: _0 , true => VREF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VREF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VREF_A :: _1 } } # [ doc = "Write proxy for field `VREF`" ] pub struct VREF_W < 'a > { w : & 'a mut W , } impl < 'a > VREF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VREF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VREF_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VREF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 1 - EWM Clock Gate Control" ] # [ inline ( always ) ] pub fn ewm ( & self ) -> EWM_R { EWM_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - CMT Clock Gate Control" ] # [ inline ( always ) ] pub fn cmt ( & self ) -> CMT_R { CMT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C0 Clock Gate Control" ] # [ inline ( always ) ] pub fn i2c0 ( & self ) -> I2C0_R { I2C0_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - I2C1 Clock Gate Control" ] # [ inline ( always ) ] pub fn i2c1 ( & self ) -> I2C1_R { I2C1_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - UART0 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart0 ( & self ) -> UART0_R { UART0_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - UART1 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart1 ( & self ) -> UART1_R { UART1_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - UART2 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart2 ( & self ) -> UART2_R { UART2_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - UART3 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart3 ( & self ) -> UART3_R { UART3_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - USB Clock Gate Control" ] # [ inline ( always ) ] pub fn usbotg ( & self ) -> USBOTG_R { USBOTG_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Comparator Clock Gate Control" ] # [ inline ( always ) ] pub fn cmp ( & self ) -> CMP_R { CMP_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - VREF Clock Gate Control" ] # [ inline ( always ) ] pub fn vref ( & self ) -> VREF_R { VREF_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - EWM Clock Gate Control" ] # [ inline ( always ) ] pub fn ewm ( & mut self ) -> EWM_W { EWM_W { w : self } } # [ doc = "Bit 2 - CMT Clock Gate Control" ] # [ inline ( always ) ] pub fn cmt ( & mut self ) -> CMT_W { CMT_W { w : self } } # [ doc = "Bit 6 - I2C0 Clock Gate Control" ] # [ inline ( always ) ] pub fn i2c0 ( & mut self ) -> I2C0_W { I2C0_W { w : self } } # [ doc = "Bit 7 - I2C1 Clock Gate Control" ] # [ inline ( always ) ] pub fn i2c1 ( & mut self ) -> I2C1_W { I2C1_W { w : self } } # [ doc = "Bit 10 - UART0 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart0 ( & mut self ) -> UART0_W { UART0_W { w : self } } # [ doc = "Bit 11 - UART1 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart1 ( & mut self ) -> UART1_W { UART1_W { w : self } } # [ doc = "Bit 12 - UART2 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart2 ( & mut self ) -> UART2_W { UART2_W { w : self } } # [ doc = "Bit 13 - UART3 Clock Gate Control" ] # [ inline ( always ) ] pub fn uart3 ( & mut self ) -> UART3_W { UART3_W { w : self } } # [ doc = "Bit 18 - USB Clock Gate Control" ] # [ inline ( always ) ] pub fn usbotg ( & mut self ) -> USBOTG_W { USBOTG_W { w : self } } # [ doc = "Bit 19 - Comparator Clock Gate Control" ] # [ inline ( always ) ] pub fn cmp ( & mut self ) -> CMP_W { CMP_W { w : self } } # [ doc = "Bit 20 - VREF Clock Gate Control" ] # [ inline ( always ) ] pub fn vref ( & mut self ) -> VREF_W { VREF_W { w : self } } } } # [ doc = "System Clock Gating Control Register 5\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scgc5](scgc5) module" ] pub type SCGC5 = crate :: Reg < u32 , _SCGC5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCGC5 ; # [ doc = "`read()` method returns [scgc5::R](scgc5::R) reader structure" ] impl crate :: Readable for SCGC5 { } # [ doc = "`write(|w| ..)` method takes [scgc5::W](scgc5::W) writer structure" ] impl crate :: Writable for SCGC5 { } # [ doc = "System Clock Gating Control Register 5" ] pub mod scgc5 { # [ doc = "Reader of register SCGC5" ] pub type R = crate :: R < u32 , super :: SCGC5 > ; # [ doc = "Writer for register SCGC5" ] pub type W = crate :: W < u32 , super :: SCGC5 > ; # [ doc = "Register SCGC5 `reset()`'s with value 0x0004_0182" ] impl crate :: ResetValue for super :: SCGC5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0004_0182 } } # [ doc = "Low Power Timer Access Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPTMR_A { # [ doc = "0: Access disabled" ] _0 , # [ doc = "1: Access enabled" ] _1 } impl From < LPTMR_A > for bool { # [ inline ( always ) ] fn from ( variant : LPTMR_A ) -> Self { match variant { LPTMR_A :: _0 => false , LPTMR_A :: _1 => true } } } # [ doc = "Reader of field `LPTMR`" ] pub type LPTMR_R = crate :: R < bool , LPTMR_A > ; impl LPTMR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPTMR_A { match self . bits { false => LPTMR_A :: _0 , true => LPTMR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPTMR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPTMR_A :: _1 } } # [ doc = "Write proxy for field `LPTMR`" ] pub struct LPTMR_W < 'a > { w : & 'a mut W , } impl < 'a > LPTMR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPTMR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Access disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LPTMR_A :: _0 ) } # [ doc = "Access enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LPTMR_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "TSI Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TSI_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < TSI_A > for bool { # [ inline ( always ) ] fn from ( variant : TSI_A ) -> Self { match variant { TSI_A :: _0 => false , TSI_A :: _1 => true } } } # [ doc = "Reader of field `TSI`" ] pub type TSI_R = crate :: R < bool , TSI_A > ; impl TSI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TSI_A { match self . bits { false => TSI_A :: _0 , true => TSI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TSI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TSI_A :: _1 } } # [ doc = "Write proxy for field `TSI`" ] pub struct TSI_W < 'a > { w : & 'a mut W , } impl < 'a > TSI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TSI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TSI_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TSI_A :: _1 ) } # [ 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 = "Port A Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PORTA_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < PORTA_A > for bool { # [ inline ( always ) ] fn from ( variant : PORTA_A ) -> Self { match variant { PORTA_A :: _0 => false , PORTA_A :: _1 => true } } } # [ doc = "Reader of field `PORTA`" ] pub type PORTA_R = crate :: R < bool , PORTA_A > ; impl PORTA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PORTA_A { match self . bits { false => PORTA_A :: _0 , true => PORTA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PORTA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PORTA_A :: _1 } } # [ doc = "Write proxy for field `PORTA`" ] pub struct PORTA_W < 'a > { w : & 'a mut W , } impl < 'a > PORTA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PORTA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PORTA_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PORTA_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port B Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PORTB_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < PORTB_A > for bool { # [ inline ( always ) ] fn from ( variant : PORTB_A ) -> Self { match variant { PORTB_A :: _0 => false , PORTB_A :: _1 => true } } } # [ doc = "Reader of field `PORTB`" ] pub type PORTB_R = crate :: R < bool , PORTB_A > ; impl PORTB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PORTB_A { match self . bits { false => PORTB_A :: _0 , true => PORTB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PORTB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PORTB_A :: _1 } } # [ doc = "Write proxy for field `PORTB`" ] pub struct PORTB_W < 'a > { w : & 'a mut W , } impl < 'a > PORTB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PORTB_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PORTB_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PORTB_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port C Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PORTC_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < PORTC_A > for bool { # [ inline ( always ) ] fn from ( variant : PORTC_A ) -> Self { match variant { PORTC_A :: _0 => false , PORTC_A :: _1 => true } } } # [ doc = "Reader of field `PORTC`" ] pub type PORTC_R = crate :: R < bool , PORTC_A > ; impl PORTC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PORTC_A { match self . bits { false => PORTC_A :: _0 , true => PORTC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PORTC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PORTC_A :: _1 } } # [ doc = "Write proxy for field `PORTC`" ] pub struct PORTC_W < 'a > { w : & 'a mut W , } impl < 'a > PORTC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PORTC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PORTC_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PORTC_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port D Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PORTD_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < PORTD_A > for bool { # [ inline ( always ) ] fn from ( variant : PORTD_A ) -> Self { match variant { PORTD_A :: _0 => false , PORTD_A :: _1 => true } } } # [ doc = "Reader of field `PORTD`" ] pub type PORTD_R = crate :: R < bool , PORTD_A > ; impl PORTD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PORTD_A { match self . bits { false => PORTD_A :: _0 , true => PORTD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PORTD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PORTD_A :: _1 } } # [ doc = "Write proxy for field `PORTD`" ] pub struct PORTD_W < 'a > { w : & 'a mut W , } impl < 'a > PORTD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PORTD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PORTD_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PORTD_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port E Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PORTE_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < PORTE_A > for bool { # [ inline ( always ) ] fn from ( variant : PORTE_A ) -> Self { match variant { PORTE_A :: _0 => false , PORTE_A :: _1 => true } } } # [ doc = "Reader of field `PORTE`" ] pub type PORTE_R = crate :: R < bool , PORTE_A > ; impl PORTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PORTE_A { match self . bits { false => PORTE_A :: _0 , true => PORTE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PORTE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PORTE_A :: _1 } } # [ doc = "Write proxy for field `PORTE`" ] pub struct PORTE_W < 'a > { w : & 'a mut W , } impl < 'a > PORTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PORTE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PORTE_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PORTE_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Low Power Timer Access Control" ] # [ inline ( always ) ] pub fn lptmr ( & self ) -> LPTMR_R { LPTMR_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 5 - TSI Clock Gate Control" ] # [ inline ( always ) ] pub fn tsi ( & self ) -> TSI_R { TSI_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port A Clock Gate Control" ] # [ inline ( always ) ] pub fn porta ( & self ) -> PORTA_R { PORTA_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port B Clock Gate Control" ] # [ inline ( always ) ] pub fn portb ( & self ) -> PORTB_R { PORTB_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port C Clock Gate Control" ] # [ inline ( always ) ] pub fn portc ( & self ) -> PORTC_R { PORTC_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port D Clock Gate Control" ] # [ inline ( always ) ] pub fn portd ( & self ) -> PORTD_R { PORTD_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port E Clock Gate Control" ] # [ inline ( always ) ] pub fn porte ( & self ) -> PORTE_R { PORTE_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Low Power Timer Access Control" ] # [ inline ( always ) ] pub fn lptmr ( & mut self ) -> LPTMR_W { LPTMR_W { w : self } } # [ doc = "Bit 5 - TSI Clock Gate Control" ] # [ inline ( always ) ] pub fn tsi ( & mut self ) -> TSI_W { TSI_W { w : self } } # [ doc = "Bit 9 - Port A Clock Gate Control" ] # [ inline ( always ) ] pub fn porta ( & mut self ) -> PORTA_W { PORTA_W { w : self } } # [ doc = "Bit 10 - Port B Clock Gate Control" ] # [ inline ( always ) ] pub fn portb ( & mut self ) -> PORTB_W { PORTB_W { w : self } } # [ doc = "Bit 11 - Port C Clock Gate Control" ] # [ inline ( always ) ] pub fn portc ( & mut self ) -> PORTC_W { PORTC_W { w : self } } # [ doc = "Bit 12 - Port D Clock Gate Control" ] # [ inline ( always ) ] pub fn portd ( & mut self ) -> PORTD_W { PORTD_W { w : self } } # [ doc = "Bit 13 - Port E Clock Gate Control" ] # [ inline ( always ) ] pub fn porte ( & mut self ) -> PORTE_W { PORTE_W { w : self } } } } # [ doc = "System Clock Gating Control Register 6\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scgc6](scgc6) module" ] pub type SCGC6 = crate :: Reg < u32 , _SCGC6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCGC6 ; # [ doc = "`read()` method returns [scgc6::R](scgc6::R) reader structure" ] impl crate :: Readable for SCGC6 { } # [ doc = "`write(|w| ..)` method takes [scgc6::W](scgc6::W) writer structure" ] impl crate :: Writable for SCGC6 { } # [ doc = "System Clock Gating Control Register 6" ] pub mod scgc6 { # [ doc = "Reader of register SCGC6" ] pub type R = crate :: R < u32 , super :: SCGC6 > ; # [ doc = "Writer for register SCGC6" ] pub type W = crate :: W < u32 , super :: SCGC6 > ; # [ doc = "Register SCGC6 `reset()`'s with value 0x4000_0001" ] impl crate :: ResetValue for super :: SCGC6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x4000_0001 } } # [ doc = "Flash Memory Clock Gate Control\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTF_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FTF_A ) -> Self { match variant { FTF_A :: _0 => false , FTF_A :: _1 => true } } } # [ doc = "Reader of field `FTF`" ] pub type FTF_R = crate :: R < bool , FTF_A > ; impl FTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTF_A { match self . bits { false => FTF_A :: _0 , true => FTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTF_A :: _1 } } # [ doc = "Write proxy for field `FTF`" ] pub struct FTF_W < 'a > { w : & 'a mut W , } impl < 'a > FTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTF_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTF_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "DMA Mux Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAMUX_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < DMAMUX_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAMUX_A ) -> Self { match variant { DMAMUX_A :: _0 => false , DMAMUX_A :: _1 => true } } } # [ doc = "Reader of field `DMAMUX`" ] pub type DMAMUX_R = crate :: R < bool , DMAMUX_A > ; impl DMAMUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAMUX_A { match self . bits { false => DMAMUX_A :: _0 , true => DMAMUX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAMUX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAMUX_A :: _1 } } # [ doc = "Write proxy for field `DMAMUX`" ] pub struct DMAMUX_W < 'a > { w : & 'a mut W , } impl < 'a > DMAMUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAMUX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAMUX_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAMUX_A :: _1 ) } # [ 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 } } # [ doc = "FlexCAN0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLEXCAN0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FLEXCAN0_A > for bool { # [ inline ( always ) ] fn from ( variant : FLEXCAN0_A ) -> Self { match variant { FLEXCAN0_A :: _0 => false , FLEXCAN0_A :: _1 => true } } } # [ doc = "Reader of field `FLEXCAN0`" ] pub type FLEXCAN0_R = crate :: R < bool , FLEXCAN0_A > ; impl FLEXCAN0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLEXCAN0_A { match self . bits { false => FLEXCAN0_A :: _0 , true => FLEXCAN0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLEXCAN0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLEXCAN0_A :: _1 } } # [ doc = "Write proxy for field `FLEXCAN0`" ] pub struct FLEXCAN0_W < 'a > { w : & 'a mut W , } impl < 'a > FLEXCAN0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLEXCAN0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLEXCAN0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLEXCAN0_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `RNGA`" ] pub type RNGA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RNGA`" ] pub struct RNGA_W < 'a > { w : & 'a mut W , } impl < 'a > RNGA_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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "SPI0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SPI0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < SPI0_A > for bool { # [ inline ( always ) ] fn from ( variant : SPI0_A ) -> Self { match variant { SPI0_A :: _0 => false , SPI0_A :: _1 => true } } } # [ doc = "Reader of field `SPI0`" ] pub type SPI0_R = crate :: R < bool , SPI0_A > ; impl SPI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SPI0_A { match self . bits { false => SPI0_A :: _0 , true => SPI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SPI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SPI0_A :: _1 } } # [ doc = "Write proxy for field `SPI0`" ] pub struct SPI0_W < 'a > { w : & 'a mut W , } impl < 'a > SPI0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SPI0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SPI0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SPI0_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "SPI1 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SPI1_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < SPI1_A > for bool { # [ inline ( always ) ] fn from ( variant : SPI1_A ) -> Self { match variant { SPI1_A :: _0 => false , SPI1_A :: _1 => true } } } # [ doc = "Reader of field `SPI1`" ] pub type SPI1_R = crate :: R < bool , SPI1_A > ; impl SPI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SPI1_A { match self . bits { false => SPI1_A :: _0 , true => SPI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SPI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SPI1_A :: _1 } } # [ doc = "Write proxy for field `SPI1`" ] pub struct SPI1_W < 'a > { w : & 'a mut W , } impl < 'a > SPI1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SPI1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SPI1_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SPI1_A :: _1 ) } # [ 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 = "I2S Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum I2S_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < I2S_A > for bool { # [ inline ( always ) ] fn from ( variant : I2S_A ) -> Self { match variant { I2S_A :: _0 => false , I2S_A :: _1 => true } } } # [ doc = "Reader of field `I2S`" ] pub type I2S_R = crate :: R < bool , I2S_A > ; impl I2S_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> I2S_A { match self . bits { false => I2S_A :: _0 , true => I2S_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == I2S_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == I2S_A :: _1 } } # [ doc = "Write proxy for field `I2S`" ] pub struct I2S_W < 'a > { w : & 'a mut W , } impl < 'a > I2S_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : I2S_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( I2S_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( I2S_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "CRC Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRC_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < CRC_A > for bool { # [ inline ( always ) ] fn from ( variant : CRC_A ) -> Self { match variant { CRC_A :: _0 => false , CRC_A :: _1 => true } } } # [ doc = "Reader of field `CRC`" ] pub type CRC_R = crate :: R < bool , CRC_A > ; impl CRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRC_A { match self . bits { false => CRC_A :: _0 , true => CRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRC_A :: _1 } } # [ doc = "Write proxy for field `CRC`" ] pub struct CRC_W < 'a > { w : & 'a mut W , } impl < 'a > CRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRC_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRC_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "USB DCD Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBDCD_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < USBDCD_A > for bool { # [ inline ( always ) ] fn from ( variant : USBDCD_A ) -> Self { match variant { USBDCD_A :: _0 => false , USBDCD_A :: _1 => true } } } # [ doc = "Reader of field `USBDCD`" ] pub type USBDCD_R = crate :: R < bool , USBDCD_A > ; impl USBDCD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBDCD_A { match self . bits { false => USBDCD_A :: _0 , true => USBDCD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBDCD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBDCD_A :: _1 } } # [ doc = "Write proxy for field `USBDCD`" ] pub struct USBDCD_W < 'a > { w : & 'a mut W , } impl < 'a > USBDCD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBDCD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBDCD_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBDCD_A :: _1 ) } # [ 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 = "PDB Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDB_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < PDB_A > for bool { # [ inline ( always ) ] fn from ( variant : PDB_A ) -> Self { match variant { PDB_A :: _0 => false , PDB_A :: _1 => true } } } # [ doc = "Reader of field `PDB`" ] pub type PDB_R = crate :: R < bool , PDB_A > ; impl PDB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDB_A { match self . bits { false => PDB_A :: _0 , true => PDB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDB_A :: _1 } } # [ doc = "Write proxy for field `PDB`" ] pub struct PDB_W < 'a > { w : & 'a mut W , } impl < 'a > PDB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDB_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDB_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDB_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "PIT Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIT_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < PIT_A > for bool { # [ inline ( always ) ] fn from ( variant : PIT_A ) -> Self { match variant { PIT_A :: _0 => false , PIT_A :: _1 => true } } } # [ doc = "Reader of field `PIT`" ] pub type PIT_R = crate :: R < bool , PIT_A > ; impl PIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PIT_A { match self . bits { false => PIT_A :: _0 , true => PIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PIT_A :: _1 } } # [ doc = "Write proxy for field `PIT`" ] pub struct PIT_W < 'a > { w : & 'a mut W , } impl < 'a > PIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PIT_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PIT_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "FTM0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FTM0_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM0_A ) -> Self { match variant { FTM0_A :: _0 => false , FTM0_A :: _1 => true } } } # [ doc = "Reader of field `FTM0`" ] pub type FTM0_R = crate :: R < bool , FTM0_A > ; impl FTM0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM0_A { match self . bits { false => FTM0_A :: _0 , true => FTM0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM0_A :: _1 } } # [ doc = "Write proxy for field `FTM0`" ] pub struct FTM0_W < 'a > { w : & 'a mut W , } impl < 'a > FTM0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM0_A :: _1 ) } # [ 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 = "FTM1 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM1_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FTM1_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM1_A ) -> Self { match variant { FTM1_A :: _0 => false , FTM1_A :: _1 => true } } } # [ doc = "Reader of field `FTM1`" ] pub type FTM1_R = crate :: R < bool , FTM1_A > ; impl FTM1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM1_A { match self . bits { false => FTM1_A :: _0 , true => FTM1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM1_A :: _1 } } # [ doc = "Write proxy for field `FTM1`" ] pub struct FTM1_W < 'a > { w : & 'a mut W , } impl < 'a > FTM1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM1_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM1_A :: _1 ) } # [ 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 = "FTM2 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FTM2_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FTM2_A > for bool { # [ inline ( always ) ] fn from ( variant : FTM2_A ) -> Self { match variant { FTM2_A :: _0 => false , FTM2_A :: _1 => true } } } # [ doc = "Reader of field `FTM2`" ] pub type FTM2_R = crate :: R < bool , FTM2_A > ; impl FTM2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FTM2_A { match self . bits { false => FTM2_A :: _0 , true => FTM2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FTM2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FTM2_A :: _1 } } # [ doc = "Write proxy for field `FTM2`" ] pub struct FTM2_W < 'a > { w : & 'a mut W , } impl < 'a > FTM2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FTM2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FTM2_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FTM2_A :: _1 ) } # [ 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 = "ADC0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADC0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < ADC0_A > for bool { # [ inline ( always ) ] fn from ( variant : ADC0_A ) -> Self { match variant { ADC0_A :: _0 => false , ADC0_A :: _1 => true } } } # [ doc = "Reader of field `ADC0`" ] pub type ADC0_R = crate :: R < bool , ADC0_A > ; impl ADC0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADC0_A { match self . bits { false => ADC0_A :: _0 , true => ADC0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADC0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADC0_A :: _1 } } # [ doc = "Write proxy for field `ADC0`" ] pub struct ADC0_W < 'a > { w : & 'a mut W , } impl < 'a > ADC0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADC0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADC0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADC0_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "RTC Access Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RTC_A { # [ doc = "0: Access and interrupts disabled" ] _0 , # [ doc = "1: Access and interrupts enabled" ] _1 } impl From < RTC_A > for bool { # [ inline ( always ) ] fn from ( variant : RTC_A ) -> Self { match variant { RTC_A :: _0 => false , RTC_A :: _1 => true } } } # [ doc = "Reader of field `RTC`" ] pub type RTC_R = crate :: R < bool , RTC_A > ; impl RTC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RTC_A { match self . bits { false => RTC_A :: _0 , true => RTC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RTC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RTC_A :: _1 } } # [ doc = "Write proxy for field `RTC`" ] pub struct RTC_W < 'a > { w : & 'a mut W , } impl < 'a > RTC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RTC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Access and interrupts disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RTC_A :: _0 ) } # [ doc = "Access and interrupts enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RTC_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "DAC0 Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DAC0_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < DAC0_A > for bool { # [ inline ( always ) ] fn from ( variant : DAC0_A ) -> Self { match variant { DAC0_A :: _0 => false , DAC0_A :: _1 => true } } } # [ doc = "Reader of field `DAC0`" ] pub type DAC0_R = crate :: R < bool , DAC0_A > ; impl DAC0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DAC0_A { match self . bits { false => DAC0_A :: _0 , true => DAC0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DAC0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DAC0_A :: _1 } } # [ doc = "Write proxy for field `DAC0`" ] pub struct DAC0_W < 'a > { w : & 'a mut W , } impl < 'a > DAC0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DAC0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DAC0_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DAC0_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Flash Memory Clock Gate Control" ] # [ inline ( always ) ] pub fn ftf ( & self ) -> FTF_R { FTF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - DMA Mux Clock Gate Control" ] # [ inline ( always ) ] pub fn dmamux ( & self ) -> DMAMUX_R { DMAMUX_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - FlexCAN0 Clock Gate Control" ] # [ inline ( always ) ] pub fn flexcan0 ( & self ) -> FLEXCAN0_R { FLEXCAN0_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - RNGA Clock Gate Control" ] # [ inline ( always ) ] pub fn rnga ( & self ) -> RNGA_R { RNGA_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - SPI0 Clock Gate Control" ] # [ inline ( always ) ] pub fn spi0 ( & self ) -> SPI0_R { SPI0_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - SPI1 Clock Gate Control" ] # [ inline ( always ) ] pub fn spi1 ( & self ) -> SPI1_R { SPI1_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - I2S Clock Gate Control" ] # [ inline ( always ) ] pub fn i2s ( & self ) -> I2S_R { I2S_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - CRC Clock Gate Control" ] # [ inline ( always ) ] pub fn crc ( & self ) -> CRC_R { CRC_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - USB DCD Clock Gate Control" ] # [ inline ( always ) ] pub fn usbdcd ( & self ) -> USBDCD_R { USBDCD_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - PDB Clock Gate Control" ] # [ inline ( always ) ] pub fn pdb ( & self ) -> PDB_R { PDB_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - PIT Clock Gate Control" ] # [ inline ( always ) ] pub fn pit ( & self ) -> PIT_R { PIT_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - FTM0 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm0 ( & self ) -> FTM0_R { FTM0_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - FTM1 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm1 ( & self ) -> FTM1_R { FTM1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - FTM2 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm2 ( & self ) -> FTM2_R { FTM2_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - ADC0 Clock Gate Control" ] # [ inline ( always ) ] pub fn adc0 ( & self ) -> ADC0_R { ADC0_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - RTC Access Control" ] # [ inline ( always ) ] pub fn rtc ( & self ) -> RTC_R { RTC_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - DAC0 Clock Gate Control" ] # [ inline ( always ) ] pub fn dac0 ( & self ) -> DAC0_R { DAC0_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Flash Memory Clock Gate Control" ] # [ inline ( always ) ] pub fn ftf ( & mut self ) -> FTF_W { FTF_W { w : self } } # [ doc = "Bit 1 - DMA Mux Clock Gate Control" ] # [ inline ( always ) ] pub fn dmamux ( & mut self ) -> DMAMUX_W { DMAMUX_W { w : self } } # [ doc = "Bit 4 - FlexCAN0 Clock Gate Control" ] # [ inline ( always ) ] pub fn flexcan0 ( & mut self ) -> FLEXCAN0_W { FLEXCAN0_W { w : self } } # [ doc = "Bit 9 - RNGA Clock Gate Control" ] # [ inline ( always ) ] pub fn rnga ( & mut self ) -> RNGA_W { RNGA_W { w : self } } # [ doc = "Bit 12 - SPI0 Clock Gate Control" ] # [ inline ( always ) ] pub fn spi0 ( & mut self ) -> SPI0_W { SPI0_W { w : self } } # [ doc = "Bit 13 - SPI1 Clock Gate Control" ] # [ inline ( always ) ] pub fn spi1 ( & mut self ) -> SPI1_W { SPI1_W { w : self } } # [ doc = "Bit 15 - I2S Clock Gate Control" ] # [ inline ( always ) ] pub fn i2s ( & mut self ) -> I2S_W { I2S_W { w : self } } # [ doc = "Bit 18 - CRC Clock Gate Control" ] # [ inline ( always ) ] pub fn crc ( & mut self ) -> CRC_W { CRC_W { w : self } } # [ doc = "Bit 21 - USB DCD Clock Gate Control" ] # [ inline ( always ) ] pub fn usbdcd ( & mut self ) -> USBDCD_W { USBDCD_W { w : self } } # [ doc = "Bit 22 - PDB Clock Gate Control" ] # [ inline ( always ) ] pub fn pdb ( & mut self ) -> PDB_W { PDB_W { w : self } } # [ doc = "Bit 23 - PIT Clock Gate Control" ] # [ inline ( always ) ] pub fn pit ( & mut self ) -> PIT_W { PIT_W { w : self } } # [ doc = "Bit 24 - FTM0 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm0 ( & mut self ) -> FTM0_W { FTM0_W { w : self } } # [ doc = "Bit 25 - FTM1 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm1 ( & mut self ) -> FTM1_W { FTM1_W { w : self } } # [ doc = "Bit 26 - FTM2 Clock Gate Control" ] # [ inline ( always ) ] pub fn ftm2 ( & mut self ) -> FTM2_W { FTM2_W { w : self } } # [ doc = "Bit 27 - ADC0 Clock Gate Control" ] # [ inline ( always ) ] pub fn adc0 ( & mut self ) -> ADC0_W { ADC0_W { w : self } } # [ doc = "Bit 29 - RTC Access Control" ] # [ inline ( always ) ] pub fn rtc ( & mut self ) -> RTC_W { RTC_W { w : self } } # [ doc = "Bit 31 - DAC0 Clock Gate Control" ] # [ inline ( always ) ] pub fn dac0 ( & mut self ) -> DAC0_W { DAC0_W { w : self } } } } # [ doc = "System Clock Gating Control Register 7\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scgc7](scgc7) module" ] pub type SCGC7 = crate :: Reg < u32 , _SCGC7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCGC7 ; # [ doc = "`read()` method returns [scgc7::R](scgc7::R) reader structure" ] impl crate :: Readable for SCGC7 { } # [ doc = "`write(|w| ..)` method takes [scgc7::W](scgc7::W) writer structure" ] impl crate :: Writable for SCGC7 { } # [ doc = "System Clock Gating Control Register 7" ] pub mod scgc7 { # [ doc = "Reader of register SCGC7" ] pub type R = crate :: R < u32 , super :: SCGC7 > ; # [ doc = "Writer for register SCGC7" ] pub type W = crate :: W < u32 , super :: SCGC7 > ; # [ doc = "Register SCGC7 `reset()`'s with value 0x06" ] impl crate :: ResetValue for super :: SCGC7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x06 } } # [ doc = "FlexBus Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLEXBUS_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < FLEXBUS_A > for bool { # [ inline ( always ) ] fn from ( variant : FLEXBUS_A ) -> Self { match variant { FLEXBUS_A :: _0 => false , FLEXBUS_A :: _1 => true } } } # [ doc = "Reader of field `FLEXBUS`" ] pub type FLEXBUS_R = crate :: R < bool , FLEXBUS_A > ; impl FLEXBUS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLEXBUS_A { match self . bits { false => FLEXBUS_A :: _0 , true => FLEXBUS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLEXBUS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLEXBUS_A :: _1 } } # [ doc = "Write proxy for field `FLEXBUS`" ] pub struct FLEXBUS_W < 'a > { w : & 'a mut W , } impl < 'a > FLEXBUS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLEXBUS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLEXBUS_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLEXBUS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "DMA Clock Gate Control\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 } } # [ doc = "MPU Clock Gate Control\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MPU_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < MPU_A > for bool { # [ inline ( always ) ] fn from ( variant : MPU_A ) -> Self { match variant { MPU_A :: _0 => false , MPU_A :: _1 => true } } } # [ doc = "Reader of field `MPU`" ] pub type MPU_R = crate :: R < bool , MPU_A > ; impl MPU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MPU_A { match self . bits { false => MPU_A :: _0 , true => MPU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MPU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MPU_A :: _1 } } # [ doc = "Write proxy for field `MPU`" ] pub struct MPU_W < 'a > { w : & 'a mut W , } impl < 'a > MPU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MPU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MPU_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MPU_A :: _1 ) } # [ 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 = "SDRAMC Clock Gate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SDRAMC_A { # [ doc = "0: Clock disabled" ] _0 , # [ doc = "1: Clock enabled" ] _1 } impl From < SDRAMC_A > for bool { # [ inline ( always ) ] fn from ( variant : SDRAMC_A ) -> Self { match variant { SDRAMC_A :: _0 => false , SDRAMC_A :: _1 => true } } } # [ doc = "Reader of field `SDRAMC`" ] pub type SDRAMC_R = crate :: R < bool , SDRAMC_A > ; impl SDRAMC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SDRAMC_A { match self . bits { false => SDRAMC_A :: _0 , true => SDRAMC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SDRAMC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SDRAMC_A :: _1 } } # [ doc = "Write proxy for field `SDRAMC`" ] pub struct SDRAMC_W < 'a > { w : & 'a mut W , } impl < 'a > SDRAMC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SDRAMC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Clock disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SDRAMC_A :: _0 ) } # [ doc = "Clock enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SDRAMC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - FlexBus Clock Gate Control" ] # [ inline ( always ) ] pub fn flexbus ( & self ) -> FLEXBUS_R { FLEXBUS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - DMA Clock Gate Control" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - MPU Clock Gate Control" ] # [ inline ( always ) ] pub fn mpu ( & self ) -> MPU_R { MPU_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - SDRAMC Clock Gate Control" ] # [ inline ( always ) ] pub fn sdramc ( & self ) -> SDRAMC_R { SDRAMC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - FlexBus Clock Gate Control" ] # [ inline ( always ) ] pub fn flexbus ( & mut self ) -> FLEXBUS_W { FLEXBUS_W { w : self } } # [ doc = "Bit 1 - DMA Clock Gate Control" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } # [ doc = "Bit 2 - MPU Clock Gate Control" ] # [ inline ( always ) ] pub fn mpu ( & mut self ) -> MPU_W { MPU_W { w : self } } # [ doc = "Bit 3 - SDRAMC Clock Gate Control" ] # [ inline ( always ) ] pub fn sdramc ( & mut self ) -> SDRAMC_W { SDRAMC_W { w : self } } } } # [ doc = "System Clock Divider Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clkdiv1](clkdiv1) module" ] pub type CLKDIV1 = crate :: Reg < u32 , _CLKDIV1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLKDIV1 ; # [ doc = "`read()` method returns [clkdiv1::R](clkdiv1::R) reader structure" ] impl crate :: Readable for CLKDIV1 { } # [ doc = "`write(|w| ..)` method takes [clkdiv1::W](clkdiv1::W) writer structure" ] impl crate :: Writable for CLKDIV1 { } # [ doc = "System Clock Divider Register 1" ] pub mod clkdiv1 { # [ doc = "Reader of register CLKDIV1" ] pub type R = crate :: R < u32 , super :: CLKDIV1 > ; # [ doc = "Writer for register CLKDIV1" ] pub type W = crate :: W < u32 , super :: CLKDIV1 > ; # [ doc = "Register CLKDIV1 `reset()`'s with value 0x0011_0000" ] impl crate :: ResetValue for super :: CLKDIV1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0011_0000 } } # [ doc = "Clock 4 output divider value\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OUTDIV4_A { # [ doc = "0: Divide-by-1." ] _0000 , # [ doc = "1: Divide-by-2." ] _0001 , # [ doc = "2: Divide-by-3." ] _0010 , # [ doc = "3: Divide-by-4." ] _0011 , # [ doc = "4: Divide-by-5." ] _0100 , # [ doc = "5: Divide-by-6." ] _0101 , # [ doc = "6: Divide-by-7." ] _0110 , # [ doc = "7: Divide-by-8." ] _0111 , # [ doc = "8: Divide-by-9." ] _1000 , # [ doc = "9: Divide-by-10." ] _1001 , # [ doc = "10: Divide-by-11." ] _1010 , # [ doc = "11: Divide-by-12." ] _1011 , # [ doc = "12: Divide-by-13." ] _1100 , # [ doc = "13: Divide-by-14." ] _1101 , # [ doc = "14: Divide-by-15." ] _1110 , # [ doc = "15: Divide-by-16." ] _1111 } impl From < OUTDIV4_A > for u8 { # [ inline ( always ) ] fn from ( variant : OUTDIV4_A ) -> Self { match variant { OUTDIV4_A :: _0000 => 0 , OUTDIV4_A :: _0001 => 1 , OUTDIV4_A :: _0010 => 2 , OUTDIV4_A :: _0011 => 3 , OUTDIV4_A :: _0100 => 4 , OUTDIV4_A :: _0101 => 5 , OUTDIV4_A :: _0110 => 6 , OUTDIV4_A :: _0111 => 7 , OUTDIV4_A :: _1000 => 8 , OUTDIV4_A :: _1001 => 9 , OUTDIV4_A :: _1010 => 10 , OUTDIV4_A :: _1011 => 11 , OUTDIV4_A :: _1100 => 12 , OUTDIV4_A :: _1101 => 13 , OUTDIV4_A :: _1110 => 14 , OUTDIV4_A :: _1111 => 15 } } } # [ doc = "Reader of field `OUTDIV4`" ] pub type OUTDIV4_R = crate :: R < u8 , OUTDIV4_A > ; impl OUTDIV4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OUTDIV4_A { match self . bits { 0 => OUTDIV4_A :: _0000 , 1 => OUTDIV4_A :: _0001 , 2 => OUTDIV4_A :: _0010 , 3 => OUTDIV4_A :: _0011 , 4 => OUTDIV4_A :: _0100 , 5 => OUTDIV4_A :: _0101 , 6 => OUTDIV4_A :: _0110 , 7 => OUTDIV4_A :: _0111 , 8 => OUTDIV4_A :: _1000 , 9 => OUTDIV4_A :: _1001 , 10 => OUTDIV4_A :: _1010 , 11 => OUTDIV4_A :: _1011 , 12 => OUTDIV4_A :: _1100 , 13 => OUTDIV4_A :: _1101 , 14 => OUTDIV4_A :: _1110 , 15 => OUTDIV4_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == OUTDIV4_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == OUTDIV4_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == OUTDIV4_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == OUTDIV4_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == OUTDIV4_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == OUTDIV4_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == OUTDIV4_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == OUTDIV4_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == OUTDIV4_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == OUTDIV4_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == OUTDIV4_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == OUTDIV4_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == OUTDIV4_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == OUTDIV4_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == OUTDIV4_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == OUTDIV4_A :: _1111 } } # [ doc = "Write proxy for field `OUTDIV4`" ] pub struct OUTDIV4_W < 'a > { w : & 'a mut W , } impl < 'a > OUTDIV4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OUTDIV4_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide-by-1." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _0000 ) } # [ doc = "Divide-by-2." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _0001 ) } # [ doc = "Divide-by-3." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _0010 ) } # [ doc = "Divide-by-4." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _0011 ) } # [ doc = "Divide-by-5." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _0100 ) } # [ doc = "Divide-by-6." ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _0101 ) } # [ doc = "Divide-by-7." ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _0110 ) } # [ doc = "Divide-by-8." ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _0111 ) } # [ doc = "Divide-by-9." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _1000 ) } # [ doc = "Divide-by-10." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _1001 ) } # [ doc = "Divide-by-11." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _1010 ) } # [ doc = "Divide-by-12." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _1011 ) } # [ doc = "Divide-by-13." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _1100 ) } # [ doc = "Divide-by-14." ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _1101 ) } # [ doc = "Divide-by-15." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _1110 ) } # [ doc = "Divide-by-16." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( OUTDIV4_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Clock 3 output divider value\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OUTDIV3_A { # [ doc = "0: Divide-by-1." ] _0000 , # [ doc = "1: Divide-by-2." ] _0001 , # [ doc = "2: Divide-by-3." ] _0010 , # [ doc = "3: Divide-by-4." ] _0011 , # [ doc = "4: Divide-by-5." ] _0100 , # [ doc = "5: Divide-by-6." ] _0101 , # [ doc = "6: Divide-by-7." ] _0110 , # [ doc = "7: Divide-by-8." ] _0111 , # [ doc = "8: Divide-by-9." ] _1000 , # [ doc = "9: Divide-by-10." ] _1001 , # [ doc = "10: Divide-by-11." ] _1010 , # [ doc = "11: Divide-by-12." ] _1011 , # [ doc = "12: Divide-by-13." ] _1100 , # [ doc = "13: Divide-by-14." ] _1101 , # [ doc = "14: Divide-by-15." ] _1110 , # [ doc = "15: Divide-by-16." ] _1111 } impl From < OUTDIV3_A > for u8 { # [ inline ( always ) ] fn from ( variant : OUTDIV3_A ) -> Self { match variant { OUTDIV3_A :: _0000 => 0 , OUTDIV3_A :: _0001 => 1 , OUTDIV3_A :: _0010 => 2 , OUTDIV3_A :: _0011 => 3 , OUTDIV3_A :: _0100 => 4 , OUTDIV3_A :: _0101 => 5 , OUTDIV3_A :: _0110 => 6 , OUTDIV3_A :: _0111 => 7 , OUTDIV3_A :: _1000 => 8 , OUTDIV3_A :: _1001 => 9 , OUTDIV3_A :: _1010 => 10 , OUTDIV3_A :: _1011 => 11 , OUTDIV3_A :: _1100 => 12 , OUTDIV3_A :: _1101 => 13 , OUTDIV3_A :: _1110 => 14 , OUTDIV3_A :: _1111 => 15 } } } # [ doc = "Reader of field `OUTDIV3`" ] pub type OUTDIV3_R = crate :: R < u8 , OUTDIV3_A > ; impl OUTDIV3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OUTDIV3_A { match self . bits { 0 => OUTDIV3_A :: _0000 , 1 => OUTDIV3_A :: _0001 , 2 => OUTDIV3_A :: _0010 , 3 => OUTDIV3_A :: _0011 , 4 => OUTDIV3_A :: _0100 , 5 => OUTDIV3_A :: _0101 , 6 => OUTDIV3_A :: _0110 , 7 => OUTDIV3_A :: _0111 , 8 => OUTDIV3_A :: _1000 , 9 => OUTDIV3_A :: _1001 , 10 => OUTDIV3_A :: _1010 , 11 => OUTDIV3_A :: _1011 , 12 => OUTDIV3_A :: _1100 , 13 => OUTDIV3_A :: _1101 , 14 => OUTDIV3_A :: _1110 , 15 => OUTDIV3_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == OUTDIV3_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == OUTDIV3_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == OUTDIV3_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == OUTDIV3_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == OUTDIV3_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == OUTDIV3_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == OUTDIV3_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == OUTDIV3_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == OUTDIV3_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == OUTDIV3_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == OUTDIV3_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == OUTDIV3_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == OUTDIV3_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == OUTDIV3_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == OUTDIV3_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == OUTDIV3_A :: _1111 } } # [ doc = "Write proxy for field `OUTDIV3`" ] pub struct OUTDIV3_W < 'a > { w : & 'a mut W , } impl < 'a > OUTDIV3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OUTDIV3_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide-by-1." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _0000 ) } # [ doc = "Divide-by-2." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _0001 ) } # [ doc = "Divide-by-3." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _0010 ) } # [ doc = "Divide-by-4." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _0011 ) } # [ doc = "Divide-by-5." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _0100 ) } # [ doc = "Divide-by-6." ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _0101 ) } # [ doc = "Divide-by-7." ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _0110 ) } # [ doc = "Divide-by-8." ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _0111 ) } # [ doc = "Divide-by-9." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _1000 ) } # [ doc = "Divide-by-10." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _1001 ) } # [ doc = "Divide-by-11." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _1010 ) } # [ doc = "Divide-by-12." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _1011 ) } # [ doc = "Divide-by-13." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _1100 ) } # [ doc = "Divide-by-14." ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _1101 ) } # [ doc = "Divide-by-15." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _1110 ) } # [ doc = "Divide-by-16." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( OUTDIV3_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x0f << 20 ) ) | ( ( ( value as u32 ) & 0x0f ) << 20 ) ; self . w } } # [ doc = "Clock 2 output divider value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OUTDIV2_A { # [ doc = "0: Divide-by-1." ] _0000 , # [ doc = "1: Divide-by-2." ] _0001 , # [ doc = "2: Divide-by-3." ] _0010 , # [ doc = "3: Divide-by-4." ] _0011 , # [ doc = "4: Divide-by-5." ] _0100 , # [ doc = "5: Divide-by-6." ] _0101 , # [ doc = "6: Divide-by-7." ] _0110 , # [ doc = "7: Divide-by-8." ] _0111 , # [ doc = "8: Divide-by-9." ] _1000 , # [ doc = "9: Divide-by-10." ] _1001 , # [ doc = "10: Divide-by-11." ] _1010 , # [ doc = "11: Divide-by-12." ] _1011 , # [ doc = "12: Divide-by-13." ] _1100 , # [ doc = "13: Divide-by-14." ] _1101 , # [ doc = "14: Divide-by-15." ] _1110 , # [ doc = "15: Divide-by-16." ] _1111 } impl From < OUTDIV2_A > for u8 { # [ inline ( always ) ] fn from ( variant : OUTDIV2_A ) -> Self { match variant { OUTDIV2_A :: _0000 => 0 , OUTDIV2_A :: _0001 => 1 , OUTDIV2_A :: _0010 => 2 , OUTDIV2_A :: _0011 => 3 , OUTDIV2_A :: _0100 => 4 , OUTDIV2_A :: _0101 => 5 , OUTDIV2_A :: _0110 => 6 , OUTDIV2_A :: _0111 => 7 , OUTDIV2_A :: _1000 => 8 , OUTDIV2_A :: _1001 => 9 , OUTDIV2_A :: _1010 => 10 , OUTDIV2_A :: _1011 => 11 , OUTDIV2_A :: _1100 => 12 , OUTDIV2_A :: _1101 => 13 , OUTDIV2_A :: _1110 => 14 , OUTDIV2_A :: _1111 => 15 } } } # [ doc = "Reader of field `OUTDIV2`" ] pub type OUTDIV2_R = crate :: R < u8 , OUTDIV2_A > ; impl OUTDIV2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OUTDIV2_A { match self . bits { 0 => OUTDIV2_A :: _0000 , 1 => OUTDIV2_A :: _0001 , 2 => OUTDIV2_A :: _0010 , 3 => OUTDIV2_A :: _0011 , 4 => OUTDIV2_A :: _0100 , 5 => OUTDIV2_A :: _0101 , 6 => OUTDIV2_A :: _0110 , 7 => OUTDIV2_A :: _0111 , 8 => OUTDIV2_A :: _1000 , 9 => OUTDIV2_A :: _1001 , 10 => OUTDIV2_A :: _1010 , 11 => OUTDIV2_A :: _1011 , 12 => OUTDIV2_A :: _1100 , 13 => OUTDIV2_A :: _1101 , 14 => OUTDIV2_A :: _1110 , 15 => OUTDIV2_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == OUTDIV2_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == OUTDIV2_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == OUTDIV2_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == OUTDIV2_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == OUTDIV2_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == OUTDIV2_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == OUTDIV2_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == OUTDIV2_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == OUTDIV2_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == OUTDIV2_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == OUTDIV2_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == OUTDIV2_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == OUTDIV2_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == OUTDIV2_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == OUTDIV2_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == OUTDIV2_A :: _1111 } } # [ doc = "Write proxy for field `OUTDIV2`" ] pub struct OUTDIV2_W < 'a > { w : & 'a mut W , } impl < 'a > OUTDIV2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OUTDIV2_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide-by-1." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _0000 ) } # [ doc = "Divide-by-2." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _0001 ) } # [ doc = "Divide-by-3." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _0010 ) } # [ doc = "Divide-by-4." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _0011 ) } # [ doc = "Divide-by-5." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _0100 ) } # [ doc = "Divide-by-6." ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _0101 ) } # [ doc = "Divide-by-7." ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _0110 ) } # [ doc = "Divide-by-8." ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _0111 ) } # [ doc = "Divide-by-9." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _1000 ) } # [ doc = "Divide-by-10." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _1001 ) } # [ doc = "Divide-by-11." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _1010 ) } # [ doc = "Divide-by-12." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _1011 ) } # [ doc = "Divide-by-13." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _1100 ) } # [ doc = "Divide-by-14." ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _1101 ) } # [ doc = "Divide-by-15." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _1110 ) } # [ doc = "Divide-by-16." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( OUTDIV2_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } # [ doc = "Clock 1 output divider value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OUTDIV1_A { # [ doc = "0: Divide-by-1." ] _0000 , # [ doc = "1: Divide-by-2." ] _0001 , # [ doc = "2: Divide-by-3." ] _0010 , # [ doc = "3: Divide-by-4." ] _0011 , # [ doc = "4: Divide-by-5." ] _0100 , # [ doc = "5: Divide-by-6." ] _0101 , # [ doc = "6: Divide-by-7." ] _0110 , # [ doc = "7: Divide-by-8." ] _0111 , # [ doc = "8: Divide-by-9." ] _1000 , # [ doc = "9: Divide-by-10." ] _1001 , # [ doc = "10: Divide-by-11." ] _1010 , # [ doc = "11: Divide-by-12." ] _1011 , # [ doc = "12: Divide-by-13." ] _1100 , # [ doc = "13: Divide-by-14." ] _1101 , # [ doc = "14: Divide-by-15." ] _1110 , # [ doc = "15: Divide-by-16." ] _1111 } impl From < OUTDIV1_A > for u8 { # [ inline ( always ) ] fn from ( variant : OUTDIV1_A ) -> Self { match variant { OUTDIV1_A :: _0000 => 0 , OUTDIV1_A :: _0001 => 1 , OUTDIV1_A :: _0010 => 2 , OUTDIV1_A :: _0011 => 3 , OUTDIV1_A :: _0100 => 4 , OUTDIV1_A :: _0101 => 5 , OUTDIV1_A :: _0110 => 6 , OUTDIV1_A :: _0111 => 7 , OUTDIV1_A :: _1000 => 8 , OUTDIV1_A :: _1001 => 9 , OUTDIV1_A :: _1010 => 10 , OUTDIV1_A :: _1011 => 11 , OUTDIV1_A :: _1100 => 12 , OUTDIV1_A :: _1101 => 13 , OUTDIV1_A :: _1110 => 14 , OUTDIV1_A :: _1111 => 15 } } } # [ doc = "Reader of field `OUTDIV1`" ] pub type OUTDIV1_R = crate :: R < u8 , OUTDIV1_A > ; impl OUTDIV1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OUTDIV1_A { match self . bits { 0 => OUTDIV1_A :: _0000 , 1 => OUTDIV1_A :: _0001 , 2 => OUTDIV1_A :: _0010 , 3 => OUTDIV1_A :: _0011 , 4 => OUTDIV1_A :: _0100 , 5 => OUTDIV1_A :: _0101 , 6 => OUTDIV1_A :: _0110 , 7 => OUTDIV1_A :: _0111 , 8 => OUTDIV1_A :: _1000 , 9 => OUTDIV1_A :: _1001 , 10 => OUTDIV1_A :: _1010 , 11 => OUTDIV1_A :: _1011 , 12 => OUTDIV1_A :: _1100 , 13 => OUTDIV1_A :: _1101 , 14 => OUTDIV1_A :: _1110 , 15 => OUTDIV1_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == OUTDIV1_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == OUTDIV1_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == OUTDIV1_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == OUTDIV1_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == OUTDIV1_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == OUTDIV1_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == OUTDIV1_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == OUTDIV1_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == OUTDIV1_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == OUTDIV1_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == OUTDIV1_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == OUTDIV1_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == OUTDIV1_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == OUTDIV1_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == OUTDIV1_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == OUTDIV1_A :: _1111 } } # [ doc = "Write proxy for field `OUTDIV1`" ] pub struct OUTDIV1_W < 'a > { w : & 'a mut W , } impl < 'a > OUTDIV1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OUTDIV1_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide-by-1." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _0000 ) } # [ doc = "Divide-by-2." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _0001 ) } # [ doc = "Divide-by-3." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _0010 ) } # [ doc = "Divide-by-4." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _0011 ) } # [ doc = "Divide-by-5." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _0100 ) } # [ doc = "Divide-by-6." ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _0101 ) } # [ doc = "Divide-by-7." ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _0110 ) } # [ doc = "Divide-by-8." ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _0111 ) } # [ doc = "Divide-by-9." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _1000 ) } # [ doc = "Divide-by-10." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _1001 ) } # [ doc = "Divide-by-11." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _1010 ) } # [ doc = "Divide-by-12." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _1011 ) } # [ doc = "Divide-by-13." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _1100 ) } # [ doc = "Divide-by-14." ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _1101 ) } # [ doc = "Divide-by-15." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _1110 ) } # [ doc = "Divide-by-16." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( OUTDIV1_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl R { # [ doc = "Bits 16:19 - Clock 4 output divider value" ] # [ inline ( always ) ] pub fn outdiv4 ( & self ) -> OUTDIV4_R { OUTDIV4_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bits 20:23 - Clock 3 output divider value" ] # [ inline ( always ) ] pub fn outdiv3 ( & self ) -> OUTDIV3_R { OUTDIV3_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - Clock 2 output divider value" ] # [ inline ( always ) ] pub fn outdiv2 ( & self ) -> OUTDIV2_R { OUTDIV2_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - Clock 1 output divider value" ] # [ inline ( always ) ] pub fn outdiv1 ( & self ) -> OUTDIV1_R { OUTDIV1_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 16:19 - Clock 4 output divider value" ] # [ inline ( always ) ] pub fn outdiv4 ( & mut self ) -> OUTDIV4_W { OUTDIV4_W { w : self } } # [ doc = "Bits 20:23 - Clock 3 output divider value" ] # [ inline ( always ) ] pub fn outdiv3 ( & mut self ) -> OUTDIV3_W { OUTDIV3_W { w : self } } # [ doc = "Bits 24:27 - Clock 2 output divider value" ] # [ inline ( always ) ] pub fn outdiv2 ( & mut self ) -> OUTDIV2_W { OUTDIV2_W { w : self } } # [ doc = "Bits 28:31 - Clock 1 output divider value" ] # [ inline ( always ) ] pub fn outdiv1 ( & mut self ) -> OUTDIV1_W { OUTDIV1_W { w : self } } } } # [ doc = "System Clock Divider Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clkdiv2](clkdiv2) module" ] pub type CLKDIV2 = crate :: Reg < u32 , _CLKDIV2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLKDIV2 ; # [ doc = "`read()` method returns [clkdiv2::R](clkdiv2::R) reader structure" ] impl crate :: Readable for CLKDIV2 { } # [ doc = "`write(|w| ..)` method takes [clkdiv2::W](clkdiv2::W) writer structure" ] impl crate :: Writable for CLKDIV2 { } # [ doc = "System Clock Divider Register 2" ] pub mod clkdiv2 { # [ doc = "Reader of register CLKDIV2" ] pub type R = crate :: R < u32 , super :: CLKDIV2 > ; # [ doc = "Writer for register CLKDIV2" ] pub type W = crate :: W < u32 , super :: CLKDIV2 > ; # [ doc = "Register CLKDIV2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CLKDIV2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `USBFRAC`" ] pub type USBFRAC_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `USBFRAC`" ] pub struct USBFRAC_W < 'a > { w : & 'a mut W , } impl < 'a > USBFRAC_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `USBDIV`" ] pub type USBDIV_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `USBDIV`" ] pub struct USBDIV_W < 'a > { w : & 'a mut W , } impl < 'a > USBDIV_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 << 1 ) ) | ( ( ( value as u32 ) & 0x07 ) << 1 ) ; self . w } } impl R { # [ doc = "Bit 0 - USB clock divider fraction" ] # [ inline ( always ) ] pub fn usbfrac ( & self ) -> USBFRAC_R { USBFRAC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:3 - USB clock divider divisor" ] # [ inline ( always ) ] pub fn usbdiv ( & self ) -> USBDIV_R { USBDIV_R :: new ( ( ( self . bits >> 1 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bit 0 - USB clock divider fraction" ] # [ inline ( always ) ] pub fn usbfrac ( & mut self ) -> USBFRAC_W { USBFRAC_W { w : self } } # [ doc = "Bits 1:3 - USB clock divider divisor" ] # [ inline ( always ) ] pub fn usbdiv ( & mut self ) -> USBDIV_W { USBDIV_W { w : self } } } } # [ doc = "Flash Configuration Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fcfg1](fcfg1) module" ] pub type FCFG1 = crate :: Reg < u32 , _FCFG1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FCFG1 ; # [ doc = "`read()` method returns [fcfg1::R](fcfg1::R) reader structure" ] impl crate :: Readable for FCFG1 { } # [ doc = "`write(|w| ..)` method takes [fcfg1::W](fcfg1::W) writer structure" ] impl crate :: Writable for FCFG1 { } # [ doc = "Flash Configuration Register 1" ] pub mod fcfg1 { # [ doc = "Reader of register FCFG1" ] pub type R = crate :: R < u32 , super :: FCFG1 > ; # [ doc = "Writer for register FCFG1" ] pub type W = crate :: W < u32 , super :: FCFG1 > ; # [ doc = "Register FCFG1 `reset()`'s with value 0xff0f_0f00" ] impl crate :: ResetValue for super :: FCFG1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff0f_0f00 } } # [ doc = "Flash Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLASHDIS_A { # [ doc = "0: Flash is enabled" ] _0 , # [ doc = "1: Flash is disabled" ] _1 } impl From < FLASHDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : FLASHDIS_A ) -> Self { match variant { FLASHDIS_A :: _0 => false , FLASHDIS_A :: _1 => true } } } # [ doc = "Reader of field `FLASHDIS`" ] pub type FLASHDIS_R = crate :: R < bool , FLASHDIS_A > ; impl FLASHDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLASHDIS_A { match self . bits { false => FLASHDIS_A :: _0 , true => FLASHDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLASHDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLASHDIS_A :: _1 } } # [ doc = "Write proxy for field `FLASHDIS`" ] pub struct FLASHDIS_W < 'a > { w : & 'a mut W , } impl < 'a > FLASHDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLASHDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Flash is enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLASHDIS_A :: _0 ) } # [ doc = "Flash is disabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLASHDIS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Flash Doze\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLASHDOZE_A { # [ doc = "0: Flash remains enabled during Wait mode" ] _0 , # [ doc = "1: Flash is disabled for the duration of Wait mode" ] _1 } impl From < FLASHDOZE_A > for bool { # [ inline ( always ) ] fn from ( variant : FLASHDOZE_A ) -> Self { match variant { FLASHDOZE_A :: _0 => false , FLASHDOZE_A :: _1 => true } } } # [ doc = "Reader of field `FLASHDOZE`" ] pub type FLASHDOZE_R = crate :: R < bool , FLASHDOZE_A > ; impl FLASHDOZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLASHDOZE_A { match self . bits { false => FLASHDOZE_A :: _0 , true => FLASHDOZE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLASHDOZE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLASHDOZE_A :: _1 } } # [ doc = "Write proxy for field `FLASHDOZE`" ] pub struct FLASHDOZE_W < 'a > { w : & 'a mut W , } impl < 'a > FLASHDOZE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLASHDOZE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Flash remains enabled during Wait mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLASHDOZE_A :: _0 ) } # [ doc = "Flash is disabled for the duration of Wait mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLASHDOZE_A :: _1 ) } # [ 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 } } # [ doc = "Reader of field `DEPART`" ] pub type DEPART_R = crate :: R < u8 , u8 > ; # [ doc = "EEPROM size\n\nValue on reset: 15" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EESIZE_A { # [ doc = "0: 16 KB" ] _0000 , # [ doc = "1: 8 KB" ] _0001 , # [ doc = "2: 4 KB" ] _0010 , # [ doc = "3: 2 KB" ] _0011 , # [ doc = "4: 1 KB" ] _0100 , # [ doc = "5: 512 Bytes" ] _0101 , # [ doc = "6: 256 Bytes" ] _0110 , # [ doc = "7: 128 Bytes" ] _0111 , # [ doc = "8: 64 Bytes" ] _1000 , # [ doc = "9: 32 Bytes" ] _1001 , # [ doc = "15: 0 Bytes" ] _1111 } impl From < EESIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : EESIZE_A ) -> Self { match variant { EESIZE_A :: _0000 => 0 , EESIZE_A :: _0001 => 1 , EESIZE_A :: _0010 => 2 , EESIZE_A :: _0011 => 3 , EESIZE_A :: _0100 => 4 , EESIZE_A :: _0101 => 5 , EESIZE_A :: _0110 => 6 , EESIZE_A :: _0111 => 7 , EESIZE_A :: _1000 => 8 , EESIZE_A :: _1001 => 9 , EESIZE_A :: _1111 => 15 } } } # [ doc = "Reader of field `EESIZE`" ] pub type EESIZE_R = crate :: R < u8 , EESIZE_A > ; impl EESIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EESIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EESIZE_A :: _0000 ) , 1 => Val ( EESIZE_A :: _0001 ) , 2 => Val ( EESIZE_A :: _0010 ) , 3 => Val ( EESIZE_A :: _0011 ) , 4 => Val ( EESIZE_A :: _0100 ) , 5 => Val ( EESIZE_A :: _0101 ) , 6 => Val ( EESIZE_A :: _0110 ) , 7 => Val ( EESIZE_A :: _0111 ) , 8 => Val ( EESIZE_A :: _1000 ) , 9 => Val ( EESIZE_A :: _1001 ) , 15 => Val ( EESIZE_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == EESIZE_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == EESIZE_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == EESIZE_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == EESIZE_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == EESIZE_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == EESIZE_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == EESIZE_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == EESIZE_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == EESIZE_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == EESIZE_A :: _1001 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == EESIZE_A :: _1111 } } # [ doc = "Program flash size\n\nValue on reset: 15" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFSIZE_A { # [ doc = "3: 32 KB of program flash memory" ] _0011 , # [ doc = "5: 64 KB of program flash memory" ] _0101 , # [ doc = "7: 128 KB of program flash memory" ] _0111 , # [ doc = "9: 256 KB of program flash memory" ] _1001 , # [ doc = "11: 512 KB of program flash memory" ] _1011 , # [ doc = "13: 1024 KB of program flash memory" ] _1101 , # [ doc = "15: 2048 KB of program flash memory" ] _1111 } impl From < PFSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : PFSIZE_A ) -> Self { match variant { PFSIZE_A :: _0011 => 3 , PFSIZE_A :: _0101 => 5 , PFSIZE_A :: _0111 => 7 , PFSIZE_A :: _1001 => 9 , PFSIZE_A :: _1011 => 11 , PFSIZE_A :: _1101 => 13 , PFSIZE_A :: _1111 => 15 } } } # [ doc = "Reader of field `PFSIZE`" ] pub type PFSIZE_R = crate :: R < u8 , PFSIZE_A > ; impl PFSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PFSIZE_A > { use crate :: Variant :: * ; match self . bits { 3 => Val ( PFSIZE_A :: _0011 ) , 5 => Val ( PFSIZE_A :: _0101 ) , 7 => Val ( PFSIZE_A :: _0111 ) , 9 => Val ( PFSIZE_A :: _1001 ) , 11 => Val ( PFSIZE_A :: _1011 ) , 13 => Val ( PFSIZE_A :: _1101 ) , 15 => Val ( PFSIZE_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == PFSIZE_A :: _0011 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == PFSIZE_A :: _0101 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == PFSIZE_A :: _0111 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == PFSIZE_A :: _1001 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == PFSIZE_A :: _1011 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == PFSIZE_A :: _1101 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == PFSIZE_A :: _1111 } } # [ doc = "FlexNVM size\n\nValue on reset: 15" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NVMSIZE_A { # [ doc = "0: 0 KB of FlexNVM" ] _0000 , # [ doc = "3: 32 KB of FlexNVM" ] _0011 , # [ doc = "5: 64 KB of FlexNVM" ] _0101 , # [ doc = "7: 128 KB of FlexNVM" ] _0111 , # [ doc = "9: 256 KB of FlexNVM" ] _1001 , # [ doc = "11: 512 KB of FlexNVM" ] _1011 , # [ doc = "15: 256 KB of FlexNVM" ] _1111 } impl From < NVMSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : NVMSIZE_A ) -> Self { match variant { NVMSIZE_A :: _0000 => 0 , NVMSIZE_A :: _0011 => 3 , NVMSIZE_A :: _0101 => 5 , NVMSIZE_A :: _0111 => 7 , NVMSIZE_A :: _1001 => 9 , NVMSIZE_A :: _1011 => 11 , NVMSIZE_A :: _1111 => 15 } } } # [ doc = "Reader of field `NVMSIZE`" ] pub type NVMSIZE_R = crate :: R < u8 , NVMSIZE_A > ; impl NVMSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , NVMSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( NVMSIZE_A :: _0000 ) , 3 => Val ( NVMSIZE_A :: _0011 ) , 5 => Val ( NVMSIZE_A :: _0101 ) , 7 => Val ( NVMSIZE_A :: _0111 ) , 9 => Val ( NVMSIZE_A :: _1001 ) , 11 => Val ( NVMSIZE_A :: _1011 ) , 15 => Val ( NVMSIZE_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == NVMSIZE_A :: _0000 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == NVMSIZE_A :: _0011 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == NVMSIZE_A :: _0101 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == NVMSIZE_A :: _0111 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == NVMSIZE_A :: _1001 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == NVMSIZE_A :: _1011 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == NVMSIZE_A :: _1111 } } impl R { # [ doc = "Bit 0 - Flash Disable" ] # [ inline ( always ) ] pub fn flashdis ( & self ) -> FLASHDIS_R { FLASHDIS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Flash Doze" ] # [ inline ( always ) ] pub fn flashdoze ( & self ) -> FLASHDOZE_R { FLASHDOZE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - FlexNVM partition" ] # [ inline ( always ) ] pub fn depart ( & self ) -> DEPART_R { DEPART_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - EEPROM size" ] # [ inline ( always ) ] pub fn eesize ( & self ) -> EESIZE_R { EESIZE_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - Program flash size" ] # [ inline ( always ) ] pub fn pfsize ( & self ) -> PFSIZE_R { PFSIZE_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - FlexNVM size" ] # [ inline ( always ) ] pub fn nvmsize ( & self ) -> NVMSIZE_R { NVMSIZE_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Flash Disable" ] # [ inline ( always ) ] pub fn flashdis ( & mut self ) -> FLASHDIS_W { FLASHDIS_W { w : self } } # [ doc = "Bit 1 - Flash Doze" ] # [ inline ( always ) ] pub fn flashdoze ( & mut self ) -> FLASHDOZE_W { FLASHDOZE_W { w : self } } } } # [ doc = "Flash Configuration Register 2\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fcfg2](fcfg2) module" ] pub type FCFG2 = crate :: Reg < u32 , _FCFG2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FCFG2 ; # [ doc = "`read()` method returns [fcfg2::R](fcfg2::R) reader structure" ] impl crate :: Readable for FCFG2 { } # [ doc = "Flash Configuration Register 2" ] pub mod fcfg2 { # [ doc = "Reader of register FCFG2" ] pub type R = crate :: R < u32 , super :: FCFG2 > ; # [ doc = "Reader of field `MAXADDR1`" ] pub type MAXADDR1_R = crate :: R < u8 , u8 > ; # [ doc = "Program flash only\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFLSH_A { # [ doc = "0: Device supports FlexNVM" ] _0 , # [ doc = "1: Program Flash only, device does not support FlexNVM" ] _1 } impl From < PFLSH_A > for bool { # [ inline ( always ) ] fn from ( variant : PFLSH_A ) -> Self { match variant { PFLSH_A :: _0 => false , PFLSH_A :: _1 => true } } } # [ doc = "Reader of field `PFLSH`" ] pub type PFLSH_R = crate :: R < bool , PFLSH_A > ; impl PFLSH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFLSH_A { match self . bits { false => PFLSH_A :: _0 , true => PFLSH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFLSH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFLSH_A :: _1 } } # [ doc = "Reader of field `MAXADDR0`" ] pub type MAXADDR0_R = crate :: R < u8 , u8 > ; # [ doc = "Swap program flash\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWAPPFLSH_A { # [ doc = "0: Swap is not active." ] _0 , # [ doc = "1: Swap is active." ] _1 } impl From < SWAPPFLSH_A > for bool { # [ inline ( always ) ] fn from ( variant : SWAPPFLSH_A ) -> Self { match variant { SWAPPFLSH_A :: _0 => false , SWAPPFLSH_A :: _1 => true } } } # [ doc = "Reader of field `SWAPPFLSH`" ] pub type SWAPPFLSH_R = crate :: R < bool , SWAPPFLSH_A > ; impl SWAPPFLSH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWAPPFLSH_A { match self . bits { false => SWAPPFLSH_A :: _0 , true => SWAPPFLSH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWAPPFLSH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWAPPFLSH_A :: _1 } } impl R { # [ doc = "Bits 16:22 - Max address block 1" ] # [ inline ( always ) ] pub fn maxaddr1 ( & self ) -> MAXADDR1_R { MAXADDR1_R :: new ( ( ( self . bits >> 16 ) & 0x7f ) as u8 ) } # [ doc = "Bit 23 - Program flash only" ] # [ inline ( always ) ] pub fn pflsh ( & self ) -> PFLSH_R { PFLSH_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:30 - Max address block 0" ] # [ inline ( always ) ] pub fn maxaddr0 ( & self ) -> MAXADDR0_R { MAXADDR0_R :: new ( ( ( self . bits >> 24 ) & 0x7f ) as u8 ) } # [ doc = "Bit 31 - Swap program flash" ] # [ inline ( always ) ] pub fn swappflsh ( & self ) -> SWAPPFLSH_R { SWAPPFLSH_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Unique Identification Register High\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [uidh](uidh) module" ] pub type UIDH = crate :: Reg < u32 , _UIDH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _UIDH ; # [ doc = "`read()` method returns [uidh::R](uidh::R) reader structure" ] impl crate :: Readable for UIDH { } # [ doc = "Unique Identification Register High" ] pub mod uidh { # [ doc = "Reader of register UIDH" ] pub type R = crate :: R < u32 , super :: UIDH > ; # [ doc = "Reader of field `UID`" ] pub type UID_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Unique Identification" ] # [ inline ( always ) ] pub fn uid ( & self ) -> UID_R { UID_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Unique Identification Register Mid-High\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [uidmh](uidmh) module" ] pub type UIDMH = crate :: Reg < u32 , _UIDMH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _UIDMH ; # [ doc = "`read()` method returns [uidmh::R](uidmh::R) reader structure" ] impl crate :: Readable for UIDMH { } # [ doc = "Unique Identification Register Mid-High" ] pub mod uidmh { # [ doc = "Reader of register UIDMH" ] pub type R = crate :: R < u32 , super :: UIDMH > ; # [ doc = "Reader of field `UID`" ] pub type UID_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Unique Identification" ] # [ inline ( always ) ] pub fn uid ( & self ) -> UID_R { UID_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Unique Identification Register Mid Low\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [uidml](uidml) module" ] pub type UIDML = crate :: Reg < u32 , _UIDML > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _UIDML ; # [ doc = "`read()` method returns [uidml::R](uidml::R) reader structure" ] impl crate :: Readable for UIDML { } # [ doc = "Unique Identification Register Mid Low" ] pub mod uidml { # [ doc = "Reader of register UIDML" ] pub type R = crate :: R < u32 , super :: UIDML > ; # [ doc = "Reader of field `UID`" ] pub type UID_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Unique Identification" ] # [ inline ( always ) ] pub fn uid ( & self ) -> UID_R { UID_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Unique Identification Register Low\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [uidl](uidl) module" ] pub type UIDL = crate :: Reg < u32 , _UIDL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _UIDL ; # [ doc = "`read()` method returns [uidl::R](uidl::R) reader structure" ] impl crate :: Readable for UIDL { } # [ doc = "Unique Identification Register Low" ] pub mod uidl { # [ doc = "Reader of register UIDL" ] pub type R = crate :: R < u32 , super :: UIDL > ; # [ doc = "Reader of field `UID`" ] pub type UID_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Unique Identification" ] # [ inline ( always ) ] pub fn uid ( & self ) -> UID_R { UID_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "System Clock Divider Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clkdiv3](clkdiv3) module" ] pub type CLKDIV3 = crate :: Reg < u32 , _CLKDIV3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLKDIV3 ; # [ doc = "`read()` method returns [clkdiv3::R](clkdiv3::R) reader structure" ] impl crate :: Readable for CLKDIV3 { } # [ doc = "`write(|w| ..)` method takes [clkdiv3::W](clkdiv3::W) writer structure" ] impl crate :: Writable for CLKDIV3 { } # [ doc = "System Clock Divider Register 3" ] pub mod clkdiv3 { # [ doc = "Reader of register CLKDIV3" ] pub type R = crate :: R < u32 , super :: CLKDIV3 > ; # [ doc = "Writer for register CLKDIV3" ] pub type W = crate :: W < u32 , super :: CLKDIV3 > ; # [ doc = "Register CLKDIV3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CLKDIV3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PLLFLLFRAC`" ] pub type PLLFLLFRAC_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLLFLLFRAC`" ] pub struct PLLFLLFRAC_W < 'a > { w : & 'a mut W , } impl < 'a > PLLFLLFRAC_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `PLLFLLDIV`" ] pub type PLLFLLDIV_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PLLFLLDIV`" ] pub struct PLLFLLDIV_W < 'a > { w : & 'a mut W , } impl < 'a > PLLFLLDIV_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 << 1 ) ) | ( ( ( value as u32 ) & 0x07 ) << 1 ) ; self . w } } impl R { # [ doc = "Bit 0 - PLLFLL clock divider fraction" ] # [ inline ( always ) ] pub fn pllfllfrac ( & self ) -> PLLFLLFRAC_R { PLLFLLFRAC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:3 - PLLFLL clock divider divisor" ] # [ inline ( always ) ] pub fn pllflldiv ( & self ) -> PLLFLLDIV_R { PLLFLLDIV_R :: new ( ( ( self . bits >> 1 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bit 0 - PLLFLL clock divider fraction" ] # [ inline ( always ) ] pub fn pllfllfrac ( & mut self ) -> PLLFLLFRAC_W { PLLFLLFRAC_W { w : self } } # [ doc = "Bits 1:3 - PLLFLL clock divider divisor" ] # [ inline ( always ) ] pub fn pllflldiv ( & mut self ) -> PLLFLLDIV_W { PLLFLLDIV_W { w : self } } } } # [ doc = "System Clock Divider Register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clkdiv4](clkdiv4) module" ] pub type CLKDIV4 = crate :: Reg < u32 , _CLKDIV4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLKDIV4 ; # [ doc = "`read()` method returns [clkdiv4::R](clkdiv4::R) reader structure" ] impl crate :: Readable for CLKDIV4 { } # [ doc = "`write(|w| ..)` method takes [clkdiv4::W](clkdiv4::W) writer structure" ] impl crate :: Writable for CLKDIV4 { } # [ doc = "System Clock Divider Register 4" ] pub mod clkdiv4 { # [ doc = "Reader of register CLKDIV4" ] pub type R = crate :: R < u32 , super :: CLKDIV4 > ; # [ doc = "Writer for register CLKDIV4" ] pub type W = crate :: W < u32 , super :: CLKDIV4 > ; # [ doc = "Register CLKDIV4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CLKDIV4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TRACEFRAC`" ] pub type TRACEFRAC_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRACEFRAC`" ] pub struct TRACEFRAC_W < 'a > { w : & 'a mut W , } impl < 'a > TRACEFRAC_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `TRACEDIV`" ] pub type TRACEDIV_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TRACEDIV`" ] pub struct TRACEDIV_W < 'a > { w : & 'a mut W , } impl < 'a > TRACEDIV_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 << 1 ) ) | ( ( ( value as u32 ) & 0x07 ) << 1 ) ; self . w } } impl R { # [ doc = "Bit 0 - Trace clock divider fraction" ] # [ inline ( always ) ] pub fn tracefrac ( & self ) -> TRACEFRAC_R { TRACEFRAC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:3 - Trace clock divider divisor" ] # [ inline ( always ) ] pub fn tracediv ( & self ) -> TRACEDIV_R { TRACEDIV_R :: new ( ( ( self . bits >> 1 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bit 0 - Trace clock divider fraction" ] # [ inline ( always ) ] pub fn tracefrac ( & mut self ) -> TRACEFRAC_W { TRACEFRAC_W { w : self } } # [ doc = "Bits 1:3 - Trace clock divider divisor" ] # [ inline ( always ) ] pub fn tracediv ( & mut self ) -> TRACEDIV_W { TRACEDIV_W { w : self } } } } } # [ doc = "Pin Control and Interrupts" ] pub struct PORTA { _marker : PhantomData < * const ( ) > } unsafe impl Send for PORTA { } impl PORTA { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const porta :: RegisterBlock { 0x4004_9000 as * const _ } } impl Deref for PORTA { type Target = porta :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * PORTA :: ptr ( ) } } } # [ doc = "Pin Control and Interrupts" ] pub mod porta { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Pin Control Register n" ] pub pcr0 : PCR0 , # [ doc = "0x04 - Pin Control Register n" ] pub pcr1 : PCR1 , # [ doc = "0x08 - Pin Control Register n" ] pub pcr2 : PCR2 , # [ doc = "0x0c - Pin Control Register n" ] pub pcr3 : PCR3 , # [ doc = "0x10 - Pin Control Register n" ] pub pcr4 : PCR4 , # [ doc = "0x14 - Pin Control Register n" ] pub pcr5 : PCR5 , # [ doc = "0x18 - Pin Control Register n" ] pub pcr6 : PCR6 , # [ doc = "0x1c - Pin Control Register n" ] pub pcr7 : PCR7 , # [ doc = "0x20 - Pin Control Register n" ] pub pcr8 : PCR8 , # [ doc = "0x24 - Pin Control Register n" ] pub pcr9 : PCR9 , # [ doc = "0x28 - Pin Control Register n" ] pub pcr10 : PCR10 , # [ doc = "0x2c - Pin Control Register n" ] pub pcr11 : PCR11 , # [ doc = "0x30 - Pin Control Register n" ] pub pcr12 : PCR12 , # [ doc = "0x34 - Pin Control Register n" ] pub pcr13 : PCR13 , # [ doc = "0x38 - Pin Control Register n" ] pub pcr14 : PCR14 , # [ doc = "0x3c - Pin Control Register n" ] pub pcr15 : PCR15 , # [ doc = "0x40 - Pin Control Register n" ] pub pcr16 : PCR16 , # [ doc = "0x44 - Pin Control Register n" ] pub pcr17 : PCR17 , # [ doc = "0x48 - Pin Control Register n" ] pub pcr18 : PCR18 , # [ doc = "0x4c - Pin Control Register n" ] pub pcr19 : PCR19 , # [ doc = "0x50 - Pin Control Register n" ] pub pcr20 : PCR20 , # [ doc = "0x54 - Pin Control Register n" ] pub pcr21 : PCR21 , # [ doc = "0x58 - Pin Control Register n" ] pub pcr22 : PCR22 , # [ doc = "0x5c - Pin Control Register n" ] pub pcr23 : PCR23 , # [ doc = "0x60 - Pin Control Register n" ] pub pcr24 : PCR24 , # [ doc = "0x64 - Pin Control Register n" ] pub pcr25 : PCR25 , # [ doc = "0x68 - Pin Control Register n" ] pub pcr26 : PCR26 , # [ doc = "0x6c - Pin Control Register n" ] pub pcr27 : PCR27 , # [ doc = "0x70 - Pin Control Register n" ] pub pcr28 : PCR28 , # [ doc = "0x74 - Pin Control Register n" ] pub pcr29 : PCR29 , # [ doc = "0x78 - Pin Control Register n" ] pub pcr30 : PCR30 , # [ doc = "0x7c - Pin Control Register n" ] pub pcr31 : PCR31 , # [ doc = "0x80 - Global Pin Control Low Register" ] pub gpclr : GPCLR , # [ doc = "0x84 - Global Pin Control High Register" ] pub gpchr : GPCHR , _reserved34 : [ u8 ; 24usize ] , # [ doc = "0xa0 - Interrupt Status Flag Register" ] pub isfr : ISFR , } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr0](pcr0) module" ] pub type PCR0 = crate :: Reg < u32 , _PCR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR0 ; # [ doc = "`read()` method returns [pcr0::R](pcr0::R) reader structure" ] impl crate :: Readable for PCR0 { } # [ doc = "`write(|w| ..)` method takes [pcr0::W](pcr0::W) writer structure" ] impl crate :: Writable for PCR0 { } # [ doc = "Pin Control Register n" ] pub mod pcr0 { # [ doc = "Reader of register PCR0" ] pub type R = crate :: R < u32 , super :: PCR0 > ; # [ doc = "Writer for register PCR0" ] pub type W = crate :: W < u32 , super :: PCR0 > ; # [ doc = "Register PCR0 `reset()`'s with value 0x0702" ] impl crate :: ResetValue for super :: PCR0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0702 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr1](pcr1) module" ] pub type PCR1 = crate :: Reg < u32 , _PCR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR1 ; # [ doc = "`read()` method returns [pcr1::R](pcr1::R) reader structure" ] impl crate :: Readable for PCR1 { } # [ doc = "`write(|w| ..)` method takes [pcr1::W](pcr1::W) writer structure" ] impl crate :: Writable for PCR1 { } # [ doc = "Pin Control Register n" ] pub mod pcr1 { # [ doc = "Reader of register PCR1" ] pub type R = crate :: R < u32 , super :: PCR1 > ; # [ doc = "Writer for register PCR1" ] pub type W = crate :: W < u32 , super :: PCR1 > ; # [ doc = "Register PCR1 `reset()`'s with value 0x0703" ] impl crate :: ResetValue for super :: PCR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0703 } } # [ doc = "Pull Select\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr2](pcr2) module" ] pub type PCR2 = crate :: Reg < u32 , _PCR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR2 ; # [ doc = "`read()` method returns [pcr2::R](pcr2::R) reader structure" ] impl crate :: Readable for PCR2 { } # [ doc = "`write(|w| ..)` method takes [pcr2::W](pcr2::W) writer structure" ] impl crate :: Writable for PCR2 { } # [ doc = "Pin Control Register n" ] pub mod pcr2 { # [ doc = "Reader of register PCR2" ] pub type R = crate :: R < u32 , super :: PCR2 > ; # [ doc = "Writer for register PCR2" ] pub type W = crate :: W < u32 , super :: PCR2 > ; # [ doc = "Register PCR2 `reset()`'s with value 0x0703" ] impl crate :: ResetValue for super :: PCR2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0703 } } # [ doc = "Pull Select\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr3](pcr3) module" ] pub type PCR3 = crate :: Reg < u32 , _PCR3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR3 ; # [ doc = "`read()` method returns [pcr3::R](pcr3::R) reader structure" ] impl crate :: Readable for PCR3 { } # [ doc = "`write(|w| ..)` method takes [pcr3::W](pcr3::W) writer structure" ] impl crate :: Writable for PCR3 { } # [ doc = "Pin Control Register n" ] pub mod pcr3 { # [ doc = "Reader of register PCR3" ] pub type R = crate :: R < u32 , super :: PCR3 > ; # [ doc = "Writer for register PCR3" ] pub type W = crate :: W < u32 , super :: PCR3 > ; # [ doc = "Register PCR3 `reset()`'s with value 0x0703" ] impl crate :: ResetValue for super :: PCR3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0703 } } # [ doc = "Pull Select\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr4](pcr4) module" ] pub type PCR4 = crate :: Reg < u32 , _PCR4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR4 ; # [ doc = "`read()` method returns [pcr4::R](pcr4::R) reader structure" ] impl crate :: Readable for PCR4 { } # [ doc = "`write(|w| ..)` method takes [pcr4::W](pcr4::W) writer structure" ] impl crate :: Writable for PCR4 { } # [ doc = "Pin Control Register n" ] pub mod pcr4 { # [ doc = "Reader of register PCR4" ] pub type R = crate :: R < u32 , super :: PCR4 > ; # [ doc = "Writer for register PCR4" ] pub type W = crate :: W < u32 , super :: PCR4 > ; # [ doc = "Register PCR4 `reset()`'s with value 0x0703" ] impl crate :: ResetValue for super :: PCR4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0703 } } # [ doc = "Pull Select\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Write proxy for field `PFE`" ] pub struct PFE_W < 'a > { w : & 'a mut W , } impl < 'a > PFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Passive input filter is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PFE_A :: _0 ) } # [ doc = "Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PFE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & mut self ) -> PFE_W { PFE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr5](pcr5) module" ] pub type PCR5 = crate :: Reg < u32 , _PCR5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR5 ; # [ doc = "`read()` method returns [pcr5::R](pcr5::R) reader structure" ] impl crate :: Readable for PCR5 { } # [ doc = "`write(|w| ..)` method takes [pcr5::W](pcr5::W) writer structure" ] impl crate :: Writable for PCR5 { } # [ doc = "Pin Control Register n" ] pub mod pcr5 { # [ doc = "Reader of register PCR5" ] pub type R = crate :: R < u32 , super :: PCR5 > ; # [ doc = "Writer for register PCR5" ] pub type W = crate :: W < u32 , super :: PCR5 > ; # [ doc = "Register PCR5 `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: PCR5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Pull Select\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr6](pcr6) module" ] pub type PCR6 = crate :: Reg < u32 , _PCR6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR6 ; # [ doc = "`read()` method returns [pcr6::R](pcr6::R) reader structure" ] impl crate :: Readable for PCR6 { } # [ doc = "`write(|w| ..)` method takes [pcr6::W](pcr6::W) writer structure" ] impl crate :: Writable for PCR6 { } # [ doc = "Pin Control Register n" ] pub mod pcr6 { # [ doc = "Reader of register PCR6" ] pub type R = crate :: R < u32 , super :: PCR6 > ; # [ doc = "Writer for register PCR6" ] pub type W = crate :: W < u32 , super :: PCR6 > ; # [ doc = "Register PCR6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr7](pcr7) module" ] pub type PCR7 = crate :: Reg < u32 , _PCR7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR7 ; # [ doc = "`read()` method returns [pcr7::R](pcr7::R) reader structure" ] impl crate :: Readable for PCR7 { } # [ doc = "`write(|w| ..)` method takes [pcr7::W](pcr7::W) writer structure" ] impl crate :: Writable for PCR7 { } # [ doc = "Pin Control Register n" ] pub mod pcr7 { # [ doc = "Reader of register PCR7" ] pub type R = crate :: R < u32 , super :: PCR7 > ; # [ doc = "Writer for register PCR7" ] pub type W = crate :: W < u32 , super :: PCR7 > ; # [ doc = "Register PCR7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr8](pcr8) module" ] pub type PCR8 = crate :: Reg < u32 , _PCR8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR8 ; # [ doc = "`read()` method returns [pcr8::R](pcr8::R) reader structure" ] impl crate :: Readable for PCR8 { } # [ doc = "`write(|w| ..)` method takes [pcr8::W](pcr8::W) writer structure" ] impl crate :: Writable for PCR8 { } # [ doc = "Pin Control Register n" ] pub mod pcr8 { # [ doc = "Reader of register PCR8" ] pub type R = crate :: R < u32 , super :: PCR8 > ; # [ doc = "Writer for register PCR8" ] pub type W = crate :: W < u32 , super :: PCR8 > ; # [ doc = "Register PCR8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr9](pcr9) module" ] pub type PCR9 = crate :: Reg < u32 , _PCR9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR9 ; # [ doc = "`read()` method returns [pcr9::R](pcr9::R) reader structure" ] impl crate :: Readable for PCR9 { } # [ doc = "`write(|w| ..)` method takes [pcr9::W](pcr9::W) writer structure" ] impl crate :: Writable for PCR9 { } # [ doc = "Pin Control Register n" ] pub mod pcr9 { # [ doc = "Reader of register PCR9" ] pub type R = crate :: R < u32 , super :: PCR9 > ; # [ doc = "Writer for register PCR9" ] pub type W = crate :: W < u32 , super :: PCR9 > ; # [ doc = "Register PCR9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr10](pcr10) module" ] pub type PCR10 = crate :: Reg < u32 , _PCR10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR10 ; # [ doc = "`read()` method returns [pcr10::R](pcr10::R) reader structure" ] impl crate :: Readable for PCR10 { } # [ doc = "`write(|w| ..)` method takes [pcr10::W](pcr10::W) writer structure" ] impl crate :: Writable for PCR10 { } # [ doc = "Pin Control Register n" ] pub mod pcr10 { # [ doc = "Reader of register PCR10" ] pub type R = crate :: R < u32 , super :: PCR10 > ; # [ doc = "Writer for register PCR10" ] pub type W = crate :: W < u32 , super :: PCR10 > ; # [ doc = "Register PCR10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr11](pcr11) module" ] pub type PCR11 = crate :: Reg < u32 , _PCR11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR11 ; # [ doc = "`read()` method returns [pcr11::R](pcr11::R) reader structure" ] impl crate :: Readable for PCR11 { } # [ doc = "`write(|w| ..)` method takes [pcr11::W](pcr11::W) writer structure" ] impl crate :: Writable for PCR11 { } # [ doc = "Pin Control Register n" ] pub mod pcr11 { # [ doc = "Reader of register PCR11" ] pub type R = crate :: R < u32 , super :: PCR11 > ; # [ doc = "Writer for register PCR11" ] pub type W = crate :: W < u32 , super :: PCR11 > ; # [ doc = "Register PCR11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr12](pcr12) module" ] pub type PCR12 = crate :: Reg < u32 , _PCR12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR12 ; # [ doc = "`read()` method returns [pcr12::R](pcr12::R) reader structure" ] impl crate :: Readable for PCR12 { } # [ doc = "`write(|w| ..)` method takes [pcr12::W](pcr12::W) writer structure" ] impl crate :: Writable for PCR12 { } # [ doc = "Pin Control Register n" ] pub mod pcr12 { # [ doc = "Reader of register PCR12" ] pub type R = crate :: R < u32 , super :: PCR12 > ; # [ doc = "Writer for register PCR12" ] pub type W = crate :: W < u32 , super :: PCR12 > ; # [ doc = "Register PCR12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr13](pcr13) module" ] pub type PCR13 = crate :: Reg < u32 , _PCR13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR13 ; # [ doc = "`read()` method returns [pcr13::R](pcr13::R) reader structure" ] impl crate :: Readable for PCR13 { } # [ doc = "`write(|w| ..)` method takes [pcr13::W](pcr13::W) writer structure" ] impl crate :: Writable for PCR13 { } # [ doc = "Pin Control Register n" ] pub mod pcr13 { # [ doc = "Reader of register PCR13" ] pub type R = crate :: R < u32 , super :: PCR13 > ; # [ doc = "Writer for register PCR13" ] pub type W = crate :: W < u32 , super :: PCR13 > ; # [ doc = "Register PCR13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr14](pcr14) module" ] pub type PCR14 = crate :: Reg < u32 , _PCR14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR14 ; # [ doc = "`read()` method returns [pcr14::R](pcr14::R) reader structure" ] impl crate :: Readable for PCR14 { } # [ doc = "`write(|w| ..)` method takes [pcr14::W](pcr14::W) writer structure" ] impl crate :: Writable for PCR14 { } # [ doc = "Pin Control Register n" ] pub mod pcr14 { # [ doc = "Reader of register PCR14" ] pub type R = crate :: R < u32 , super :: PCR14 > ; # [ doc = "Writer for register PCR14" ] pub type W = crate :: W < u32 , super :: PCR14 > ; # [ doc = "Register PCR14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr15](pcr15) module" ] pub type PCR15 = crate :: Reg < u32 , _PCR15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR15 ; # [ doc = "`read()` method returns [pcr15::R](pcr15::R) reader structure" ] impl crate :: Readable for PCR15 { } # [ doc = "`write(|w| ..)` method takes [pcr15::W](pcr15::W) writer structure" ] impl crate :: Writable for PCR15 { } # [ doc = "Pin Control Register n" ] pub mod pcr15 { # [ doc = "Reader of register PCR15" ] pub type R = crate :: R < u32 , super :: PCR15 > ; # [ doc = "Writer for register PCR15" ] pub type W = crate :: W < u32 , super :: PCR15 > ; # [ doc = "Register PCR15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr16](pcr16) module" ] pub type PCR16 = crate :: Reg < u32 , _PCR16 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR16 ; # [ doc = "`read()` method returns [pcr16::R](pcr16::R) reader structure" ] impl crate :: Readable for PCR16 { } # [ doc = "`write(|w| ..)` method takes [pcr16::W](pcr16::W) writer structure" ] impl crate :: Writable for PCR16 { } # [ doc = "Pin Control Register n" ] pub mod pcr16 { # [ doc = "Reader of register PCR16" ] pub type R = crate :: R < u32 , super :: PCR16 > ; # [ doc = "Writer for register PCR16" ] pub type W = crate :: W < u32 , super :: PCR16 > ; # [ doc = "Register PCR16 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR16 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr17](pcr17) module" ] pub type PCR17 = crate :: Reg < u32 , _PCR17 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR17 ; # [ doc = "`read()` method returns [pcr17::R](pcr17::R) reader structure" ] impl crate :: Readable for PCR17 { } # [ doc = "`write(|w| ..)` method takes [pcr17::W](pcr17::W) writer structure" ] impl crate :: Writable for PCR17 { } # [ doc = "Pin Control Register n" ] pub mod pcr17 { # [ doc = "Reader of register PCR17" ] pub type R = crate :: R < u32 , super :: PCR17 > ; # [ doc = "Writer for register PCR17" ] pub type W = crate :: W < u32 , super :: PCR17 > ; # [ doc = "Register PCR17 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR17 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr18](pcr18) module" ] pub type PCR18 = crate :: Reg < u32 , _PCR18 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR18 ; # [ doc = "`read()` method returns [pcr18::R](pcr18::R) reader structure" ] impl crate :: Readable for PCR18 { } # [ doc = "`write(|w| ..)` method takes [pcr18::W](pcr18::W) writer structure" ] impl crate :: Writable for PCR18 { } # [ doc = "Pin Control Register n" ] pub mod pcr18 { # [ doc = "Reader of register PCR18" ] pub type R = crate :: R < u32 , super :: PCR18 > ; # [ doc = "Writer for register PCR18" ] pub type W = crate :: W < u32 , super :: PCR18 > ; # [ doc = "Register PCR18 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR18 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr19](pcr19) module" ] pub type PCR19 = crate :: Reg < u32 , _PCR19 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR19 ; # [ doc = "`read()` method returns [pcr19::R](pcr19::R) reader structure" ] impl crate :: Readable for PCR19 { } # [ doc = "`write(|w| ..)` method takes [pcr19::W](pcr19::W) writer structure" ] impl crate :: Writable for PCR19 { } # [ doc = "Pin Control Register n" ] pub mod pcr19 { # [ doc = "Reader of register PCR19" ] pub type R = crate :: R < u32 , super :: PCR19 > ; # [ doc = "Writer for register PCR19" ] pub type W = crate :: W < u32 , super :: PCR19 > ; # [ doc = "Register PCR19 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR19 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr20](pcr20) module" ] pub type PCR20 = crate :: Reg < u32 , _PCR20 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR20 ; # [ doc = "`read()` method returns [pcr20::R](pcr20::R) reader structure" ] impl crate :: Readable for PCR20 { } # [ doc = "`write(|w| ..)` method takes [pcr20::W](pcr20::W) writer structure" ] impl crate :: Writable for PCR20 { } # [ doc = "Pin Control Register n" ] pub mod pcr20 { # [ doc = "Reader of register PCR20" ] pub type R = crate :: R < u32 , super :: PCR20 > ; # [ doc = "Writer for register PCR20" ] pub type W = crate :: W < u32 , super :: PCR20 > ; # [ doc = "Register PCR20 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR20 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr21](pcr21) module" ] pub type PCR21 = crate :: Reg < u32 , _PCR21 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR21 ; # [ doc = "`read()` method returns [pcr21::R](pcr21::R) reader structure" ] impl crate :: Readable for PCR21 { } # [ doc = "`write(|w| ..)` method takes [pcr21::W](pcr21::W) writer structure" ] impl crate :: Writable for PCR21 { } # [ doc = "Pin Control Register n" ] pub mod pcr21 { # [ doc = "Reader of register PCR21" ] pub type R = crate :: R < u32 , super :: PCR21 > ; # [ doc = "Writer for register PCR21" ] pub type W = crate :: W < u32 , super :: PCR21 > ; # [ doc = "Register PCR21 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR21 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr22](pcr22) module" ] pub type PCR22 = crate :: Reg < u32 , _PCR22 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR22 ; # [ doc = "`read()` method returns [pcr22::R](pcr22::R) reader structure" ] impl crate :: Readable for PCR22 { } # [ doc = "`write(|w| ..)` method takes [pcr22::W](pcr22::W) writer structure" ] impl crate :: Writable for PCR22 { } # [ doc = "Pin Control Register n" ] pub mod pcr22 { # [ doc = "Reader of register PCR22" ] pub type R = crate :: R < u32 , super :: PCR22 > ; # [ doc = "Writer for register PCR22" ] pub type W = crate :: W < u32 , super :: PCR22 > ; # [ doc = "Register PCR22 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR22 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr23](pcr23) module" ] pub type PCR23 = crate :: Reg < u32 , _PCR23 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR23 ; # [ doc = "`read()` method returns [pcr23::R](pcr23::R) reader structure" ] impl crate :: Readable for PCR23 { } # [ doc = "`write(|w| ..)` method takes [pcr23::W](pcr23::W) writer structure" ] impl crate :: Writable for PCR23 { } # [ doc = "Pin Control Register n" ] pub mod pcr23 { # [ doc = "Reader of register PCR23" ] pub type R = crate :: R < u32 , super :: PCR23 > ; # [ doc = "Writer for register PCR23" ] pub type W = crate :: W < u32 , super :: PCR23 > ; # [ doc = "Register PCR23 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR23 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr24](pcr24) module" ] pub type PCR24 = crate :: Reg < u32 , _PCR24 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR24 ; # [ doc = "`read()` method returns [pcr24::R](pcr24::R) reader structure" ] impl crate :: Readable for PCR24 { } # [ doc = "`write(|w| ..)` method takes [pcr24::W](pcr24::W) writer structure" ] impl crate :: Writable for PCR24 { } # [ doc = "Pin Control Register n" ] pub mod pcr24 { # [ doc = "Reader of register PCR24" ] pub type R = crate :: R < u32 , super :: PCR24 > ; # [ doc = "Writer for register PCR24" ] pub type W = crate :: W < u32 , super :: PCR24 > ; # [ doc = "Register PCR24 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR24 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr25](pcr25) module" ] pub type PCR25 = crate :: Reg < u32 , _PCR25 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR25 ; # [ doc = "`read()` method returns [pcr25::R](pcr25::R) reader structure" ] impl crate :: Readable for PCR25 { } # [ doc = "`write(|w| ..)` method takes [pcr25::W](pcr25::W) writer structure" ] impl crate :: Writable for PCR25 { } # [ doc = "Pin Control Register n" ] pub mod pcr25 { # [ doc = "Reader of register PCR25" ] pub type R = crate :: R < u32 , super :: PCR25 > ; # [ doc = "Writer for register PCR25" ] pub type W = crate :: W < u32 , super :: PCR25 > ; # [ doc = "Register PCR25 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR25 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr26](pcr26) module" ] pub type PCR26 = crate :: Reg < u32 , _PCR26 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR26 ; # [ doc = "`read()` method returns [pcr26::R](pcr26::R) reader structure" ] impl crate :: Readable for PCR26 { } # [ doc = "`write(|w| ..)` method takes [pcr26::W](pcr26::W) writer structure" ] impl crate :: Writable for PCR26 { } # [ doc = "Pin Control Register n" ] pub mod pcr26 { # [ doc = "Reader of register PCR26" ] pub type R = crate :: R < u32 , super :: PCR26 > ; # [ doc = "Writer for register PCR26" ] pub type W = crate :: W < u32 , super :: PCR26 > ; # [ doc = "Register PCR26 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR26 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr27](pcr27) module" ] pub type PCR27 = crate :: Reg < u32 , _PCR27 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR27 ; # [ doc = "`read()` method returns [pcr27::R](pcr27::R) reader structure" ] impl crate :: Readable for PCR27 { } # [ doc = "`write(|w| ..)` method takes [pcr27::W](pcr27::W) writer structure" ] impl crate :: Writable for PCR27 { } # [ doc = "Pin Control Register n" ] pub mod pcr27 { # [ doc = "Reader of register PCR27" ] pub type R = crate :: R < u32 , super :: PCR27 > ; # [ doc = "Writer for register PCR27" ] pub type W = crate :: W < u32 , super :: PCR27 > ; # [ doc = "Register PCR27 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR27 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr28](pcr28) module" ] pub type PCR28 = crate :: Reg < u32 , _PCR28 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR28 ; # [ doc = "`read()` method returns [pcr28::R](pcr28::R) reader structure" ] impl crate :: Readable for PCR28 { } # [ doc = "`write(|w| ..)` method takes [pcr28::W](pcr28::W) writer structure" ] impl crate :: Writable for PCR28 { } # [ doc = "Pin Control Register n" ] pub mod pcr28 { # [ doc = "Reader of register PCR28" ] pub type R = crate :: R < u32 , super :: PCR28 > ; # [ doc = "Writer for register PCR28" ] pub type W = crate :: W < u32 , super :: PCR28 > ; # [ doc = "Register PCR28 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR28 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr29](pcr29) module" ] pub type PCR29 = crate :: Reg < u32 , _PCR29 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR29 ; # [ doc = "`read()` method returns [pcr29::R](pcr29::R) reader structure" ] impl crate :: Readable for PCR29 { } # [ doc = "`write(|w| ..)` method takes [pcr29::W](pcr29::W) writer structure" ] impl crate :: Writable for PCR29 { } # [ doc = "Pin Control Register n" ] pub mod pcr29 { # [ doc = "Reader of register PCR29" ] pub type R = crate :: R < u32 , super :: PCR29 > ; # [ doc = "Writer for register PCR29" ] pub type W = crate :: W < u32 , super :: PCR29 > ; # [ doc = "Register PCR29 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR29 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr30](pcr30) module" ] pub type PCR30 = crate :: Reg < u32 , _PCR30 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR30 ; # [ doc = "`read()` method returns [pcr30::R](pcr30::R) reader structure" ] impl crate :: Readable for PCR30 { } # [ doc = "`write(|w| ..)` method takes [pcr30::W](pcr30::W) writer structure" ] impl crate :: Writable for PCR30 { } # [ doc = "Pin Control Register n" ] pub mod pcr30 { # [ doc = "Reader of register PCR30" ] pub type R = crate :: R < u32 , super :: PCR30 > ; # [ doc = "Writer for register PCR30" ] pub type W = crate :: W < u32 , super :: PCR30 > ; # [ doc = "Register PCR30 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR30 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr31](pcr31) module" ] pub type PCR31 = crate :: Reg < u32 , _PCR31 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR31 ; # [ doc = "`read()` method returns [pcr31::R](pcr31::R) reader structure" ] impl crate :: Readable for PCR31 { } # [ doc = "`write(|w| ..)` method takes [pcr31::W](pcr31::W) writer structure" ] impl crate :: Writable for PCR31 { } # [ doc = "Pin Control Register n" ] pub mod pcr31 { # [ doc = "Reader of register PCR31" ] pub type R = crate :: R < u32 , super :: PCR31 > ; # [ doc = "Writer for register PCR31" ] pub type W = crate :: W < u32 , super :: PCR31 > ; # [ doc = "Register PCR31 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR31 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Global Pin Control Low Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpclr](gpclr) module" ] pub type GPCLR = crate :: Reg < u32 , _GPCLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCLR ; # [ doc = "`write(|w| ..)` method takes [gpclr::W](gpclr::W) writer structure" ] impl crate :: Writable for GPCLR { } # [ doc = "Global Pin Control Low Register" ] pub mod gpclr { # [ doc = "Writer for register GPCLR" ] pub type W = crate :: W < u32 , super :: GPCLR > ; # [ doc = "Register GPCLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Global Pin Control High Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpchr](gpchr) module" ] pub type GPCHR = crate :: Reg < u32 , _GPCHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCHR ; # [ doc = "`write(|w| ..)` method takes [gpchr::W](gpchr::W) writer structure" ] impl crate :: Writable for GPCHR { } # [ doc = "Global Pin Control High Register" ] pub mod gpchr { # [ doc = "Writer for register GPCHR" ] pub type W = crate :: W < u32 , super :: GPCHR > ; # [ doc = "Register GPCHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Interrupt Status Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [isfr](isfr) module" ] pub type ISFR = crate :: Reg < u32 , _ISFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ISFR ; # [ doc = "`read()` method returns [isfr::R](isfr::R) reader structure" ] impl crate :: Readable for ISFR { } # [ doc = "`write(|w| ..)` method takes [isfr::W](isfr::W) writer structure" ] impl crate :: Writable for ISFR { } # [ doc = "Interrupt Status Flag Register" ] pub mod isfr { # [ doc = "Reader of register ISFR" ] pub type R = crate :: R < u32 , super :: ISFR > ; # [ doc = "Writer for register ISFR" ] pub type W = crate :: W < u32 , super :: ISFR > ; # [ doc = "Register ISFR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ISFR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF0_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF0_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF0_A ) -> Self { match variant { ISF0_A :: _0 => false , ISF0_A :: _1 => true } } } # [ doc = "Reader of field `ISF0`" ] pub type ISF0_R = crate :: R < bool , ISF0_A > ; impl ISF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF0_A { match self . bits { false => ISF0_A :: _0 , true => ISF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF0_A :: _1 } } # [ doc = "Write proxy for field `ISF0`" ] pub struct ISF0_W < 'a > { w : & 'a mut W , } impl < 'a > ISF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF1_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF1_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF1_A ) -> Self { match variant { ISF1_A :: _0 => false , ISF1_A :: _1 => true } } } # [ doc = "Reader of field `ISF1`" ] pub type ISF1_R = crate :: R < bool , ISF1_A > ; impl ISF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF1_A { match self . bits { false => ISF1_A :: _0 , true => ISF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF1_A :: _1 } } # [ doc = "Write proxy for field `ISF1`" ] pub struct ISF1_W < 'a > { w : & 'a mut W , } impl < 'a > ISF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _1 ) } # [ 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 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF2_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF2_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF2_A ) -> Self { match variant { ISF2_A :: _0 => false , ISF2_A :: _1 => true } } } # [ doc = "Reader of field `ISF2`" ] pub type ISF2_R = crate :: R < bool , ISF2_A > ; impl ISF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF2_A { match self . bits { false => ISF2_A :: _0 , true => ISF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF2_A :: _1 } } # [ doc = "Write proxy for field `ISF2`" ] pub struct ISF2_W < 'a > { w : & 'a mut W , } impl < 'a > ISF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF3_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF3_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF3_A ) -> Self { match variant { ISF3_A :: _0 => false , ISF3_A :: _1 => true } } } # [ doc = "Reader of field `ISF3`" ] pub type ISF3_R = crate :: R < bool , ISF3_A > ; impl ISF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF3_A { match self . bits { false => ISF3_A :: _0 , true => ISF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF3_A :: _1 } } # [ doc = "Write proxy for field `ISF3`" ] pub struct ISF3_W < 'a > { w : & 'a mut W , } impl < 'a > ISF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF4_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF4_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF4_A ) -> Self { match variant { ISF4_A :: _0 => false , ISF4_A :: _1 => true } } } # [ doc = "Reader of field `ISF4`" ] pub type ISF4_R = crate :: R < bool , ISF4_A > ; impl ISF4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF4_A { match self . bits { false => ISF4_A :: _0 , true => ISF4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF4_A :: _1 } } # [ doc = "Write proxy for field `ISF4`" ] pub struct ISF4_W < 'a > { w : & 'a mut W , } impl < 'a > ISF4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF5_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF5_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF5_A ) -> Self { match variant { ISF5_A :: _0 => false , ISF5_A :: _1 => true } } } # [ doc = "Reader of field `ISF5`" ] pub type ISF5_R = crate :: R < bool , ISF5_A > ; impl ISF5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF5_A { match self . bits { false => ISF5_A :: _0 , true => ISF5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF5_A :: _1 } } # [ doc = "Write proxy for field `ISF5`" ] pub struct ISF5_W < 'a > { w : & 'a mut W , } impl < 'a > ISF5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF6_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF6_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF6_A ) -> Self { match variant { ISF6_A :: _0 => false , ISF6_A :: _1 => true } } } # [ doc = "Reader of field `ISF6`" ] pub type ISF6_R = crate :: R < bool , ISF6_A > ; impl ISF6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF6_A { match self . bits { false => ISF6_A :: _0 , true => ISF6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF6_A :: _1 } } # [ doc = "Write proxy for field `ISF6`" ] pub struct ISF6_W < 'a > { w : & 'a mut W , } impl < 'a > ISF6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF7_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF7_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF7_A ) -> Self { match variant { ISF7_A :: _0 => false , ISF7_A :: _1 => true } } } # [ doc = "Reader of field `ISF7`" ] pub type ISF7_R = crate :: R < bool , ISF7_A > ; impl ISF7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF7_A { match self . bits { false => ISF7_A :: _0 , true => ISF7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF7_A :: _1 } } # [ doc = "Write proxy for field `ISF7`" ] pub struct ISF7_W < 'a > { w : & 'a mut W , } impl < 'a > ISF7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF8_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF8_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF8_A ) -> Self { match variant { ISF8_A :: _0 => false , ISF8_A :: _1 => true } } } # [ doc = "Reader of field `ISF8`" ] pub type ISF8_R = crate :: R < bool , ISF8_A > ; impl ISF8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF8_A { match self . bits { false => ISF8_A :: _0 , true => ISF8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF8_A :: _1 } } # [ doc = "Write proxy for field `ISF8`" ] pub struct ISF8_W < 'a > { w : & 'a mut W , } impl < 'a > ISF8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF9_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF9_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF9_A ) -> Self { match variant { ISF9_A :: _0 => false , ISF9_A :: _1 => true } } } # [ doc = "Reader of field `ISF9`" ] pub type ISF9_R = crate :: R < bool , ISF9_A > ; impl ISF9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF9_A { match self . bits { false => ISF9_A :: _0 , true => ISF9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF9_A :: _1 } } # [ doc = "Write proxy for field `ISF9`" ] pub struct ISF9_W < 'a > { w : & 'a mut W , } impl < 'a > ISF9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF10_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF10_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF10_A ) -> Self { match variant { ISF10_A :: _0 => false , ISF10_A :: _1 => true } } } # [ doc = "Reader of field `ISF10`" ] pub type ISF10_R = crate :: R < bool , ISF10_A > ; impl ISF10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF10_A { match self . bits { false => ISF10_A :: _0 , true => ISF10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF10_A :: _1 } } # [ doc = "Write proxy for field `ISF10`" ] pub struct ISF10_W < 'a > { w : & 'a mut W , } impl < 'a > ISF10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF11_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF11_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF11_A ) -> Self { match variant { ISF11_A :: _0 => false , ISF11_A :: _1 => true } } } # [ doc = "Reader of field `ISF11`" ] pub type ISF11_R = crate :: R < bool , ISF11_A > ; impl ISF11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF11_A { match self . bits { false => ISF11_A :: _0 , true => ISF11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF11_A :: _1 } } # [ doc = "Write proxy for field `ISF11`" ] pub struct ISF11_W < 'a > { w : & 'a mut W , } impl < 'a > ISF11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF12_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF12_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF12_A ) -> Self { match variant { ISF12_A :: _0 => false , ISF12_A :: _1 => true } } } # [ doc = "Reader of field `ISF12`" ] pub type ISF12_R = crate :: R < bool , ISF12_A > ; impl ISF12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF12_A { match self . bits { false => ISF12_A :: _0 , true => ISF12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF12_A :: _1 } } # [ doc = "Write proxy for field `ISF12`" ] pub struct ISF12_W < 'a > { w : & 'a mut W , } impl < 'a > ISF12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF13_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF13_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF13_A ) -> Self { match variant { ISF13_A :: _0 => false , ISF13_A :: _1 => true } } } # [ doc = "Reader of field `ISF13`" ] pub type ISF13_R = crate :: R < bool , ISF13_A > ; impl ISF13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF13_A { match self . bits { false => ISF13_A :: _0 , true => ISF13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF13_A :: _1 } } # [ doc = "Write proxy for field `ISF13`" ] pub struct ISF13_W < 'a > { w : & 'a mut W , } impl < 'a > ISF13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF14_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF14_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF14_A ) -> Self { match variant { ISF14_A :: _0 => false , ISF14_A :: _1 => true } } } # [ doc = "Reader of field `ISF14`" ] pub type ISF14_R = crate :: R < bool , ISF14_A > ; impl ISF14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF14_A { match self . bits { false => ISF14_A :: _0 , true => ISF14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF14_A :: _1 } } # [ doc = "Write proxy for field `ISF14`" ] pub struct ISF14_W < 'a > { w : & 'a mut W , } impl < 'a > ISF14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF15_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF15_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF15_A ) -> Self { match variant { ISF15_A :: _0 => false , ISF15_A :: _1 => true } } } # [ doc = "Reader of field `ISF15`" ] pub type ISF15_R = crate :: R < bool , ISF15_A > ; impl ISF15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF15_A { match self . bits { false => ISF15_A :: _0 , true => ISF15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF15_A :: _1 } } # [ doc = "Write proxy for field `ISF15`" ] pub struct ISF15_W < 'a > { w : & 'a mut W , } impl < 'a > ISF15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF16_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF16_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF16_A ) -> Self { match variant { ISF16_A :: _0 => false , ISF16_A :: _1 => true } } } # [ doc = "Reader of field `ISF16`" ] pub type ISF16_R = crate :: R < bool , ISF16_A > ; impl ISF16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF16_A { match self . bits { false => ISF16_A :: _0 , true => ISF16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF16_A :: _1 } } # [ doc = "Write proxy for field `ISF16`" ] pub struct ISF16_W < 'a > { w : & 'a mut W , } impl < 'a > ISF16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF17_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF17_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF17_A ) -> Self { match variant { ISF17_A :: _0 => false , ISF17_A :: _1 => true } } } # [ doc = "Reader of field `ISF17`" ] pub type ISF17_R = crate :: R < bool , ISF17_A > ; impl ISF17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF17_A { match self . bits { false => ISF17_A :: _0 , true => ISF17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF17_A :: _1 } } # [ doc = "Write proxy for field `ISF17`" ] pub struct ISF17_W < 'a > { w : & 'a mut W , } impl < 'a > ISF17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF18_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF18_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF18_A ) -> Self { match variant { ISF18_A :: _0 => false , ISF18_A :: _1 => true } } } # [ doc = "Reader of field `ISF18`" ] pub type ISF18_R = crate :: R < bool , ISF18_A > ; impl ISF18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF18_A { match self . bits { false => ISF18_A :: _0 , true => ISF18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF18_A :: _1 } } # [ doc = "Write proxy for field `ISF18`" ] pub struct ISF18_W < 'a > { w : & 'a mut W , } impl < 'a > ISF18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF19_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF19_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF19_A ) -> Self { match variant { ISF19_A :: _0 => false , ISF19_A :: _1 => true } } } # [ doc = "Reader of field `ISF19`" ] pub type ISF19_R = crate :: R < bool , ISF19_A > ; impl ISF19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF19_A { match self . bits { false => ISF19_A :: _0 , true => ISF19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF19_A :: _1 } } # [ doc = "Write proxy for field `ISF19`" ] pub struct ISF19_W < 'a > { w : & 'a mut W , } impl < 'a > ISF19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF20_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF20_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF20_A ) -> Self { match variant { ISF20_A :: _0 => false , ISF20_A :: _1 => true } } } # [ doc = "Reader of field `ISF20`" ] pub type ISF20_R = crate :: R < bool , ISF20_A > ; impl ISF20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF20_A { match self . bits { false => ISF20_A :: _0 , true => ISF20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF20_A :: _1 } } # [ doc = "Write proxy for field `ISF20`" ] pub struct ISF20_W < 'a > { w : & 'a mut W , } impl < 'a > ISF20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF21_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF21_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF21_A ) -> Self { match variant { ISF21_A :: _0 => false , ISF21_A :: _1 => true } } } # [ doc = "Reader of field `ISF21`" ] pub type ISF21_R = crate :: R < bool , ISF21_A > ; impl ISF21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF21_A { match self . bits { false => ISF21_A :: _0 , true => ISF21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF21_A :: _1 } } # [ doc = "Write proxy for field `ISF21`" ] pub struct ISF21_W < 'a > { w : & 'a mut W , } impl < 'a > ISF21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF22_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF22_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF22_A ) -> Self { match variant { ISF22_A :: _0 => false , ISF22_A :: _1 => true } } } # [ doc = "Reader of field `ISF22`" ] pub type ISF22_R = crate :: R < bool , ISF22_A > ; impl ISF22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF22_A { match self . bits { false => ISF22_A :: _0 , true => ISF22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF22_A :: _1 } } # [ doc = "Write proxy for field `ISF22`" ] pub struct ISF22_W < 'a > { w : & 'a mut W , } impl < 'a > ISF22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF23_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF23_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF23_A ) -> Self { match variant { ISF23_A :: _0 => false , ISF23_A :: _1 => true } } } # [ doc = "Reader of field `ISF23`" ] pub type ISF23_R = crate :: R < bool , ISF23_A > ; impl ISF23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF23_A { match self . bits { false => ISF23_A :: _0 , true => ISF23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF23_A :: _1 } } # [ doc = "Write proxy for field `ISF23`" ] pub struct ISF23_W < 'a > { w : & 'a mut W , } impl < 'a > ISF23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF24_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF24_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF24_A ) -> Self { match variant { ISF24_A :: _0 => false , ISF24_A :: _1 => true } } } # [ doc = "Reader of field `ISF24`" ] pub type ISF24_R = crate :: R < bool , ISF24_A > ; impl ISF24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF24_A { match self . bits { false => ISF24_A :: _0 , true => ISF24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF24_A :: _1 } } # [ doc = "Write proxy for field `ISF24`" ] pub struct ISF24_W < 'a > { w : & 'a mut W , } impl < 'a > ISF24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF25_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF25_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF25_A ) -> Self { match variant { ISF25_A :: _0 => false , ISF25_A :: _1 => true } } } # [ doc = "Reader of field `ISF25`" ] pub type ISF25_R = crate :: R < bool , ISF25_A > ; impl ISF25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF25_A { match self . bits { false => ISF25_A :: _0 , true => ISF25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF25_A :: _1 } } # [ doc = "Write proxy for field `ISF25`" ] pub struct ISF25_W < 'a > { w : & 'a mut W , } impl < 'a > ISF25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF26_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF26_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF26_A ) -> Self { match variant { ISF26_A :: _0 => false , ISF26_A :: _1 => true } } } # [ doc = "Reader of field `ISF26`" ] pub type ISF26_R = crate :: R < bool , ISF26_A > ; impl ISF26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF26_A { match self . bits { false => ISF26_A :: _0 , true => ISF26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF26_A :: _1 } } # [ doc = "Write proxy for field `ISF26`" ] pub struct ISF26_W < 'a > { w : & 'a mut W , } impl < 'a > ISF26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF27_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF27_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF27_A ) -> Self { match variant { ISF27_A :: _0 => false , ISF27_A :: _1 => true } } } # [ doc = "Reader of field `ISF27`" ] pub type ISF27_R = crate :: R < bool , ISF27_A > ; impl ISF27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF27_A { match self . bits { false => ISF27_A :: _0 , true => ISF27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF27_A :: _1 } } # [ doc = "Write proxy for field `ISF27`" ] pub struct ISF27_W < 'a > { w : & 'a mut W , } impl < 'a > ISF27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF28_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF28_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF28_A ) -> Self { match variant { ISF28_A :: _0 => false , ISF28_A :: _1 => true } } } # [ doc = "Reader of field `ISF28`" ] pub type ISF28_R = crate :: R < bool , ISF28_A > ; impl ISF28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF28_A { match self . bits { false => ISF28_A :: _0 , true => ISF28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF28_A :: _1 } } # [ doc = "Write proxy for field `ISF28`" ] pub struct ISF28_W < 'a > { w : & 'a mut W , } impl < 'a > ISF28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF29_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF29_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF29_A ) -> Self { match variant { ISF29_A :: _0 => false , ISF29_A :: _1 => true } } } # [ doc = "Reader of field `ISF29`" ] pub type ISF29_R = crate :: R < bool , ISF29_A > ; impl ISF29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF29_A { match self . bits { false => ISF29_A :: _0 , true => ISF29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF29_A :: _1 } } # [ doc = "Write proxy for field `ISF29`" ] pub struct ISF29_W < 'a > { w : & 'a mut W , } impl < 'a > ISF29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF30_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF30_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF30_A ) -> Self { match variant { ISF30_A :: _0 => false , ISF30_A :: _1 => true } } } # [ doc = "Reader of field `ISF30`" ] pub type ISF30_R = crate :: R < bool , ISF30_A > ; impl ISF30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF30_A { match self . bits { false => ISF30_A :: _0 , true => ISF30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF30_A :: _1 } } # [ doc = "Write proxy for field `ISF30`" ] pub struct ISF30_W < 'a > { w : & 'a mut W , } impl < 'a > ISF30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF31_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF31_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF31_A ) -> Self { match variant { ISF31_A :: _0 => false , ISF31_A :: _1 => true } } } # [ doc = "Reader of field `ISF31`" ] pub type ISF31_R = crate :: R < bool , ISF31_A > ; impl ISF31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF31_A { match self . bits { false => ISF31_A :: _0 , true => ISF31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF31_A :: _1 } } # [ doc = "Write proxy for field `ISF31`" ] pub struct ISF31_W < 'a > { w : & 'a mut W , } impl < 'a > ISF31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & self ) -> ISF0_R { ISF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & self ) -> ISF1_R { ISF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & self ) -> ISF2_R { ISF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & self ) -> ISF3_R { ISF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & self ) -> ISF4_R { ISF4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & self ) -> ISF5_R { ISF5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & self ) -> ISF6_R { ISF6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & self ) -> ISF7_R { ISF7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & self ) -> ISF8_R { ISF8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & self ) -> ISF9_R { ISF9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & self ) -> ISF10_R { ISF10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & self ) -> ISF11_R { ISF11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & self ) -> ISF12_R { ISF12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & self ) -> ISF13_R { ISF13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & self ) -> ISF14_R { ISF14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & self ) -> ISF15_R { ISF15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & self ) -> ISF16_R { ISF16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & self ) -> ISF17_R { ISF17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & self ) -> ISF18_R { ISF18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & self ) -> ISF19_R { ISF19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & self ) -> ISF20_R { ISF20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & self ) -> ISF21_R { ISF21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & self ) -> ISF22_R { ISF22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & self ) -> ISF23_R { ISF23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & self ) -> ISF24_R { ISF24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & self ) -> ISF25_R { ISF25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & self ) -> ISF26_R { ISF26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & self ) -> ISF27_R { ISF27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & self ) -> ISF28_R { ISF28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & self ) -> ISF29_R { ISF29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & self ) -> ISF30_R { ISF30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & self ) -> ISF31_R { ISF31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & mut self ) -> ISF0_W { ISF0_W { w : self } } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & mut self ) -> ISF1_W { ISF1_W { w : self } } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & mut self ) -> ISF2_W { ISF2_W { w : self } } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & mut self ) -> ISF3_W { ISF3_W { w : self } } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & mut self ) -> ISF4_W { ISF4_W { w : self } } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & mut self ) -> ISF5_W { ISF5_W { w : self } } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & mut self ) -> ISF6_W { ISF6_W { w : self } } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & mut self ) -> ISF7_W { ISF7_W { w : self } } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & mut self ) -> ISF8_W { ISF8_W { w : self } } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & mut self ) -> ISF9_W { ISF9_W { w : self } } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & mut self ) -> ISF10_W { ISF10_W { w : self } } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & mut self ) -> ISF11_W { ISF11_W { w : self } } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & mut self ) -> ISF12_W { ISF12_W { w : self } } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & mut self ) -> ISF13_W { ISF13_W { w : self } } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & mut self ) -> ISF14_W { ISF14_W { w : self } } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & mut self ) -> ISF15_W { ISF15_W { w : self } } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & mut self ) -> ISF16_W { ISF16_W { w : self } } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & mut self ) -> ISF17_W { ISF17_W { w : self } } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & mut self ) -> ISF18_W { ISF18_W { w : self } } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & mut self ) -> ISF19_W { ISF19_W { w : self } } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & mut self ) -> ISF20_W { ISF20_W { w : self } } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & mut self ) -> ISF21_W { ISF21_W { w : self } } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & mut self ) -> ISF22_W { ISF22_W { w : self } } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & mut self ) -> ISF23_W { ISF23_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & mut self ) -> ISF24_W { ISF24_W { w : self } } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & mut self ) -> ISF25_W { ISF25_W { w : self } } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & mut self ) -> ISF26_W { ISF26_W { w : self } } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & mut self ) -> ISF27_W { ISF27_W { w : self } } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & mut self ) -> ISF28_W { ISF28_W { w : self } } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & mut self ) -> ISF29_W { ISF29_W { w : self } } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & mut self ) -> ISF30_W { ISF30_W { w : self } } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & mut self ) -> ISF31_W { ISF31_W { w : self } } } } } # [ doc = "Pin Control and Interrupts" ] pub struct PORTB { _marker : PhantomData < * const ( ) > } unsafe impl Send for PORTB { } impl PORTB { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const portb :: RegisterBlock { 0x4004_a000 as * const _ } } impl Deref for PORTB { type Target = portb :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * PORTB :: ptr ( ) } } } # [ doc = "Pin Control and Interrupts" ] pub mod portb { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Pin Control Register n" ] pub pcr0 : PCR0 , # [ doc = "0x04 - Pin Control Register n" ] pub pcr1 : PCR1 , # [ doc = "0x08 - Pin Control Register n" ] pub pcr2 : PCR2 , # [ doc = "0x0c - Pin Control Register n" ] pub pcr3 : PCR3 , # [ doc = "0x10 - Pin Control Register n" ] pub pcr4 : PCR4 , # [ doc = "0x14 - Pin Control Register n" ] pub pcr5 : PCR5 , # [ doc = "0x18 - Pin Control Register n" ] pub pcr6 : PCR6 , # [ doc = "0x1c - Pin Control Register n" ] pub pcr7 : PCR7 , # [ doc = "0x20 - Pin Control Register n" ] pub pcr8 : PCR8 , # [ doc = "0x24 - Pin Control Register n" ] pub pcr9 : PCR9 , # [ doc = "0x28 - Pin Control Register n" ] pub pcr10 : PCR10 , # [ doc = "0x2c - Pin Control Register n" ] pub pcr11 : PCR11 , # [ doc = "0x30 - Pin Control Register n" ] pub pcr12 : PCR12 , # [ doc = "0x34 - Pin Control Register n" ] pub pcr13 : PCR13 , # [ doc = "0x38 - Pin Control Register n" ] pub pcr14 : PCR14 , # [ doc = "0x3c - Pin Control Register n" ] pub pcr15 : PCR15 , # [ doc = "0x40 - Pin Control Register n" ] pub pcr16 : PCR16 , # [ doc = "0x44 - Pin Control Register n" ] pub pcr17 : PCR17 , # [ doc = "0x48 - Pin Control Register n" ] pub pcr18 : PCR18 , # [ doc = "0x4c - Pin Control Register n" ] pub pcr19 : PCR19 , # [ doc = "0x50 - Pin Control Register n" ] pub pcr20 : PCR20 , # [ doc = "0x54 - Pin Control Register n" ] pub pcr21 : PCR21 , # [ doc = "0x58 - Pin Control Register n" ] pub pcr22 : PCR22 , # [ doc = "0x5c - Pin Control Register n" ] pub pcr23 : PCR23 , # [ doc = "0x60 - Pin Control Register n" ] pub pcr24 : PCR24 , # [ doc = "0x64 - Pin Control Register n" ] pub pcr25 : PCR25 , # [ doc = "0x68 - Pin Control Register n" ] pub pcr26 : PCR26 , # [ doc = "0x6c - Pin Control Register n" ] pub pcr27 : PCR27 , # [ doc = "0x70 - Pin Control Register n" ] pub pcr28 : PCR28 , # [ doc = "0x74 - Pin Control Register n" ] pub pcr29 : PCR29 , # [ doc = "0x78 - Pin Control Register n" ] pub pcr30 : PCR30 , # [ doc = "0x7c - Pin Control Register n" ] pub pcr31 : PCR31 , # [ doc = "0x80 - Global Pin Control Low Register" ] pub gpclr : GPCLR , # [ doc = "0x84 - Global Pin Control High Register" ] pub gpchr : GPCHR , _reserved34 : [ u8 ; 24usize ] , # [ doc = "0xa0 - Interrupt Status Flag Register" ] pub isfr : ISFR , } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr0](pcr0) module" ] pub type PCR0 = crate :: Reg < u32 , _PCR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR0 ; # [ doc = "`read()` method returns [pcr0::R](pcr0::R) reader structure" ] impl crate :: Readable for PCR0 { } # [ doc = "`write(|w| ..)` method takes [pcr0::W](pcr0::W) writer structure" ] impl crate :: Writable for PCR0 { } # [ doc = "Pin Control Register n" ] pub mod pcr0 { # [ doc = "Reader of register PCR0" ] pub type R = crate :: R < u32 , super :: PCR0 > ; # [ doc = "Writer for register PCR0" ] pub type W = crate :: W < u32 , super :: PCR0 > ; # [ doc = "Register PCR0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Write proxy for field `DSE`" ] pub struct DSE_W < 'a > { w : & 'a mut W , } impl < 'a > DSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _0 ) } # [ doc = "High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _1 ) } # [ 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 = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & mut self ) -> DSE_W { DSE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr1](pcr1) module" ] pub type PCR1 = crate :: Reg < u32 , _PCR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR1 ; # [ doc = "`read()` method returns [pcr1::R](pcr1::R) reader structure" ] impl crate :: Readable for PCR1 { } # [ doc = "`write(|w| ..)` method takes [pcr1::W](pcr1::W) writer structure" ] impl crate :: Writable for PCR1 { } # [ doc = "Pin Control Register n" ] pub mod pcr1 { # [ doc = "Reader of register PCR1" ] pub type R = crate :: R < u32 , super :: PCR1 > ; # [ doc = "Writer for register PCR1" ] pub type W = crate :: W < u32 , super :: PCR1 > ; # [ doc = "Register PCR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Write proxy for field `DSE`" ] pub struct DSE_W < 'a > { w : & 'a mut W , } impl < 'a > DSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _0 ) } # [ doc = "High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _1 ) } # [ 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 = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & mut self ) -> DSE_W { DSE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr2](pcr2) module" ] pub type PCR2 = crate :: Reg < u32 , _PCR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR2 ; # [ doc = "`read()` method returns [pcr2::R](pcr2::R) reader structure" ] impl crate :: Readable for PCR2 { } # [ doc = "`write(|w| ..)` method takes [pcr2::W](pcr2::W) writer structure" ] impl crate :: Writable for PCR2 { } # [ doc = "Pin Control Register n" ] pub mod pcr2 { # [ doc = "Reader of register PCR2" ] pub type R = crate :: R < u32 , super :: PCR2 > ; # [ doc = "Writer for register PCR2" ] pub type W = crate :: W < u32 , super :: PCR2 > ; # [ doc = "Register PCR2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr3](pcr3) module" ] pub type PCR3 = crate :: Reg < u32 , _PCR3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR3 ; # [ doc = "`read()` method returns [pcr3::R](pcr3::R) reader structure" ] impl crate :: Readable for PCR3 { } # [ doc = "`write(|w| ..)` method takes [pcr3::W](pcr3::W) writer structure" ] impl crate :: Writable for PCR3 { } # [ doc = "Pin Control Register n" ] pub mod pcr3 { # [ doc = "Reader of register PCR3" ] pub type R = crate :: R < u32 , super :: PCR3 > ; # [ doc = "Writer for register PCR3" ] pub type W = crate :: W < u32 , super :: PCR3 > ; # [ doc = "Register PCR3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr4](pcr4) module" ] pub type PCR4 = crate :: Reg < u32 , _PCR4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR4 ; # [ doc = "`read()` method returns [pcr4::R](pcr4::R) reader structure" ] impl crate :: Readable for PCR4 { } # [ doc = "`write(|w| ..)` method takes [pcr4::W](pcr4::W) writer structure" ] impl crate :: Writable for PCR4 { } # [ doc = "Pin Control Register n" ] pub mod pcr4 { # [ doc = "Reader of register PCR4" ] pub type R = crate :: R < u32 , super :: PCR4 > ; # [ doc = "Writer for register PCR4" ] pub type W = crate :: W < u32 , super :: PCR4 > ; # [ doc = "Register PCR4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr5](pcr5) module" ] pub type PCR5 = crate :: Reg < u32 , _PCR5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR5 ; # [ doc = "`read()` method returns [pcr5::R](pcr5::R) reader structure" ] impl crate :: Readable for PCR5 { } # [ doc = "`write(|w| ..)` method takes [pcr5::W](pcr5::W) writer structure" ] impl crate :: Writable for PCR5 { } # [ doc = "Pin Control Register n" ] pub mod pcr5 { # [ doc = "Reader of register PCR5" ] pub type R = crate :: R < u32 , super :: PCR5 > ; # [ doc = "Writer for register PCR5" ] pub type W = crate :: W < u32 , super :: PCR5 > ; # [ doc = "Register PCR5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr6](pcr6) module" ] pub type PCR6 = crate :: Reg < u32 , _PCR6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR6 ; # [ doc = "`read()` method returns [pcr6::R](pcr6::R) reader structure" ] impl crate :: Readable for PCR6 { } # [ doc = "`write(|w| ..)` method takes [pcr6::W](pcr6::W) writer structure" ] impl crate :: Writable for PCR6 { } # [ doc = "Pin Control Register n" ] pub mod pcr6 { # [ doc = "Reader of register PCR6" ] pub type R = crate :: R < u32 , super :: PCR6 > ; # [ doc = "Writer for register PCR6" ] pub type W = crate :: W < u32 , super :: PCR6 > ; # [ doc = "Register PCR6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr7](pcr7) module" ] pub type PCR7 = crate :: Reg < u32 , _PCR7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR7 ; # [ doc = "`read()` method returns [pcr7::R](pcr7::R) reader structure" ] impl crate :: Readable for PCR7 { } # [ doc = "`write(|w| ..)` method takes [pcr7::W](pcr7::W) writer structure" ] impl crate :: Writable for PCR7 { } # [ doc = "Pin Control Register n" ] pub mod pcr7 { # [ doc = "Reader of register PCR7" ] pub type R = crate :: R < u32 , super :: PCR7 > ; # [ doc = "Writer for register PCR7" ] pub type W = crate :: W < u32 , super :: PCR7 > ; # [ doc = "Register PCR7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr8](pcr8) module" ] pub type PCR8 = crate :: Reg < u32 , _PCR8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR8 ; # [ doc = "`read()` method returns [pcr8::R](pcr8::R) reader structure" ] impl crate :: Readable for PCR8 { } # [ doc = "`write(|w| ..)` method takes [pcr8::W](pcr8::W) writer structure" ] impl crate :: Writable for PCR8 { } # [ doc = "Pin Control Register n" ] pub mod pcr8 { # [ doc = "Reader of register PCR8" ] pub type R = crate :: R < u32 , super :: PCR8 > ; # [ doc = "Writer for register PCR8" ] pub type W = crate :: W < u32 , super :: PCR8 > ; # [ doc = "Register PCR8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr9](pcr9) module" ] pub type PCR9 = crate :: Reg < u32 , _PCR9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR9 ; # [ doc = "`read()` method returns [pcr9::R](pcr9::R) reader structure" ] impl crate :: Readable for PCR9 { } # [ doc = "`write(|w| ..)` method takes [pcr9::W](pcr9::W) writer structure" ] impl crate :: Writable for PCR9 { } # [ doc = "Pin Control Register n" ] pub mod pcr9 { # [ doc = "Reader of register PCR9" ] pub type R = crate :: R < u32 , super :: PCR9 > ; # [ doc = "Writer for register PCR9" ] pub type W = crate :: W < u32 , super :: PCR9 > ; # [ doc = "Register PCR9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr10](pcr10) module" ] pub type PCR10 = crate :: Reg < u32 , _PCR10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR10 ; # [ doc = "`read()` method returns [pcr10::R](pcr10::R) reader structure" ] impl crate :: Readable for PCR10 { } # [ doc = "`write(|w| ..)` method takes [pcr10::W](pcr10::W) writer structure" ] impl crate :: Writable for PCR10 { } # [ doc = "Pin Control Register n" ] pub mod pcr10 { # [ doc = "Reader of register PCR10" ] pub type R = crate :: R < u32 , super :: PCR10 > ; # [ doc = "Writer for register PCR10" ] pub type W = crate :: W < u32 , super :: PCR10 > ; # [ doc = "Register PCR10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr11](pcr11) module" ] pub type PCR11 = crate :: Reg < u32 , _PCR11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR11 ; # [ doc = "`read()` method returns [pcr11::R](pcr11::R) reader structure" ] impl crate :: Readable for PCR11 { } # [ doc = "`write(|w| ..)` method takes [pcr11::W](pcr11::W) writer structure" ] impl crate :: Writable for PCR11 { } # [ doc = "Pin Control Register n" ] pub mod pcr11 { # [ doc = "Reader of register PCR11" ] pub type R = crate :: R < u32 , super :: PCR11 > ; # [ doc = "Writer for register PCR11" ] pub type W = crate :: W < u32 , super :: PCR11 > ; # [ doc = "Register PCR11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr12](pcr12) module" ] pub type PCR12 = crate :: Reg < u32 , _PCR12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR12 ; # [ doc = "`read()` method returns [pcr12::R](pcr12::R) reader structure" ] impl crate :: Readable for PCR12 { } # [ doc = "`write(|w| ..)` method takes [pcr12::W](pcr12::W) writer structure" ] impl crate :: Writable for PCR12 { } # [ doc = "Pin Control Register n" ] pub mod pcr12 { # [ doc = "Reader of register PCR12" ] pub type R = crate :: R < u32 , super :: PCR12 > ; # [ doc = "Writer for register PCR12" ] pub type W = crate :: W < u32 , super :: PCR12 > ; # [ doc = "Register PCR12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr13](pcr13) module" ] pub type PCR13 = crate :: Reg < u32 , _PCR13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR13 ; # [ doc = "`read()` method returns [pcr13::R](pcr13::R) reader structure" ] impl crate :: Readable for PCR13 { } # [ doc = "`write(|w| ..)` method takes [pcr13::W](pcr13::W) writer structure" ] impl crate :: Writable for PCR13 { } # [ doc = "Pin Control Register n" ] pub mod pcr13 { # [ doc = "Reader of register PCR13" ] pub type R = crate :: R < u32 , super :: PCR13 > ; # [ doc = "Writer for register PCR13" ] pub type W = crate :: W < u32 , super :: PCR13 > ; # [ doc = "Register PCR13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr14](pcr14) module" ] pub type PCR14 = crate :: Reg < u32 , _PCR14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR14 ; # [ doc = "`read()` method returns [pcr14::R](pcr14::R) reader structure" ] impl crate :: Readable for PCR14 { } # [ doc = "`write(|w| ..)` method takes [pcr14::W](pcr14::W) writer structure" ] impl crate :: Writable for PCR14 { } # [ doc = "Pin Control Register n" ] pub mod pcr14 { # [ doc = "Reader of register PCR14" ] pub type R = crate :: R < u32 , super :: PCR14 > ; # [ doc = "Writer for register PCR14" ] pub type W = crate :: W < u32 , super :: PCR14 > ; # [ doc = "Register PCR14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr15](pcr15) module" ] pub type PCR15 = crate :: Reg < u32 , _PCR15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR15 ; # [ doc = "`read()` method returns [pcr15::R](pcr15::R) reader structure" ] impl crate :: Readable for PCR15 { } # [ doc = "`write(|w| ..)` method takes [pcr15::W](pcr15::W) writer structure" ] impl crate :: Writable for PCR15 { } # [ doc = "Pin Control Register n" ] pub mod pcr15 { # [ doc = "Reader of register PCR15" ] pub type R = crate :: R < u32 , super :: PCR15 > ; # [ doc = "Writer for register PCR15" ] pub type W = crate :: W < u32 , super :: PCR15 > ; # [ doc = "Register PCR15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr16](pcr16) module" ] pub type PCR16 = crate :: Reg < u32 , _PCR16 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR16 ; # [ doc = "`read()` method returns [pcr16::R](pcr16::R) reader structure" ] impl crate :: Readable for PCR16 { } # [ doc = "`write(|w| ..)` method takes [pcr16::W](pcr16::W) writer structure" ] impl crate :: Writable for PCR16 { } # [ doc = "Pin Control Register n" ] pub mod pcr16 { # [ doc = "Reader of register PCR16" ] pub type R = crate :: R < u32 , super :: PCR16 > ; # [ doc = "Writer for register PCR16" ] pub type W = crate :: W < u32 , super :: PCR16 > ; # [ doc = "Register PCR16 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR16 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr17](pcr17) module" ] pub type PCR17 = crate :: Reg < u32 , _PCR17 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR17 ; # [ doc = "`read()` method returns [pcr17::R](pcr17::R) reader structure" ] impl crate :: Readable for PCR17 { } # [ doc = "`write(|w| ..)` method takes [pcr17::W](pcr17::W) writer structure" ] impl crate :: Writable for PCR17 { } # [ doc = "Pin Control Register n" ] pub mod pcr17 { # [ doc = "Reader of register PCR17" ] pub type R = crate :: R < u32 , super :: PCR17 > ; # [ doc = "Writer for register PCR17" ] pub type W = crate :: W < u32 , super :: PCR17 > ; # [ doc = "Register PCR17 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR17 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr18](pcr18) module" ] pub type PCR18 = crate :: Reg < u32 , _PCR18 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR18 ; # [ doc = "`read()` method returns [pcr18::R](pcr18::R) reader structure" ] impl crate :: Readable for PCR18 { } # [ doc = "`write(|w| ..)` method takes [pcr18::W](pcr18::W) writer structure" ] impl crate :: Writable for PCR18 { } # [ doc = "Pin Control Register n" ] pub mod pcr18 { # [ doc = "Reader of register PCR18" ] pub type R = crate :: R < u32 , super :: PCR18 > ; # [ doc = "Writer for register PCR18" ] pub type W = crate :: W < u32 , super :: PCR18 > ; # [ doc = "Register PCR18 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR18 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr19](pcr19) module" ] pub type PCR19 = crate :: Reg < u32 , _PCR19 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR19 ; # [ doc = "`read()` method returns [pcr19::R](pcr19::R) reader structure" ] impl crate :: Readable for PCR19 { } # [ doc = "`write(|w| ..)` method takes [pcr19::W](pcr19::W) writer structure" ] impl crate :: Writable for PCR19 { } # [ doc = "Pin Control Register n" ] pub mod pcr19 { # [ doc = "Reader of register PCR19" ] pub type R = crate :: R < u32 , super :: PCR19 > ; # [ doc = "Writer for register PCR19" ] pub type W = crate :: W < u32 , super :: PCR19 > ; # [ doc = "Register PCR19 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR19 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr20](pcr20) module" ] pub type PCR20 = crate :: Reg < u32 , _PCR20 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR20 ; # [ doc = "`read()` method returns [pcr20::R](pcr20::R) reader structure" ] impl crate :: Readable for PCR20 { } # [ doc = "`write(|w| ..)` method takes [pcr20::W](pcr20::W) writer structure" ] impl crate :: Writable for PCR20 { } # [ doc = "Pin Control Register n" ] pub mod pcr20 { # [ doc = "Reader of register PCR20" ] pub type R = crate :: R < u32 , super :: PCR20 > ; # [ doc = "Writer for register PCR20" ] pub type W = crate :: W < u32 , super :: PCR20 > ; # [ doc = "Register PCR20 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR20 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr21](pcr21) module" ] pub type PCR21 = crate :: Reg < u32 , _PCR21 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR21 ; # [ doc = "`read()` method returns [pcr21::R](pcr21::R) reader structure" ] impl crate :: Readable for PCR21 { } # [ doc = "`write(|w| ..)` method takes [pcr21::W](pcr21::W) writer structure" ] impl crate :: Writable for PCR21 { } # [ doc = "Pin Control Register n" ] pub mod pcr21 { # [ doc = "Reader of register PCR21" ] pub type R = crate :: R < u32 , super :: PCR21 > ; # [ doc = "Writer for register PCR21" ] pub type W = crate :: W < u32 , super :: PCR21 > ; # [ doc = "Register PCR21 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR21 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr22](pcr22) module" ] pub type PCR22 = crate :: Reg < u32 , _PCR22 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR22 ; # [ doc = "`read()` method returns [pcr22::R](pcr22::R) reader structure" ] impl crate :: Readable for PCR22 { } # [ doc = "`write(|w| ..)` method takes [pcr22::W](pcr22::W) writer structure" ] impl crate :: Writable for PCR22 { } # [ doc = "Pin Control Register n" ] pub mod pcr22 { # [ doc = "Reader of register PCR22" ] pub type R = crate :: R < u32 , super :: PCR22 > ; # [ doc = "Writer for register PCR22" ] pub type W = crate :: W < u32 , super :: PCR22 > ; # [ doc = "Register PCR22 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR22 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr23](pcr23) module" ] pub type PCR23 = crate :: Reg < u32 , _PCR23 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR23 ; # [ doc = "`read()` method returns [pcr23::R](pcr23::R) reader structure" ] impl crate :: Readable for PCR23 { } # [ doc = "`write(|w| ..)` method takes [pcr23::W](pcr23::W) writer structure" ] impl crate :: Writable for PCR23 { } # [ doc = "Pin Control Register n" ] pub mod pcr23 { # [ doc = "Reader of register PCR23" ] pub type R = crate :: R < u32 , super :: PCR23 > ; # [ doc = "Writer for register PCR23" ] pub type W = crate :: W < u32 , super :: PCR23 > ; # [ doc = "Register PCR23 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR23 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr24](pcr24) module" ] pub type PCR24 = crate :: Reg < u32 , _PCR24 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR24 ; # [ doc = "`read()` method returns [pcr24::R](pcr24::R) reader structure" ] impl crate :: Readable for PCR24 { } # [ doc = "`write(|w| ..)` method takes [pcr24::W](pcr24::W) writer structure" ] impl crate :: Writable for PCR24 { } # [ doc = "Pin Control Register n" ] pub mod pcr24 { # [ doc = "Reader of register PCR24" ] pub type R = crate :: R < u32 , super :: PCR24 > ; # [ doc = "Writer for register PCR24" ] pub type W = crate :: W < u32 , super :: PCR24 > ; # [ doc = "Register PCR24 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR24 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr25](pcr25) module" ] pub type PCR25 = crate :: Reg < u32 , _PCR25 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR25 ; # [ doc = "`read()` method returns [pcr25::R](pcr25::R) reader structure" ] impl crate :: Readable for PCR25 { } # [ doc = "`write(|w| ..)` method takes [pcr25::W](pcr25::W) writer structure" ] impl crate :: Writable for PCR25 { } # [ doc = "Pin Control Register n" ] pub mod pcr25 { # [ doc = "Reader of register PCR25" ] pub type R = crate :: R < u32 , super :: PCR25 > ; # [ doc = "Writer for register PCR25" ] pub type W = crate :: W < u32 , super :: PCR25 > ; # [ doc = "Register PCR25 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR25 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr26](pcr26) module" ] pub type PCR26 = crate :: Reg < u32 , _PCR26 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR26 ; # [ doc = "`read()` method returns [pcr26::R](pcr26::R) reader structure" ] impl crate :: Readable for PCR26 { } # [ doc = "`write(|w| ..)` method takes [pcr26::W](pcr26::W) writer structure" ] impl crate :: Writable for PCR26 { } # [ doc = "Pin Control Register n" ] pub mod pcr26 { # [ doc = "Reader of register PCR26" ] pub type R = crate :: R < u32 , super :: PCR26 > ; # [ doc = "Writer for register PCR26" ] pub type W = crate :: W < u32 , super :: PCR26 > ; # [ doc = "Register PCR26 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR26 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr27](pcr27) module" ] pub type PCR27 = crate :: Reg < u32 , _PCR27 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR27 ; # [ doc = "`read()` method returns [pcr27::R](pcr27::R) reader structure" ] impl crate :: Readable for PCR27 { } # [ doc = "`write(|w| ..)` method takes [pcr27::W](pcr27::W) writer structure" ] impl crate :: Writable for PCR27 { } # [ doc = "Pin Control Register n" ] pub mod pcr27 { # [ doc = "Reader of register PCR27" ] pub type R = crate :: R < u32 , super :: PCR27 > ; # [ doc = "Writer for register PCR27" ] pub type W = crate :: W < u32 , super :: PCR27 > ; # [ doc = "Register PCR27 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR27 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr28](pcr28) module" ] pub type PCR28 = crate :: Reg < u32 , _PCR28 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR28 ; # [ doc = "`read()` method returns [pcr28::R](pcr28::R) reader structure" ] impl crate :: Readable for PCR28 { } # [ doc = "`write(|w| ..)` method takes [pcr28::W](pcr28::W) writer structure" ] impl crate :: Writable for PCR28 { } # [ doc = "Pin Control Register n" ] pub mod pcr28 { # [ doc = "Reader of register PCR28" ] pub type R = crate :: R < u32 , super :: PCR28 > ; # [ doc = "Writer for register PCR28" ] pub type W = crate :: W < u32 , super :: PCR28 > ; # [ doc = "Register PCR28 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR28 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr29](pcr29) module" ] pub type PCR29 = crate :: Reg < u32 , _PCR29 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR29 ; # [ doc = "`read()` method returns [pcr29::R](pcr29::R) reader structure" ] impl crate :: Readable for PCR29 { } # [ doc = "`write(|w| ..)` method takes [pcr29::W](pcr29::W) writer structure" ] impl crate :: Writable for PCR29 { } # [ doc = "Pin Control Register n" ] pub mod pcr29 { # [ doc = "Reader of register PCR29" ] pub type R = crate :: R < u32 , super :: PCR29 > ; # [ doc = "Writer for register PCR29" ] pub type W = crate :: W < u32 , super :: PCR29 > ; # [ doc = "Register PCR29 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR29 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr30](pcr30) module" ] pub type PCR30 = crate :: Reg < u32 , _PCR30 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR30 ; # [ doc = "`read()` method returns [pcr30::R](pcr30::R) reader structure" ] impl crate :: Readable for PCR30 { } # [ doc = "`write(|w| ..)` method takes [pcr30::W](pcr30::W) writer structure" ] impl crate :: Writable for PCR30 { } # [ doc = "Pin Control Register n" ] pub mod pcr30 { # [ doc = "Reader of register PCR30" ] pub type R = crate :: R < u32 , super :: PCR30 > ; # [ doc = "Writer for register PCR30" ] pub type W = crate :: W < u32 , super :: PCR30 > ; # [ doc = "Register PCR30 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR30 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr31](pcr31) module" ] pub type PCR31 = crate :: Reg < u32 , _PCR31 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR31 ; # [ doc = "`read()` method returns [pcr31::R](pcr31::R) reader structure" ] impl crate :: Readable for PCR31 { } # [ doc = "`write(|w| ..)` method takes [pcr31::W](pcr31::W) writer structure" ] impl crate :: Writable for PCR31 { } # [ doc = "Pin Control Register n" ] pub mod pcr31 { # [ doc = "Reader of register PCR31" ] pub type R = crate :: R < u32 , super :: PCR31 > ; # [ doc = "Writer for register PCR31" ] pub type W = crate :: W < u32 , super :: PCR31 > ; # [ doc = "Register PCR31 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR31 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Global Pin Control Low Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpclr](gpclr) module" ] pub type GPCLR = crate :: Reg < u32 , _GPCLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCLR ; # [ doc = "`write(|w| ..)` method takes [gpclr::W](gpclr::W) writer structure" ] impl crate :: Writable for GPCLR { } # [ doc = "Global Pin Control Low Register" ] pub mod gpclr { # [ doc = "Writer for register GPCLR" ] pub type W = crate :: W < u32 , super :: GPCLR > ; # [ doc = "Register GPCLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Global Pin Control High Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpchr](gpchr) module" ] pub type GPCHR = crate :: Reg < u32 , _GPCHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCHR ; # [ doc = "`write(|w| ..)` method takes [gpchr::W](gpchr::W) writer structure" ] impl crate :: Writable for GPCHR { } # [ doc = "Global Pin Control High Register" ] pub mod gpchr { # [ doc = "Writer for register GPCHR" ] pub type W = crate :: W < u32 , super :: GPCHR > ; # [ doc = "Register GPCHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Interrupt Status Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [isfr](isfr) module" ] pub type ISFR = crate :: Reg < u32 , _ISFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ISFR ; # [ doc = "`read()` method returns [isfr::R](isfr::R) reader structure" ] impl crate :: Readable for ISFR { } # [ doc = "`write(|w| ..)` method takes [isfr::W](isfr::W) writer structure" ] impl crate :: Writable for ISFR { } # [ doc = "Interrupt Status Flag Register" ] pub mod isfr { # [ doc = "Reader of register ISFR" ] pub type R = crate :: R < u32 , super :: ISFR > ; # [ doc = "Writer for register ISFR" ] pub type W = crate :: W < u32 , super :: ISFR > ; # [ doc = "Register ISFR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ISFR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF0_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF0_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF0_A ) -> Self { match variant { ISF0_A :: _0 => false , ISF0_A :: _1 => true } } } # [ doc = "Reader of field `ISF0`" ] pub type ISF0_R = crate :: R < bool , ISF0_A > ; impl ISF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF0_A { match self . bits { false => ISF0_A :: _0 , true => ISF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF0_A :: _1 } } # [ doc = "Write proxy for field `ISF0`" ] pub struct ISF0_W < 'a > { w : & 'a mut W , } impl < 'a > ISF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF1_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF1_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF1_A ) -> Self { match variant { ISF1_A :: _0 => false , ISF1_A :: _1 => true } } } # [ doc = "Reader of field `ISF1`" ] pub type ISF1_R = crate :: R < bool , ISF1_A > ; impl ISF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF1_A { match self . bits { false => ISF1_A :: _0 , true => ISF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF1_A :: _1 } } # [ doc = "Write proxy for field `ISF1`" ] pub struct ISF1_W < 'a > { w : & 'a mut W , } impl < 'a > ISF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _1 ) } # [ 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 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF2_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF2_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF2_A ) -> Self { match variant { ISF2_A :: _0 => false , ISF2_A :: _1 => true } } } # [ doc = "Reader of field `ISF2`" ] pub type ISF2_R = crate :: R < bool , ISF2_A > ; impl ISF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF2_A { match self . bits { false => ISF2_A :: _0 , true => ISF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF2_A :: _1 } } # [ doc = "Write proxy for field `ISF2`" ] pub struct ISF2_W < 'a > { w : & 'a mut W , } impl < 'a > ISF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF3_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF3_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF3_A ) -> Self { match variant { ISF3_A :: _0 => false , ISF3_A :: _1 => true } } } # [ doc = "Reader of field `ISF3`" ] pub type ISF3_R = crate :: R < bool , ISF3_A > ; impl ISF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF3_A { match self . bits { false => ISF3_A :: _0 , true => ISF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF3_A :: _1 } } # [ doc = "Write proxy for field `ISF3`" ] pub struct ISF3_W < 'a > { w : & 'a mut W , } impl < 'a > ISF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF4_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF4_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF4_A ) -> Self { match variant { ISF4_A :: _0 => false , ISF4_A :: _1 => true } } } # [ doc = "Reader of field `ISF4`" ] pub type ISF4_R = crate :: R < bool , ISF4_A > ; impl ISF4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF4_A { match self . bits { false => ISF4_A :: _0 , true => ISF4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF4_A :: _1 } } # [ doc = "Write proxy for field `ISF4`" ] pub struct ISF4_W < 'a > { w : & 'a mut W , } impl < 'a > ISF4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF5_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF5_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF5_A ) -> Self { match variant { ISF5_A :: _0 => false , ISF5_A :: _1 => true } } } # [ doc = "Reader of field `ISF5`" ] pub type ISF5_R = crate :: R < bool , ISF5_A > ; impl ISF5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF5_A { match self . bits { false => ISF5_A :: _0 , true => ISF5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF5_A :: _1 } } # [ doc = "Write proxy for field `ISF5`" ] pub struct ISF5_W < 'a > { w : & 'a mut W , } impl < 'a > ISF5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF6_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF6_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF6_A ) -> Self { match variant { ISF6_A :: _0 => false , ISF6_A :: _1 => true } } } # [ doc = "Reader of field `ISF6`" ] pub type ISF6_R = crate :: R < bool , ISF6_A > ; impl ISF6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF6_A { match self . bits { false => ISF6_A :: _0 , true => ISF6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF6_A :: _1 } } # [ doc = "Write proxy for field `ISF6`" ] pub struct ISF6_W < 'a > { w : & 'a mut W , } impl < 'a > ISF6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF7_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF7_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF7_A ) -> Self { match variant { ISF7_A :: _0 => false , ISF7_A :: _1 => true } } } # [ doc = "Reader of field `ISF7`" ] pub type ISF7_R = crate :: R < bool , ISF7_A > ; impl ISF7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF7_A { match self . bits { false => ISF7_A :: _0 , true => ISF7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF7_A :: _1 } } # [ doc = "Write proxy for field `ISF7`" ] pub struct ISF7_W < 'a > { w : & 'a mut W , } impl < 'a > ISF7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF8_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF8_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF8_A ) -> Self { match variant { ISF8_A :: _0 => false , ISF8_A :: _1 => true } } } # [ doc = "Reader of field `ISF8`" ] pub type ISF8_R = crate :: R < bool , ISF8_A > ; impl ISF8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF8_A { match self . bits { false => ISF8_A :: _0 , true => ISF8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF8_A :: _1 } } # [ doc = "Write proxy for field `ISF8`" ] pub struct ISF8_W < 'a > { w : & 'a mut W , } impl < 'a > ISF8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF9_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF9_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF9_A ) -> Self { match variant { ISF9_A :: _0 => false , ISF9_A :: _1 => true } } } # [ doc = "Reader of field `ISF9`" ] pub type ISF9_R = crate :: R < bool , ISF9_A > ; impl ISF9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF9_A { match self . bits { false => ISF9_A :: _0 , true => ISF9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF9_A :: _1 } } # [ doc = "Write proxy for field `ISF9`" ] pub struct ISF9_W < 'a > { w : & 'a mut W , } impl < 'a > ISF9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF10_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF10_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF10_A ) -> Self { match variant { ISF10_A :: _0 => false , ISF10_A :: _1 => true } } } # [ doc = "Reader of field `ISF10`" ] pub type ISF10_R = crate :: R < bool , ISF10_A > ; impl ISF10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF10_A { match self . bits { false => ISF10_A :: _0 , true => ISF10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF10_A :: _1 } } # [ doc = "Write proxy for field `ISF10`" ] pub struct ISF10_W < 'a > { w : & 'a mut W , } impl < 'a > ISF10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF11_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF11_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF11_A ) -> Self { match variant { ISF11_A :: _0 => false , ISF11_A :: _1 => true } } } # [ doc = "Reader of field `ISF11`" ] pub type ISF11_R = crate :: R < bool , ISF11_A > ; impl ISF11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF11_A { match self . bits { false => ISF11_A :: _0 , true => ISF11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF11_A :: _1 } } # [ doc = "Write proxy for field `ISF11`" ] pub struct ISF11_W < 'a > { w : & 'a mut W , } impl < 'a > ISF11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF12_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF12_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF12_A ) -> Self { match variant { ISF12_A :: _0 => false , ISF12_A :: _1 => true } } } # [ doc = "Reader of field `ISF12`" ] pub type ISF12_R = crate :: R < bool , ISF12_A > ; impl ISF12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF12_A { match self . bits { false => ISF12_A :: _0 , true => ISF12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF12_A :: _1 } } # [ doc = "Write proxy for field `ISF12`" ] pub struct ISF12_W < 'a > { w : & 'a mut W , } impl < 'a > ISF12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF13_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF13_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF13_A ) -> Self { match variant { ISF13_A :: _0 => false , ISF13_A :: _1 => true } } } # [ doc = "Reader of field `ISF13`" ] pub type ISF13_R = crate :: R < bool , ISF13_A > ; impl ISF13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF13_A { match self . bits { false => ISF13_A :: _0 , true => ISF13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF13_A :: _1 } } # [ doc = "Write proxy for field `ISF13`" ] pub struct ISF13_W < 'a > { w : & 'a mut W , } impl < 'a > ISF13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF14_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF14_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF14_A ) -> Self { match variant { ISF14_A :: _0 => false , ISF14_A :: _1 => true } } } # [ doc = "Reader of field `ISF14`" ] pub type ISF14_R = crate :: R < bool , ISF14_A > ; impl ISF14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF14_A { match self . bits { false => ISF14_A :: _0 , true => ISF14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF14_A :: _1 } } # [ doc = "Write proxy for field `ISF14`" ] pub struct ISF14_W < 'a > { w : & 'a mut W , } impl < 'a > ISF14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF15_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF15_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF15_A ) -> Self { match variant { ISF15_A :: _0 => false , ISF15_A :: _1 => true } } } # [ doc = "Reader of field `ISF15`" ] pub type ISF15_R = crate :: R < bool , ISF15_A > ; impl ISF15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF15_A { match self . bits { false => ISF15_A :: _0 , true => ISF15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF15_A :: _1 } } # [ doc = "Write proxy for field `ISF15`" ] pub struct ISF15_W < 'a > { w : & 'a mut W , } impl < 'a > ISF15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF16_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF16_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF16_A ) -> Self { match variant { ISF16_A :: _0 => false , ISF16_A :: _1 => true } } } # [ doc = "Reader of field `ISF16`" ] pub type ISF16_R = crate :: R < bool , ISF16_A > ; impl ISF16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF16_A { match self . bits { false => ISF16_A :: _0 , true => ISF16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF16_A :: _1 } } # [ doc = "Write proxy for field `ISF16`" ] pub struct ISF16_W < 'a > { w : & 'a mut W , } impl < 'a > ISF16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF17_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF17_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF17_A ) -> Self { match variant { ISF17_A :: _0 => false , ISF17_A :: _1 => true } } } # [ doc = "Reader of field `ISF17`" ] pub type ISF17_R = crate :: R < bool , ISF17_A > ; impl ISF17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF17_A { match self . bits { false => ISF17_A :: _0 , true => ISF17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF17_A :: _1 } } # [ doc = "Write proxy for field `ISF17`" ] pub struct ISF17_W < 'a > { w : & 'a mut W , } impl < 'a > ISF17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF18_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF18_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF18_A ) -> Self { match variant { ISF18_A :: _0 => false , ISF18_A :: _1 => true } } } # [ doc = "Reader of field `ISF18`" ] pub type ISF18_R = crate :: R < bool , ISF18_A > ; impl ISF18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF18_A { match self . bits { false => ISF18_A :: _0 , true => ISF18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF18_A :: _1 } } # [ doc = "Write proxy for field `ISF18`" ] pub struct ISF18_W < 'a > { w : & 'a mut W , } impl < 'a > ISF18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF19_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF19_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF19_A ) -> Self { match variant { ISF19_A :: _0 => false , ISF19_A :: _1 => true } } } # [ doc = "Reader of field `ISF19`" ] pub type ISF19_R = crate :: R < bool , ISF19_A > ; impl ISF19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF19_A { match self . bits { false => ISF19_A :: _0 , true => ISF19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF19_A :: _1 } } # [ doc = "Write proxy for field `ISF19`" ] pub struct ISF19_W < 'a > { w : & 'a mut W , } impl < 'a > ISF19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF20_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF20_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF20_A ) -> Self { match variant { ISF20_A :: _0 => false , ISF20_A :: _1 => true } } } # [ doc = "Reader of field `ISF20`" ] pub type ISF20_R = crate :: R < bool , ISF20_A > ; impl ISF20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF20_A { match self . bits { false => ISF20_A :: _0 , true => ISF20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF20_A :: _1 } } # [ doc = "Write proxy for field `ISF20`" ] pub struct ISF20_W < 'a > { w : & 'a mut W , } impl < 'a > ISF20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF21_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF21_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF21_A ) -> Self { match variant { ISF21_A :: _0 => false , ISF21_A :: _1 => true } } } # [ doc = "Reader of field `ISF21`" ] pub type ISF21_R = crate :: R < bool , ISF21_A > ; impl ISF21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF21_A { match self . bits { false => ISF21_A :: _0 , true => ISF21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF21_A :: _1 } } # [ doc = "Write proxy for field `ISF21`" ] pub struct ISF21_W < 'a > { w : & 'a mut W , } impl < 'a > ISF21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF22_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF22_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF22_A ) -> Self { match variant { ISF22_A :: _0 => false , ISF22_A :: _1 => true } } } # [ doc = "Reader of field `ISF22`" ] pub type ISF22_R = crate :: R < bool , ISF22_A > ; impl ISF22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF22_A { match self . bits { false => ISF22_A :: _0 , true => ISF22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF22_A :: _1 } } # [ doc = "Write proxy for field `ISF22`" ] pub struct ISF22_W < 'a > { w : & 'a mut W , } impl < 'a > ISF22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF23_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF23_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF23_A ) -> Self { match variant { ISF23_A :: _0 => false , ISF23_A :: _1 => true } } } # [ doc = "Reader of field `ISF23`" ] pub type ISF23_R = crate :: R < bool , ISF23_A > ; impl ISF23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF23_A { match self . bits { false => ISF23_A :: _0 , true => ISF23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF23_A :: _1 } } # [ doc = "Write proxy for field `ISF23`" ] pub struct ISF23_W < 'a > { w : & 'a mut W , } impl < 'a > ISF23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF24_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF24_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF24_A ) -> Self { match variant { ISF24_A :: _0 => false , ISF24_A :: _1 => true } } } # [ doc = "Reader of field `ISF24`" ] pub type ISF24_R = crate :: R < bool , ISF24_A > ; impl ISF24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF24_A { match self . bits { false => ISF24_A :: _0 , true => ISF24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF24_A :: _1 } } # [ doc = "Write proxy for field `ISF24`" ] pub struct ISF24_W < 'a > { w : & 'a mut W , } impl < 'a > ISF24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF25_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF25_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF25_A ) -> Self { match variant { ISF25_A :: _0 => false , ISF25_A :: _1 => true } } } # [ doc = "Reader of field `ISF25`" ] pub type ISF25_R = crate :: R < bool , ISF25_A > ; impl ISF25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF25_A { match self . bits { false => ISF25_A :: _0 , true => ISF25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF25_A :: _1 } } # [ doc = "Write proxy for field `ISF25`" ] pub struct ISF25_W < 'a > { w : & 'a mut W , } impl < 'a > ISF25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF26_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF26_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF26_A ) -> Self { match variant { ISF26_A :: _0 => false , ISF26_A :: _1 => true } } } # [ doc = "Reader of field `ISF26`" ] pub type ISF26_R = crate :: R < bool , ISF26_A > ; impl ISF26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF26_A { match self . bits { false => ISF26_A :: _0 , true => ISF26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF26_A :: _1 } } # [ doc = "Write proxy for field `ISF26`" ] pub struct ISF26_W < 'a > { w : & 'a mut W , } impl < 'a > ISF26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF27_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF27_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF27_A ) -> Self { match variant { ISF27_A :: _0 => false , ISF27_A :: _1 => true } } } # [ doc = "Reader of field `ISF27`" ] pub type ISF27_R = crate :: R < bool , ISF27_A > ; impl ISF27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF27_A { match self . bits { false => ISF27_A :: _0 , true => ISF27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF27_A :: _1 } } # [ doc = "Write proxy for field `ISF27`" ] pub struct ISF27_W < 'a > { w : & 'a mut W , } impl < 'a > ISF27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF28_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF28_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF28_A ) -> Self { match variant { ISF28_A :: _0 => false , ISF28_A :: _1 => true } } } # [ doc = "Reader of field `ISF28`" ] pub type ISF28_R = crate :: R < bool , ISF28_A > ; impl ISF28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF28_A { match self . bits { false => ISF28_A :: _0 , true => ISF28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF28_A :: _1 } } # [ doc = "Write proxy for field `ISF28`" ] pub struct ISF28_W < 'a > { w : & 'a mut W , } impl < 'a > ISF28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF29_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF29_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF29_A ) -> Self { match variant { ISF29_A :: _0 => false , ISF29_A :: _1 => true } } } # [ doc = "Reader of field `ISF29`" ] pub type ISF29_R = crate :: R < bool , ISF29_A > ; impl ISF29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF29_A { match self . bits { false => ISF29_A :: _0 , true => ISF29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF29_A :: _1 } } # [ doc = "Write proxy for field `ISF29`" ] pub struct ISF29_W < 'a > { w : & 'a mut W , } impl < 'a > ISF29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF30_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF30_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF30_A ) -> Self { match variant { ISF30_A :: _0 => false , ISF30_A :: _1 => true } } } # [ doc = "Reader of field `ISF30`" ] pub type ISF30_R = crate :: R < bool , ISF30_A > ; impl ISF30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF30_A { match self . bits { false => ISF30_A :: _0 , true => ISF30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF30_A :: _1 } } # [ doc = "Write proxy for field `ISF30`" ] pub struct ISF30_W < 'a > { w : & 'a mut W , } impl < 'a > ISF30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF31_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF31_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF31_A ) -> Self { match variant { ISF31_A :: _0 => false , ISF31_A :: _1 => true } } } # [ doc = "Reader of field `ISF31`" ] pub type ISF31_R = crate :: R < bool , ISF31_A > ; impl ISF31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF31_A { match self . bits { false => ISF31_A :: _0 , true => ISF31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF31_A :: _1 } } # [ doc = "Write proxy for field `ISF31`" ] pub struct ISF31_W < 'a > { w : & 'a mut W , } impl < 'a > ISF31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & self ) -> ISF0_R { ISF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & self ) -> ISF1_R { ISF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & self ) -> ISF2_R { ISF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & self ) -> ISF3_R { ISF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & self ) -> ISF4_R { ISF4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & self ) -> ISF5_R { ISF5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & self ) -> ISF6_R { ISF6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & self ) -> ISF7_R { ISF7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & self ) -> ISF8_R { ISF8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & self ) -> ISF9_R { ISF9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & self ) -> ISF10_R { ISF10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & self ) -> ISF11_R { ISF11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & self ) -> ISF12_R { ISF12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & self ) -> ISF13_R { ISF13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & self ) -> ISF14_R { ISF14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & self ) -> ISF15_R { ISF15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & self ) -> ISF16_R { ISF16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & self ) -> ISF17_R { ISF17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & self ) -> ISF18_R { ISF18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & self ) -> ISF19_R { ISF19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & self ) -> ISF20_R { ISF20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & self ) -> ISF21_R { ISF21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & self ) -> ISF22_R { ISF22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & self ) -> ISF23_R { ISF23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & self ) -> ISF24_R { ISF24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & self ) -> ISF25_R { ISF25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & self ) -> ISF26_R { ISF26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & self ) -> ISF27_R { ISF27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & self ) -> ISF28_R { ISF28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & self ) -> ISF29_R { ISF29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & self ) -> ISF30_R { ISF30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & self ) -> ISF31_R { ISF31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & mut self ) -> ISF0_W { ISF0_W { w : self } } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & mut self ) -> ISF1_W { ISF1_W { w : self } } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & mut self ) -> ISF2_W { ISF2_W { w : self } } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & mut self ) -> ISF3_W { ISF3_W { w : self } } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & mut self ) -> ISF4_W { ISF4_W { w : self } } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & mut self ) -> ISF5_W { ISF5_W { w : self } } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & mut self ) -> ISF6_W { ISF6_W { w : self } } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & mut self ) -> ISF7_W { ISF7_W { w : self } } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & mut self ) -> ISF8_W { ISF8_W { w : self } } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & mut self ) -> ISF9_W { ISF9_W { w : self } } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & mut self ) -> ISF10_W { ISF10_W { w : self } } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & mut self ) -> ISF11_W { ISF11_W { w : self } } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & mut self ) -> ISF12_W { ISF12_W { w : self } } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & mut self ) -> ISF13_W { ISF13_W { w : self } } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & mut self ) -> ISF14_W { ISF14_W { w : self } } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & mut self ) -> ISF15_W { ISF15_W { w : self } } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & mut self ) -> ISF16_W { ISF16_W { w : self } } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & mut self ) -> ISF17_W { ISF17_W { w : self } } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & mut self ) -> ISF18_W { ISF18_W { w : self } } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & mut self ) -> ISF19_W { ISF19_W { w : self } } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & mut self ) -> ISF20_W { ISF20_W { w : self } } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & mut self ) -> ISF21_W { ISF21_W { w : self } } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & mut self ) -> ISF22_W { ISF22_W { w : self } } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & mut self ) -> ISF23_W { ISF23_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & mut self ) -> ISF24_W { ISF24_W { w : self } } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & mut self ) -> ISF25_W { ISF25_W { w : self } } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & mut self ) -> ISF26_W { ISF26_W { w : self } } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & mut self ) -> ISF27_W { ISF27_W { w : self } } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & mut self ) -> ISF28_W { ISF28_W { w : self } } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & mut self ) -> ISF29_W { ISF29_W { w : self } } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & mut self ) -> ISF30_W { ISF30_W { w : self } } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & mut self ) -> ISF31_W { ISF31_W { w : self } } } } } # [ doc = "Pin Control and Interrupts" ] pub struct PORTC { _marker : PhantomData < * const ( ) > } unsafe impl Send for PORTC { } impl PORTC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const portc :: RegisterBlock { 0x4004_b000 as * const _ } } impl Deref for PORTC { type Target = portc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * PORTC :: ptr ( ) } } } # [ doc = "Pin Control and Interrupts" ] pub mod portc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Pin Control Register n" ] pub pcr0 : PCR0 , # [ doc = "0x04 - Pin Control Register n" ] pub pcr1 : PCR1 , # [ doc = "0x08 - Pin Control Register n" ] pub pcr2 : PCR2 , # [ doc = "0x0c - Pin Control Register n" ] pub pcr3 : PCR3 , # [ doc = "0x10 - Pin Control Register n" ] pub pcr4 : PCR4 , # [ doc = "0x14 - Pin Control Register n" ] pub pcr5 : PCR5 , # [ doc = "0x18 - Pin Control Register n" ] pub pcr6 : PCR6 , # [ doc = "0x1c - Pin Control Register n" ] pub pcr7 : PCR7 , # [ doc = "0x20 - Pin Control Register n" ] pub pcr8 : PCR8 , # [ doc = "0x24 - Pin Control Register n" ] pub pcr9 : PCR9 , # [ doc = "0x28 - Pin Control Register n" ] pub pcr10 : PCR10 , # [ doc = "0x2c - Pin Control Register n" ] pub pcr11 : PCR11 , # [ doc = "0x30 - Pin Control Register n" ] pub pcr12 : PCR12 , # [ doc = "0x34 - Pin Control Register n" ] pub pcr13 : PCR13 , # [ doc = "0x38 - Pin Control Register n" ] pub pcr14 : PCR14 , # [ doc = "0x3c - Pin Control Register n" ] pub pcr15 : PCR15 , # [ doc = "0x40 - Pin Control Register n" ] pub pcr16 : PCR16 , # [ doc = "0x44 - Pin Control Register n" ] pub pcr17 : PCR17 , # [ doc = "0x48 - Pin Control Register n" ] pub pcr18 : PCR18 , # [ doc = "0x4c - Pin Control Register n" ] pub pcr19 : PCR19 , # [ doc = "0x50 - Pin Control Register n" ] pub pcr20 : PCR20 , # [ doc = "0x54 - Pin Control Register n" ] pub pcr21 : PCR21 , # [ doc = "0x58 - Pin Control Register n" ] pub pcr22 : PCR22 , # [ doc = "0x5c - Pin Control Register n" ] pub pcr23 : PCR23 , # [ doc = "0x60 - Pin Control Register n" ] pub pcr24 : PCR24 , # [ doc = "0x64 - Pin Control Register n" ] pub pcr25 : PCR25 , # [ doc = "0x68 - Pin Control Register n" ] pub pcr26 : PCR26 , # [ doc = "0x6c - Pin Control Register n" ] pub pcr27 : PCR27 , # [ doc = "0x70 - Pin Control Register n" ] pub pcr28 : PCR28 , # [ doc = "0x74 - Pin Control Register n" ] pub pcr29 : PCR29 , # [ doc = "0x78 - Pin Control Register n" ] pub pcr30 : PCR30 , # [ doc = "0x7c - Pin Control Register n" ] pub pcr31 : PCR31 , # [ doc = "0x80 - Global Pin Control Low Register" ] pub gpclr : GPCLR , # [ doc = "0x84 - Global Pin Control High Register" ] pub gpchr : GPCHR , _reserved34 : [ u8 ; 24usize ] , # [ doc = "0xa0 - Interrupt Status Flag Register" ] pub isfr : ISFR , } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr0](pcr0) module" ] pub type PCR0 = crate :: Reg < u32 , _PCR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR0 ; # [ doc = "`read()` method returns [pcr0::R](pcr0::R) reader structure" ] impl crate :: Readable for PCR0 { } # [ doc = "`write(|w| ..)` method takes [pcr0::W](pcr0::W) writer structure" ] impl crate :: Writable for PCR0 { } # [ doc = "Pin Control Register n" ] pub mod pcr0 { # [ doc = "Reader of register PCR0" ] pub type R = crate :: R < u32 , super :: PCR0 > ; # [ doc = "Writer for register PCR0" ] pub type W = crate :: W < u32 , super :: PCR0 > ; # [ doc = "Register PCR0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr1](pcr1) module" ] pub type PCR1 = crate :: Reg < u32 , _PCR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR1 ; # [ doc = "`read()` method returns [pcr1::R](pcr1::R) reader structure" ] impl crate :: Readable for PCR1 { } # [ doc = "`write(|w| ..)` method takes [pcr1::W](pcr1::W) writer structure" ] impl crate :: Writable for PCR1 { } # [ doc = "Pin Control Register n" ] pub mod pcr1 { # [ doc = "Reader of register PCR1" ] pub type R = crate :: R < u32 , super :: PCR1 > ; # [ doc = "Writer for register PCR1" ] pub type W = crate :: W < u32 , super :: PCR1 > ; # [ doc = "Register PCR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr2](pcr2) module" ] pub type PCR2 = crate :: Reg < u32 , _PCR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR2 ; # [ doc = "`read()` method returns [pcr2::R](pcr2::R) reader structure" ] impl crate :: Readable for PCR2 { } # [ doc = "`write(|w| ..)` method takes [pcr2::W](pcr2::W) writer structure" ] impl crate :: Writable for PCR2 { } # [ doc = "Pin Control Register n" ] pub mod pcr2 { # [ doc = "Reader of register PCR2" ] pub type R = crate :: R < u32 , super :: PCR2 > ; # [ doc = "Writer for register PCR2" ] pub type W = crate :: W < u32 , super :: PCR2 > ; # [ doc = "Register PCR2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr3](pcr3) module" ] pub type PCR3 = crate :: Reg < u32 , _PCR3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR3 ; # [ doc = "`read()` method returns [pcr3::R](pcr3::R) reader structure" ] impl crate :: Readable for PCR3 { } # [ doc = "`write(|w| ..)` method takes [pcr3::W](pcr3::W) writer structure" ] impl crate :: Writable for PCR3 { } # [ doc = "Pin Control Register n" ] pub mod pcr3 { # [ doc = "Reader of register PCR3" ] pub type R = crate :: R < u32 , super :: PCR3 > ; # [ doc = "Writer for register PCR3" ] pub type W = crate :: W < u32 , super :: PCR3 > ; # [ doc = "Register PCR3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Write proxy for field `DSE`" ] pub struct DSE_W < 'a > { w : & 'a mut W , } impl < 'a > DSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _0 ) } # [ doc = "High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _1 ) } # [ 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 = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & mut self ) -> DSE_W { DSE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr4](pcr4) module" ] pub type PCR4 = crate :: Reg < u32 , _PCR4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR4 ; # [ doc = "`read()` method returns [pcr4::R](pcr4::R) reader structure" ] impl crate :: Readable for PCR4 { } # [ doc = "`write(|w| ..)` method takes [pcr4::W](pcr4::W) writer structure" ] impl crate :: Writable for PCR4 { } # [ doc = "Pin Control Register n" ] pub mod pcr4 { # [ doc = "Reader of register PCR4" ] pub type R = crate :: R < u32 , super :: PCR4 > ; # [ doc = "Writer for register PCR4" ] pub type W = crate :: W < u32 , super :: PCR4 > ; # [ doc = "Register PCR4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Write proxy for field `DSE`" ] pub struct DSE_W < 'a > { w : & 'a mut W , } impl < 'a > DSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _0 ) } # [ doc = "High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _1 ) } # [ 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 = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & mut self ) -> DSE_W { DSE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr5](pcr5) module" ] pub type PCR5 = crate :: Reg < u32 , _PCR5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR5 ; # [ doc = "`read()` method returns [pcr5::R](pcr5::R) reader structure" ] impl crate :: Readable for PCR5 { } # [ doc = "`write(|w| ..)` method takes [pcr5::W](pcr5::W) writer structure" ] impl crate :: Writable for PCR5 { } # [ doc = "Pin Control Register n" ] pub mod pcr5 { # [ doc = "Reader of register PCR5" ] pub type R = crate :: R < u32 , super :: PCR5 > ; # [ doc = "Writer for register PCR5" ] pub type W = crate :: W < u32 , super :: PCR5 > ; # [ doc = "Register PCR5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr6](pcr6) module" ] pub type PCR6 = crate :: Reg < u32 , _PCR6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR6 ; # [ doc = "`read()` method returns [pcr6::R](pcr6::R) reader structure" ] impl crate :: Readable for PCR6 { } # [ doc = "`write(|w| ..)` method takes [pcr6::W](pcr6::W) writer structure" ] impl crate :: Writable for PCR6 { } # [ doc = "Pin Control Register n" ] pub mod pcr6 { # [ doc = "Reader of register PCR6" ] pub type R = crate :: R < u32 , super :: PCR6 > ; # [ doc = "Writer for register PCR6" ] pub type W = crate :: W < u32 , super :: PCR6 > ; # [ doc = "Register PCR6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr7](pcr7) module" ] pub type PCR7 = crate :: Reg < u32 , _PCR7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR7 ; # [ doc = "`read()` method returns [pcr7::R](pcr7::R) reader structure" ] impl crate :: Readable for PCR7 { } # [ doc = "`write(|w| ..)` method takes [pcr7::W](pcr7::W) writer structure" ] impl crate :: Writable for PCR7 { } # [ doc = "Pin Control Register n" ] pub mod pcr7 { # [ doc = "Reader of register PCR7" ] pub type R = crate :: R < u32 , super :: PCR7 > ; # [ doc = "Writer for register PCR7" ] pub type W = crate :: W < u32 , super :: PCR7 > ; # [ doc = "Register PCR7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr8](pcr8) module" ] pub type PCR8 = crate :: Reg < u32 , _PCR8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR8 ; # [ doc = "`read()` method returns [pcr8::R](pcr8::R) reader structure" ] impl crate :: Readable for PCR8 { } # [ doc = "`write(|w| ..)` method takes [pcr8::W](pcr8::W) writer structure" ] impl crate :: Writable for PCR8 { } # [ doc = "Pin Control Register n" ] pub mod pcr8 { # [ doc = "Reader of register PCR8" ] pub type R = crate :: R < u32 , super :: PCR8 > ; # [ doc = "Writer for register PCR8" ] pub type W = crate :: W < u32 , super :: PCR8 > ; # [ doc = "Register PCR8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr9](pcr9) module" ] pub type PCR9 = crate :: Reg < u32 , _PCR9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR9 ; # [ doc = "`read()` method returns [pcr9::R](pcr9::R) reader structure" ] impl crate :: Readable for PCR9 { } # [ doc = "`write(|w| ..)` method takes [pcr9::W](pcr9::W) writer structure" ] impl crate :: Writable for PCR9 { } # [ doc = "Pin Control Register n" ] pub mod pcr9 { # [ doc = "Reader of register PCR9" ] pub type R = crate :: R < u32 , super :: PCR9 > ; # [ doc = "Writer for register PCR9" ] pub type W = crate :: W < u32 , super :: PCR9 > ; # [ doc = "Register PCR9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr10](pcr10) module" ] pub type PCR10 = crate :: Reg < u32 , _PCR10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR10 ; # [ doc = "`read()` method returns [pcr10::R](pcr10::R) reader structure" ] impl crate :: Readable for PCR10 { } # [ doc = "`write(|w| ..)` method takes [pcr10::W](pcr10::W) writer structure" ] impl crate :: Writable for PCR10 { } # [ doc = "Pin Control Register n" ] pub mod pcr10 { # [ doc = "Reader of register PCR10" ] pub type R = crate :: R < u32 , super :: PCR10 > ; # [ doc = "Writer for register PCR10" ] pub type W = crate :: W < u32 , super :: PCR10 > ; # [ doc = "Register PCR10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr11](pcr11) module" ] pub type PCR11 = crate :: Reg < u32 , _PCR11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR11 ; # [ doc = "`read()` method returns [pcr11::R](pcr11::R) reader structure" ] impl crate :: Readable for PCR11 { } # [ doc = "`write(|w| ..)` method takes [pcr11::W](pcr11::W) writer structure" ] impl crate :: Writable for PCR11 { } # [ doc = "Pin Control Register n" ] pub mod pcr11 { # [ doc = "Reader of register PCR11" ] pub type R = crate :: R < u32 , super :: PCR11 > ; # [ doc = "Writer for register PCR11" ] pub type W = crate :: W < u32 , super :: PCR11 > ; # [ doc = "Register PCR11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr12](pcr12) module" ] pub type PCR12 = crate :: Reg < u32 , _PCR12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR12 ; # [ doc = "`read()` method returns [pcr12::R](pcr12::R) reader structure" ] impl crate :: Readable for PCR12 { } # [ doc = "`write(|w| ..)` method takes [pcr12::W](pcr12::W) writer structure" ] impl crate :: Writable for PCR12 { } # [ doc = "Pin Control Register n" ] pub mod pcr12 { # [ doc = "Reader of register PCR12" ] pub type R = crate :: R < u32 , super :: PCR12 > ; # [ doc = "Writer for register PCR12" ] pub type W = crate :: W < u32 , super :: PCR12 > ; # [ doc = "Register PCR12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr13](pcr13) module" ] pub type PCR13 = crate :: Reg < u32 , _PCR13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR13 ; # [ doc = "`read()` method returns [pcr13::R](pcr13::R) reader structure" ] impl crate :: Readable for PCR13 { } # [ doc = "`write(|w| ..)` method takes [pcr13::W](pcr13::W) writer structure" ] impl crate :: Writable for PCR13 { } # [ doc = "Pin Control Register n" ] pub mod pcr13 { # [ doc = "Reader of register PCR13" ] pub type R = crate :: R < u32 , super :: PCR13 > ; # [ doc = "Writer for register PCR13" ] pub type W = crate :: W < u32 , super :: PCR13 > ; # [ doc = "Register PCR13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr14](pcr14) module" ] pub type PCR14 = crate :: Reg < u32 , _PCR14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR14 ; # [ doc = "`read()` method returns [pcr14::R](pcr14::R) reader structure" ] impl crate :: Readable for PCR14 { } # [ doc = "`write(|w| ..)` method takes [pcr14::W](pcr14::W) writer structure" ] impl crate :: Writable for PCR14 { } # [ doc = "Pin Control Register n" ] pub mod pcr14 { # [ doc = "Reader of register PCR14" ] pub type R = crate :: R < u32 , super :: PCR14 > ; # [ doc = "Writer for register PCR14" ] pub type W = crate :: W < u32 , super :: PCR14 > ; # [ doc = "Register PCR14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr15](pcr15) module" ] pub type PCR15 = crate :: Reg < u32 , _PCR15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR15 ; # [ doc = "`read()` method returns [pcr15::R](pcr15::R) reader structure" ] impl crate :: Readable for PCR15 { } # [ doc = "`write(|w| ..)` method takes [pcr15::W](pcr15::W) writer structure" ] impl crate :: Writable for PCR15 { } # [ doc = "Pin Control Register n" ] pub mod pcr15 { # [ doc = "Reader of register PCR15" ] pub type R = crate :: R < u32 , super :: PCR15 > ; # [ doc = "Writer for register PCR15" ] pub type W = crate :: W < u32 , super :: PCR15 > ; # [ doc = "Register PCR15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr16](pcr16) module" ] pub type PCR16 = crate :: Reg < u32 , _PCR16 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR16 ; # [ doc = "`read()` method returns [pcr16::R](pcr16::R) reader structure" ] impl crate :: Readable for PCR16 { } # [ doc = "`write(|w| ..)` method takes [pcr16::W](pcr16::W) writer structure" ] impl crate :: Writable for PCR16 { } # [ doc = "Pin Control Register n" ] pub mod pcr16 { # [ doc = "Reader of register PCR16" ] pub type R = crate :: R < u32 , super :: PCR16 > ; # [ doc = "Writer for register PCR16" ] pub type W = crate :: W < u32 , super :: PCR16 > ; # [ doc = "Register PCR16 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR16 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr17](pcr17) module" ] pub type PCR17 = crate :: Reg < u32 , _PCR17 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR17 ; # [ doc = "`read()` method returns [pcr17::R](pcr17::R) reader structure" ] impl crate :: Readable for PCR17 { } # [ doc = "`write(|w| ..)` method takes [pcr17::W](pcr17::W) writer structure" ] impl crate :: Writable for PCR17 { } # [ doc = "Pin Control Register n" ] pub mod pcr17 { # [ doc = "Reader of register PCR17" ] pub type R = crate :: R < u32 , super :: PCR17 > ; # [ doc = "Writer for register PCR17" ] pub type W = crate :: W < u32 , super :: PCR17 > ; # [ doc = "Register PCR17 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR17 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr18](pcr18) module" ] pub type PCR18 = crate :: Reg < u32 , _PCR18 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR18 ; # [ doc = "`read()` method returns [pcr18::R](pcr18::R) reader structure" ] impl crate :: Readable for PCR18 { } # [ doc = "`write(|w| ..)` method takes [pcr18::W](pcr18::W) writer structure" ] impl crate :: Writable for PCR18 { } # [ doc = "Pin Control Register n" ] pub mod pcr18 { # [ doc = "Reader of register PCR18" ] pub type R = crate :: R < u32 , super :: PCR18 > ; # [ doc = "Writer for register PCR18" ] pub type W = crate :: W < u32 , super :: PCR18 > ; # [ doc = "Register PCR18 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR18 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr19](pcr19) module" ] pub type PCR19 = crate :: Reg < u32 , _PCR19 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR19 ; # [ doc = "`read()` method returns [pcr19::R](pcr19::R) reader structure" ] impl crate :: Readable for PCR19 { } # [ doc = "`write(|w| ..)` method takes [pcr19::W](pcr19::W) writer structure" ] impl crate :: Writable for PCR19 { } # [ doc = "Pin Control Register n" ] pub mod pcr19 { # [ doc = "Reader of register PCR19" ] pub type R = crate :: R < u32 , super :: PCR19 > ; # [ doc = "Writer for register PCR19" ] pub type W = crate :: W < u32 , super :: PCR19 > ; # [ doc = "Register PCR19 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR19 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr20](pcr20) module" ] pub type PCR20 = crate :: Reg < u32 , _PCR20 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR20 ; # [ doc = "`read()` method returns [pcr20::R](pcr20::R) reader structure" ] impl crate :: Readable for PCR20 { } # [ doc = "`write(|w| ..)` method takes [pcr20::W](pcr20::W) writer structure" ] impl crate :: Writable for PCR20 { } # [ doc = "Pin Control Register n" ] pub mod pcr20 { # [ doc = "Reader of register PCR20" ] pub type R = crate :: R < u32 , super :: PCR20 > ; # [ doc = "Writer for register PCR20" ] pub type W = crate :: W < u32 , super :: PCR20 > ; # [ doc = "Register PCR20 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR20 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr21](pcr21) module" ] pub type PCR21 = crate :: Reg < u32 , _PCR21 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR21 ; # [ doc = "`read()` method returns [pcr21::R](pcr21::R) reader structure" ] impl crate :: Readable for PCR21 { } # [ doc = "`write(|w| ..)` method takes [pcr21::W](pcr21::W) writer structure" ] impl crate :: Writable for PCR21 { } # [ doc = "Pin Control Register n" ] pub mod pcr21 { # [ doc = "Reader of register PCR21" ] pub type R = crate :: R < u32 , super :: PCR21 > ; # [ doc = "Writer for register PCR21" ] pub type W = crate :: W < u32 , super :: PCR21 > ; # [ doc = "Register PCR21 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR21 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr22](pcr22) module" ] pub type PCR22 = crate :: Reg < u32 , _PCR22 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR22 ; # [ doc = "`read()` method returns [pcr22::R](pcr22::R) reader structure" ] impl crate :: Readable for PCR22 { } # [ doc = "`write(|w| ..)` method takes [pcr22::W](pcr22::W) writer structure" ] impl crate :: Writable for PCR22 { } # [ doc = "Pin Control Register n" ] pub mod pcr22 { # [ doc = "Reader of register PCR22" ] pub type R = crate :: R < u32 , super :: PCR22 > ; # [ doc = "Writer for register PCR22" ] pub type W = crate :: W < u32 , super :: PCR22 > ; # [ doc = "Register PCR22 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR22 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr23](pcr23) module" ] pub type PCR23 = crate :: Reg < u32 , _PCR23 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR23 ; # [ doc = "`read()` method returns [pcr23::R](pcr23::R) reader structure" ] impl crate :: Readable for PCR23 { } # [ doc = "`write(|w| ..)` method takes [pcr23::W](pcr23::W) writer structure" ] impl crate :: Writable for PCR23 { } # [ doc = "Pin Control Register n" ] pub mod pcr23 { # [ doc = "Reader of register PCR23" ] pub type R = crate :: R < u32 , super :: PCR23 > ; # [ doc = "Writer for register PCR23" ] pub type W = crate :: W < u32 , super :: PCR23 > ; # [ doc = "Register PCR23 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR23 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr24](pcr24) module" ] pub type PCR24 = crate :: Reg < u32 , _PCR24 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR24 ; # [ doc = "`read()` method returns [pcr24::R](pcr24::R) reader structure" ] impl crate :: Readable for PCR24 { } # [ doc = "`write(|w| ..)` method takes [pcr24::W](pcr24::W) writer structure" ] impl crate :: Writable for PCR24 { } # [ doc = "Pin Control Register n" ] pub mod pcr24 { # [ doc = "Reader of register PCR24" ] pub type R = crate :: R < u32 , super :: PCR24 > ; # [ doc = "Writer for register PCR24" ] pub type W = crate :: W < u32 , super :: PCR24 > ; # [ doc = "Register PCR24 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR24 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr25](pcr25) module" ] pub type PCR25 = crate :: Reg < u32 , _PCR25 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR25 ; # [ doc = "`read()` method returns [pcr25::R](pcr25::R) reader structure" ] impl crate :: Readable for PCR25 { } # [ doc = "`write(|w| ..)` method takes [pcr25::W](pcr25::W) writer structure" ] impl crate :: Writable for PCR25 { } # [ doc = "Pin Control Register n" ] pub mod pcr25 { # [ doc = "Reader of register PCR25" ] pub type R = crate :: R < u32 , super :: PCR25 > ; # [ doc = "Writer for register PCR25" ] pub type W = crate :: W < u32 , super :: PCR25 > ; # [ doc = "Register PCR25 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR25 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr26](pcr26) module" ] pub type PCR26 = crate :: Reg < u32 , _PCR26 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR26 ; # [ doc = "`read()` method returns [pcr26::R](pcr26::R) reader structure" ] impl crate :: Readable for PCR26 { } # [ doc = "`write(|w| ..)` method takes [pcr26::W](pcr26::W) writer structure" ] impl crate :: Writable for PCR26 { } # [ doc = "Pin Control Register n" ] pub mod pcr26 { # [ doc = "Reader of register PCR26" ] pub type R = crate :: R < u32 , super :: PCR26 > ; # [ doc = "Writer for register PCR26" ] pub type W = crate :: W < u32 , super :: PCR26 > ; # [ doc = "Register PCR26 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR26 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr27](pcr27) module" ] pub type PCR27 = crate :: Reg < u32 , _PCR27 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR27 ; # [ doc = "`read()` method returns [pcr27::R](pcr27::R) reader structure" ] impl crate :: Readable for PCR27 { } # [ doc = "`write(|w| ..)` method takes [pcr27::W](pcr27::W) writer structure" ] impl crate :: Writable for PCR27 { } # [ doc = "Pin Control Register n" ] pub mod pcr27 { # [ doc = "Reader of register PCR27" ] pub type R = crate :: R < u32 , super :: PCR27 > ; # [ doc = "Writer for register PCR27" ] pub type W = crate :: W < u32 , super :: PCR27 > ; # [ doc = "Register PCR27 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR27 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr28](pcr28) module" ] pub type PCR28 = crate :: Reg < u32 , _PCR28 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR28 ; # [ doc = "`read()` method returns [pcr28::R](pcr28::R) reader structure" ] impl crate :: Readable for PCR28 { } # [ doc = "`write(|w| ..)` method takes [pcr28::W](pcr28::W) writer structure" ] impl crate :: Writable for PCR28 { } # [ doc = "Pin Control Register n" ] pub mod pcr28 { # [ doc = "Reader of register PCR28" ] pub type R = crate :: R < u32 , super :: PCR28 > ; # [ doc = "Writer for register PCR28" ] pub type W = crate :: W < u32 , super :: PCR28 > ; # [ doc = "Register PCR28 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR28 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr29](pcr29) module" ] pub type PCR29 = crate :: Reg < u32 , _PCR29 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR29 ; # [ doc = "`read()` method returns [pcr29::R](pcr29::R) reader structure" ] impl crate :: Readable for PCR29 { } # [ doc = "`write(|w| ..)` method takes [pcr29::W](pcr29::W) writer structure" ] impl crate :: Writable for PCR29 { } # [ doc = "Pin Control Register n" ] pub mod pcr29 { # [ doc = "Reader of register PCR29" ] pub type R = crate :: R < u32 , super :: PCR29 > ; # [ doc = "Writer for register PCR29" ] pub type W = crate :: W < u32 , super :: PCR29 > ; # [ doc = "Register PCR29 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR29 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr30](pcr30) module" ] pub type PCR30 = crate :: Reg < u32 , _PCR30 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR30 ; # [ doc = "`read()` method returns [pcr30::R](pcr30::R) reader structure" ] impl crate :: Readable for PCR30 { } # [ doc = "`write(|w| ..)` method takes [pcr30::W](pcr30::W) writer structure" ] impl crate :: Writable for PCR30 { } # [ doc = "Pin Control Register n" ] pub mod pcr30 { # [ doc = "Reader of register PCR30" ] pub type R = crate :: R < u32 , super :: PCR30 > ; # [ doc = "Writer for register PCR30" ] pub type W = crate :: W < u32 , super :: PCR30 > ; # [ doc = "Register PCR30 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR30 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr31](pcr31) module" ] pub type PCR31 = crate :: Reg < u32 , _PCR31 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR31 ; # [ doc = "`read()` method returns [pcr31::R](pcr31::R) reader structure" ] impl crate :: Readable for PCR31 { } # [ doc = "`write(|w| ..)` method takes [pcr31::W](pcr31::W) writer structure" ] impl crate :: Writable for PCR31 { } # [ doc = "Pin Control Register n" ] pub mod pcr31 { # [ doc = "Reader of register PCR31" ] pub type R = crate :: R < u32 , super :: PCR31 > ; # [ doc = "Writer for register PCR31" ] pub type W = crate :: W < u32 , super :: PCR31 > ; # [ doc = "Register PCR31 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR31 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Global Pin Control Low Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpclr](gpclr) module" ] pub type GPCLR = crate :: Reg < u32 , _GPCLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCLR ; # [ doc = "`write(|w| ..)` method takes [gpclr::W](gpclr::W) writer structure" ] impl crate :: Writable for GPCLR { } # [ doc = "Global Pin Control Low Register" ] pub mod gpclr { # [ doc = "Writer for register GPCLR" ] pub type W = crate :: W < u32 , super :: GPCLR > ; # [ doc = "Register GPCLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Global Pin Control High Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpchr](gpchr) module" ] pub type GPCHR = crate :: Reg < u32 , _GPCHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCHR ; # [ doc = "`write(|w| ..)` method takes [gpchr::W](gpchr::W) writer structure" ] impl crate :: Writable for GPCHR { } # [ doc = "Global Pin Control High Register" ] pub mod gpchr { # [ doc = "Writer for register GPCHR" ] pub type W = crate :: W < u32 , super :: GPCHR > ; # [ doc = "Register GPCHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Interrupt Status Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [isfr](isfr) module" ] pub type ISFR = crate :: Reg < u32 , _ISFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ISFR ; # [ doc = "`read()` method returns [isfr::R](isfr::R) reader structure" ] impl crate :: Readable for ISFR { } # [ doc = "`write(|w| ..)` method takes [isfr::W](isfr::W) writer structure" ] impl crate :: Writable for ISFR { } # [ doc = "Interrupt Status Flag Register" ] pub mod isfr { # [ doc = "Reader of register ISFR" ] pub type R = crate :: R < u32 , super :: ISFR > ; # [ doc = "Writer for register ISFR" ] pub type W = crate :: W < u32 , super :: ISFR > ; # [ doc = "Register ISFR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ISFR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF0_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF0_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF0_A ) -> Self { match variant { ISF0_A :: _0 => false , ISF0_A :: _1 => true } } } # [ doc = "Reader of field `ISF0`" ] pub type ISF0_R = crate :: R < bool , ISF0_A > ; impl ISF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF0_A { match self . bits { false => ISF0_A :: _0 , true => ISF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF0_A :: _1 } } # [ doc = "Write proxy for field `ISF0`" ] pub struct ISF0_W < 'a > { w : & 'a mut W , } impl < 'a > ISF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF1_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF1_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF1_A ) -> Self { match variant { ISF1_A :: _0 => false , ISF1_A :: _1 => true } } } # [ doc = "Reader of field `ISF1`" ] pub type ISF1_R = crate :: R < bool , ISF1_A > ; impl ISF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF1_A { match self . bits { false => ISF1_A :: _0 , true => ISF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF1_A :: _1 } } # [ doc = "Write proxy for field `ISF1`" ] pub struct ISF1_W < 'a > { w : & 'a mut W , } impl < 'a > ISF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _1 ) } # [ 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 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF2_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF2_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF2_A ) -> Self { match variant { ISF2_A :: _0 => false , ISF2_A :: _1 => true } } } # [ doc = "Reader of field `ISF2`" ] pub type ISF2_R = crate :: R < bool , ISF2_A > ; impl ISF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF2_A { match self . bits { false => ISF2_A :: _0 , true => ISF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF2_A :: _1 } } # [ doc = "Write proxy for field `ISF2`" ] pub struct ISF2_W < 'a > { w : & 'a mut W , } impl < 'a > ISF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF3_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF3_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF3_A ) -> Self { match variant { ISF3_A :: _0 => false , ISF3_A :: _1 => true } } } # [ doc = "Reader of field `ISF3`" ] pub type ISF3_R = crate :: R < bool , ISF3_A > ; impl ISF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF3_A { match self . bits { false => ISF3_A :: _0 , true => ISF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF3_A :: _1 } } # [ doc = "Write proxy for field `ISF3`" ] pub struct ISF3_W < 'a > { w : & 'a mut W , } impl < 'a > ISF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF4_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF4_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF4_A ) -> Self { match variant { ISF4_A :: _0 => false , ISF4_A :: _1 => true } } } # [ doc = "Reader of field `ISF4`" ] pub type ISF4_R = crate :: R < bool , ISF4_A > ; impl ISF4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF4_A { match self . bits { false => ISF4_A :: _0 , true => ISF4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF4_A :: _1 } } # [ doc = "Write proxy for field `ISF4`" ] pub struct ISF4_W < 'a > { w : & 'a mut W , } impl < 'a > ISF4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF5_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF5_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF5_A ) -> Self { match variant { ISF5_A :: _0 => false , ISF5_A :: _1 => true } } } # [ doc = "Reader of field `ISF5`" ] pub type ISF5_R = crate :: R < bool , ISF5_A > ; impl ISF5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF5_A { match self . bits { false => ISF5_A :: _0 , true => ISF5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF5_A :: _1 } } # [ doc = "Write proxy for field `ISF5`" ] pub struct ISF5_W < 'a > { w : & 'a mut W , } impl < 'a > ISF5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF6_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF6_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF6_A ) -> Self { match variant { ISF6_A :: _0 => false , ISF6_A :: _1 => true } } } # [ doc = "Reader of field `ISF6`" ] pub type ISF6_R = crate :: R < bool , ISF6_A > ; impl ISF6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF6_A { match self . bits { false => ISF6_A :: _0 , true => ISF6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF6_A :: _1 } } # [ doc = "Write proxy for field `ISF6`" ] pub struct ISF6_W < 'a > { w : & 'a mut W , } impl < 'a > ISF6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF7_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF7_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF7_A ) -> Self { match variant { ISF7_A :: _0 => false , ISF7_A :: _1 => true } } } # [ doc = "Reader of field `ISF7`" ] pub type ISF7_R = crate :: R < bool , ISF7_A > ; impl ISF7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF7_A { match self . bits { false => ISF7_A :: _0 , true => ISF7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF7_A :: _1 } } # [ doc = "Write proxy for field `ISF7`" ] pub struct ISF7_W < 'a > { w : & 'a mut W , } impl < 'a > ISF7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF8_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF8_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF8_A ) -> Self { match variant { ISF8_A :: _0 => false , ISF8_A :: _1 => true } } } # [ doc = "Reader of field `ISF8`" ] pub type ISF8_R = crate :: R < bool , ISF8_A > ; impl ISF8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF8_A { match self . bits { false => ISF8_A :: _0 , true => ISF8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF8_A :: _1 } } # [ doc = "Write proxy for field `ISF8`" ] pub struct ISF8_W < 'a > { w : & 'a mut W , } impl < 'a > ISF8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF9_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF9_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF9_A ) -> Self { match variant { ISF9_A :: _0 => false , ISF9_A :: _1 => true } } } # [ doc = "Reader of field `ISF9`" ] pub type ISF9_R = crate :: R < bool , ISF9_A > ; impl ISF9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF9_A { match self . bits { false => ISF9_A :: _0 , true => ISF9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF9_A :: _1 } } # [ doc = "Write proxy for field `ISF9`" ] pub struct ISF9_W < 'a > { w : & 'a mut W , } impl < 'a > ISF9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF10_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF10_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF10_A ) -> Self { match variant { ISF10_A :: _0 => false , ISF10_A :: _1 => true } } } # [ doc = "Reader of field `ISF10`" ] pub type ISF10_R = crate :: R < bool , ISF10_A > ; impl ISF10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF10_A { match self . bits { false => ISF10_A :: _0 , true => ISF10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF10_A :: _1 } } # [ doc = "Write proxy for field `ISF10`" ] pub struct ISF10_W < 'a > { w : & 'a mut W , } impl < 'a > ISF10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF11_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF11_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF11_A ) -> Self { match variant { ISF11_A :: _0 => false , ISF11_A :: _1 => true } } } # [ doc = "Reader of field `ISF11`" ] pub type ISF11_R = crate :: R < bool , ISF11_A > ; impl ISF11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF11_A { match self . bits { false => ISF11_A :: _0 , true => ISF11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF11_A :: _1 } } # [ doc = "Write proxy for field `ISF11`" ] pub struct ISF11_W < 'a > { w : & 'a mut W , } impl < 'a > ISF11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF12_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF12_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF12_A ) -> Self { match variant { ISF12_A :: _0 => false , ISF12_A :: _1 => true } } } # [ doc = "Reader of field `ISF12`" ] pub type ISF12_R = crate :: R < bool , ISF12_A > ; impl ISF12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF12_A { match self . bits { false => ISF12_A :: _0 , true => ISF12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF12_A :: _1 } } # [ doc = "Write proxy for field `ISF12`" ] pub struct ISF12_W < 'a > { w : & 'a mut W , } impl < 'a > ISF12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF13_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF13_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF13_A ) -> Self { match variant { ISF13_A :: _0 => false , ISF13_A :: _1 => true } } } # [ doc = "Reader of field `ISF13`" ] pub type ISF13_R = crate :: R < bool , ISF13_A > ; impl ISF13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF13_A { match self . bits { false => ISF13_A :: _0 , true => ISF13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF13_A :: _1 } } # [ doc = "Write proxy for field `ISF13`" ] pub struct ISF13_W < 'a > { w : & 'a mut W , } impl < 'a > ISF13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF14_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF14_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF14_A ) -> Self { match variant { ISF14_A :: _0 => false , ISF14_A :: _1 => true } } } # [ doc = "Reader of field `ISF14`" ] pub type ISF14_R = crate :: R < bool , ISF14_A > ; impl ISF14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF14_A { match self . bits { false => ISF14_A :: _0 , true => ISF14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF14_A :: _1 } } # [ doc = "Write proxy for field `ISF14`" ] pub struct ISF14_W < 'a > { w : & 'a mut W , } impl < 'a > ISF14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF15_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF15_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF15_A ) -> Self { match variant { ISF15_A :: _0 => false , ISF15_A :: _1 => true } } } # [ doc = "Reader of field `ISF15`" ] pub type ISF15_R = crate :: R < bool , ISF15_A > ; impl ISF15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF15_A { match self . bits { false => ISF15_A :: _0 , true => ISF15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF15_A :: _1 } } # [ doc = "Write proxy for field `ISF15`" ] pub struct ISF15_W < 'a > { w : & 'a mut W , } impl < 'a > ISF15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF16_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF16_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF16_A ) -> Self { match variant { ISF16_A :: _0 => false , ISF16_A :: _1 => true } } } # [ doc = "Reader of field `ISF16`" ] pub type ISF16_R = crate :: R < bool , ISF16_A > ; impl ISF16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF16_A { match self . bits { false => ISF16_A :: _0 , true => ISF16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF16_A :: _1 } } # [ doc = "Write proxy for field `ISF16`" ] pub struct ISF16_W < 'a > { w : & 'a mut W , } impl < 'a > ISF16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF17_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF17_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF17_A ) -> Self { match variant { ISF17_A :: _0 => false , ISF17_A :: _1 => true } } } # [ doc = "Reader of field `ISF17`" ] pub type ISF17_R = crate :: R < bool , ISF17_A > ; impl ISF17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF17_A { match self . bits { false => ISF17_A :: _0 , true => ISF17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF17_A :: _1 } } # [ doc = "Write proxy for field `ISF17`" ] pub struct ISF17_W < 'a > { w : & 'a mut W , } impl < 'a > ISF17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF18_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF18_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF18_A ) -> Self { match variant { ISF18_A :: _0 => false , ISF18_A :: _1 => true } } } # [ doc = "Reader of field `ISF18`" ] pub type ISF18_R = crate :: R < bool , ISF18_A > ; impl ISF18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF18_A { match self . bits { false => ISF18_A :: _0 , true => ISF18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF18_A :: _1 } } # [ doc = "Write proxy for field `ISF18`" ] pub struct ISF18_W < 'a > { w : & 'a mut W , } impl < 'a > ISF18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF19_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF19_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF19_A ) -> Self { match variant { ISF19_A :: _0 => false , ISF19_A :: _1 => true } } } # [ doc = "Reader of field `ISF19`" ] pub type ISF19_R = crate :: R < bool , ISF19_A > ; impl ISF19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF19_A { match self . bits { false => ISF19_A :: _0 , true => ISF19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF19_A :: _1 } } # [ doc = "Write proxy for field `ISF19`" ] pub struct ISF19_W < 'a > { w : & 'a mut W , } impl < 'a > ISF19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF20_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF20_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF20_A ) -> Self { match variant { ISF20_A :: _0 => false , ISF20_A :: _1 => true } } } # [ doc = "Reader of field `ISF20`" ] pub type ISF20_R = crate :: R < bool , ISF20_A > ; impl ISF20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF20_A { match self . bits { false => ISF20_A :: _0 , true => ISF20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF20_A :: _1 } } # [ doc = "Write proxy for field `ISF20`" ] pub struct ISF20_W < 'a > { w : & 'a mut W , } impl < 'a > ISF20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF21_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF21_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF21_A ) -> Self { match variant { ISF21_A :: _0 => false , ISF21_A :: _1 => true } } } # [ doc = "Reader of field `ISF21`" ] pub type ISF21_R = crate :: R < bool , ISF21_A > ; impl ISF21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF21_A { match self . bits { false => ISF21_A :: _0 , true => ISF21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF21_A :: _1 } } # [ doc = "Write proxy for field `ISF21`" ] pub struct ISF21_W < 'a > { w : & 'a mut W , } impl < 'a > ISF21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF22_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF22_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF22_A ) -> Self { match variant { ISF22_A :: _0 => false , ISF22_A :: _1 => true } } } # [ doc = "Reader of field `ISF22`" ] pub type ISF22_R = crate :: R < bool , ISF22_A > ; impl ISF22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF22_A { match self . bits { false => ISF22_A :: _0 , true => ISF22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF22_A :: _1 } } # [ doc = "Write proxy for field `ISF22`" ] pub struct ISF22_W < 'a > { w : & 'a mut W , } impl < 'a > ISF22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF23_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF23_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF23_A ) -> Self { match variant { ISF23_A :: _0 => false , ISF23_A :: _1 => true } } } # [ doc = "Reader of field `ISF23`" ] pub type ISF23_R = crate :: R < bool , ISF23_A > ; impl ISF23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF23_A { match self . bits { false => ISF23_A :: _0 , true => ISF23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF23_A :: _1 } } # [ doc = "Write proxy for field `ISF23`" ] pub struct ISF23_W < 'a > { w : & 'a mut W , } impl < 'a > ISF23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF24_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF24_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF24_A ) -> Self { match variant { ISF24_A :: _0 => false , ISF24_A :: _1 => true } } } # [ doc = "Reader of field `ISF24`" ] pub type ISF24_R = crate :: R < bool , ISF24_A > ; impl ISF24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF24_A { match self . bits { false => ISF24_A :: _0 , true => ISF24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF24_A :: _1 } } # [ doc = "Write proxy for field `ISF24`" ] pub struct ISF24_W < 'a > { w : & 'a mut W , } impl < 'a > ISF24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF25_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF25_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF25_A ) -> Self { match variant { ISF25_A :: _0 => false , ISF25_A :: _1 => true } } } # [ doc = "Reader of field `ISF25`" ] pub type ISF25_R = crate :: R < bool , ISF25_A > ; impl ISF25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF25_A { match self . bits { false => ISF25_A :: _0 , true => ISF25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF25_A :: _1 } } # [ doc = "Write proxy for field `ISF25`" ] pub struct ISF25_W < 'a > { w : & 'a mut W , } impl < 'a > ISF25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF26_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF26_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF26_A ) -> Self { match variant { ISF26_A :: _0 => false , ISF26_A :: _1 => true } } } # [ doc = "Reader of field `ISF26`" ] pub type ISF26_R = crate :: R < bool , ISF26_A > ; impl ISF26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF26_A { match self . bits { false => ISF26_A :: _0 , true => ISF26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF26_A :: _1 } } # [ doc = "Write proxy for field `ISF26`" ] pub struct ISF26_W < 'a > { w : & 'a mut W , } impl < 'a > ISF26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF27_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF27_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF27_A ) -> Self { match variant { ISF27_A :: _0 => false , ISF27_A :: _1 => true } } } # [ doc = "Reader of field `ISF27`" ] pub type ISF27_R = crate :: R < bool , ISF27_A > ; impl ISF27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF27_A { match self . bits { false => ISF27_A :: _0 , true => ISF27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF27_A :: _1 } } # [ doc = "Write proxy for field `ISF27`" ] pub struct ISF27_W < 'a > { w : & 'a mut W , } impl < 'a > ISF27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF28_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF28_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF28_A ) -> Self { match variant { ISF28_A :: _0 => false , ISF28_A :: _1 => true } } } # [ doc = "Reader of field `ISF28`" ] pub type ISF28_R = crate :: R < bool , ISF28_A > ; impl ISF28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF28_A { match self . bits { false => ISF28_A :: _0 , true => ISF28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF28_A :: _1 } } # [ doc = "Write proxy for field `ISF28`" ] pub struct ISF28_W < 'a > { w : & 'a mut W , } impl < 'a > ISF28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF29_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF29_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF29_A ) -> Self { match variant { ISF29_A :: _0 => false , ISF29_A :: _1 => true } } } # [ doc = "Reader of field `ISF29`" ] pub type ISF29_R = crate :: R < bool , ISF29_A > ; impl ISF29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF29_A { match self . bits { false => ISF29_A :: _0 , true => ISF29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF29_A :: _1 } } # [ doc = "Write proxy for field `ISF29`" ] pub struct ISF29_W < 'a > { w : & 'a mut W , } impl < 'a > ISF29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF30_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF30_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF30_A ) -> Self { match variant { ISF30_A :: _0 => false , ISF30_A :: _1 => true } } } # [ doc = "Reader of field `ISF30`" ] pub type ISF30_R = crate :: R < bool , ISF30_A > ; impl ISF30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF30_A { match self . bits { false => ISF30_A :: _0 , true => ISF30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF30_A :: _1 } } # [ doc = "Write proxy for field `ISF30`" ] pub struct ISF30_W < 'a > { w : & 'a mut W , } impl < 'a > ISF30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF31_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF31_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF31_A ) -> Self { match variant { ISF31_A :: _0 => false , ISF31_A :: _1 => true } } } # [ doc = "Reader of field `ISF31`" ] pub type ISF31_R = crate :: R < bool , ISF31_A > ; impl ISF31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF31_A { match self . bits { false => ISF31_A :: _0 , true => ISF31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF31_A :: _1 } } # [ doc = "Write proxy for field `ISF31`" ] pub struct ISF31_W < 'a > { w : & 'a mut W , } impl < 'a > ISF31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & self ) -> ISF0_R { ISF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & self ) -> ISF1_R { ISF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & self ) -> ISF2_R { ISF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & self ) -> ISF3_R { ISF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & self ) -> ISF4_R { ISF4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & self ) -> ISF5_R { ISF5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & self ) -> ISF6_R { ISF6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & self ) -> ISF7_R { ISF7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & self ) -> ISF8_R { ISF8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & self ) -> ISF9_R { ISF9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & self ) -> ISF10_R { ISF10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & self ) -> ISF11_R { ISF11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & self ) -> ISF12_R { ISF12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & self ) -> ISF13_R { ISF13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & self ) -> ISF14_R { ISF14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & self ) -> ISF15_R { ISF15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & self ) -> ISF16_R { ISF16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & self ) -> ISF17_R { ISF17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & self ) -> ISF18_R { ISF18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & self ) -> ISF19_R { ISF19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & self ) -> ISF20_R { ISF20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & self ) -> ISF21_R { ISF21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & self ) -> ISF22_R { ISF22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & self ) -> ISF23_R { ISF23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & self ) -> ISF24_R { ISF24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & self ) -> ISF25_R { ISF25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & self ) -> ISF26_R { ISF26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & self ) -> ISF27_R { ISF27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & self ) -> ISF28_R { ISF28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & self ) -> ISF29_R { ISF29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & self ) -> ISF30_R { ISF30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & self ) -> ISF31_R { ISF31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & mut self ) -> ISF0_W { ISF0_W { w : self } } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & mut self ) -> ISF1_W { ISF1_W { w : self } } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & mut self ) -> ISF2_W { ISF2_W { w : self } } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & mut self ) -> ISF3_W { ISF3_W { w : self } } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & mut self ) -> ISF4_W { ISF4_W { w : self } } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & mut self ) -> ISF5_W { ISF5_W { w : self } } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & mut self ) -> ISF6_W { ISF6_W { w : self } } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & mut self ) -> ISF7_W { ISF7_W { w : self } } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & mut self ) -> ISF8_W { ISF8_W { w : self } } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & mut self ) -> ISF9_W { ISF9_W { w : self } } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & mut self ) -> ISF10_W { ISF10_W { w : self } } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & mut self ) -> ISF11_W { ISF11_W { w : self } } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & mut self ) -> ISF12_W { ISF12_W { w : self } } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & mut self ) -> ISF13_W { ISF13_W { w : self } } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & mut self ) -> ISF14_W { ISF14_W { w : self } } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & mut self ) -> ISF15_W { ISF15_W { w : self } } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & mut self ) -> ISF16_W { ISF16_W { w : self } } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & mut self ) -> ISF17_W { ISF17_W { w : self } } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & mut self ) -> ISF18_W { ISF18_W { w : self } } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & mut self ) -> ISF19_W { ISF19_W { w : self } } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & mut self ) -> ISF20_W { ISF20_W { w : self } } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & mut self ) -> ISF21_W { ISF21_W { w : self } } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & mut self ) -> ISF22_W { ISF22_W { w : self } } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & mut self ) -> ISF23_W { ISF23_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & mut self ) -> ISF24_W { ISF24_W { w : self } } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & mut self ) -> ISF25_W { ISF25_W { w : self } } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & mut self ) -> ISF26_W { ISF26_W { w : self } } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & mut self ) -> ISF27_W { ISF27_W { w : self } } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & mut self ) -> ISF28_W { ISF28_W { w : self } } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & mut self ) -> ISF29_W { ISF29_W { w : self } } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & mut self ) -> ISF30_W { ISF30_W { w : self } } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & mut self ) -> ISF31_W { ISF31_W { w : self } } } } } # [ doc = "Pin Control and Interrupts" ] pub struct PORTD { _marker : PhantomData < * const ( ) > } unsafe impl Send for PORTD { } impl PORTD { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const portd :: RegisterBlock { 0x4004_c000 as * const _ } } impl Deref for PORTD { type Target = portd :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * PORTD :: ptr ( ) } } } # [ doc = "Pin Control and Interrupts" ] pub mod portd { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Pin Control Register n" ] pub pcr0 : PCR0 , # [ doc = "0x04 - Pin Control Register n" ] pub pcr1 : PCR1 , # [ doc = "0x08 - Pin Control Register n" ] pub pcr2 : PCR2 , # [ doc = "0x0c - Pin Control Register n" ] pub pcr3 : PCR3 , # [ doc = "0x10 - Pin Control Register n" ] pub pcr4 : PCR4 , # [ doc = "0x14 - Pin Control Register n" ] pub pcr5 : PCR5 , # [ doc = "0x18 - Pin Control Register n" ] pub pcr6 : PCR6 , # [ doc = "0x1c - Pin Control Register n" ] pub pcr7 : PCR7 , # [ doc = "0x20 - Pin Control Register n" ] pub pcr8 : PCR8 , # [ doc = "0x24 - Pin Control Register n" ] pub pcr9 : PCR9 , # [ doc = "0x28 - Pin Control Register n" ] pub pcr10 : PCR10 , # [ doc = "0x2c - Pin Control Register n" ] pub pcr11 : PCR11 , # [ doc = "0x30 - Pin Control Register n" ] pub pcr12 : PCR12 , # [ doc = "0x34 - Pin Control Register n" ] pub pcr13 : PCR13 , # [ doc = "0x38 - Pin Control Register n" ] pub pcr14 : PCR14 , # [ doc = "0x3c - Pin Control Register n" ] pub pcr15 : PCR15 , # [ doc = "0x40 - Pin Control Register n" ] pub pcr16 : PCR16 , # [ doc = "0x44 - Pin Control Register n" ] pub pcr17 : PCR17 , # [ doc = "0x48 - Pin Control Register n" ] pub pcr18 : PCR18 , # [ doc = "0x4c - Pin Control Register n" ] pub pcr19 : PCR19 , # [ doc = "0x50 - Pin Control Register n" ] pub pcr20 : PCR20 , # [ doc = "0x54 - Pin Control Register n" ] pub pcr21 : PCR21 , # [ doc = "0x58 - Pin Control Register n" ] pub pcr22 : PCR22 , # [ doc = "0x5c - Pin Control Register n" ] pub pcr23 : PCR23 , # [ doc = "0x60 - Pin Control Register n" ] pub pcr24 : PCR24 , # [ doc = "0x64 - Pin Control Register n" ] pub pcr25 : PCR25 , # [ doc = "0x68 - Pin Control Register n" ] pub pcr26 : PCR26 , # [ doc = "0x6c - Pin Control Register n" ] pub pcr27 : PCR27 , # [ doc = "0x70 - Pin Control Register n" ] pub pcr28 : PCR28 , # [ doc = "0x74 - Pin Control Register n" ] pub pcr29 : PCR29 , # [ doc = "0x78 - Pin Control Register n" ] pub pcr30 : PCR30 , # [ doc = "0x7c - Pin Control Register n" ] pub pcr31 : PCR31 , # [ doc = "0x80 - Global Pin Control Low Register" ] pub gpclr : GPCLR , # [ doc = "0x84 - Global Pin Control High Register" ] pub gpchr : GPCHR , _reserved34 : [ u8 ; 24usize ] , # [ doc = "0xa0 - Interrupt Status Flag Register" ] pub isfr : ISFR , _reserved35 : [ u8 ; 28usize ] , # [ doc = "0xc0 - Digital Filter Enable Register" ] pub dfer : DFER , # [ doc = "0xc4 - Digital Filter Clock Register" ] pub dfcr : DFCR , # [ doc = "0xc8 - Digital Filter Width Register" ] pub dfwr : DFWR , } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr0](pcr0) module" ] pub type PCR0 = crate :: Reg < u32 , _PCR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR0 ; # [ doc = "`read()` method returns [pcr0::R](pcr0::R) reader structure" ] impl crate :: Readable for PCR0 { } # [ doc = "`write(|w| ..)` method takes [pcr0::W](pcr0::W) writer structure" ] impl crate :: Writable for PCR0 { } # [ doc = "Pin Control Register n" ] pub mod pcr0 { # [ doc = "Reader of register PCR0" ] pub type R = crate :: R < u32 , super :: PCR0 > ; # [ doc = "Writer for register PCR0" ] pub type W = crate :: W < u32 , super :: PCR0 > ; # [ doc = "Register PCR0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr1](pcr1) module" ] pub type PCR1 = crate :: Reg < u32 , _PCR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR1 ; # [ doc = "`read()` method returns [pcr1::R](pcr1::R) reader structure" ] impl crate :: Readable for PCR1 { } # [ doc = "`write(|w| ..)` method takes [pcr1::W](pcr1::W) writer structure" ] impl crate :: Writable for PCR1 { } # [ doc = "Pin Control Register n" ] pub mod pcr1 { # [ doc = "Reader of register PCR1" ] pub type R = crate :: R < u32 , super :: PCR1 > ; # [ doc = "Writer for register PCR1" ] pub type W = crate :: W < u32 , super :: PCR1 > ; # [ doc = "Register PCR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr2](pcr2) module" ] pub type PCR2 = crate :: Reg < u32 , _PCR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR2 ; # [ doc = "`read()` method returns [pcr2::R](pcr2::R) reader structure" ] impl crate :: Readable for PCR2 { } # [ doc = "`write(|w| ..)` method takes [pcr2::W](pcr2::W) writer structure" ] impl crate :: Writable for PCR2 { } # [ doc = "Pin Control Register n" ] pub mod pcr2 { # [ doc = "Reader of register PCR2" ] pub type R = crate :: R < u32 , super :: PCR2 > ; # [ doc = "Writer for register PCR2" ] pub type W = crate :: W < u32 , super :: PCR2 > ; # [ doc = "Register PCR2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr3](pcr3) module" ] pub type PCR3 = crate :: Reg < u32 , _PCR3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR3 ; # [ doc = "`read()` method returns [pcr3::R](pcr3::R) reader structure" ] impl crate :: Readable for PCR3 { } # [ doc = "`write(|w| ..)` method takes [pcr3::W](pcr3::W) writer structure" ] impl crate :: Writable for PCR3 { } # [ doc = "Pin Control Register n" ] pub mod pcr3 { # [ doc = "Reader of register PCR3" ] pub type R = crate :: R < u32 , super :: PCR3 > ; # [ doc = "Writer for register PCR3" ] pub type W = crate :: W < u32 , super :: PCR3 > ; # [ doc = "Register PCR3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr4](pcr4) module" ] pub type PCR4 = crate :: Reg < u32 , _PCR4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR4 ; # [ doc = "`read()` method returns [pcr4::R](pcr4::R) reader structure" ] impl crate :: Readable for PCR4 { } # [ doc = "`write(|w| ..)` method takes [pcr4::W](pcr4::W) writer structure" ] impl crate :: Writable for PCR4 { } # [ doc = "Pin Control Register n" ] pub mod pcr4 { # [ doc = "Reader of register PCR4" ] pub type R = crate :: R < u32 , super :: PCR4 > ; # [ doc = "Writer for register PCR4" ] pub type W = crate :: W < u32 , super :: PCR4 > ; # [ doc = "Register PCR4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Write proxy for field `DSE`" ] pub struct DSE_W < 'a > { w : & 'a mut W , } impl < 'a > DSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _0 ) } # [ doc = "High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _1 ) } # [ 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 = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & mut self ) -> DSE_W { DSE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr5](pcr5) module" ] pub type PCR5 = crate :: Reg < u32 , _PCR5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR5 ; # [ doc = "`read()` method returns [pcr5::R](pcr5::R) reader structure" ] impl crate :: Readable for PCR5 { } # [ doc = "`write(|w| ..)` method takes [pcr5::W](pcr5::W) writer structure" ] impl crate :: Writable for PCR5 { } # [ doc = "Pin Control Register n" ] pub mod pcr5 { # [ doc = "Reader of register PCR5" ] pub type R = crate :: R < u32 , super :: PCR5 > ; # [ doc = "Writer for register PCR5" ] pub type W = crate :: W < u32 , super :: PCR5 > ; # [ doc = "Register PCR5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Write proxy for field `DSE`" ] pub struct DSE_W < 'a > { w : & 'a mut W , } impl < 'a > DSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _0 ) } # [ doc = "High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _1 ) } # [ 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 = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & mut self ) -> DSE_W { DSE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr6](pcr6) module" ] pub type PCR6 = crate :: Reg < u32 , _PCR6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR6 ; # [ doc = "`read()` method returns [pcr6::R](pcr6::R) reader structure" ] impl crate :: Readable for PCR6 { } # [ doc = "`write(|w| ..)` method takes [pcr6::W](pcr6::W) writer structure" ] impl crate :: Writable for PCR6 { } # [ doc = "Pin Control Register n" ] pub mod pcr6 { # [ doc = "Reader of register PCR6" ] pub type R = crate :: R < u32 , super :: PCR6 > ; # [ doc = "Writer for register PCR6" ] pub type W = crate :: W < u32 , super :: PCR6 > ; # [ doc = "Register PCR6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Write proxy for field `DSE`" ] pub struct DSE_W < 'a > { w : & 'a mut W , } impl < 'a > DSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _0 ) } # [ doc = "High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _1 ) } # [ 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 = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & mut self ) -> DSE_W { DSE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr7](pcr7) module" ] pub type PCR7 = crate :: Reg < u32 , _PCR7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR7 ; # [ doc = "`read()` method returns [pcr7::R](pcr7::R) reader structure" ] impl crate :: Readable for PCR7 { } # [ doc = "`write(|w| ..)` method takes [pcr7::W](pcr7::W) writer structure" ] impl crate :: Writable for PCR7 { } # [ doc = "Pin Control Register n" ] pub mod pcr7 { # [ doc = "Reader of register PCR7" ] pub type R = crate :: R < u32 , super :: PCR7 > ; # [ doc = "Writer for register PCR7" ] pub type W = crate :: W < u32 , super :: PCR7 > ; # [ doc = "Register PCR7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Write proxy for field `DSE`" ] pub struct DSE_W < 'a > { w : & 'a mut W , } impl < 'a > DSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _0 ) } # [ doc = "High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DSE_A :: _1 ) } # [ 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 = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & mut self ) -> DSE_W { DSE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr8](pcr8) module" ] pub type PCR8 = crate :: Reg < u32 , _PCR8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR8 ; # [ doc = "`read()` method returns [pcr8::R](pcr8::R) reader structure" ] impl crate :: Readable for PCR8 { } # [ doc = "`write(|w| ..)` method takes [pcr8::W](pcr8::W) writer structure" ] impl crate :: Writable for PCR8 { } # [ doc = "Pin Control Register n" ] pub mod pcr8 { # [ doc = "Reader of register PCR8" ] pub type R = crate :: R < u32 , super :: PCR8 > ; # [ doc = "Writer for register PCR8" ] pub type W = crate :: W < u32 , super :: PCR8 > ; # [ doc = "Register PCR8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr9](pcr9) module" ] pub type PCR9 = crate :: Reg < u32 , _PCR9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR9 ; # [ doc = "`read()` method returns [pcr9::R](pcr9::R) reader structure" ] impl crate :: Readable for PCR9 { } # [ doc = "`write(|w| ..)` method takes [pcr9::W](pcr9::W) writer structure" ] impl crate :: Writable for PCR9 { } # [ doc = "Pin Control Register n" ] pub mod pcr9 { # [ doc = "Reader of register PCR9" ] pub type R = crate :: R < u32 , super :: PCR9 > ; # [ doc = "Writer for register PCR9" ] pub type W = crate :: W < u32 , super :: PCR9 > ; # [ doc = "Register PCR9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr10](pcr10) module" ] pub type PCR10 = crate :: Reg < u32 , _PCR10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR10 ; # [ doc = "`read()` method returns [pcr10::R](pcr10::R) reader structure" ] impl crate :: Readable for PCR10 { } # [ doc = "`write(|w| ..)` method takes [pcr10::W](pcr10::W) writer structure" ] impl crate :: Writable for PCR10 { } # [ doc = "Pin Control Register n" ] pub mod pcr10 { # [ doc = "Reader of register PCR10" ] pub type R = crate :: R < u32 , super :: PCR10 > ; # [ doc = "Writer for register PCR10" ] pub type W = crate :: W < u32 , super :: PCR10 > ; # [ doc = "Register PCR10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr11](pcr11) module" ] pub type PCR11 = crate :: Reg < u32 , _PCR11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR11 ; # [ doc = "`read()` method returns [pcr11::R](pcr11::R) reader structure" ] impl crate :: Readable for PCR11 { } # [ doc = "`write(|w| ..)` method takes [pcr11::W](pcr11::W) writer structure" ] impl crate :: Writable for PCR11 { } # [ doc = "Pin Control Register n" ] pub mod pcr11 { # [ doc = "Reader of register PCR11" ] pub type R = crate :: R < u32 , super :: PCR11 > ; # [ doc = "Writer for register PCR11" ] pub type W = crate :: W < u32 , super :: PCR11 > ; # [ doc = "Register PCR11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr12](pcr12) module" ] pub type PCR12 = crate :: Reg < u32 , _PCR12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR12 ; # [ doc = "`read()` method returns [pcr12::R](pcr12::R) reader structure" ] impl crate :: Readable for PCR12 { } # [ doc = "`write(|w| ..)` method takes [pcr12::W](pcr12::W) writer structure" ] impl crate :: Writable for PCR12 { } # [ doc = "Pin Control Register n" ] pub mod pcr12 { # [ doc = "Reader of register PCR12" ] pub type R = crate :: R < u32 , super :: PCR12 > ; # [ doc = "Writer for register PCR12" ] pub type W = crate :: W < u32 , super :: PCR12 > ; # [ doc = "Register PCR12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr13](pcr13) module" ] pub type PCR13 = crate :: Reg < u32 , _PCR13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR13 ; # [ doc = "`read()` method returns [pcr13::R](pcr13::R) reader structure" ] impl crate :: Readable for PCR13 { } # [ doc = "`write(|w| ..)` method takes [pcr13::W](pcr13::W) writer structure" ] impl crate :: Writable for PCR13 { } # [ doc = "Pin Control Register n" ] pub mod pcr13 { # [ doc = "Reader of register PCR13" ] pub type R = crate :: R < u32 , super :: PCR13 > ; # [ doc = "Writer for register PCR13" ] pub type W = crate :: W < u32 , super :: PCR13 > ; # [ doc = "Register PCR13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr14](pcr14) module" ] pub type PCR14 = crate :: Reg < u32 , _PCR14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR14 ; # [ doc = "`read()` method returns [pcr14::R](pcr14::R) reader structure" ] impl crate :: Readable for PCR14 { } # [ doc = "`write(|w| ..)` method takes [pcr14::W](pcr14::W) writer structure" ] impl crate :: Writable for PCR14 { } # [ doc = "Pin Control Register n" ] pub mod pcr14 { # [ doc = "Reader of register PCR14" ] pub type R = crate :: R < u32 , super :: PCR14 > ; # [ doc = "Writer for register PCR14" ] pub type W = crate :: W < u32 , super :: PCR14 > ; # [ doc = "Register PCR14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr15](pcr15) module" ] pub type PCR15 = crate :: Reg < u32 , _PCR15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR15 ; # [ doc = "`read()` method returns [pcr15::R](pcr15::R) reader structure" ] impl crate :: Readable for PCR15 { } # [ doc = "`write(|w| ..)` method takes [pcr15::W](pcr15::W) writer structure" ] impl crate :: Writable for PCR15 { } # [ doc = "Pin Control Register n" ] pub mod pcr15 { # [ doc = "Reader of register PCR15" ] pub type R = crate :: R < u32 , super :: PCR15 > ; # [ doc = "Writer for register PCR15" ] pub type W = crate :: W < u32 , super :: PCR15 > ; # [ doc = "Register PCR15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr16](pcr16) module" ] pub type PCR16 = crate :: Reg < u32 , _PCR16 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR16 ; # [ doc = "`read()` method returns [pcr16::R](pcr16::R) reader structure" ] impl crate :: Readable for PCR16 { } # [ doc = "`write(|w| ..)` method takes [pcr16::W](pcr16::W) writer structure" ] impl crate :: Writable for PCR16 { } # [ doc = "Pin Control Register n" ] pub mod pcr16 { # [ doc = "Reader of register PCR16" ] pub type R = crate :: R < u32 , super :: PCR16 > ; # [ doc = "Writer for register PCR16" ] pub type W = crate :: W < u32 , super :: PCR16 > ; # [ doc = "Register PCR16 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR16 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr17](pcr17) module" ] pub type PCR17 = crate :: Reg < u32 , _PCR17 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR17 ; # [ doc = "`read()` method returns [pcr17::R](pcr17::R) reader structure" ] impl crate :: Readable for PCR17 { } # [ doc = "`write(|w| ..)` method takes [pcr17::W](pcr17::W) writer structure" ] impl crate :: Writable for PCR17 { } # [ doc = "Pin Control Register n" ] pub mod pcr17 { # [ doc = "Reader of register PCR17" ] pub type R = crate :: R < u32 , super :: PCR17 > ; # [ doc = "Writer for register PCR17" ] pub type W = crate :: W < u32 , super :: PCR17 > ; # [ doc = "Register PCR17 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR17 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr18](pcr18) module" ] pub type PCR18 = crate :: Reg < u32 , _PCR18 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR18 ; # [ doc = "`read()` method returns [pcr18::R](pcr18::R) reader structure" ] impl crate :: Readable for PCR18 { } # [ doc = "`write(|w| ..)` method takes [pcr18::W](pcr18::W) writer structure" ] impl crate :: Writable for PCR18 { } # [ doc = "Pin Control Register n" ] pub mod pcr18 { # [ doc = "Reader of register PCR18" ] pub type R = crate :: R < u32 , super :: PCR18 > ; # [ doc = "Writer for register PCR18" ] pub type W = crate :: W < u32 , super :: PCR18 > ; # [ doc = "Register PCR18 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR18 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr19](pcr19) module" ] pub type PCR19 = crate :: Reg < u32 , _PCR19 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR19 ; # [ doc = "`read()` method returns [pcr19::R](pcr19::R) reader structure" ] impl crate :: Readable for PCR19 { } # [ doc = "`write(|w| ..)` method takes [pcr19::W](pcr19::W) writer structure" ] impl crate :: Writable for PCR19 { } # [ doc = "Pin Control Register n" ] pub mod pcr19 { # [ doc = "Reader of register PCR19" ] pub type R = crate :: R < u32 , super :: PCR19 > ; # [ doc = "Writer for register PCR19" ] pub type W = crate :: W < u32 , super :: PCR19 > ; # [ doc = "Register PCR19 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR19 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr20](pcr20) module" ] pub type PCR20 = crate :: Reg < u32 , _PCR20 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR20 ; # [ doc = "`read()` method returns [pcr20::R](pcr20::R) reader structure" ] impl crate :: Readable for PCR20 { } # [ doc = "`write(|w| ..)` method takes [pcr20::W](pcr20::W) writer structure" ] impl crate :: Writable for PCR20 { } # [ doc = "Pin Control Register n" ] pub mod pcr20 { # [ doc = "Reader of register PCR20" ] pub type R = crate :: R < u32 , super :: PCR20 > ; # [ doc = "Writer for register PCR20" ] pub type W = crate :: W < u32 , super :: PCR20 > ; # [ doc = "Register PCR20 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR20 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr21](pcr21) module" ] pub type PCR21 = crate :: Reg < u32 , _PCR21 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR21 ; # [ doc = "`read()` method returns [pcr21::R](pcr21::R) reader structure" ] impl crate :: Readable for PCR21 { } # [ doc = "`write(|w| ..)` method takes [pcr21::W](pcr21::W) writer structure" ] impl crate :: Writable for PCR21 { } # [ doc = "Pin Control Register n" ] pub mod pcr21 { # [ doc = "Reader of register PCR21" ] pub type R = crate :: R < u32 , super :: PCR21 > ; # [ doc = "Writer for register PCR21" ] pub type W = crate :: W < u32 , super :: PCR21 > ; # [ doc = "Register PCR21 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR21 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr22](pcr22) module" ] pub type PCR22 = crate :: Reg < u32 , _PCR22 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR22 ; # [ doc = "`read()` method returns [pcr22::R](pcr22::R) reader structure" ] impl crate :: Readable for PCR22 { } # [ doc = "`write(|w| ..)` method takes [pcr22::W](pcr22::W) writer structure" ] impl crate :: Writable for PCR22 { } # [ doc = "Pin Control Register n" ] pub mod pcr22 { # [ doc = "Reader of register PCR22" ] pub type R = crate :: R < u32 , super :: PCR22 > ; # [ doc = "Writer for register PCR22" ] pub type W = crate :: W < u32 , super :: PCR22 > ; # [ doc = "Register PCR22 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR22 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr23](pcr23) module" ] pub type PCR23 = crate :: Reg < u32 , _PCR23 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR23 ; # [ doc = "`read()` method returns [pcr23::R](pcr23::R) reader structure" ] impl crate :: Readable for PCR23 { } # [ doc = "`write(|w| ..)` method takes [pcr23::W](pcr23::W) writer structure" ] impl crate :: Writable for PCR23 { } # [ doc = "Pin Control Register n" ] pub mod pcr23 { # [ doc = "Reader of register PCR23" ] pub type R = crate :: R < u32 , super :: PCR23 > ; # [ doc = "Writer for register PCR23" ] pub type W = crate :: W < u32 , super :: PCR23 > ; # [ doc = "Register PCR23 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR23 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr24](pcr24) module" ] pub type PCR24 = crate :: Reg < u32 , _PCR24 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR24 ; # [ doc = "`read()` method returns [pcr24::R](pcr24::R) reader structure" ] impl crate :: Readable for PCR24 { } # [ doc = "`write(|w| ..)` method takes [pcr24::W](pcr24::W) writer structure" ] impl crate :: Writable for PCR24 { } # [ doc = "Pin Control Register n" ] pub mod pcr24 { # [ doc = "Reader of register PCR24" ] pub type R = crate :: R < u32 , super :: PCR24 > ; # [ doc = "Writer for register PCR24" ] pub type W = crate :: W < u32 , super :: PCR24 > ; # [ doc = "Register PCR24 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR24 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr25](pcr25) module" ] pub type PCR25 = crate :: Reg < u32 , _PCR25 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR25 ; # [ doc = "`read()` method returns [pcr25::R](pcr25::R) reader structure" ] impl crate :: Readable for PCR25 { } # [ doc = "`write(|w| ..)` method takes [pcr25::W](pcr25::W) writer structure" ] impl crate :: Writable for PCR25 { } # [ doc = "Pin Control Register n" ] pub mod pcr25 { # [ doc = "Reader of register PCR25" ] pub type R = crate :: R < u32 , super :: PCR25 > ; # [ doc = "Writer for register PCR25" ] pub type W = crate :: W < u32 , super :: PCR25 > ; # [ doc = "Register PCR25 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR25 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr26](pcr26) module" ] pub type PCR26 = crate :: Reg < u32 , _PCR26 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR26 ; # [ doc = "`read()` method returns [pcr26::R](pcr26::R) reader structure" ] impl crate :: Readable for PCR26 { } # [ doc = "`write(|w| ..)` method takes [pcr26::W](pcr26::W) writer structure" ] impl crate :: Writable for PCR26 { } # [ doc = "Pin Control Register n" ] pub mod pcr26 { # [ doc = "Reader of register PCR26" ] pub type R = crate :: R < u32 , super :: PCR26 > ; # [ doc = "Writer for register PCR26" ] pub type W = crate :: W < u32 , super :: PCR26 > ; # [ doc = "Register PCR26 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR26 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr27](pcr27) module" ] pub type PCR27 = crate :: Reg < u32 , _PCR27 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR27 ; # [ doc = "`read()` method returns [pcr27::R](pcr27::R) reader structure" ] impl crate :: Readable for PCR27 { } # [ doc = "`write(|w| ..)` method takes [pcr27::W](pcr27::W) writer structure" ] impl crate :: Writable for PCR27 { } # [ doc = "Pin Control Register n" ] pub mod pcr27 { # [ doc = "Reader of register PCR27" ] pub type R = crate :: R < u32 , super :: PCR27 > ; # [ doc = "Writer for register PCR27" ] pub type W = crate :: W < u32 , super :: PCR27 > ; # [ doc = "Register PCR27 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR27 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr28](pcr28) module" ] pub type PCR28 = crate :: Reg < u32 , _PCR28 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR28 ; # [ doc = "`read()` method returns [pcr28::R](pcr28::R) reader structure" ] impl crate :: Readable for PCR28 { } # [ doc = "`write(|w| ..)` method takes [pcr28::W](pcr28::W) writer structure" ] impl crate :: Writable for PCR28 { } # [ doc = "Pin Control Register n" ] pub mod pcr28 { # [ doc = "Reader of register PCR28" ] pub type R = crate :: R < u32 , super :: PCR28 > ; # [ doc = "Writer for register PCR28" ] pub type W = crate :: W < u32 , super :: PCR28 > ; # [ doc = "Register PCR28 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR28 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr29](pcr29) module" ] pub type PCR29 = crate :: Reg < u32 , _PCR29 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR29 ; # [ doc = "`read()` method returns [pcr29::R](pcr29::R) reader structure" ] impl crate :: Readable for PCR29 { } # [ doc = "`write(|w| ..)` method takes [pcr29::W](pcr29::W) writer structure" ] impl crate :: Writable for PCR29 { } # [ doc = "Pin Control Register n" ] pub mod pcr29 { # [ doc = "Reader of register PCR29" ] pub type R = crate :: R < u32 , super :: PCR29 > ; # [ doc = "Writer for register PCR29" ] pub type W = crate :: W < u32 , super :: PCR29 > ; # [ doc = "Register PCR29 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR29 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr30](pcr30) module" ] pub type PCR30 = crate :: Reg < u32 , _PCR30 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR30 ; # [ doc = "`read()` method returns [pcr30::R](pcr30::R) reader structure" ] impl crate :: Readable for PCR30 { } # [ doc = "`write(|w| ..)` method takes [pcr30::W](pcr30::W) writer structure" ] impl crate :: Writable for PCR30 { } # [ doc = "Pin Control Register n" ] pub mod pcr30 { # [ doc = "Reader of register PCR30" ] pub type R = crate :: R < u32 , super :: PCR30 > ; # [ doc = "Writer for register PCR30" ] pub type W = crate :: W < u32 , super :: PCR30 > ; # [ doc = "Register PCR30 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR30 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr31](pcr31) module" ] pub type PCR31 = crate :: Reg < u32 , _PCR31 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR31 ; # [ doc = "`read()` method returns [pcr31::R](pcr31::R) reader structure" ] impl crate :: Readable for PCR31 { } # [ doc = "`write(|w| ..)` method takes [pcr31::W](pcr31::W) writer structure" ] impl crate :: Writable for PCR31 { } # [ doc = "Pin Control Register n" ] pub mod pcr31 { # [ doc = "Reader of register PCR31" ] pub type R = crate :: R < u32 , super :: PCR31 > ; # [ doc = "Writer for register PCR31" ] pub type W = crate :: W < u32 , super :: PCR31 > ; # [ doc = "Register PCR31 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR31 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Global Pin Control Low Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpclr](gpclr) module" ] pub type GPCLR = crate :: Reg < u32 , _GPCLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCLR ; # [ doc = "`write(|w| ..)` method takes [gpclr::W](gpclr::W) writer structure" ] impl crate :: Writable for GPCLR { } # [ doc = "Global Pin Control Low Register" ] pub mod gpclr { # [ doc = "Writer for register GPCLR" ] pub type W = crate :: W < u32 , super :: GPCLR > ; # [ doc = "Register GPCLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Global Pin Control High Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpchr](gpchr) module" ] pub type GPCHR = crate :: Reg < u32 , _GPCHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCHR ; # [ doc = "`write(|w| ..)` method takes [gpchr::W](gpchr::W) writer structure" ] impl crate :: Writable for GPCHR { } # [ doc = "Global Pin Control High Register" ] pub mod gpchr { # [ doc = "Writer for register GPCHR" ] pub type W = crate :: W < u32 , super :: GPCHR > ; # [ doc = "Register GPCHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Interrupt Status Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [isfr](isfr) module" ] pub type ISFR = crate :: Reg < u32 , _ISFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ISFR ; # [ doc = "`read()` method returns [isfr::R](isfr::R) reader structure" ] impl crate :: Readable for ISFR { } # [ doc = "`write(|w| ..)` method takes [isfr::W](isfr::W) writer structure" ] impl crate :: Writable for ISFR { } # [ doc = "Interrupt Status Flag Register" ] pub mod isfr { # [ doc = "Reader of register ISFR" ] pub type R = crate :: R < u32 , super :: ISFR > ; # [ doc = "Writer for register ISFR" ] pub type W = crate :: W < u32 , super :: ISFR > ; # [ doc = "Register ISFR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ISFR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF0_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF0_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF0_A ) -> Self { match variant { ISF0_A :: _0 => false , ISF0_A :: _1 => true } } } # [ doc = "Reader of field `ISF0`" ] pub type ISF0_R = crate :: R < bool , ISF0_A > ; impl ISF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF0_A { match self . bits { false => ISF0_A :: _0 , true => ISF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF0_A :: _1 } } # [ doc = "Write proxy for field `ISF0`" ] pub struct ISF0_W < 'a > { w : & 'a mut W , } impl < 'a > ISF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF1_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF1_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF1_A ) -> Self { match variant { ISF1_A :: _0 => false , ISF1_A :: _1 => true } } } # [ doc = "Reader of field `ISF1`" ] pub type ISF1_R = crate :: R < bool , ISF1_A > ; impl ISF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF1_A { match self . bits { false => ISF1_A :: _0 , true => ISF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF1_A :: _1 } } # [ doc = "Write proxy for field `ISF1`" ] pub struct ISF1_W < 'a > { w : & 'a mut W , } impl < 'a > ISF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _1 ) } # [ 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 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF2_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF2_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF2_A ) -> Self { match variant { ISF2_A :: _0 => false , ISF2_A :: _1 => true } } } # [ doc = "Reader of field `ISF2`" ] pub type ISF2_R = crate :: R < bool , ISF2_A > ; impl ISF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF2_A { match self . bits { false => ISF2_A :: _0 , true => ISF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF2_A :: _1 } } # [ doc = "Write proxy for field `ISF2`" ] pub struct ISF2_W < 'a > { w : & 'a mut W , } impl < 'a > ISF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF3_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF3_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF3_A ) -> Self { match variant { ISF3_A :: _0 => false , ISF3_A :: _1 => true } } } # [ doc = "Reader of field `ISF3`" ] pub type ISF3_R = crate :: R < bool , ISF3_A > ; impl ISF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF3_A { match self . bits { false => ISF3_A :: _0 , true => ISF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF3_A :: _1 } } # [ doc = "Write proxy for field `ISF3`" ] pub struct ISF3_W < 'a > { w : & 'a mut W , } impl < 'a > ISF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF4_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF4_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF4_A ) -> Self { match variant { ISF4_A :: _0 => false , ISF4_A :: _1 => true } } } # [ doc = "Reader of field `ISF4`" ] pub type ISF4_R = crate :: R < bool , ISF4_A > ; impl ISF4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF4_A { match self . bits { false => ISF4_A :: _0 , true => ISF4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF4_A :: _1 } } # [ doc = "Write proxy for field `ISF4`" ] pub struct ISF4_W < 'a > { w : & 'a mut W , } impl < 'a > ISF4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF5_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF5_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF5_A ) -> Self { match variant { ISF5_A :: _0 => false , ISF5_A :: _1 => true } } } # [ doc = "Reader of field `ISF5`" ] pub type ISF5_R = crate :: R < bool , ISF5_A > ; impl ISF5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF5_A { match self . bits { false => ISF5_A :: _0 , true => ISF5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF5_A :: _1 } } # [ doc = "Write proxy for field `ISF5`" ] pub struct ISF5_W < 'a > { w : & 'a mut W , } impl < 'a > ISF5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF6_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF6_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF6_A ) -> Self { match variant { ISF6_A :: _0 => false , ISF6_A :: _1 => true } } } # [ doc = "Reader of field `ISF6`" ] pub type ISF6_R = crate :: R < bool , ISF6_A > ; impl ISF6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF6_A { match self . bits { false => ISF6_A :: _0 , true => ISF6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF6_A :: _1 } } # [ doc = "Write proxy for field `ISF6`" ] pub struct ISF6_W < 'a > { w : & 'a mut W , } impl < 'a > ISF6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF7_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF7_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF7_A ) -> Self { match variant { ISF7_A :: _0 => false , ISF7_A :: _1 => true } } } # [ doc = "Reader of field `ISF7`" ] pub type ISF7_R = crate :: R < bool , ISF7_A > ; impl ISF7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF7_A { match self . bits { false => ISF7_A :: _0 , true => ISF7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF7_A :: _1 } } # [ doc = "Write proxy for field `ISF7`" ] pub struct ISF7_W < 'a > { w : & 'a mut W , } impl < 'a > ISF7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF8_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF8_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF8_A ) -> Self { match variant { ISF8_A :: _0 => false , ISF8_A :: _1 => true } } } # [ doc = "Reader of field `ISF8`" ] pub type ISF8_R = crate :: R < bool , ISF8_A > ; impl ISF8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF8_A { match self . bits { false => ISF8_A :: _0 , true => ISF8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF8_A :: _1 } } # [ doc = "Write proxy for field `ISF8`" ] pub struct ISF8_W < 'a > { w : & 'a mut W , } impl < 'a > ISF8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF9_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF9_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF9_A ) -> Self { match variant { ISF9_A :: _0 => false , ISF9_A :: _1 => true } } } # [ doc = "Reader of field `ISF9`" ] pub type ISF9_R = crate :: R < bool , ISF9_A > ; impl ISF9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF9_A { match self . bits { false => ISF9_A :: _0 , true => ISF9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF9_A :: _1 } } # [ doc = "Write proxy for field `ISF9`" ] pub struct ISF9_W < 'a > { w : & 'a mut W , } impl < 'a > ISF9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF10_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF10_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF10_A ) -> Self { match variant { ISF10_A :: _0 => false , ISF10_A :: _1 => true } } } # [ doc = "Reader of field `ISF10`" ] pub type ISF10_R = crate :: R < bool , ISF10_A > ; impl ISF10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF10_A { match self . bits { false => ISF10_A :: _0 , true => ISF10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF10_A :: _1 } } # [ doc = "Write proxy for field `ISF10`" ] pub struct ISF10_W < 'a > { w : & 'a mut W , } impl < 'a > ISF10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF11_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF11_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF11_A ) -> Self { match variant { ISF11_A :: _0 => false , ISF11_A :: _1 => true } } } # [ doc = "Reader of field `ISF11`" ] pub type ISF11_R = crate :: R < bool , ISF11_A > ; impl ISF11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF11_A { match self . bits { false => ISF11_A :: _0 , true => ISF11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF11_A :: _1 } } # [ doc = "Write proxy for field `ISF11`" ] pub struct ISF11_W < 'a > { w : & 'a mut W , } impl < 'a > ISF11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF12_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF12_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF12_A ) -> Self { match variant { ISF12_A :: _0 => false , ISF12_A :: _1 => true } } } # [ doc = "Reader of field `ISF12`" ] pub type ISF12_R = crate :: R < bool , ISF12_A > ; impl ISF12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF12_A { match self . bits { false => ISF12_A :: _0 , true => ISF12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF12_A :: _1 } } # [ doc = "Write proxy for field `ISF12`" ] pub struct ISF12_W < 'a > { w : & 'a mut W , } impl < 'a > ISF12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF13_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF13_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF13_A ) -> Self { match variant { ISF13_A :: _0 => false , ISF13_A :: _1 => true } } } # [ doc = "Reader of field `ISF13`" ] pub type ISF13_R = crate :: R < bool , ISF13_A > ; impl ISF13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF13_A { match self . bits { false => ISF13_A :: _0 , true => ISF13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF13_A :: _1 } } # [ doc = "Write proxy for field `ISF13`" ] pub struct ISF13_W < 'a > { w : & 'a mut W , } impl < 'a > ISF13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF14_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF14_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF14_A ) -> Self { match variant { ISF14_A :: _0 => false , ISF14_A :: _1 => true } } } # [ doc = "Reader of field `ISF14`" ] pub type ISF14_R = crate :: R < bool , ISF14_A > ; impl ISF14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF14_A { match self . bits { false => ISF14_A :: _0 , true => ISF14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF14_A :: _1 } } # [ doc = "Write proxy for field `ISF14`" ] pub struct ISF14_W < 'a > { w : & 'a mut W , } impl < 'a > ISF14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF15_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF15_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF15_A ) -> Self { match variant { ISF15_A :: _0 => false , ISF15_A :: _1 => true } } } # [ doc = "Reader of field `ISF15`" ] pub type ISF15_R = crate :: R < bool , ISF15_A > ; impl ISF15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF15_A { match self . bits { false => ISF15_A :: _0 , true => ISF15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF15_A :: _1 } } # [ doc = "Write proxy for field `ISF15`" ] pub struct ISF15_W < 'a > { w : & 'a mut W , } impl < 'a > ISF15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF16_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF16_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF16_A ) -> Self { match variant { ISF16_A :: _0 => false , ISF16_A :: _1 => true } } } # [ doc = "Reader of field `ISF16`" ] pub type ISF16_R = crate :: R < bool , ISF16_A > ; impl ISF16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF16_A { match self . bits { false => ISF16_A :: _0 , true => ISF16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF16_A :: _1 } } # [ doc = "Write proxy for field `ISF16`" ] pub struct ISF16_W < 'a > { w : & 'a mut W , } impl < 'a > ISF16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF17_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF17_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF17_A ) -> Self { match variant { ISF17_A :: _0 => false , ISF17_A :: _1 => true } } } # [ doc = "Reader of field `ISF17`" ] pub type ISF17_R = crate :: R < bool , ISF17_A > ; impl ISF17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF17_A { match self . bits { false => ISF17_A :: _0 , true => ISF17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF17_A :: _1 } } # [ doc = "Write proxy for field `ISF17`" ] pub struct ISF17_W < 'a > { w : & 'a mut W , } impl < 'a > ISF17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF18_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF18_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF18_A ) -> Self { match variant { ISF18_A :: _0 => false , ISF18_A :: _1 => true } } } # [ doc = "Reader of field `ISF18`" ] pub type ISF18_R = crate :: R < bool , ISF18_A > ; impl ISF18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF18_A { match self . bits { false => ISF18_A :: _0 , true => ISF18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF18_A :: _1 } } # [ doc = "Write proxy for field `ISF18`" ] pub struct ISF18_W < 'a > { w : & 'a mut W , } impl < 'a > ISF18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF19_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF19_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF19_A ) -> Self { match variant { ISF19_A :: _0 => false , ISF19_A :: _1 => true } } } # [ doc = "Reader of field `ISF19`" ] pub type ISF19_R = crate :: R < bool , ISF19_A > ; impl ISF19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF19_A { match self . bits { false => ISF19_A :: _0 , true => ISF19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF19_A :: _1 } } # [ doc = "Write proxy for field `ISF19`" ] pub struct ISF19_W < 'a > { w : & 'a mut W , } impl < 'a > ISF19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF20_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF20_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF20_A ) -> Self { match variant { ISF20_A :: _0 => false , ISF20_A :: _1 => true } } } # [ doc = "Reader of field `ISF20`" ] pub type ISF20_R = crate :: R < bool , ISF20_A > ; impl ISF20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF20_A { match self . bits { false => ISF20_A :: _0 , true => ISF20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF20_A :: _1 } } # [ doc = "Write proxy for field `ISF20`" ] pub struct ISF20_W < 'a > { w : & 'a mut W , } impl < 'a > ISF20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF21_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF21_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF21_A ) -> Self { match variant { ISF21_A :: _0 => false , ISF21_A :: _1 => true } } } # [ doc = "Reader of field `ISF21`" ] pub type ISF21_R = crate :: R < bool , ISF21_A > ; impl ISF21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF21_A { match self . bits { false => ISF21_A :: _0 , true => ISF21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF21_A :: _1 } } # [ doc = "Write proxy for field `ISF21`" ] pub struct ISF21_W < 'a > { w : & 'a mut W , } impl < 'a > ISF21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF22_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF22_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF22_A ) -> Self { match variant { ISF22_A :: _0 => false , ISF22_A :: _1 => true } } } # [ doc = "Reader of field `ISF22`" ] pub type ISF22_R = crate :: R < bool , ISF22_A > ; impl ISF22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF22_A { match self . bits { false => ISF22_A :: _0 , true => ISF22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF22_A :: _1 } } # [ doc = "Write proxy for field `ISF22`" ] pub struct ISF22_W < 'a > { w : & 'a mut W , } impl < 'a > ISF22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF23_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF23_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF23_A ) -> Self { match variant { ISF23_A :: _0 => false , ISF23_A :: _1 => true } } } # [ doc = "Reader of field `ISF23`" ] pub type ISF23_R = crate :: R < bool , ISF23_A > ; impl ISF23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF23_A { match self . bits { false => ISF23_A :: _0 , true => ISF23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF23_A :: _1 } } # [ doc = "Write proxy for field `ISF23`" ] pub struct ISF23_W < 'a > { w : & 'a mut W , } impl < 'a > ISF23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF24_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF24_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF24_A ) -> Self { match variant { ISF24_A :: _0 => false , ISF24_A :: _1 => true } } } # [ doc = "Reader of field `ISF24`" ] pub type ISF24_R = crate :: R < bool , ISF24_A > ; impl ISF24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF24_A { match self . bits { false => ISF24_A :: _0 , true => ISF24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF24_A :: _1 } } # [ doc = "Write proxy for field `ISF24`" ] pub struct ISF24_W < 'a > { w : & 'a mut W , } impl < 'a > ISF24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF25_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF25_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF25_A ) -> Self { match variant { ISF25_A :: _0 => false , ISF25_A :: _1 => true } } } # [ doc = "Reader of field `ISF25`" ] pub type ISF25_R = crate :: R < bool , ISF25_A > ; impl ISF25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF25_A { match self . bits { false => ISF25_A :: _0 , true => ISF25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF25_A :: _1 } } # [ doc = "Write proxy for field `ISF25`" ] pub struct ISF25_W < 'a > { w : & 'a mut W , } impl < 'a > ISF25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF26_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF26_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF26_A ) -> Self { match variant { ISF26_A :: _0 => false , ISF26_A :: _1 => true } } } # [ doc = "Reader of field `ISF26`" ] pub type ISF26_R = crate :: R < bool , ISF26_A > ; impl ISF26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF26_A { match self . bits { false => ISF26_A :: _0 , true => ISF26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF26_A :: _1 } } # [ doc = "Write proxy for field `ISF26`" ] pub struct ISF26_W < 'a > { w : & 'a mut W , } impl < 'a > ISF26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF27_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF27_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF27_A ) -> Self { match variant { ISF27_A :: _0 => false , ISF27_A :: _1 => true } } } # [ doc = "Reader of field `ISF27`" ] pub type ISF27_R = crate :: R < bool , ISF27_A > ; impl ISF27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF27_A { match self . bits { false => ISF27_A :: _0 , true => ISF27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF27_A :: _1 } } # [ doc = "Write proxy for field `ISF27`" ] pub struct ISF27_W < 'a > { w : & 'a mut W , } impl < 'a > ISF27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF28_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF28_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF28_A ) -> Self { match variant { ISF28_A :: _0 => false , ISF28_A :: _1 => true } } } # [ doc = "Reader of field `ISF28`" ] pub type ISF28_R = crate :: R < bool , ISF28_A > ; impl ISF28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF28_A { match self . bits { false => ISF28_A :: _0 , true => ISF28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF28_A :: _1 } } # [ doc = "Write proxy for field `ISF28`" ] pub struct ISF28_W < 'a > { w : & 'a mut W , } impl < 'a > ISF28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF29_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF29_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF29_A ) -> Self { match variant { ISF29_A :: _0 => false , ISF29_A :: _1 => true } } } # [ doc = "Reader of field `ISF29`" ] pub type ISF29_R = crate :: R < bool , ISF29_A > ; impl ISF29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF29_A { match self . bits { false => ISF29_A :: _0 , true => ISF29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF29_A :: _1 } } # [ doc = "Write proxy for field `ISF29`" ] pub struct ISF29_W < 'a > { w : & 'a mut W , } impl < 'a > ISF29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF30_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF30_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF30_A ) -> Self { match variant { ISF30_A :: _0 => false , ISF30_A :: _1 => true } } } # [ doc = "Reader of field `ISF30`" ] pub type ISF30_R = crate :: R < bool , ISF30_A > ; impl ISF30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF30_A { match self . bits { false => ISF30_A :: _0 , true => ISF30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF30_A :: _1 } } # [ doc = "Write proxy for field `ISF30`" ] pub struct ISF30_W < 'a > { w : & 'a mut W , } impl < 'a > ISF30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF31_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF31_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF31_A ) -> Self { match variant { ISF31_A :: _0 => false , ISF31_A :: _1 => true } } } # [ doc = "Reader of field `ISF31`" ] pub type ISF31_R = crate :: R < bool , ISF31_A > ; impl ISF31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF31_A { match self . bits { false => ISF31_A :: _0 , true => ISF31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF31_A :: _1 } } # [ doc = "Write proxy for field `ISF31`" ] pub struct ISF31_W < 'a > { w : & 'a mut W , } impl < 'a > ISF31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & self ) -> ISF0_R { ISF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & self ) -> ISF1_R { ISF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & self ) -> ISF2_R { ISF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & self ) -> ISF3_R { ISF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & self ) -> ISF4_R { ISF4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & self ) -> ISF5_R { ISF5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & self ) -> ISF6_R { ISF6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & self ) -> ISF7_R { ISF7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & self ) -> ISF8_R { ISF8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & self ) -> ISF9_R { ISF9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & self ) -> ISF10_R { ISF10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & self ) -> ISF11_R { ISF11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & self ) -> ISF12_R { ISF12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & self ) -> ISF13_R { ISF13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & self ) -> ISF14_R { ISF14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & self ) -> ISF15_R { ISF15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & self ) -> ISF16_R { ISF16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & self ) -> ISF17_R { ISF17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & self ) -> ISF18_R { ISF18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & self ) -> ISF19_R { ISF19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & self ) -> ISF20_R { ISF20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & self ) -> ISF21_R { ISF21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & self ) -> ISF22_R { ISF22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & self ) -> ISF23_R { ISF23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & self ) -> ISF24_R { ISF24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & self ) -> ISF25_R { ISF25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & self ) -> ISF26_R { ISF26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & self ) -> ISF27_R { ISF27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & self ) -> ISF28_R { ISF28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & self ) -> ISF29_R { ISF29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & self ) -> ISF30_R { ISF30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & self ) -> ISF31_R { ISF31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & mut self ) -> ISF0_W { ISF0_W { w : self } } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & mut self ) -> ISF1_W { ISF1_W { w : self } } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & mut self ) -> ISF2_W { ISF2_W { w : self } } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & mut self ) -> ISF3_W { ISF3_W { w : self } } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & mut self ) -> ISF4_W { ISF4_W { w : self } } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & mut self ) -> ISF5_W { ISF5_W { w : self } } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & mut self ) -> ISF6_W { ISF6_W { w : self } } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & mut self ) -> ISF7_W { ISF7_W { w : self } } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & mut self ) -> ISF8_W { ISF8_W { w : self } } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & mut self ) -> ISF9_W { ISF9_W { w : self } } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & mut self ) -> ISF10_W { ISF10_W { w : self } } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & mut self ) -> ISF11_W { ISF11_W { w : self } } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & mut self ) -> ISF12_W { ISF12_W { w : self } } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & mut self ) -> ISF13_W { ISF13_W { w : self } } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & mut self ) -> ISF14_W { ISF14_W { w : self } } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & mut self ) -> ISF15_W { ISF15_W { w : self } } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & mut self ) -> ISF16_W { ISF16_W { w : self } } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & mut self ) -> ISF17_W { ISF17_W { w : self } } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & mut self ) -> ISF18_W { ISF18_W { w : self } } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & mut self ) -> ISF19_W { ISF19_W { w : self } } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & mut self ) -> ISF20_W { ISF20_W { w : self } } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & mut self ) -> ISF21_W { ISF21_W { w : self } } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & mut self ) -> ISF22_W { ISF22_W { w : self } } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & mut self ) -> ISF23_W { ISF23_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & mut self ) -> ISF24_W { ISF24_W { w : self } } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & mut self ) -> ISF25_W { ISF25_W { w : self } } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & mut self ) -> ISF26_W { ISF26_W { w : self } } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & mut self ) -> ISF27_W { ISF27_W { w : self } } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & mut self ) -> ISF28_W { ISF28_W { w : self } } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & mut self ) -> ISF29_W { ISF29_W { w : self } } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & mut self ) -> ISF30_W { ISF30_W { w : self } } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & mut self ) -> ISF31_W { ISF31_W { w : self } } } } # [ doc = "Digital Filter Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dfer](dfer) module" ] pub type DFER = crate :: Reg < u32 , _DFER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DFER ; # [ doc = "`read()` method returns [dfer::R](dfer::R) reader structure" ] impl crate :: Readable for DFER { } # [ doc = "`write(|w| ..)` method takes [dfer::W](dfer::W) writer structure" ] impl crate :: Writable for DFER { } # [ doc = "Digital Filter Enable Register" ] pub mod dfer { # [ doc = "Reader of register DFER" ] pub type R = crate :: R < u32 , super :: DFER > ; # [ doc = "Writer for register DFER" ] pub type W = crate :: W < u32 , super :: DFER > ; # [ doc = "Register DFER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DFER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE0_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE0_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE0_A ) -> Self { match variant { DFE0_A :: _0 => false , DFE0_A :: _1 => true } } } # [ doc = "Reader of field `DFE0`" ] pub type DFE0_R = crate :: R < bool , DFE0_A > ; impl DFE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE0_A { match self . bits { false => DFE0_A :: _0 , true => DFE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE0_A :: _1 } } # [ doc = "Write proxy for field `DFE0`" ] pub struct DFE0_W < 'a > { w : & 'a mut W , } impl < 'a > DFE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE0_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE1_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE1_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE1_A ) -> Self { match variant { DFE1_A :: _0 => false , DFE1_A :: _1 => true } } } # [ doc = "Reader of field `DFE1`" ] pub type DFE1_R = crate :: R < bool , DFE1_A > ; impl DFE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE1_A { match self . bits { false => DFE1_A :: _0 , true => DFE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE1_A :: _1 } } # [ doc = "Write proxy for field `DFE1`" ] pub struct DFE1_W < 'a > { w : & 'a mut W , } impl < 'a > DFE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE1_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE1_A :: _1 ) } # [ 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 } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE2_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE2_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE2_A ) -> Self { match variant { DFE2_A :: _0 => false , DFE2_A :: _1 => true } } } # [ doc = "Reader of field `DFE2`" ] pub type DFE2_R = crate :: R < bool , DFE2_A > ; impl DFE2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE2_A { match self . bits { false => DFE2_A :: _0 , true => DFE2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE2_A :: _1 } } # [ doc = "Write proxy for field `DFE2`" ] pub struct DFE2_W < 'a > { w : & 'a mut W , } impl < 'a > DFE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE2_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE2_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE3_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE3_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE3_A ) -> Self { match variant { DFE3_A :: _0 => false , DFE3_A :: _1 => true } } } # [ doc = "Reader of field `DFE3`" ] pub type DFE3_R = crate :: R < bool , DFE3_A > ; impl DFE3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE3_A { match self . bits { false => DFE3_A :: _0 , true => DFE3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE3_A :: _1 } } # [ doc = "Write proxy for field `DFE3`" ] pub struct DFE3_W < 'a > { w : & 'a mut W , } impl < 'a > DFE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE3_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE4_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE4_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE4_A ) -> Self { match variant { DFE4_A :: _0 => false , DFE4_A :: _1 => true } } } # [ doc = "Reader of field `DFE4`" ] pub type DFE4_R = crate :: R < bool , DFE4_A > ; impl DFE4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE4_A { match self . bits { false => DFE4_A :: _0 , true => DFE4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE4_A :: _1 } } # [ doc = "Write proxy for field `DFE4`" ] pub struct DFE4_W < 'a > { w : & 'a mut W , } impl < 'a > DFE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE4_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE5_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE5_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE5_A ) -> Self { match variant { DFE5_A :: _0 => false , DFE5_A :: _1 => true } } } # [ doc = "Reader of field `DFE5`" ] pub type DFE5_R = crate :: R < bool , DFE5_A > ; impl DFE5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE5_A { match self . bits { false => DFE5_A :: _0 , true => DFE5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE5_A :: _1 } } # [ doc = "Write proxy for field `DFE5`" ] pub struct DFE5_W < 'a > { w : & 'a mut W , } impl < 'a > DFE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE5_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE5_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE6_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE6_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE6_A ) -> Self { match variant { DFE6_A :: _0 => false , DFE6_A :: _1 => true } } } # [ doc = "Reader of field `DFE6`" ] pub type DFE6_R = crate :: R < bool , DFE6_A > ; impl DFE6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE6_A { match self . bits { false => DFE6_A :: _0 , true => DFE6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE6_A :: _1 } } # [ doc = "Write proxy for field `DFE6`" ] pub struct DFE6_W < 'a > { w : & 'a mut W , } impl < 'a > DFE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE6_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE6_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE7_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE7_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE7_A ) -> Self { match variant { DFE7_A :: _0 => false , DFE7_A :: _1 => true } } } # [ doc = "Reader of field `DFE7`" ] pub type DFE7_R = crate :: R < bool , DFE7_A > ; impl DFE7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE7_A { match self . bits { false => DFE7_A :: _0 , true => DFE7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE7_A :: _1 } } # [ doc = "Write proxy for field `DFE7`" ] pub struct DFE7_W < 'a > { w : & 'a mut W , } impl < 'a > DFE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE7_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE7_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE8_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE8_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE8_A ) -> Self { match variant { DFE8_A :: _0 => false , DFE8_A :: _1 => true } } } # [ doc = "Reader of field `DFE8`" ] pub type DFE8_R = crate :: R < bool , DFE8_A > ; impl DFE8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE8_A { match self . bits { false => DFE8_A :: _0 , true => DFE8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE8_A :: _1 } } # [ doc = "Write proxy for field `DFE8`" ] pub struct DFE8_W < 'a > { w : & 'a mut W , } impl < 'a > DFE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE8_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE9_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE9_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE9_A ) -> Self { match variant { DFE9_A :: _0 => false , DFE9_A :: _1 => true } } } # [ doc = "Reader of field `DFE9`" ] pub type DFE9_R = crate :: R < bool , DFE9_A > ; impl DFE9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE9_A { match self . bits { false => DFE9_A :: _0 , true => DFE9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE9_A :: _1 } } # [ doc = "Write proxy for field `DFE9`" ] pub struct DFE9_W < 'a > { w : & 'a mut W , } impl < 'a > DFE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE9_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE10_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE10_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE10_A ) -> Self { match variant { DFE10_A :: _0 => false , DFE10_A :: _1 => true } } } # [ doc = "Reader of field `DFE10`" ] pub type DFE10_R = crate :: R < bool , DFE10_A > ; impl DFE10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE10_A { match self . bits { false => DFE10_A :: _0 , true => DFE10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE10_A :: _1 } } # [ doc = "Write proxy for field `DFE10`" ] pub struct DFE10_W < 'a > { w : & 'a mut W , } impl < 'a > DFE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE10_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE11_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE11_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE11_A ) -> Self { match variant { DFE11_A :: _0 => false , DFE11_A :: _1 => true } } } # [ doc = "Reader of field `DFE11`" ] pub type DFE11_R = crate :: R < bool , DFE11_A > ; impl DFE11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE11_A { match self . bits { false => DFE11_A :: _0 , true => DFE11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE11_A :: _1 } } # [ doc = "Write proxy for field `DFE11`" ] pub struct DFE11_W < 'a > { w : & 'a mut W , } impl < 'a > DFE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE11_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE12_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE12_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE12_A ) -> Self { match variant { DFE12_A :: _0 => false , DFE12_A :: _1 => true } } } # [ doc = "Reader of field `DFE12`" ] pub type DFE12_R = crate :: R < bool , DFE12_A > ; impl DFE12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE12_A { match self . bits { false => DFE12_A :: _0 , true => DFE12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE12_A :: _1 } } # [ doc = "Write proxy for field `DFE12`" ] pub struct DFE12_W < 'a > { w : & 'a mut W , } impl < 'a > DFE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE12_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE13_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE13_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE13_A ) -> Self { match variant { DFE13_A :: _0 => false , DFE13_A :: _1 => true } } } # [ doc = "Reader of field `DFE13`" ] pub type DFE13_R = crate :: R < bool , DFE13_A > ; impl DFE13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE13_A { match self . bits { false => DFE13_A :: _0 , true => DFE13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE13_A :: _1 } } # [ doc = "Write proxy for field `DFE13`" ] pub struct DFE13_W < 'a > { w : & 'a mut W , } impl < 'a > DFE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE13_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE13_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE14_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE14_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE14_A ) -> Self { match variant { DFE14_A :: _0 => false , DFE14_A :: _1 => true } } } # [ doc = "Reader of field `DFE14`" ] pub type DFE14_R = crate :: R < bool , DFE14_A > ; impl DFE14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE14_A { match self . bits { false => DFE14_A :: _0 , true => DFE14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE14_A :: _1 } } # [ doc = "Write proxy for field `DFE14`" ] pub struct DFE14_W < 'a > { w : & 'a mut W , } impl < 'a > DFE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE14_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE15_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE15_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE15_A ) -> Self { match variant { DFE15_A :: _0 => false , DFE15_A :: _1 => true } } } # [ doc = "Reader of field `DFE15`" ] pub type DFE15_R = crate :: R < bool , DFE15_A > ; impl DFE15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE15_A { match self . bits { false => DFE15_A :: _0 , true => DFE15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE15_A :: _1 } } # [ doc = "Write proxy for field `DFE15`" ] pub struct DFE15_W < 'a > { w : & 'a mut W , } impl < 'a > DFE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE15_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE16_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE16_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE16_A ) -> Self { match variant { DFE16_A :: _0 => false , DFE16_A :: _1 => true } } } # [ doc = "Reader of field `DFE16`" ] pub type DFE16_R = crate :: R < bool , DFE16_A > ; impl DFE16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE16_A { match self . bits { false => DFE16_A :: _0 , true => DFE16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE16_A :: _1 } } # [ doc = "Write proxy for field `DFE16`" ] pub struct DFE16_W < 'a > { w : & 'a mut W , } impl < 'a > DFE16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE16_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE17_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE17_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE17_A ) -> Self { match variant { DFE17_A :: _0 => false , DFE17_A :: _1 => true } } } # [ doc = "Reader of field `DFE17`" ] pub type DFE17_R = crate :: R < bool , DFE17_A > ; impl DFE17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE17_A { match self . bits { false => DFE17_A :: _0 , true => DFE17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE17_A :: _1 } } # [ doc = "Write proxy for field `DFE17`" ] pub struct DFE17_W < 'a > { w : & 'a mut W , } impl < 'a > DFE17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE17_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE18_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE18_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE18_A ) -> Self { match variant { DFE18_A :: _0 => false , DFE18_A :: _1 => true } } } # [ doc = "Reader of field `DFE18`" ] pub type DFE18_R = crate :: R < bool , DFE18_A > ; impl DFE18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE18_A { match self . bits { false => DFE18_A :: _0 , true => DFE18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE18_A :: _1 } } # [ doc = "Write proxy for field `DFE18`" ] pub struct DFE18_W < 'a > { w : & 'a mut W , } impl < 'a > DFE18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE18_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE19_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE19_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE19_A ) -> Self { match variant { DFE19_A :: _0 => false , DFE19_A :: _1 => true } } } # [ doc = "Reader of field `DFE19`" ] pub type DFE19_R = crate :: R < bool , DFE19_A > ; impl DFE19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE19_A { match self . bits { false => DFE19_A :: _0 , true => DFE19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE19_A :: _1 } } # [ doc = "Write proxy for field `DFE19`" ] pub struct DFE19_W < 'a > { w : & 'a mut W , } impl < 'a > DFE19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE19_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE20_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE20_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE20_A ) -> Self { match variant { DFE20_A :: _0 => false , DFE20_A :: _1 => true } } } # [ doc = "Reader of field `DFE20`" ] pub type DFE20_R = crate :: R < bool , DFE20_A > ; impl DFE20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE20_A { match self . bits { false => DFE20_A :: _0 , true => DFE20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE20_A :: _1 } } # [ doc = "Write proxy for field `DFE20`" ] pub struct DFE20_W < 'a > { w : & 'a mut W , } impl < 'a > DFE20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE20_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE20_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE21_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE21_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE21_A ) -> Self { match variant { DFE21_A :: _0 => false , DFE21_A :: _1 => true } } } # [ doc = "Reader of field `DFE21`" ] pub type DFE21_R = crate :: R < bool , DFE21_A > ; impl DFE21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE21_A { match self . bits { false => DFE21_A :: _0 , true => DFE21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE21_A :: _1 } } # [ doc = "Write proxy for field `DFE21`" ] pub struct DFE21_W < 'a > { w : & 'a mut W , } impl < 'a > DFE21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE21_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE21_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE22_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE22_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE22_A ) -> Self { match variant { DFE22_A :: _0 => false , DFE22_A :: _1 => true } } } # [ doc = "Reader of field `DFE22`" ] pub type DFE22_R = crate :: R < bool , DFE22_A > ; impl DFE22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE22_A { match self . bits { false => DFE22_A :: _0 , true => DFE22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE22_A :: _1 } } # [ doc = "Write proxy for field `DFE22`" ] pub struct DFE22_W < 'a > { w : & 'a mut W , } impl < 'a > DFE22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE22_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE23_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE23_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE23_A ) -> Self { match variant { DFE23_A :: _0 => false , DFE23_A :: _1 => true } } } # [ doc = "Reader of field `DFE23`" ] pub type DFE23_R = crate :: R < bool , DFE23_A > ; impl DFE23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE23_A { match self . bits { false => DFE23_A :: _0 , true => DFE23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE23_A :: _1 } } # [ doc = "Write proxy for field `DFE23`" ] pub struct DFE23_W < 'a > { w : & 'a mut W , } impl < 'a > DFE23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE23_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE24_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE24_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE24_A ) -> Self { match variant { DFE24_A :: _0 => false , DFE24_A :: _1 => true } } } # [ doc = "Reader of field `DFE24`" ] pub type DFE24_R = crate :: R < bool , DFE24_A > ; impl DFE24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE24_A { match self . bits { false => DFE24_A :: _0 , true => DFE24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE24_A :: _1 } } # [ doc = "Write proxy for field `DFE24`" ] pub struct DFE24_W < 'a > { w : & 'a mut W , } impl < 'a > DFE24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE24_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE24_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE25_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE25_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE25_A ) -> Self { match variant { DFE25_A :: _0 => false , DFE25_A :: _1 => true } } } # [ doc = "Reader of field `DFE25`" ] pub type DFE25_R = crate :: R < bool , DFE25_A > ; impl DFE25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE25_A { match self . bits { false => DFE25_A :: _0 , true => DFE25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE25_A :: _1 } } # [ doc = "Write proxy for field `DFE25`" ] pub struct DFE25_W < 'a > { w : & 'a mut W , } impl < 'a > DFE25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE25_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE25_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE26_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE26_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE26_A ) -> Self { match variant { DFE26_A :: _0 => false , DFE26_A :: _1 => true } } } # [ doc = "Reader of field `DFE26`" ] pub type DFE26_R = crate :: R < bool , DFE26_A > ; impl DFE26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE26_A { match self . bits { false => DFE26_A :: _0 , true => DFE26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE26_A :: _1 } } # [ doc = "Write proxy for field `DFE26`" ] pub struct DFE26_W < 'a > { w : & 'a mut W , } impl < 'a > DFE26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE26_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE26_A :: _1 ) } # [ 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 = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE27_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE27_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE27_A ) -> Self { match variant { DFE27_A :: _0 => false , DFE27_A :: _1 => true } } } # [ doc = "Reader of field `DFE27`" ] pub type DFE27_R = crate :: R < bool , DFE27_A > ; impl DFE27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE27_A { match self . bits { false => DFE27_A :: _0 , true => DFE27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE27_A :: _1 } } # [ doc = "Write proxy for field `DFE27`" ] pub struct DFE27_W < 'a > { w : & 'a mut W , } impl < 'a > DFE27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE27_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE28_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE28_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE28_A ) -> Self { match variant { DFE28_A :: _0 => false , DFE28_A :: _1 => true } } } # [ doc = "Reader of field `DFE28`" ] pub type DFE28_R = crate :: R < bool , DFE28_A > ; impl DFE28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE28_A { match self . bits { false => DFE28_A :: _0 , true => DFE28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE28_A :: _1 } } # [ doc = "Write proxy for field `DFE28`" ] pub struct DFE28_W < 'a > { w : & 'a mut W , } impl < 'a > DFE28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE28_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE29_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE29_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE29_A ) -> Self { match variant { DFE29_A :: _0 => false , DFE29_A :: _1 => true } } } # [ doc = "Reader of field `DFE29`" ] pub type DFE29_R = crate :: R < bool , DFE29_A > ; impl DFE29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE29_A { match self . bits { false => DFE29_A :: _0 , true => DFE29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE29_A :: _1 } } # [ doc = "Write proxy for field `DFE29`" ] pub struct DFE29_W < 'a > { w : & 'a mut W , } impl < 'a > DFE29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE29_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE30_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE30_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE30_A ) -> Self { match variant { DFE30_A :: _0 => false , DFE30_A :: _1 => true } } } # [ doc = "Reader of field `DFE30`" ] pub type DFE30_R = crate :: R < bool , DFE30_A > ; impl DFE30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE30_A { match self . bits { false => DFE30_A :: _0 , true => DFE30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE30_A :: _1 } } # [ doc = "Write proxy for field `DFE30`" ] pub struct DFE30_W < 'a > { w : & 'a mut W , } impl < 'a > DFE30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE30_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Digital Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFE31_A { # [ doc = "0: Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] _0 , # [ doc = "1: Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < DFE31_A > for bool { # [ inline ( always ) ] fn from ( variant : DFE31_A ) -> Self { match variant { DFE31_A :: _0 => false , DFE31_A :: _1 => true } } } # [ doc = "Reader of field `DFE31`" ] pub type DFE31_R = crate :: R < bool , DFE31_A > ; impl DFE31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFE31_A { match self . bits { false => DFE31_A :: _0 , true => DFE31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFE31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFE31_A :: _1 } } # [ doc = "Write proxy for field `DFE31`" ] pub struct DFE31_W < 'a > { w : & 'a mut W , } impl < 'a > DFE31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFE31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFE31_A :: _0 ) } # [ doc = "Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFE31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe0 ( & self ) -> DFE0_R { DFE0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe1 ( & self ) -> DFE1_R { DFE1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe2 ( & self ) -> DFE2_R { DFE2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe3 ( & self ) -> DFE3_R { DFE3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe4 ( & self ) -> DFE4_R { DFE4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe5 ( & self ) -> DFE5_R { DFE5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe6 ( & self ) -> DFE6_R { DFE6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe7 ( & self ) -> DFE7_R { DFE7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe8 ( & self ) -> DFE8_R { DFE8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe9 ( & self ) -> DFE9_R { DFE9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe10 ( & self ) -> DFE10_R { DFE10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe11 ( & self ) -> DFE11_R { DFE11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe12 ( & self ) -> DFE12_R { DFE12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe13 ( & self ) -> DFE13_R { DFE13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe14 ( & self ) -> DFE14_R { DFE14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe15 ( & self ) -> DFE15_R { DFE15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe16 ( & self ) -> DFE16_R { DFE16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe17 ( & self ) -> DFE17_R { DFE17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe18 ( & self ) -> DFE18_R { DFE18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe19 ( & self ) -> DFE19_R { DFE19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe20 ( & self ) -> DFE20_R { DFE20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe21 ( & self ) -> DFE21_R { DFE21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe22 ( & self ) -> DFE22_R { DFE22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe23 ( & self ) -> DFE23_R { DFE23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe24 ( & self ) -> DFE24_R { DFE24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe25 ( & self ) -> DFE25_R { DFE25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe26 ( & self ) -> DFE26_R { DFE26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe27 ( & self ) -> DFE27_R { DFE27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe28 ( & self ) -> DFE28_R { DFE28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe29 ( & self ) -> DFE29_R { DFE29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe30 ( & self ) -> DFE30_R { DFE30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe31 ( & self ) -> DFE31_R { DFE31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe0 ( & mut self ) -> DFE0_W { DFE0_W { w : self } } # [ doc = "Bit 1 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe1 ( & mut self ) -> DFE1_W { DFE1_W { w : self } } # [ doc = "Bit 2 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe2 ( & mut self ) -> DFE2_W { DFE2_W { w : self } } # [ doc = "Bit 3 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe3 ( & mut self ) -> DFE3_W { DFE3_W { w : self } } # [ doc = "Bit 4 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe4 ( & mut self ) -> DFE4_W { DFE4_W { w : self } } # [ doc = "Bit 5 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe5 ( & mut self ) -> DFE5_W { DFE5_W { w : self } } # [ doc = "Bit 6 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe6 ( & mut self ) -> DFE6_W { DFE6_W { w : self } } # [ doc = "Bit 7 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe7 ( & mut self ) -> DFE7_W { DFE7_W { w : self } } # [ doc = "Bit 8 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe8 ( & mut self ) -> DFE8_W { DFE8_W { w : self } } # [ doc = "Bit 9 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe9 ( & mut self ) -> DFE9_W { DFE9_W { w : self } } # [ doc = "Bit 10 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe10 ( & mut self ) -> DFE10_W { DFE10_W { w : self } } # [ doc = "Bit 11 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe11 ( & mut self ) -> DFE11_W { DFE11_W { w : self } } # [ doc = "Bit 12 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe12 ( & mut self ) -> DFE12_W { DFE12_W { w : self } } # [ doc = "Bit 13 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe13 ( & mut self ) -> DFE13_W { DFE13_W { w : self } } # [ doc = "Bit 14 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe14 ( & mut self ) -> DFE14_W { DFE14_W { w : self } } # [ doc = "Bit 15 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe15 ( & mut self ) -> DFE15_W { DFE15_W { w : self } } # [ doc = "Bit 16 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe16 ( & mut self ) -> DFE16_W { DFE16_W { w : self } } # [ doc = "Bit 17 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe17 ( & mut self ) -> DFE17_W { DFE17_W { w : self } } # [ doc = "Bit 18 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe18 ( & mut self ) -> DFE18_W { DFE18_W { w : self } } # [ doc = "Bit 19 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe19 ( & mut self ) -> DFE19_W { DFE19_W { w : self } } # [ doc = "Bit 20 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe20 ( & mut self ) -> DFE20_W { DFE20_W { w : self } } # [ doc = "Bit 21 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe21 ( & mut self ) -> DFE21_W { DFE21_W { w : self } } # [ doc = "Bit 22 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe22 ( & mut self ) -> DFE22_W { DFE22_W { w : self } } # [ doc = "Bit 23 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe23 ( & mut self ) -> DFE23_W { DFE23_W { w : self } } # [ doc = "Bit 24 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe24 ( & mut self ) -> DFE24_W { DFE24_W { w : self } } # [ doc = "Bit 25 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe25 ( & mut self ) -> DFE25_W { DFE25_W { w : self } } # [ doc = "Bit 26 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe26 ( & mut self ) -> DFE26_W { DFE26_W { w : self } } # [ doc = "Bit 27 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe27 ( & mut self ) -> DFE27_W { DFE27_W { w : self } } # [ doc = "Bit 28 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe28 ( & mut self ) -> DFE28_W { DFE28_W { w : self } } # [ doc = "Bit 29 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe29 ( & mut self ) -> DFE29_W { DFE29_W { w : self } } # [ doc = "Bit 30 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe30 ( & mut self ) -> DFE30_W { DFE30_W { w : self } } # [ doc = "Bit 31 - Digital Filter Enable" ] # [ inline ( always ) ] pub fn dfe31 ( & mut self ) -> DFE31_W { DFE31_W { w : self } } } } # [ doc = "Digital Filter Clock Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dfcr](dfcr) module" ] pub type DFCR = crate :: Reg < u32 , _DFCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DFCR ; # [ doc = "`read()` method returns [dfcr::R](dfcr::R) reader structure" ] impl crate :: Readable for DFCR { } # [ doc = "`write(|w| ..)` method takes [dfcr::W](dfcr::W) writer structure" ] impl crate :: Writable for DFCR { } # [ doc = "Digital Filter Clock Register" ] pub mod dfcr { # [ doc = "Reader of register DFCR" ] pub type R = crate :: R < u32 , super :: DFCR > ; # [ doc = "Writer for register DFCR" ] pub type W = crate :: W < u32 , super :: DFCR > ; # [ doc = "Register DFCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DFCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Clock Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CS_A { # [ doc = "0: Digital filters are clocked by the bus clock." ] _0 , # [ doc = "1: Digital filters are clocked by the LPO clock." ] _1 } impl From < CS_A > for bool { # [ inline ( always ) ] fn from ( variant : CS_A ) -> Self { match variant { CS_A :: _0 => false , CS_A :: _1 => true } } } # [ doc = "Reader of field `CS`" ] pub type CS_R = crate :: R < bool , CS_A > ; impl CS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CS_A { match self . bits { false => CS_A :: _0 , true => CS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CS_A :: _1 } } # [ doc = "Write proxy for field `CS`" ] pub struct CS_W < 'a > { w : & 'a mut W , } impl < 'a > CS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Digital filters are clocked by the bus clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CS_A :: _0 ) } # [ doc = "Digital filters are clocked by the LPO clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } impl R { # [ doc = "Bit 0 - Clock Source" ] # [ inline ( always ) ] pub fn cs ( & self ) -> CS_R { CS_R :: new ( ( self . bits & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Clock Source" ] # [ inline ( always ) ] pub fn cs ( & mut self ) -> CS_W { CS_W { w : self } } } } # [ doc = "Digital Filter Width Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dfwr](dfwr) module" ] pub type DFWR = crate :: Reg < u32 , _DFWR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DFWR ; # [ doc = "`read()` method returns [dfwr::R](dfwr::R) reader structure" ] impl crate :: Readable for DFWR { } # [ doc = "`write(|w| ..)` method takes [dfwr::W](dfwr::W) writer structure" ] impl crate :: Writable for DFWR { } # [ doc = "Digital Filter Width Register" ] pub mod dfwr { # [ doc = "Reader of register DFWR" ] pub type R = crate :: R < u32 , super :: DFWR > ; # [ doc = "Writer for register DFWR" ] pub type W = crate :: W < u32 , super :: DFWR > ; # [ doc = "Register DFWR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DFWR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FILT`" ] pub type FILT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FILT`" ] pub struct FILT_W < 'a > { w : & 'a mut W , } impl < 'a > FILT_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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Filter Length" ] # [ inline ( always ) ] pub fn filt ( & self ) -> FILT_R { FILT_R :: new ( ( self . bits & 0x1f ) as u8 ) } } impl W { # [ doc = "Bits 0:4 - Filter Length" ] # [ inline ( always ) ] pub fn filt ( & mut self ) -> FILT_W { FILT_W { w : self } } } } } # [ doc = "Pin Control and Interrupts" ] pub struct PORTE { _marker : PhantomData < * const ( ) > } unsafe impl Send for PORTE { } impl PORTE { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const porte :: RegisterBlock { 0x4004_d000 as * const _ } } impl Deref for PORTE { type Target = porte :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * PORTE :: ptr ( ) } } } # [ doc = "Pin Control and Interrupts" ] pub mod porte { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Pin Control Register n" ] pub pcr0 : PCR0 , # [ doc = "0x04 - Pin Control Register n" ] pub pcr1 : PCR1 , # [ doc = "0x08 - Pin Control Register n" ] pub pcr2 : PCR2 , # [ doc = "0x0c - Pin Control Register n" ] pub pcr3 : PCR3 , # [ doc = "0x10 - Pin Control Register n" ] pub pcr4 : PCR4 , # [ doc = "0x14 - Pin Control Register n" ] pub pcr5 : PCR5 , # [ doc = "0x18 - Pin Control Register n" ] pub pcr6 : PCR6 , # [ doc = "0x1c - Pin Control Register n" ] pub pcr7 : PCR7 , # [ doc = "0x20 - Pin Control Register n" ] pub pcr8 : PCR8 , # [ doc = "0x24 - Pin Control Register n" ] pub pcr9 : PCR9 , # [ doc = "0x28 - Pin Control Register n" ] pub pcr10 : PCR10 , # [ doc = "0x2c - Pin Control Register n" ] pub pcr11 : PCR11 , # [ doc = "0x30 - Pin Control Register n" ] pub pcr12 : PCR12 , # [ doc = "0x34 - Pin Control Register n" ] pub pcr13 : PCR13 , # [ doc = "0x38 - Pin Control Register n" ] pub pcr14 : PCR14 , # [ doc = "0x3c - Pin Control Register n" ] pub pcr15 : PCR15 , # [ doc = "0x40 - Pin Control Register n" ] pub pcr16 : PCR16 , # [ doc = "0x44 - Pin Control Register n" ] pub pcr17 : PCR17 , # [ doc = "0x48 - Pin Control Register n" ] pub pcr18 : PCR18 , # [ doc = "0x4c - Pin Control Register n" ] pub pcr19 : PCR19 , # [ doc = "0x50 - Pin Control Register n" ] pub pcr20 : PCR20 , # [ doc = "0x54 - Pin Control Register n" ] pub pcr21 : PCR21 , # [ doc = "0x58 - Pin Control Register n" ] pub pcr22 : PCR22 , # [ doc = "0x5c - Pin Control Register n" ] pub pcr23 : PCR23 , # [ doc = "0x60 - Pin Control Register n" ] pub pcr24 : PCR24 , # [ doc = "0x64 - Pin Control Register n" ] pub pcr25 : PCR25 , # [ doc = "0x68 - Pin Control Register n" ] pub pcr26 : PCR26 , # [ doc = "0x6c - Pin Control Register n" ] pub pcr27 : PCR27 , # [ doc = "0x70 - Pin Control Register n" ] pub pcr28 : PCR28 , # [ doc = "0x74 - Pin Control Register n" ] pub pcr29 : PCR29 , # [ doc = "0x78 - Pin Control Register n" ] pub pcr30 : PCR30 , # [ doc = "0x7c - Pin Control Register n" ] pub pcr31 : PCR31 , # [ doc = "0x80 - Global Pin Control Low Register" ] pub gpclr : GPCLR , # [ doc = "0x84 - Global Pin Control High Register" ] pub gpchr : GPCHR , _reserved34 : [ u8 ; 24usize ] , # [ doc = "0xa0 - Interrupt Status Flag Register" ] pub isfr : ISFR , } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr0](pcr0) module" ] pub type PCR0 = crate :: Reg < u32 , _PCR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR0 ; # [ doc = "`read()` method returns [pcr0::R](pcr0::R) reader structure" ] impl crate :: Readable for PCR0 { } # [ doc = "`write(|w| ..)` method takes [pcr0::W](pcr0::W) writer structure" ] impl crate :: Writable for PCR0 { } # [ doc = "Pin Control Register n" ] pub mod pcr0 { # [ doc = "Reader of register PCR0" ] pub type R = crate :: R < u32 , super :: PCR0 > ; # [ doc = "Writer for register PCR0" ] pub type W = crate :: W < u32 , super :: PCR0 > ; # [ doc = "Register PCR0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr1](pcr1) module" ] pub type PCR1 = crate :: Reg < u32 , _PCR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR1 ; # [ doc = "`read()` method returns [pcr1::R](pcr1::R) reader structure" ] impl crate :: Readable for PCR1 { } # [ doc = "`write(|w| ..)` method takes [pcr1::W](pcr1::W) writer structure" ] impl crate :: Writable for PCR1 { } # [ doc = "Pin Control Register n" ] pub mod pcr1 { # [ doc = "Reader of register PCR1" ] pub type R = crate :: R < u32 , super :: PCR1 > ; # [ doc = "Writer for register PCR1" ] pub type W = crate :: W < u32 , super :: PCR1 > ; # [ doc = "Register PCR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr2](pcr2) module" ] pub type PCR2 = crate :: Reg < u32 , _PCR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR2 ; # [ doc = "`read()` method returns [pcr2::R](pcr2::R) reader structure" ] impl crate :: Readable for PCR2 { } # [ doc = "`write(|w| ..)` method takes [pcr2::W](pcr2::W) writer structure" ] impl crate :: Writable for PCR2 { } # [ doc = "Pin Control Register n" ] pub mod pcr2 { # [ doc = "Reader of register PCR2" ] pub type R = crate :: R < u32 , super :: PCR2 > ; # [ doc = "Writer for register PCR2" ] pub type W = crate :: W < u32 , super :: PCR2 > ; # [ doc = "Register PCR2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr3](pcr3) module" ] pub type PCR3 = crate :: Reg < u32 , _PCR3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR3 ; # [ doc = "`read()` method returns [pcr3::R](pcr3::R) reader structure" ] impl crate :: Readable for PCR3 { } # [ doc = "`write(|w| ..)` method takes [pcr3::W](pcr3::W) writer structure" ] impl crate :: Writable for PCR3 { } # [ doc = "Pin Control Register n" ] pub mod pcr3 { # [ doc = "Reader of register PCR3" ] pub type R = crate :: R < u32 , super :: PCR3 > ; # [ doc = "Writer for register PCR3" ] pub type W = crate :: W < u32 , super :: PCR3 > ; # [ doc = "Register PCR3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr4](pcr4) module" ] pub type PCR4 = crate :: Reg < u32 , _PCR4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR4 ; # [ doc = "`read()` method returns [pcr4::R](pcr4::R) reader structure" ] impl crate :: Readable for PCR4 { } # [ doc = "`write(|w| ..)` method takes [pcr4::W](pcr4::W) writer structure" ] impl crate :: Writable for PCR4 { } # [ doc = "Pin Control Register n" ] pub mod pcr4 { # [ doc = "Reader of register PCR4" ] pub type R = crate :: R < u32 , super :: PCR4 > ; # [ doc = "Writer for register PCR4" ] pub type W = crate :: W < u32 , super :: PCR4 > ; # [ doc = "Register PCR4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr5](pcr5) module" ] pub type PCR5 = crate :: Reg < u32 , _PCR5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR5 ; # [ doc = "`read()` method returns [pcr5::R](pcr5::R) reader structure" ] impl crate :: Readable for PCR5 { } # [ doc = "`write(|w| ..)` method takes [pcr5::W](pcr5::W) writer structure" ] impl crate :: Writable for PCR5 { } # [ doc = "Pin Control Register n" ] pub mod pcr5 { # [ doc = "Reader of register PCR5" ] pub type R = crate :: R < u32 , super :: PCR5 > ; # [ doc = "Writer for register PCR5" ] pub type W = crate :: W < u32 , super :: PCR5 > ; # [ doc = "Register PCR5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr6](pcr6) module" ] pub type PCR6 = crate :: Reg < u32 , _PCR6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR6 ; # [ doc = "`read()` method returns [pcr6::R](pcr6::R) reader structure" ] impl crate :: Readable for PCR6 { } # [ doc = "`write(|w| ..)` method takes [pcr6::W](pcr6::W) writer structure" ] impl crate :: Writable for PCR6 { } # [ doc = "Pin Control Register n" ] pub mod pcr6 { # [ doc = "Reader of register PCR6" ] pub type R = crate :: R < u32 , super :: PCR6 > ; # [ doc = "Writer for register PCR6" ] pub type W = crate :: W < u32 , super :: PCR6 > ; # [ doc = "Register PCR6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr7](pcr7) module" ] pub type PCR7 = crate :: Reg < u32 , _PCR7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR7 ; # [ doc = "`read()` method returns [pcr7::R](pcr7::R) reader structure" ] impl crate :: Readable for PCR7 { } # [ doc = "`write(|w| ..)` method takes [pcr7::W](pcr7::W) writer structure" ] impl crate :: Writable for PCR7 { } # [ doc = "Pin Control Register n" ] pub mod pcr7 { # [ doc = "Reader of register PCR7" ] pub type R = crate :: R < u32 , super :: PCR7 > ; # [ doc = "Writer for register PCR7" ] pub type W = crate :: W < u32 , super :: PCR7 > ; # [ doc = "Register PCR7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr8](pcr8) module" ] pub type PCR8 = crate :: Reg < u32 , _PCR8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR8 ; # [ doc = "`read()` method returns [pcr8::R](pcr8::R) reader structure" ] impl crate :: Readable for PCR8 { } # [ doc = "`write(|w| ..)` method takes [pcr8::W](pcr8::W) writer structure" ] impl crate :: Writable for PCR8 { } # [ doc = "Pin Control Register n" ] pub mod pcr8 { # [ doc = "Reader of register PCR8" ] pub type R = crate :: R < u32 , super :: PCR8 > ; # [ doc = "Writer for register PCR8" ] pub type W = crate :: W < u32 , super :: PCR8 > ; # [ doc = "Register PCR8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr9](pcr9) module" ] pub type PCR9 = crate :: Reg < u32 , _PCR9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR9 ; # [ doc = "`read()` method returns [pcr9::R](pcr9::R) reader structure" ] impl crate :: Readable for PCR9 { } # [ doc = "`write(|w| ..)` method takes [pcr9::W](pcr9::W) writer structure" ] impl crate :: Writable for PCR9 { } # [ doc = "Pin Control Register n" ] pub mod pcr9 { # [ doc = "Reader of register PCR9" ] pub type R = crate :: R < u32 , super :: PCR9 > ; # [ doc = "Writer for register PCR9" ] pub type W = crate :: W < u32 , super :: PCR9 > ; # [ doc = "Register PCR9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr10](pcr10) module" ] pub type PCR10 = crate :: Reg < u32 , _PCR10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR10 ; # [ doc = "`read()` method returns [pcr10::R](pcr10::R) reader structure" ] impl crate :: Readable for PCR10 { } # [ doc = "`write(|w| ..)` method takes [pcr10::W](pcr10::W) writer structure" ] impl crate :: Writable for PCR10 { } # [ doc = "Pin Control Register n" ] pub mod pcr10 { # [ doc = "Reader of register PCR10" ] pub type R = crate :: R < u32 , super :: PCR10 > ; # [ doc = "Writer for register PCR10" ] pub type W = crate :: W < u32 , super :: PCR10 > ; # [ doc = "Register PCR10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr11](pcr11) module" ] pub type PCR11 = crate :: Reg < u32 , _PCR11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR11 ; # [ doc = "`read()` method returns [pcr11::R](pcr11::R) reader structure" ] impl crate :: Readable for PCR11 { } # [ doc = "`write(|w| ..)` method takes [pcr11::W](pcr11::W) writer structure" ] impl crate :: Writable for PCR11 { } # [ doc = "Pin Control Register n" ] pub mod pcr11 { # [ doc = "Reader of register PCR11" ] pub type R = crate :: R < u32 , super :: PCR11 > ; # [ doc = "Writer for register PCR11" ] pub type W = crate :: W < u32 , super :: PCR11 > ; # [ doc = "Register PCR11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr12](pcr12) module" ] pub type PCR12 = crate :: Reg < u32 , _PCR12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR12 ; # [ doc = "`read()` method returns [pcr12::R](pcr12::R) reader structure" ] impl crate :: Readable for PCR12 { } # [ doc = "`write(|w| ..)` method takes [pcr12::W](pcr12::W) writer structure" ] impl crate :: Writable for PCR12 { } # [ doc = "Pin Control Register n" ] pub mod pcr12 { # [ doc = "Reader of register PCR12" ] pub type R = crate :: R < u32 , super :: PCR12 > ; # [ doc = "Writer for register PCR12" ] pub type W = crate :: W < u32 , super :: PCR12 > ; # [ doc = "Register PCR12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr13](pcr13) module" ] pub type PCR13 = crate :: Reg < u32 , _PCR13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR13 ; # [ doc = "`read()` method returns [pcr13::R](pcr13::R) reader structure" ] impl crate :: Readable for PCR13 { } # [ doc = "`write(|w| ..)` method takes [pcr13::W](pcr13::W) writer structure" ] impl crate :: Writable for PCR13 { } # [ doc = "Pin Control Register n" ] pub mod pcr13 { # [ doc = "Reader of register PCR13" ] pub type R = crate :: R < u32 , super :: PCR13 > ; # [ doc = "Writer for register PCR13" ] pub type W = crate :: W < u32 , super :: PCR13 > ; # [ doc = "Register PCR13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr14](pcr14) module" ] pub type PCR14 = crate :: Reg < u32 , _PCR14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR14 ; # [ doc = "`read()` method returns [pcr14::R](pcr14::R) reader structure" ] impl crate :: Readable for PCR14 { } # [ doc = "`write(|w| ..)` method takes [pcr14::W](pcr14::W) writer structure" ] impl crate :: Writable for PCR14 { } # [ doc = "Pin Control Register n" ] pub mod pcr14 { # [ doc = "Reader of register PCR14" ] pub type R = crate :: R < u32 , super :: PCR14 > ; # [ doc = "Writer for register PCR14" ] pub type W = crate :: W < u32 , super :: PCR14 > ; # [ doc = "Register PCR14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr15](pcr15) module" ] pub type PCR15 = crate :: Reg < u32 , _PCR15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR15 ; # [ doc = "`read()` method returns [pcr15::R](pcr15::R) reader structure" ] impl crate :: Readable for PCR15 { } # [ doc = "`write(|w| ..)` method takes [pcr15::W](pcr15::W) writer structure" ] impl crate :: Writable for PCR15 { } # [ doc = "Pin Control Register n" ] pub mod pcr15 { # [ doc = "Reader of register PCR15" ] pub type R = crate :: R < u32 , super :: PCR15 > ; # [ doc = "Writer for register PCR15" ] pub type W = crate :: W < u32 , super :: PCR15 > ; # [ doc = "Register PCR15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr16](pcr16) module" ] pub type PCR16 = crate :: Reg < u32 , _PCR16 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR16 ; # [ doc = "`read()` method returns [pcr16::R](pcr16::R) reader structure" ] impl crate :: Readable for PCR16 { } # [ doc = "`write(|w| ..)` method takes [pcr16::W](pcr16::W) writer structure" ] impl crate :: Writable for PCR16 { } # [ doc = "Pin Control Register n" ] pub mod pcr16 { # [ doc = "Reader of register PCR16" ] pub type R = crate :: R < u32 , super :: PCR16 > ; # [ doc = "Writer for register PCR16" ] pub type W = crate :: W < u32 , super :: PCR16 > ; # [ doc = "Register PCR16 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR16 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr17](pcr17) module" ] pub type PCR17 = crate :: Reg < u32 , _PCR17 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR17 ; # [ doc = "`read()` method returns [pcr17::R](pcr17::R) reader structure" ] impl crate :: Readable for PCR17 { } # [ doc = "`write(|w| ..)` method takes [pcr17::W](pcr17::W) writer structure" ] impl crate :: Writable for PCR17 { } # [ doc = "Pin Control Register n" ] pub mod pcr17 { # [ doc = "Reader of register PCR17" ] pub type R = crate :: R < u32 , super :: PCR17 > ; # [ doc = "Writer for register PCR17" ] pub type W = crate :: W < u32 , super :: PCR17 > ; # [ doc = "Register PCR17 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR17 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr18](pcr18) module" ] pub type PCR18 = crate :: Reg < u32 , _PCR18 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR18 ; # [ doc = "`read()` method returns [pcr18::R](pcr18::R) reader structure" ] impl crate :: Readable for PCR18 { } # [ doc = "`write(|w| ..)` method takes [pcr18::W](pcr18::W) writer structure" ] impl crate :: Writable for PCR18 { } # [ doc = "Pin Control Register n" ] pub mod pcr18 { # [ doc = "Reader of register PCR18" ] pub type R = crate :: R < u32 , super :: PCR18 > ; # [ doc = "Writer for register PCR18" ] pub type W = crate :: W < u32 , super :: PCR18 > ; # [ doc = "Register PCR18 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR18 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr19](pcr19) module" ] pub type PCR19 = crate :: Reg < u32 , _PCR19 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR19 ; # [ doc = "`read()` method returns [pcr19::R](pcr19::R) reader structure" ] impl crate :: Readable for PCR19 { } # [ doc = "`write(|w| ..)` method takes [pcr19::W](pcr19::W) writer structure" ] impl crate :: Writable for PCR19 { } # [ doc = "Pin Control Register n" ] pub mod pcr19 { # [ doc = "Reader of register PCR19" ] pub type R = crate :: R < u32 , super :: PCR19 > ; # [ doc = "Writer for register PCR19" ] pub type W = crate :: W < u32 , super :: PCR19 > ; # [ doc = "Register PCR19 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR19 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr20](pcr20) module" ] pub type PCR20 = crate :: Reg < u32 , _PCR20 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR20 ; # [ doc = "`read()` method returns [pcr20::R](pcr20::R) reader structure" ] impl crate :: Readable for PCR20 { } # [ doc = "`write(|w| ..)` method takes [pcr20::W](pcr20::W) writer structure" ] impl crate :: Writable for PCR20 { } # [ doc = "Pin Control Register n" ] pub mod pcr20 { # [ doc = "Reader of register PCR20" ] pub type R = crate :: R < u32 , super :: PCR20 > ; # [ doc = "Writer for register PCR20" ] pub type W = crate :: W < u32 , super :: PCR20 > ; # [ doc = "Register PCR20 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR20 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr21](pcr21) module" ] pub type PCR21 = crate :: Reg < u32 , _PCR21 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR21 ; # [ doc = "`read()` method returns [pcr21::R](pcr21::R) reader structure" ] impl crate :: Readable for PCR21 { } # [ doc = "`write(|w| ..)` method takes [pcr21::W](pcr21::W) writer structure" ] impl crate :: Writable for PCR21 { } # [ doc = "Pin Control Register n" ] pub mod pcr21 { # [ doc = "Reader of register PCR21" ] pub type R = crate :: R < u32 , super :: PCR21 > ; # [ doc = "Writer for register PCR21" ] pub type W = crate :: W < u32 , super :: PCR21 > ; # [ doc = "Register PCR21 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR21 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr22](pcr22) module" ] pub type PCR22 = crate :: Reg < u32 , _PCR22 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR22 ; # [ doc = "`read()` method returns [pcr22::R](pcr22::R) reader structure" ] impl crate :: Readable for PCR22 { } # [ doc = "`write(|w| ..)` method takes [pcr22::W](pcr22::W) writer structure" ] impl crate :: Writable for PCR22 { } # [ doc = "Pin Control Register n" ] pub mod pcr22 { # [ doc = "Reader of register PCR22" ] pub type R = crate :: R < u32 , super :: PCR22 > ; # [ doc = "Writer for register PCR22" ] pub type W = crate :: W < u32 , super :: PCR22 > ; # [ doc = "Register PCR22 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR22 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr23](pcr23) module" ] pub type PCR23 = crate :: Reg < u32 , _PCR23 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR23 ; # [ doc = "`read()` method returns [pcr23::R](pcr23::R) reader structure" ] impl crate :: Readable for PCR23 { } # [ doc = "`write(|w| ..)` method takes [pcr23::W](pcr23::W) writer structure" ] impl crate :: Writable for PCR23 { } # [ doc = "Pin Control Register n" ] pub mod pcr23 { # [ doc = "Reader of register PCR23" ] pub type R = crate :: R < u32 , super :: PCR23 > ; # [ doc = "Writer for register PCR23" ] pub type W = crate :: W < u32 , super :: PCR23 > ; # [ doc = "Register PCR23 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR23 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr24](pcr24) module" ] pub type PCR24 = crate :: Reg < u32 , _PCR24 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR24 ; # [ doc = "`read()` method returns [pcr24::R](pcr24::R) reader structure" ] impl crate :: Readable for PCR24 { } # [ doc = "`write(|w| ..)` method takes [pcr24::W](pcr24::W) writer structure" ] impl crate :: Writable for PCR24 { } # [ doc = "Pin Control Register n" ] pub mod pcr24 { # [ doc = "Reader of register PCR24" ] pub type R = crate :: R < u32 , super :: PCR24 > ; # [ doc = "Writer for register PCR24" ] pub type W = crate :: W < u32 , super :: PCR24 > ; # [ doc = "Register PCR24 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR24 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr25](pcr25) module" ] pub type PCR25 = crate :: Reg < u32 , _PCR25 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR25 ; # [ doc = "`read()` method returns [pcr25::R](pcr25::R) reader structure" ] impl crate :: Readable for PCR25 { } # [ doc = "`write(|w| ..)` method takes [pcr25::W](pcr25::W) writer structure" ] impl crate :: Writable for PCR25 { } # [ doc = "Pin Control Register n" ] pub mod pcr25 { # [ doc = "Reader of register PCR25" ] pub type R = crate :: R < u32 , super :: PCR25 > ; # [ doc = "Writer for register PCR25" ] pub type W = crate :: W < u32 , super :: PCR25 > ; # [ doc = "Register PCR25 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR25 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr26](pcr26) module" ] pub type PCR26 = crate :: Reg < u32 , _PCR26 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR26 ; # [ doc = "`read()` method returns [pcr26::R](pcr26::R) reader structure" ] impl crate :: Readable for PCR26 { } # [ doc = "`write(|w| ..)` method takes [pcr26::W](pcr26::W) writer structure" ] impl crate :: Writable for PCR26 { } # [ doc = "Pin Control Register n" ] pub mod pcr26 { # [ doc = "Reader of register PCR26" ] pub type R = crate :: R < u32 , super :: PCR26 > ; # [ doc = "Writer for register PCR26" ] pub type W = crate :: W < u32 , super :: PCR26 > ; # [ doc = "Register PCR26 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR26 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr27](pcr27) module" ] pub type PCR27 = crate :: Reg < u32 , _PCR27 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR27 ; # [ doc = "`read()` method returns [pcr27::R](pcr27::R) reader structure" ] impl crate :: Readable for PCR27 { } # [ doc = "`write(|w| ..)` method takes [pcr27::W](pcr27::W) writer structure" ] impl crate :: Writable for PCR27 { } # [ doc = "Pin Control Register n" ] pub mod pcr27 { # [ doc = "Reader of register PCR27" ] pub type R = crate :: R < u32 , super :: PCR27 > ; # [ doc = "Writer for register PCR27" ] pub type W = crate :: W < u32 , super :: PCR27 > ; # [ doc = "Register PCR27 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR27 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr28](pcr28) module" ] pub type PCR28 = crate :: Reg < u32 , _PCR28 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR28 ; # [ doc = "`read()` method returns [pcr28::R](pcr28::R) reader structure" ] impl crate :: Readable for PCR28 { } # [ doc = "`write(|w| ..)` method takes [pcr28::W](pcr28::W) writer structure" ] impl crate :: Writable for PCR28 { } # [ doc = "Pin Control Register n" ] pub mod pcr28 { # [ doc = "Reader of register PCR28" ] pub type R = crate :: R < u32 , super :: PCR28 > ; # [ doc = "Writer for register PCR28" ] pub type W = crate :: W < u32 , super :: PCR28 > ; # [ doc = "Register PCR28 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR28 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PS_A :: _0 ) } # [ doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Write proxy for field `ODE`" ] pub struct ODE_W < 'a > { w : & 'a mut W , } impl < 'a > ODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Open drain output is disabled on the corresponding pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _0 ) } # [ doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ODE_A :: _1 ) } # [ 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 = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & mut self ) -> ODE_W { ODE_W { w : self } } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr29](pcr29) module" ] pub type PCR29 = crate :: Reg < u32 , _PCR29 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR29 ; # [ doc = "`read()` method returns [pcr29::R](pcr29::R) reader structure" ] impl crate :: Readable for PCR29 { } # [ doc = "`write(|w| ..)` method takes [pcr29::W](pcr29::W) writer structure" ] impl crate :: Writable for PCR29 { } # [ doc = "Pin Control Register n" ] pub mod pcr29 { # [ doc = "Reader of register PCR29" ] pub type R = crate :: R < u32 , super :: PCR29 > ; # [ doc = "Writer for register PCR29" ] pub type W = crate :: W < u32 , super :: PCR29 > ; # [ doc = "Register PCR29 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR29 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr30](pcr30) module" ] pub type PCR30 = crate :: Reg < u32 , _PCR30 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR30 ; # [ doc = "`read()` method returns [pcr30::R](pcr30::R) reader structure" ] impl crate :: Readable for PCR30 { } # [ doc = "`write(|w| ..)` method takes [pcr30::W](pcr30::W) writer structure" ] impl crate :: Writable for PCR30 { } # [ doc = "Pin Control Register n" ] pub mod pcr30 { # [ doc = "Reader of register PCR30" ] pub type R = crate :: R < u32 , super :: PCR30 > ; # [ doc = "Writer for register PCR30" ] pub type W = crate :: W < u32 , super :: PCR30 > ; # [ doc = "Register PCR30 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR30 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Pin Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcr31](pcr31) module" ] pub type PCR31 = crate :: Reg < u32 , _PCR31 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCR31 ; # [ doc = "`read()` method returns [pcr31::R](pcr31::R) reader structure" ] impl crate :: Readable for PCR31 { } # [ doc = "`write(|w| ..)` method takes [pcr31::W](pcr31::W) writer structure" ] impl crate :: Writable for PCR31 { } # [ doc = "Pin Control Register n" ] pub mod pcr31 { # [ doc = "Reader of register PCR31" ] pub type R = crate :: R < u32 , super :: PCR31 > ; # [ doc = "Writer for register PCR31" ] pub type W = crate :: W < u32 , super :: PCR31 > ; # [ doc = "Register PCR31 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCR31 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Pull Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _0 , # [ doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set." ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Pull Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin." ] _0 , # [ doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Slew Rate Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _0 , # [ doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Passive Filter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFE_A { # [ doc = "0: Passive input filter is disabled on the corresponding pin." ] _0 , # [ doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics." ] _1 } impl From < PFE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFE_A ) -> Self { match variant { PFE_A :: _0 => false , PFE_A :: _1 => true } } } # [ doc = "Reader of field `PFE`" ] pub type PFE_R = crate :: R < bool , PFE_A > ; impl PFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFE_A { match self . bits { false => PFE_A :: _0 , true => PFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFE_A :: _1 } } # [ doc = "Open Drain Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ODE_A { # [ doc = "0: Open drain output is disabled on the corresponding pin." ] _0 , # [ doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output." ] _1 } impl From < ODE_A > for bool { # [ inline ( always ) ] fn from ( variant : ODE_A ) -> Self { match variant { ODE_A :: _0 => false , ODE_A :: _1 => true } } } # [ doc = "Reader of field `ODE`" ] pub type ODE_R = crate :: R < bool , ODE_A > ; impl ODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ODE_A { match self . bits { false => ODE_A :: _0 , true => ODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ODE_A :: _1 } } # [ doc = "Drive Strength Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DSE_A { # [ doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _0 , # [ doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output." ] _1 } impl From < DSE_A > for bool { # [ inline ( always ) ] fn from ( variant : DSE_A ) -> Self { match variant { DSE_A :: _0 => false , DSE_A :: _1 => true } } } # [ doc = "Reader of field `DSE`" ] pub type DSE_R = crate :: R < bool , DSE_A > ; impl DSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DSE_A { match self . bits { false => DSE_A :: _0 , true => DSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DSE_A :: _1 } } # [ doc = "Pin Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUX_A { # [ doc = "0: Pin disabled (analog)." ] _000 , # [ doc = "1: Alternative 1 (GPIO)." ] _001 , # [ doc = "2: Alternative 2 (chip-specific)." ] _010 , # [ doc = "3: Alternative 3 (chip-specific)." ] _011 , # [ doc = "4: Alternative 4 (chip-specific)." ] _100 , # [ doc = "5: Alternative 5 (chip-specific)." ] _101 , # [ doc = "6: Alternative 6 (chip-specific)." ] _110 , # [ doc = "7: Alternative 7 (chip-specific)." ] _111 } impl From < MUX_A > for u8 { # [ inline ( always ) ] fn from ( variant : MUX_A ) -> Self { match variant { MUX_A :: _000 => 0 , MUX_A :: _001 => 1 , MUX_A :: _010 => 2 , MUX_A :: _011 => 3 , MUX_A :: _100 => 4 , MUX_A :: _101 => 5 , MUX_A :: _110 => 6 , MUX_A :: _111 => 7 } } } # [ doc = "Reader of field `MUX`" ] pub type MUX_R = crate :: R < u8 , MUX_A > ; impl MUX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUX_A { match self . bits { 0 => MUX_A :: _000 , 1 => MUX_A :: _001 , 2 => MUX_A :: _010 , 3 => MUX_A :: _011 , 4 => MUX_A :: _100 , 5 => MUX_A :: _101 , 6 => MUX_A :: _110 , 7 => MUX_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MUX_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MUX_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MUX_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MUX_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MUX_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MUX_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MUX_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MUX_A :: _111 } } # [ doc = "Write proxy for field `MUX`" ] pub struct MUX_W < 'a > { w : & 'a mut W , } impl < 'a > MUX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUX_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Pin disabled (analog)." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _000 ) } # [ doc = "Alternative 1 (GPIO)." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _001 ) } # [ doc = "Alternative 2 (chip-specific)." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _010 ) } # [ doc = "Alternative 3 (chip-specific)." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _011 ) } # [ doc = "Alternative 4 (chip-specific)." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _100 ) } # [ doc = "Alternative 5 (chip-specific)." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _101 ) } # [ doc = "Alternative 6 (chip-specific)." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _110 ) } # [ doc = "Alternative 7 (chip-specific)." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MUX_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Lock Register\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LK_A { # [ doc = "0: Pin Control Register fields \\[15:0\\] are not locked." ] _0 , # [ doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] _1 } impl From < LK_A > for bool { # [ inline ( always ) ] fn from ( variant : LK_A ) -> Self { match variant { LK_A :: _0 => false , LK_A :: _1 => true } } } # [ doc = "Reader of field `LK`" ] pub type LK_R = crate :: R < bool , LK_A > ; impl LK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LK_A { match self . bits { false => LK_A :: _0 , true => LK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LK_A :: _1 } } # [ doc = "Write proxy for field `LK`" ] pub struct LK_W < 'a > { w : & 'a mut W , } impl < 'a > LK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Control Register fields \\[15:0\\] are not locked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LK_A :: _0 ) } # [ doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LK_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQC_A { # [ doc = "0: Interrupt Status Flag (ISF) is disabled." ] _0000 , # [ doc = "1: ISF flag and DMA request on rising edge." ] _0001 , # [ doc = "2: ISF flag and DMA request on falling edge." ] _0010 , # [ doc = "3: ISF flag and DMA request on either edge." ] _0011 , # [ doc = "8: ISF flag and Interrupt when logic 0." ] _1000 , # [ doc = "9: ISF flag and Interrupt on rising-edge." ] _1001 , # [ doc = "10: ISF flag and Interrupt on falling-edge." ] _1010 , # [ doc = "11: ISF flag and Interrupt on either edge." ] _1011 , # [ doc = "12: ISF flag and Interrupt when logic 1." ] _1100 } impl From < IRQC_A > for u8 { # [ inline ( always ) ] fn from ( variant : IRQC_A ) -> Self { match variant { IRQC_A :: _0000 => 0 , IRQC_A :: _0001 => 1 , IRQC_A :: _0010 => 2 , IRQC_A :: _0011 => 3 , IRQC_A :: _1000 => 8 , IRQC_A :: _1001 => 9 , IRQC_A :: _1010 => 10 , IRQC_A :: _1011 => 11 , IRQC_A :: _1100 => 12 } } } # [ doc = "Reader of field `IRQC`" ] pub type IRQC_R = crate :: R < u8 , IRQC_A > ; impl IRQC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IRQC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IRQC_A :: _0000 ) , 1 => Val ( IRQC_A :: _0001 ) , 2 => Val ( IRQC_A :: _0010 ) , 3 => Val ( IRQC_A :: _0011 ) , 8 => Val ( IRQC_A :: _1000 ) , 9 => Val ( IRQC_A :: _1001 ) , 10 => Val ( IRQC_A :: _1010 ) , 11 => Val ( IRQC_A :: _1011 ) , 12 => Val ( IRQC_A :: _1100 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == IRQC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == IRQC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == IRQC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == IRQC_A :: _0011 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == IRQC_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == IRQC_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == IRQC_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == IRQC_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == IRQC_A :: _1100 } } # [ doc = "Write proxy for field `IRQC`" ] pub struct IRQC_W < 'a > { w : & 'a mut W , } impl < 'a > IRQC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Interrupt Status Flag (ISF) is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0000 ) } # [ doc = "ISF flag and DMA request on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0001 ) } # [ doc = "ISF flag and DMA request on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0010 ) } # [ doc = "ISF flag and DMA request on either edge." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _0011 ) } # [ doc = "ISF flag and Interrupt when logic 0." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1000 ) } # [ doc = "ISF flag and Interrupt on rising-edge." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1001 ) } # [ doc = "ISF flag and Interrupt on falling-edge." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1010 ) } # [ doc = "ISF flag and Interrupt on either edge." ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1011 ) } # [ doc = "ISF flag and Interrupt when logic 1." ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( IRQC_A :: _1100 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF_A ) -> Self { match variant { ISF_A :: _0 => false , ISF_A :: _1 => true } } } # [ doc = "Reader of field `ISF`" ] pub type ISF_R = crate :: R < bool , ISF_A > ; impl ISF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF_A { match self . bits { false => ISF_A :: _0 , true => ISF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF_A :: _1 } } # [ doc = "Write proxy for field `ISF`" ] pub struct ISF_W < 'a > { w : & 'a mut W , } impl < 'a > ISF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Pull Select" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Pull Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slew Rate Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Passive Filter Enable" ] # [ inline ( always ) ] pub fn pfe ( & self ) -> PFE_R { PFE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Open Drain Enable" ] # [ inline ( always ) ] pub fn ode ( & self ) -> ODE_R { ODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Drive Strength Enable" ] # [ inline ( always ) ] pub fn dse ( & self ) -> DSE_R { DSE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & self ) -> MUX_R { MUX_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & self ) -> LK_R { LK_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & self ) -> IRQC_R { IRQC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & self ) -> ISF_R { ISF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 8:10 - Pin Mux Control" ] # [ inline ( always ) ] pub fn mux ( & mut self ) -> MUX_W { MUX_W { w : self } } # [ doc = "Bit 15 - Lock Register" ] # [ inline ( always ) ] pub fn lk ( & mut self ) -> LK_W { LK_W { w : self } } # [ doc = "Bits 16:19 - Interrupt Configuration" ] # [ inline ( always ) ] pub fn irqc ( & mut self ) -> IRQC_W { IRQC_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf ( & mut self ) -> ISF_W { ISF_W { w : self } } } } # [ doc = "Global Pin Control Low Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpclr](gpclr) module" ] pub type GPCLR = crate :: Reg < u32 , _GPCLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCLR ; # [ doc = "`write(|w| ..)` method takes [gpclr::W](gpclr::W) writer structure" ] impl crate :: Writable for GPCLR { } # [ doc = "Global Pin Control Low Register" ] pub mod gpclr { # [ doc = "Writer for register GPCLR" ] pub type W = crate :: W < u32 , super :: GPCLR > ; # [ doc = "Register GPCLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Global Pin Control High Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpchr](gpchr) module" ] pub type GPCHR = crate :: Reg < u32 , _GPCHR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPCHR ; # [ doc = "`write(|w| ..)` method takes [gpchr::W](gpchr::W) writer structure" ] impl crate :: Writable for GPCHR { } # [ doc = "Global Pin Control High Register" ] pub mod gpchr { # [ doc = "Writer for register GPCHR" ] pub type W = crate :: W < u32 , super :: GPCHR > ; # [ doc = "Register GPCHR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPCHR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `GPWD`" ] pub struct GPWD_W < 'a > { w : & 'a mut W , } impl < 'a > GPWD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE0_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE0_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE0_AW ) -> Self { match variant { GPWE0_AW :: _0 => false , GPWE0_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE0`" ] pub struct GPWE0_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE0_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE1_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE1_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE1_AW ) -> Self { match variant { GPWE1_AW :: _0 => false , GPWE1_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE1`" ] pub struct GPWE1_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE1_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE2_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE2_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE2_AW ) -> Self { match variant { GPWE2_AW :: _0 => false , GPWE2_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE2`" ] pub struct GPWE2_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE2_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE3_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE3_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE3_AW ) -> Self { match variant { GPWE3_AW :: _0 => false , GPWE3_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE3`" ] pub struct GPWE3_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE3_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE4_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE4_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE4_AW ) -> Self { match variant { GPWE4_AW :: _0 => false , GPWE4_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE4`" ] pub struct GPWE4_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE4_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE5_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE5_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE5_AW ) -> Self { match variant { GPWE5_AW :: _0 => false , GPWE5_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE5`" ] pub struct GPWE5_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE5_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE6_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE6_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE6_AW ) -> Self { match variant { GPWE6_AW :: _0 => false , GPWE6_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE6`" ] pub struct GPWE6_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE6_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE7_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE7_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE7_AW ) -> Self { match variant { GPWE7_AW :: _0 => false , GPWE7_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE7`" ] pub struct GPWE7_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE7_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE8_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE8_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE8_AW ) -> Self { match variant { GPWE8_AW :: _0 => false , GPWE8_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE8`" ] pub struct GPWE8_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE8_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE9_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE9_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE9_AW ) -> Self { match variant { GPWE9_AW :: _0 => false , GPWE9_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE9`" ] pub struct GPWE9_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE9_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE10_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE10_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE10_AW ) -> Self { match variant { GPWE10_AW :: _0 => false , GPWE10_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE10`" ] pub struct GPWE10_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE10_AW :: _1 ) } # [ 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 = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE11_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE11_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE11_AW ) -> Self { match variant { GPWE11_AW :: _0 => false , GPWE11_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE11`" ] pub struct GPWE11_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE11_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE12_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE12_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE12_AW ) -> Self { match variant { GPWE12_AW :: _0 => false , GPWE12_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE12`" ] pub struct GPWE12_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE12_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE13_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE13_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE13_AW ) -> Self { match variant { GPWE13_AW :: _0 => false , GPWE13_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE13`" ] pub struct GPWE13_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE13_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE14_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE14_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE14_AW ) -> Self { match variant { GPWE14_AW :: _0 => false , GPWE14_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE14`" ] pub struct GPWE14_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE14_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Global Pin Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GPWE15_AW { # [ doc = "0: Corresponding Pin Control Register is not updated with the value in GPWD." ] _0 , # [ doc = "1: Corresponding Pin Control Register is updated with the value in GPWD." ] _1 } impl From < GPWE15_AW > for bool { # [ inline ( always ) ] fn from ( variant : GPWE15_AW ) -> Self { match variant { GPWE15_AW :: _0 => false , GPWE15_AW :: _1 => true } } } # [ doc = "Write proxy for field `GPWE15`" ] pub struct GPWE15_W < 'a > { w : & 'a mut W , } impl < 'a > GPWE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GPWE15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding Pin Control Register is not updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _0 ) } # [ doc = "Corresponding Pin Control Register is updated with the value in GPWD." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GPWE15_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bits 0:15 - Global Pin Write Data" ] # [ inline ( always ) ] pub fn gpwd ( & mut self ) -> GPWD_W { GPWD_W { w : self } } # [ doc = "Bit 16 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe0 ( & mut self ) -> GPWE0_W { GPWE0_W { w : self } } # [ doc = "Bit 17 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe1 ( & mut self ) -> GPWE1_W { GPWE1_W { w : self } } # [ doc = "Bit 18 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe2 ( & mut self ) -> GPWE2_W { GPWE2_W { w : self } } # [ doc = "Bit 19 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe3 ( & mut self ) -> GPWE3_W { GPWE3_W { w : self } } # [ doc = "Bit 20 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe4 ( & mut self ) -> GPWE4_W { GPWE4_W { w : self } } # [ doc = "Bit 21 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe5 ( & mut self ) -> GPWE5_W { GPWE5_W { w : self } } # [ doc = "Bit 22 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe6 ( & mut self ) -> GPWE6_W { GPWE6_W { w : self } } # [ doc = "Bit 23 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe7 ( & mut self ) -> GPWE7_W { GPWE7_W { w : self } } # [ doc = "Bit 24 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe8 ( & mut self ) -> GPWE8_W { GPWE8_W { w : self } } # [ doc = "Bit 25 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe9 ( & mut self ) -> GPWE9_W { GPWE9_W { w : self } } # [ doc = "Bit 26 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe10 ( & mut self ) -> GPWE10_W { GPWE10_W { w : self } } # [ doc = "Bit 27 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe11 ( & mut self ) -> GPWE11_W { GPWE11_W { w : self } } # [ doc = "Bit 28 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe12 ( & mut self ) -> GPWE12_W { GPWE12_W { w : self } } # [ doc = "Bit 29 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe13 ( & mut self ) -> GPWE13_W { GPWE13_W { w : self } } # [ doc = "Bit 30 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe14 ( & mut self ) -> GPWE14_W { GPWE14_W { w : self } } # [ doc = "Bit 31 - Global Pin Write Enable" ] # [ inline ( always ) ] pub fn gpwe15 ( & mut self ) -> GPWE15_W { GPWE15_W { w : self } } } } # [ doc = "Interrupt Status Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [isfr](isfr) module" ] pub type ISFR = crate :: Reg < u32 , _ISFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ISFR ; # [ doc = "`read()` method returns [isfr::R](isfr::R) reader structure" ] impl crate :: Readable for ISFR { } # [ doc = "`write(|w| ..)` method takes [isfr::W](isfr::W) writer structure" ] impl crate :: Writable for ISFR { } # [ doc = "Interrupt Status Flag Register" ] pub mod isfr { # [ doc = "Reader of register ISFR" ] pub type R = crate :: R < u32 , super :: ISFR > ; # [ doc = "Writer for register ISFR" ] pub type W = crate :: W < u32 , super :: ISFR > ; # [ doc = "Register ISFR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ISFR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF0_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF0_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF0_A ) -> Self { match variant { ISF0_A :: _0 => false , ISF0_A :: _1 => true } } } # [ doc = "Reader of field `ISF0`" ] pub type ISF0_R = crate :: R < bool , ISF0_A > ; impl ISF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF0_A { match self . bits { false => ISF0_A :: _0 , true => ISF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF0_A :: _1 } } # [ doc = "Write proxy for field `ISF0`" ] pub struct ISF0_W < 'a > { w : & 'a mut W , } impl < 'a > ISF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF1_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF1_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF1_A ) -> Self { match variant { ISF1_A :: _0 => false , ISF1_A :: _1 => true } } } # [ doc = "Reader of field `ISF1`" ] pub type ISF1_R = crate :: R < bool , ISF1_A > ; impl ISF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF1_A { match self . bits { false => ISF1_A :: _0 , true => ISF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF1_A :: _1 } } # [ doc = "Write proxy for field `ISF1`" ] pub struct ISF1_W < 'a > { w : & 'a mut W , } impl < 'a > ISF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF1_A :: _1 ) } # [ 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 } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF2_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF2_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF2_A ) -> Self { match variant { ISF2_A :: _0 => false , ISF2_A :: _1 => true } } } # [ doc = "Reader of field `ISF2`" ] pub type ISF2_R = crate :: R < bool , ISF2_A > ; impl ISF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF2_A { match self . bits { false => ISF2_A :: _0 , true => ISF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF2_A :: _1 } } # [ doc = "Write proxy for field `ISF2`" ] pub struct ISF2_W < 'a > { w : & 'a mut W , } impl < 'a > ISF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF2_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF3_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF3_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF3_A ) -> Self { match variant { ISF3_A :: _0 => false , ISF3_A :: _1 => true } } } # [ doc = "Reader of field `ISF3`" ] pub type ISF3_R = crate :: R < bool , ISF3_A > ; impl ISF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF3_A { match self . bits { false => ISF3_A :: _0 , true => ISF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF3_A :: _1 } } # [ doc = "Write proxy for field `ISF3`" ] pub struct ISF3_W < 'a > { w : & 'a mut W , } impl < 'a > ISF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF4_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF4_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF4_A ) -> Self { match variant { ISF4_A :: _0 => false , ISF4_A :: _1 => true } } } # [ doc = "Reader of field `ISF4`" ] pub type ISF4_R = crate :: R < bool , ISF4_A > ; impl ISF4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF4_A { match self . bits { false => ISF4_A :: _0 , true => ISF4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF4_A :: _1 } } # [ doc = "Write proxy for field `ISF4`" ] pub struct ISF4_W < 'a > { w : & 'a mut W , } impl < 'a > ISF4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF5_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF5_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF5_A ) -> Self { match variant { ISF5_A :: _0 => false , ISF5_A :: _1 => true } } } # [ doc = "Reader of field `ISF5`" ] pub type ISF5_R = crate :: R < bool , ISF5_A > ; impl ISF5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF5_A { match self . bits { false => ISF5_A :: _0 , true => ISF5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF5_A :: _1 } } # [ doc = "Write proxy for field `ISF5`" ] pub struct ISF5_W < 'a > { w : & 'a mut W , } impl < 'a > ISF5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF5_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF6_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF6_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF6_A ) -> Self { match variant { ISF6_A :: _0 => false , ISF6_A :: _1 => true } } } # [ doc = "Reader of field `ISF6`" ] pub type ISF6_R = crate :: R < bool , ISF6_A > ; impl ISF6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF6_A { match self . bits { false => ISF6_A :: _0 , true => ISF6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF6_A :: _1 } } # [ doc = "Write proxy for field `ISF6`" ] pub struct ISF6_W < 'a > { w : & 'a mut W , } impl < 'a > ISF6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF6_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF7_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF7_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF7_A ) -> Self { match variant { ISF7_A :: _0 => false , ISF7_A :: _1 => true } } } # [ doc = "Reader of field `ISF7`" ] pub type ISF7_R = crate :: R < bool , ISF7_A > ; impl ISF7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF7_A { match self . bits { false => ISF7_A :: _0 , true => ISF7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF7_A :: _1 } } # [ doc = "Write proxy for field `ISF7`" ] pub struct ISF7_W < 'a > { w : & 'a mut W , } impl < 'a > ISF7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF7_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF8_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF8_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF8_A ) -> Self { match variant { ISF8_A :: _0 => false , ISF8_A :: _1 => true } } } # [ doc = "Reader of field `ISF8`" ] pub type ISF8_R = crate :: R < bool , ISF8_A > ; impl ISF8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF8_A { match self . bits { false => ISF8_A :: _0 , true => ISF8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF8_A :: _1 } } # [ doc = "Write proxy for field `ISF8`" ] pub struct ISF8_W < 'a > { w : & 'a mut W , } impl < 'a > ISF8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF9_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF9_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF9_A ) -> Self { match variant { ISF9_A :: _0 => false , ISF9_A :: _1 => true } } } # [ doc = "Reader of field `ISF9`" ] pub type ISF9_R = crate :: R < bool , ISF9_A > ; impl ISF9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF9_A { match self . bits { false => ISF9_A :: _0 , true => ISF9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF9_A :: _1 } } # [ doc = "Write proxy for field `ISF9`" ] pub struct ISF9_W < 'a > { w : & 'a mut W , } impl < 'a > ISF9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF10_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF10_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF10_A ) -> Self { match variant { ISF10_A :: _0 => false , ISF10_A :: _1 => true } } } # [ doc = "Reader of field `ISF10`" ] pub type ISF10_R = crate :: R < bool , ISF10_A > ; impl ISF10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF10_A { match self . bits { false => ISF10_A :: _0 , true => ISF10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF10_A :: _1 } } # [ doc = "Write proxy for field `ISF10`" ] pub struct ISF10_W < 'a > { w : & 'a mut W , } impl < 'a > ISF10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF11_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF11_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF11_A ) -> Self { match variant { ISF11_A :: _0 => false , ISF11_A :: _1 => true } } } # [ doc = "Reader of field `ISF11`" ] pub type ISF11_R = crate :: R < bool , ISF11_A > ; impl ISF11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF11_A { match self . bits { false => ISF11_A :: _0 , true => ISF11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF11_A :: _1 } } # [ doc = "Write proxy for field `ISF11`" ] pub struct ISF11_W < 'a > { w : & 'a mut W , } impl < 'a > ISF11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF12_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF12_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF12_A ) -> Self { match variant { ISF12_A :: _0 => false , ISF12_A :: _1 => true } } } # [ doc = "Reader of field `ISF12`" ] pub type ISF12_R = crate :: R < bool , ISF12_A > ; impl ISF12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF12_A { match self . bits { false => ISF12_A :: _0 , true => ISF12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF12_A :: _1 } } # [ doc = "Write proxy for field `ISF12`" ] pub struct ISF12_W < 'a > { w : & 'a mut W , } impl < 'a > ISF12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF13_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF13_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF13_A ) -> Self { match variant { ISF13_A :: _0 => false , ISF13_A :: _1 => true } } } # [ doc = "Reader of field `ISF13`" ] pub type ISF13_R = crate :: R < bool , ISF13_A > ; impl ISF13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF13_A { match self . bits { false => ISF13_A :: _0 , true => ISF13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF13_A :: _1 } } # [ doc = "Write proxy for field `ISF13`" ] pub struct ISF13_W < 'a > { w : & 'a mut W , } impl < 'a > ISF13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF13_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF14_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF14_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF14_A ) -> Self { match variant { ISF14_A :: _0 => false , ISF14_A :: _1 => true } } } # [ doc = "Reader of field `ISF14`" ] pub type ISF14_R = crate :: R < bool , ISF14_A > ; impl ISF14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF14_A { match self . bits { false => ISF14_A :: _0 , true => ISF14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF14_A :: _1 } } # [ doc = "Write proxy for field `ISF14`" ] pub struct ISF14_W < 'a > { w : & 'a mut W , } impl < 'a > ISF14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF15_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF15_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF15_A ) -> Self { match variant { ISF15_A :: _0 => false , ISF15_A :: _1 => true } } } # [ doc = "Reader of field `ISF15`" ] pub type ISF15_R = crate :: R < bool , ISF15_A > ; impl ISF15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF15_A { match self . bits { false => ISF15_A :: _0 , true => ISF15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF15_A :: _1 } } # [ doc = "Write proxy for field `ISF15`" ] pub struct ISF15_W < 'a > { w : & 'a mut W , } impl < 'a > ISF15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF16_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF16_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF16_A ) -> Self { match variant { ISF16_A :: _0 => false , ISF16_A :: _1 => true } } } # [ doc = "Reader of field `ISF16`" ] pub type ISF16_R = crate :: R < bool , ISF16_A > ; impl ISF16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF16_A { match self . bits { false => ISF16_A :: _0 , true => ISF16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF16_A :: _1 } } # [ doc = "Write proxy for field `ISF16`" ] pub struct ISF16_W < 'a > { w : & 'a mut W , } impl < 'a > ISF16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF17_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF17_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF17_A ) -> Self { match variant { ISF17_A :: _0 => false , ISF17_A :: _1 => true } } } # [ doc = "Reader of field `ISF17`" ] pub type ISF17_R = crate :: R < bool , ISF17_A > ; impl ISF17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF17_A { match self . bits { false => ISF17_A :: _0 , true => ISF17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF17_A :: _1 } } # [ doc = "Write proxy for field `ISF17`" ] pub struct ISF17_W < 'a > { w : & 'a mut W , } impl < 'a > ISF17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF18_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF18_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF18_A ) -> Self { match variant { ISF18_A :: _0 => false , ISF18_A :: _1 => true } } } # [ doc = "Reader of field `ISF18`" ] pub type ISF18_R = crate :: R < bool , ISF18_A > ; impl ISF18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF18_A { match self . bits { false => ISF18_A :: _0 , true => ISF18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF18_A :: _1 } } # [ doc = "Write proxy for field `ISF18`" ] pub struct ISF18_W < 'a > { w : & 'a mut W , } impl < 'a > ISF18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF19_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF19_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF19_A ) -> Self { match variant { ISF19_A :: _0 => false , ISF19_A :: _1 => true } } } # [ doc = "Reader of field `ISF19`" ] pub type ISF19_R = crate :: R < bool , ISF19_A > ; impl ISF19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF19_A { match self . bits { false => ISF19_A :: _0 , true => ISF19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF19_A :: _1 } } # [ doc = "Write proxy for field `ISF19`" ] pub struct ISF19_W < 'a > { w : & 'a mut W , } impl < 'a > ISF19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF20_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF20_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF20_A ) -> Self { match variant { ISF20_A :: _0 => false , ISF20_A :: _1 => true } } } # [ doc = "Reader of field `ISF20`" ] pub type ISF20_R = crate :: R < bool , ISF20_A > ; impl ISF20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF20_A { match self . bits { false => ISF20_A :: _0 , true => ISF20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF20_A :: _1 } } # [ doc = "Write proxy for field `ISF20`" ] pub struct ISF20_W < 'a > { w : & 'a mut W , } impl < 'a > ISF20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF20_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF21_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF21_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF21_A ) -> Self { match variant { ISF21_A :: _0 => false , ISF21_A :: _1 => true } } } # [ doc = "Reader of field `ISF21`" ] pub type ISF21_R = crate :: R < bool , ISF21_A > ; impl ISF21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF21_A { match self . bits { false => ISF21_A :: _0 , true => ISF21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF21_A :: _1 } } # [ doc = "Write proxy for field `ISF21`" ] pub struct ISF21_W < 'a > { w : & 'a mut W , } impl < 'a > ISF21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF21_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF22_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF22_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF22_A ) -> Self { match variant { ISF22_A :: _0 => false , ISF22_A :: _1 => true } } } # [ doc = "Reader of field `ISF22`" ] pub type ISF22_R = crate :: R < bool , ISF22_A > ; impl ISF22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF22_A { match self . bits { false => ISF22_A :: _0 , true => ISF22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF22_A :: _1 } } # [ doc = "Write proxy for field `ISF22`" ] pub struct ISF22_W < 'a > { w : & 'a mut W , } impl < 'a > ISF22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF23_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF23_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF23_A ) -> Self { match variant { ISF23_A :: _0 => false , ISF23_A :: _1 => true } } } # [ doc = "Reader of field `ISF23`" ] pub type ISF23_R = crate :: R < bool , ISF23_A > ; impl ISF23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF23_A { match self . bits { false => ISF23_A :: _0 , true => ISF23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF23_A :: _1 } } # [ doc = "Write proxy for field `ISF23`" ] pub struct ISF23_W < 'a > { w : & 'a mut W , } impl < 'a > ISF23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF24_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF24_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF24_A ) -> Self { match variant { ISF24_A :: _0 => false , ISF24_A :: _1 => true } } } # [ doc = "Reader of field `ISF24`" ] pub type ISF24_R = crate :: R < bool , ISF24_A > ; impl ISF24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF24_A { match self . bits { false => ISF24_A :: _0 , true => ISF24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF24_A :: _1 } } # [ doc = "Write proxy for field `ISF24`" ] pub struct ISF24_W < 'a > { w : & 'a mut W , } impl < 'a > ISF24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF24_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF25_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF25_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF25_A ) -> Self { match variant { ISF25_A :: _0 => false , ISF25_A :: _1 => true } } } # [ doc = "Reader of field `ISF25`" ] pub type ISF25_R = crate :: R < bool , ISF25_A > ; impl ISF25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF25_A { match self . bits { false => ISF25_A :: _0 , true => ISF25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF25_A :: _1 } } # [ doc = "Write proxy for field `ISF25`" ] pub struct ISF25_W < 'a > { w : & 'a mut W , } impl < 'a > ISF25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF25_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF26_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF26_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF26_A ) -> Self { match variant { ISF26_A :: _0 => false , ISF26_A :: _1 => true } } } # [ doc = "Reader of field `ISF26`" ] pub type ISF26_R = crate :: R < bool , ISF26_A > ; impl ISF26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF26_A { match self . bits { false => ISF26_A :: _0 , true => ISF26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF26_A :: _1 } } # [ doc = "Write proxy for field `ISF26`" ] pub struct ISF26_W < 'a > { w : & 'a mut W , } impl < 'a > ISF26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF26_A :: _1 ) } # [ 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 = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF27_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF27_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF27_A ) -> Self { match variant { ISF27_A :: _0 => false , ISF27_A :: _1 => true } } } # [ doc = "Reader of field `ISF27`" ] pub type ISF27_R = crate :: R < bool , ISF27_A > ; impl ISF27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF27_A { match self . bits { false => ISF27_A :: _0 , true => ISF27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF27_A :: _1 } } # [ doc = "Write proxy for field `ISF27`" ] pub struct ISF27_W < 'a > { w : & 'a mut W , } impl < 'a > ISF27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF28_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF28_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF28_A ) -> Self { match variant { ISF28_A :: _0 => false , ISF28_A :: _1 => true } } } # [ doc = "Reader of field `ISF28`" ] pub type ISF28_R = crate :: R < bool , ISF28_A > ; impl ISF28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF28_A { match self . bits { false => ISF28_A :: _0 , true => ISF28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF28_A :: _1 } } # [ doc = "Write proxy for field `ISF28`" ] pub struct ISF28_W < 'a > { w : & 'a mut W , } impl < 'a > ISF28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF29_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF29_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF29_A ) -> Self { match variant { ISF29_A :: _0 => false , ISF29_A :: _1 => true } } } # [ doc = "Reader of field `ISF29`" ] pub type ISF29_R = crate :: R < bool , ISF29_A > ; impl ISF29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF29_A { match self . bits { false => ISF29_A :: _0 , true => ISF29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF29_A :: _1 } } # [ doc = "Write proxy for field `ISF29`" ] pub struct ISF29_W < 'a > { w : & 'a mut W , } impl < 'a > ISF29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF30_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF30_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF30_A ) -> Self { match variant { ISF30_A :: _0 => false , ISF30_A :: _1 => true } } } # [ doc = "Reader of field `ISF30`" ] pub type ISF30_R = crate :: R < bool , ISF30_A > ; impl ISF30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF30_A { match self . bits { false => ISF30_A :: _0 , true => ISF30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF30_A :: _1 } } # [ doc = "Write proxy for field `ISF30`" ] pub struct ISF30_W < 'a > { w : & 'a mut W , } impl < 'a > ISF30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Interrupt Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISF31_A { # [ doc = "0: Configured interrupt is not detected." ] _0 , # [ doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] _1 } impl From < ISF31_A > for bool { # [ inline ( always ) ] fn from ( variant : ISF31_A ) -> Self { match variant { ISF31_A :: _0 => false , ISF31_A :: _1 => true } } } # [ doc = "Reader of field `ISF31`" ] pub type ISF31_R = crate :: R < bool , ISF31_A > ; impl ISF31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISF31_A { match self . bits { false => ISF31_A :: _0 , true => ISF31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISF31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISF31_A :: _1 } } # [ doc = "Write proxy for field `ISF31`" ] pub struct ISF31_W < 'a > { w : & 'a mut W , } impl < 'a > ISF31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISF31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configured interrupt is not detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _0 ) } # [ doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISF31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & self ) -> ISF0_R { ISF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & self ) -> ISF1_R { ISF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & self ) -> ISF2_R { ISF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & self ) -> ISF3_R { ISF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & self ) -> ISF4_R { ISF4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & self ) -> ISF5_R { ISF5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & self ) -> ISF6_R { ISF6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & self ) -> ISF7_R { ISF7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & self ) -> ISF8_R { ISF8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & self ) -> ISF9_R { ISF9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & self ) -> ISF10_R { ISF10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & self ) -> ISF11_R { ISF11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & self ) -> ISF12_R { ISF12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & self ) -> ISF13_R { ISF13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & self ) -> ISF14_R { ISF14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & self ) -> ISF15_R { ISF15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & self ) -> ISF16_R { ISF16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & self ) -> ISF17_R { ISF17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & self ) -> ISF18_R { ISF18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & self ) -> ISF19_R { ISF19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & self ) -> ISF20_R { ISF20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & self ) -> ISF21_R { ISF21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & self ) -> ISF22_R { ISF22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & self ) -> ISF23_R { ISF23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & self ) -> ISF24_R { ISF24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & self ) -> ISF25_R { ISF25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & self ) -> ISF26_R { ISF26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & self ) -> ISF27_R { ISF27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & self ) -> ISF28_R { ISF28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & self ) -> ISF29_R { ISF29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & self ) -> ISF30_R { ISF30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & self ) -> ISF31_R { ISF31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf0 ( & mut self ) -> ISF0_W { ISF0_W { w : self } } # [ doc = "Bit 1 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf1 ( & mut self ) -> ISF1_W { ISF1_W { w : self } } # [ doc = "Bit 2 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf2 ( & mut self ) -> ISF2_W { ISF2_W { w : self } } # [ doc = "Bit 3 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf3 ( & mut self ) -> ISF3_W { ISF3_W { w : self } } # [ doc = "Bit 4 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf4 ( & mut self ) -> ISF4_W { ISF4_W { w : self } } # [ doc = "Bit 5 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf5 ( & mut self ) -> ISF5_W { ISF5_W { w : self } } # [ doc = "Bit 6 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf6 ( & mut self ) -> ISF6_W { ISF6_W { w : self } } # [ doc = "Bit 7 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf7 ( & mut self ) -> ISF7_W { ISF7_W { w : self } } # [ doc = "Bit 8 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf8 ( & mut self ) -> ISF8_W { ISF8_W { w : self } } # [ doc = "Bit 9 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf9 ( & mut self ) -> ISF9_W { ISF9_W { w : self } } # [ doc = "Bit 10 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf10 ( & mut self ) -> ISF10_W { ISF10_W { w : self } } # [ doc = "Bit 11 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf11 ( & mut self ) -> ISF11_W { ISF11_W { w : self } } # [ doc = "Bit 12 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf12 ( & mut self ) -> ISF12_W { ISF12_W { w : self } } # [ doc = "Bit 13 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf13 ( & mut self ) -> ISF13_W { ISF13_W { w : self } } # [ doc = "Bit 14 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf14 ( & mut self ) -> ISF14_W { ISF14_W { w : self } } # [ doc = "Bit 15 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf15 ( & mut self ) -> ISF15_W { ISF15_W { w : self } } # [ doc = "Bit 16 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf16 ( & mut self ) -> ISF16_W { ISF16_W { w : self } } # [ doc = "Bit 17 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf17 ( & mut self ) -> ISF17_W { ISF17_W { w : self } } # [ doc = "Bit 18 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf18 ( & mut self ) -> ISF18_W { ISF18_W { w : self } } # [ doc = "Bit 19 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf19 ( & mut self ) -> ISF19_W { ISF19_W { w : self } } # [ doc = "Bit 20 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf20 ( & mut self ) -> ISF20_W { ISF20_W { w : self } } # [ doc = "Bit 21 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf21 ( & mut self ) -> ISF21_W { ISF21_W { w : self } } # [ doc = "Bit 22 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf22 ( & mut self ) -> ISF22_W { ISF22_W { w : self } } # [ doc = "Bit 23 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf23 ( & mut self ) -> ISF23_W { ISF23_W { w : self } } # [ doc = "Bit 24 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf24 ( & mut self ) -> ISF24_W { ISF24_W { w : self } } # [ doc = "Bit 25 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf25 ( & mut self ) -> ISF25_W { ISF25_W { w : self } } # [ doc = "Bit 26 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf26 ( & mut self ) -> ISF26_W { ISF26_W { w : self } } # [ doc = "Bit 27 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf27 ( & mut self ) -> ISF27_W { ISF27_W { w : self } } # [ doc = "Bit 28 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf28 ( & mut self ) -> ISF28_W { ISF28_W { w : self } } # [ doc = "Bit 29 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf29 ( & mut self ) -> ISF29_W { ISF29_W { w : self } } # [ doc = "Bit 30 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf30 ( & mut self ) -> ISF30_W { ISF30_W { w : self } } # [ doc = "Bit 31 - Interrupt Status Flag" ] # [ inline ( always ) ] pub fn isf31 ( & mut self ) -> ISF31_W { ISF31_W { w : self } } } } } # [ doc = "Generation 2008 Watchdog Timer" ] pub struct WDOG { _marker : PhantomData < * const ( ) > } unsafe impl Send for WDOG { } impl WDOG { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const wdog :: RegisterBlock { 0x4005_2000 as * const _ } } impl Deref for WDOG { type Target = wdog :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * WDOG :: ptr ( ) } } } # [ doc = "Generation 2008 Watchdog Timer" ] pub mod wdog { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Watchdog Status and Control Register High" ] pub stctrlh : STCTRLH , # [ doc = "0x02 - Watchdog Status and Control Register Low" ] pub stctrll : STCTRLL , # [ doc = "0x04 - Watchdog Time-out Value Register High" ] pub tovalh : TOVALH , # [ doc = "0x06 - Watchdog Time-out Value Register Low" ] pub tovall : TOVALL , # [ doc = "0x08 - Watchdog Window Register High" ] pub winh : WINH , # [ doc = "0x0a - Watchdog Window Register Low" ] pub winl : WINL , # [ doc = "0x0c - Watchdog Refresh register" ] pub refresh : REFRESH , # [ doc = "0x0e - Watchdog Unlock register" ] pub unlock : UNLOCK , # [ doc = "0x10 - Watchdog Timer Output Register High" ] pub tmrouth : TMROUTH , # [ doc = "0x12 - Watchdog Timer Output Register Low" ] pub tmroutl : TMROUTL , # [ doc = "0x14 - Watchdog Reset Count register" ] pub rstcnt : RSTCNT , # [ doc = "0x16 - Watchdog Prescaler register" ] pub presc : PRESC , } # [ doc = "Watchdog Status and Control Register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stctrlh](stctrlh) module" ] pub type STCTRLH = crate :: Reg < u16 , _STCTRLH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STCTRLH ; # [ doc = "`read()` method returns [stctrlh::R](stctrlh::R) reader structure" ] impl crate :: Readable for STCTRLH { } # [ doc = "`write(|w| ..)` method takes [stctrlh::W](stctrlh::W) writer structure" ] impl crate :: Writable for STCTRLH { } # [ doc = "Watchdog Status and Control Register High" ] pub mod stctrlh { # [ doc = "Reader of register STCTRLH" ] pub type R = crate :: R < u16 , super :: STCTRLH > ; # [ doc = "Writer for register STCTRLH" ] pub type W = crate :: W < u16 , super :: STCTRLH > ; # [ doc = "Register STCTRLH `reset()`'s with value 0x01d3" ] impl crate :: ResetValue for super :: STCTRLH { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01d3 } } # [ doc = "Enables or disables the WDOG's operation\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WDOGEN_A { # [ doc = "0: WDOG is disabled." ] _0 , # [ doc = "1: WDOG is enabled." ] _1 } impl From < WDOGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WDOGEN_A ) -> Self { match variant { WDOGEN_A :: _0 => false , WDOGEN_A :: _1 => true } } } # [ doc = "Reader of field `WDOGEN`" ] pub type WDOGEN_R = crate :: R < bool , WDOGEN_A > ; impl WDOGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WDOGEN_A { match self . bits { false => WDOGEN_A :: _0 , true => WDOGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WDOGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WDOGEN_A :: _1 } } # [ doc = "Write proxy for field `WDOGEN`" ] pub struct WDOGEN_W < 'a > { w : & 'a mut W , } impl < 'a > WDOGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WDOGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "WDOG is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WDOGEN_A :: _0 ) } # [ doc = "WDOG is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WDOGEN_A :: _1 ) } # [ 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 ) | ( ( value as u16 ) & 0x01 ) ; self . w } } # [ doc = "Selects clock source for the WDOG timer and other internal timing operations.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKSRC_A { # [ doc = "0: WDOG clock sourced from LPO ." ] _0 , # [ doc = "1: WDOG clock sourced from alternate clock source." ] _1 } impl From < CLKSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : CLKSRC_A ) -> Self { match variant { CLKSRC_A :: _0 => false , CLKSRC_A :: _1 => true } } } # [ doc = "Reader of field `CLKSRC`" ] pub type CLKSRC_R = crate :: R < bool , CLKSRC_A > ; impl CLKSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKSRC_A { match self . bits { false => CLKSRC_A :: _0 , true => CLKSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLKSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLKSRC_A :: _1 } } # [ doc = "Write proxy for field `CLKSRC`" ] pub struct CLKSRC_W < 'a > { w : & 'a mut W , } impl < 'a > CLKSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "WDOG clock sourced from LPO ." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLKSRC_A :: _0 ) } # [ doc = "WDOG clock sourced from alternate clock source." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLKSRC_A :: _1 ) } # [ 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 u16 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Used to enable the debug breadcrumbs feature\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQRSTEN_A { # [ doc = "0: WDOG time-out generates reset only." ] _0 , # [ doc = "1: WDOG time-out initially generates an interrupt. After WCT, it generates a reset." ] _1 } impl From < IRQRSTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IRQRSTEN_A ) -> Self { match variant { IRQRSTEN_A :: _0 => false , IRQRSTEN_A :: _1 => true } } } # [ doc = "Reader of field `IRQRSTEN`" ] pub type IRQRSTEN_R = crate :: R < bool , IRQRSTEN_A > ; impl IRQRSTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IRQRSTEN_A { match self . bits { false => IRQRSTEN_A :: _0 , true => IRQRSTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IRQRSTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IRQRSTEN_A :: _1 } } # [ doc = "Write proxy for field `IRQRSTEN`" ] pub struct IRQRSTEN_W < 'a > { w : & 'a mut W , } impl < 'a > IRQRSTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQRSTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "WDOG time-out generates reset only." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IRQRSTEN_A :: _0 ) } # [ doc = "WDOG time-out initially generates an interrupt. After WCT, it generates a reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IRQRSTEN_A :: _1 ) } # [ 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 u16 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Enables Windowing mode.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WINEN_A { # [ doc = "0: Windowing mode is disabled." ] _0 , # [ doc = "1: Windowing mode is enabled." ] _1 } impl From < WINEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WINEN_A ) -> Self { match variant { WINEN_A :: _0 => false , WINEN_A :: _1 => true } } } # [ doc = "Reader of field `WINEN`" ] pub type WINEN_R = crate :: R < bool , WINEN_A > ; impl WINEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WINEN_A { match self . bits { false => WINEN_A :: _0 , true => WINEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WINEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WINEN_A :: _1 } } # [ doc = "Write proxy for field `WINEN`" ] pub struct WINEN_W < 'a > { w : & 'a mut W , } impl < 'a > WINEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WINEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Windowing mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WINEN_A :: _0 ) } # [ doc = "Windowing mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WINEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u16 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enables updates to watchdog write-once registers, after the reset-triggered initial configuration window (WCT) closes, through unlock sequence\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ALLOWUPDATE_A { # [ doc = "0: No further updates allowed to WDOG write-once registers." ] _0 , # [ doc = "1: WDOG write-once registers can be unlocked for updating." ] _1 } impl From < ALLOWUPDATE_A > for bool { # [ inline ( always ) ] fn from ( variant : ALLOWUPDATE_A ) -> Self { match variant { ALLOWUPDATE_A :: _0 => false , ALLOWUPDATE_A :: _1 => true } } } # [ doc = "Reader of field `ALLOWUPDATE`" ] pub type ALLOWUPDATE_R = crate :: R < bool , ALLOWUPDATE_A > ; impl ALLOWUPDATE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ALLOWUPDATE_A { match self . bits { false => ALLOWUPDATE_A :: _0 , true => ALLOWUPDATE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ALLOWUPDATE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ALLOWUPDATE_A :: _1 } } # [ doc = "Write proxy for field `ALLOWUPDATE`" ] pub struct ALLOWUPDATE_W < 'a > { w : & 'a mut W , } impl < 'a > ALLOWUPDATE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ALLOWUPDATE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No further updates allowed to WDOG write-once registers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ALLOWUPDATE_A :: _0 ) } # [ doc = "WDOG write-once registers can be unlocked for updating." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ALLOWUPDATE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u16 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Enables or disables WDOG in Debug mode.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBGEN_A { # [ doc = "0: WDOG is disabled in CPU Debug mode." ] _0 , # [ doc = "1: WDOG is enabled in CPU Debug mode." ] _1 } impl From < DBGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DBGEN_A ) -> Self { match variant { DBGEN_A :: _0 => false , DBGEN_A :: _1 => true } } } # [ doc = "Reader of field `DBGEN`" ] pub type DBGEN_R = crate :: R < bool , DBGEN_A > ; impl DBGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBGEN_A { match self . bits { false => DBGEN_A :: _0 , true => DBGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBGEN_A :: _1 } } # [ doc = "Write proxy for field `DBGEN`" ] pub struct DBGEN_W < 'a > { w : & 'a mut W , } impl < 'a > DBGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "WDOG is disabled in CPU Debug mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DBGEN_A :: _0 ) } # [ doc = "WDOG is enabled in CPU Debug mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DBGEN_A :: _1 ) } # [ 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 u16 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Enables or disables WDOG in Stop mode.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPEN_A { # [ doc = "0: WDOG is disabled in CPU Stop mode." ] _0 , # [ doc = "1: WDOG is enabled in CPU Stop mode." ] _1 } impl From < STOPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : STOPEN_A ) -> Self { match variant { STOPEN_A :: _0 => false , STOPEN_A :: _1 => true } } } # [ doc = "Reader of field `STOPEN`" ] pub type STOPEN_R = crate :: R < bool , STOPEN_A > ; impl STOPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STOPEN_A { match self . bits { false => STOPEN_A :: _0 , true => STOPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STOPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STOPEN_A :: _1 } } # [ doc = "Write proxy for field `STOPEN`" ] pub struct STOPEN_W < 'a > { w : & 'a mut W , } impl < 'a > STOPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STOPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "WDOG is disabled in CPU Stop mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STOPEN_A :: _0 ) } # [ doc = "WDOG is enabled in CPU Stop mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STOPEN_A :: _1 ) } # [ 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 u16 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Enables or disables WDOG in Wait mode.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAITEN_A { # [ doc = "0: WDOG is disabled in CPU Wait mode." ] _0 , # [ doc = "1: WDOG is enabled in CPU Wait mode." ] _1 } impl From < WAITEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WAITEN_A ) -> Self { match variant { WAITEN_A :: _0 => false , WAITEN_A :: _1 => true } } } # [ doc = "Reader of field `WAITEN`" ] pub type WAITEN_R = crate :: R < bool , WAITEN_A > ; impl WAITEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAITEN_A { match self . bits { false => WAITEN_A :: _0 , true => WAITEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAITEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAITEN_A :: _1 } } # [ doc = "Write proxy for field `WAITEN`" ] pub struct WAITEN_W < 'a > { w : & 'a mut W , } impl < 'a > WAITEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAITEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "WDOG is disabled in CPU Wait mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAITEN_A :: _0 ) } # [ doc = "WDOG is enabled in CPU Wait mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAITEN_A :: _1 ) } # [ 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 u16 ) & 0x01 ) << 7 ) ; self . w } } # [ doc = "Reader of field `TESTWDOG`" ] pub type TESTWDOG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TESTWDOG`" ] pub struct TESTWDOG_W < 'a > { w : & 'a mut W , } impl < 'a > TESTWDOG_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 << 10 ) ) | ( ( ( value as u16 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Effective only if TESTWDOG is set. Selects the test to be run on the watchdog timer.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TESTSEL_A { # [ doc = "0: Quick test. The timer runs in normal operation. You can load a small time-out value to do a quick test." ] _0 , # [ doc = "1: Byte test. Puts the timer in the byte test mode where individual bytes of the timer are enabled for operation and are compared for time-out against the corresponding byte of the programmed time-out value. Select the byte through BYTESEL\\[1:0\\] for testing." ] _1 } impl From < TESTSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TESTSEL_A ) -> Self { match variant { TESTSEL_A :: _0 => false , TESTSEL_A :: _1 => true } } } # [ doc = "Reader of field `TESTSEL`" ] pub type TESTSEL_R = crate :: R < bool , TESTSEL_A > ; impl TESTSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TESTSEL_A { match self . bits { false => TESTSEL_A :: _0 , true => TESTSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TESTSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TESTSEL_A :: _1 } } # [ doc = "Write proxy for field `TESTSEL`" ] pub struct TESTSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TESTSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TESTSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Quick test. The timer runs in normal operation. You can load a small time-out value to do a quick test." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TESTSEL_A :: _0 ) } # [ doc = "Byte test. Puts the timer in the byte test mode where individual bytes of the timer are enabled for operation and are compared for time-out against the corresponding byte of the programmed time-out value. Select the byte through BYTESEL\\[1:0\\] for testing." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TESTSEL_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u16 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "This 2-bit field selects the byte to be tested when the watchdog is in the byte test mode.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BYTESEL_A { # [ doc = "0: Byte 0 selected" ] _00 , # [ doc = "1: Byte 1 selected" ] _01 , # [ doc = "2: Byte 2 selected" ] _10 , # [ doc = "3: Byte 3 selected" ] _11 } impl From < BYTESEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : BYTESEL_A ) -> Self { match variant { BYTESEL_A :: _00 => 0 , BYTESEL_A :: _01 => 1 , BYTESEL_A :: _10 => 2 , BYTESEL_A :: _11 => 3 } } } # [ doc = "Reader of field `BYTESEL`" ] pub type BYTESEL_R = crate :: R < u8 , BYTESEL_A > ; impl BYTESEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BYTESEL_A { match self . bits { 0 => BYTESEL_A :: _00 , 1 => BYTESEL_A :: _01 , 2 => BYTESEL_A :: _10 , 3 => BYTESEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == BYTESEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == BYTESEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == BYTESEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == BYTESEL_A :: _11 } } # [ doc = "Write proxy for field `BYTESEL`" ] pub struct BYTESEL_W < 'a > { w : & 'a mut W , } impl < 'a > BYTESEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BYTESEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Byte 0 selected" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( BYTESEL_A :: _00 ) } # [ doc = "Byte 1 selected" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( BYTESEL_A :: _01 ) } # [ doc = "Byte 2 selected" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( BYTESEL_A :: _10 ) } # [ doc = "Byte 3 selected" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( BYTESEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 12 ) ) | ( ( ( value as u16 ) & 0x03 ) << 12 ) ; self . w } } # [ doc = "Allows the WDOG's functional test mode to be disabled permanently\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISTESTWDOG_A { # [ doc = "0: WDOG functional test mode is not disabled." ] _0 , # [ doc = "1: WDOG functional test mode is disabled permanently until reset." ] _1 } impl From < DISTESTWDOG_A > for bool { # [ inline ( always ) ] fn from ( variant : DISTESTWDOG_A ) -> Self { match variant { DISTESTWDOG_A :: _0 => false , DISTESTWDOG_A :: _1 => true } } } # [ doc = "Reader of field `DISTESTWDOG`" ] pub type DISTESTWDOG_R = crate :: R < bool , DISTESTWDOG_A > ; impl DISTESTWDOG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DISTESTWDOG_A { match self . bits { false => DISTESTWDOG_A :: _0 , true => DISTESTWDOG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DISTESTWDOG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DISTESTWDOG_A :: _1 } } # [ doc = "Write proxy for field `DISTESTWDOG`" ] pub struct DISTESTWDOG_W < 'a > { w : & 'a mut W , } impl < 'a > DISTESTWDOG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISTESTWDOG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "WDOG functional test mode is not disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DISTESTWDOG_A :: _0 ) } # [ doc = "WDOG functional test mode is disabled permanently until reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DISTESTWDOG_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u16 ) & 0x01 ) << 14 ) ; self . w } } impl R { # [ doc = "Bit 0 - Enables or disables the WDOG's operation" ] # [ inline ( always ) ] pub fn wdogen ( & self ) -> WDOGEN_R { WDOGEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Selects clock source for the WDOG timer and other internal timing operations." ] # [ inline ( always ) ] pub fn clksrc ( & self ) -> CLKSRC_R { CLKSRC_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Used to enable the debug breadcrumbs feature" ] # [ inline ( always ) ] pub fn irqrsten ( & self ) -> IRQRSTEN_R { IRQRSTEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Enables Windowing mode." ] # [ inline ( always ) ] pub fn winen ( & self ) -> WINEN_R { WINEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enables updates to watchdog write-once registers, after the reset-triggered initial configuration window (WCT) closes, through unlock sequence" ] # [ inline ( always ) ] pub fn allowupdate ( & self ) -> ALLOWUPDATE_R { ALLOWUPDATE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enables or disables WDOG in Debug mode." ] # [ inline ( always ) ] pub fn dbgen ( & self ) -> DBGEN_R { DBGEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Enables or disables WDOG in Stop mode." ] # [ inline ( always ) ] pub fn stopen ( & self ) -> STOPEN_R { STOPEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Enables or disables WDOG in Wait mode." ] # [ inline ( always ) ] pub fn waiten ( & self ) -> WAITEN_R { WAITEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Puts the watchdog in the functional test mode" ] # [ inline ( always ) ] pub fn testwdog ( & self ) -> TESTWDOG_R { TESTWDOG_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Effective only if TESTWDOG is set. Selects the test to be run on the watchdog timer." ] # [ inline ( always ) ] pub fn testsel ( & self ) -> TESTSEL_R { TESTSEL_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bits 12:13 - This 2-bit field selects the byte to be tested when the watchdog is in the byte test mode." ] # [ inline ( always ) ] pub fn bytesel ( & self ) -> BYTESEL_R { BYTESEL_R :: new ( ( ( self . bits >> 12 ) & 0x03 ) as u8 ) } # [ doc = "Bit 14 - Allows the WDOG's functional test mode to be disabled permanently" ] # [ inline ( always ) ] pub fn distestwdog ( & self ) -> DISTESTWDOG_R { DISTESTWDOG_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Enables or disables the WDOG's operation" ] # [ inline ( always ) ] pub fn wdogen ( & mut self ) -> WDOGEN_W { WDOGEN_W { w : self } } # [ doc = "Bit 1 - Selects clock source for the WDOG timer and other internal timing operations." ] # [ inline ( always ) ] pub fn clksrc ( & mut self ) -> CLKSRC_W { CLKSRC_W { w : self } } # [ doc = "Bit 2 - Used to enable the debug breadcrumbs feature" ] # [ inline ( always ) ] pub fn irqrsten ( & mut self ) -> IRQRSTEN_W { IRQRSTEN_W { w : self } } # [ doc = "Bit 3 - Enables Windowing mode." ] # [ inline ( always ) ] pub fn winen ( & mut self ) -> WINEN_W { WINEN_W { w : self } } # [ doc = "Bit 4 - Enables updates to watchdog write-once registers, after the reset-triggered initial configuration window (WCT) closes, through unlock sequence" ] # [ inline ( always ) ] pub fn allowupdate ( & mut self ) -> ALLOWUPDATE_W { ALLOWUPDATE_W { w : self } } # [ doc = "Bit 5 - Enables or disables WDOG in Debug mode." ] # [ inline ( always ) ] pub fn dbgen ( & mut self ) -> DBGEN_W { DBGEN_W { w : self } } # [ doc = "Bit 6 - Enables or disables WDOG in Stop mode." ] # [ inline ( always ) ] pub fn stopen ( & mut self ) -> STOPEN_W { STOPEN_W { w : self } } # [ doc = "Bit 7 - Enables or disables WDOG in Wait mode." ] # [ inline ( always ) ] pub fn waiten ( & mut self ) -> WAITEN_W { WAITEN_W { w : self } } # [ doc = "Bit 10 - Puts the watchdog in the functional test mode" ] # [ inline ( always ) ] pub fn testwdog ( & mut self ) -> TESTWDOG_W { TESTWDOG_W { w : self } } # [ doc = "Bit 11 - Effective only if TESTWDOG is set. Selects the test to be run on the watchdog timer." ] # [ inline ( always ) ] pub fn testsel ( & mut self ) -> TESTSEL_W { TESTSEL_W { w : self } } # [ doc = "Bits 12:13 - This 2-bit field selects the byte to be tested when the watchdog is in the byte test mode." ] # [ inline ( always ) ] pub fn bytesel ( & mut self ) -> BYTESEL_W { BYTESEL_W { w : self } } # [ doc = "Bit 14 - Allows the WDOG's functional test mode to be disabled permanently" ] # [ inline ( always ) ] pub fn distestwdog ( & mut self ) -> DISTESTWDOG_W { DISTESTWDOG_W { w : self } } } } # [ doc = "Watchdog Status and Control Register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stctrll](stctrll) module" ] pub type STCTRLL = crate :: Reg < u16 , _STCTRLL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STCTRLL ; # [ doc = "`read()` method returns [stctrll::R](stctrll::R) reader structure" ] impl crate :: Readable for STCTRLL { } # [ doc = "`write(|w| ..)` method takes [stctrll::W](stctrll::W) writer structure" ] impl crate :: Writable for STCTRLL { } # [ doc = "Watchdog Status and Control Register Low" ] pub mod stctrll { # [ doc = "Reader of register STCTRLL" ] pub type R = crate :: R < u16 , super :: STCTRLL > ; # [ doc = "Writer for register STCTRLL" ] pub type W = crate :: W < u16 , super :: STCTRLL > ; # [ doc = "Register STCTRLL `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: STCTRLL { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Reader of field `INTFLG`" ] pub type INTFLG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `INTFLG`" ] pub struct INTFLG_W < 'a > { w : & 'a mut W , } impl < 'a > INTFLG_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 << 15 ) ) | ( ( ( value as u16 ) & 0x01 ) << 15 ) ; self . w } } impl R { # [ doc = "Bit 15 - Interrupt flag" ] # [ inline ( always ) ] pub fn intflg ( & self ) -> INTFLG_R { INTFLG_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 15 - Interrupt flag" ] # [ inline ( always ) ] pub fn intflg ( & mut self ) -> INTFLG_W { INTFLG_W { w : self } } } } # [ doc = "Watchdog Time-out Value Register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tovalh](tovalh) module" ] pub type TOVALH = crate :: Reg < u16 , _TOVALH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TOVALH ; # [ doc = "`read()` method returns [tovalh::R](tovalh::R) reader structure" ] impl crate :: Readable for TOVALH { } # [ doc = "`write(|w| ..)` method takes [tovalh::W](tovalh::W) writer structure" ] impl crate :: Writable for TOVALH { } # [ doc = "Watchdog Time-out Value Register High" ] pub mod tovalh { # [ doc = "Reader of register TOVALH" ] pub type R = crate :: R < u16 , super :: TOVALH > ; # [ doc = "Writer for register TOVALH" ] pub type W = crate :: W < u16 , super :: TOVALH > ; # [ doc = "Register TOVALH `reset()`'s with value 0x4c" ] impl crate :: ResetValue for super :: TOVALH { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x4c } } # [ doc = "Reader of field `TOVALHIGH`" ] pub type TOVALHIGH_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TOVALHIGH`" ] pub struct TOVALHIGH_W < 'a > { w : & 'a mut W , } impl < 'a > TOVALHIGH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Defines the upper 16 bits of the 32-bit time-out value for the watchdog timer" ] # [ inline ( always ) ] pub fn tovalhigh ( & self ) -> TOVALHIGH_R { TOVALHIGH_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Defines the upper 16 bits of the 32-bit time-out value for the watchdog timer" ] # [ inline ( always ) ] pub fn tovalhigh ( & mut self ) -> TOVALHIGH_W { TOVALHIGH_W { w : self } } } } # [ doc = "Watchdog Time-out Value Register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tovall](tovall) module" ] pub type TOVALL = crate :: Reg < u16 , _TOVALL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TOVALL ; # [ doc = "`read()` method returns [tovall::R](tovall::R) reader structure" ] impl crate :: Readable for TOVALL { } # [ doc = "`write(|w| ..)` method takes [tovall::W](tovall::W) writer structure" ] impl crate :: Writable for TOVALL { } # [ doc = "Watchdog Time-out Value Register Low" ] pub mod tovall { # [ doc = "Reader of register TOVALL" ] pub type R = crate :: R < u16 , super :: TOVALL > ; # [ doc = "Writer for register TOVALL" ] pub type W = crate :: W < u16 , super :: TOVALL > ; # [ doc = "Register TOVALL `reset()`'s with value 0x4b4c" ] impl crate :: ResetValue for super :: TOVALL { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x4b4c } } # [ doc = "Reader of field `TOVALLOW`" ] pub type TOVALLOW_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TOVALLOW`" ] pub struct TOVALLOW_W < 'a > { w : & 'a mut W , } impl < 'a > TOVALLOW_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Defines the lower 16 bits of the 32-bit time-out value for the watchdog timer" ] # [ inline ( always ) ] pub fn tovallow ( & self ) -> TOVALLOW_R { TOVALLOW_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Defines the lower 16 bits of the 32-bit time-out value for the watchdog timer" ] # [ inline ( always ) ] pub fn tovallow ( & mut self ) -> TOVALLOW_W { TOVALLOW_W { w : self } } } } # [ doc = "Watchdog Window Register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [winh](winh) module" ] pub type WINH = crate :: Reg < u16 , _WINH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WINH ; # [ doc = "`read()` method returns [winh::R](winh::R) reader structure" ] impl crate :: Readable for WINH { } # [ doc = "`write(|w| ..)` method takes [winh::W](winh::W) writer structure" ] impl crate :: Writable for WINH { } # [ doc = "Watchdog Window Register High" ] pub mod winh { # [ doc = "Reader of register WINH" ] pub type R = crate :: R < u16 , super :: WINH > ; # [ doc = "Writer for register WINH" ] pub type W = crate :: W < u16 , super :: WINH > ; # [ doc = "Register WINH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WINH { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `WINHIGH`" ] pub type WINHIGH_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `WINHIGH`" ] pub struct WINHIGH_W < 'a > { w : & 'a mut W , } impl < 'a > WINHIGH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Defines the upper 16 bits of the 32-bit window for the windowed mode of operation of the watchdog" ] # [ inline ( always ) ] pub fn winhigh ( & self ) -> WINHIGH_R { WINHIGH_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Defines the upper 16 bits of the 32-bit window for the windowed mode of operation of the watchdog" ] # [ inline ( always ) ] pub fn winhigh ( & mut self ) -> WINHIGH_W { WINHIGH_W { w : self } } } } # [ doc = "Watchdog Window Register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [winl](winl) module" ] pub type WINL = crate :: Reg < u16 , _WINL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WINL ; # [ doc = "`read()` method returns [winl::R](winl::R) reader structure" ] impl crate :: Readable for WINL { } # [ doc = "`write(|w| ..)` method takes [winl::W](winl::W) writer structure" ] impl crate :: Writable for WINL { } # [ doc = "Watchdog Window Register Low" ] pub mod winl { # [ doc = "Reader of register WINL" ] pub type R = crate :: R < u16 , super :: WINL > ; # [ doc = "Writer for register WINL" ] pub type W = crate :: W < u16 , super :: WINL > ; # [ doc = "Register WINL `reset()`'s with value 0x10" ] impl crate :: ResetValue for super :: WINL { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x10 } } # [ doc = "Reader of field `WINLOW`" ] pub type WINLOW_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `WINLOW`" ] pub struct WINLOW_W < 'a > { w : & 'a mut W , } impl < 'a > WINLOW_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Defines the lower 16 bits of the 32-bit window for the windowed mode of operation of the watchdog" ] # [ inline ( always ) ] pub fn winlow ( & self ) -> WINLOW_R { WINLOW_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Defines the lower 16 bits of the 32-bit window for the windowed mode of operation of the watchdog" ] # [ inline ( always ) ] pub fn winlow ( & mut self ) -> WINLOW_W { WINLOW_W { w : self } } } } # [ doc = "Watchdog Refresh register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [refresh](refresh) module" ] pub type REFRESH = crate :: Reg < u16 , _REFRESH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _REFRESH ; # [ doc = "`read()` method returns [refresh::R](refresh::R) reader structure" ] impl crate :: Readable for REFRESH { } # [ doc = "`write(|w| ..)` method takes [refresh::W](refresh::W) writer structure" ] impl crate :: Writable for REFRESH { } # [ doc = "Watchdog Refresh register" ] pub mod refresh { # [ doc = "Reader of register REFRESH" ] pub type R = crate :: R < u16 , super :: REFRESH > ; # [ doc = "Writer for register REFRESH" ] pub type W = crate :: W < u16 , super :: REFRESH > ; # [ doc = "Register REFRESH `reset()`'s with value 0xb480" ] impl crate :: ResetValue for super :: REFRESH { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xb480 } } # [ doc = "Reader of field `WDOGREFRESH`" ] pub type WDOGREFRESH_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `WDOGREFRESH`" ] pub struct WDOGREFRESH_W < 'a > { w : & 'a mut W , } impl < 'a > WDOGREFRESH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Watchdog refresh register" ] # [ inline ( always ) ] pub fn wdogrefresh ( & self ) -> WDOGREFRESH_R { WDOGREFRESH_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Watchdog refresh register" ] # [ inline ( always ) ] pub fn wdogrefresh ( & mut self ) -> WDOGREFRESH_W { WDOGREFRESH_W { w : self } } } } # [ doc = "Watchdog Unlock register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [unlock](unlock) module" ] pub type UNLOCK = crate :: Reg < u16 , _UNLOCK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _UNLOCK ; # [ doc = "`read()` method returns [unlock::R](unlock::R) reader structure" ] impl crate :: Readable for UNLOCK { } # [ doc = "`write(|w| ..)` method takes [unlock::W](unlock::W) writer structure" ] impl crate :: Writable for UNLOCK { } # [ doc = "Watchdog Unlock register" ] pub mod unlock { # [ doc = "Reader of register UNLOCK" ] pub type R = crate :: R < u16 , super :: UNLOCK > ; # [ doc = "Writer for register UNLOCK" ] pub type W = crate :: W < u16 , super :: UNLOCK > ; # [ doc = "Register UNLOCK `reset()`'s with value 0xd928" ] impl crate :: ResetValue for super :: UNLOCK { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xd928 } } # [ doc = "Reader of field `WDOGUNLOCK`" ] pub type WDOGUNLOCK_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `WDOGUNLOCK`" ] pub struct WDOGUNLOCK_W < 'a > { w : & 'a mut W , } impl < 'a > WDOGUNLOCK_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Writing the unlock sequence values to this register to makes the watchdog write-once registers writable again" ] # [ inline ( always ) ] pub fn wdogunlock ( & self ) -> WDOGUNLOCK_R { WDOGUNLOCK_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Writing the unlock sequence values to this register to makes the watchdog write-once registers writable again" ] # [ inline ( always ) ] pub fn wdogunlock ( & mut self ) -> WDOGUNLOCK_W { WDOGUNLOCK_W { w : self } } } } # [ doc = "Watchdog Timer Output Register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmrouth](tmrouth) module" ] pub type TMROUTH = crate :: Reg < u16 , _TMROUTH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TMROUTH ; # [ doc = "`read()` method returns [tmrouth::R](tmrouth::R) reader structure" ] impl crate :: Readable for TMROUTH { } # [ doc = "`write(|w| ..)` method takes [tmrouth::W](tmrouth::W) writer structure" ] impl crate :: Writable for TMROUTH { } # [ doc = "Watchdog Timer Output Register High" ] pub mod tmrouth { # [ doc = "Reader of register TMROUTH" ] pub type R = crate :: R < u16 , super :: TMROUTH > ; # [ doc = "Writer for register TMROUTH" ] pub type W = crate :: W < u16 , super :: TMROUTH > ; # [ doc = "Register TMROUTH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TMROUTH { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIMEROUTHIGH`" ] pub type TIMEROUTHIGH_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIMEROUTHIGH`" ] pub struct TIMEROUTHIGH_W < 'a > { w : & 'a mut W , } impl < 'a > TIMEROUTHIGH_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Shows the value of the upper 16 bits of the watchdog timer." ] # [ inline ( always ) ] pub fn timerouthigh ( & self ) -> TIMEROUTHIGH_R { TIMEROUTHIGH_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Shows the value of the upper 16 bits of the watchdog timer." ] # [ inline ( always ) ] pub fn timerouthigh ( & mut self ) -> TIMEROUTHIGH_W { TIMEROUTHIGH_W { w : self } } } } # [ doc = "Watchdog Timer Output Register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmroutl](tmroutl) module" ] pub type TMROUTL = crate :: Reg < u16 , _TMROUTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TMROUTL ; # [ doc = "`read()` method returns [tmroutl::R](tmroutl::R) reader structure" ] impl crate :: Readable for TMROUTL { } # [ doc = "`write(|w| ..)` method takes [tmroutl::W](tmroutl::W) writer structure" ] impl crate :: Writable for TMROUTL { } # [ doc = "Watchdog Timer Output Register Low" ] pub mod tmroutl { # [ doc = "Reader of register TMROUTL" ] pub type R = crate :: R < u16 , super :: TMROUTL > ; # [ doc = "Writer for register TMROUTL" ] pub type W = crate :: W < u16 , super :: TMROUTL > ; # [ doc = "Register TMROUTL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TMROUTL { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TIMEROUTLOW`" ] pub type TIMEROUTLOW_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TIMEROUTLOW`" ] pub struct TIMEROUTLOW_W < 'a > { w : & 'a mut W , } impl < 'a > TIMEROUTLOW_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Shows the value of the lower 16 bits of the watchdog timer." ] # [ inline ( always ) ] pub fn timeroutlow ( & self ) -> TIMEROUTLOW_R { TIMEROUTLOW_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Shows the value of the lower 16 bits of the watchdog timer." ] # [ inline ( always ) ] pub fn timeroutlow ( & mut self ) -> TIMEROUTLOW_W { TIMEROUTLOW_W { w : self } } } } # [ doc = "Watchdog Reset Count register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rstcnt](rstcnt) module" ] pub type RSTCNT = crate :: Reg < u16 , _RSTCNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RSTCNT ; # [ doc = "`read()` method returns [rstcnt::R](rstcnt::R) reader structure" ] impl crate :: Readable for RSTCNT { } # [ doc = "`write(|w| ..)` method takes [rstcnt::W](rstcnt::W) writer structure" ] impl crate :: Writable for RSTCNT { } # [ doc = "Watchdog Reset Count register" ] pub mod rstcnt { # [ doc = "Reader of register RSTCNT" ] pub type R = crate :: R < u16 , super :: RSTCNT > ; # [ doc = "Writer for register RSTCNT" ] pub type W = crate :: W < u16 , super :: RSTCNT > ; # [ doc = "Register RSTCNT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RSTCNT { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RSTCNT`" ] pub type RSTCNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `RSTCNT`" ] pub struct RSTCNT_W < 'a > { w : & 'a mut W , } impl < 'a > RSTCNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u16 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Counts the number of times the watchdog resets the system" ] # [ inline ( always ) ] pub fn rstcnt ( & self ) -> RSTCNT_R { RSTCNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Counts the number of times the watchdog resets the system" ] # [ inline ( always ) ] pub fn rstcnt ( & mut self ) -> RSTCNT_W { RSTCNT_W { w : self } } } } # [ doc = "Watchdog Prescaler register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [presc](presc) module" ] pub type PRESC = crate :: Reg < u16 , _PRESC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PRESC ; # [ doc = "`read()` method returns [presc::R](presc::R) reader structure" ] impl crate :: Readable for PRESC { } # [ doc = "`write(|w| ..)` method takes [presc::W](presc::W) writer structure" ] impl crate :: Writable for PRESC { } # [ doc = "Watchdog Prescaler register" ] pub mod presc { # [ doc = "Reader of register PRESC" ] pub type R = crate :: R < u16 , super :: PRESC > ; # [ doc = "Writer for register PRESC" ] pub type W = crate :: W < u16 , super :: PRESC > ; # [ doc = "Register PRESC `reset()`'s with value 0x0400" ] impl crate :: ResetValue for super :: PRESC { type Type = u16 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0400 } } # [ doc = "Reader of field `PRESCVAL`" ] pub type PRESCVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRESCVAL`" ] pub struct PRESCVAL_W < 'a > { w : & 'a mut W , } impl < 'a > PRESCVAL_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 << 8 ) ) | ( ( ( value as u16 ) & 0x07 ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 8:10 - 3-bit prescaler for the watchdog clock source" ] # [ inline ( always ) ] pub fn prescval ( & self ) -> PRESCVAL_R { PRESCVAL_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 8:10 - 3-bit prescaler for the watchdog clock source" ] # [ inline ( always ) ] pub fn prescval ( & mut self ) -> PRESCVAL_W { PRESCVAL_W { w : self } } } } } # [ doc = "External Watchdog Monitor" ] pub struct EWM { _marker : PhantomData < * const ( ) > } unsafe impl Send for EWM { } impl EWM { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const ewm :: RegisterBlock { 0x4006_1000 as * const _ } } impl Deref for EWM { type Target = ewm :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * EWM :: ptr ( ) } } } # [ doc = "External Watchdog Monitor" ] pub mod ewm { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Control Register" ] pub ctrl : CTRL , # [ doc = "0x01 - Service Register" ] pub serv : SERV , # [ doc = "0x02 - Compare Low Register" ] pub cmpl : CMPL , # [ doc = "0x03 - Compare High Register" ] pub cmph : CMPH , } # [ doc = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl](ctrl) module" ] pub type CTRL = crate :: Reg < u8 , _CTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL ; # [ doc = "`read()` method returns [ctrl::R](ctrl::R) reader structure" ] impl crate :: Readable for CTRL { } # [ doc = "`write(|w| ..)` method takes [ctrl::W](ctrl::W) writer structure" ] impl crate :: Writable for CTRL { } # [ doc = "Control Register" ] pub mod ctrl { # [ doc = "Reader of register CTRL" ] pub type R = crate :: R < u8 , super :: CTRL > ; # [ doc = "Writer for register CTRL" ] pub type W = crate :: W < u8 , super :: CTRL > ; # [ doc = "Register CTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CTRL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EWMEN`" ] pub type EWMEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `EWMEN`" ] pub struct EWMEN_W < 'a > { w : & 'a mut W , } impl < 'a > EWMEN_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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ASSIN`" ] pub type ASSIN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ASSIN`" ] pub struct ASSIN_W < 'a > { w : & 'a mut W , } impl < 'a > ASSIN_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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Reader of field `INEN`" ] pub type INEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `INEN`" ] pub struct INEN_W < 'a > { w : & 'a mut W , } impl < 'a > INEN_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Reader of field `INTEN`" ] pub type INTEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `INTEN`" ] pub struct INTEN_W < 'a > { w : & 'a mut W , } impl < 'a > INTEN_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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - EWM enable." ] # [ inline ( always ) ] pub fn ewmen ( & self ) -> EWMEN_R { EWMEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - EWM_in's Assertion State Select." ] # [ inline ( always ) ] pub fn assin ( & self ) -> ASSIN_R { ASSIN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Input Enable." ] # [ inline ( always ) ] pub fn inen ( & self ) -> INEN_R { INEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Interrupt Enable." ] # [ inline ( always ) ] pub fn inten ( & self ) -> INTEN_R { INTEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - EWM enable." ] # [ inline ( always ) ] pub fn ewmen ( & mut self ) -> EWMEN_W { EWMEN_W { w : self } } # [ doc = "Bit 1 - EWM_in's Assertion State Select." ] # [ inline ( always ) ] pub fn assin ( & mut self ) -> ASSIN_W { ASSIN_W { w : self } } # [ doc = "Bit 2 - Input Enable." ] # [ inline ( always ) ] pub fn inen ( & mut self ) -> INEN_W { INEN_W { w : self } } # [ doc = "Bit 3 - Interrupt Enable." ] # [ inline ( always ) ] pub fn inten ( & mut self ) -> INTEN_W { INTEN_W { w : self } } } } # [ doc = "Service Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [serv](serv) module" ] pub type SERV = crate :: Reg < u8 , _SERV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SERV ; # [ doc = "`write(|w| ..)` method takes [serv::W](serv::W) writer structure" ] impl crate :: Writable for SERV { } # [ doc = "Service Register" ] pub mod serv { # [ doc = "Writer for register SERV" ] pub type W = crate :: W < u8 , super :: SERV > ; # [ doc = "Register SERV `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SERV { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `SERVICE`" ] pub struct SERVICE_W < 'a > { w : & 'a mut W , } impl < 'a > SERVICE_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl W { # [ doc = "Bits 0:7 - The EWM service mechanism requires the CPU to write two values to the SERV register: a first data byte of 0xB4, followed by a second data byte of 0x2C" ] # [ inline ( always ) ] pub fn service ( & mut self ) -> SERVICE_W { SERVICE_W { w : self } } } } # [ doc = "Compare Low Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmpl](cmpl) module" ] pub type CMPL = crate :: Reg < u8 , _CMPL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMPL ; # [ doc = "`read()` method returns [cmpl::R](cmpl::R) reader structure" ] impl crate :: Readable for CMPL { } # [ doc = "`write(|w| ..)` method takes [cmpl::W](cmpl::W) writer structure" ] impl crate :: Writable for CMPL { } # [ doc = "Compare Low Register" ] pub mod cmpl { # [ doc = "Reader of register CMPL" ] pub type R = crate :: R < u8 , super :: CMPL > ; # [ doc = "Writer for register CMPL" ] pub type W = crate :: W < u8 , super :: CMPL > ; # [ doc = "Register CMPL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CMPL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COMPAREL`" ] pub type COMPAREL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `COMPAREL`" ] pub struct COMPAREL_W < 'a > { w : & 'a mut W , } impl < 'a > COMPAREL_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - To prevent runaway code from changing this field, software should write to this field after a CPU reset even if the (default) minimum service time is required" ] # [ inline ( always ) ] pub fn comparel ( & self ) -> COMPAREL_R { COMPAREL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - To prevent runaway code from changing this field, software should write to this field after a CPU reset even if the (default) minimum service time is required" ] # [ inline ( always ) ] pub fn comparel ( & mut self ) -> COMPAREL_W { COMPAREL_W { w : self } } } } # [ doc = "Compare High Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmph](cmph) module" ] pub type CMPH = crate :: Reg < u8 , _CMPH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMPH ; # [ doc = "`read()` method returns [cmph::R](cmph::R) reader structure" ] impl crate :: Readable for CMPH { } # [ doc = "`write(|w| ..)` method takes [cmph::W](cmph::W) writer structure" ] impl crate :: Writable for CMPH { } # [ doc = "Compare High Register" ] pub mod cmph { # [ doc = "Reader of register CMPH" ] pub type R = crate :: R < u8 , super :: CMPH > ; # [ doc = "Writer for register CMPH" ] pub type W = crate :: W < u8 , super :: CMPH > ; # [ doc = "Register CMPH `reset()`'s with value 0xff" ] impl crate :: ResetValue for super :: CMPH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xff } } # [ doc = "Reader of field `COMPAREH`" ] pub type COMPAREH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `COMPAREH`" ] pub struct COMPAREH_W < 'a > { w : & 'a mut W , } impl < 'a > COMPAREH_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - To prevent runaway code from changing this field, software should write to this field after a CPU reset even if the (default) maximum service time is required" ] # [ inline ( always ) ] pub fn compareh ( & self ) -> COMPAREH_R { COMPAREH_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - To prevent runaway code from changing this field, software should write to this field after a CPU reset even if the (default) maximum service time is required" ] # [ inline ( always ) ] pub fn compareh ( & mut self ) -> COMPAREH_W { COMPAREH_W { w : self } } } } } # [ doc = "Carrier Modulator Transmitter" ] pub struct CMT { _marker : PhantomData < * const ( ) > } unsafe impl Send for CMT { } impl CMT { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const cmt :: RegisterBlock { 0x4006_2000 as * const _ } } impl Deref for CMT { type Target = cmt :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CMT :: ptr ( ) } } } # [ doc = "Carrier Modulator Transmitter" ] pub mod cmt { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - CMT Carrier Generator High Data Register 1" ] pub cgh1 : CGH1 , # [ doc = "0x01 - CMT Carrier Generator Low Data Register 1" ] pub cgl1 : CGL1 , # [ doc = "0x02 - CMT Carrier Generator High Data Register 2" ] pub cgh2 : CGH2 , # [ doc = "0x03 - CMT Carrier Generator Low Data Register 2" ] pub cgl2 : CGL2 , # [ doc = "0x04 - CMT Output Control Register" ] pub oc : OC , # [ doc = "0x05 - CMT Modulator Status and Control Register" ] pub msc : MSC , # [ doc = "0x06 - CMT Modulator Data Register Mark High" ] pub cmd1 : CMD1 , # [ doc = "0x07 - CMT Modulator Data Register Mark Low" ] pub cmd2 : CMD2 , # [ doc = "0x08 - CMT Modulator Data Register Space High" ] pub cmd3 : CMD3 , # [ doc = "0x09 - CMT Modulator Data Register Space Low" ] pub cmd4 : CMD4 , # [ doc = "0x0a - CMT Primary Prescaler Register" ] pub pps : PPS , # [ doc = "0x0b - CMT Direct Memory Access Register" ] pub dma : DMA , } # [ doc = "CMT Carrier Generator High Data Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cgh1](cgh1) module" ] pub type CGH1 = crate :: Reg < u8 , _CGH1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CGH1 ; # [ doc = "`read()` method returns [cgh1::R](cgh1::R) reader structure" ] impl crate :: Readable for CGH1 { } # [ doc = "`write(|w| ..)` method takes [cgh1::W](cgh1::W) writer structure" ] impl crate :: Writable for CGH1 { } # [ doc = "CMT Carrier Generator High Data Register 1" ] pub mod cgh1 { # [ doc = "Reader of register CGH1" ] pub type R = crate :: R < u8 , super :: CGH1 > ; # [ doc = "Writer for register CGH1" ] pub type W = crate :: W < u8 , super :: CGH1 > ; # [ doc = "Register CGH1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CGH1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PH`" ] pub type PH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PH`" ] pub struct PH_W < 'a > { w : & 'a mut W , } impl < 'a > PH_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Primary Carrier High Time Data Value" ] # [ inline ( always ) ] pub fn ph ( & self ) -> PH_R { PH_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Primary Carrier High Time Data Value" ] # [ inline ( always ) ] pub fn ph ( & mut self ) -> PH_W { PH_W { w : self } } } } # [ doc = "CMT Carrier Generator Low Data Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cgl1](cgl1) module" ] pub type CGL1 = crate :: Reg < u8 , _CGL1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CGL1 ; # [ doc = "`read()` method returns [cgl1::R](cgl1::R) reader structure" ] impl crate :: Readable for CGL1 { } # [ doc = "`write(|w| ..)` method takes [cgl1::W](cgl1::W) writer structure" ] impl crate :: Writable for CGL1 { } # [ doc = "CMT Carrier Generator Low Data Register 1" ] pub mod cgl1 { # [ doc = "Reader of register CGL1" ] pub type R = crate :: R < u8 , super :: CGL1 > ; # [ doc = "Writer for register CGL1" ] pub type W = crate :: W < u8 , super :: CGL1 > ; # [ doc = "Register CGL1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CGL1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PL`" ] pub type PL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PL`" ] pub struct PL_W < 'a > { w : & 'a mut W , } impl < 'a > PL_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Primary Carrier Low Time Data Value" ] # [ inline ( always ) ] pub fn pl ( & self ) -> PL_R { PL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Primary Carrier Low Time Data Value" ] # [ inline ( always ) ] pub fn pl ( & mut self ) -> PL_W { PL_W { w : self } } } } # [ doc = "CMT Carrier Generator High Data Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cgh2](cgh2) module" ] pub type CGH2 = crate :: Reg < u8 , _CGH2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CGH2 ; # [ doc = "`read()` method returns [cgh2::R](cgh2::R) reader structure" ] impl crate :: Readable for CGH2 { } # [ doc = "`write(|w| ..)` method takes [cgh2::W](cgh2::W) writer structure" ] impl crate :: Writable for CGH2 { } # [ doc = "CMT Carrier Generator High Data Register 2" ] pub mod cgh2 { # [ doc = "Reader of register CGH2" ] pub type R = crate :: R < u8 , super :: CGH2 > ; # [ doc = "Writer for register CGH2" ] pub type W = crate :: W < u8 , super :: CGH2 > ; # [ doc = "Register CGH2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CGH2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SH`" ] pub type SH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SH`" ] pub struct SH_W < 'a > { w : & 'a mut W , } impl < 'a > SH_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Secondary Carrier High Time Data Value" ] # [ inline ( always ) ] pub fn sh ( & self ) -> SH_R { SH_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Secondary Carrier High Time Data Value" ] # [ inline ( always ) ] pub fn sh ( & mut self ) -> SH_W { SH_W { w : self } } } } # [ doc = "CMT Carrier Generator Low Data Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cgl2](cgl2) module" ] pub type CGL2 = crate :: Reg < u8 , _CGL2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CGL2 ; # [ doc = "`read()` method returns [cgl2::R](cgl2::R) reader structure" ] impl crate :: Readable for CGL2 { } # [ doc = "`write(|w| ..)` method takes [cgl2::W](cgl2::W) writer structure" ] impl crate :: Writable for CGL2 { } # [ doc = "CMT Carrier Generator Low Data Register 2" ] pub mod cgl2 { # [ doc = "Reader of register CGL2" ] pub type R = crate :: R < u8 , super :: CGL2 > ; # [ doc = "Writer for register CGL2" ] pub type W = crate :: W < u8 , super :: CGL2 > ; # [ doc = "Register CGL2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CGL2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SL`" ] pub type SL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SL`" ] pub struct SL_W < 'a > { w : & 'a mut W , } impl < 'a > SL_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Secondary Carrier Low Time Data Value" ] # [ inline ( always ) ] pub fn sl ( & self ) -> SL_R { SL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Secondary Carrier Low Time Data Value" ] # [ inline ( always ) ] pub fn sl ( & mut self ) -> SL_W { SL_W { w : self } } } } # [ doc = "CMT Output Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [oc](oc) module" ] pub type OC = crate :: Reg < u8 , _OC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OC ; # [ doc = "`read()` method returns [oc::R](oc::R) reader structure" ] impl crate :: Readable for OC { } # [ doc = "`write(|w| ..)` method takes [oc::W](oc::W) writer structure" ] impl crate :: Writable for OC { } # [ doc = "CMT Output Control Register" ] pub mod oc { # [ doc = "Reader of register OC" ] pub type R = crate :: R < u8 , super :: OC > ; # [ doc = "Writer for register OC" ] pub type W = crate :: W < u8 , super :: OC > ; # [ doc = "Register OC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OC { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "IRO Pin Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IROPEN_A { # [ doc = "0: The IRO signal is disabled." ] _0 , # [ doc = "1: The IRO signal is enabled as output." ] _1 } impl From < IROPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IROPEN_A ) -> Self { match variant { IROPEN_A :: _0 => false , IROPEN_A :: _1 => true } } } # [ doc = "Reader of field `IROPEN`" ] pub type IROPEN_R = crate :: R < bool , IROPEN_A > ; impl IROPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IROPEN_A { match self . bits { false => IROPEN_A :: _0 , true => IROPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IROPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IROPEN_A :: _1 } } # [ doc = "Write proxy for field `IROPEN`" ] pub struct IROPEN_W < 'a > { w : & 'a mut W , } impl < 'a > IROPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IROPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The IRO signal is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IROPEN_A :: _0 ) } # [ doc = "The IRO signal is enabled as output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IROPEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "CMT Output Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CMTPOL_A { # [ doc = "0: The IRO signal is active-low." ] _0 , # [ doc = "1: The IRO signal is active-high." ] _1 } impl From < CMTPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : CMTPOL_A ) -> Self { match variant { CMTPOL_A :: _0 => false , CMTPOL_A :: _1 => true } } } # [ doc = "Reader of field `CMTPOL`" ] pub type CMTPOL_R = crate :: R < bool , CMTPOL_A > ; impl CMTPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CMTPOL_A { match self . bits { false => CMTPOL_A :: _0 , true => CMTPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CMTPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CMTPOL_A :: _1 } } # [ doc = "Write proxy for field `CMTPOL`" ] pub struct CMTPOL_W < 'a > { w : & 'a mut W , } impl < 'a > CMTPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CMTPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The IRO signal is active-low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CMTPOL_A :: _0 ) } # [ doc = "The IRO signal is active-high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CMTPOL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `IROL`" ] pub type IROL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IROL`" ] pub struct IROL_W < 'a > { w : & 'a mut W , } impl < 'a > IROL_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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 5 - IRO Pin Enable" ] # [ inline ( always ) ] pub fn iropen ( & self ) -> IROPEN_R { IROPEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - CMT Output Polarity" ] # [ inline ( always ) ] pub fn cmtpol ( & self ) -> CMTPOL_R { CMTPOL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - IRO Latch Control" ] # [ inline ( always ) ] pub fn irol ( & self ) -> IROL_R { IROL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 5 - IRO Pin Enable" ] # [ inline ( always ) ] pub fn iropen ( & mut self ) -> IROPEN_W { IROPEN_W { w : self } } # [ doc = "Bit 6 - CMT Output Polarity" ] # [ inline ( always ) ] pub fn cmtpol ( & mut self ) -> CMTPOL_W { CMTPOL_W { w : self } } # [ doc = "Bit 7 - IRO Latch Control" ] # [ inline ( always ) ] pub fn irol ( & mut self ) -> IROL_W { IROL_W { w : self } } } } # [ doc = "CMT Modulator Status and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [msc](msc) module" ] pub type MSC = crate :: Reg < u8 , _MSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MSC ; # [ doc = "`read()` method returns [msc::R](msc::R) reader structure" ] impl crate :: Readable for MSC { } # [ doc = "`write(|w| ..)` method takes [msc::W](msc::W) writer structure" ] impl crate :: Writable for MSC { } # [ doc = "CMT Modulator Status and Control Register" ] pub mod msc { # [ doc = "Reader of register MSC" ] pub type R = crate :: R < u8 , super :: MSC > ; # [ doc = "Writer for register MSC" ] pub type W = crate :: W < u8 , super :: MSC > ; # [ doc = "Register MSC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MSC { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Modulator and Carrier Generator Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MCGEN_A { # [ doc = "0: Modulator and carrier generator disabled" ] _0 , # [ doc = "1: Modulator and carrier generator enabled" ] _1 } impl From < MCGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : MCGEN_A ) -> Self { match variant { MCGEN_A :: _0 => false , MCGEN_A :: _1 => true } } } # [ doc = "Reader of field `MCGEN`" ] pub type MCGEN_R = crate :: R < bool , MCGEN_A > ; impl MCGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MCGEN_A { match self . bits { false => MCGEN_A :: _0 , true => MCGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MCGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MCGEN_A :: _1 } } # [ doc = "Write proxy for field `MCGEN`" ] pub struct MCGEN_W < 'a > { w : & 'a mut W , } impl < 'a > MCGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MCGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Modulator and carrier generator disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MCGEN_A :: _0 ) } # [ doc = "Modulator and carrier generator enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MCGEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "End of Cycle Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOCIE_A { # [ doc = "0: CPU interrupt is disabled." ] _0 , # [ doc = "1: CPU interrupt is enabled." ] _1 } impl From < EOCIE_A > for bool { # [ inline ( always ) ] fn from ( variant : EOCIE_A ) -> Self { match variant { EOCIE_A :: _0 => false , EOCIE_A :: _1 => true } } } # [ doc = "Reader of field `EOCIE`" ] pub type EOCIE_R = crate :: R < bool , EOCIE_A > ; impl EOCIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOCIE_A { match self . bits { false => EOCIE_A :: _0 , true => EOCIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOCIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOCIE_A :: _1 } } # [ doc = "Write proxy for field `EOCIE`" ] pub struct EOCIE_W < 'a > { w : & 'a mut W , } impl < 'a > EOCIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EOCIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CPU interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EOCIE_A :: _0 ) } # [ doc = "CPU interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EOCIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "FSK Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FSK_A { # [ doc = "0: The CMT operates in Time or Baseband mode." ] _0 , # [ doc = "1: The CMT operates in FSK mode." ] _1 } impl From < FSK_A > for bool { # [ inline ( always ) ] fn from ( variant : FSK_A ) -> Self { match variant { FSK_A :: _0 => false , FSK_A :: _1 => true } } } # [ doc = "Reader of field `FSK`" ] pub type FSK_R = crate :: R < bool , FSK_A > ; impl FSK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FSK_A { match self . bits { false => FSK_A :: _0 , true => FSK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FSK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FSK_A :: _1 } } # [ doc = "Write proxy for field `FSK`" ] pub struct FSK_W < 'a > { w : & 'a mut W , } impl < 'a > FSK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FSK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The CMT operates in Time or Baseband mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FSK_A :: _0 ) } # [ doc = "The CMT operates in FSK mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FSK_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Baseband Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BASE_A { # [ doc = "0: Baseband mode is disabled." ] _0 , # [ doc = "1: Baseband mode is enabled." ] _1 } impl From < BASE_A > for bool { # [ inline ( always ) ] fn from ( variant : BASE_A ) -> Self { match variant { BASE_A :: _0 => false , BASE_A :: _1 => true } } } # [ doc = "Reader of field `BASE`" ] pub type BASE_R = crate :: R < bool , BASE_A > ; impl BASE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BASE_A { match self . bits { false => BASE_A :: _0 , true => BASE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BASE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BASE_A :: _1 } } # [ doc = "Write proxy for field `BASE`" ] pub struct BASE_W < 'a > { w : & 'a mut W , } impl < 'a > BASE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BASE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Baseband mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BASE_A :: _0 ) } # [ doc = "Baseband mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BASE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Extended Space Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXSPC_A { # [ doc = "0: Extended space is disabled." ] _0 , # [ doc = "1: Extended space is enabled." ] _1 } impl From < EXSPC_A > for bool { # [ inline ( always ) ] fn from ( variant : EXSPC_A ) -> Self { match variant { EXSPC_A :: _0 => false , EXSPC_A :: _1 => true } } } # [ doc = "Reader of field `EXSPC`" ] pub type EXSPC_R = crate :: R < bool , EXSPC_A > ; impl EXSPC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EXSPC_A { match self . bits { false => EXSPC_A :: _0 , true => EXSPC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EXSPC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EXSPC_A :: _1 } } # [ doc = "Write proxy for field `EXSPC`" ] pub struct EXSPC_W < 'a > { w : & 'a mut W , } impl < 'a > EXSPC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EXSPC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Extended space is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EXSPC_A :: _0 ) } # [ doc = "Extended space is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EXSPC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "CMT Clock Divide Prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CMTDIV_A { # [ doc = "0: IF * 1" ] _00 , # [ doc = "1: IF * 2" ] _01 , # [ doc = "2: IF * 4" ] _10 , # [ doc = "3: IF * 8" ] _11 } impl From < CMTDIV_A > for u8 { # [ inline ( always ) ] fn from ( variant : CMTDIV_A ) -> Self { match variant { CMTDIV_A :: _00 => 0 , CMTDIV_A :: _01 => 1 , CMTDIV_A :: _10 => 2 , CMTDIV_A :: _11 => 3 } } } # [ doc = "Reader of field `CMTDIV`" ] pub type CMTDIV_R = crate :: R < u8 , CMTDIV_A > ; impl CMTDIV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CMTDIV_A { match self . bits { 0 => CMTDIV_A :: _00 , 1 => CMTDIV_A :: _01 , 2 => CMTDIV_A :: _10 , 3 => CMTDIV_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CMTDIV_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CMTDIV_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CMTDIV_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CMTDIV_A :: _11 } } # [ doc = "Write proxy for field `CMTDIV`" ] pub struct CMTDIV_W < 'a > { w : & 'a mut W , } impl < 'a > CMTDIV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CMTDIV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IF * 1" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CMTDIV_A :: _00 ) } # [ doc = "IF * 2" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CMTDIV_A :: _01 ) } # [ doc = "IF * 4" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CMTDIV_A :: _10 ) } # [ doc = "IF * 8" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CMTDIV_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u8 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "End Of Cycle Status Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EOCF_A { # [ doc = "0: End of modulation cycle has not occurred since the flag last cleared." ] _0 , # [ doc = "1: End of modulator cycle has occurred." ] _1 } impl From < EOCF_A > for bool { # [ inline ( always ) ] fn from ( variant : EOCF_A ) -> Self { match variant { EOCF_A :: _0 => false , EOCF_A :: _1 => true } } } # [ doc = "Reader of field `EOCF`" ] pub type EOCF_R = crate :: R < bool , EOCF_A > ; impl EOCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EOCF_A { match self . bits { false => EOCF_A :: _0 , true => EOCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EOCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EOCF_A :: _1 } } impl R { # [ doc = "Bit 0 - Modulator and Carrier Generator Enable" ] # [ inline ( always ) ] pub fn mcgen ( & self ) -> MCGEN_R { MCGEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - End of Cycle Interrupt Enable" ] # [ inline ( always ) ] pub fn eocie ( & self ) -> EOCIE_R { EOCIE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - FSK Mode Select" ] # [ inline ( always ) ] pub fn fsk ( & self ) -> FSK_R { FSK_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Baseband Enable" ] # [ inline ( always ) ] pub fn base ( & self ) -> BASE_R { BASE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Extended Space Enable" ] # [ inline ( always ) ] pub fn exspc ( & self ) -> EXSPC_R { EXSPC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:6 - CMT Clock Divide Prescaler" ] # [ inline ( always ) ] pub fn cmtdiv ( & self ) -> CMTDIV_R { CMTDIV_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - End Of Cycle Status Flag" ] # [ inline ( always ) ] pub fn eocf ( & self ) -> EOCF_R { EOCF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Modulator and Carrier Generator Enable" ] # [ inline ( always ) ] pub fn mcgen ( & mut self ) -> MCGEN_W { MCGEN_W { w : self } } # [ doc = "Bit 1 - End of Cycle Interrupt Enable" ] # [ inline ( always ) ] pub fn eocie ( & mut self ) -> EOCIE_W { EOCIE_W { w : self } } # [ doc = "Bit 2 - FSK Mode Select" ] # [ inline ( always ) ] pub fn fsk ( & mut self ) -> FSK_W { FSK_W { w : self } } # [ doc = "Bit 3 - Baseband Enable" ] # [ inline ( always ) ] pub fn base ( & mut self ) -> BASE_W { BASE_W { w : self } } # [ doc = "Bit 4 - Extended Space Enable" ] # [ inline ( always ) ] pub fn exspc ( & mut self ) -> EXSPC_W { EXSPC_W { w : self } } # [ doc = "Bits 5:6 - CMT Clock Divide Prescaler" ] # [ inline ( always ) ] pub fn cmtdiv ( & mut self ) -> CMTDIV_W { CMTDIV_W { w : self } } } } # [ doc = "CMT Modulator Data Register Mark High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmd1](cmd1) module" ] pub type CMD1 = crate :: Reg < u8 , _CMD1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMD1 ; # [ doc = "`read()` method returns [cmd1::R](cmd1::R) reader structure" ] impl crate :: Readable for CMD1 { } # [ doc = "`write(|w| ..)` method takes [cmd1::W](cmd1::W) writer structure" ] impl crate :: Writable for CMD1 { } # [ doc = "CMT Modulator Data Register Mark High" ] pub mod cmd1 { # [ doc = "Reader of register CMD1" ] pub type R = crate :: R < u8 , super :: CMD1 > ; # [ doc = "Writer for register CMD1" ] pub type W = crate :: W < u8 , super :: CMD1 > ; # [ doc = "Register CMD1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CMD1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MB`" ] pub type MB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MB`" ] pub struct MB_W < 'a > { w : & 'a mut W , } impl < 'a > MB_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - MB\\[15:8\\]" ] # [ inline ( always ) ] pub fn mb ( & self ) -> MB_R { MB_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - MB\\[15:8\\]" ] # [ inline ( always ) ] pub fn mb ( & mut self ) -> MB_W { MB_W { w : self } } } } # [ doc = "CMT Modulator Data Register Mark Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmd2](cmd2) module" ] pub type CMD2 = crate :: Reg < u8 , _CMD2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMD2 ; # [ doc = "`read()` method returns [cmd2::R](cmd2::R) reader structure" ] impl crate :: Readable for CMD2 { } # [ doc = "`write(|w| ..)` method takes [cmd2::W](cmd2::W) writer structure" ] impl crate :: Writable for CMD2 { } # [ doc = "CMT Modulator Data Register Mark Low" ] pub mod cmd2 { # [ doc = "Reader of register CMD2" ] pub type R = crate :: R < u8 , super :: CMD2 > ; # [ doc = "Writer for register CMD2" ] pub type W = crate :: W < u8 , super :: CMD2 > ; # [ doc = "Register CMD2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CMD2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MB`" ] pub type MB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MB`" ] pub struct MB_W < 'a > { w : & 'a mut W , } impl < 'a > MB_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - MB\\[7:0\\]" ] # [ inline ( always ) ] pub fn mb ( & self ) -> MB_R { MB_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - MB\\[7:0\\]" ] # [ inline ( always ) ] pub fn mb ( & mut self ) -> MB_W { MB_W { w : self } } } } # [ doc = "CMT Modulator Data Register Space High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmd3](cmd3) module" ] pub type CMD3 = crate :: Reg < u8 , _CMD3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMD3 ; # [ doc = "`read()` method returns [cmd3::R](cmd3::R) reader structure" ] impl crate :: Readable for CMD3 { } # [ doc = "`write(|w| ..)` method takes [cmd3::W](cmd3::W) writer structure" ] impl crate :: Writable for CMD3 { } # [ doc = "CMT Modulator Data Register Space High" ] pub mod cmd3 { # [ doc = "Reader of register CMD3" ] pub type R = crate :: R < u8 , super :: CMD3 > ; # [ doc = "Writer for register CMD3" ] pub type W = crate :: W < u8 , super :: CMD3 > ; # [ doc = "Register CMD3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CMD3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SB`" ] pub type SB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SB`" ] pub struct SB_W < 'a > { w : & 'a mut W , } impl < 'a > SB_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SB\\[15:8\\]" ] # [ inline ( always ) ] pub fn sb ( & self ) -> SB_R { SB_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SB\\[15:8\\]" ] # [ inline ( always ) ] pub fn sb ( & mut self ) -> SB_W { SB_W { w : self } } } } # [ doc = "CMT Modulator Data Register Space Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmd4](cmd4) module" ] pub type CMD4 = crate :: Reg < u8 , _CMD4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMD4 ; # [ doc = "`read()` method returns [cmd4::R](cmd4::R) reader structure" ] impl crate :: Readable for CMD4 { } # [ doc = "`write(|w| ..)` method takes [cmd4::W](cmd4::W) writer structure" ] impl crate :: Writable for CMD4 { } # [ doc = "CMT Modulator Data Register Space Low" ] pub mod cmd4 { # [ doc = "Reader of register CMD4" ] pub type R = crate :: R < u8 , super :: CMD4 > ; # [ doc = "Writer for register CMD4" ] pub type W = crate :: W < u8 , super :: CMD4 > ; # [ doc = "Register CMD4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CMD4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SB`" ] pub type SB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SB`" ] pub struct SB_W < 'a > { w : & 'a mut W , } impl < 'a > SB_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SB\\[7:0\\]" ] # [ inline ( always ) ] pub fn sb ( & self ) -> SB_R { SB_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SB\\[7:0\\]" ] # [ inline ( always ) ] pub fn sb ( & mut self ) -> SB_W { SB_W { w : self } } } } # [ doc = "CMT Primary Prescaler Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pps](pps) module" ] pub type PPS = crate :: Reg < u8 , _PPS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PPS ; # [ doc = "`read()` method returns [pps::R](pps::R) reader structure" ] impl crate :: Readable for PPS { } # [ doc = "`write(|w| ..)` method takes [pps::W](pps::W) writer structure" ] impl crate :: Writable for PPS { } # [ doc = "CMT Primary Prescaler Register" ] pub mod pps { # [ doc = "Reader of register PPS" ] pub type R = crate :: R < u8 , super :: PPS > ; # [ doc = "Writer for register PPS" ] pub type W = crate :: W < u8 , super :: PPS > ; # [ doc = "Register PPS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PPS { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Primary Prescaler Divider\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PPSDIV_A { # [ doc = "0: Bus clock * 1" ] _0000 , # [ doc = "1: Bus clock * 2" ] _0001 , # [ doc = "2: Bus clock * 3" ] _0010 , # [ doc = "3: Bus clock * 4" ] _0011 , # [ doc = "4: Bus clock * 5" ] _0100 , # [ doc = "5: Bus clock * 6" ] _0101 , # [ doc = "6: Bus clock * 7" ] _0110 , # [ doc = "7: Bus clock * 8" ] _0111 , # [ doc = "8: Bus clock * 9" ] _1000 , # [ doc = "9: Bus clock * 10" ] _1001 , # [ doc = "10: Bus clock * 11" ] _1010 , # [ doc = "11: Bus clock * 12" ] _1011 , # [ doc = "12: Bus clock * 13" ] _1100 , # [ doc = "13: Bus clock * 14" ] _1101 , # [ doc = "14: Bus clock * 15" ] _1110 , # [ doc = "15: Bus clock * 16" ] _1111 } impl From < PPSDIV_A > for u8 { # [ inline ( always ) ] fn from ( variant : PPSDIV_A ) -> Self { match variant { PPSDIV_A :: _0000 => 0 , PPSDIV_A :: _0001 => 1 , PPSDIV_A :: _0010 => 2 , PPSDIV_A :: _0011 => 3 , PPSDIV_A :: _0100 => 4 , PPSDIV_A :: _0101 => 5 , PPSDIV_A :: _0110 => 6 , PPSDIV_A :: _0111 => 7 , PPSDIV_A :: _1000 => 8 , PPSDIV_A :: _1001 => 9 , PPSDIV_A :: _1010 => 10 , PPSDIV_A :: _1011 => 11 , PPSDIV_A :: _1100 => 12 , PPSDIV_A :: _1101 => 13 , PPSDIV_A :: _1110 => 14 , PPSDIV_A :: _1111 => 15 } } } # [ doc = "Reader of field `PPSDIV`" ] pub type PPSDIV_R = crate :: R < u8 , PPSDIV_A > ; impl PPSDIV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PPSDIV_A { match self . bits { 0 => PPSDIV_A :: _0000 , 1 => PPSDIV_A :: _0001 , 2 => PPSDIV_A :: _0010 , 3 => PPSDIV_A :: _0011 , 4 => PPSDIV_A :: _0100 , 5 => PPSDIV_A :: _0101 , 6 => PPSDIV_A :: _0110 , 7 => PPSDIV_A :: _0111 , 8 => PPSDIV_A :: _1000 , 9 => PPSDIV_A :: _1001 , 10 => PPSDIV_A :: _1010 , 11 => PPSDIV_A :: _1011 , 12 => PPSDIV_A :: _1100 , 13 => PPSDIV_A :: _1101 , 14 => PPSDIV_A :: _1110 , 15 => PPSDIV_A :: _1111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == PPSDIV_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == PPSDIV_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == PPSDIV_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == PPSDIV_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == PPSDIV_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == PPSDIV_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == PPSDIV_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == PPSDIV_A :: _0111 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == PPSDIV_A :: _1000 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == PPSDIV_A :: _1001 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == PPSDIV_A :: _1010 } # [ doc = "Checks if the value of the field is `_1011`" ] # [ inline ( always ) ] pub fn is_1011 ( & self ) -> bool { * self == PPSDIV_A :: _1011 } # [ doc = "Checks if the value of the field is `_1100`" ] # [ inline ( always ) ] pub fn is_1100 ( & self ) -> bool { * self == PPSDIV_A :: _1100 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == PPSDIV_A :: _1101 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == PPSDIV_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == PPSDIV_A :: _1111 } } # [ doc = "Write proxy for field `PPSDIV`" ] pub struct PPSDIV_W < 'a > { w : & 'a mut W , } impl < 'a > PPSDIV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PPSDIV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Bus clock * 1" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _0000 ) } # [ doc = "Bus clock * 2" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _0001 ) } # [ doc = "Bus clock * 3" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _0010 ) } # [ doc = "Bus clock * 4" ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _0011 ) } # [ doc = "Bus clock * 5" ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _0100 ) } # [ doc = "Bus clock * 6" ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _0101 ) } # [ doc = "Bus clock * 7" ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _0110 ) } # [ doc = "Bus clock * 8" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _0111 ) } # [ doc = "Bus clock * 9" ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _1000 ) } # [ doc = "Bus clock * 10" ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _1001 ) } # [ doc = "Bus clock * 11" ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _1010 ) } # [ doc = "Bus clock * 12" ] # [ inline ( always ) ] pub fn _1011 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _1011 ) } # [ doc = "Bus clock * 13" ] # [ inline ( always ) ] pub fn _1100 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _1100 ) } # [ doc = "Bus clock * 14" ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _1101 ) } # [ doc = "Bus clock * 15" ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _1110 ) } # [ doc = "Bus clock * 16" ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( PPSDIV_A :: _1111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Primary Prescaler Divider" ] # [ inline ( always ) ] pub fn ppsdiv ( & self ) -> PPSDIV_R { PPSDIV_R :: new ( ( self . bits & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Primary Prescaler Divider" ] # [ inline ( always ) ] pub fn ppsdiv ( & mut self ) -> PPSDIV_W { PPSDIV_W { w : self } } } } # [ doc = "CMT Direct Memory Access Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dma](dma) module" ] pub type DMA = crate :: Reg < u8 , _DMA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DMA ; # [ doc = "`read()` method returns [dma::R](dma::R) reader structure" ] impl crate :: Readable for DMA { } # [ doc = "`write(|w| ..)` method takes [dma::W](dma::W) writer structure" ] impl crate :: Writable for DMA { } # [ doc = "CMT Direct Memory Access Register" ] pub mod dma { # [ doc = "Reader of register DMA" ] pub type R = crate :: R < u8 , super :: DMA > ; # [ doc = "Writer for register DMA" ] pub type W = crate :: W < u8 , super :: DMA > ; # [ doc = "Register DMA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DMA { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: DMA transfer request and done are disabled." ] _0 , # [ doc = "1: DMA transfer request and done are enabled." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA transfer request and done are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "DMA transfer request and done are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( self . bits & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } } } } # [ doc = "Multipurpose Clock Generator module" ] pub struct MCG { _marker : PhantomData < * const ( ) > } unsafe impl Send for MCG { } impl MCG { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const mcg :: RegisterBlock { 0x4006_4000 as * const _ } } impl Deref for MCG { type Target = mcg :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * MCG :: ptr ( ) } } } # [ doc = "Multipurpose Clock Generator module" ] pub mod mcg { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - MCG Control 1 Register" ] pub c1 : C1 , # [ doc = "0x01 - MCG Control 2 Register" ] pub c2 : C2 , # [ doc = "0x02 - MCG Control 3 Register" ] pub c3 : C3 , # [ doc = "0x03 - MCG Control 4 Register" ] pub c4 : C4 , # [ doc = "0x04 - MCG Control 5 Register" ] pub c5 : C5 , # [ doc = "0x05 - MCG Control 6 Register" ] pub c6 : C6 , # [ doc = "0x06 - MCG Status Register" ] pub s : S , _reserved7 : [ u8 ; 1usize ] , # [ doc = "0x08 - MCG Status and Control Register" ] pub sc : SC , _reserved8 : [ u8 ; 1usize ] , # [ doc = "0x0a - MCG Auto Trim Compare Value High Register" ] pub atcvh : ATCVH , # [ doc = "0x0b - MCG Auto Trim Compare Value Low Register" ] pub atcvl : ATCVL , # [ doc = "0x0c - MCG Control 7 Register" ] pub c7 : C7 , # [ doc = "0x0d - MCG Control 8 Register" ] pub c8 : C8 , # [ doc = "0x0e - MCG Control 9 Register" ] pub c9 : C9 , _reserved13 : [ u8 ; 1usize ] , # [ doc = "0x10 - MCG Control 11 Register" ] pub c11 : C11 , _reserved14 : [ u8 ; 1usize ] , # [ doc = "0x12 - MCG Status 2 Register" ] pub s2 : S2 , } # [ doc = "MCG Control 1 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "MCG Control 1 Register" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Internal Reference Stop Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREFSTEN_A { # [ doc = "0: Internal reference clock is disabled in Stop mode." ] _0 , # [ doc = "1: Internal reference clock is enabled in Stop mode if IRCLKEN is set or if MCG is in FEI, FBI, or BLPI modes before entering Stop mode." ] _1 } impl From < IREFSTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IREFSTEN_A ) -> Self { match variant { IREFSTEN_A :: _0 => false , IREFSTEN_A :: _1 => true } } } # [ doc = "Reader of field `IREFSTEN`" ] pub type IREFSTEN_R = crate :: R < bool , IREFSTEN_A > ; impl IREFSTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREFSTEN_A { match self . bits { false => IREFSTEN_A :: _0 , true => IREFSTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREFSTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREFSTEN_A :: _1 } } # [ doc = "Write proxy for field `IREFSTEN`" ] pub struct IREFSTEN_W < 'a > { w : & 'a mut W , } impl < 'a > IREFSTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IREFSTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal reference clock is disabled in Stop mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IREFSTEN_A :: _0 ) } # [ doc = "Internal reference clock is enabled in Stop mode if IRCLKEN is set or if MCG is in FEI, FBI, or BLPI modes before entering Stop mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IREFSTEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Internal Reference Clock Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRCLKEN_A { # [ doc = "0: MCGIRCLK inactive." ] _0 , # [ doc = "1: MCGIRCLK active." ] _1 } impl From < IRCLKEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IRCLKEN_A ) -> Self { match variant { IRCLKEN_A :: _0 => false , IRCLKEN_A :: _1 => true } } } # [ doc = "Reader of field `IRCLKEN`" ] pub type IRCLKEN_R = crate :: R < bool , IRCLKEN_A > ; impl IRCLKEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IRCLKEN_A { match self . bits { false => IRCLKEN_A :: _0 , true => IRCLKEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IRCLKEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IRCLKEN_A :: _1 } } # [ doc = "Write proxy for field `IRCLKEN`" ] pub struct IRCLKEN_W < 'a > { w : & 'a mut W , } impl < 'a > IRCLKEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRCLKEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MCGIRCLK inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IRCLKEN_A :: _0 ) } # [ doc = "MCGIRCLK active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IRCLKEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Internal Reference Select\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREFS_A { # [ doc = "0: External reference clock is selected." ] _0 , # [ doc = "1: The slow internal reference clock is selected." ] _1 } impl From < IREFS_A > for bool { # [ inline ( always ) ] fn from ( variant : IREFS_A ) -> Self { match variant { IREFS_A :: _0 => false , IREFS_A :: _1 => true } } } # [ doc = "Reader of field `IREFS`" ] pub type IREFS_R = crate :: R < bool , IREFS_A > ; impl IREFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREFS_A { match self . bits { false => IREFS_A :: _0 , true => IREFS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREFS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREFS_A :: _1 } } # [ doc = "Write proxy for field `IREFS`" ] pub struct IREFS_W < 'a > { w : & 'a mut W , } impl < 'a > IREFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IREFS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "External reference clock is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IREFS_A :: _0 ) } # [ doc = "The slow internal reference clock is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IREFS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "FLL External Reference Divider\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRDIV_A { # [ doc = "0: If RANGE = 0 or OSCSEL=1 , Divide Factor is 1; for all other RANGE values, Divide Factor is 32." ] _000 , # [ doc = "1: If RANGE = 0 or OSCSEL=1 , Divide Factor is 2; for all other RANGE values, Divide Factor is 64." ] _001 , # [ doc = "2: If RANGE = 0 or OSCSEL=1 , Divide Factor is 4; for all other RANGE values, Divide Factor is 128." ] _010 , # [ doc = "3: If RANGE = 0 or OSCSEL=1 , Divide Factor is 8; for all other RANGE values, Divide Factor is 256." ] _011 , # [ doc = "4: If RANGE = 0 or OSCSEL=1 , Divide Factor is 16; for all other RANGE values, Divide Factor is 512." ] _100 , # [ doc = "5: If RANGE = 0 or OSCSEL=1 , Divide Factor is 32; for all other RANGE values, Divide Factor is 1024." ] _101 , # [ doc = "6: If RANGE = 0 or OSCSEL=1 , Divide Factor is 64; for all other RANGE values, Divide Factor is 1280 ." ] _110 , # [ doc = "7: If RANGE = 0 or OSCSEL=1 , Divide Factor is 128; for all other RANGE values, Divide Factor is 1536 ." ] _111 } impl From < FRDIV_A > for u8 { # [ inline ( always ) ] fn from ( variant : FRDIV_A ) -> Self { match variant { FRDIV_A :: _000 => 0 , FRDIV_A :: _001 => 1 , FRDIV_A :: _010 => 2 , FRDIV_A :: _011 => 3 , FRDIV_A :: _100 => 4 , FRDIV_A :: _101 => 5 , FRDIV_A :: _110 => 6 , FRDIV_A :: _111 => 7 } } } # [ doc = "Reader of field `FRDIV`" ] pub type FRDIV_R = crate :: R < u8 , FRDIV_A > ; impl FRDIV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRDIV_A { match self . bits { 0 => FRDIV_A :: _000 , 1 => FRDIV_A :: _001 , 2 => FRDIV_A :: _010 , 3 => FRDIV_A :: _011 , 4 => FRDIV_A :: _100 , 5 => FRDIV_A :: _101 , 6 => FRDIV_A :: _110 , 7 => FRDIV_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == FRDIV_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == FRDIV_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == FRDIV_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == FRDIV_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == FRDIV_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == FRDIV_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == FRDIV_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == FRDIV_A :: _111 } } # [ doc = "Write proxy for field `FRDIV`" ] pub struct FRDIV_W < 'a > { w : & 'a mut W , } impl < 'a > FRDIV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRDIV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "If RANGE = 0 or OSCSEL=1 , Divide Factor is 1; for all other RANGE values, Divide Factor is 32." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( FRDIV_A :: _000 ) } # [ doc = "If RANGE = 0 or OSCSEL=1 , Divide Factor is 2; for all other RANGE values, Divide Factor is 64." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( FRDIV_A :: _001 ) } # [ doc = "If RANGE = 0 or OSCSEL=1 , Divide Factor is 4; for all other RANGE values, Divide Factor is 128." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( FRDIV_A :: _010 ) } # [ doc = "If RANGE = 0 or OSCSEL=1 , Divide Factor is 8; for all other RANGE values, Divide Factor is 256." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( FRDIV_A :: _011 ) } # [ doc = "If RANGE = 0 or OSCSEL=1 , Divide Factor is 16; for all other RANGE values, Divide Factor is 512." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( FRDIV_A :: _100 ) } # [ doc = "If RANGE = 0 or OSCSEL=1 , Divide Factor is 32; for all other RANGE values, Divide Factor is 1024." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( FRDIV_A :: _101 ) } # [ doc = "If RANGE = 0 or OSCSEL=1 , Divide Factor is 64; for all other RANGE values, Divide Factor is 1280 ." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( FRDIV_A :: _110 ) } # [ doc = "If RANGE = 0 or OSCSEL=1 , Divide Factor is 128; for all other RANGE values, Divide Factor is 1536 ." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( FRDIV_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 3 ) ) | ( ( ( value as u8 ) & 0x07 ) << 3 ) ; self . w } } # [ doc = "Clock Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKS_A { # [ doc = "0: Encoding 0 - Output of FLL or PLLCS is selected (depends on PLLS control bit)." ] _00 , # [ doc = "1: Encoding 1 - Internal reference clock is selected." ] _01 , # [ doc = "2: Encoding 2 - External reference clock is selected." ] _10 , # [ doc = "3: Encoding 3 - Reserved." ] _11 } impl From < CLKS_A > for u8 { # [ inline ( always ) ] fn from ( variant : CLKS_A ) -> Self { match variant { CLKS_A :: _00 => 0 , CLKS_A :: _01 => 1 , CLKS_A :: _10 => 2 , CLKS_A :: _11 => 3 } } } # [ doc = "Reader of field `CLKS`" ] pub type CLKS_R = crate :: R < u8 , CLKS_A > ; impl CLKS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKS_A { match self . bits { 0 => CLKS_A :: _00 , 1 => CLKS_A :: _01 , 2 => CLKS_A :: _10 , 3 => CLKS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CLKS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CLKS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CLKS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CLKS_A :: _11 } } # [ doc = "Write proxy for field `CLKS`" ] pub struct CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > CLKS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Encoding 0 - Output of FLL or PLLCS is selected (depends on PLLS control bit)." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _00 ) } # [ doc = "Encoding 1 - Internal reference clock is selected." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _01 ) } # [ doc = "Encoding 2 - External reference clock is selected." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _10 ) } # [ doc = "Encoding 3 - Reserved." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CLKS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - Internal Reference Stop Enable" ] # [ inline ( always ) ] pub fn irefsten ( & self ) -> IREFSTEN_R { IREFSTEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Internal Reference Clock Enable" ] # [ inline ( always ) ] pub fn irclken ( & self ) -> IRCLKEN_R { IRCLKEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Internal Reference Select" ] # [ inline ( always ) ] pub fn irefs ( & self ) -> IREFS_R { IREFS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bits 3:5 - FLL External Reference Divider" ] # [ inline ( always ) ] pub fn frdiv ( & self ) -> FRDIV_R { FRDIV_R :: new ( ( ( self . bits >> 3 ) & 0x07 ) as u8 ) } # [ doc = "Bits 6:7 - Clock Source Select" ] # [ inline ( always ) ] pub fn clks ( & self ) -> CLKS_R { CLKS_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bit 0 - Internal Reference Stop Enable" ] # [ inline ( always ) ] pub fn irefsten ( & mut self ) -> IREFSTEN_W { IREFSTEN_W { w : self } } # [ doc = "Bit 1 - Internal Reference Clock Enable" ] # [ inline ( always ) ] pub fn irclken ( & mut self ) -> IRCLKEN_W { IRCLKEN_W { w : self } } # [ doc = "Bit 2 - Internal Reference Select" ] # [ inline ( always ) ] pub fn irefs ( & mut self ) -> IREFS_W { IREFS_W { w : self } } # [ doc = "Bits 3:5 - FLL External Reference Divider" ] # [ inline ( always ) ] pub fn frdiv ( & mut self ) -> FRDIV_W { FRDIV_W { w : self } } # [ doc = "Bits 6:7 - Clock Source Select" ] # [ inline ( always ) ] pub fn clks ( & mut self ) -> CLKS_W { CLKS_W { w : self } } } } # [ doc = "MCG Control 2 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "MCG Control 2 Register" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Internal Reference Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRCS_A { # [ doc = "0: Slow internal reference clock selected." ] _0 , # [ doc = "1: Fast internal reference clock selected." ] _1 } impl From < IRCS_A > for bool { # [ inline ( always ) ] fn from ( variant : IRCS_A ) -> Self { match variant { IRCS_A :: _0 => false , IRCS_A :: _1 => true } } } # [ doc = "Reader of field `IRCS`" ] pub type IRCS_R = crate :: R < bool , IRCS_A > ; impl IRCS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IRCS_A { match self . bits { false => IRCS_A :: _0 , true => IRCS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IRCS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IRCS_A :: _1 } } # [ doc = "Write proxy for field `IRCS`" ] pub struct IRCS_W < 'a > { w : & 'a mut W , } impl < 'a > IRCS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRCS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Slow internal reference clock selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IRCS_A :: _0 ) } # [ doc = "Fast internal reference clock selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IRCS_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Low Power Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LP_A { # [ doc = "0: FLL or PLL is not disabled in bypass modes." ] _0 , # [ doc = "1: FLL or PLL is disabled in bypass modes (lower power)" ] _1 } impl From < LP_A > for bool { # [ inline ( always ) ] fn from ( variant : LP_A ) -> Self { match variant { LP_A :: _0 => false , LP_A :: _1 => true } } } # [ doc = "Reader of field `LP`" ] pub type LP_R = crate :: R < bool , LP_A > ; impl LP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LP_A { match self . bits { false => LP_A :: _0 , true => LP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LP_A :: _1 } } # [ doc = "Write proxy for field `LP`" ] pub struct LP_W < 'a > { w : & 'a mut W , } impl < 'a > LP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FLL or PLL is not disabled in bypass modes." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LP_A :: _0 ) } # [ doc = "FLL or PLL is disabled in bypass modes (lower power)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LP_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "External Reference Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EREFS_A { # [ doc = "0: External reference clock requested." ] _0 , # [ doc = "1: Oscillator requested." ] _1 } impl From < EREFS_A > for bool { # [ inline ( always ) ] fn from ( variant : EREFS_A ) -> Self { match variant { EREFS_A :: _0 => false , EREFS_A :: _1 => true } } } # [ doc = "Reader of field `EREFS`" ] pub type EREFS_R = crate :: R < bool , EREFS_A > ; impl EREFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EREFS_A { match self . bits { false => EREFS_A :: _0 , true => EREFS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EREFS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EREFS_A :: _1 } } # [ doc = "Write proxy for field `EREFS`" ] pub struct EREFS_W < 'a > { w : & 'a mut W , } impl < 'a > EREFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EREFS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "External reference clock requested." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EREFS_A :: _0 ) } # [ doc = "Oscillator requested." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EREFS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "High Gain Oscillator Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HGO_A { # [ doc = "0: Configure crystal oscillator for low-power operation." ] _0 , # [ doc = "1: Configure crystal oscillator for high-gain operation." ] _1 } impl From < HGO_A > for bool { # [ inline ( always ) ] fn from ( variant : HGO_A ) -> Self { match variant { HGO_A :: _0 => false , HGO_A :: _1 => true } } } # [ doc = "Reader of field `HGO`" ] pub type HGO_R = crate :: R < bool , HGO_A > ; impl HGO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HGO_A { match self . bits { false => HGO_A :: _0 , true => HGO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HGO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HGO_A :: _1 } } # [ doc = "Write proxy for field `HGO`" ] pub struct HGO_W < 'a > { w : & 'a mut W , } impl < 'a > HGO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HGO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configure crystal oscillator for low-power operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HGO_A :: _0 ) } # [ doc = "Configure crystal oscillator for high-gain operation." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HGO_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Frequency Range Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RANGE_A { # [ doc = "0: Encoding 0 - Low frequency range selected for the crystal oscillator ." ] _00 , # [ doc = "1: Encoding 1 - High frequency range selected for the crystal oscillator ." ] _01 } impl From < RANGE_A > for u8 { # [ inline ( always ) ] fn from ( variant : RANGE_A ) -> Self { match variant { RANGE_A :: _00 => 0 , RANGE_A :: _01 => 1 } } } # [ doc = "Reader of field `RANGE`" ] pub type RANGE_R = crate :: R < u8 , RANGE_A > ; impl RANGE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RANGE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RANGE_A :: _00 ) , 1 => Val ( RANGE_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RANGE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == RANGE_A :: _01 } } # [ doc = "Write proxy for field `RANGE`" ] pub struct RANGE_W < 'a > { w : & 'a mut W , } impl < 'a > RANGE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RANGE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Encoding 0 - Low frequency range selected for the crystal oscillator ." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RANGE_A :: _00 ) } # [ doc = "Encoding 1 - High frequency range selected for the crystal oscillator ." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( RANGE_A :: _01 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Reader of field `FCFTRIM`" ] pub type FCFTRIM_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FCFTRIM`" ] pub struct FCFTRIM_W < 'a > { w : & 'a mut W , } impl < 'a > FCFTRIM_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Loss of Clock Reset Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOCRE0_A { # [ doc = "0: Interrupt request is generated on a loss of OSC0 external reference clock." ] _0 , # [ doc = "1: Generate a reset request on a loss of OSC0 external reference clock." ] _1 } impl From < LOCRE0_A > for bool { # [ inline ( always ) ] fn from ( variant : LOCRE0_A ) -> Self { match variant { LOCRE0_A :: _0 => false , LOCRE0_A :: _1 => true } } } # [ doc = "Reader of field `LOCRE0`" ] pub type LOCRE0_R = crate :: R < bool , LOCRE0_A > ; impl LOCRE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOCRE0_A { match self . bits { false => LOCRE0_A :: _0 , true => LOCRE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOCRE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOCRE0_A :: _1 } } # [ doc = "Write proxy for field `LOCRE0`" ] pub struct LOCRE0_W < 'a > { w : & 'a mut W , } impl < 'a > LOCRE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOCRE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt request is generated on a loss of OSC0 external reference clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOCRE0_A :: _0 ) } # [ doc = "Generate a reset request on a loss of OSC0 external reference clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOCRE0_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Internal Reference Clock Select" ] # [ inline ( always ) ] pub fn ircs ( & self ) -> IRCS_R { IRCS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Low Power Select" ] # [ inline ( always ) ] pub fn lp ( & self ) -> LP_R { LP_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - External Reference Select" ] # [ inline ( always ) ] pub fn erefs ( & self ) -> EREFS_R { EREFS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - High Gain Oscillator Select" ] # [ inline ( always ) ] pub fn hgo ( & self ) -> HGO_R { HGO_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:5 - Frequency Range Select" ] # [ inline ( always ) ] pub fn range ( & self ) -> RANGE_R { RANGE_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Fast Internal Reference Clock Fine Trim" ] # [ inline ( always ) ] pub fn fcftrim ( & self ) -> FCFTRIM_R { FCFTRIM_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loss of Clock Reset Enable" ] # [ inline ( always ) ] pub fn locre0 ( & self ) -> LOCRE0_R { LOCRE0_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Internal Reference Clock Select" ] # [ inline ( always ) ] pub fn ircs ( & mut self ) -> IRCS_W { IRCS_W { w : self } } # [ doc = "Bit 1 - Low Power Select" ] # [ inline ( always ) ] pub fn lp ( & mut self ) -> LP_W { LP_W { w : self } } # [ doc = "Bit 2 - External Reference Select" ] # [ inline ( always ) ] pub fn erefs ( & mut self ) -> EREFS_W { EREFS_W { w : self } } # [ doc = "Bit 3 - High Gain Oscillator Select" ] # [ inline ( always ) ] pub fn hgo ( & mut self ) -> HGO_W { HGO_W { w : self } } # [ doc = "Bits 4:5 - Frequency Range Select" ] # [ inline ( always ) ] pub fn range ( & mut self ) -> RANGE_W { RANGE_W { w : self } } # [ doc = "Bit 6 - Fast Internal Reference Clock Fine Trim" ] # [ inline ( always ) ] pub fn fcftrim ( & mut self ) -> FCFTRIM_W { FCFTRIM_W { w : self } } # [ doc = "Bit 7 - Loss of Clock Reset Enable" ] # [ inline ( always ) ] pub fn locre0 ( & mut self ) -> LOCRE0_W { LOCRE0_W { w : self } } } } # [ doc = "MCG Control 3 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c3](c3) module" ] pub type C3 = crate :: Reg < u8 , _C3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C3 ; # [ doc = "`read()` method returns [c3::R](c3::R) reader structure" ] impl crate :: Readable for C3 { } # [ doc = "`write(|w| ..)` method takes [c3::W](c3::W) writer structure" ] impl crate :: Writable for C3 { } # [ doc = "MCG Control 3 Register" ] pub mod c3 { # [ doc = "Reader of register C3" ] pub type R = crate :: R < u8 , super :: C3 > ; # [ doc = "Writer for register C3" ] pub type W = crate :: W < u8 , super :: C3 > ; # [ doc = "Register C3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SCTRIM`" ] pub type SCTRIM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SCTRIM`" ] pub struct SCTRIM_W < 'a > { w : & 'a mut W , } impl < 'a > SCTRIM_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Slow Internal Reference Clock Trim Setting" ] # [ inline ( always ) ] pub fn sctrim ( & self ) -> SCTRIM_R { SCTRIM_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Slow Internal Reference Clock Trim Setting" ] # [ inline ( always ) ] pub fn sctrim ( & mut self ) -> SCTRIM_W { SCTRIM_W { w : self } } } } # [ doc = "MCG Control 4 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c4](c4) module" ] pub type C4 = crate :: Reg < u8 , _C4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C4 ; # [ doc = "`read()` method returns [c4::R](c4::R) reader structure" ] impl crate :: Readable for C4 { } # [ doc = "`write(|w| ..)` method takes [c4::W](c4::W) writer structure" ] impl crate :: Writable for C4 { } # [ doc = "MCG Control 4 Register" ] pub mod c4 { # [ doc = "Reader of register C4" ] pub type R = crate :: R < u8 , super :: C4 > ; # [ doc = "Writer for register C4" ] pub type W = crate :: W < u8 , super :: C4 > ; # [ doc = "Register C4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SCFTRIM`" ] pub type SCFTRIM_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SCFTRIM`" ] pub struct SCFTRIM_W < 'a > { w : & 'a mut W , } impl < 'a > SCFTRIM_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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `FCTRIM`" ] pub type FCTRIM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FCTRIM`" ] pub struct FCTRIM_W < 'a > { w : & 'a mut W , } impl < 'a > FCTRIM_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 & ! ( 0x0f << 1 ) ) | ( ( ( value as u8 ) & 0x0f ) << 1 ) ; self . w } } # [ doc = "DCO Range Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DRST_DRS_A { # [ doc = "0: Encoding 0 - Low range (reset default)." ] _00 , # [ doc = "1: Encoding 1 - Mid range." ] _01 , # [ doc = "2: Encoding 2 - Mid-high range." ] _10 , # [ doc = "3: Encoding 3 - High range." ] _11 } impl From < DRST_DRS_A > for u8 { # [ inline ( always ) ] fn from ( variant : DRST_DRS_A ) -> Self { match variant { DRST_DRS_A :: _00 => 0 , DRST_DRS_A :: _01 => 1 , DRST_DRS_A :: _10 => 2 , DRST_DRS_A :: _11 => 3 } } } # [ doc = "Reader of field `DRST_DRS`" ] pub type DRST_DRS_R = crate :: R < u8 , DRST_DRS_A > ; impl DRST_DRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DRST_DRS_A { match self . bits { 0 => DRST_DRS_A :: _00 , 1 => DRST_DRS_A :: _01 , 2 => DRST_DRS_A :: _10 , 3 => DRST_DRS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DRST_DRS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == DRST_DRS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DRST_DRS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DRST_DRS_A :: _11 } } # [ doc = "Write proxy for field `DRST_DRS`" ] pub struct DRST_DRS_W < 'a > { w : & 'a mut W , } impl < 'a > DRST_DRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DRST_DRS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Encoding 0 - Low range (reset default)." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DRST_DRS_A :: _00 ) } # [ doc = "Encoding 1 - Mid range." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( DRST_DRS_A :: _01 ) } # [ doc = "Encoding 2 - Mid-high range." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DRST_DRS_A :: _10 ) } # [ doc = "Encoding 3 - High range." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DRST_DRS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u8 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "DCO Maximum Frequency with 32.768 kHz Reference\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMX32_A { # [ doc = "0: DCO has a default range of 25%." ] _0 , # [ doc = "1: DCO is fine-tuned for maximum frequency with 32.768 kHz reference." ] _1 } impl From < DMX32_A > for bool { # [ inline ( always ) ] fn from ( variant : DMX32_A ) -> Self { match variant { DMX32_A :: _0 => false , DMX32_A :: _1 => true } } } # [ doc = "Reader of field `DMX32`" ] pub type DMX32_R = crate :: R < bool , DMX32_A > ; impl DMX32_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMX32_A { match self . bits { false => DMX32_A :: _0 , true => DMX32_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMX32_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMX32_A :: _1 } } # [ doc = "Write proxy for field `DMX32`" ] pub struct DMX32_W < 'a > { w : & 'a mut W , } impl < 'a > DMX32_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMX32_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DCO has a default range of 25%." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMX32_A :: _0 ) } # [ doc = "DCO is fine-tuned for maximum frequency with 32.768 kHz reference." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMX32_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Slow Internal Reference Clock Fine Trim" ] # [ inline ( always ) ] pub fn scftrim ( & self ) -> SCFTRIM_R { SCFTRIM_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:4 - Fast Internal Reference Clock Trim Setting" ] # [ inline ( always ) ] pub fn fctrim ( & self ) -> FCTRIM_R { FCTRIM_R :: new ( ( ( self . bits >> 1 ) & 0x0f ) as u8 ) } # [ doc = "Bits 5:6 - DCO Range Select" ] # [ inline ( always ) ] pub fn drst_drs ( & self ) -> DRST_DRS_R { DRST_DRS_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - DCO Maximum Frequency with 32.768 kHz Reference" ] # [ inline ( always ) ] pub fn dmx32 ( & self ) -> DMX32_R { DMX32_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Slow Internal Reference Clock Fine Trim" ] # [ inline ( always ) ] pub fn scftrim ( & mut self ) -> SCFTRIM_W { SCFTRIM_W { w : self } } # [ doc = "Bits 1:4 - Fast Internal Reference Clock Trim Setting" ] # [ inline ( always ) ] pub fn fctrim ( & mut self ) -> FCTRIM_W { FCTRIM_W { w : self } } # [ doc = "Bits 5:6 - DCO Range Select" ] # [ inline ( always ) ] pub fn drst_drs ( & mut self ) -> DRST_DRS_W { DRST_DRS_W { w : self } } # [ doc = "Bit 7 - DCO Maximum Frequency with 32.768 kHz Reference" ] # [ inline ( always ) ] pub fn dmx32 ( & mut self ) -> DMX32_W { DMX32_W { w : self } } } } # [ doc = "MCG Control 5 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c5](c5) module" ] pub type C5 = crate :: Reg < u8 , _C5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C5 ; # [ doc = "`read()` method returns [c5::R](c5::R) reader structure" ] impl crate :: Readable for C5 { } # [ doc = "`write(|w| ..)` method takes [c5::W](c5::W) writer structure" ] impl crate :: Writable for C5 { } # [ doc = "MCG Control 5 Register" ] pub mod c5 { # [ doc = "Reader of register C5" ] pub type R = crate :: R < u8 , super :: C5 > ; # [ doc = "Writer for register C5" ] pub type W = crate :: W < u8 , super :: C5 > ; # [ doc = "Register C5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C5 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "PLL External Reference Divider\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRDIV_A { # [ doc = "0: Divide Factor is 1" ] _0 , # [ doc = "1: Divide Factor is 2" ] _1 , # [ doc = "2: Divide Factor is 3" ] _2 , # [ doc = "3: Divide Factor is 4" ] _3 , # [ doc = "4: Divide Factor is 5" ] _4 , # [ doc = "5: Divide Factor is 6" ] _5 , # [ doc = "6: Divide Factor is 7" ] _6 , # [ doc = "7: Divide Factor is 8" ] _7 } impl From < PRDIV_A > for u8 { # [ inline ( always ) ] fn from ( variant : PRDIV_A ) -> Self { match variant { PRDIV_A :: _0 => 0 , PRDIV_A :: _1 => 1 , PRDIV_A :: _2 => 2 , PRDIV_A :: _3 => 3 , PRDIV_A :: _4 => 4 , PRDIV_A :: _5 => 5 , PRDIV_A :: _6 => 6 , PRDIV_A :: _7 => 7 } } } # [ doc = "Reader of field `PRDIV`" ] pub type PRDIV_R = crate :: R < u8 , PRDIV_A > ; impl PRDIV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PRDIV_A { match self . bits { 0 => PRDIV_A :: _0 , 1 => PRDIV_A :: _1 , 2 => PRDIV_A :: _2 , 3 => PRDIV_A :: _3 , 4 => PRDIV_A :: _4 , 5 => PRDIV_A :: _5 , 6 => PRDIV_A :: _6 , 7 => PRDIV_A :: _7 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PRDIV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PRDIV_A :: _1 } # [ doc = "Checks if the value of the field is `_2`" ] # [ inline ( always ) ] pub fn is_2 ( & self ) -> bool { * self == PRDIV_A :: _2 } # [ doc = "Checks if the value of the field is `_3`" ] # [ inline ( always ) ] pub fn is_3 ( & self ) -> bool { * self == PRDIV_A :: _3 } # [ doc = "Checks if the value of the field is `_4`" ] # [ inline ( always ) ] pub fn is_4 ( & self ) -> bool { * self == PRDIV_A :: _4 } # [ doc = "Checks if the value of the field is `_5`" ] # [ inline ( always ) ] pub fn is_5 ( & self ) -> bool { * self == PRDIV_A :: _5 } # [ doc = "Checks if the value of the field is `_6`" ] # [ inline ( always ) ] pub fn is_6 ( & self ) -> bool { * self == PRDIV_A :: _6 } # [ doc = "Checks if the value of the field is `_7`" ] # [ inline ( always ) ] pub fn is_7 ( & self ) -> bool { * self == PRDIV_A :: _7 } } # [ doc = "Write proxy for field `PRDIV`" ] pub struct PRDIV_W < 'a > { w : & 'a mut W , } impl < 'a > PRDIV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PRDIV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide Factor is 1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PRDIV_A :: _0 ) } # [ doc = "Divide Factor is 2" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PRDIV_A :: _1 ) } # [ doc = "Divide Factor is 3" ] # [ inline ( always ) ] pub fn _2 ( self ) -> & 'a mut W { self . variant ( PRDIV_A :: _2 ) } # [ doc = "Divide Factor is 4" ] # [ inline ( always ) ] pub fn _3 ( self ) -> & 'a mut W { self . variant ( PRDIV_A :: _3 ) } # [ doc = "Divide Factor is 5" ] # [ inline ( always ) ] pub fn _4 ( self ) -> & 'a mut W { self . variant ( PRDIV_A :: _4 ) } # [ doc = "Divide Factor is 6" ] # [ inline ( always ) ] pub fn _5 ( self ) -> & 'a mut W { self . variant ( PRDIV_A :: _5 ) } # [ doc = "Divide Factor is 7" ] # [ inline ( always ) ] pub fn _6 ( self ) -> & 'a mut W { self . variant ( PRDIV_A :: _6 ) } # [ doc = "Divide Factor is 8" ] # [ inline ( always ) ] pub fn _7 ( self ) -> & 'a mut W { self . variant ( PRDIV_A :: _7 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "PLL Stop Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLLSTEN_A { # [ doc = "0: MCGPLLCLK and MCGPLLCLK2X are disabled in any of the Stop modes." ] _0 , # [ doc = "1: MCGPLLCLK and MCGPLLCLK2X are enabled if system is in Normal Stop mode." ] _1 } impl From < PLLSTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : PLLSTEN_A ) -> Self { match variant { PLLSTEN_A :: _0 => false , PLLSTEN_A :: _1 => true } } } # [ doc = "Reader of field `PLLSTEN`" ] pub type PLLSTEN_R = crate :: R < bool , PLLSTEN_A > ; impl PLLSTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLLSTEN_A { match self . bits { false => PLLSTEN_A :: _0 , true => PLLSTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLLSTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLLSTEN_A :: _1 } } # [ doc = "Write proxy for field `PLLSTEN`" ] pub struct PLLSTEN_W < 'a > { w : & 'a mut W , } impl < 'a > PLLSTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLLSTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MCGPLLCLK and MCGPLLCLK2X are disabled in any of the Stop modes." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PLLSTEN_A :: _0 ) } # [ doc = "MCGPLLCLK and MCGPLLCLK2X are enabled if system is in Normal Stop mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PLLSTEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "PLL Clock Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLLCLKEN_A { # [ doc = "0: MCGPLLCLK is inactive." ] _0 , # [ doc = "1: MCGPLLCLK is active." ] _1 } impl From < PLLCLKEN_A > for bool { # [ inline ( always ) ] fn from ( variant : PLLCLKEN_A ) -> Self { match variant { PLLCLKEN_A :: _0 => false , PLLCLKEN_A :: _1 => true } } } # [ doc = "Reader of field `PLLCLKEN`" ] pub type PLLCLKEN_R = crate :: R < bool , PLLCLKEN_A > ; impl PLLCLKEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLLCLKEN_A { match self . bits { false => PLLCLKEN_A :: _0 , true => PLLCLKEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLLCLKEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLLCLKEN_A :: _1 } } # [ doc = "Write proxy for field `PLLCLKEN`" ] pub struct PLLCLKEN_W < 'a > { w : & 'a mut W , } impl < 'a > PLLCLKEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLLCLKEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MCGPLLCLK is inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PLLCLKEN_A :: _0 ) } # [ doc = "MCGPLLCLK is active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PLLCLKEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - PLL External Reference Divider" ] # [ inline ( always ) ] pub fn prdiv ( & self ) -> PRDIV_R { PRDIV_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 5 - PLL Stop Enable" ] # [ inline ( always ) ] pub fn pllsten ( & self ) -> PLLSTEN_R { PLLSTEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PLL Clock Enable" ] # [ inline ( always ) ] pub fn pllclken ( & self ) -> PLLCLKEN_R { PLLCLKEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - PLL External Reference Divider" ] # [ inline ( always ) ] pub fn prdiv ( & mut self ) -> PRDIV_W { PRDIV_W { w : self } } # [ doc = "Bit 5 - PLL Stop Enable" ] # [ inline ( always ) ] pub fn pllsten ( & mut self ) -> PLLSTEN_W { PLLSTEN_W { w : self } } # [ doc = "Bit 6 - PLL Clock Enable" ] # [ inline ( always ) ] pub fn pllclken ( & mut self ) -> PLLCLKEN_W { PLLCLKEN_W { w : self } } } } # [ doc = "MCG Control 6 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c6](c6) module" ] pub type C6 = crate :: Reg < u8 , _C6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C6 ; # [ doc = "`read()` method returns [c6::R](c6::R) reader structure" ] impl crate :: Readable for C6 { } # [ doc = "`write(|w| ..)` method takes [c6::W](c6::W) writer structure" ] impl crate :: Writable for C6 { } # [ doc = "MCG Control 6 Register" ] pub mod c6 { # [ doc = "Reader of register C6" ] pub type R = crate :: R < u8 , super :: C6 > ; # [ doc = "Writer for register C6" ] pub type W = crate :: W < u8 , super :: C6 > ; # [ doc = "Register C6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C6 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "VCO Divider\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VDIV_A { # [ doc = "0: Multiply Factor is 16" ] _0 , # [ doc = "1: Multiply Factor is 17" ] _1 , # [ doc = "2: Multiply Factor is 18" ] _2 , # [ doc = "3: Multiply Factor is 19" ] _3 , # [ doc = "4: Multiply Factor is 20" ] _4 , # [ doc = "5: Multiply Factor is 21" ] _5 , # [ doc = "6: Multiply Factor is 22" ] _6 , # [ doc = "7: Multiply Factor is 23" ] _7 , # [ doc = "8: Multiply Factor is 24" ] _8 , # [ doc = "9: Multiply Factor is 25" ] _9 , # [ doc = "10: Multiply Factor is 26" ] _10 , # [ doc = "11: Multiply Factor is 27" ] _11 , # [ doc = "12: Multiply Factor is 28" ] _12 , # [ doc = "13: Multiply Factor is 29" ] _13 , # [ doc = "14: Multiply Factor is 30" ] _14 , # [ doc = "15: Multiply Factor is 31" ] _15 , # [ doc = "16: Multiply Factor is 32" ] _16 , # [ doc = "17: Multiply Factor is 33" ] _17 , # [ doc = "18: Multiply Factor is 34" ] _18 , # [ doc = "19: Multiply Factor is 35" ] _19 , # [ doc = "20: Multiply Factor is 36" ] _20 , # [ doc = "21: Multiply Factor is 37" ] _21 , # [ doc = "22: Multiply Factor is 38" ] _22 , # [ doc = "23: Multiply Factor is 39" ] _23 , # [ doc = "24: Multiply Factor is 40" ] _24 , # [ doc = "25: Multiply Factor is 41" ] _25 , # [ doc = "26: Multiply Factor is 42" ] _26 , # [ doc = "27: Multiply Factor is 43" ] _27 , # [ doc = "28: Multiply Factor is 44" ] _28 , # [ doc = "29: Multiply Factor is 45" ] _29 , # [ doc = "30: Multiply Factor is 46" ] _30 , # [ doc = "31: Multiply Factor is 47" ] _31 } impl From < VDIV_A > for u8 { # [ inline ( always ) ] fn from ( variant : VDIV_A ) -> Self { match variant { VDIV_A :: _0 => 0 , VDIV_A :: _1 => 1 , VDIV_A :: _2 => 2 , VDIV_A :: _3 => 3 , VDIV_A :: _4 => 4 , VDIV_A :: _5 => 5 , VDIV_A :: _6 => 6 , VDIV_A :: _7 => 7 , VDIV_A :: _8 => 8 , VDIV_A :: _9 => 9 , VDIV_A :: _10 => 10 , VDIV_A :: _11 => 11 , VDIV_A :: _12 => 12 , VDIV_A :: _13 => 13 , VDIV_A :: _14 => 14 , VDIV_A :: _15 => 15 , VDIV_A :: _16 => 16 , VDIV_A :: _17 => 17 , VDIV_A :: _18 => 18 , VDIV_A :: _19 => 19 , VDIV_A :: _20 => 20 , VDIV_A :: _21 => 21 , VDIV_A :: _22 => 22 , VDIV_A :: _23 => 23 , VDIV_A :: _24 => 24 , VDIV_A :: _25 => 25 , VDIV_A :: _26 => 26 , VDIV_A :: _27 => 27 , VDIV_A :: _28 => 28 , VDIV_A :: _29 => 29 , VDIV_A :: _30 => 30 , VDIV_A :: _31 => 31 } } } # [ doc = "Reader of field `VDIV`" ] pub type VDIV_R = crate :: R < u8 , VDIV_A > ; impl VDIV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VDIV_A { match self . bits { 0 => VDIV_A :: _0 , 1 => VDIV_A :: _1 , 2 => VDIV_A :: _2 , 3 => VDIV_A :: _3 , 4 => VDIV_A :: _4 , 5 => VDIV_A :: _5 , 6 => VDIV_A :: _6 , 7 => VDIV_A :: _7 , 8 => VDIV_A :: _8 , 9 => VDIV_A :: _9 , 10 => VDIV_A :: _10 , 11 => VDIV_A :: _11 , 12 => VDIV_A :: _12 , 13 => VDIV_A :: _13 , 14 => VDIV_A :: _14 , 15 => VDIV_A :: _15 , 16 => VDIV_A :: _16 , 17 => VDIV_A :: _17 , 18 => VDIV_A :: _18 , 19 => VDIV_A :: _19 , 20 => VDIV_A :: _20 , 21 => VDIV_A :: _21 , 22 => VDIV_A :: _22 , 23 => VDIV_A :: _23 , 24 => VDIV_A :: _24 , 25 => VDIV_A :: _25 , 26 => VDIV_A :: _26 , 27 => VDIV_A :: _27 , 28 => VDIV_A :: _28 , 29 => VDIV_A :: _29 , 30 => VDIV_A :: _30 , 31 => VDIV_A :: _31 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VDIV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VDIV_A :: _1 } # [ doc = "Checks if the value of the field is `_2`" ] # [ inline ( always ) ] pub fn is_2 ( & self ) -> bool { * self == VDIV_A :: _2 } # [ doc = "Checks if the value of the field is `_3`" ] # [ inline ( always ) ] pub fn is_3 ( & self ) -> bool { * self == VDIV_A :: _3 } # [ doc = "Checks if the value of the field is `_4`" ] # [ inline ( always ) ] pub fn is_4 ( & self ) -> bool { * self == VDIV_A :: _4 } # [ doc = "Checks if the value of the field is `_5`" ] # [ inline ( always ) ] pub fn is_5 ( & self ) -> bool { * self == VDIV_A :: _5 } # [ doc = "Checks if the value of the field is `_6`" ] # [ inline ( always ) ] pub fn is_6 ( & self ) -> bool { * self == VDIV_A :: _6 } # [ doc = "Checks if the value of the field is `_7`" ] # [ inline ( always ) ] pub fn is_7 ( & self ) -> bool { * self == VDIV_A :: _7 } # [ doc = "Checks if the value of the field is `_8`" ] # [ inline ( always ) ] pub fn is_8 ( & self ) -> bool { * self == VDIV_A :: _8 } # [ doc = "Checks if the value of the field is `_9`" ] # [ inline ( always ) ] pub fn is_9 ( & self ) -> bool { * self == VDIV_A :: _9 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == VDIV_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == VDIV_A :: _11 } # [ doc = "Checks if the value of the field is `_12`" ] # [ inline ( always ) ] pub fn is_12 ( & self ) -> bool { * self == VDIV_A :: _12 } # [ doc = "Checks if the value of the field is `_13`" ] # [ inline ( always ) ] pub fn is_13 ( & self ) -> bool { * self == VDIV_A :: _13 } # [ doc = "Checks if the value of the field is `_14`" ] # [ inline ( always ) ] pub fn is_14 ( & self ) -> bool { * self == VDIV_A :: _14 } # [ doc = "Checks if the value of the field is `_15`" ] # [ inline ( always ) ] pub fn is_15 ( & self ) -> bool { * self == VDIV_A :: _15 } # [ doc = "Checks if the value of the field is `_16`" ] # [ inline ( always ) ] pub fn is_16 ( & self ) -> bool { * self == VDIV_A :: _16 } # [ doc = "Checks if the value of the field is `_17`" ] # [ inline ( always ) ] pub fn is_17 ( & self ) -> bool { * self == VDIV_A :: _17 } # [ doc = "Checks if the value of the field is `_18`" ] # [ inline ( always ) ] pub fn is_18 ( & self ) -> bool { * self == VDIV_A :: _18 } # [ doc = "Checks if the value of the field is `_19`" ] # [ inline ( always ) ] pub fn is_19 ( & self ) -> bool { * self == VDIV_A :: _19 } # [ doc = "Checks if the value of the field is `_20`" ] # [ inline ( always ) ] pub fn is_20 ( & self ) -> bool { * self == VDIV_A :: _20 } # [ doc = "Checks if the value of the field is `_21`" ] # [ inline ( always ) ] pub fn is_21 ( & self ) -> bool { * self == VDIV_A :: _21 } # [ doc = "Checks if the value of the field is `_22`" ] # [ inline ( always ) ] pub fn is_22 ( & self ) -> bool { * self == VDIV_A :: _22 } # [ doc = "Checks if the value of the field is `_23`" ] # [ inline ( always ) ] pub fn is_23 ( & self ) -> bool { * self == VDIV_A :: _23 } # [ doc = "Checks if the value of the field is `_24`" ] # [ inline ( always ) ] pub fn is_24 ( & self ) -> bool { * self == VDIV_A :: _24 } # [ doc = "Checks if the value of the field is `_25`" ] # [ inline ( always ) ] pub fn is_25 ( & self ) -> bool { * self == VDIV_A :: _25 } # [ doc = "Checks if the value of the field is `_26`" ] # [ inline ( always ) ] pub fn is_26 ( & self ) -> bool { * self == VDIV_A :: _26 } # [ doc = "Checks if the value of the field is `_27`" ] # [ inline ( always ) ] pub fn is_27 ( & self ) -> bool { * self == VDIV_A :: _27 } # [ doc = "Checks if the value of the field is `_28`" ] # [ inline ( always ) ] pub fn is_28 ( & self ) -> bool { * self == VDIV_A :: _28 } # [ doc = "Checks if the value of the field is `_29`" ] # [ inline ( always ) ] pub fn is_29 ( & self ) -> bool { * self == VDIV_A :: _29 } # [ doc = "Checks if the value of the field is `_30`" ] # [ inline ( always ) ] pub fn is_30 ( & self ) -> bool { * self == VDIV_A :: _30 } # [ doc = "Checks if the value of the field is `_31`" ] # [ inline ( always ) ] pub fn is_31 ( & self ) -> bool { * self == VDIV_A :: _31 } } # [ doc = "Write proxy for field `VDIV`" ] pub struct VDIV_W < 'a > { w : & 'a mut W , } impl < 'a > VDIV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VDIV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Multiply Factor is 16" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _0 ) } # [ doc = "Multiply Factor is 17" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _1 ) } # [ doc = "Multiply Factor is 18" ] # [ inline ( always ) ] pub fn _2 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _2 ) } # [ doc = "Multiply Factor is 19" ] # [ inline ( always ) ] pub fn _3 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _3 ) } # [ doc = "Multiply Factor is 20" ] # [ inline ( always ) ] pub fn _4 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _4 ) } # [ doc = "Multiply Factor is 21" ] # [ inline ( always ) ] pub fn _5 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _5 ) } # [ doc = "Multiply Factor is 22" ] # [ inline ( always ) ] pub fn _6 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _6 ) } # [ doc = "Multiply Factor is 23" ] # [ inline ( always ) ] pub fn _7 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _7 ) } # [ doc = "Multiply Factor is 24" ] # [ inline ( always ) ] pub fn _8 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _8 ) } # [ doc = "Multiply Factor is 25" ] # [ inline ( always ) ] pub fn _9 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _9 ) } # [ doc = "Multiply Factor is 26" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _10 ) } # [ doc = "Multiply Factor is 27" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _11 ) } # [ doc = "Multiply Factor is 28" ] # [ inline ( always ) ] pub fn _12 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _12 ) } # [ doc = "Multiply Factor is 29" ] # [ inline ( always ) ] pub fn _13 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _13 ) } # [ doc = "Multiply Factor is 30" ] # [ inline ( always ) ] pub fn _14 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _14 ) } # [ doc = "Multiply Factor is 31" ] # [ inline ( always ) ] pub fn _15 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _15 ) } # [ doc = "Multiply Factor is 32" ] # [ inline ( always ) ] pub fn _16 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _16 ) } # [ doc = "Multiply Factor is 33" ] # [ inline ( always ) ] pub fn _17 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _17 ) } # [ doc = "Multiply Factor is 34" ] # [ inline ( always ) ] pub fn _18 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _18 ) } # [ doc = "Multiply Factor is 35" ] # [ inline ( always ) ] pub fn _19 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _19 ) } # [ doc = "Multiply Factor is 36" ] # [ inline ( always ) ] pub fn _20 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _20 ) } # [ doc = "Multiply Factor is 37" ] # [ inline ( always ) ] pub fn _21 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _21 ) } # [ doc = "Multiply Factor is 38" ] # [ inline ( always ) ] pub fn _22 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _22 ) } # [ doc = "Multiply Factor is 39" ] # [ inline ( always ) ] pub fn _23 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _23 ) } # [ doc = "Multiply Factor is 40" ] # [ inline ( always ) ] pub fn _24 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _24 ) } # [ doc = "Multiply Factor is 41" ] # [ inline ( always ) ] pub fn _25 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _25 ) } # [ doc = "Multiply Factor is 42" ] # [ inline ( always ) ] pub fn _26 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _26 ) } # [ doc = "Multiply Factor is 43" ] # [ inline ( always ) ] pub fn _27 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _27 ) } # [ doc = "Multiply Factor is 44" ] # [ inline ( always ) ] pub fn _28 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _28 ) } # [ doc = "Multiply Factor is 45" ] # [ inline ( always ) ] pub fn _29 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _29 ) } # [ doc = "Multiply Factor is 46" ] # [ inline ( always ) ] pub fn _30 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _30 ) } # [ doc = "Multiply Factor is 47" ] # [ inline ( always ) ] pub fn _31 ( self ) -> & 'a mut W { self . variant ( VDIV_A :: _31 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Clock Monitor Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CME0_A { # [ doc = "0: External clock monitor is disabled for OSC0." ] _0 , # [ doc = "1: External clock monitor is enabled for OSC0." ] _1 } impl From < CME0_A > for bool { # [ inline ( always ) ] fn from ( variant : CME0_A ) -> Self { match variant { CME0_A :: _0 => false , CME0_A :: _1 => true } } } # [ doc = "Reader of field `CME0`" ] pub type CME0_R = crate :: R < bool , CME0_A > ; impl CME0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CME0_A { match self . bits { false => CME0_A :: _0 , true => CME0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CME0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CME0_A :: _1 } } # [ doc = "Write proxy for field `CME0`" ] pub struct CME0_W < 'a > { w : & 'a mut W , } impl < 'a > CME0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CME0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "External clock monitor is disabled for OSC0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CME0_A :: _0 ) } # [ doc = "External clock monitor is enabled for OSC0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CME0_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "PLL Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLLS_A { # [ doc = "0: FLL is selected." ] _0 , # [ doc = "1: PLLCS output clock is selected (PRDIV0 bits of PLL in the C5 register need to be programmed to the correct divider to generate a PLL reference clock in the range specified in the data sheet (fpll_ref) prior to setting the PLLS bit)." ] _1 } impl From < PLLS_A > for bool { # [ inline ( always ) ] fn from ( variant : PLLS_A ) -> Self { match variant { PLLS_A :: _0 => false , PLLS_A :: _1 => true } } } # [ doc = "Reader of field `PLLS`" ] pub type PLLS_R = crate :: R < bool , PLLS_A > ; impl PLLS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLLS_A { match self . bits { false => PLLS_A :: _0 , true => PLLS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLLS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLLS_A :: _1 } } # [ doc = "Write proxy for field `PLLS`" ] pub struct PLLS_W < 'a > { w : & 'a mut W , } impl < 'a > PLLS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLLS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FLL is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PLLS_A :: _0 ) } # [ doc = "PLLCS output clock is selected (PRDIV0 bits of PLL in the C5 register need to be programmed to the correct divider to generate a PLL reference clock in the range specified in the data sheet (fpll_ref) prior to setting the PLLS bit)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PLLS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Loss of Lock Interrrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOLIE0_A { # [ doc = "0: No interrupt request is generated on loss of lock." ] _0 , # [ doc = "1: Generate an interrupt request on loss of lock." ] _1 } impl From < LOLIE0_A > for bool { # [ inline ( always ) ] fn from ( variant : LOLIE0_A ) -> Self { match variant { LOLIE0_A :: _0 => false , LOLIE0_A :: _1 => true } } } # [ doc = "Reader of field `LOLIE0`" ] pub type LOLIE0_R = crate :: R < bool , LOLIE0_A > ; impl LOLIE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOLIE0_A { match self . bits { false => LOLIE0_A :: _0 , true => LOLIE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOLIE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOLIE0_A :: _1 } } # [ doc = "Write proxy for field `LOLIE0`" ] pub struct LOLIE0_W < 'a > { w : & 'a mut W , } impl < 'a > LOLIE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOLIE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No interrupt request is generated on loss of lock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOLIE0_A :: _0 ) } # [ doc = "Generate an interrupt request on loss of lock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOLIE0_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - VCO Divider" ] # [ inline ( always ) ] pub fn vdiv ( & self ) -> VDIV_R { VDIV_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - Clock Monitor Enable" ] # [ inline ( always ) ] pub fn cme0 ( & self ) -> CME0_R { CME0_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PLL Select" ] # [ inline ( always ) ] pub fn plls ( & self ) -> PLLS_R { PLLS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loss of Lock Interrrupt Enable" ] # [ inline ( always ) ] pub fn lolie0 ( & self ) -> LOLIE0_R { LOLIE0_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - VCO Divider" ] # [ inline ( always ) ] pub fn vdiv ( & mut self ) -> VDIV_W { VDIV_W { w : self } } # [ doc = "Bit 5 - Clock Monitor Enable" ] # [ inline ( always ) ] pub fn cme0 ( & mut self ) -> CME0_W { CME0_W { w : self } } # [ doc = "Bit 6 - PLL Select" ] # [ inline ( always ) ] pub fn plls ( & mut self ) -> PLLS_W { PLLS_W { w : self } } # [ doc = "Bit 7 - Loss of Lock Interrrupt Enable" ] # [ inline ( always ) ] pub fn lolie0 ( & mut self ) -> LOLIE0_W { LOLIE0_W { w : self } } } } # [ doc = "MCG Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s](s) module" ] pub type S = crate :: Reg < u8 , _S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S ; # [ doc = "`read()` method returns [s::R](s::R) reader structure" ] impl crate :: Readable for S { } # [ doc = "`write(|w| ..)` method takes [s::W](s::W) writer structure" ] impl crate :: Writable for S { } # [ doc = "MCG Status Register" ] pub mod s { # [ doc = "Reader of register S" ] pub type R = crate :: R < u8 , super :: S > ; # [ doc = "Writer for register S" ] pub type W = crate :: W < u8 , super :: S > ; # [ doc = "Register S `reset()`'s with value 0x10" ] impl crate :: ResetValue for super :: S { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x10 } } # [ doc = "Internal Reference Clock Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRCST_A { # [ doc = "0: Source of internal reference clock is the slow clock (32 kHz IRC)." ] _0 , # [ doc = "1: Source of internal reference clock is the fast clock (4 MHz IRC)." ] _1 } impl From < IRCST_A > for bool { # [ inline ( always ) ] fn from ( variant : IRCST_A ) -> Self { match variant { IRCST_A :: _0 => false , IRCST_A :: _1 => true } } } # [ doc = "Reader of field `IRCST`" ] pub type IRCST_R = crate :: R < bool , IRCST_A > ; impl IRCST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IRCST_A { match self . bits { false => IRCST_A :: _0 , true => IRCST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IRCST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IRCST_A :: _1 } } # [ doc = "Reader of field `OSCINIT0`" ] pub type OSCINIT0_R = crate :: R < bool , bool > ; # [ doc = "Clock Mode Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKST_A { # [ doc = "0: Encoding 0 - Output of the FLL is selected (reset default)." ] _00 , # [ doc = "1: Encoding 1 - Internal reference clock is selected." ] _01 , # [ doc = "2: Encoding 2 - External reference clock is selected." ] _10 , # [ doc = "3: Encoding 3 - Output of the PLL is selected." ] _11 } impl From < CLKST_A > for u8 { # [ inline ( always ) ] fn from ( variant : CLKST_A ) -> Self { match variant { CLKST_A :: _00 => 0 , CLKST_A :: _01 => 1 , CLKST_A :: _10 => 2 , CLKST_A :: _11 => 3 } } } # [ doc = "Reader of field `CLKST`" ] pub type CLKST_R = crate :: R < u8 , CLKST_A > ; impl CLKST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKST_A { match self . bits { 0 => CLKST_A :: _00 , 1 => CLKST_A :: _01 , 2 => CLKST_A :: _10 , 3 => CLKST_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CLKST_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CLKST_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CLKST_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CLKST_A :: _11 } } # [ doc = "Internal Reference Status\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREFST_A { # [ doc = "0: Source of FLL reference clock is the external reference clock." ] _0 , # [ doc = "1: Source of FLL reference clock is the internal reference clock." ] _1 } impl From < IREFST_A > for bool { # [ inline ( always ) ] fn from ( variant : IREFST_A ) -> Self { match variant { IREFST_A :: _0 => false , IREFST_A :: _1 => true } } } # [ doc = "Reader of field `IREFST`" ] pub type IREFST_R = crate :: R < bool , IREFST_A > ; impl IREFST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREFST_A { match self . bits { false => IREFST_A :: _0 , true => IREFST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREFST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREFST_A :: _1 } } # [ doc = "PLL Select Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLLST_A { # [ doc = "0: Source of PLLS clock is FLL clock." ] _0 , # [ doc = "1: Source of PLLS clock is PLLCS output clock." ] _1 } impl From < PLLST_A > for bool { # [ inline ( always ) ] fn from ( variant : PLLST_A ) -> Self { match variant { PLLST_A :: _0 => false , PLLST_A :: _1 => true } } } # [ doc = "Reader of field `PLLST`" ] pub type PLLST_R = crate :: R < bool , PLLST_A > ; impl PLLST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLLST_A { match self . bits { false => PLLST_A :: _0 , true => PLLST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLLST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLLST_A :: _1 } } # [ doc = "Lock Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOCK0_A { # [ doc = "0: PLL is currently unlocked." ] _0 , # [ doc = "1: PLL is currently locked." ] _1 } impl From < LOCK0_A > for bool { # [ inline ( always ) ] fn from ( variant : LOCK0_A ) -> Self { match variant { LOCK0_A :: _0 => false , LOCK0_A :: _1 => true } } } # [ doc = "Reader of field `LOCK0`" ] pub type LOCK0_R = crate :: R < bool , LOCK0_A > ; impl LOCK0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOCK0_A { match self . bits { false => LOCK0_A :: _0 , true => LOCK0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOCK0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOCK0_A :: _1 } } # [ doc = "Loss of Lock Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOLS0_A { # [ doc = "0: PLL has not lost lock since LOLS 0 was last cleared." ] _0 , # [ doc = "1: PLL has lost lock since LOLS 0 was last cleared." ] _1 } impl From < LOLS0_A > for bool { # [ inline ( always ) ] fn from ( variant : LOLS0_A ) -> Self { match variant { LOLS0_A :: _0 => false , LOLS0_A :: _1 => true } } } # [ doc = "Reader of field `LOLS0`" ] pub type LOLS0_R = crate :: R < bool , LOLS0_A > ; impl LOLS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOLS0_A { match self . bits { false => LOLS0_A :: _0 , true => LOLS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOLS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOLS0_A :: _1 } } # [ doc = "Write proxy for field `LOLS0`" ] pub struct LOLS0_W < 'a > { w : & 'a mut W , } impl < 'a > LOLS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOLS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PLL has not lost lock since LOLS 0 was last cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOLS0_A :: _0 ) } # [ doc = "PLL has lost lock since LOLS 0 was last cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOLS0_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Internal Reference Clock Status" ] # [ inline ( always ) ] pub fn ircst ( & self ) -> IRCST_R { IRCST_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - OSC Initialization" ] # [ inline ( always ) ] pub fn oscinit0 ( & self ) -> OSCINIT0_R { OSCINIT0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - Clock Mode Status" ] # [ inline ( always ) ] pub fn clkst ( & self ) -> CLKST_R { CLKST_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bit 4 - Internal Reference Status" ] # [ inline ( always ) ] pub fn irefst ( & self ) -> IREFST_R { IREFST_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - PLL Select Status" ] # [ inline ( always ) ] pub fn pllst ( & self ) -> PLLST_R { PLLST_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Lock Status" ] # [ inline ( always ) ] pub fn lock0 ( & self ) -> LOCK0_R { LOCK0_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loss of Lock Status" ] # [ inline ( always ) ] pub fn lols0 ( & self ) -> LOLS0_R { LOLS0_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 7 - Loss of Lock Status" ] # [ inline ( always ) ] pub fn lols0 ( & mut self ) -> LOLS0_W { LOLS0_W { w : self } } } } # [ doc = "MCG Status and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u8 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "MCG Status and Control Register" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u8 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u8 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0x02" ] impl crate :: ResetValue for super :: SC { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x02 } } # [ doc = "OSC0 Loss of Clock Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOCS0_A { # [ doc = "0: Loss of OSC0 has not occurred." ] _0 , # [ doc = "1: Loss of OSC0 has occurred." ] _1 } impl From < LOCS0_A > for bool { # [ inline ( always ) ] fn from ( variant : LOCS0_A ) -> Self { match variant { LOCS0_A :: _0 => false , LOCS0_A :: _1 => true } } } # [ doc = "Reader of field `LOCS0`" ] pub type LOCS0_R = crate :: R < bool , LOCS0_A > ; impl LOCS0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOCS0_A { match self . bits { false => LOCS0_A :: _0 , true => LOCS0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOCS0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOCS0_A :: _1 } } # [ doc = "Write proxy for field `LOCS0`" ] pub struct LOCS0_W < 'a > { w : & 'a mut W , } impl < 'a > LOCS0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOCS0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loss of OSC0 has not occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOCS0_A :: _0 ) } # [ doc = "Loss of OSC0 has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOCS0_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Fast Clock Internal Reference Divider\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FCRDIV_A { # [ doc = "0: Divide Factor is 1" ] _000 , # [ doc = "1: Divide Factor is 2." ] _001 , # [ doc = "2: Divide Factor is 4." ] _010 , # [ doc = "3: Divide Factor is 8." ] _011 , # [ doc = "4: Divide Factor is 16" ] _100 , # [ doc = "5: Divide Factor is 32" ] _101 , # [ doc = "6: Divide Factor is 64" ] _110 , # [ doc = "7: Divide Factor is 128." ] _111 } impl From < FCRDIV_A > for u8 { # [ inline ( always ) ] fn from ( variant : FCRDIV_A ) -> Self { match variant { FCRDIV_A :: _000 => 0 , FCRDIV_A :: _001 => 1 , FCRDIV_A :: _010 => 2 , FCRDIV_A :: _011 => 3 , FCRDIV_A :: _100 => 4 , FCRDIV_A :: _101 => 5 , FCRDIV_A :: _110 => 6 , FCRDIV_A :: _111 => 7 } } } # [ doc = "Reader of field `FCRDIV`" ] pub type FCRDIV_R = crate :: R < u8 , FCRDIV_A > ; impl FCRDIV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FCRDIV_A { match self . bits { 0 => FCRDIV_A :: _000 , 1 => FCRDIV_A :: _001 , 2 => FCRDIV_A :: _010 , 3 => FCRDIV_A :: _011 , 4 => FCRDIV_A :: _100 , 5 => FCRDIV_A :: _101 , 6 => FCRDIV_A :: _110 , 7 => FCRDIV_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == FCRDIV_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == FCRDIV_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == FCRDIV_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == FCRDIV_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == FCRDIV_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == FCRDIV_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == FCRDIV_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == FCRDIV_A :: _111 } } # [ doc = "Write proxy for field `FCRDIV`" ] pub struct FCRDIV_W < 'a > { w : & 'a mut W , } impl < 'a > FCRDIV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FCRDIV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide Factor is 1" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( FCRDIV_A :: _000 ) } # [ doc = "Divide Factor is 2." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( FCRDIV_A :: _001 ) } # [ doc = "Divide Factor is 4." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( FCRDIV_A :: _010 ) } # [ doc = "Divide Factor is 8." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( FCRDIV_A :: _011 ) } # [ doc = "Divide Factor is 16" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( FCRDIV_A :: _100 ) } # [ doc = "Divide Factor is 32" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( FCRDIV_A :: _101 ) } # [ doc = "Divide Factor is 64" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( FCRDIV_A :: _110 ) } # [ doc = "Divide Factor is 128." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( FCRDIV_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 1 ) ) | ( ( ( value as u8 ) & 0x07 ) << 1 ) ; self . w } } # [ doc = "FLL Filter Preserve Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLTPRSRV_A { # [ doc = "0: FLL filter and FLL frequency will reset on changes to currect clock mode." ] _0 , # [ doc = "1: Fll filter and FLL frequency retain their previous values during new clock mode change." ] _1 } impl From < FLTPRSRV_A > for bool { # [ inline ( always ) ] fn from ( variant : FLTPRSRV_A ) -> Self { match variant { FLTPRSRV_A :: _0 => false , FLTPRSRV_A :: _1 => true } } } # [ doc = "Reader of field `FLTPRSRV`" ] pub type FLTPRSRV_R = crate :: R < bool , FLTPRSRV_A > ; impl FLTPRSRV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FLTPRSRV_A { match self . bits { false => FLTPRSRV_A :: _0 , true => FLTPRSRV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLTPRSRV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FLTPRSRV_A :: _1 } } # [ doc = "Write proxy for field `FLTPRSRV`" ] pub struct FLTPRSRV_W < 'a > { w : & 'a mut W , } impl < 'a > FLTPRSRV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLTPRSRV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FLL filter and FLL frequency will reset on changes to currect clock mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLTPRSRV_A :: _0 ) } # [ doc = "Fll filter and FLL frequency retain their previous values during new clock mode change." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FLTPRSRV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Automatic Trim Machine Fail Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ATMF_A { # [ doc = "0: Automatic Trim Machine completed normally." ] _0 , # [ doc = "1: Automatic Trim Machine failed." ] _1 } impl From < ATMF_A > for bool { # [ inline ( always ) ] fn from ( variant : ATMF_A ) -> Self { match variant { ATMF_A :: _0 => false , ATMF_A :: _1 => true } } } # [ doc = "Reader of field `ATMF`" ] pub type ATMF_R = crate :: R < bool , ATMF_A > ; impl ATMF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ATMF_A { match self . bits { false => ATMF_A :: _0 , true => ATMF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ATMF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ATMF_A :: _1 } } # [ doc = "Write proxy for field `ATMF`" ] pub struct ATMF_W < 'a > { w : & 'a mut W , } impl < 'a > ATMF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ATMF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Automatic Trim Machine completed normally." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ATMF_A :: _0 ) } # [ doc = "Automatic Trim Machine failed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ATMF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Automatic Trim Machine Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ATMS_A { # [ doc = "0: 32 kHz Internal Reference Clock selected." ] _0 , # [ doc = "1: 4 MHz Internal Reference Clock selected." ] _1 } impl From < ATMS_A > for bool { # [ inline ( always ) ] fn from ( variant : ATMS_A ) -> Self { match variant { ATMS_A :: _0 => false , ATMS_A :: _1 => true } } } # [ doc = "Reader of field `ATMS`" ] pub type ATMS_R = crate :: R < bool , ATMS_A > ; impl ATMS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ATMS_A { match self . bits { false => ATMS_A :: _0 , true => ATMS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ATMS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ATMS_A :: _1 } } # [ doc = "Write proxy for field `ATMS`" ] pub struct ATMS_W < 'a > { w : & 'a mut W , } impl < 'a > ATMS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ATMS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "32 kHz Internal Reference Clock selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ATMS_A :: _0 ) } # [ doc = "4 MHz Internal Reference Clock selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ATMS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Automatic Trim Machine Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ATME_A { # [ doc = "0: Auto Trim Machine disabled." ] _0 , # [ doc = "1: Auto Trim Machine enabled." ] _1 } impl From < ATME_A > for bool { # [ inline ( always ) ] fn from ( variant : ATME_A ) -> Self { match variant { ATME_A :: _0 => false , ATME_A :: _1 => true } } } # [ doc = "Reader of field `ATME`" ] pub type ATME_R = crate :: R < bool , ATME_A > ; impl ATME_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ATME_A { match self . bits { false => ATME_A :: _0 , true => ATME_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ATME_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ATME_A :: _1 } } # [ doc = "Write proxy for field `ATME`" ] pub struct ATME_W < 'a > { w : & 'a mut W , } impl < 'a > ATME_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ATME_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Auto Trim Machine disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ATME_A :: _0 ) } # [ doc = "Auto Trim Machine enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ATME_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - OSC0 Loss of Clock Status" ] # [ inline ( always ) ] pub fn locs0 ( & self ) -> LOCS0_R { LOCS0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:3 - Fast Clock Internal Reference Divider" ] # [ inline ( always ) ] pub fn fcrdiv ( & self ) -> FCRDIV_R { FCRDIV_R :: new ( ( ( self . bits >> 1 ) & 0x07 ) as u8 ) } # [ doc = "Bit 4 - FLL Filter Preserve Enable" ] # [ inline ( always ) ] pub fn fltprsrv ( & self ) -> FLTPRSRV_R { FLTPRSRV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Automatic Trim Machine Fail Flag" ] # [ inline ( always ) ] pub fn atmf ( & self ) -> ATMF_R { ATMF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Automatic Trim Machine Select" ] # [ inline ( always ) ] pub fn atms ( & self ) -> ATMS_R { ATMS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Automatic Trim Machine Enable" ] # [ inline ( always ) ] pub fn atme ( & self ) -> ATME_R { ATME_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - OSC0 Loss of Clock Status" ] # [ inline ( always ) ] pub fn locs0 ( & mut self ) -> LOCS0_W { LOCS0_W { w : self } } # [ doc = "Bits 1:3 - Fast Clock Internal Reference Divider" ] # [ inline ( always ) ] pub fn fcrdiv ( & mut self ) -> FCRDIV_W { FCRDIV_W { w : self } } # [ doc = "Bit 4 - FLL Filter Preserve Enable" ] # [ inline ( always ) ] pub fn fltprsrv ( & mut self ) -> FLTPRSRV_W { FLTPRSRV_W { w : self } } # [ doc = "Bit 5 - Automatic Trim Machine Fail Flag" ] # [ inline ( always ) ] pub fn atmf ( & mut self ) -> ATMF_W { ATMF_W { w : self } } # [ doc = "Bit 6 - Automatic Trim Machine Select" ] # [ inline ( always ) ] pub fn atms ( & mut self ) -> ATMS_W { ATMS_W { w : self } } # [ doc = "Bit 7 - Automatic Trim Machine Enable" ] # [ inline ( always ) ] pub fn atme ( & mut self ) -> ATME_W { ATME_W { w : self } } } } # [ doc = "MCG Auto Trim Compare Value High Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atcvh](atcvh) module" ] pub type ATCVH = crate :: Reg < u8 , _ATCVH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATCVH ; # [ doc = "`read()` method returns [atcvh::R](atcvh::R) reader structure" ] impl crate :: Readable for ATCVH { } # [ doc = "`write(|w| ..)` method takes [atcvh::W](atcvh::W) writer structure" ] impl crate :: Writable for ATCVH { } # [ doc = "MCG Auto Trim Compare Value High Register" ] pub mod atcvh { # [ doc = "Reader of register ATCVH" ] pub type R = crate :: R < u8 , super :: ATCVH > ; # [ doc = "Writer for register ATCVH" ] pub type W = crate :: W < u8 , super :: ATCVH > ; # [ doc = "Register ATCVH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ATCVH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ATCVH`" ] pub type ATCVH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ATCVH`" ] pub struct ATCVH_W < 'a > { w : & 'a mut W , } impl < 'a > ATCVH_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - ATM Compare Value High" ] # [ inline ( always ) ] pub fn atcvh ( & self ) -> ATCVH_R { ATCVH_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - ATM Compare Value High" ] # [ inline ( always ) ] pub fn atcvh ( & mut self ) -> ATCVH_W { ATCVH_W { w : self } } } } # [ doc = "MCG Auto Trim Compare Value Low Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atcvl](atcvl) module" ] pub type ATCVL = crate :: Reg < u8 , _ATCVL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATCVL ; # [ doc = "`read()` method returns [atcvl::R](atcvl::R) reader structure" ] impl crate :: Readable for ATCVL { } # [ doc = "`write(|w| ..)` method takes [atcvl::W](atcvl::W) writer structure" ] impl crate :: Writable for ATCVL { } # [ doc = "MCG Auto Trim Compare Value Low Register" ] pub mod atcvl { # [ doc = "Reader of register ATCVL" ] pub type R = crate :: R < u8 , super :: ATCVL > ; # [ doc = "Writer for register ATCVL" ] pub type W = crate :: W < u8 , super :: ATCVL > ; # [ doc = "Register ATCVL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ATCVL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ATCVL`" ] pub type ATCVL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ATCVL`" ] pub struct ATCVL_W < 'a > { w : & 'a mut W , } impl < 'a > ATCVL_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - ATM Compare Value Low" ] # [ inline ( always ) ] pub fn atcvl ( & self ) -> ATCVL_R { ATCVL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - ATM Compare Value Low" ] # [ inline ( always ) ] pub fn atcvl ( & mut self ) -> ATCVL_W { ATCVL_W { w : self } } } } # [ doc = "MCG Control 7 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c7](c7) module" ] pub type C7 = crate :: Reg < u8 , _C7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C7 ; # [ doc = "`read()` method returns [c7::R](c7::R) reader structure" ] impl crate :: Readable for C7 { } # [ doc = "`write(|w| ..)` method takes [c7::W](c7::W) writer structure" ] impl crate :: Writable for C7 { } # [ doc = "MCG Control 7 Register" ] pub mod c7 { # [ doc = "Reader of register C7" ] pub type R = crate :: R < u8 , super :: C7 > ; # [ doc = "Writer for register C7" ] pub type W = crate :: W < u8 , super :: C7 > ; # [ doc = "Register C7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C7 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "MCG OSC Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OSCSEL_A { # [ doc = "0: Selects Oscillator (OSCCLK0)." ] _00 , # [ doc = "1: Selects 32 kHz RTC Oscillator." ] _01 , # [ doc = "2: Selects Oscillator (OSCCLK1)." ] _10 } impl From < OSCSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : OSCSEL_A ) -> Self { match variant { OSCSEL_A :: _00 => 0 , OSCSEL_A :: _01 => 1 , OSCSEL_A :: _10 => 2 } } } # [ doc = "Reader of field `OSCSEL`" ] pub type OSCSEL_R = crate :: R < u8 , OSCSEL_A > ; impl OSCSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , OSCSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( OSCSEL_A :: _00 ) , 1 => Val ( OSCSEL_A :: _01 ) , 2 => Val ( OSCSEL_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == OSCSEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == OSCSEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == OSCSEL_A :: _10 } } # [ doc = "Write proxy for field `OSCSEL`" ] pub struct OSCSEL_W < 'a > { w : & 'a mut W , } impl < 'a > OSCSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OSCSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Selects Oscillator (OSCCLK0)." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( OSCSEL_A :: _00 ) } # [ doc = "Selects 32 kHz RTC Oscillator." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( OSCSEL_A :: _01 ) } # [ doc = "Selects Oscillator (OSCCLK1)." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( OSCSEL_A :: _10 ) } # [ 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 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - MCG OSC Clock Select" ] # [ inline ( always ) ] pub fn oscsel ( & self ) -> OSCSEL_R { OSCSEL_R :: new ( ( self . bits & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - MCG OSC Clock Select" ] # [ inline ( always ) ] pub fn oscsel ( & mut self ) -> OSCSEL_W { OSCSEL_W { w : self } } } } # [ doc = "MCG Control 8 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c8](c8) module" ] pub type C8 = crate :: Reg < u8 , _C8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C8 ; # [ doc = "`read()` method returns [c8::R](c8::R) reader structure" ] impl crate :: Readable for C8 { } # [ doc = "`write(|w| ..)` method takes [c8::W](c8::W) writer structure" ] impl crate :: Writable for C8 { } # [ doc = "MCG Control 8 Register" ] pub mod c8 { # [ doc = "Reader of register C8" ] pub type R = crate :: R < u8 , super :: C8 > ; # [ doc = "Writer for register C8" ] pub type W = crate :: W < u8 , super :: C8 > ; # [ doc = "Register C8 `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: C8 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "RTC Loss of Clock Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOCS1_A { # [ doc = "0: Loss of RTC has not occur." ] _0 , # [ doc = "1: Loss of RTC has occur" ] _1 } impl From < LOCS1_A > for bool { # [ inline ( always ) ] fn from ( variant : LOCS1_A ) -> Self { match variant { LOCS1_A :: _0 => false , LOCS1_A :: _1 => true } } } # [ doc = "Reader of field `LOCS1`" ] pub type LOCS1_R = crate :: R < bool , LOCS1_A > ; impl LOCS1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOCS1_A { match self . bits { false => LOCS1_A :: _0 , true => LOCS1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOCS1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOCS1_A :: _1 } } # [ doc = "Write proxy for field `LOCS1`" ] pub struct LOCS1_W < 'a > { w : & 'a mut W , } impl < 'a > LOCS1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOCS1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loss of RTC has not occur." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOCS1_A :: _0 ) } # [ doc = "Loss of RTC has occur" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOCS1_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Clock Monitor Enable1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CME1_A { # [ doc = "0: External clock monitor is disabled for RTC clock." ] _0 , # [ doc = "1: External clock monitor is enabled for RTC clock." ] _1 } impl From < CME1_A > for bool { # [ inline ( always ) ] fn from ( variant : CME1_A ) -> Self { match variant { CME1_A :: _0 => false , CME1_A :: _1 => true } } } # [ doc = "Reader of field `CME1`" ] pub type CME1_R = crate :: R < bool , CME1_A > ; impl CME1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CME1_A { match self . bits { false => CME1_A :: _0 , true => CME1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CME1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CME1_A :: _1 } } # [ doc = "Write proxy for field `CME1`" ] pub struct CME1_W < 'a > { w : & 'a mut W , } impl < 'a > CME1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CME1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "External clock monitor is disabled for RTC clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CME1_A :: _0 ) } # [ doc = "External clock monitor is enabled for RTC clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CME1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "PLL Loss of Lock Reset Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOLRE_A { # [ doc = "0: Interrupt request is generated on a PLL loss of lock indication. The PLL loss of lock interrupt enable bit must also be set to generate the interrupt request." ] _0 , # [ doc = "1: Generate a reset request on a PLL loss of lock indication." ] _1 } impl From < LOLRE_A > for bool { # [ inline ( always ) ] fn from ( variant : LOLRE_A ) -> Self { match variant { LOLRE_A :: _0 => false , LOLRE_A :: _1 => true } } } # [ doc = "Reader of field `LOLRE`" ] pub type LOLRE_R = crate :: R < bool , LOLRE_A > ; impl LOLRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOLRE_A { match self . bits { false => LOLRE_A :: _0 , true => LOLRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOLRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOLRE_A :: _1 } } # [ doc = "Write proxy for field `LOLRE`" ] pub struct LOLRE_W < 'a > { w : & 'a mut W , } impl < 'a > LOLRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOLRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt request is generated on a PLL loss of lock indication. The PLL loss of lock interrupt enable bit must also be set to generate the interrupt request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOLRE_A :: _0 ) } # [ doc = "Generate a reset request on a PLL loss of lock indication." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOLRE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Loss of Clock Reset Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOCRE1_A { # [ doc = "0: Interrupt request is generated on a loss of RTC external reference clock." ] _0 , # [ doc = "1: Generate a reset request on a loss of RTC external reference clock" ] _1 } impl From < LOCRE1_A > for bool { # [ inline ( always ) ] fn from ( variant : LOCRE1_A ) -> Self { match variant { LOCRE1_A :: _0 => false , LOCRE1_A :: _1 => true } } } # [ doc = "Reader of field `LOCRE1`" ] pub type LOCRE1_R = crate :: R < bool , LOCRE1_A > ; impl LOCRE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOCRE1_A { match self . bits { false => LOCRE1_A :: _0 , true => LOCRE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOCRE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOCRE1_A :: _1 } } # [ doc = "Write proxy for field `LOCRE1`" ] pub struct LOCRE1_W < 'a > { w : & 'a mut W , } impl < 'a > LOCRE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOCRE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt request is generated on a loss of RTC external reference clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOCRE1_A :: _0 ) } # [ doc = "Generate a reset request on a loss of RTC external reference clock" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOCRE1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - RTC Loss of Clock Status" ] # [ inline ( always ) ] pub fn locs1 ( & self ) -> LOCS1_R { LOCS1_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Clock Monitor Enable1" ] # [ inline ( always ) ] pub fn cme1 ( & self ) -> CME1_R { CME1_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - PLL Loss of Lock Reset Enable" ] # [ inline ( always ) ] pub fn lolre ( & self ) -> LOLRE_R { LOLRE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loss of Clock Reset Enable" ] # [ inline ( always ) ] pub fn locre1 ( & self ) -> LOCRE1_R { LOCRE1_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - RTC Loss of Clock Status" ] # [ inline ( always ) ] pub fn locs1 ( & mut self ) -> LOCS1_W { LOCS1_W { w : self } } # [ doc = "Bit 5 - Clock Monitor Enable1" ] # [ inline ( always ) ] pub fn cme1 ( & mut self ) -> CME1_W { CME1_W { w : self } } # [ doc = "Bit 6 - PLL Loss of Lock Reset Enable" ] # [ inline ( always ) ] pub fn lolre ( & mut self ) -> LOLRE_W { LOLRE_W { w : self } } # [ doc = "Bit 7 - Loss of Clock Reset Enable" ] # [ inline ( always ) ] pub fn locre1 ( & mut self ) -> LOCRE1_W { LOCRE1_W { w : self } } } } # [ doc = "MCG Control 9 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c9](c9) module" ] pub type C9 = crate :: Reg < u8 , _C9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C9 ; # [ doc = "`read()` method returns [c9::R](c9::R) reader structure" ] impl crate :: Readable for C9 { } # [ doc = "`write(|w| ..)` method takes [c9::W](c9::W) writer structure" ] impl crate :: Writable for C9 { } # [ doc = "MCG Control 9 Register" ] pub mod c9 { # [ doc = "Reader of register C9" ] pub type R = crate :: R < u8 , super :: C9 > ; # [ doc = "Writer for register C9" ] pub type W = crate :: W < u8 , super :: C9 > ; # [ doc = "Register C9 `reset()`'s with value 0x10" ] impl crate :: ResetValue for super :: C9 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x10 } } # [ doc = "External PLL Loss of Clock Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXT_PLL_LOCS_A { # [ doc = "0: Loss of MCG EXT_PLL has not occurred." ] _0 , # [ doc = "1: Loss of MCG EXT_PLL has occurred." ] _1 } impl From < EXT_PLL_LOCS_A > for bool { # [ inline ( always ) ] fn from ( variant : EXT_PLL_LOCS_A ) -> Self { match variant { EXT_PLL_LOCS_A :: _0 => false , EXT_PLL_LOCS_A :: _1 => true } } } # [ doc = "Reader of field `EXT_PLL_LOCS`" ] pub type EXT_PLL_LOCS_R = crate :: R < bool , EXT_PLL_LOCS_A > ; impl EXT_PLL_LOCS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EXT_PLL_LOCS_A { match self . bits { false => EXT_PLL_LOCS_A :: _0 , true => EXT_PLL_LOCS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EXT_PLL_LOCS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EXT_PLL_LOCS_A :: _1 } } # [ doc = "Write proxy for field `EXT_PLL_LOCS`" ] pub struct EXT_PLL_LOCS_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_PLL_LOCS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EXT_PLL_LOCS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loss of MCG EXT_PLL has not occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EXT_PLL_LOCS_A :: _0 ) } # [ doc = "Loss of MCG EXT_PLL has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EXT_PLL_LOCS_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "MCG External PLL Loss of Clock Reset Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_LOCRE_A { # [ doc = "0: Interrupt request is generated on a invalid or loss of the MCG external PLL clock." ] _0 , # [ doc = "1: Generates a system reset request on a invalid or loss of the MCG external PLL clock." ] _1 } impl From < PLL_LOCRE_A > for bool { # [ inline ( always ) ] fn from ( variant : PLL_LOCRE_A ) -> Self { match variant { PLL_LOCRE_A :: _0 => false , PLL_LOCRE_A :: _1 => true } } } # [ doc = "Reader of field `PLL_LOCRE`" ] pub type PLL_LOCRE_R = crate :: R < bool , PLL_LOCRE_A > ; impl PLL_LOCRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLL_LOCRE_A { match self . bits { false => PLL_LOCRE_A :: _0 , true => PLL_LOCRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLL_LOCRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLL_LOCRE_A :: _1 } } # [ doc = "Write proxy for field `PLL_LOCRE`" ] pub struct PLL_LOCRE_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_LOCRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLL_LOCRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt request is generated on a invalid or loss of the MCG external PLL clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PLL_LOCRE_A :: _0 ) } # [ doc = "Generates a system reset request on a invalid or loss of the MCG external PLL clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PLL_LOCRE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "MCG External PLL Clock Monitor Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_CME_A { # [ doc = "0: External clock monitor is disabled for EXT_PLL clock." ] _0 , # [ doc = "1: External clock monitor is enabled for EXT_PLL clock." ] _1 } impl From < PLL_CME_A > for bool { # [ inline ( always ) ] fn from ( variant : PLL_CME_A ) -> Self { match variant { PLL_CME_A :: _0 => false , PLL_CME_A :: _1 => true } } } # [ doc = "Reader of field `PLL_CME`" ] pub type PLL_CME_R = crate :: R < bool , PLL_CME_A > ; impl PLL_CME_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLL_CME_A { match self . bits { false => PLL_CME_A :: _0 , true => PLL_CME_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLL_CME_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLL_CME_A :: _1 } } # [ doc = "Write proxy for field `PLL_CME`" ] pub struct PLL_CME_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_CME_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLL_CME_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "External clock monitor is disabled for EXT_PLL clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PLL_CME_A :: _0 ) } # [ doc = "External clock monitor is enabled for EXT_PLL clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PLL_CME_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } impl R { # [ doc = "Bit 0 - External PLL Loss of Clock Status" ] # [ inline ( always ) ] pub fn ext_pll_locs ( & self ) -> EXT_PLL_LOCS_R { EXT_PLL_LOCS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 4 - MCG External PLL Loss of Clock Reset Enable" ] # [ inline ( always ) ] pub fn pll_locre ( & self ) -> PLL_LOCRE_R { PLL_LOCRE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - MCG External PLL Clock Monitor Enable" ] # [ inline ( always ) ] pub fn pll_cme ( & self ) -> PLL_CME_R { PLL_CME_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - External PLL Loss of Clock Status" ] # [ inline ( always ) ] pub fn ext_pll_locs ( & mut self ) -> EXT_PLL_LOCS_W { EXT_PLL_LOCS_W { w : self } } # [ doc = "Bit 4 - MCG External PLL Loss of Clock Reset Enable" ] # [ inline ( always ) ] pub fn pll_locre ( & mut self ) -> PLL_LOCRE_W { PLL_LOCRE_W { w : self } } # [ doc = "Bit 5 - MCG External PLL Clock Monitor Enable" ] # [ inline ( always ) ] pub fn pll_cme ( & mut self ) -> PLL_CME_W { PLL_CME_W { w : self } } } } # [ doc = "MCG Control 11 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c11](c11) module" ] pub type C11 = crate :: Reg < u8 , _C11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C11 ; # [ doc = "`read()` method returns [c11::R](c11::R) reader structure" ] impl crate :: Readable for C11 { } # [ doc = "`write(|w| ..)` method takes [c11::W](c11::W) writer structure" ] impl crate :: Writable for C11 { } # [ doc = "MCG Control 11 Register" ] pub mod c11 { # [ doc = "Reader of register C11" ] pub type R = crate :: R < u8 , super :: C11 > ; # [ doc = "Writer for register C11" ] pub type W = crate :: W < u8 , super :: C11 > ; # [ doc = "Register C11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C11 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "PLL Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLLCS_A { # [ doc = "0: PLL0 output clock is selected." ] _0 , # [ doc = "1: External PLL clock is selected." ] _1 } impl From < PLLCS_A > for bool { # [ inline ( always ) ] fn from ( variant : PLLCS_A ) -> Self { match variant { PLLCS_A :: _0 => false , PLLCS_A :: _1 => true } } } # [ doc = "Reader of field `PLLCS`" ] pub type PLLCS_R = crate :: R < bool , PLLCS_A > ; impl PLLCS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLLCS_A { match self . bits { false => PLLCS_A :: _0 , true => PLLCS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLLCS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLLCS_A :: _1 } } # [ doc = "Write proxy for field `PLLCS`" ] pub struct PLLCS_W < 'a > { w : & 'a mut W , } impl < 'a > PLLCS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLLCS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PLL0 output clock is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PLLCS_A :: _0 ) } # [ doc = "External PLL clock is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PLLCS_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 4 - PLL Clock Select" ] # [ inline ( always ) ] pub fn pllcs ( & self ) -> PLLCS_R { PLLCS_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - PLL Clock Select" ] # [ inline ( always ) ] pub fn pllcs ( & mut self ) -> PLLCS_W { PLLCS_W { w : self } } } } # [ doc = "MCG Status 2 Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s2](s2) module" ] pub type S2 = crate :: Reg < u8 , _S2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S2 ; # [ doc = "`read()` method returns [s2::R](s2::R) reader structure" ] impl crate :: Readable for S2 { } # [ doc = "MCG Status 2 Register" ] pub mod s2 { # [ doc = "Reader of register S2" ] pub type R = crate :: R < u8 , super :: S2 > ; # [ doc = "PLL Clock Select Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLLCST_A { # [ doc = "0: Source of PLLCS is PLL clock." ] _0 , # [ doc = "1: Source of PLLCS is EXT_PLL clock." ] _1 } impl From < PLLCST_A > for bool { # [ inline ( always ) ] fn from ( variant : PLLCST_A ) -> Self { match variant { PLLCST_A :: _0 => false , PLLCST_A :: _1 => true } } } # [ doc = "Reader of field `PLLCST`" ] pub type PLLCST_R = crate :: R < bool , PLLCST_A > ; impl PLLCST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLLCST_A { match self . bits { false => PLLCST_A :: _0 , true => PLLCST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLLCST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLLCST_A :: _1 } } impl R { # [ doc = "Bit 4 - PLL Clock Select Status" ] # [ inline ( always ) ] pub fn pllcst ( & self ) -> PLLCST_R { PLLCST_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } } } # [ doc = "Oscillator" ] pub struct OSC { _marker : PhantomData < * const ( ) > } unsafe impl Send for OSC { } impl OSC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const osc :: RegisterBlock { 0x4006_5000 as * const _ } } impl Deref for OSC { type Target = osc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * OSC :: ptr ( ) } } } # [ doc = "Oscillator" ] pub mod osc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - OSC Control Register" ] pub cr : CR , _reserved1 : [ u8 ; 1usize ] , # [ doc = "0x02 - OSC_DIV" ] pub div : DIV , } # [ doc = "OSC Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr](cr) module" ] pub type CR = crate :: Reg < u8 , _CR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR ; # [ doc = "`read()` method returns [cr::R](cr::R) reader structure" ] impl crate :: Readable for CR { } # [ doc = "`write(|w| ..)` method takes [cr::W](cr::W) writer structure" ] impl crate :: Writable for CR { } # [ doc = "OSC Control Register" ] pub mod cr { # [ doc = "Reader of register CR" ] pub type R = crate :: R < u8 , super :: CR > ; # [ doc = "Writer for register CR" ] pub type W = crate :: W < u8 , super :: CR > ; # [ doc = "Register CR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Oscillator 16 pF Capacitor Load Configure\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SC16P_A { # [ doc = "0: Disable the selection." ] _0 , # [ doc = "1: Add 16 pF capacitor to the oscillator load." ] _1 } impl From < SC16P_A > for bool { # [ inline ( always ) ] fn from ( variant : SC16P_A ) -> Self { match variant { SC16P_A :: _0 => false , SC16P_A :: _1 => true } } } # [ doc = "Reader of field `SC16P`" ] pub type SC16P_R = crate :: R < bool , SC16P_A > ; impl SC16P_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SC16P_A { match self . bits { false => SC16P_A :: _0 , true => SC16P_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SC16P_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SC16P_A :: _1 } } # [ doc = "Write proxy for field `SC16P`" ] pub struct SC16P_W < 'a > { w : & 'a mut W , } impl < 'a > SC16P_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SC16P_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the selection." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SC16P_A :: _0 ) } # [ doc = "Add 16 pF capacitor to the oscillator load." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SC16P_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Oscillator 8 pF Capacitor Load Configure\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SC8P_A { # [ doc = "0: Disable the selection." ] _0 , # [ doc = "1: Add 8 pF capacitor to the oscillator load." ] _1 } impl From < SC8P_A > for bool { # [ inline ( always ) ] fn from ( variant : SC8P_A ) -> Self { match variant { SC8P_A :: _0 => false , SC8P_A :: _1 => true } } } # [ doc = "Reader of field `SC8P`" ] pub type SC8P_R = crate :: R < bool , SC8P_A > ; impl SC8P_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SC8P_A { match self . bits { false => SC8P_A :: _0 , true => SC8P_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SC8P_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SC8P_A :: _1 } } # [ doc = "Write proxy for field `SC8P`" ] pub struct SC8P_W < 'a > { w : & 'a mut W , } impl < 'a > SC8P_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SC8P_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the selection." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SC8P_A :: _0 ) } # [ doc = "Add 8 pF capacitor to the oscillator load." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SC8P_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Oscillator 4 pF Capacitor Load Configure\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SC4P_A { # [ doc = "0: Disable the selection." ] _0 , # [ doc = "1: Add 4 pF capacitor to the oscillator load." ] _1 } impl From < SC4P_A > for bool { # [ inline ( always ) ] fn from ( variant : SC4P_A ) -> Self { match variant { SC4P_A :: _0 => false , SC4P_A :: _1 => true } } } # [ doc = "Reader of field `SC4P`" ] pub type SC4P_R = crate :: R < bool , SC4P_A > ; impl SC4P_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SC4P_A { match self . bits { false => SC4P_A :: _0 , true => SC4P_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SC4P_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SC4P_A :: _1 } } # [ doc = "Write proxy for field `SC4P`" ] pub struct SC4P_W < 'a > { w : & 'a mut W , } impl < 'a > SC4P_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SC4P_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the selection." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SC4P_A :: _0 ) } # [ doc = "Add 4 pF capacitor to the oscillator load." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SC4P_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Oscillator 2 pF Capacitor Load Configure\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SC2P_A { # [ doc = "0: Disable the selection." ] _0 , # [ doc = "1: Add 2 pF capacitor to the oscillator load." ] _1 } impl From < SC2P_A > for bool { # [ inline ( always ) ] fn from ( variant : SC2P_A ) -> Self { match variant { SC2P_A :: _0 => false , SC2P_A :: _1 => true } } } # [ doc = "Reader of field `SC2P`" ] pub type SC2P_R = crate :: R < bool , SC2P_A > ; impl SC2P_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SC2P_A { match self . bits { false => SC2P_A :: _0 , true => SC2P_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SC2P_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SC2P_A :: _1 } } # [ doc = "Write proxy for field `SC2P`" ] pub struct SC2P_W < 'a > { w : & 'a mut W , } impl < 'a > SC2P_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SC2P_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the selection." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SC2P_A :: _0 ) } # [ doc = "Add 2 pF capacitor to the oscillator load." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SC2P_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "External Reference Stop Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EREFSTEN_A { # [ doc = "0: External reference clock is disabled in Stop mode." ] _0 , # [ doc = "1: External reference clock stays enabled in Stop mode if ERCLKEN is set before entering Stop mode." ] _1 } impl From < EREFSTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : EREFSTEN_A ) -> Self { match variant { EREFSTEN_A :: _0 => false , EREFSTEN_A :: _1 => true } } } # [ doc = "Reader of field `EREFSTEN`" ] pub type EREFSTEN_R = crate :: R < bool , EREFSTEN_A > ; impl EREFSTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EREFSTEN_A { match self . bits { false => EREFSTEN_A :: _0 , true => EREFSTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EREFSTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EREFSTEN_A :: _1 } } # [ doc = "Write proxy for field `EREFSTEN`" ] pub struct EREFSTEN_W < 'a > { w : & 'a mut W , } impl < 'a > EREFSTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EREFSTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "External reference clock is disabled in Stop mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EREFSTEN_A :: _0 ) } # [ doc = "External reference clock stays enabled in Stop mode if ERCLKEN is set before entering Stop mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EREFSTEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "External Reference Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERCLKEN_A { # [ doc = "0: External reference clock is inactive." ] _0 , # [ doc = "1: External reference clock is enabled." ] _1 } impl From < ERCLKEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ERCLKEN_A ) -> Self { match variant { ERCLKEN_A :: _0 => false , ERCLKEN_A :: _1 => true } } } # [ doc = "Reader of field `ERCLKEN`" ] pub type ERCLKEN_R = crate :: R < bool , ERCLKEN_A > ; impl ERCLKEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERCLKEN_A { match self . bits { false => ERCLKEN_A :: _0 , true => ERCLKEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERCLKEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERCLKEN_A :: _1 } } # [ doc = "Write proxy for field `ERCLKEN`" ] pub struct ERCLKEN_W < 'a > { w : & 'a mut W , } impl < 'a > ERCLKEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERCLKEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "External reference clock is inactive." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERCLKEN_A :: _0 ) } # [ doc = "External reference clock is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERCLKEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Oscillator 16 pF Capacitor Load Configure" ] # [ inline ( always ) ] pub fn sc16p ( & self ) -> SC16P_R { SC16P_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Oscillator 8 pF Capacitor Load Configure" ] # [ inline ( always ) ] pub fn sc8p ( & self ) -> SC8P_R { SC8P_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Oscillator 4 pF Capacitor Load Configure" ] # [ inline ( always ) ] pub fn sc4p ( & self ) -> SC4P_R { SC4P_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Oscillator 2 pF Capacitor Load Configure" ] # [ inline ( always ) ] pub fn sc2p ( & self ) -> SC2P_R { SC2P_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - External Reference Stop Enable" ] # [ inline ( always ) ] pub fn erefsten ( & self ) -> EREFSTEN_R { EREFSTEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - External Reference Enable" ] # [ inline ( always ) ] pub fn erclken ( & self ) -> ERCLKEN_R { ERCLKEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Oscillator 16 pF Capacitor Load Configure" ] # [ inline ( always ) ] pub fn sc16p ( & mut self ) -> SC16P_W { SC16P_W { w : self } } # [ doc = "Bit 1 - Oscillator 8 pF Capacitor Load Configure" ] # [ inline ( always ) ] pub fn sc8p ( & mut self ) -> SC8P_W { SC8P_W { w : self } } # [ doc = "Bit 2 - Oscillator 4 pF Capacitor Load Configure" ] # [ inline ( always ) ] pub fn sc4p ( & mut self ) -> SC4P_W { SC4P_W { w : self } } # [ doc = "Bit 3 - Oscillator 2 pF Capacitor Load Configure" ] # [ inline ( always ) ] pub fn sc2p ( & mut self ) -> SC2P_W { SC2P_W { w : self } } # [ doc = "Bit 5 - External Reference Stop Enable" ] # [ inline ( always ) ] pub fn erefsten ( & mut self ) -> EREFSTEN_W { EREFSTEN_W { w : self } } # [ doc = "Bit 7 - External Reference Enable" ] # [ inline ( always ) ] pub fn erclken ( & mut self ) -> ERCLKEN_W { ERCLKEN_W { w : self } } } } # [ doc = "OSC_DIV\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [div](div) module" ] pub type DIV = crate :: Reg < u8 , _DIV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DIV ; # [ doc = "`read()` method returns [div::R](div::R) reader structure" ] impl crate :: Readable for DIV { } # [ doc = "`write(|w| ..)` method takes [div::W](div::W) writer structure" ] impl crate :: Writable for DIV { } # [ doc = "OSC_DIV" ] pub mod div { # [ doc = "Reader of register DIV" ] pub type R = crate :: R < u8 , super :: DIV > ; # [ doc = "Writer for register DIV" ] pub type W = crate :: W < u8 , super :: DIV > ; # [ doc = "Register DIV `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DIV { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "ERCLK prescaler\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERPS_A { # [ doc = "0: The divisor ratio is 1." ] _00 , # [ doc = "1: The divisor ratio is 2." ] _01 , # [ doc = "2: The divisor ratio is 4." ] _10 , # [ doc = "3: The divisor ratio is 8." ] _11 } impl From < ERPS_A > for u8 { # [ inline ( always ) ] fn from ( variant : ERPS_A ) -> Self { match variant { ERPS_A :: _00 => 0 , ERPS_A :: _01 => 1 , ERPS_A :: _10 => 2 , ERPS_A :: _11 => 3 } } } # [ doc = "Reader of field `ERPS`" ] pub type ERPS_R = crate :: R < u8 , ERPS_A > ; impl ERPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERPS_A { match self . bits { 0 => ERPS_A :: _00 , 1 => ERPS_A :: _01 , 2 => ERPS_A :: _10 , 3 => ERPS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ERPS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ERPS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ERPS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ERPS_A :: _11 } } # [ doc = "Write proxy for field `ERPS`" ] pub struct ERPS_W < 'a > { w : & 'a mut W , } impl < 'a > ERPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERPS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "The divisor ratio is 1." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ERPS_A :: _00 ) } # [ doc = "The divisor ratio is 2." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ERPS_A :: _01 ) } # [ doc = "The divisor ratio is 4." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ERPS_A :: _10 ) } # [ doc = "The divisor ratio is 8." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ERPS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 6:7 - ERCLK prescaler" ] # [ inline ( always ) ] pub fn erps ( & self ) -> ERPS_R { ERPS_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 6:7 - ERCLK prescaler" ] # [ inline ( always ) ] pub fn erps ( & mut self ) -> ERPS_W { ERPS_W { w : self } } } } } # [ doc = "Inter-Integrated Circuit" ] pub struct I2C0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for I2C0 { } impl I2C0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const i2c0 :: RegisterBlock { 0x4006_6000 as * const _ } } impl Deref for I2C0 { type Target = i2c0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * I2C0 :: ptr ( ) } } } # [ doc = "Inter-Integrated Circuit" ] pub mod i2c0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - I2C Address Register 1" ] pub a1 : A1 , # [ doc = "0x01 - I2C Frequency Divider register" ] pub f : F , # [ doc = "0x02 - I2C Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - I2C Status register" ] pub s : S , # [ doc = "0x04 - I2C Data I/O register" ] pub d : D , # [ doc = "0x05 - I2C Control Register 2" ] pub c2 : C2 , # [ doc = "0x06 - I2C Programmable Input Glitch Filter Register" ] pub flt : FLT , # [ doc = "0x07 - I2C Range Address register" ] pub ra : RA , # [ doc = "0x08 - I2C SMBus Control and Status register" ] pub smb : SMB , # [ doc = "0x09 - I2C Address Register 2" ] pub a2 : A2 , # [ doc = "0x0a - I2C SCL Low Timeout Register High" ] pub slth : SLTH , # [ doc = "0x0b - I2C SCL Low Timeout Register Low" ] pub sltl : SLTL , } # [ doc = "I2C Address Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [a1](a1) module" ] pub type A1 = crate :: Reg < u8 , _A1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _A1 ; # [ doc = "`read()` method returns [a1::R](a1::R) reader structure" ] impl crate :: Readable for A1 { } # [ doc = "`write(|w| ..)` method takes [a1::W](a1::W) writer structure" ] impl crate :: Writable for A1 { } # [ doc = "I2C Address Register 1" ] pub mod a1 { # [ doc = "Reader of register A1" ] pub type R = crate :: R < u8 , super :: A1 > ; # [ doc = "Writer for register A1" ] pub type W = crate :: W < u8 , super :: A1 > ; # [ doc = "Register A1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: A1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AD`" ] pub type AD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `AD`" ] pub struct AD_W < 'a > { w : & 'a mut W , } impl < 'a > AD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Address" ] # [ inline ( always ) ] pub fn ad ( & self ) -> AD_R { AD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Address" ] # [ inline ( always ) ] pub fn ad ( & mut self ) -> AD_W { AD_W { w : self } } } } # [ doc = "I2C Frequency Divider register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f](f) module" ] pub type F = crate :: Reg < u8 , _F > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _F ; # [ doc = "`read()` method returns [f::R](f::R) reader structure" ] impl crate :: Readable for F { } # [ doc = "`write(|w| ..)` method takes [f::W](f::W) writer structure" ] impl crate :: Writable for F { } # [ doc = "I2C Frequency Divider register" ] pub mod f { # [ doc = "Reader of register F" ] pub type R = crate :: R < u8 , super :: F > ; # [ doc = "Writer for register F" ] pub type W = crate :: W < u8 , super :: F > ; # [ doc = "Register F `reset()`'s with value 0" ] impl crate :: ResetValue for super :: F { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ICR`" ] pub type ICR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ICR`" ] pub struct ICR_W < 'a > { w : & 'a mut W , } impl < 'a > ICR_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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Multiplier Factor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MULT_A { # [ doc = "0: mul = 1" ] _00 , # [ doc = "1: mul = 2" ] _01 , # [ doc = "2: mul = 4" ] _10 } impl From < MULT_A > for u8 { # [ inline ( always ) ] fn from ( variant : MULT_A ) -> Self { match variant { MULT_A :: _00 => 0 , MULT_A :: _01 => 1 , MULT_A :: _10 => 2 } } } # [ doc = "Reader of field `MULT`" ] pub type MULT_R = crate :: R < u8 , MULT_A > ; impl MULT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , MULT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( MULT_A :: _00 ) , 1 => Val ( MULT_A :: _01 ) , 2 => Val ( MULT_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MULT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MULT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MULT_A :: _10 } } # [ doc = "Write proxy for field `MULT`" ] pub struct MULT_W < 'a > { w : & 'a mut W , } impl < 'a > MULT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MULT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "mul = 1" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _00 ) } # [ doc = "mul = 2" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _01 ) } # [ doc = "mul = 4" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _10 ) } # [ 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 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - ClockRate" ] # [ inline ( always ) ] pub fn icr ( & self ) -> ICR_R { ICR_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 6:7 - Multiplier Factor" ] # [ inline ( always ) ] pub fn mult ( & self ) -> MULT_R { MULT_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - ClockRate" ] # [ inline ( always ) ] pub fn icr ( & mut self ) -> ICR_W { ICR_W { w : self } } # [ doc = "Bits 6:7 - Multiplier Factor" ] # [ inline ( always ) ] pub fn mult ( & mut self ) -> MULT_W { MULT_W { w : self } } } } # [ doc = "I2C Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "I2C Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: All DMA signalling disabled." ] _0 , # [ doc = "1: DMA transfer is enabled. While SMB\\[FACK\\] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S\\[IAAS\\] and S\\[TCF\\] are set. If the direction of transfer is known from master to slave, then it is not required to check S\\[SRW\\]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All DMA signalling disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA transfer is enabled. While SMB\\[FACK\\] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S\\[IAAS\\] and S\\[TCF\\] are set. If the direction of transfer is known from master to slave, then it is not required to check S\\[SRW\\]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUEN_A { # [ doc = "0: Normal operation. No interrupt generated when address matching in low power mode." ] _0 , # [ doc = "1: Enables the wakeup function in low power mode." ] _1 } impl From < WUEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WUEN_A ) -> Self { match variant { WUEN_A :: _0 => false , WUEN_A :: _1 => true } } } # [ doc = "Reader of field `WUEN`" ] pub type WUEN_R = crate :: R < bool , WUEN_A > ; impl WUEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUEN_A { match self . bits { false => WUEN_A :: _0 , true => WUEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUEN_A :: _1 } } # [ doc = "Write proxy for field `WUEN`" ] pub struct WUEN_W < 'a > { w : & 'a mut W , } impl < 'a > WUEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation. No interrupt generated when address matching in low power mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUEN_A :: _0 ) } # [ doc = "Enables the wakeup function in low power mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Write proxy for field `RSTA`" ] pub struct RSTA_W < 'a > { w : & 'a mut W , } impl < 'a > RSTA_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmit Acknowledge Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXAK_A { # [ doc = "0: An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set)." ] _0 , # [ doc = "1: No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set)." ] _1 } impl From < TXAK_A > for bool { # [ inline ( always ) ] fn from ( variant : TXAK_A ) -> Self { match variant { TXAK_A :: _0 => false , TXAK_A :: _1 => true } } } # [ doc = "Reader of field `TXAK`" ] pub type TXAK_R = crate :: R < bool , TXAK_A > ; impl TXAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXAK_A { match self . bits { false => TXAK_A :: _0 , true => TXAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXAK_A :: _1 } } # [ doc = "Write proxy for field `TXAK`" ] pub struct TXAK_W < 'a > { w : & 'a mut W , } impl < 'a > TXAK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXAK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXAK_A :: _0 ) } # [ doc = "No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXAK_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TX_A { # [ doc = "0: Receive" ] _0 , # [ doc = "1: Transmit" ] _1 } impl From < TX_A > for bool { # [ inline ( always ) ] fn from ( variant : TX_A ) -> Self { match variant { TX_A :: _0 => false , TX_A :: _1 => true } } } # [ doc = "Reader of field `TX`" ] pub type TX_R = crate :: R < bool , TX_A > ; impl TX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TX_A { match self . bits { false => TX_A :: _0 , true => TX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TX_A :: _1 } } # [ doc = "Write proxy for field `TX`" ] pub struct TX_W < 'a > { w : & 'a mut W , } impl < 'a > TX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TX_A :: _0 ) } # [ doc = "Transmit" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TX_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Master Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MST_A { # [ doc = "0: Slave mode" ] _0 , # [ doc = "1: Master mode" ] _1 } impl From < MST_A > for bool { # [ inline ( always ) ] fn from ( variant : MST_A ) -> Self { match variant { MST_A :: _0 => false , MST_A :: _1 => true } } } # [ doc = "Reader of field `MST`" ] pub type MST_R = crate :: R < bool , MST_A > ; impl MST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MST_A { match self . bits { false => MST_A :: _0 , true => MST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MST_A :: _1 } } # [ doc = "Write proxy for field `MST`" ] pub struct MST_W < 'a > { w : & 'a mut W , } impl < 'a > MST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Slave mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MST_A :: _0 ) } # [ doc = "Master mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MST_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "I2C Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICIE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IICIE_A > for bool { # [ inline ( always ) ] fn from ( variant : IICIE_A ) -> Self { match variant { IICIE_A :: _0 => false , IICIE_A :: _1 => true } } } # [ doc = "Reader of field `IICIE`" ] pub type IICIE_R = crate :: R < bool , IICIE_A > ; impl IICIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICIE_A { match self . bits { false => IICIE_A :: _0 , true => IICIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICIE_A :: _1 } } # [ doc = "Write proxy for field `IICIE`" ] pub struct IICIE_W < 'a > { w : & 'a mut W , } impl < 'a > IICIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICIE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "I2C Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IICEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IICEN_A ) -> Self { match variant { IICEN_A :: _0 => false , IICEN_A :: _1 => true } } } # [ doc = "Reader of field `IICEN`" ] pub type IICEN_R = crate :: R < bool , IICEN_A > ; impl IICEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICEN_A { match self . bits { false => IICEN_A :: _0 , true => IICEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICEN_A :: _1 } } # [ doc = "Write proxy for field `IICEN`" ] pub struct IICEN_W < 'a > { w : & 'a mut W , } impl < 'a > IICEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Enable" ] # [ inline ( always ) ] pub fn wuen ( & self ) -> WUEN_R { WUEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmit Acknowledge Enable" ] # [ inline ( always ) ] pub fn txak ( & self ) -> TXAK_R { TXAK_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Mode Select" ] # [ inline ( always ) ] pub fn tx ( & self ) -> TX_R { TX_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Master Mode Select" ] # [ inline ( always ) ] pub fn mst ( & self ) -> MST_R { MST_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C Interrupt Enable" ] # [ inline ( always ) ] pub fn iicie ( & self ) -> IICIE_R { IICIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - I2C Enable" ] # [ inline ( always ) ] pub fn iicen ( & self ) -> IICEN_R { IICEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bit 1 - Wakeup Enable" ] # [ inline ( always ) ] pub fn wuen ( & mut self ) -> WUEN_W { WUEN_W { w : self } } # [ doc = "Bit 2 - Repeat START" ] # [ inline ( always ) ] pub fn rsta ( & mut self ) -> RSTA_W { RSTA_W { w : self } } # [ doc = "Bit 3 - Transmit Acknowledge Enable" ] # [ inline ( always ) ] pub fn txak ( & mut self ) -> TXAK_W { TXAK_W { w : self } } # [ doc = "Bit 4 - Transmit Mode Select" ] # [ inline ( always ) ] pub fn tx ( & mut self ) -> TX_W { TX_W { w : self } } # [ doc = "Bit 5 - Master Mode Select" ] # [ inline ( always ) ] pub fn mst ( & mut self ) -> MST_W { MST_W { w : self } } # [ doc = "Bit 6 - I2C Interrupt Enable" ] # [ inline ( always ) ] pub fn iicie ( & mut self ) -> IICIE_W { IICIE_W { w : self } } # [ doc = "Bit 7 - I2C Enable" ] # [ inline ( always ) ] pub fn iicen ( & mut self ) -> IICEN_W { IICEN_W { w : self } } } } # [ doc = "I2C Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s](s) module" ] pub type S = crate :: Reg < u8 , _S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S ; # [ doc = "`read()` method returns [s::R](s::R) reader structure" ] impl crate :: Readable for S { } # [ doc = "`write(|w| ..)` method takes [s::W](s::W) writer structure" ] impl crate :: Writable for S { } # [ doc = "I2C Status register" ] pub mod s { # [ doc = "Reader of register S" ] pub type R = crate :: R < u8 , super :: S > ; # [ doc = "Writer for register S" ] pub type W = crate :: W < u8 , super :: S > ; # [ doc = "Register S `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: S { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Receive Acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXAK_A { # [ doc = "0: Acknowledge signal was received after the completion of one byte of data transmission on the bus" ] _0 , # [ doc = "1: No acknowledge signal detected" ] _1 } impl From < RXAK_A > for bool { # [ inline ( always ) ] fn from ( variant : RXAK_A ) -> Self { match variant { RXAK_A :: _0 => false , RXAK_A :: _1 => true } } } # [ doc = "Reader of field `RXAK`" ] pub type RXAK_R = crate :: R < bool , RXAK_A > ; impl RXAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXAK_A { match self . bits { false => RXAK_A :: _0 , true => RXAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXAK_A :: _1 } } # [ doc = "Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICIF_A { # [ doc = "0: No interrupt pending" ] _0 , # [ doc = "1: Interrupt pending" ] _1 } impl From < IICIF_A > for bool { # [ inline ( always ) ] fn from ( variant : IICIF_A ) -> Self { match variant { IICIF_A :: _0 => false , IICIF_A :: _1 => true } } } # [ doc = "Reader of field `IICIF`" ] pub type IICIF_R = crate :: R < bool , IICIF_A > ; impl IICIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICIF_A { match self . bits { false => IICIF_A :: _0 , true => IICIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICIF_A :: _1 } } # [ doc = "Write proxy for field `IICIF`" ] pub struct IICIF_W < 'a > { w : & 'a mut W , } impl < 'a > IICIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No interrupt pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICIF_A :: _0 ) } # [ doc = "Interrupt pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Slave Read/Write\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRW_A { # [ doc = "0: Slave receive, master writing to slave" ] _0 , # [ doc = "1: Slave transmit, master reading from slave" ] _1 } impl From < SRW_A > for bool { # [ inline ( always ) ] fn from ( variant : SRW_A ) -> Self { match variant { SRW_A :: _0 => false , SRW_A :: _1 => true } } } # [ doc = "Reader of field `SRW`" ] pub type SRW_R = crate :: R < bool , SRW_A > ; impl SRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRW_A { match self . bits { false => SRW_A :: _0 , true => SRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRW_A :: _1 } } # [ doc = "Range Address Match\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAM_A { # [ doc = "0: Not addressed" ] _0 , # [ doc = "1: Addressed as a slave" ] _1 } impl From < RAM_A > for bool { # [ inline ( always ) ] fn from ( variant : RAM_A ) -> Self { match variant { RAM_A :: _0 => false , RAM_A :: _1 => true } } } # [ doc = "Reader of field `RAM`" ] pub type RAM_R = crate :: R < bool , RAM_A > ; impl RAM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAM_A { match self . bits { false => RAM_A :: _0 , true => RAM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAM_A :: _1 } } # [ doc = "Write proxy for field `RAM`" ] pub struct RAM_W < 'a > { w : & 'a mut W , } impl < 'a > RAM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RAM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not addressed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RAM_A :: _0 ) } # [ doc = "Addressed as a slave" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RAM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Arbitration Lost\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ARBL_A { # [ doc = "0: Standard bus operation." ] _0 , # [ doc = "1: Loss of arbitration." ] _1 } impl From < ARBL_A > for bool { # [ inline ( always ) ] fn from ( variant : ARBL_A ) -> Self { match variant { ARBL_A :: _0 => false , ARBL_A :: _1 => true } } } # [ doc = "Reader of field `ARBL`" ] pub type ARBL_R = crate :: R < bool , ARBL_A > ; impl ARBL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ARBL_A { match self . bits { false => ARBL_A :: _0 , true => ARBL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ARBL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ARBL_A :: _1 } } # [ doc = "Write proxy for field `ARBL`" ] pub struct ARBL_W < 'a > { w : & 'a mut W , } impl < 'a > ARBL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ARBL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Standard bus operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ARBL_A :: _0 ) } # [ doc = "Loss of arbitration." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ARBL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Bus Busy\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUSY_A { # [ doc = "0: Bus is idle" ] _0 , # [ doc = "1: Bus is busy" ] _1 } impl From < BUSY_A > for bool { # [ inline ( always ) ] fn from ( variant : BUSY_A ) -> Self { match variant { BUSY_A :: _0 => false , BUSY_A :: _1 => true } } } # [ doc = "Reader of field `BUSY`" ] pub type BUSY_R = crate :: R < bool , BUSY_A > ; impl BUSY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUSY_A { match self . bits { false => BUSY_A :: _0 , true => BUSY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUSY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUSY_A :: _1 } } # [ doc = "Addressed As A Slave\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IAAS_A { # [ doc = "0: Not addressed" ] _0 , # [ doc = "1: Addressed as a slave" ] _1 } impl From < IAAS_A > for bool { # [ inline ( always ) ] fn from ( variant : IAAS_A ) -> Self { match variant { IAAS_A :: _0 => false , IAAS_A :: _1 => true } } } # [ doc = "Reader of field `IAAS`" ] pub type IAAS_R = crate :: R < bool , IAAS_A > ; impl IAAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IAAS_A { match self . bits { false => IAAS_A :: _0 , true => IAAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IAAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IAAS_A :: _1 } } # [ doc = "Write proxy for field `IAAS`" ] pub struct IAAS_W < 'a > { w : & 'a mut W , } impl < 'a > IAAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IAAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not addressed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IAAS_A :: _0 ) } # [ doc = "Addressed as a slave" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IAAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transfer Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_A { # [ doc = "0: Transfer in progress" ] _0 , # [ doc = "1: Transfer complete" ] _1 } impl From < TCF_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_A ) -> Self { match variant { TCF_A :: _0 => false , TCF_A :: _1 => true } } } # [ doc = "Reader of field `TCF`" ] pub type TCF_R = crate :: R < bool , TCF_A > ; impl TCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_A { match self . bits { false => TCF_A :: _0 , true => TCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_A :: _1 } } impl R { # [ doc = "Bit 0 - Receive Acknowledge" ] # [ inline ( always ) ] pub fn rxak ( & self ) -> RXAK_R { RXAK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Flag" ] # [ inline ( always ) ] pub fn iicif ( & self ) -> IICIF_R { IICIF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slave Read/Write" ] # [ inline ( always ) ] pub fn srw ( & self ) -> SRW_R { SRW_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Range Address Match" ] # [ inline ( always ) ] pub fn ram ( & self ) -> RAM_R { RAM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Arbitration Lost" ] # [ inline ( always ) ] pub fn arbl ( & self ) -> ARBL_R { ARBL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Bus Busy" ] # [ inline ( always ) ] pub fn busy ( & self ) -> BUSY_R { BUSY_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Addressed As A Slave" ] # [ inline ( always ) ] pub fn iaas ( & self ) -> IAAS_R { IAAS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & self ) -> TCF_R { TCF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Interrupt Flag" ] # [ inline ( always ) ] pub fn iicif ( & mut self ) -> IICIF_W { IICIF_W { w : self } } # [ doc = "Bit 3 - Range Address Match" ] # [ inline ( always ) ] pub fn ram ( & mut self ) -> RAM_W { RAM_W { w : self } } # [ doc = "Bit 4 - Arbitration Lost" ] # [ inline ( always ) ] pub fn arbl ( & mut self ) -> ARBL_W { ARBL_W { w : self } } # [ doc = "Bit 6 - Addressed As A Slave" ] # [ inline ( always ) ] pub fn iaas ( & mut self ) -> IAAS_W { IAAS_W { w : self } } } } # [ doc = "I2C Data I/O register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "I2C Data I/O register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA`" ] pub type DATA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "I2C Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "I2C Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AD`" ] pub type AD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `AD`" ] pub struct AD_W < 'a > { w : & 'a mut W , } impl < 'a > AD_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 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Range Address Matching Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RMEN_A { # [ doc = "0: Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers." ] _0 , # [ doc = "1: Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers." ] _1 } impl From < RMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : RMEN_A ) -> Self { match variant { RMEN_A :: _0 => false , RMEN_A :: _1 => true } } } # [ doc = "Reader of field `RMEN`" ] pub type RMEN_R = crate :: R < bool , RMEN_A > ; impl RMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RMEN_A { match self . bits { false => RMEN_A :: _0 , true => RMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RMEN_A :: _1 } } # [ doc = "Write proxy for field `RMEN`" ] pub struct RMEN_W < 'a > { w : & 'a mut W , } impl < 'a > RMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RMEN_A :: _0 ) } # [ doc = "Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RMEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Slave Baud Rate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBRC_A { # [ doc = "0: The slave baud rate follows the master baud rate and clock stretching may occur" ] _0 , # [ doc = "1: Slave baud rate is independent of the master baud rate" ] _1 } impl From < SBRC_A > for bool { # [ inline ( always ) ] fn from ( variant : SBRC_A ) -> Self { match variant { SBRC_A :: _0 => false , SBRC_A :: _1 => true } } } # [ doc = "Reader of field `SBRC`" ] pub type SBRC_R = crate :: R < bool , SBRC_A > ; impl SBRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBRC_A { match self . bits { false => SBRC_A :: _0 , true => SBRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBRC_A :: _1 } } # [ doc = "Write proxy for field `SBRC`" ] pub struct SBRC_W < 'a > { w : & 'a mut W , } impl < 'a > SBRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The slave baud rate follows the master baud rate and clock stretching may occur" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBRC_A :: _0 ) } # [ doc = "Slave baud rate is independent of the master baud rate" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBRC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "High Drive Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HDRS_A { # [ doc = "0: Normal drive mode" ] _0 , # [ doc = "1: High drive mode" ] _1 } impl From < HDRS_A > for bool { # [ inline ( always ) ] fn from ( variant : HDRS_A ) -> Self { match variant { HDRS_A :: _0 => false , HDRS_A :: _1 => true } } } # [ doc = "Reader of field `HDRS`" ] pub type HDRS_R = crate :: R < bool , HDRS_A > ; impl HDRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HDRS_A { match self . bits { false => HDRS_A :: _0 , true => HDRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HDRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HDRS_A :: _1 } } # [ doc = "Write proxy for field `HDRS`" ] pub struct HDRS_W < 'a > { w : & 'a mut W , } impl < 'a > HDRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HDRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal drive mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HDRS_A :: _0 ) } # [ doc = "High drive mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HDRS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Address Extension\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADEXT_A { # [ doc = "0: 7-bit address scheme" ] _0 , # [ doc = "1: 10-bit address scheme" ] _1 } impl From < ADEXT_A > for bool { # [ inline ( always ) ] fn from ( variant : ADEXT_A ) -> Self { match variant { ADEXT_A :: _0 => false , ADEXT_A :: _1 => true } } } # [ doc = "Reader of field `ADEXT`" ] pub type ADEXT_R = crate :: R < bool , ADEXT_A > ; impl ADEXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADEXT_A { match self . bits { false => ADEXT_A :: _0 , true => ADEXT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADEXT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADEXT_A :: _1 } } # [ doc = "Write proxy for field `ADEXT`" ] pub struct ADEXT_W < 'a > { w : & 'a mut W , } impl < 'a > ADEXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADEXT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "7-bit address scheme" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADEXT_A :: _0 ) } # [ doc = "10-bit address scheme" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADEXT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "General Call Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GCAEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < GCAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GCAEN_A ) -> Self { match variant { GCAEN_A :: _0 => false , GCAEN_A :: _1 => true } } } # [ doc = "Reader of field `GCAEN`" ] pub type GCAEN_R = crate :: R < bool , GCAEN_A > ; impl GCAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GCAEN_A { match self . bits { false => GCAEN_A :: _0 , true => GCAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GCAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GCAEN_A :: _1 } } # [ doc = "Write proxy for field `GCAEN`" ] pub struct GCAEN_W < 'a > { w : & 'a mut W , } impl < 'a > GCAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GCAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GCAEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GCAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Slave Address" ] # [ inline ( always ) ] pub fn ad ( & self ) -> AD_R { AD_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Range Address Matching Enable" ] # [ inline ( always ) ] pub fn rmen ( & self ) -> RMEN_R { RMEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Slave Baud Rate Control" ] # [ inline ( always ) ] pub fn sbrc ( & self ) -> SBRC_R { SBRC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - High Drive Select" ] # [ inline ( always ) ] pub fn hdrs ( & self ) -> HDRS_R { HDRS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Address Extension" ] # [ inline ( always ) ] pub fn adext ( & self ) -> ADEXT_R { ADEXT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - General Call Address Enable" ] # [ inline ( always ) ] pub fn gcaen ( & self ) -> GCAEN_R { GCAEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Slave Address" ] # [ inline ( always ) ] pub fn ad ( & mut self ) -> AD_W { AD_W { w : self } } # [ doc = "Bit 3 - Range Address Matching Enable" ] # [ inline ( always ) ] pub fn rmen ( & mut self ) -> RMEN_W { RMEN_W { w : self } } # [ doc = "Bit 4 - Slave Baud Rate Control" ] # [ inline ( always ) ] pub fn sbrc ( & mut self ) -> SBRC_W { SBRC_W { w : self } } # [ doc = "Bit 5 - High Drive Select" ] # [ inline ( always ) ] pub fn hdrs ( & mut self ) -> HDRS_W { HDRS_W { w : self } } # [ doc = "Bit 6 - Address Extension" ] # [ inline ( always ) ] pub fn adext ( & mut self ) -> ADEXT_W { ADEXT_W { w : self } } # [ doc = "Bit 7 - General Call Address Enable" ] # [ inline ( always ) ] pub fn gcaen ( & mut self ) -> GCAEN_W { GCAEN_W { w : self } } } } # [ doc = "I2C Programmable Input Glitch Filter Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [flt](flt) module" ] pub type FLT = crate :: Reg < u8 , _FLT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLT ; # [ doc = "`read()` method returns [flt::R](flt::R) reader structure" ] impl crate :: Readable for FLT { } # [ doc = "`write(|w| ..)` method takes [flt::W](flt::W) writer structure" ] impl crate :: Writable for FLT { } # [ doc = "I2C Programmable Input Glitch Filter Register" ] pub mod flt { # [ doc = "Reader of register FLT" ] pub type R = crate :: R < u8 , super :: FLT > ; # [ doc = "Writer for register FLT" ] pub type W = crate :: W < u8 , super :: FLT > ; # [ doc = "Register FLT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "I2C Programmable Filter Factor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT_A { # [ doc = "0: No filter/bypass" ] _0 } impl From < FLT_A > for u8 { # [ inline ( always ) ] fn from ( variant : FLT_A ) -> Self { match variant { FLT_A :: _0 => 0 } } } # [ doc = "Reader of field `FLT`" ] pub type FLT_R = crate :: R < u8 , FLT_A > ; impl FLT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FLT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FLT_A :: _0 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT_A :: _0 } } # [ doc = "Write proxy for field `FLT`" ] pub struct FLT_W < 'a > { w : & 'a mut W , } impl < 'a > FLT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No filter/bypass" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT_A :: _0 ) } # [ 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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "I2C Bus Start Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTF_A { # [ doc = "0: No start happens on I2C bus" ] _0 , # [ doc = "1: Start detected on I2C bus" ] _1 } impl From < STARTF_A > for bool { # [ inline ( always ) ] fn from ( variant : STARTF_A ) -> Self { match variant { STARTF_A :: _0 => false , STARTF_A :: _1 => true } } } # [ doc = "Reader of field `STARTF`" ] pub type STARTF_R = crate :: R < bool , STARTF_A > ; impl STARTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STARTF_A { match self . bits { false => STARTF_A :: _0 , true => STARTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STARTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STARTF_A :: _1 } } # [ doc = "Write proxy for field `STARTF`" ] pub struct STARTF_W < 'a > { w : & 'a mut W , } impl < 'a > STARTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STARTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No start happens on I2C bus" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STARTF_A :: _0 ) } # [ doc = "Start detected on I2C bus" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STARTF_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "I2C Bus Stop or Start Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SSIE_A { # [ doc = "0: Stop or start detection interrupt is disabled" ] _0 , # [ doc = "1: Stop or start detection interrupt is enabled" ] _1 } impl From < SSIE_A > for bool { # [ inline ( always ) ] fn from ( variant : SSIE_A ) -> Self { match variant { SSIE_A :: _0 => false , SSIE_A :: _1 => true } } } # [ doc = "Reader of field `SSIE`" ] pub type SSIE_R = crate :: R < bool , SSIE_A > ; impl SSIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SSIE_A { match self . bits { false => SSIE_A :: _0 , true => SSIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SSIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SSIE_A :: _1 } } # [ doc = "Write proxy for field `SSIE`" ] pub struct SSIE_W < 'a > { w : & 'a mut W , } impl < 'a > SSIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SSIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Stop or start detection interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SSIE_A :: _0 ) } # [ doc = "Stop or start detection interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SSIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "I2C Bus Stop Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPF_A { # [ doc = "0: No stop happens on I2C bus" ] _0 , # [ doc = "1: Stop detected on I2C bus" ] _1 } impl From < STOPF_A > for bool { # [ inline ( always ) ] fn from ( variant : STOPF_A ) -> Self { match variant { STOPF_A :: _0 => false , STOPF_A :: _1 => true } } } # [ doc = "Reader of field `STOPF`" ] pub type STOPF_R = crate :: R < bool , STOPF_A > ; impl STOPF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STOPF_A { match self . bits { false => STOPF_A :: _0 , true => STOPF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STOPF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STOPF_A :: _1 } } # [ doc = "Write proxy for field `STOPF`" ] pub struct STOPF_W < 'a > { w : & 'a mut W , } impl < 'a > STOPF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STOPF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No stop happens on I2C bus" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STOPF_A :: _0 ) } # [ doc = "Stop detected on I2C bus" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STOPF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Stop Hold Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHEN_A { # [ doc = "0: Stop holdoff is disabled. The MCU's entry to stop mode is not gated." ] _0 , # [ doc = "1: Stop holdoff is enabled." ] _1 } impl From < SHEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SHEN_A ) -> Self { match variant { SHEN_A :: _0 => false , SHEN_A :: _1 => true } } } # [ doc = "Reader of field `SHEN`" ] pub type SHEN_R = crate :: R < bool , SHEN_A > ; impl SHEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHEN_A { match self . bits { false => SHEN_A :: _0 , true => SHEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHEN_A :: _1 } } # [ doc = "Write proxy for field `SHEN`" ] pub struct SHEN_W < 'a > { w : & 'a mut W , } impl < 'a > SHEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Stop holdoff is disabled. The MCU's entry to stop mode is not gated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHEN_A :: _0 ) } # [ doc = "Stop holdoff is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - I2C Programmable Filter Factor" ] # [ inline ( always ) ] pub fn flt ( & self ) -> FLT_R { FLT_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bit 4 - I2C Bus Start Detect Flag" ] # [ inline ( always ) ] pub fn startf ( & self ) -> STARTF_R { STARTF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - I2C Bus Stop or Start Interrupt Enable" ] # [ inline ( always ) ] pub fn ssie ( & self ) -> SSIE_R { SSIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C Bus Stop Detect Flag" ] # [ inline ( always ) ] pub fn stopf ( & self ) -> STOPF_R { STOPF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Stop Hold Enable" ] # [ inline ( always ) ] pub fn shen ( & self ) -> SHEN_R { SHEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - I2C Programmable Filter Factor" ] # [ inline ( always ) ] pub fn flt ( & mut self ) -> FLT_W { FLT_W { w : self } } # [ doc = "Bit 4 - I2C Bus Start Detect Flag" ] # [ inline ( always ) ] pub fn startf ( & mut self ) -> STARTF_W { STARTF_W { w : self } } # [ doc = "Bit 5 - I2C Bus Stop or Start Interrupt Enable" ] # [ inline ( always ) ] pub fn ssie ( & mut self ) -> SSIE_W { SSIE_W { w : self } } # [ doc = "Bit 6 - I2C Bus Stop Detect Flag" ] # [ inline ( always ) ] pub fn stopf ( & mut self ) -> STOPF_W { STOPF_W { w : self } } # [ doc = "Bit 7 - Stop Hold Enable" ] # [ inline ( always ) ] pub fn shen ( & mut self ) -> SHEN_W { SHEN_W { w : self } } } } # [ doc = "I2C Range Address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ra](ra) module" ] pub type RA = crate :: Reg < u8 , _RA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RA ; # [ doc = "`read()` method returns [ra::R](ra::R) reader structure" ] impl crate :: Readable for RA { } # [ doc = "`write(|w| ..)` method takes [ra::W](ra::W) writer structure" ] impl crate :: Writable for RA { } # [ doc = "I2C Range Address register" ] pub mod ra { # [ doc = "Reader of register RA" ] pub type R = crate :: R < u8 , super :: RA > ; # [ doc = "Writer for register RA" ] pub type W = crate :: W < u8 , super :: RA > ; # [ doc = "Register RA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RA { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RAD`" ] pub type RAD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RAD`" ] pub struct RAD_W < 'a > { w : & 'a mut W , } impl < 'a > RAD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Range Slave Address" ] # [ inline ( always ) ] pub fn rad ( & self ) -> RAD_R { RAD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Range Slave Address" ] # [ inline ( always ) ] pub fn rad ( & mut self ) -> RAD_W { RAD_W { w : self } } } } # [ doc = "I2C SMBus Control and Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [smb](smb) module" ] pub type SMB = crate :: Reg < u8 , _SMB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SMB ; # [ doc = "`read()` method returns [smb::R](smb::R) reader structure" ] impl crate :: Readable for SMB { } # [ doc = "`write(|w| ..)` method takes [smb::W](smb::W) writer structure" ] impl crate :: Writable for SMB { } # [ doc = "I2C SMBus Control and Status register" ] pub mod smb { # [ doc = "Reader of register SMB" ] pub type R = crate :: R < u8 , super :: SMB > ; # [ doc = "Writer for register SMB" ] pub type W = crate :: W < u8 , super :: SMB > ; # [ doc = "Register SMB `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SMB { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "SHTF2 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF2IE_A { # [ doc = "0: SHTF2 interrupt is disabled" ] _0 , # [ doc = "1: SHTF2 interrupt is enabled" ] _1 } impl From < SHTF2IE_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF2IE_A ) -> Self { match variant { SHTF2IE_A :: _0 => false , SHTF2IE_A :: _1 => true } } } # [ doc = "Reader of field `SHTF2IE`" ] pub type SHTF2IE_R = crate :: R < bool , SHTF2IE_A > ; impl SHTF2IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF2IE_A { match self . bits { false => SHTF2IE_A :: _0 , true => SHTF2IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF2IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF2IE_A :: _1 } } # [ doc = "Write proxy for field `SHTF2IE`" ] pub struct SHTF2IE_W < 'a > { w : & 'a mut W , } impl < 'a > SHTF2IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHTF2IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SHTF2 interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHTF2IE_A :: _0 ) } # [ doc = "SHTF2 interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHTF2IE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "SCL High Timeout Flag 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF2_A { # [ doc = "0: No SCL high and SDA low timeout occurs" ] _0 , # [ doc = "1: SCL high and SDA low timeout occurs" ] _1 } impl From < SHTF2_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF2_A ) -> Self { match variant { SHTF2_A :: _0 => false , SHTF2_A :: _1 => true } } } # [ doc = "Reader of field `SHTF2`" ] pub type SHTF2_R = crate :: R < bool , SHTF2_A > ; impl SHTF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF2_A { match self . bits { false => SHTF2_A :: _0 , true => SHTF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF2_A :: _1 } } # [ doc = "Write proxy for field `SHTF2`" ] pub struct SHTF2_W < 'a > { w : & 'a mut W , } impl < 'a > SHTF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHTF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No SCL high and SDA low timeout occurs" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHTF2_A :: _0 ) } # [ doc = "SCL high and SDA low timeout occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHTF2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "SCL High Timeout Flag 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF1_A { # [ doc = "0: No SCL high and SDA high timeout occurs" ] _0 , # [ doc = "1: SCL high and SDA high timeout occurs" ] _1 } impl From < SHTF1_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF1_A ) -> Self { match variant { SHTF1_A :: _0 => false , SHTF1_A :: _1 => true } } } # [ doc = "Reader of field `SHTF1`" ] pub type SHTF1_R = crate :: R < bool , SHTF1_A > ; impl SHTF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF1_A { match self . bits { false => SHTF1_A :: _0 , true => SHTF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF1_A :: _1 } } # [ doc = "SCL Low Timeout Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLTF_A { # [ doc = "0: No low timeout occurs" ] _0 , # [ doc = "1: Low timeout occurs" ] _1 } impl From < SLTF_A > for bool { # [ inline ( always ) ] fn from ( variant : SLTF_A ) -> Self { match variant { SLTF_A :: _0 => false , SLTF_A :: _1 => true } } } # [ doc = "Reader of field `SLTF`" ] pub type SLTF_R = crate :: R < bool , SLTF_A > ; impl SLTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLTF_A { match self . bits { false => SLTF_A :: _0 , true => SLTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLTF_A :: _1 } } # [ doc = "Write proxy for field `SLTF`" ] pub struct SLTF_W < 'a > { w : & 'a mut W , } impl < 'a > SLTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No low timeout occurs" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLTF_A :: _0 ) } # [ doc = "Low timeout occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLTF_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Timeout Counter Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCKSEL_A { # [ doc = "0: Timeout counter counts at the frequency of the I2C module clock / 64" ] _0 , # [ doc = "1: Timeout counter counts at the frequency of the I2C module clock" ] _1 } impl From < TCKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TCKSEL_A ) -> Self { match variant { TCKSEL_A :: _0 => false , TCKSEL_A :: _1 => true } } } # [ doc = "Reader of field `TCKSEL`" ] pub type TCKSEL_R = crate :: R < bool , TCKSEL_A > ; impl TCKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCKSEL_A { match self . bits { false => TCKSEL_A :: _0 , true => TCKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCKSEL_A :: _1 } } # [ doc = "Write proxy for field `TCKSEL`" ] pub struct TCKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TCKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timeout counter counts at the frequency of the I2C module clock / 64" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCKSEL_A :: _0 ) } # [ doc = "Timeout counter counts at the frequency of the I2C module clock" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCKSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Second I2C Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SIICAEN_A { # [ doc = "0: I2C address register 2 matching is disabled" ] _0 , # [ doc = "1: I2C address register 2 matching is enabled" ] _1 } impl From < SIICAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SIICAEN_A ) -> Self { match variant { SIICAEN_A :: _0 => false , SIICAEN_A :: _1 => true } } } # [ doc = "Reader of field `SIICAEN`" ] pub type SIICAEN_R = crate :: R < bool , SIICAEN_A > ; impl SIICAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SIICAEN_A { match self . bits { false => SIICAEN_A :: _0 , true => SIICAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SIICAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SIICAEN_A :: _1 } } # [ doc = "Write proxy for field `SIICAEN`" ] pub struct SIICAEN_W < 'a > { w : & 'a mut W , } impl < 'a > SIICAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SIICAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "I2C address register 2 matching is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SIICAEN_A :: _0 ) } # [ doc = "I2C address register 2 matching is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SIICAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "SMBus Alert Response Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ALERTEN_A { # [ doc = "0: SMBus alert response address matching is disabled" ] _0 , # [ doc = "1: SMBus alert response address matching is enabled" ] _1 } impl From < ALERTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ALERTEN_A ) -> Self { match variant { ALERTEN_A :: _0 => false , ALERTEN_A :: _1 => true } } } # [ doc = "Reader of field `ALERTEN`" ] pub type ALERTEN_R = crate :: R < bool , ALERTEN_A > ; impl ALERTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ALERTEN_A { match self . bits { false => ALERTEN_A :: _0 , true => ALERTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ALERTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ALERTEN_A :: _1 } } # [ doc = "Write proxy for field `ALERTEN`" ] pub struct ALERTEN_W < 'a > { w : & 'a mut W , } impl < 'a > ALERTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ALERTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SMBus alert response address matching is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ALERTEN_A :: _0 ) } # [ doc = "SMBus alert response address matching is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ALERTEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Fast NACK/ACK Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FACK_A { # [ doc = "0: An ACK or NACK is sent on the following receiving data byte" ] _0 , # [ doc = "1: Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK." ] _1 } impl From < FACK_A > for bool { # [ inline ( always ) ] fn from ( variant : FACK_A ) -> Self { match variant { FACK_A :: _0 => false , FACK_A :: _1 => true } } } # [ doc = "Reader of field `FACK`" ] pub type FACK_R = crate :: R < bool , FACK_A > ; impl FACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FACK_A { match self . bits { false => FACK_A :: _0 , true => FACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FACK_A :: _1 } } # [ doc = "Write proxy for field `FACK`" ] pub struct FACK_W < 'a > { w : & 'a mut W , } impl < 'a > FACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FACK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An ACK or NACK is sent on the following receiving data byte" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FACK_A :: _0 ) } # [ doc = "Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FACK_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - SHTF2 Interrupt Enable" ] # [ inline ( always ) ] pub fn shtf2ie ( & self ) -> SHTF2IE_R { SHTF2IE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - SCL High Timeout Flag 2" ] # [ inline ( always ) ] pub fn shtf2 ( & self ) -> SHTF2_R { SHTF2_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - SCL High Timeout Flag 1" ] # [ inline ( always ) ] pub fn shtf1 ( & self ) -> SHTF1_R { SHTF1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - SCL Low Timeout Flag" ] # [ inline ( always ) ] pub fn sltf ( & self ) -> SLTF_R { SLTF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Timeout Counter Clock Select" ] # [ inline ( always ) ] pub fn tcksel ( & self ) -> TCKSEL_R { TCKSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Second I2C Address Enable" ] # [ inline ( always ) ] pub fn siicaen ( & self ) -> SIICAEN_R { SIICAEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - SMBus Alert Response Address Enable" ] # [ inline ( always ) ] pub fn alerten ( & self ) -> ALERTEN_R { ALERTEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fast NACK/ACK Enable" ] # [ inline ( always ) ] pub fn fack ( & self ) -> FACK_R { FACK_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - SHTF2 Interrupt Enable" ] # [ inline ( always ) ] pub fn shtf2ie ( & mut self ) -> SHTF2IE_W { SHTF2IE_W { w : self } } # [ doc = "Bit 1 - SCL High Timeout Flag 2" ] # [ inline ( always ) ] pub fn shtf2 ( & mut self ) -> SHTF2_W { SHTF2_W { w : self } } # [ doc = "Bit 3 - SCL Low Timeout Flag" ] # [ inline ( always ) ] pub fn sltf ( & mut self ) -> SLTF_W { SLTF_W { w : self } } # [ doc = "Bit 4 - Timeout Counter Clock Select" ] # [ inline ( always ) ] pub fn tcksel ( & mut self ) -> TCKSEL_W { TCKSEL_W { w : self } } # [ doc = "Bit 5 - Second I2C Address Enable" ] # [ inline ( always ) ] pub fn siicaen ( & mut self ) -> SIICAEN_W { SIICAEN_W { w : self } } # [ doc = "Bit 6 - SMBus Alert Response Address Enable" ] # [ inline ( always ) ] pub fn alerten ( & mut self ) -> ALERTEN_W { ALERTEN_W { w : self } } # [ doc = "Bit 7 - Fast NACK/ACK Enable" ] # [ inline ( always ) ] pub fn fack ( & mut self ) -> FACK_W { FACK_W { w : self } } } } # [ doc = "I2C Address Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [a2](a2) module" ] pub type A2 = crate :: Reg < u8 , _A2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _A2 ; # [ doc = "`read()` method returns [a2::R](a2::R) reader structure" ] impl crate :: Readable for A2 { } # [ doc = "`write(|w| ..)` method takes [a2::W](a2::W) writer structure" ] impl crate :: Writable for A2 { } # [ doc = "I2C Address Register 2" ] pub mod a2 { # [ doc = "Reader of register A2" ] pub type R = crate :: R < u8 , super :: A2 > ; # [ doc = "Writer for register A2" ] pub type W = crate :: W < u8 , super :: A2 > ; # [ doc = "Register A2 `reset()`'s with value 0xc2" ] impl crate :: ResetValue for super :: A2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc2 } } # [ doc = "Reader of field `SAD`" ] pub type SAD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SAD`" ] pub struct SAD_W < 'a > { w : & 'a mut W , } impl < 'a > SAD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - SMBus Address" ] # [ inline ( always ) ] pub fn sad ( & self ) -> SAD_R { SAD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - SMBus Address" ] # [ inline ( always ) ] pub fn sad ( & mut self ) -> SAD_W { SAD_W { w : self } } } } # [ doc = "I2C SCL Low Timeout Register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [slth](slth) module" ] pub type SLTH = crate :: Reg < u8 , _SLTH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SLTH ; # [ doc = "`read()` method returns [slth::R](slth::R) reader structure" ] impl crate :: Readable for SLTH { } # [ doc = "`write(|w| ..)` method takes [slth::W](slth::W) writer structure" ] impl crate :: Writable for SLTH { } # [ doc = "I2C SCL Low Timeout Register High" ] pub mod slth { # [ doc = "Reader of register SLTH" ] pub type R = crate :: R < u8 , super :: SLTH > ; # [ doc = "Writer for register SLTH" ] pub type W = crate :: W < u8 , super :: SLTH > ; # [ doc = "Register SLTH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SLTH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SSLT`" ] pub type SSLT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SSLT`" ] pub struct SSLT_W < 'a > { w : & 'a mut W , } impl < 'a > SSLT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SSLT\\[15:8\\]" ] # [ inline ( always ) ] pub fn sslt ( & self ) -> SSLT_R { SSLT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SSLT\\[15:8\\]" ] # [ inline ( always ) ] pub fn sslt ( & mut self ) -> SSLT_W { SSLT_W { w : self } } } } # [ doc = "I2C SCL Low Timeout Register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sltl](sltl) module" ] pub type SLTL = crate :: Reg < u8 , _SLTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SLTL ; # [ doc = "`read()` method returns [sltl::R](sltl::R) reader structure" ] impl crate :: Readable for SLTL { } # [ doc = "`write(|w| ..)` method takes [sltl::W](sltl::W) writer structure" ] impl crate :: Writable for SLTL { } # [ doc = "I2C SCL Low Timeout Register Low" ] pub mod sltl { # [ doc = "Reader of register SLTL" ] pub type R = crate :: R < u8 , super :: SLTL > ; # [ doc = "Writer for register SLTL" ] pub type W = crate :: W < u8 , super :: SLTL > ; # [ doc = "Register SLTL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SLTL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SSLT`" ] pub type SSLT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SSLT`" ] pub struct SSLT_W < 'a > { w : & 'a mut W , } impl < 'a > SSLT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SSLT\\[7:0\\]" ] # [ inline ( always ) ] pub fn sslt ( & self ) -> SSLT_R { SSLT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SSLT\\[7:0\\]" ] # [ inline ( always ) ] pub fn sslt ( & mut self ) -> SSLT_W { SSLT_W { w : self } } } } } # [ doc = "Inter-Integrated Circuit" ] pub struct I2C1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for I2C1 { } impl I2C1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const i2c1 :: RegisterBlock { 0x4006_7000 as * const _ } } impl Deref for I2C1 { type Target = i2c1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * I2C1 :: ptr ( ) } } } # [ doc = "Inter-Integrated Circuit" ] pub mod i2c1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - I2C Address Register 1" ] pub a1 : A1 , # [ doc = "0x01 - I2C Frequency Divider register" ] pub f : F , # [ doc = "0x02 - I2C Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - I2C Status register" ] pub s : S , # [ doc = "0x04 - I2C Data I/O register" ] pub d : D , # [ doc = "0x05 - I2C Control Register 2" ] pub c2 : C2 , # [ doc = "0x06 - I2C Programmable Input Glitch Filter Register" ] pub flt : FLT , # [ doc = "0x07 - I2C Range Address register" ] pub ra : RA , # [ doc = "0x08 - I2C SMBus Control and Status register" ] pub smb : SMB , # [ doc = "0x09 - I2C Address Register 2" ] pub a2 : A2 , # [ doc = "0x0a - I2C SCL Low Timeout Register High" ] pub slth : SLTH , # [ doc = "0x0b - I2C SCL Low Timeout Register Low" ] pub sltl : SLTL , } # [ doc = "I2C Address Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [a1](a1) module" ] pub type A1 = crate :: Reg < u8 , _A1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _A1 ; # [ doc = "`read()` method returns [a1::R](a1::R) reader structure" ] impl crate :: Readable for A1 { } # [ doc = "`write(|w| ..)` method takes [a1::W](a1::W) writer structure" ] impl crate :: Writable for A1 { } # [ doc = "I2C Address Register 1" ] pub mod a1 { # [ doc = "Reader of register A1" ] pub type R = crate :: R < u8 , super :: A1 > ; # [ doc = "Writer for register A1" ] pub type W = crate :: W < u8 , super :: A1 > ; # [ doc = "Register A1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: A1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AD`" ] pub type AD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `AD`" ] pub struct AD_W < 'a > { w : & 'a mut W , } impl < 'a > AD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Address" ] # [ inline ( always ) ] pub fn ad ( & self ) -> AD_R { AD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Address" ] # [ inline ( always ) ] pub fn ad ( & mut self ) -> AD_W { AD_W { w : self } } } } # [ doc = "I2C Frequency Divider register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f](f) module" ] pub type F = crate :: Reg < u8 , _F > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _F ; # [ doc = "`read()` method returns [f::R](f::R) reader structure" ] impl crate :: Readable for F { } # [ doc = "`write(|w| ..)` method takes [f::W](f::W) writer structure" ] impl crate :: Writable for F { } # [ doc = "I2C Frequency Divider register" ] pub mod f { # [ doc = "Reader of register F" ] pub type R = crate :: R < u8 , super :: F > ; # [ doc = "Writer for register F" ] pub type W = crate :: W < u8 , super :: F > ; # [ doc = "Register F `reset()`'s with value 0" ] impl crate :: ResetValue for super :: F { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ICR`" ] pub type ICR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ICR`" ] pub struct ICR_W < 'a > { w : & 'a mut W , } impl < 'a > ICR_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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Multiplier Factor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MULT_A { # [ doc = "0: mul = 1" ] _00 , # [ doc = "1: mul = 2" ] _01 , # [ doc = "2: mul = 4" ] _10 } impl From < MULT_A > for u8 { # [ inline ( always ) ] fn from ( variant : MULT_A ) -> Self { match variant { MULT_A :: _00 => 0 , MULT_A :: _01 => 1 , MULT_A :: _10 => 2 } } } # [ doc = "Reader of field `MULT`" ] pub type MULT_R = crate :: R < u8 , MULT_A > ; impl MULT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , MULT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( MULT_A :: _00 ) , 1 => Val ( MULT_A :: _01 ) , 2 => Val ( MULT_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MULT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MULT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MULT_A :: _10 } } # [ doc = "Write proxy for field `MULT`" ] pub struct MULT_W < 'a > { w : & 'a mut W , } impl < 'a > MULT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MULT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "mul = 1" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _00 ) } # [ doc = "mul = 2" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _01 ) } # [ doc = "mul = 4" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _10 ) } # [ 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 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - ClockRate" ] # [ inline ( always ) ] pub fn icr ( & self ) -> ICR_R { ICR_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 6:7 - Multiplier Factor" ] # [ inline ( always ) ] pub fn mult ( & self ) -> MULT_R { MULT_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - ClockRate" ] # [ inline ( always ) ] pub fn icr ( & mut self ) -> ICR_W { ICR_W { w : self } } # [ doc = "Bits 6:7 - Multiplier Factor" ] # [ inline ( always ) ] pub fn mult ( & mut self ) -> MULT_W { MULT_W { w : self } } } } # [ doc = "I2C Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "I2C Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: All DMA signalling disabled." ] _0 , # [ doc = "1: DMA transfer is enabled. While SMB\\[FACK\\] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S\\[IAAS\\] and S\\[TCF\\] are set. If the direction of transfer is known from master to slave, then it is not required to check S\\[SRW\\]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All DMA signalling disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA transfer is enabled. While SMB\\[FACK\\] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S\\[IAAS\\] and S\\[TCF\\] are set. If the direction of transfer is known from master to slave, then it is not required to check S\\[SRW\\]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUEN_A { # [ doc = "0: Normal operation. No interrupt generated when address matching in low power mode." ] _0 , # [ doc = "1: Enables the wakeup function in low power mode." ] _1 } impl From < WUEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WUEN_A ) -> Self { match variant { WUEN_A :: _0 => false , WUEN_A :: _1 => true } } } # [ doc = "Reader of field `WUEN`" ] pub type WUEN_R = crate :: R < bool , WUEN_A > ; impl WUEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUEN_A { match self . bits { false => WUEN_A :: _0 , true => WUEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUEN_A :: _1 } } # [ doc = "Write proxy for field `WUEN`" ] pub struct WUEN_W < 'a > { w : & 'a mut W , } impl < 'a > WUEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation. No interrupt generated when address matching in low power mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUEN_A :: _0 ) } # [ doc = "Enables the wakeup function in low power mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Write proxy for field `RSTA`" ] pub struct RSTA_W < 'a > { w : & 'a mut W , } impl < 'a > RSTA_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmit Acknowledge Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXAK_A { # [ doc = "0: An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set)." ] _0 , # [ doc = "1: No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set)." ] _1 } impl From < TXAK_A > for bool { # [ inline ( always ) ] fn from ( variant : TXAK_A ) -> Self { match variant { TXAK_A :: _0 => false , TXAK_A :: _1 => true } } } # [ doc = "Reader of field `TXAK`" ] pub type TXAK_R = crate :: R < bool , TXAK_A > ; impl TXAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXAK_A { match self . bits { false => TXAK_A :: _0 , true => TXAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXAK_A :: _1 } } # [ doc = "Write proxy for field `TXAK`" ] pub struct TXAK_W < 'a > { w : & 'a mut W , } impl < 'a > TXAK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXAK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXAK_A :: _0 ) } # [ doc = "No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXAK_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TX_A { # [ doc = "0: Receive" ] _0 , # [ doc = "1: Transmit" ] _1 } impl From < TX_A > for bool { # [ inline ( always ) ] fn from ( variant : TX_A ) -> Self { match variant { TX_A :: _0 => false , TX_A :: _1 => true } } } # [ doc = "Reader of field `TX`" ] pub type TX_R = crate :: R < bool , TX_A > ; impl TX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TX_A { match self . bits { false => TX_A :: _0 , true => TX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TX_A :: _1 } } # [ doc = "Write proxy for field `TX`" ] pub struct TX_W < 'a > { w : & 'a mut W , } impl < 'a > TX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TX_A :: _0 ) } # [ doc = "Transmit" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TX_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Master Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MST_A { # [ doc = "0: Slave mode" ] _0 , # [ doc = "1: Master mode" ] _1 } impl From < MST_A > for bool { # [ inline ( always ) ] fn from ( variant : MST_A ) -> Self { match variant { MST_A :: _0 => false , MST_A :: _1 => true } } } # [ doc = "Reader of field `MST`" ] pub type MST_R = crate :: R < bool , MST_A > ; impl MST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MST_A { match self . bits { false => MST_A :: _0 , true => MST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MST_A :: _1 } } # [ doc = "Write proxy for field `MST`" ] pub struct MST_W < 'a > { w : & 'a mut W , } impl < 'a > MST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Slave mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MST_A :: _0 ) } # [ doc = "Master mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MST_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "I2C Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICIE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IICIE_A > for bool { # [ inline ( always ) ] fn from ( variant : IICIE_A ) -> Self { match variant { IICIE_A :: _0 => false , IICIE_A :: _1 => true } } } # [ doc = "Reader of field `IICIE`" ] pub type IICIE_R = crate :: R < bool , IICIE_A > ; impl IICIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICIE_A { match self . bits { false => IICIE_A :: _0 , true => IICIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICIE_A :: _1 } } # [ doc = "Write proxy for field `IICIE`" ] pub struct IICIE_W < 'a > { w : & 'a mut W , } impl < 'a > IICIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICIE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "I2C Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IICEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IICEN_A ) -> Self { match variant { IICEN_A :: _0 => false , IICEN_A :: _1 => true } } } # [ doc = "Reader of field `IICEN`" ] pub type IICEN_R = crate :: R < bool , IICEN_A > ; impl IICEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICEN_A { match self . bits { false => IICEN_A :: _0 , true => IICEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICEN_A :: _1 } } # [ doc = "Write proxy for field `IICEN`" ] pub struct IICEN_W < 'a > { w : & 'a mut W , } impl < 'a > IICEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Enable" ] # [ inline ( always ) ] pub fn wuen ( & self ) -> WUEN_R { WUEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmit Acknowledge Enable" ] # [ inline ( always ) ] pub fn txak ( & self ) -> TXAK_R { TXAK_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Mode Select" ] # [ inline ( always ) ] pub fn tx ( & self ) -> TX_R { TX_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Master Mode Select" ] # [ inline ( always ) ] pub fn mst ( & self ) -> MST_R { MST_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C Interrupt Enable" ] # [ inline ( always ) ] pub fn iicie ( & self ) -> IICIE_R { IICIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - I2C Enable" ] # [ inline ( always ) ] pub fn iicen ( & self ) -> IICEN_R { IICEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bit 1 - Wakeup Enable" ] # [ inline ( always ) ] pub fn wuen ( & mut self ) -> WUEN_W { WUEN_W { w : self } } # [ doc = "Bit 2 - Repeat START" ] # [ inline ( always ) ] pub fn rsta ( & mut self ) -> RSTA_W { RSTA_W { w : self } } # [ doc = "Bit 3 - Transmit Acknowledge Enable" ] # [ inline ( always ) ] pub fn txak ( & mut self ) -> TXAK_W { TXAK_W { w : self } } # [ doc = "Bit 4 - Transmit Mode Select" ] # [ inline ( always ) ] pub fn tx ( & mut self ) -> TX_W { TX_W { w : self } } # [ doc = "Bit 5 - Master Mode Select" ] # [ inline ( always ) ] pub fn mst ( & mut self ) -> MST_W { MST_W { w : self } } # [ doc = "Bit 6 - I2C Interrupt Enable" ] # [ inline ( always ) ] pub fn iicie ( & mut self ) -> IICIE_W { IICIE_W { w : self } } # [ doc = "Bit 7 - I2C Enable" ] # [ inline ( always ) ] pub fn iicen ( & mut self ) -> IICEN_W { IICEN_W { w : self } } } } # [ doc = "I2C Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s](s) module" ] pub type S = crate :: Reg < u8 , _S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S ; # [ doc = "`read()` method returns [s::R](s::R) reader structure" ] impl crate :: Readable for S { } # [ doc = "`write(|w| ..)` method takes [s::W](s::W) writer structure" ] impl crate :: Writable for S { } # [ doc = "I2C Status register" ] pub mod s { # [ doc = "Reader of register S" ] pub type R = crate :: R < u8 , super :: S > ; # [ doc = "Writer for register S" ] pub type W = crate :: W < u8 , super :: S > ; # [ doc = "Register S `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: S { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Receive Acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXAK_A { # [ doc = "0: Acknowledge signal was received after the completion of one byte of data transmission on the bus" ] _0 , # [ doc = "1: No acknowledge signal detected" ] _1 } impl From < RXAK_A > for bool { # [ inline ( always ) ] fn from ( variant : RXAK_A ) -> Self { match variant { RXAK_A :: _0 => false , RXAK_A :: _1 => true } } } # [ doc = "Reader of field `RXAK`" ] pub type RXAK_R = crate :: R < bool , RXAK_A > ; impl RXAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXAK_A { match self . bits { false => RXAK_A :: _0 , true => RXAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXAK_A :: _1 } } # [ doc = "Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICIF_A { # [ doc = "0: No interrupt pending" ] _0 , # [ doc = "1: Interrupt pending" ] _1 } impl From < IICIF_A > for bool { # [ inline ( always ) ] fn from ( variant : IICIF_A ) -> Self { match variant { IICIF_A :: _0 => false , IICIF_A :: _1 => true } } } # [ doc = "Reader of field `IICIF`" ] pub type IICIF_R = crate :: R < bool , IICIF_A > ; impl IICIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICIF_A { match self . bits { false => IICIF_A :: _0 , true => IICIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICIF_A :: _1 } } # [ doc = "Write proxy for field `IICIF`" ] pub struct IICIF_W < 'a > { w : & 'a mut W , } impl < 'a > IICIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No interrupt pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICIF_A :: _0 ) } # [ doc = "Interrupt pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Slave Read/Write\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRW_A { # [ doc = "0: Slave receive, master writing to slave" ] _0 , # [ doc = "1: Slave transmit, master reading from slave" ] _1 } impl From < SRW_A > for bool { # [ inline ( always ) ] fn from ( variant : SRW_A ) -> Self { match variant { SRW_A :: _0 => false , SRW_A :: _1 => true } } } # [ doc = "Reader of field `SRW`" ] pub type SRW_R = crate :: R < bool , SRW_A > ; impl SRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRW_A { match self . bits { false => SRW_A :: _0 , true => SRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRW_A :: _1 } } # [ doc = "Range Address Match\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAM_A { # [ doc = "0: Not addressed" ] _0 , # [ doc = "1: Addressed as a slave" ] _1 } impl From < RAM_A > for bool { # [ inline ( always ) ] fn from ( variant : RAM_A ) -> Self { match variant { RAM_A :: _0 => false , RAM_A :: _1 => true } } } # [ doc = "Reader of field `RAM`" ] pub type RAM_R = crate :: R < bool , RAM_A > ; impl RAM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAM_A { match self . bits { false => RAM_A :: _0 , true => RAM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAM_A :: _1 } } # [ doc = "Write proxy for field `RAM`" ] pub struct RAM_W < 'a > { w : & 'a mut W , } impl < 'a > RAM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RAM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not addressed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RAM_A :: _0 ) } # [ doc = "Addressed as a slave" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RAM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Arbitration Lost\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ARBL_A { # [ doc = "0: Standard bus operation." ] _0 , # [ doc = "1: Loss of arbitration." ] _1 } impl From < ARBL_A > for bool { # [ inline ( always ) ] fn from ( variant : ARBL_A ) -> Self { match variant { ARBL_A :: _0 => false , ARBL_A :: _1 => true } } } # [ doc = "Reader of field `ARBL`" ] pub type ARBL_R = crate :: R < bool , ARBL_A > ; impl ARBL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ARBL_A { match self . bits { false => ARBL_A :: _0 , true => ARBL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ARBL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ARBL_A :: _1 } } # [ doc = "Write proxy for field `ARBL`" ] pub struct ARBL_W < 'a > { w : & 'a mut W , } impl < 'a > ARBL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ARBL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Standard bus operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ARBL_A :: _0 ) } # [ doc = "Loss of arbitration." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ARBL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Bus Busy\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUSY_A { # [ doc = "0: Bus is idle" ] _0 , # [ doc = "1: Bus is busy" ] _1 } impl From < BUSY_A > for bool { # [ inline ( always ) ] fn from ( variant : BUSY_A ) -> Self { match variant { BUSY_A :: _0 => false , BUSY_A :: _1 => true } } } # [ doc = "Reader of field `BUSY`" ] pub type BUSY_R = crate :: R < bool , BUSY_A > ; impl BUSY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUSY_A { match self . bits { false => BUSY_A :: _0 , true => BUSY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUSY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUSY_A :: _1 } } # [ doc = "Addressed As A Slave\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IAAS_A { # [ doc = "0: Not addressed" ] _0 , # [ doc = "1: Addressed as a slave" ] _1 } impl From < IAAS_A > for bool { # [ inline ( always ) ] fn from ( variant : IAAS_A ) -> Self { match variant { IAAS_A :: _0 => false , IAAS_A :: _1 => true } } } # [ doc = "Reader of field `IAAS`" ] pub type IAAS_R = crate :: R < bool , IAAS_A > ; impl IAAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IAAS_A { match self . bits { false => IAAS_A :: _0 , true => IAAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IAAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IAAS_A :: _1 } } # [ doc = "Write proxy for field `IAAS`" ] pub struct IAAS_W < 'a > { w : & 'a mut W , } impl < 'a > IAAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IAAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not addressed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IAAS_A :: _0 ) } # [ doc = "Addressed as a slave" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IAAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transfer Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_A { # [ doc = "0: Transfer in progress" ] _0 , # [ doc = "1: Transfer complete" ] _1 } impl From < TCF_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_A ) -> Self { match variant { TCF_A :: _0 => false , TCF_A :: _1 => true } } } # [ doc = "Reader of field `TCF`" ] pub type TCF_R = crate :: R < bool , TCF_A > ; impl TCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_A { match self . bits { false => TCF_A :: _0 , true => TCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_A :: _1 } } impl R { # [ doc = "Bit 0 - Receive Acknowledge" ] # [ inline ( always ) ] pub fn rxak ( & self ) -> RXAK_R { RXAK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Flag" ] # [ inline ( always ) ] pub fn iicif ( & self ) -> IICIF_R { IICIF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slave Read/Write" ] # [ inline ( always ) ] pub fn srw ( & self ) -> SRW_R { SRW_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Range Address Match" ] # [ inline ( always ) ] pub fn ram ( & self ) -> RAM_R { RAM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Arbitration Lost" ] # [ inline ( always ) ] pub fn arbl ( & self ) -> ARBL_R { ARBL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Bus Busy" ] # [ inline ( always ) ] pub fn busy ( & self ) -> BUSY_R { BUSY_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Addressed As A Slave" ] # [ inline ( always ) ] pub fn iaas ( & self ) -> IAAS_R { IAAS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & self ) -> TCF_R { TCF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Interrupt Flag" ] # [ inline ( always ) ] pub fn iicif ( & mut self ) -> IICIF_W { IICIF_W { w : self } } # [ doc = "Bit 3 - Range Address Match" ] # [ inline ( always ) ] pub fn ram ( & mut self ) -> RAM_W { RAM_W { w : self } } # [ doc = "Bit 4 - Arbitration Lost" ] # [ inline ( always ) ] pub fn arbl ( & mut self ) -> ARBL_W { ARBL_W { w : self } } # [ doc = "Bit 6 - Addressed As A Slave" ] # [ inline ( always ) ] pub fn iaas ( & mut self ) -> IAAS_W { IAAS_W { w : self } } } } # [ doc = "I2C Data I/O register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "I2C Data I/O register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA`" ] pub type DATA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "I2C Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "I2C Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AD`" ] pub type AD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `AD`" ] pub struct AD_W < 'a > { w : & 'a mut W , } impl < 'a > AD_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 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Range Address Matching Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RMEN_A { # [ doc = "0: Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers." ] _0 , # [ doc = "1: Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers." ] _1 } impl From < RMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : RMEN_A ) -> Self { match variant { RMEN_A :: _0 => false , RMEN_A :: _1 => true } } } # [ doc = "Reader of field `RMEN`" ] pub type RMEN_R = crate :: R < bool , RMEN_A > ; impl RMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RMEN_A { match self . bits { false => RMEN_A :: _0 , true => RMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RMEN_A :: _1 } } # [ doc = "Write proxy for field `RMEN`" ] pub struct RMEN_W < 'a > { w : & 'a mut W , } impl < 'a > RMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RMEN_A :: _0 ) } # [ doc = "Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RMEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Slave Baud Rate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBRC_A { # [ doc = "0: The slave baud rate follows the master baud rate and clock stretching may occur" ] _0 , # [ doc = "1: Slave baud rate is independent of the master baud rate" ] _1 } impl From < SBRC_A > for bool { # [ inline ( always ) ] fn from ( variant : SBRC_A ) -> Self { match variant { SBRC_A :: _0 => false , SBRC_A :: _1 => true } } } # [ doc = "Reader of field `SBRC`" ] pub type SBRC_R = crate :: R < bool , SBRC_A > ; impl SBRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBRC_A { match self . bits { false => SBRC_A :: _0 , true => SBRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBRC_A :: _1 } } # [ doc = "Write proxy for field `SBRC`" ] pub struct SBRC_W < 'a > { w : & 'a mut W , } impl < 'a > SBRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The slave baud rate follows the master baud rate and clock stretching may occur" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBRC_A :: _0 ) } # [ doc = "Slave baud rate is independent of the master baud rate" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBRC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "High Drive Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HDRS_A { # [ doc = "0: Normal drive mode" ] _0 , # [ doc = "1: High drive mode" ] _1 } impl From < HDRS_A > for bool { # [ inline ( always ) ] fn from ( variant : HDRS_A ) -> Self { match variant { HDRS_A :: _0 => false , HDRS_A :: _1 => true } } } # [ doc = "Reader of field `HDRS`" ] pub type HDRS_R = crate :: R < bool , HDRS_A > ; impl HDRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HDRS_A { match self . bits { false => HDRS_A :: _0 , true => HDRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HDRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HDRS_A :: _1 } } # [ doc = "Write proxy for field `HDRS`" ] pub struct HDRS_W < 'a > { w : & 'a mut W , } impl < 'a > HDRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HDRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal drive mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HDRS_A :: _0 ) } # [ doc = "High drive mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HDRS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Address Extension\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADEXT_A { # [ doc = "0: 7-bit address scheme" ] _0 , # [ doc = "1: 10-bit address scheme" ] _1 } impl From < ADEXT_A > for bool { # [ inline ( always ) ] fn from ( variant : ADEXT_A ) -> Self { match variant { ADEXT_A :: _0 => false , ADEXT_A :: _1 => true } } } # [ doc = "Reader of field `ADEXT`" ] pub type ADEXT_R = crate :: R < bool , ADEXT_A > ; impl ADEXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADEXT_A { match self . bits { false => ADEXT_A :: _0 , true => ADEXT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADEXT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADEXT_A :: _1 } } # [ doc = "Write proxy for field `ADEXT`" ] pub struct ADEXT_W < 'a > { w : & 'a mut W , } impl < 'a > ADEXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADEXT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "7-bit address scheme" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADEXT_A :: _0 ) } # [ doc = "10-bit address scheme" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADEXT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "General Call Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GCAEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < GCAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GCAEN_A ) -> Self { match variant { GCAEN_A :: _0 => false , GCAEN_A :: _1 => true } } } # [ doc = "Reader of field `GCAEN`" ] pub type GCAEN_R = crate :: R < bool , GCAEN_A > ; impl GCAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GCAEN_A { match self . bits { false => GCAEN_A :: _0 , true => GCAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GCAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GCAEN_A :: _1 } } # [ doc = "Write proxy for field `GCAEN`" ] pub struct GCAEN_W < 'a > { w : & 'a mut W , } impl < 'a > GCAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GCAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GCAEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GCAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Slave Address" ] # [ inline ( always ) ] pub fn ad ( & self ) -> AD_R { AD_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Range Address Matching Enable" ] # [ inline ( always ) ] pub fn rmen ( & self ) -> RMEN_R { RMEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Slave Baud Rate Control" ] # [ inline ( always ) ] pub fn sbrc ( & self ) -> SBRC_R { SBRC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - High Drive Select" ] # [ inline ( always ) ] pub fn hdrs ( & self ) -> HDRS_R { HDRS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Address Extension" ] # [ inline ( always ) ] pub fn adext ( & self ) -> ADEXT_R { ADEXT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - General Call Address Enable" ] # [ inline ( always ) ] pub fn gcaen ( & self ) -> GCAEN_R { GCAEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Slave Address" ] # [ inline ( always ) ] pub fn ad ( & mut self ) -> AD_W { AD_W { w : self } } # [ doc = "Bit 3 - Range Address Matching Enable" ] # [ inline ( always ) ] pub fn rmen ( & mut self ) -> RMEN_W { RMEN_W { w : self } } # [ doc = "Bit 4 - Slave Baud Rate Control" ] # [ inline ( always ) ] pub fn sbrc ( & mut self ) -> SBRC_W { SBRC_W { w : self } } # [ doc = "Bit 5 - High Drive Select" ] # [ inline ( always ) ] pub fn hdrs ( & mut self ) -> HDRS_W { HDRS_W { w : self } } # [ doc = "Bit 6 - Address Extension" ] # [ inline ( always ) ] pub fn adext ( & mut self ) -> ADEXT_W { ADEXT_W { w : self } } # [ doc = "Bit 7 - General Call Address Enable" ] # [ inline ( always ) ] pub fn gcaen ( & mut self ) -> GCAEN_W { GCAEN_W { w : self } } } } # [ doc = "I2C Programmable Input Glitch Filter Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [flt](flt) module" ] pub type FLT = crate :: Reg < u8 , _FLT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLT ; # [ doc = "`read()` method returns [flt::R](flt::R) reader structure" ] impl crate :: Readable for FLT { } # [ doc = "`write(|w| ..)` method takes [flt::W](flt::W) writer structure" ] impl crate :: Writable for FLT { } # [ doc = "I2C Programmable Input Glitch Filter Register" ] pub mod flt { # [ doc = "Reader of register FLT" ] pub type R = crate :: R < u8 , super :: FLT > ; # [ doc = "Writer for register FLT" ] pub type W = crate :: W < u8 , super :: FLT > ; # [ doc = "Register FLT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "I2C Programmable Filter Factor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT_A { # [ doc = "0: No filter/bypass" ] _0 } impl From < FLT_A > for u8 { # [ inline ( always ) ] fn from ( variant : FLT_A ) -> Self { match variant { FLT_A :: _0 => 0 } } } # [ doc = "Reader of field `FLT`" ] pub type FLT_R = crate :: R < u8 , FLT_A > ; impl FLT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FLT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FLT_A :: _0 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT_A :: _0 } } # [ doc = "Write proxy for field `FLT`" ] pub struct FLT_W < 'a > { w : & 'a mut W , } impl < 'a > FLT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No filter/bypass" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT_A :: _0 ) } # [ 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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "I2C Bus Start Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTF_A { # [ doc = "0: No start happens on I2C bus" ] _0 , # [ doc = "1: Start detected on I2C bus" ] _1 } impl From < STARTF_A > for bool { # [ inline ( always ) ] fn from ( variant : STARTF_A ) -> Self { match variant { STARTF_A :: _0 => false , STARTF_A :: _1 => true } } } # [ doc = "Reader of field `STARTF`" ] pub type STARTF_R = crate :: R < bool , STARTF_A > ; impl STARTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STARTF_A { match self . bits { false => STARTF_A :: _0 , true => STARTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STARTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STARTF_A :: _1 } } # [ doc = "Write proxy for field `STARTF`" ] pub struct STARTF_W < 'a > { w : & 'a mut W , } impl < 'a > STARTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STARTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No start happens on I2C bus" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STARTF_A :: _0 ) } # [ doc = "Start detected on I2C bus" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STARTF_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "I2C Bus Stop or Start Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SSIE_A { # [ doc = "0: Stop or start detection interrupt is disabled" ] _0 , # [ doc = "1: Stop or start detection interrupt is enabled" ] _1 } impl From < SSIE_A > for bool { # [ inline ( always ) ] fn from ( variant : SSIE_A ) -> Self { match variant { SSIE_A :: _0 => false , SSIE_A :: _1 => true } } } # [ doc = "Reader of field `SSIE`" ] pub type SSIE_R = crate :: R < bool , SSIE_A > ; impl SSIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SSIE_A { match self . bits { false => SSIE_A :: _0 , true => SSIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SSIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SSIE_A :: _1 } } # [ doc = "Write proxy for field `SSIE`" ] pub struct SSIE_W < 'a > { w : & 'a mut W , } impl < 'a > SSIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SSIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Stop or start detection interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SSIE_A :: _0 ) } # [ doc = "Stop or start detection interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SSIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "I2C Bus Stop Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPF_A { # [ doc = "0: No stop happens on I2C bus" ] _0 , # [ doc = "1: Stop detected on I2C bus" ] _1 } impl From < STOPF_A > for bool { # [ inline ( always ) ] fn from ( variant : STOPF_A ) -> Self { match variant { STOPF_A :: _0 => false , STOPF_A :: _1 => true } } } # [ doc = "Reader of field `STOPF`" ] pub type STOPF_R = crate :: R < bool , STOPF_A > ; impl STOPF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STOPF_A { match self . bits { false => STOPF_A :: _0 , true => STOPF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STOPF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STOPF_A :: _1 } } # [ doc = "Write proxy for field `STOPF`" ] pub struct STOPF_W < 'a > { w : & 'a mut W , } impl < 'a > STOPF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STOPF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No stop happens on I2C bus" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STOPF_A :: _0 ) } # [ doc = "Stop detected on I2C bus" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STOPF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Stop Hold Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHEN_A { # [ doc = "0: Stop holdoff is disabled. The MCU's entry to stop mode is not gated." ] _0 , # [ doc = "1: Stop holdoff is enabled." ] _1 } impl From < SHEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SHEN_A ) -> Self { match variant { SHEN_A :: _0 => false , SHEN_A :: _1 => true } } } # [ doc = "Reader of field `SHEN`" ] pub type SHEN_R = crate :: R < bool , SHEN_A > ; impl SHEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHEN_A { match self . bits { false => SHEN_A :: _0 , true => SHEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHEN_A :: _1 } } # [ doc = "Write proxy for field `SHEN`" ] pub struct SHEN_W < 'a > { w : & 'a mut W , } impl < 'a > SHEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Stop holdoff is disabled. The MCU's entry to stop mode is not gated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHEN_A :: _0 ) } # [ doc = "Stop holdoff is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - I2C Programmable Filter Factor" ] # [ inline ( always ) ] pub fn flt ( & self ) -> FLT_R { FLT_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bit 4 - I2C Bus Start Detect Flag" ] # [ inline ( always ) ] pub fn startf ( & self ) -> STARTF_R { STARTF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - I2C Bus Stop or Start Interrupt Enable" ] # [ inline ( always ) ] pub fn ssie ( & self ) -> SSIE_R { SSIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C Bus Stop Detect Flag" ] # [ inline ( always ) ] pub fn stopf ( & self ) -> STOPF_R { STOPF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Stop Hold Enable" ] # [ inline ( always ) ] pub fn shen ( & self ) -> SHEN_R { SHEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - I2C Programmable Filter Factor" ] # [ inline ( always ) ] pub fn flt ( & mut self ) -> FLT_W { FLT_W { w : self } } # [ doc = "Bit 4 - I2C Bus Start Detect Flag" ] # [ inline ( always ) ] pub fn startf ( & mut self ) -> STARTF_W { STARTF_W { w : self } } # [ doc = "Bit 5 - I2C Bus Stop or Start Interrupt Enable" ] # [ inline ( always ) ] pub fn ssie ( & mut self ) -> SSIE_W { SSIE_W { w : self } } # [ doc = "Bit 6 - I2C Bus Stop Detect Flag" ] # [ inline ( always ) ] pub fn stopf ( & mut self ) -> STOPF_W { STOPF_W { w : self } } # [ doc = "Bit 7 - Stop Hold Enable" ] # [ inline ( always ) ] pub fn shen ( & mut self ) -> SHEN_W { SHEN_W { w : self } } } } # [ doc = "I2C Range Address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ra](ra) module" ] pub type RA = crate :: Reg < u8 , _RA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RA ; # [ doc = "`read()` method returns [ra::R](ra::R) reader structure" ] impl crate :: Readable for RA { } # [ doc = "`write(|w| ..)` method takes [ra::W](ra::W) writer structure" ] impl crate :: Writable for RA { } # [ doc = "I2C Range Address register" ] pub mod ra { # [ doc = "Reader of register RA" ] pub type R = crate :: R < u8 , super :: RA > ; # [ doc = "Writer for register RA" ] pub type W = crate :: W < u8 , super :: RA > ; # [ doc = "Register RA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RA { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RAD`" ] pub type RAD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RAD`" ] pub struct RAD_W < 'a > { w : & 'a mut W , } impl < 'a > RAD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Range Slave Address" ] # [ inline ( always ) ] pub fn rad ( & self ) -> RAD_R { RAD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Range Slave Address" ] # [ inline ( always ) ] pub fn rad ( & mut self ) -> RAD_W { RAD_W { w : self } } } } # [ doc = "I2C SMBus Control and Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [smb](smb) module" ] pub type SMB = crate :: Reg < u8 , _SMB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SMB ; # [ doc = "`read()` method returns [smb::R](smb::R) reader structure" ] impl crate :: Readable for SMB { } # [ doc = "`write(|w| ..)` method takes [smb::W](smb::W) writer structure" ] impl crate :: Writable for SMB { } # [ doc = "I2C SMBus Control and Status register" ] pub mod smb { # [ doc = "Reader of register SMB" ] pub type R = crate :: R < u8 , super :: SMB > ; # [ doc = "Writer for register SMB" ] pub type W = crate :: W < u8 , super :: SMB > ; # [ doc = "Register SMB `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SMB { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "SHTF2 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF2IE_A { # [ doc = "0: SHTF2 interrupt is disabled" ] _0 , # [ doc = "1: SHTF2 interrupt is enabled" ] _1 } impl From < SHTF2IE_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF2IE_A ) -> Self { match variant { SHTF2IE_A :: _0 => false , SHTF2IE_A :: _1 => true } } } # [ doc = "Reader of field `SHTF2IE`" ] pub type SHTF2IE_R = crate :: R < bool , SHTF2IE_A > ; impl SHTF2IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF2IE_A { match self . bits { false => SHTF2IE_A :: _0 , true => SHTF2IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF2IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF2IE_A :: _1 } } # [ doc = "Write proxy for field `SHTF2IE`" ] pub struct SHTF2IE_W < 'a > { w : & 'a mut W , } impl < 'a > SHTF2IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHTF2IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SHTF2 interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHTF2IE_A :: _0 ) } # [ doc = "SHTF2 interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHTF2IE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "SCL High Timeout Flag 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF2_A { # [ doc = "0: No SCL high and SDA low timeout occurs" ] _0 , # [ doc = "1: SCL high and SDA low timeout occurs" ] _1 } impl From < SHTF2_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF2_A ) -> Self { match variant { SHTF2_A :: _0 => false , SHTF2_A :: _1 => true } } } # [ doc = "Reader of field `SHTF2`" ] pub type SHTF2_R = crate :: R < bool , SHTF2_A > ; impl SHTF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF2_A { match self . bits { false => SHTF2_A :: _0 , true => SHTF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF2_A :: _1 } } # [ doc = "Write proxy for field `SHTF2`" ] pub struct SHTF2_W < 'a > { w : & 'a mut W , } impl < 'a > SHTF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHTF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No SCL high and SDA low timeout occurs" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHTF2_A :: _0 ) } # [ doc = "SCL high and SDA low timeout occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHTF2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "SCL High Timeout Flag 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF1_A { # [ doc = "0: No SCL high and SDA high timeout occurs" ] _0 , # [ doc = "1: SCL high and SDA high timeout occurs" ] _1 } impl From < SHTF1_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF1_A ) -> Self { match variant { SHTF1_A :: _0 => false , SHTF1_A :: _1 => true } } } # [ doc = "Reader of field `SHTF1`" ] pub type SHTF1_R = crate :: R < bool , SHTF1_A > ; impl SHTF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF1_A { match self . bits { false => SHTF1_A :: _0 , true => SHTF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF1_A :: _1 } } # [ doc = "SCL Low Timeout Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLTF_A { # [ doc = "0: No low timeout occurs" ] _0 , # [ doc = "1: Low timeout occurs" ] _1 } impl From < SLTF_A > for bool { # [ inline ( always ) ] fn from ( variant : SLTF_A ) -> Self { match variant { SLTF_A :: _0 => false , SLTF_A :: _1 => true } } } # [ doc = "Reader of field `SLTF`" ] pub type SLTF_R = crate :: R < bool , SLTF_A > ; impl SLTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLTF_A { match self . bits { false => SLTF_A :: _0 , true => SLTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLTF_A :: _1 } } # [ doc = "Write proxy for field `SLTF`" ] pub struct SLTF_W < 'a > { w : & 'a mut W , } impl < 'a > SLTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No low timeout occurs" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLTF_A :: _0 ) } # [ doc = "Low timeout occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLTF_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Timeout Counter Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCKSEL_A { # [ doc = "0: Timeout counter counts at the frequency of the I2C module clock / 64" ] _0 , # [ doc = "1: Timeout counter counts at the frequency of the I2C module clock" ] _1 } impl From < TCKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TCKSEL_A ) -> Self { match variant { TCKSEL_A :: _0 => false , TCKSEL_A :: _1 => true } } } # [ doc = "Reader of field `TCKSEL`" ] pub type TCKSEL_R = crate :: R < bool , TCKSEL_A > ; impl TCKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCKSEL_A { match self . bits { false => TCKSEL_A :: _0 , true => TCKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCKSEL_A :: _1 } } # [ doc = "Write proxy for field `TCKSEL`" ] pub struct TCKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TCKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timeout counter counts at the frequency of the I2C module clock / 64" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCKSEL_A :: _0 ) } # [ doc = "Timeout counter counts at the frequency of the I2C module clock" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCKSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Second I2C Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SIICAEN_A { # [ doc = "0: I2C address register 2 matching is disabled" ] _0 , # [ doc = "1: I2C address register 2 matching is enabled" ] _1 } impl From < SIICAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SIICAEN_A ) -> Self { match variant { SIICAEN_A :: _0 => false , SIICAEN_A :: _1 => true } } } # [ doc = "Reader of field `SIICAEN`" ] pub type SIICAEN_R = crate :: R < bool , SIICAEN_A > ; impl SIICAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SIICAEN_A { match self . bits { false => SIICAEN_A :: _0 , true => SIICAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SIICAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SIICAEN_A :: _1 } } # [ doc = "Write proxy for field `SIICAEN`" ] pub struct SIICAEN_W < 'a > { w : & 'a mut W , } impl < 'a > SIICAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SIICAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "I2C address register 2 matching is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SIICAEN_A :: _0 ) } # [ doc = "I2C address register 2 matching is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SIICAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "SMBus Alert Response Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ALERTEN_A { # [ doc = "0: SMBus alert response address matching is disabled" ] _0 , # [ doc = "1: SMBus alert response address matching is enabled" ] _1 } impl From < ALERTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ALERTEN_A ) -> Self { match variant { ALERTEN_A :: _0 => false , ALERTEN_A :: _1 => true } } } # [ doc = "Reader of field `ALERTEN`" ] pub type ALERTEN_R = crate :: R < bool , ALERTEN_A > ; impl ALERTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ALERTEN_A { match self . bits { false => ALERTEN_A :: _0 , true => ALERTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ALERTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ALERTEN_A :: _1 } } # [ doc = "Write proxy for field `ALERTEN`" ] pub struct ALERTEN_W < 'a > { w : & 'a mut W , } impl < 'a > ALERTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ALERTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SMBus alert response address matching is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ALERTEN_A :: _0 ) } # [ doc = "SMBus alert response address matching is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ALERTEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Fast NACK/ACK Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FACK_A { # [ doc = "0: An ACK or NACK is sent on the following receiving data byte" ] _0 , # [ doc = "1: Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK." ] _1 } impl From < FACK_A > for bool { # [ inline ( always ) ] fn from ( variant : FACK_A ) -> Self { match variant { FACK_A :: _0 => false , FACK_A :: _1 => true } } } # [ doc = "Reader of field `FACK`" ] pub type FACK_R = crate :: R < bool , FACK_A > ; impl FACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FACK_A { match self . bits { false => FACK_A :: _0 , true => FACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FACK_A :: _1 } } # [ doc = "Write proxy for field `FACK`" ] pub struct FACK_W < 'a > { w : & 'a mut W , } impl < 'a > FACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FACK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An ACK or NACK is sent on the following receiving data byte" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FACK_A :: _0 ) } # [ doc = "Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FACK_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - SHTF2 Interrupt Enable" ] # [ inline ( always ) ] pub fn shtf2ie ( & self ) -> SHTF2IE_R { SHTF2IE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - SCL High Timeout Flag 2" ] # [ inline ( always ) ] pub fn shtf2 ( & self ) -> SHTF2_R { SHTF2_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - SCL High Timeout Flag 1" ] # [ inline ( always ) ] pub fn shtf1 ( & self ) -> SHTF1_R { SHTF1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - SCL Low Timeout Flag" ] # [ inline ( always ) ] pub fn sltf ( & self ) -> SLTF_R { SLTF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Timeout Counter Clock Select" ] # [ inline ( always ) ] pub fn tcksel ( & self ) -> TCKSEL_R { TCKSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Second I2C Address Enable" ] # [ inline ( always ) ] pub fn siicaen ( & self ) -> SIICAEN_R { SIICAEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - SMBus Alert Response Address Enable" ] # [ inline ( always ) ] pub fn alerten ( & self ) -> ALERTEN_R { ALERTEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fast NACK/ACK Enable" ] # [ inline ( always ) ] pub fn fack ( & self ) -> FACK_R { FACK_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - SHTF2 Interrupt Enable" ] # [ inline ( always ) ] pub fn shtf2ie ( & mut self ) -> SHTF2IE_W { SHTF2IE_W { w : self } } # [ doc = "Bit 1 - SCL High Timeout Flag 2" ] # [ inline ( always ) ] pub fn shtf2 ( & mut self ) -> SHTF2_W { SHTF2_W { w : self } } # [ doc = "Bit 3 - SCL Low Timeout Flag" ] # [ inline ( always ) ] pub fn sltf ( & mut self ) -> SLTF_W { SLTF_W { w : self } } # [ doc = "Bit 4 - Timeout Counter Clock Select" ] # [ inline ( always ) ] pub fn tcksel ( & mut self ) -> TCKSEL_W { TCKSEL_W { w : self } } # [ doc = "Bit 5 - Second I2C Address Enable" ] # [ inline ( always ) ] pub fn siicaen ( & mut self ) -> SIICAEN_W { SIICAEN_W { w : self } } # [ doc = "Bit 6 - SMBus Alert Response Address Enable" ] # [ inline ( always ) ] pub fn alerten ( & mut self ) -> ALERTEN_W { ALERTEN_W { w : self } } # [ doc = "Bit 7 - Fast NACK/ACK Enable" ] # [ inline ( always ) ] pub fn fack ( & mut self ) -> FACK_W { FACK_W { w : self } } } } # [ doc = "I2C Address Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [a2](a2) module" ] pub type A2 = crate :: Reg < u8 , _A2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _A2 ; # [ doc = "`read()` method returns [a2::R](a2::R) reader structure" ] impl crate :: Readable for A2 { } # [ doc = "`write(|w| ..)` method takes [a2::W](a2::W) writer structure" ] impl crate :: Writable for A2 { } # [ doc = "I2C Address Register 2" ] pub mod a2 { # [ doc = "Reader of register A2" ] pub type R = crate :: R < u8 , super :: A2 > ; # [ doc = "Writer for register A2" ] pub type W = crate :: W < u8 , super :: A2 > ; # [ doc = "Register A2 `reset()`'s with value 0xc2" ] impl crate :: ResetValue for super :: A2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc2 } } # [ doc = "Reader of field `SAD`" ] pub type SAD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SAD`" ] pub struct SAD_W < 'a > { w : & 'a mut W , } impl < 'a > SAD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - SMBus Address" ] # [ inline ( always ) ] pub fn sad ( & self ) -> SAD_R { SAD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - SMBus Address" ] # [ inline ( always ) ] pub fn sad ( & mut self ) -> SAD_W { SAD_W { w : self } } } } # [ doc = "I2C SCL Low Timeout Register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [slth](slth) module" ] pub type SLTH = crate :: Reg < u8 , _SLTH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SLTH ; # [ doc = "`read()` method returns [slth::R](slth::R) reader structure" ] impl crate :: Readable for SLTH { } # [ doc = "`write(|w| ..)` method takes [slth::W](slth::W) writer structure" ] impl crate :: Writable for SLTH { } # [ doc = "I2C SCL Low Timeout Register High" ] pub mod slth { # [ doc = "Reader of register SLTH" ] pub type R = crate :: R < u8 , super :: SLTH > ; # [ doc = "Writer for register SLTH" ] pub type W = crate :: W < u8 , super :: SLTH > ; # [ doc = "Register SLTH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SLTH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SSLT`" ] pub type SSLT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SSLT`" ] pub struct SSLT_W < 'a > { w : & 'a mut W , } impl < 'a > SSLT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SSLT\\[15:8\\]" ] # [ inline ( always ) ] pub fn sslt ( & self ) -> SSLT_R { SSLT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SSLT\\[15:8\\]" ] # [ inline ( always ) ] pub fn sslt ( & mut self ) -> SSLT_W { SSLT_W { w : self } } } } # [ doc = "I2C SCL Low Timeout Register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sltl](sltl) module" ] pub type SLTL = crate :: Reg < u8 , _SLTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SLTL ; # [ doc = "`read()` method returns [sltl::R](sltl::R) reader structure" ] impl crate :: Readable for SLTL { } # [ doc = "`write(|w| ..)` method takes [sltl::W](sltl::W) writer structure" ] impl crate :: Writable for SLTL { } # [ doc = "I2C SCL Low Timeout Register Low" ] pub mod sltl { # [ doc = "Reader of register SLTL" ] pub type R = crate :: R < u8 , super :: SLTL > ; # [ doc = "Writer for register SLTL" ] pub type W = crate :: W < u8 , super :: SLTL > ; # [ doc = "Register SLTL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SLTL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SSLT`" ] pub type SSLT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SSLT`" ] pub struct SSLT_W < 'a > { w : & 'a mut W , } impl < 'a > SSLT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SSLT\\[7:0\\]" ] # [ inline ( always ) ] pub fn sslt ( & self ) -> SSLT_R { SSLT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SSLT\\[7:0\\]" ] # [ inline ( always ) ] pub fn sslt ( & mut self ) -> SSLT_W { SSLT_W { w : self } } } } } # [ doc = "Inter-Integrated Circuit" ] pub struct I2C2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for I2C2 { } impl I2C2 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const i2c2 :: RegisterBlock { 0x400e_6000 as * const _ } } impl Deref for I2C2 { type Target = i2c2 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * I2C2 :: ptr ( ) } } } # [ doc = "Inter-Integrated Circuit" ] pub mod i2c2 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - I2C Address Register 1" ] pub a1 : A1 , # [ doc = "0x01 - I2C Frequency Divider register" ] pub f : F , # [ doc = "0x02 - I2C Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - I2C Status register" ] pub s : S , # [ doc = "0x04 - I2C Data I/O register" ] pub d : D , # [ doc = "0x05 - I2C Control Register 2" ] pub c2 : C2 , # [ doc = "0x06 - I2C Programmable Input Glitch Filter Register" ] pub flt : FLT , # [ doc = "0x07 - I2C Range Address register" ] pub ra : RA , # [ doc = "0x08 - I2C SMBus Control and Status register" ] pub smb : SMB , # [ doc = "0x09 - I2C Address Register 2" ] pub a2 : A2 , # [ doc = "0x0a - I2C SCL Low Timeout Register High" ] pub slth : SLTH , # [ doc = "0x0b - I2C SCL Low Timeout Register Low" ] pub sltl : SLTL , } # [ doc = "I2C Address Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [a1](a1) module" ] pub type A1 = crate :: Reg < u8 , _A1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _A1 ; # [ doc = "`read()` method returns [a1::R](a1::R) reader structure" ] impl crate :: Readable for A1 { } # [ doc = "`write(|w| ..)` method takes [a1::W](a1::W) writer structure" ] impl crate :: Writable for A1 { } # [ doc = "I2C Address Register 1" ] pub mod a1 { # [ doc = "Reader of register A1" ] pub type R = crate :: R < u8 , super :: A1 > ; # [ doc = "Writer for register A1" ] pub type W = crate :: W < u8 , super :: A1 > ; # [ doc = "Register A1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: A1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AD`" ] pub type AD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `AD`" ] pub struct AD_W < 'a > { w : & 'a mut W , } impl < 'a > AD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Address" ] # [ inline ( always ) ] pub fn ad ( & self ) -> AD_R { AD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Address" ] # [ inline ( always ) ] pub fn ad ( & mut self ) -> AD_W { AD_W { w : self } } } } # [ doc = "I2C Frequency Divider register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f](f) module" ] pub type F = crate :: Reg < u8 , _F > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _F ; # [ doc = "`read()` method returns [f::R](f::R) reader structure" ] impl crate :: Readable for F { } # [ doc = "`write(|w| ..)` method takes [f::W](f::W) writer structure" ] impl crate :: Writable for F { } # [ doc = "I2C Frequency Divider register" ] pub mod f { # [ doc = "Reader of register F" ] pub type R = crate :: R < u8 , super :: F > ; # [ doc = "Writer for register F" ] pub type W = crate :: W < u8 , super :: F > ; # [ doc = "Register F `reset()`'s with value 0" ] impl crate :: ResetValue for super :: F { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ICR`" ] pub type ICR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ICR`" ] pub struct ICR_W < 'a > { w : & 'a mut W , } impl < 'a > ICR_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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Multiplier Factor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MULT_A { # [ doc = "0: mul = 1" ] _00 , # [ doc = "1: mul = 2" ] _01 , # [ doc = "2: mul = 4" ] _10 } impl From < MULT_A > for u8 { # [ inline ( always ) ] fn from ( variant : MULT_A ) -> Self { match variant { MULT_A :: _00 => 0 , MULT_A :: _01 => 1 , MULT_A :: _10 => 2 } } } # [ doc = "Reader of field `MULT`" ] pub type MULT_R = crate :: R < u8 , MULT_A > ; impl MULT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , MULT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( MULT_A :: _00 ) , 1 => Val ( MULT_A :: _01 ) , 2 => Val ( MULT_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MULT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MULT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MULT_A :: _10 } } # [ doc = "Write proxy for field `MULT`" ] pub struct MULT_W < 'a > { w : & 'a mut W , } impl < 'a > MULT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MULT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "mul = 1" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _00 ) } # [ doc = "mul = 2" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _01 ) } # [ doc = "mul = 4" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _10 ) } # [ 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 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - ClockRate" ] # [ inline ( always ) ] pub fn icr ( & self ) -> ICR_R { ICR_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 6:7 - Multiplier Factor" ] # [ inline ( always ) ] pub fn mult ( & self ) -> MULT_R { MULT_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - ClockRate" ] # [ inline ( always ) ] pub fn icr ( & mut self ) -> ICR_W { ICR_W { w : self } } # [ doc = "Bits 6:7 - Multiplier Factor" ] # [ inline ( always ) ] pub fn mult ( & mut self ) -> MULT_W { MULT_W { w : self } } } } # [ doc = "I2C Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "I2C Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: All DMA signalling disabled." ] _0 , # [ doc = "1: DMA transfer is enabled. While SMB\\[FACK\\] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S\\[IAAS\\] and S\\[TCF\\] are set. If the direction of transfer is known from master to slave, then it is not required to check S\\[SRW\\]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All DMA signalling disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA transfer is enabled. While SMB\\[FACK\\] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S\\[IAAS\\] and S\\[TCF\\] are set. If the direction of transfer is known from master to slave, then it is not required to check S\\[SRW\\]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUEN_A { # [ doc = "0: Normal operation. No interrupt generated when address matching in low power mode." ] _0 , # [ doc = "1: Enables the wakeup function in low power mode." ] _1 } impl From < WUEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WUEN_A ) -> Self { match variant { WUEN_A :: _0 => false , WUEN_A :: _1 => true } } } # [ doc = "Reader of field `WUEN`" ] pub type WUEN_R = crate :: R < bool , WUEN_A > ; impl WUEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUEN_A { match self . bits { false => WUEN_A :: _0 , true => WUEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUEN_A :: _1 } } # [ doc = "Write proxy for field `WUEN`" ] pub struct WUEN_W < 'a > { w : & 'a mut W , } impl < 'a > WUEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation. No interrupt generated when address matching in low power mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUEN_A :: _0 ) } # [ doc = "Enables the wakeup function in low power mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Write proxy for field `RSTA`" ] pub struct RSTA_W < 'a > { w : & 'a mut W , } impl < 'a > RSTA_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmit Acknowledge Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXAK_A { # [ doc = "0: An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set)." ] _0 , # [ doc = "1: No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set)." ] _1 } impl From < TXAK_A > for bool { # [ inline ( always ) ] fn from ( variant : TXAK_A ) -> Self { match variant { TXAK_A :: _0 => false , TXAK_A :: _1 => true } } } # [ doc = "Reader of field `TXAK`" ] pub type TXAK_R = crate :: R < bool , TXAK_A > ; impl TXAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXAK_A { match self . bits { false => TXAK_A :: _0 , true => TXAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXAK_A :: _1 } } # [ doc = "Write proxy for field `TXAK`" ] pub struct TXAK_W < 'a > { w : & 'a mut W , } impl < 'a > TXAK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXAK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXAK_A :: _0 ) } # [ doc = "No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXAK_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TX_A { # [ doc = "0: Receive" ] _0 , # [ doc = "1: Transmit" ] _1 } impl From < TX_A > for bool { # [ inline ( always ) ] fn from ( variant : TX_A ) -> Self { match variant { TX_A :: _0 => false , TX_A :: _1 => true } } } # [ doc = "Reader of field `TX`" ] pub type TX_R = crate :: R < bool , TX_A > ; impl TX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TX_A { match self . bits { false => TX_A :: _0 , true => TX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TX_A :: _1 } } # [ doc = "Write proxy for field `TX`" ] pub struct TX_W < 'a > { w : & 'a mut W , } impl < 'a > TX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TX_A :: _0 ) } # [ doc = "Transmit" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TX_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Master Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MST_A { # [ doc = "0: Slave mode" ] _0 , # [ doc = "1: Master mode" ] _1 } impl From < MST_A > for bool { # [ inline ( always ) ] fn from ( variant : MST_A ) -> Self { match variant { MST_A :: _0 => false , MST_A :: _1 => true } } } # [ doc = "Reader of field `MST`" ] pub type MST_R = crate :: R < bool , MST_A > ; impl MST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MST_A { match self . bits { false => MST_A :: _0 , true => MST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MST_A :: _1 } } # [ doc = "Write proxy for field `MST`" ] pub struct MST_W < 'a > { w : & 'a mut W , } impl < 'a > MST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Slave mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MST_A :: _0 ) } # [ doc = "Master mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MST_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "I2C Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICIE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IICIE_A > for bool { # [ inline ( always ) ] fn from ( variant : IICIE_A ) -> Self { match variant { IICIE_A :: _0 => false , IICIE_A :: _1 => true } } } # [ doc = "Reader of field `IICIE`" ] pub type IICIE_R = crate :: R < bool , IICIE_A > ; impl IICIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICIE_A { match self . bits { false => IICIE_A :: _0 , true => IICIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICIE_A :: _1 } } # [ doc = "Write proxy for field `IICIE`" ] pub struct IICIE_W < 'a > { w : & 'a mut W , } impl < 'a > IICIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICIE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "I2C Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IICEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IICEN_A ) -> Self { match variant { IICEN_A :: _0 => false , IICEN_A :: _1 => true } } } # [ doc = "Reader of field `IICEN`" ] pub type IICEN_R = crate :: R < bool , IICEN_A > ; impl IICEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICEN_A { match self . bits { false => IICEN_A :: _0 , true => IICEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICEN_A :: _1 } } # [ doc = "Write proxy for field `IICEN`" ] pub struct IICEN_W < 'a > { w : & 'a mut W , } impl < 'a > IICEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Enable" ] # [ inline ( always ) ] pub fn wuen ( & self ) -> WUEN_R { WUEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmit Acknowledge Enable" ] # [ inline ( always ) ] pub fn txak ( & self ) -> TXAK_R { TXAK_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Mode Select" ] # [ inline ( always ) ] pub fn tx ( & self ) -> TX_R { TX_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Master Mode Select" ] # [ inline ( always ) ] pub fn mst ( & self ) -> MST_R { MST_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C Interrupt Enable" ] # [ inline ( always ) ] pub fn iicie ( & self ) -> IICIE_R { IICIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - I2C Enable" ] # [ inline ( always ) ] pub fn iicen ( & self ) -> IICEN_R { IICEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bit 1 - Wakeup Enable" ] # [ inline ( always ) ] pub fn wuen ( & mut self ) -> WUEN_W { WUEN_W { w : self } } # [ doc = "Bit 2 - Repeat START" ] # [ inline ( always ) ] pub fn rsta ( & mut self ) -> RSTA_W { RSTA_W { w : self } } # [ doc = "Bit 3 - Transmit Acknowledge Enable" ] # [ inline ( always ) ] pub fn txak ( & mut self ) -> TXAK_W { TXAK_W { w : self } } # [ doc = "Bit 4 - Transmit Mode Select" ] # [ inline ( always ) ] pub fn tx ( & mut self ) -> TX_W { TX_W { w : self } } # [ doc = "Bit 5 - Master Mode Select" ] # [ inline ( always ) ] pub fn mst ( & mut self ) -> MST_W { MST_W { w : self } } # [ doc = "Bit 6 - I2C Interrupt Enable" ] # [ inline ( always ) ] pub fn iicie ( & mut self ) -> IICIE_W { IICIE_W { w : self } } # [ doc = "Bit 7 - I2C Enable" ] # [ inline ( always ) ] pub fn iicen ( & mut self ) -> IICEN_W { IICEN_W { w : self } } } } # [ doc = "I2C Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s](s) module" ] pub type S = crate :: Reg < u8 , _S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S ; # [ doc = "`read()` method returns [s::R](s::R) reader structure" ] impl crate :: Readable for S { } # [ doc = "`write(|w| ..)` method takes [s::W](s::W) writer structure" ] impl crate :: Writable for S { } # [ doc = "I2C Status register" ] pub mod s { # [ doc = "Reader of register S" ] pub type R = crate :: R < u8 , super :: S > ; # [ doc = "Writer for register S" ] pub type W = crate :: W < u8 , super :: S > ; # [ doc = "Register S `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: S { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Receive Acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXAK_A { # [ doc = "0: Acknowledge signal was received after the completion of one byte of data transmission on the bus" ] _0 , # [ doc = "1: No acknowledge signal detected" ] _1 } impl From < RXAK_A > for bool { # [ inline ( always ) ] fn from ( variant : RXAK_A ) -> Self { match variant { RXAK_A :: _0 => false , RXAK_A :: _1 => true } } } # [ doc = "Reader of field `RXAK`" ] pub type RXAK_R = crate :: R < bool , RXAK_A > ; impl RXAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXAK_A { match self . bits { false => RXAK_A :: _0 , true => RXAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXAK_A :: _1 } } # [ doc = "Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICIF_A { # [ doc = "0: No interrupt pending" ] _0 , # [ doc = "1: Interrupt pending" ] _1 } impl From < IICIF_A > for bool { # [ inline ( always ) ] fn from ( variant : IICIF_A ) -> Self { match variant { IICIF_A :: _0 => false , IICIF_A :: _1 => true } } } # [ doc = "Reader of field `IICIF`" ] pub type IICIF_R = crate :: R < bool , IICIF_A > ; impl IICIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICIF_A { match self . bits { false => IICIF_A :: _0 , true => IICIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICIF_A :: _1 } } # [ doc = "Write proxy for field `IICIF`" ] pub struct IICIF_W < 'a > { w : & 'a mut W , } impl < 'a > IICIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No interrupt pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICIF_A :: _0 ) } # [ doc = "Interrupt pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Slave Read/Write\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRW_A { # [ doc = "0: Slave receive, master writing to slave" ] _0 , # [ doc = "1: Slave transmit, master reading from slave" ] _1 } impl From < SRW_A > for bool { # [ inline ( always ) ] fn from ( variant : SRW_A ) -> Self { match variant { SRW_A :: _0 => false , SRW_A :: _1 => true } } } # [ doc = "Reader of field `SRW`" ] pub type SRW_R = crate :: R < bool , SRW_A > ; impl SRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRW_A { match self . bits { false => SRW_A :: _0 , true => SRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRW_A :: _1 } } # [ doc = "Range Address Match\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAM_A { # [ doc = "0: Not addressed" ] _0 , # [ doc = "1: Addressed as a slave" ] _1 } impl From < RAM_A > for bool { # [ inline ( always ) ] fn from ( variant : RAM_A ) -> Self { match variant { RAM_A :: _0 => false , RAM_A :: _1 => true } } } # [ doc = "Reader of field `RAM`" ] pub type RAM_R = crate :: R < bool , RAM_A > ; impl RAM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAM_A { match self . bits { false => RAM_A :: _0 , true => RAM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAM_A :: _1 } } # [ doc = "Write proxy for field `RAM`" ] pub struct RAM_W < 'a > { w : & 'a mut W , } impl < 'a > RAM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RAM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not addressed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RAM_A :: _0 ) } # [ doc = "Addressed as a slave" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RAM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Arbitration Lost\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ARBL_A { # [ doc = "0: Standard bus operation." ] _0 , # [ doc = "1: Loss of arbitration." ] _1 } impl From < ARBL_A > for bool { # [ inline ( always ) ] fn from ( variant : ARBL_A ) -> Self { match variant { ARBL_A :: _0 => false , ARBL_A :: _1 => true } } } # [ doc = "Reader of field `ARBL`" ] pub type ARBL_R = crate :: R < bool , ARBL_A > ; impl ARBL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ARBL_A { match self . bits { false => ARBL_A :: _0 , true => ARBL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ARBL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ARBL_A :: _1 } } # [ doc = "Write proxy for field `ARBL`" ] pub struct ARBL_W < 'a > { w : & 'a mut W , } impl < 'a > ARBL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ARBL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Standard bus operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ARBL_A :: _0 ) } # [ doc = "Loss of arbitration." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ARBL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Bus Busy\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUSY_A { # [ doc = "0: Bus is idle" ] _0 , # [ doc = "1: Bus is busy" ] _1 } impl From < BUSY_A > for bool { # [ inline ( always ) ] fn from ( variant : BUSY_A ) -> Self { match variant { BUSY_A :: _0 => false , BUSY_A :: _1 => true } } } # [ doc = "Reader of field `BUSY`" ] pub type BUSY_R = crate :: R < bool , BUSY_A > ; impl BUSY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUSY_A { match self . bits { false => BUSY_A :: _0 , true => BUSY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUSY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUSY_A :: _1 } } # [ doc = "Addressed As A Slave\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IAAS_A { # [ doc = "0: Not addressed" ] _0 , # [ doc = "1: Addressed as a slave" ] _1 } impl From < IAAS_A > for bool { # [ inline ( always ) ] fn from ( variant : IAAS_A ) -> Self { match variant { IAAS_A :: _0 => false , IAAS_A :: _1 => true } } } # [ doc = "Reader of field `IAAS`" ] pub type IAAS_R = crate :: R < bool , IAAS_A > ; impl IAAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IAAS_A { match self . bits { false => IAAS_A :: _0 , true => IAAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IAAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IAAS_A :: _1 } } # [ doc = "Write proxy for field `IAAS`" ] pub struct IAAS_W < 'a > { w : & 'a mut W , } impl < 'a > IAAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IAAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not addressed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IAAS_A :: _0 ) } # [ doc = "Addressed as a slave" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IAAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transfer Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_A { # [ doc = "0: Transfer in progress" ] _0 , # [ doc = "1: Transfer complete" ] _1 } impl From < TCF_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_A ) -> Self { match variant { TCF_A :: _0 => false , TCF_A :: _1 => true } } } # [ doc = "Reader of field `TCF`" ] pub type TCF_R = crate :: R < bool , TCF_A > ; impl TCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_A { match self . bits { false => TCF_A :: _0 , true => TCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_A :: _1 } } impl R { # [ doc = "Bit 0 - Receive Acknowledge" ] # [ inline ( always ) ] pub fn rxak ( & self ) -> RXAK_R { RXAK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Flag" ] # [ inline ( always ) ] pub fn iicif ( & self ) -> IICIF_R { IICIF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slave Read/Write" ] # [ inline ( always ) ] pub fn srw ( & self ) -> SRW_R { SRW_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Range Address Match" ] # [ inline ( always ) ] pub fn ram ( & self ) -> RAM_R { RAM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Arbitration Lost" ] # [ inline ( always ) ] pub fn arbl ( & self ) -> ARBL_R { ARBL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Bus Busy" ] # [ inline ( always ) ] pub fn busy ( & self ) -> BUSY_R { BUSY_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Addressed As A Slave" ] # [ inline ( always ) ] pub fn iaas ( & self ) -> IAAS_R { IAAS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & self ) -> TCF_R { TCF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Interrupt Flag" ] # [ inline ( always ) ] pub fn iicif ( & mut self ) -> IICIF_W { IICIF_W { w : self } } # [ doc = "Bit 3 - Range Address Match" ] # [ inline ( always ) ] pub fn ram ( & mut self ) -> RAM_W { RAM_W { w : self } } # [ doc = "Bit 4 - Arbitration Lost" ] # [ inline ( always ) ] pub fn arbl ( & mut self ) -> ARBL_W { ARBL_W { w : self } } # [ doc = "Bit 6 - Addressed As A Slave" ] # [ inline ( always ) ] pub fn iaas ( & mut self ) -> IAAS_W { IAAS_W { w : self } } } } # [ doc = "I2C Data I/O register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "I2C Data I/O register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA`" ] pub type DATA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "I2C Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "I2C Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AD`" ] pub type AD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `AD`" ] pub struct AD_W < 'a > { w : & 'a mut W , } impl < 'a > AD_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 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Range Address Matching Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RMEN_A { # [ doc = "0: Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers." ] _0 , # [ doc = "1: Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers." ] _1 } impl From < RMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : RMEN_A ) -> Self { match variant { RMEN_A :: _0 => false , RMEN_A :: _1 => true } } } # [ doc = "Reader of field `RMEN`" ] pub type RMEN_R = crate :: R < bool , RMEN_A > ; impl RMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RMEN_A { match self . bits { false => RMEN_A :: _0 , true => RMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RMEN_A :: _1 } } # [ doc = "Write proxy for field `RMEN`" ] pub struct RMEN_W < 'a > { w : & 'a mut W , } impl < 'a > RMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RMEN_A :: _0 ) } # [ doc = "Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RMEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Slave Baud Rate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBRC_A { # [ doc = "0: The slave baud rate follows the master baud rate and clock stretching may occur" ] _0 , # [ doc = "1: Slave baud rate is independent of the master baud rate" ] _1 } impl From < SBRC_A > for bool { # [ inline ( always ) ] fn from ( variant : SBRC_A ) -> Self { match variant { SBRC_A :: _0 => false , SBRC_A :: _1 => true } } } # [ doc = "Reader of field `SBRC`" ] pub type SBRC_R = crate :: R < bool , SBRC_A > ; impl SBRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBRC_A { match self . bits { false => SBRC_A :: _0 , true => SBRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBRC_A :: _1 } } # [ doc = "Write proxy for field `SBRC`" ] pub struct SBRC_W < 'a > { w : & 'a mut W , } impl < 'a > SBRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The slave baud rate follows the master baud rate and clock stretching may occur" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBRC_A :: _0 ) } # [ doc = "Slave baud rate is independent of the master baud rate" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBRC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "High Drive Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HDRS_A { # [ doc = "0: Normal drive mode" ] _0 , # [ doc = "1: High drive mode" ] _1 } impl From < HDRS_A > for bool { # [ inline ( always ) ] fn from ( variant : HDRS_A ) -> Self { match variant { HDRS_A :: _0 => false , HDRS_A :: _1 => true } } } # [ doc = "Reader of field `HDRS`" ] pub type HDRS_R = crate :: R < bool , HDRS_A > ; impl HDRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HDRS_A { match self . bits { false => HDRS_A :: _0 , true => HDRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HDRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HDRS_A :: _1 } } # [ doc = "Write proxy for field `HDRS`" ] pub struct HDRS_W < 'a > { w : & 'a mut W , } impl < 'a > HDRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HDRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal drive mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HDRS_A :: _0 ) } # [ doc = "High drive mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HDRS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Address Extension\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADEXT_A { # [ doc = "0: 7-bit address scheme" ] _0 , # [ doc = "1: 10-bit address scheme" ] _1 } impl From < ADEXT_A > for bool { # [ inline ( always ) ] fn from ( variant : ADEXT_A ) -> Self { match variant { ADEXT_A :: _0 => false , ADEXT_A :: _1 => true } } } # [ doc = "Reader of field `ADEXT`" ] pub type ADEXT_R = crate :: R < bool , ADEXT_A > ; impl ADEXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADEXT_A { match self . bits { false => ADEXT_A :: _0 , true => ADEXT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADEXT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADEXT_A :: _1 } } # [ doc = "Write proxy for field `ADEXT`" ] pub struct ADEXT_W < 'a > { w : & 'a mut W , } impl < 'a > ADEXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADEXT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "7-bit address scheme" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADEXT_A :: _0 ) } # [ doc = "10-bit address scheme" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADEXT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "General Call Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GCAEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < GCAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GCAEN_A ) -> Self { match variant { GCAEN_A :: _0 => false , GCAEN_A :: _1 => true } } } # [ doc = "Reader of field `GCAEN`" ] pub type GCAEN_R = crate :: R < bool , GCAEN_A > ; impl GCAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GCAEN_A { match self . bits { false => GCAEN_A :: _0 , true => GCAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GCAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GCAEN_A :: _1 } } # [ doc = "Write proxy for field `GCAEN`" ] pub struct GCAEN_W < 'a > { w : & 'a mut W , } impl < 'a > GCAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GCAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GCAEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GCAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Slave Address" ] # [ inline ( always ) ] pub fn ad ( & self ) -> AD_R { AD_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Range Address Matching Enable" ] # [ inline ( always ) ] pub fn rmen ( & self ) -> RMEN_R { RMEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Slave Baud Rate Control" ] # [ inline ( always ) ] pub fn sbrc ( & self ) -> SBRC_R { SBRC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - High Drive Select" ] # [ inline ( always ) ] pub fn hdrs ( & self ) -> HDRS_R { HDRS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Address Extension" ] # [ inline ( always ) ] pub fn adext ( & self ) -> ADEXT_R { ADEXT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - General Call Address Enable" ] # [ inline ( always ) ] pub fn gcaen ( & self ) -> GCAEN_R { GCAEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Slave Address" ] # [ inline ( always ) ] pub fn ad ( & mut self ) -> AD_W { AD_W { w : self } } # [ doc = "Bit 3 - Range Address Matching Enable" ] # [ inline ( always ) ] pub fn rmen ( & mut self ) -> RMEN_W { RMEN_W { w : self } } # [ doc = "Bit 4 - Slave Baud Rate Control" ] # [ inline ( always ) ] pub fn sbrc ( & mut self ) -> SBRC_W { SBRC_W { w : self } } # [ doc = "Bit 5 - High Drive Select" ] # [ inline ( always ) ] pub fn hdrs ( & mut self ) -> HDRS_W { HDRS_W { w : self } } # [ doc = "Bit 6 - Address Extension" ] # [ inline ( always ) ] pub fn adext ( & mut self ) -> ADEXT_W { ADEXT_W { w : self } } # [ doc = "Bit 7 - General Call Address Enable" ] # [ inline ( always ) ] pub fn gcaen ( & mut self ) -> GCAEN_W { GCAEN_W { w : self } } } } # [ doc = "I2C Programmable Input Glitch Filter Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [flt](flt) module" ] pub type FLT = crate :: Reg < u8 , _FLT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLT ; # [ doc = "`read()` method returns [flt::R](flt::R) reader structure" ] impl crate :: Readable for FLT { } # [ doc = "`write(|w| ..)` method takes [flt::W](flt::W) writer structure" ] impl crate :: Writable for FLT { } # [ doc = "I2C Programmable Input Glitch Filter Register" ] pub mod flt { # [ doc = "Reader of register FLT" ] pub type R = crate :: R < u8 , super :: FLT > ; # [ doc = "Writer for register FLT" ] pub type W = crate :: W < u8 , super :: FLT > ; # [ doc = "Register FLT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "I2C Programmable Filter Factor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT_A { # [ doc = "0: No filter/bypass" ] _0 } impl From < FLT_A > for u8 { # [ inline ( always ) ] fn from ( variant : FLT_A ) -> Self { match variant { FLT_A :: _0 => 0 } } } # [ doc = "Reader of field `FLT`" ] pub type FLT_R = crate :: R < u8 , FLT_A > ; impl FLT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FLT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FLT_A :: _0 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT_A :: _0 } } # [ doc = "Write proxy for field `FLT`" ] pub struct FLT_W < 'a > { w : & 'a mut W , } impl < 'a > FLT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No filter/bypass" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT_A :: _0 ) } # [ 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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "I2C Bus Start Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTF_A { # [ doc = "0: No start happens on I2C bus" ] _0 , # [ doc = "1: Start detected on I2C bus" ] _1 } impl From < STARTF_A > for bool { # [ inline ( always ) ] fn from ( variant : STARTF_A ) -> Self { match variant { STARTF_A :: _0 => false , STARTF_A :: _1 => true } } } # [ doc = "Reader of field `STARTF`" ] pub type STARTF_R = crate :: R < bool , STARTF_A > ; impl STARTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STARTF_A { match self . bits { false => STARTF_A :: _0 , true => STARTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STARTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STARTF_A :: _1 } } # [ doc = "Write proxy for field `STARTF`" ] pub struct STARTF_W < 'a > { w : & 'a mut W , } impl < 'a > STARTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STARTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No start happens on I2C bus" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STARTF_A :: _0 ) } # [ doc = "Start detected on I2C bus" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STARTF_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "I2C Bus Stop or Start Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SSIE_A { # [ doc = "0: Stop or start detection interrupt is disabled" ] _0 , # [ doc = "1: Stop or start detection interrupt is enabled" ] _1 } impl From < SSIE_A > for bool { # [ inline ( always ) ] fn from ( variant : SSIE_A ) -> Self { match variant { SSIE_A :: _0 => false , SSIE_A :: _1 => true } } } # [ doc = "Reader of field `SSIE`" ] pub type SSIE_R = crate :: R < bool , SSIE_A > ; impl SSIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SSIE_A { match self . bits { false => SSIE_A :: _0 , true => SSIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SSIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SSIE_A :: _1 } } # [ doc = "Write proxy for field `SSIE`" ] pub struct SSIE_W < 'a > { w : & 'a mut W , } impl < 'a > SSIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SSIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Stop or start detection interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SSIE_A :: _0 ) } # [ doc = "Stop or start detection interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SSIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "I2C Bus Stop Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPF_A { # [ doc = "0: No stop happens on I2C bus" ] _0 , # [ doc = "1: Stop detected on I2C bus" ] _1 } impl From < STOPF_A > for bool { # [ inline ( always ) ] fn from ( variant : STOPF_A ) -> Self { match variant { STOPF_A :: _0 => false , STOPF_A :: _1 => true } } } # [ doc = "Reader of field `STOPF`" ] pub type STOPF_R = crate :: R < bool , STOPF_A > ; impl STOPF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STOPF_A { match self . bits { false => STOPF_A :: _0 , true => STOPF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STOPF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STOPF_A :: _1 } } # [ doc = "Write proxy for field `STOPF`" ] pub struct STOPF_W < 'a > { w : & 'a mut W , } impl < 'a > STOPF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STOPF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No stop happens on I2C bus" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STOPF_A :: _0 ) } # [ doc = "Stop detected on I2C bus" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STOPF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Stop Hold Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHEN_A { # [ doc = "0: Stop holdoff is disabled. The MCU's entry to stop mode is not gated." ] _0 , # [ doc = "1: Stop holdoff is enabled." ] _1 } impl From < SHEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SHEN_A ) -> Self { match variant { SHEN_A :: _0 => false , SHEN_A :: _1 => true } } } # [ doc = "Reader of field `SHEN`" ] pub type SHEN_R = crate :: R < bool , SHEN_A > ; impl SHEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHEN_A { match self . bits { false => SHEN_A :: _0 , true => SHEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHEN_A :: _1 } } # [ doc = "Write proxy for field `SHEN`" ] pub struct SHEN_W < 'a > { w : & 'a mut W , } impl < 'a > SHEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Stop holdoff is disabled. The MCU's entry to stop mode is not gated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHEN_A :: _0 ) } # [ doc = "Stop holdoff is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - I2C Programmable Filter Factor" ] # [ inline ( always ) ] pub fn flt ( & self ) -> FLT_R { FLT_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bit 4 - I2C Bus Start Detect Flag" ] # [ inline ( always ) ] pub fn startf ( & self ) -> STARTF_R { STARTF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - I2C Bus Stop or Start Interrupt Enable" ] # [ inline ( always ) ] pub fn ssie ( & self ) -> SSIE_R { SSIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C Bus Stop Detect Flag" ] # [ inline ( always ) ] pub fn stopf ( & self ) -> STOPF_R { STOPF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Stop Hold Enable" ] # [ inline ( always ) ] pub fn shen ( & self ) -> SHEN_R { SHEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - I2C Programmable Filter Factor" ] # [ inline ( always ) ] pub fn flt ( & mut self ) -> FLT_W { FLT_W { w : self } } # [ doc = "Bit 4 - I2C Bus Start Detect Flag" ] # [ inline ( always ) ] pub fn startf ( & mut self ) -> STARTF_W { STARTF_W { w : self } } # [ doc = "Bit 5 - I2C Bus Stop or Start Interrupt Enable" ] # [ inline ( always ) ] pub fn ssie ( & mut self ) -> SSIE_W { SSIE_W { w : self } } # [ doc = "Bit 6 - I2C Bus Stop Detect Flag" ] # [ inline ( always ) ] pub fn stopf ( & mut self ) -> STOPF_W { STOPF_W { w : self } } # [ doc = "Bit 7 - Stop Hold Enable" ] # [ inline ( always ) ] pub fn shen ( & mut self ) -> SHEN_W { SHEN_W { w : self } } } } # [ doc = "I2C Range Address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ra](ra) module" ] pub type RA = crate :: Reg < u8 , _RA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RA ; # [ doc = "`read()` method returns [ra::R](ra::R) reader structure" ] impl crate :: Readable for RA { } # [ doc = "`write(|w| ..)` method takes [ra::W](ra::W) writer structure" ] impl crate :: Writable for RA { } # [ doc = "I2C Range Address register" ] pub mod ra { # [ doc = "Reader of register RA" ] pub type R = crate :: R < u8 , super :: RA > ; # [ doc = "Writer for register RA" ] pub type W = crate :: W < u8 , super :: RA > ; # [ doc = "Register RA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RA { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RAD`" ] pub type RAD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RAD`" ] pub struct RAD_W < 'a > { w : & 'a mut W , } impl < 'a > RAD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Range Slave Address" ] # [ inline ( always ) ] pub fn rad ( & self ) -> RAD_R { RAD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Range Slave Address" ] # [ inline ( always ) ] pub fn rad ( & mut self ) -> RAD_W { RAD_W { w : self } } } } # [ doc = "I2C SMBus Control and Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [smb](smb) module" ] pub type SMB = crate :: Reg < u8 , _SMB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SMB ; # [ doc = "`read()` method returns [smb::R](smb::R) reader structure" ] impl crate :: Readable for SMB { } # [ doc = "`write(|w| ..)` method takes [smb::W](smb::W) writer structure" ] impl crate :: Writable for SMB { } # [ doc = "I2C SMBus Control and Status register" ] pub mod smb { # [ doc = "Reader of register SMB" ] pub type R = crate :: R < u8 , super :: SMB > ; # [ doc = "Writer for register SMB" ] pub type W = crate :: W < u8 , super :: SMB > ; # [ doc = "Register SMB `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SMB { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "SHTF2 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF2IE_A { # [ doc = "0: SHTF2 interrupt is disabled" ] _0 , # [ doc = "1: SHTF2 interrupt is enabled" ] _1 } impl From < SHTF2IE_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF2IE_A ) -> Self { match variant { SHTF2IE_A :: _0 => false , SHTF2IE_A :: _1 => true } } } # [ doc = "Reader of field `SHTF2IE`" ] pub type SHTF2IE_R = crate :: R < bool , SHTF2IE_A > ; impl SHTF2IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF2IE_A { match self . bits { false => SHTF2IE_A :: _0 , true => SHTF2IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF2IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF2IE_A :: _1 } } # [ doc = "Write proxy for field `SHTF2IE`" ] pub struct SHTF2IE_W < 'a > { w : & 'a mut W , } impl < 'a > SHTF2IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHTF2IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SHTF2 interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHTF2IE_A :: _0 ) } # [ doc = "SHTF2 interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHTF2IE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "SCL High Timeout Flag 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF2_A { # [ doc = "0: No SCL high and SDA low timeout occurs" ] _0 , # [ doc = "1: SCL high and SDA low timeout occurs" ] _1 } impl From < SHTF2_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF2_A ) -> Self { match variant { SHTF2_A :: _0 => false , SHTF2_A :: _1 => true } } } # [ doc = "Reader of field `SHTF2`" ] pub type SHTF2_R = crate :: R < bool , SHTF2_A > ; impl SHTF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF2_A { match self . bits { false => SHTF2_A :: _0 , true => SHTF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF2_A :: _1 } } # [ doc = "Write proxy for field `SHTF2`" ] pub struct SHTF2_W < 'a > { w : & 'a mut W , } impl < 'a > SHTF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHTF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No SCL high and SDA low timeout occurs" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHTF2_A :: _0 ) } # [ doc = "SCL high and SDA low timeout occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHTF2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "SCL High Timeout Flag 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF1_A { # [ doc = "0: No SCL high and SDA high timeout occurs" ] _0 , # [ doc = "1: SCL high and SDA high timeout occurs" ] _1 } impl From < SHTF1_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF1_A ) -> Self { match variant { SHTF1_A :: _0 => false , SHTF1_A :: _1 => true } } } # [ doc = "Reader of field `SHTF1`" ] pub type SHTF1_R = crate :: R < bool , SHTF1_A > ; impl SHTF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF1_A { match self . bits { false => SHTF1_A :: _0 , true => SHTF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF1_A :: _1 } } # [ doc = "SCL Low Timeout Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLTF_A { # [ doc = "0: No low timeout occurs" ] _0 , # [ doc = "1: Low timeout occurs" ] _1 } impl From < SLTF_A > for bool { # [ inline ( always ) ] fn from ( variant : SLTF_A ) -> Self { match variant { SLTF_A :: _0 => false , SLTF_A :: _1 => true } } } # [ doc = "Reader of field `SLTF`" ] pub type SLTF_R = crate :: R < bool , SLTF_A > ; impl SLTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLTF_A { match self . bits { false => SLTF_A :: _0 , true => SLTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLTF_A :: _1 } } # [ doc = "Write proxy for field `SLTF`" ] pub struct SLTF_W < 'a > { w : & 'a mut W , } impl < 'a > SLTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No low timeout occurs" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLTF_A :: _0 ) } # [ doc = "Low timeout occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLTF_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Timeout Counter Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCKSEL_A { # [ doc = "0: Timeout counter counts at the frequency of the I2C module clock / 64" ] _0 , # [ doc = "1: Timeout counter counts at the frequency of the I2C module clock" ] _1 } impl From < TCKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TCKSEL_A ) -> Self { match variant { TCKSEL_A :: _0 => false , TCKSEL_A :: _1 => true } } } # [ doc = "Reader of field `TCKSEL`" ] pub type TCKSEL_R = crate :: R < bool , TCKSEL_A > ; impl TCKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCKSEL_A { match self . bits { false => TCKSEL_A :: _0 , true => TCKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCKSEL_A :: _1 } } # [ doc = "Write proxy for field `TCKSEL`" ] pub struct TCKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TCKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timeout counter counts at the frequency of the I2C module clock / 64" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCKSEL_A :: _0 ) } # [ doc = "Timeout counter counts at the frequency of the I2C module clock" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCKSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Second I2C Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SIICAEN_A { # [ doc = "0: I2C address register 2 matching is disabled" ] _0 , # [ doc = "1: I2C address register 2 matching is enabled" ] _1 } impl From < SIICAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SIICAEN_A ) -> Self { match variant { SIICAEN_A :: _0 => false , SIICAEN_A :: _1 => true } } } # [ doc = "Reader of field `SIICAEN`" ] pub type SIICAEN_R = crate :: R < bool , SIICAEN_A > ; impl SIICAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SIICAEN_A { match self . bits { false => SIICAEN_A :: _0 , true => SIICAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SIICAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SIICAEN_A :: _1 } } # [ doc = "Write proxy for field `SIICAEN`" ] pub struct SIICAEN_W < 'a > { w : & 'a mut W , } impl < 'a > SIICAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SIICAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "I2C address register 2 matching is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SIICAEN_A :: _0 ) } # [ doc = "I2C address register 2 matching is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SIICAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "SMBus Alert Response Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ALERTEN_A { # [ doc = "0: SMBus alert response address matching is disabled" ] _0 , # [ doc = "1: SMBus alert response address matching is enabled" ] _1 } impl From < ALERTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ALERTEN_A ) -> Self { match variant { ALERTEN_A :: _0 => false , ALERTEN_A :: _1 => true } } } # [ doc = "Reader of field `ALERTEN`" ] pub type ALERTEN_R = crate :: R < bool , ALERTEN_A > ; impl ALERTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ALERTEN_A { match self . bits { false => ALERTEN_A :: _0 , true => ALERTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ALERTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ALERTEN_A :: _1 } } # [ doc = "Write proxy for field `ALERTEN`" ] pub struct ALERTEN_W < 'a > { w : & 'a mut W , } impl < 'a > ALERTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ALERTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SMBus alert response address matching is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ALERTEN_A :: _0 ) } # [ doc = "SMBus alert response address matching is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ALERTEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Fast NACK/ACK Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FACK_A { # [ doc = "0: An ACK or NACK is sent on the following receiving data byte" ] _0 , # [ doc = "1: Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK." ] _1 } impl From < FACK_A > for bool { # [ inline ( always ) ] fn from ( variant : FACK_A ) -> Self { match variant { FACK_A :: _0 => false , FACK_A :: _1 => true } } } # [ doc = "Reader of field `FACK`" ] pub type FACK_R = crate :: R < bool , FACK_A > ; impl FACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FACK_A { match self . bits { false => FACK_A :: _0 , true => FACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FACK_A :: _1 } } # [ doc = "Write proxy for field `FACK`" ] pub struct FACK_W < 'a > { w : & 'a mut W , } impl < 'a > FACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FACK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An ACK or NACK is sent on the following receiving data byte" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FACK_A :: _0 ) } # [ doc = "Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FACK_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - SHTF2 Interrupt Enable" ] # [ inline ( always ) ] pub fn shtf2ie ( & self ) -> SHTF2IE_R { SHTF2IE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - SCL High Timeout Flag 2" ] # [ inline ( always ) ] pub fn shtf2 ( & self ) -> SHTF2_R { SHTF2_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - SCL High Timeout Flag 1" ] # [ inline ( always ) ] pub fn shtf1 ( & self ) -> SHTF1_R { SHTF1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - SCL Low Timeout Flag" ] # [ inline ( always ) ] pub fn sltf ( & self ) -> SLTF_R { SLTF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Timeout Counter Clock Select" ] # [ inline ( always ) ] pub fn tcksel ( & self ) -> TCKSEL_R { TCKSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Second I2C Address Enable" ] # [ inline ( always ) ] pub fn siicaen ( & self ) -> SIICAEN_R { SIICAEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - SMBus Alert Response Address Enable" ] # [ inline ( always ) ] pub fn alerten ( & self ) -> ALERTEN_R { ALERTEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fast NACK/ACK Enable" ] # [ inline ( always ) ] pub fn fack ( & self ) -> FACK_R { FACK_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - SHTF2 Interrupt Enable" ] # [ inline ( always ) ] pub fn shtf2ie ( & mut self ) -> SHTF2IE_W { SHTF2IE_W { w : self } } # [ doc = "Bit 1 - SCL High Timeout Flag 2" ] # [ inline ( always ) ] pub fn shtf2 ( & mut self ) -> SHTF2_W { SHTF2_W { w : self } } # [ doc = "Bit 3 - SCL Low Timeout Flag" ] # [ inline ( always ) ] pub fn sltf ( & mut self ) -> SLTF_W { SLTF_W { w : self } } # [ doc = "Bit 4 - Timeout Counter Clock Select" ] # [ inline ( always ) ] pub fn tcksel ( & mut self ) -> TCKSEL_W { TCKSEL_W { w : self } } # [ doc = "Bit 5 - Second I2C Address Enable" ] # [ inline ( always ) ] pub fn siicaen ( & mut self ) -> SIICAEN_W { SIICAEN_W { w : self } } # [ doc = "Bit 6 - SMBus Alert Response Address Enable" ] # [ inline ( always ) ] pub fn alerten ( & mut self ) -> ALERTEN_W { ALERTEN_W { w : self } } # [ doc = "Bit 7 - Fast NACK/ACK Enable" ] # [ inline ( always ) ] pub fn fack ( & mut self ) -> FACK_W { FACK_W { w : self } } } } # [ doc = "I2C Address Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [a2](a2) module" ] pub type A2 = crate :: Reg < u8 , _A2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _A2 ; # [ doc = "`read()` method returns [a2::R](a2::R) reader structure" ] impl crate :: Readable for A2 { } # [ doc = "`write(|w| ..)` method takes [a2::W](a2::W) writer structure" ] impl crate :: Writable for A2 { } # [ doc = "I2C Address Register 2" ] pub mod a2 { # [ doc = "Reader of register A2" ] pub type R = crate :: R < u8 , super :: A2 > ; # [ doc = "Writer for register A2" ] pub type W = crate :: W < u8 , super :: A2 > ; # [ doc = "Register A2 `reset()`'s with value 0xc2" ] impl crate :: ResetValue for super :: A2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc2 } } # [ doc = "Reader of field `SAD`" ] pub type SAD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SAD`" ] pub struct SAD_W < 'a > { w : & 'a mut W , } impl < 'a > SAD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - SMBus Address" ] # [ inline ( always ) ] pub fn sad ( & self ) -> SAD_R { SAD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - SMBus Address" ] # [ inline ( always ) ] pub fn sad ( & mut self ) -> SAD_W { SAD_W { w : self } } } } # [ doc = "I2C SCL Low Timeout Register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [slth](slth) module" ] pub type SLTH = crate :: Reg < u8 , _SLTH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SLTH ; # [ doc = "`read()` method returns [slth::R](slth::R) reader structure" ] impl crate :: Readable for SLTH { } # [ doc = "`write(|w| ..)` method takes [slth::W](slth::W) writer structure" ] impl crate :: Writable for SLTH { } # [ doc = "I2C SCL Low Timeout Register High" ] pub mod slth { # [ doc = "Reader of register SLTH" ] pub type R = crate :: R < u8 , super :: SLTH > ; # [ doc = "Writer for register SLTH" ] pub type W = crate :: W < u8 , super :: SLTH > ; # [ doc = "Register SLTH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SLTH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SSLT`" ] pub type SSLT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SSLT`" ] pub struct SSLT_W < 'a > { w : & 'a mut W , } impl < 'a > SSLT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SSLT\\[15:8\\]" ] # [ inline ( always ) ] pub fn sslt ( & self ) -> SSLT_R { SSLT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SSLT\\[15:8\\]" ] # [ inline ( always ) ] pub fn sslt ( & mut self ) -> SSLT_W { SSLT_W { w : self } } } } # [ doc = "I2C SCL Low Timeout Register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sltl](sltl) module" ] pub type SLTL = crate :: Reg < u8 , _SLTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SLTL ; # [ doc = "`read()` method returns [sltl::R](sltl::R) reader structure" ] impl crate :: Readable for SLTL { } # [ doc = "`write(|w| ..)` method takes [sltl::W](sltl::W) writer structure" ] impl crate :: Writable for SLTL { } # [ doc = "I2C SCL Low Timeout Register Low" ] pub mod sltl { # [ doc = "Reader of register SLTL" ] pub type R = crate :: R < u8 , super :: SLTL > ; # [ doc = "Writer for register SLTL" ] pub type W = crate :: W < u8 , super :: SLTL > ; # [ doc = "Register SLTL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SLTL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SSLT`" ] pub type SSLT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SSLT`" ] pub struct SSLT_W < 'a > { w : & 'a mut W , } impl < 'a > SSLT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SSLT\\[7:0\\]" ] # [ inline ( always ) ] pub fn sslt ( & self ) -> SSLT_R { SSLT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SSLT\\[7:0\\]" ] # [ inline ( always ) ] pub fn sslt ( & mut self ) -> SSLT_W { SSLT_W { w : self } } } } } # [ doc = "Inter-Integrated Circuit" ] pub struct I2C3 { _marker : PhantomData < * const ( ) > } unsafe impl Send for I2C3 { } impl I2C3 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const i2c3 :: RegisterBlock { 0x400e_7000 as * const _ } } impl Deref for I2C3 { type Target = i2c3 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * I2C3 :: ptr ( ) } } } # [ doc = "Inter-Integrated Circuit" ] pub mod i2c3 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - I2C Address Register 1" ] pub a1 : A1 , # [ doc = "0x01 - I2C Frequency Divider register" ] pub f : F , # [ doc = "0x02 - I2C Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - I2C Status register" ] pub s : S , # [ doc = "0x04 - I2C Data I/O register" ] pub d : D , # [ doc = "0x05 - I2C Control Register 2" ] pub c2 : C2 , # [ doc = "0x06 - I2C Programmable Input Glitch Filter Register" ] pub flt : FLT , # [ doc = "0x07 - I2C Range Address register" ] pub ra : RA , # [ doc = "0x08 - I2C SMBus Control and Status register" ] pub smb : SMB , # [ doc = "0x09 - I2C Address Register 2" ] pub a2 : A2 , # [ doc = "0x0a - I2C SCL Low Timeout Register High" ] pub slth : SLTH , # [ doc = "0x0b - I2C SCL Low Timeout Register Low" ] pub sltl : SLTL , } # [ doc = "I2C Address Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [a1](a1) module" ] pub type A1 = crate :: Reg < u8 , _A1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _A1 ; # [ doc = "`read()` method returns [a1::R](a1::R) reader structure" ] impl crate :: Readable for A1 { } # [ doc = "`write(|w| ..)` method takes [a1::W](a1::W) writer structure" ] impl crate :: Writable for A1 { } # [ doc = "I2C Address Register 1" ] pub mod a1 { # [ doc = "Reader of register A1" ] pub type R = crate :: R < u8 , super :: A1 > ; # [ doc = "Writer for register A1" ] pub type W = crate :: W < u8 , super :: A1 > ; # [ doc = "Register A1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: A1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AD`" ] pub type AD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `AD`" ] pub struct AD_W < 'a > { w : & 'a mut W , } impl < 'a > AD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Address" ] # [ inline ( always ) ] pub fn ad ( & self ) -> AD_R { AD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Address" ] # [ inline ( always ) ] pub fn ad ( & mut self ) -> AD_W { AD_W { w : self } } } } # [ doc = "I2C Frequency Divider register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f](f) module" ] pub type F = crate :: Reg < u8 , _F > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _F ; # [ doc = "`read()` method returns [f::R](f::R) reader structure" ] impl crate :: Readable for F { } # [ doc = "`write(|w| ..)` method takes [f::W](f::W) writer structure" ] impl crate :: Writable for F { } # [ doc = "I2C Frequency Divider register" ] pub mod f { # [ doc = "Reader of register F" ] pub type R = crate :: R < u8 , super :: F > ; # [ doc = "Writer for register F" ] pub type W = crate :: W < u8 , super :: F > ; # [ doc = "Register F `reset()`'s with value 0" ] impl crate :: ResetValue for super :: F { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ICR`" ] pub type ICR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ICR`" ] pub struct ICR_W < 'a > { w : & 'a mut W , } impl < 'a > ICR_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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Multiplier Factor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MULT_A { # [ doc = "0: mul = 1" ] _00 , # [ doc = "1: mul = 2" ] _01 , # [ doc = "2: mul = 4" ] _10 } impl From < MULT_A > for u8 { # [ inline ( always ) ] fn from ( variant : MULT_A ) -> Self { match variant { MULT_A :: _00 => 0 , MULT_A :: _01 => 1 , MULT_A :: _10 => 2 } } } # [ doc = "Reader of field `MULT`" ] pub type MULT_R = crate :: R < u8 , MULT_A > ; impl MULT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , MULT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( MULT_A :: _00 ) , 1 => Val ( MULT_A :: _01 ) , 2 => Val ( MULT_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MULT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MULT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MULT_A :: _10 } } # [ doc = "Write proxy for field `MULT`" ] pub struct MULT_W < 'a > { w : & 'a mut W , } impl < 'a > MULT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MULT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "mul = 1" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _00 ) } # [ doc = "mul = 2" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _01 ) } # [ doc = "mul = 4" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MULT_A :: _10 ) } # [ 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 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - ClockRate" ] # [ inline ( always ) ] pub fn icr ( & self ) -> ICR_R { ICR_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 6:7 - Multiplier Factor" ] # [ inline ( always ) ] pub fn mult ( & self ) -> MULT_R { MULT_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:5 - ClockRate" ] # [ inline ( always ) ] pub fn icr ( & mut self ) -> ICR_W { ICR_W { w : self } } # [ doc = "Bits 6:7 - Multiplier Factor" ] # [ inline ( always ) ] pub fn mult ( & mut self ) -> MULT_W { MULT_W { w : self } } } } # [ doc = "I2C Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "I2C Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: All DMA signalling disabled." ] _0 , # [ doc = "1: DMA transfer is enabled. While SMB\\[FACK\\] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S\\[IAAS\\] and S\\[TCF\\] are set. If the direction of transfer is known from master to slave, then it is not required to check S\\[SRW\\]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All DMA signalling disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA transfer is enabled. While SMB\\[FACK\\] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S\\[IAAS\\] and S\\[TCF\\] are set. If the direction of transfer is known from master to slave, then it is not required to check S\\[SRW\\]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUEN_A { # [ doc = "0: Normal operation. No interrupt generated when address matching in low power mode." ] _0 , # [ doc = "1: Enables the wakeup function in low power mode." ] _1 } impl From < WUEN_A > for bool { # [ inline ( always ) ] fn from ( variant : WUEN_A ) -> Self { match variant { WUEN_A :: _0 => false , WUEN_A :: _1 => true } } } # [ doc = "Reader of field `WUEN`" ] pub type WUEN_R = crate :: R < bool , WUEN_A > ; impl WUEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUEN_A { match self . bits { false => WUEN_A :: _0 , true => WUEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUEN_A :: _1 } } # [ doc = "Write proxy for field `WUEN`" ] pub struct WUEN_W < 'a > { w : & 'a mut W , } impl < 'a > WUEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation. No interrupt generated when address matching in low power mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUEN_A :: _0 ) } # [ doc = "Enables the wakeup function in low power mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Write proxy for field `RSTA`" ] pub struct RSTA_W < 'a > { w : & 'a mut W , } impl < 'a > RSTA_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmit Acknowledge Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXAK_A { # [ doc = "0: An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set)." ] _0 , # [ doc = "1: No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set)." ] _1 } impl From < TXAK_A > for bool { # [ inline ( always ) ] fn from ( variant : TXAK_A ) -> Self { match variant { TXAK_A :: _0 => false , TXAK_A :: _1 => true } } } # [ doc = "Reader of field `TXAK`" ] pub type TXAK_R = crate :: R < bool , TXAK_A > ; impl TXAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXAK_A { match self . bits { false => TXAK_A :: _0 , true => TXAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXAK_A :: _1 } } # [ doc = "Write proxy for field `TXAK`" ] pub struct TXAK_W < 'a > { w : & 'a mut W , } impl < 'a > TXAK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXAK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXAK_A :: _0 ) } # [ doc = "No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXAK_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TX_A { # [ doc = "0: Receive" ] _0 , # [ doc = "1: Transmit" ] _1 } impl From < TX_A > for bool { # [ inline ( always ) ] fn from ( variant : TX_A ) -> Self { match variant { TX_A :: _0 => false , TX_A :: _1 => true } } } # [ doc = "Reader of field `TX`" ] pub type TX_R = crate :: R < bool , TX_A > ; impl TX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TX_A { match self . bits { false => TX_A :: _0 , true => TX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TX_A :: _1 } } # [ doc = "Write proxy for field `TX`" ] pub struct TX_W < 'a > { w : & 'a mut W , } impl < 'a > TX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TX_A :: _0 ) } # [ doc = "Transmit" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TX_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Master Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MST_A { # [ doc = "0: Slave mode" ] _0 , # [ doc = "1: Master mode" ] _1 } impl From < MST_A > for bool { # [ inline ( always ) ] fn from ( variant : MST_A ) -> Self { match variant { MST_A :: _0 => false , MST_A :: _1 => true } } } # [ doc = "Reader of field `MST`" ] pub type MST_R = crate :: R < bool , MST_A > ; impl MST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MST_A { match self . bits { false => MST_A :: _0 , true => MST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MST_A :: _1 } } # [ doc = "Write proxy for field `MST`" ] pub struct MST_W < 'a > { w : & 'a mut W , } impl < 'a > MST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Slave mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MST_A :: _0 ) } # [ doc = "Master mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MST_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "I2C Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICIE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IICIE_A > for bool { # [ inline ( always ) ] fn from ( variant : IICIE_A ) -> Self { match variant { IICIE_A :: _0 => false , IICIE_A :: _1 => true } } } # [ doc = "Reader of field `IICIE`" ] pub type IICIE_R = crate :: R < bool , IICIE_A > ; impl IICIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICIE_A { match self . bits { false => IICIE_A :: _0 , true => IICIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICIE_A :: _1 } } # [ doc = "Write proxy for field `IICIE`" ] pub struct IICIE_W < 'a > { w : & 'a mut W , } impl < 'a > IICIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICIE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "I2C Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IICEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IICEN_A ) -> Self { match variant { IICEN_A :: _0 => false , IICEN_A :: _1 => true } } } # [ doc = "Reader of field `IICEN`" ] pub type IICEN_R = crate :: R < bool , IICEN_A > ; impl IICEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICEN_A { match self . bits { false => IICEN_A :: _0 , true => IICEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICEN_A :: _1 } } # [ doc = "Write proxy for field `IICEN`" ] pub struct IICEN_W < 'a > { w : & 'a mut W , } impl < 'a > IICEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Enable" ] # [ inline ( always ) ] pub fn wuen ( & self ) -> WUEN_R { WUEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmit Acknowledge Enable" ] # [ inline ( always ) ] pub fn txak ( & self ) -> TXAK_R { TXAK_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Mode Select" ] # [ inline ( always ) ] pub fn tx ( & self ) -> TX_R { TX_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Master Mode Select" ] # [ inline ( always ) ] pub fn mst ( & self ) -> MST_R { MST_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C Interrupt Enable" ] # [ inline ( always ) ] pub fn iicie ( & self ) -> IICIE_R { IICIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - I2C Enable" ] # [ inline ( always ) ] pub fn iicen ( & self ) -> IICEN_R { IICEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bit 1 - Wakeup Enable" ] # [ inline ( always ) ] pub fn wuen ( & mut self ) -> WUEN_W { WUEN_W { w : self } } # [ doc = "Bit 2 - Repeat START" ] # [ inline ( always ) ] pub fn rsta ( & mut self ) -> RSTA_W { RSTA_W { w : self } } # [ doc = "Bit 3 - Transmit Acknowledge Enable" ] # [ inline ( always ) ] pub fn txak ( & mut self ) -> TXAK_W { TXAK_W { w : self } } # [ doc = "Bit 4 - Transmit Mode Select" ] # [ inline ( always ) ] pub fn tx ( & mut self ) -> TX_W { TX_W { w : self } } # [ doc = "Bit 5 - Master Mode Select" ] # [ inline ( always ) ] pub fn mst ( & mut self ) -> MST_W { MST_W { w : self } } # [ doc = "Bit 6 - I2C Interrupt Enable" ] # [ inline ( always ) ] pub fn iicie ( & mut self ) -> IICIE_W { IICIE_W { w : self } } # [ doc = "Bit 7 - I2C Enable" ] # [ inline ( always ) ] pub fn iicen ( & mut self ) -> IICEN_W { IICEN_W { w : self } } } } # [ doc = "I2C Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s](s) module" ] pub type S = crate :: Reg < u8 , _S > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S ; # [ doc = "`read()` method returns [s::R](s::R) reader structure" ] impl crate :: Readable for S { } # [ doc = "`write(|w| ..)` method takes [s::W](s::W) writer structure" ] impl crate :: Writable for S { } # [ doc = "I2C Status register" ] pub mod s { # [ doc = "Reader of register S" ] pub type R = crate :: R < u8 , super :: S > ; # [ doc = "Writer for register S" ] pub type W = crate :: W < u8 , super :: S > ; # [ doc = "Register S `reset()`'s with value 0x80" ] impl crate :: ResetValue for super :: S { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x80 } } # [ doc = "Receive Acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXAK_A { # [ doc = "0: Acknowledge signal was received after the completion of one byte of data transmission on the bus" ] _0 , # [ doc = "1: No acknowledge signal detected" ] _1 } impl From < RXAK_A > for bool { # [ inline ( always ) ] fn from ( variant : RXAK_A ) -> Self { match variant { RXAK_A :: _0 => false , RXAK_A :: _1 => true } } } # [ doc = "Reader of field `RXAK`" ] pub type RXAK_R = crate :: R < bool , RXAK_A > ; impl RXAK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXAK_A { match self . bits { false => RXAK_A :: _0 , true => RXAK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXAK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXAK_A :: _1 } } # [ doc = "Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IICIF_A { # [ doc = "0: No interrupt pending" ] _0 , # [ doc = "1: Interrupt pending" ] _1 } impl From < IICIF_A > for bool { # [ inline ( always ) ] fn from ( variant : IICIF_A ) -> Self { match variant { IICIF_A :: _0 => false , IICIF_A :: _1 => true } } } # [ doc = "Reader of field `IICIF`" ] pub type IICIF_R = crate :: R < bool , IICIF_A > ; impl IICIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IICIF_A { match self . bits { false => IICIF_A :: _0 , true => IICIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IICIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IICIF_A :: _1 } } # [ doc = "Write proxy for field `IICIF`" ] pub struct IICIF_W < 'a > { w : & 'a mut W , } impl < 'a > IICIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IICIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No interrupt pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IICIF_A :: _0 ) } # [ doc = "Interrupt pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IICIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Slave Read/Write\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRW_A { # [ doc = "0: Slave receive, master writing to slave" ] _0 , # [ doc = "1: Slave transmit, master reading from slave" ] _1 } impl From < SRW_A > for bool { # [ inline ( always ) ] fn from ( variant : SRW_A ) -> Self { match variant { SRW_A :: _0 => false , SRW_A :: _1 => true } } } # [ doc = "Reader of field `SRW`" ] pub type SRW_R = crate :: R < bool , SRW_A > ; impl SRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRW_A { match self . bits { false => SRW_A :: _0 , true => SRW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRW_A :: _1 } } # [ doc = "Range Address Match\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAM_A { # [ doc = "0: Not addressed" ] _0 , # [ doc = "1: Addressed as a slave" ] _1 } impl From < RAM_A > for bool { # [ inline ( always ) ] fn from ( variant : RAM_A ) -> Self { match variant { RAM_A :: _0 => false , RAM_A :: _1 => true } } } # [ doc = "Reader of field `RAM`" ] pub type RAM_R = crate :: R < bool , RAM_A > ; impl RAM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAM_A { match self . bits { false => RAM_A :: _0 , true => RAM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAM_A :: _1 } } # [ doc = "Write proxy for field `RAM`" ] pub struct RAM_W < 'a > { w : & 'a mut W , } impl < 'a > RAM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RAM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not addressed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RAM_A :: _0 ) } # [ doc = "Addressed as a slave" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RAM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Arbitration Lost\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ARBL_A { # [ doc = "0: Standard bus operation." ] _0 , # [ doc = "1: Loss of arbitration." ] _1 } impl From < ARBL_A > for bool { # [ inline ( always ) ] fn from ( variant : ARBL_A ) -> Self { match variant { ARBL_A :: _0 => false , ARBL_A :: _1 => true } } } # [ doc = "Reader of field `ARBL`" ] pub type ARBL_R = crate :: R < bool , ARBL_A > ; impl ARBL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ARBL_A { match self . bits { false => ARBL_A :: _0 , true => ARBL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ARBL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ARBL_A :: _1 } } # [ doc = "Write proxy for field `ARBL`" ] pub struct ARBL_W < 'a > { w : & 'a mut W , } impl < 'a > ARBL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ARBL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Standard bus operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ARBL_A :: _0 ) } # [ doc = "Loss of arbitration." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ARBL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Bus Busy\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUSY_A { # [ doc = "0: Bus is idle" ] _0 , # [ doc = "1: Bus is busy" ] _1 } impl From < BUSY_A > for bool { # [ inline ( always ) ] fn from ( variant : BUSY_A ) -> Self { match variant { BUSY_A :: _0 => false , BUSY_A :: _1 => true } } } # [ doc = "Reader of field `BUSY`" ] pub type BUSY_R = crate :: R < bool , BUSY_A > ; impl BUSY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUSY_A { match self . bits { false => BUSY_A :: _0 , true => BUSY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUSY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUSY_A :: _1 } } # [ doc = "Addressed As A Slave\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IAAS_A { # [ doc = "0: Not addressed" ] _0 , # [ doc = "1: Addressed as a slave" ] _1 } impl From < IAAS_A > for bool { # [ inline ( always ) ] fn from ( variant : IAAS_A ) -> Self { match variant { IAAS_A :: _0 => false , IAAS_A :: _1 => true } } } # [ doc = "Reader of field `IAAS`" ] pub type IAAS_R = crate :: R < bool , IAAS_A > ; impl IAAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IAAS_A { match self . bits { false => IAAS_A :: _0 , true => IAAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IAAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IAAS_A :: _1 } } # [ doc = "Write proxy for field `IAAS`" ] pub struct IAAS_W < 'a > { w : & 'a mut W , } impl < 'a > IAAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IAAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not addressed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IAAS_A :: _0 ) } # [ doc = "Addressed as a slave" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IAAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transfer Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCF_A { # [ doc = "0: Transfer in progress" ] _0 , # [ doc = "1: Transfer complete" ] _1 } impl From < TCF_A > for bool { # [ inline ( always ) ] fn from ( variant : TCF_A ) -> Self { match variant { TCF_A :: _0 => false , TCF_A :: _1 => true } } } # [ doc = "Reader of field `TCF`" ] pub type TCF_R = crate :: R < bool , TCF_A > ; impl TCF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCF_A { match self . bits { false => TCF_A :: _0 , true => TCF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCF_A :: _1 } } impl R { # [ doc = "Bit 0 - Receive Acknowledge" ] # [ inline ( always ) ] pub fn rxak ( & self ) -> RXAK_R { RXAK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Interrupt Flag" ] # [ inline ( always ) ] pub fn iicif ( & self ) -> IICIF_R { IICIF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Slave Read/Write" ] # [ inline ( always ) ] pub fn srw ( & self ) -> SRW_R { SRW_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Range Address Match" ] # [ inline ( always ) ] pub fn ram ( & self ) -> RAM_R { RAM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Arbitration Lost" ] # [ inline ( always ) ] pub fn arbl ( & self ) -> ARBL_R { ARBL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Bus Busy" ] # [ inline ( always ) ] pub fn busy ( & self ) -> BUSY_R { BUSY_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Addressed As A Slave" ] # [ inline ( always ) ] pub fn iaas ( & self ) -> IAAS_R { IAAS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transfer Complete Flag" ] # [ inline ( always ) ] pub fn tcf ( & self ) -> TCF_R { TCF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Interrupt Flag" ] # [ inline ( always ) ] pub fn iicif ( & mut self ) -> IICIF_W { IICIF_W { w : self } } # [ doc = "Bit 3 - Range Address Match" ] # [ inline ( always ) ] pub fn ram ( & mut self ) -> RAM_W { RAM_W { w : self } } # [ doc = "Bit 4 - Arbitration Lost" ] # [ inline ( always ) ] pub fn arbl ( & mut self ) -> ARBL_W { ARBL_W { w : self } } # [ doc = "Bit 6 - Addressed As A Slave" ] # [ inline ( always ) ] pub fn iaas ( & mut self ) -> IAAS_W { IAAS_W { w : self } } } } # [ doc = "I2C Data I/O register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "I2C Data I/O register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA`" ] pub type DATA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Data" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Data" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "I2C Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "I2C Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AD`" ] pub type AD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `AD`" ] pub struct AD_W < 'a > { w : & 'a mut W , } impl < 'a > AD_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 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Range Address Matching Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RMEN_A { # [ doc = "0: Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers." ] _0 , # [ doc = "1: Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers." ] _1 } impl From < RMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : RMEN_A ) -> Self { match variant { RMEN_A :: _0 => false , RMEN_A :: _1 => true } } } # [ doc = "Reader of field `RMEN`" ] pub type RMEN_R = crate :: R < bool , RMEN_A > ; impl RMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RMEN_A { match self . bits { false => RMEN_A :: _0 , true => RMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RMEN_A :: _1 } } # [ doc = "Write proxy for field `RMEN`" ] pub struct RMEN_W < 'a > { w : & 'a mut W , } impl < 'a > RMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RMEN_A :: _0 ) } # [ doc = "Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RMEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Slave Baud Rate Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBRC_A { # [ doc = "0: The slave baud rate follows the master baud rate and clock stretching may occur" ] _0 , # [ doc = "1: Slave baud rate is independent of the master baud rate" ] _1 } impl From < SBRC_A > for bool { # [ inline ( always ) ] fn from ( variant : SBRC_A ) -> Self { match variant { SBRC_A :: _0 => false , SBRC_A :: _1 => true } } } # [ doc = "Reader of field `SBRC`" ] pub type SBRC_R = crate :: R < bool , SBRC_A > ; impl SBRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBRC_A { match self . bits { false => SBRC_A :: _0 , true => SBRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBRC_A :: _1 } } # [ doc = "Write proxy for field `SBRC`" ] pub struct SBRC_W < 'a > { w : & 'a mut W , } impl < 'a > SBRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The slave baud rate follows the master baud rate and clock stretching may occur" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBRC_A :: _0 ) } # [ doc = "Slave baud rate is independent of the master baud rate" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBRC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "High Drive Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HDRS_A { # [ doc = "0: Normal drive mode" ] _0 , # [ doc = "1: High drive mode" ] _1 } impl From < HDRS_A > for bool { # [ inline ( always ) ] fn from ( variant : HDRS_A ) -> Self { match variant { HDRS_A :: _0 => false , HDRS_A :: _1 => true } } } # [ doc = "Reader of field `HDRS`" ] pub type HDRS_R = crate :: R < bool , HDRS_A > ; impl HDRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HDRS_A { match self . bits { false => HDRS_A :: _0 , true => HDRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HDRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HDRS_A :: _1 } } # [ doc = "Write proxy for field `HDRS`" ] pub struct HDRS_W < 'a > { w : & 'a mut W , } impl < 'a > HDRS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HDRS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal drive mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HDRS_A :: _0 ) } # [ doc = "High drive mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HDRS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Address Extension\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADEXT_A { # [ doc = "0: 7-bit address scheme" ] _0 , # [ doc = "1: 10-bit address scheme" ] _1 } impl From < ADEXT_A > for bool { # [ inline ( always ) ] fn from ( variant : ADEXT_A ) -> Self { match variant { ADEXT_A :: _0 => false , ADEXT_A :: _1 => true } } } # [ doc = "Reader of field `ADEXT`" ] pub type ADEXT_R = crate :: R < bool , ADEXT_A > ; impl ADEXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADEXT_A { match self . bits { false => ADEXT_A :: _0 , true => ADEXT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADEXT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADEXT_A :: _1 } } # [ doc = "Write proxy for field `ADEXT`" ] pub struct ADEXT_W < 'a > { w : & 'a mut W , } impl < 'a > ADEXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADEXT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "7-bit address scheme" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADEXT_A :: _0 ) } # [ doc = "10-bit address scheme" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADEXT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "General Call Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GCAEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < GCAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GCAEN_A ) -> Self { match variant { GCAEN_A :: _0 => false , GCAEN_A :: _1 => true } } } # [ doc = "Reader of field `GCAEN`" ] pub type GCAEN_R = crate :: R < bool , GCAEN_A > ; impl GCAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GCAEN_A { match self . bits { false => GCAEN_A :: _0 , true => GCAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GCAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GCAEN_A :: _1 } } # [ doc = "Write proxy for field `GCAEN`" ] pub struct GCAEN_W < 'a > { w : & 'a mut W , } impl < 'a > GCAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GCAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GCAEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GCAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Slave Address" ] # [ inline ( always ) ] pub fn ad ( & self ) -> AD_R { AD_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Range Address Matching Enable" ] # [ inline ( always ) ] pub fn rmen ( & self ) -> RMEN_R { RMEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Slave Baud Rate Control" ] # [ inline ( always ) ] pub fn sbrc ( & self ) -> SBRC_R { SBRC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - High Drive Select" ] # [ inline ( always ) ] pub fn hdrs ( & self ) -> HDRS_R { HDRS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Address Extension" ] # [ inline ( always ) ] pub fn adext ( & self ) -> ADEXT_R { ADEXT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - General Call Address Enable" ] # [ inline ( always ) ] pub fn gcaen ( & self ) -> GCAEN_R { GCAEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Slave Address" ] # [ inline ( always ) ] pub fn ad ( & mut self ) -> AD_W { AD_W { w : self } } # [ doc = "Bit 3 - Range Address Matching Enable" ] # [ inline ( always ) ] pub fn rmen ( & mut self ) -> RMEN_W { RMEN_W { w : self } } # [ doc = "Bit 4 - Slave Baud Rate Control" ] # [ inline ( always ) ] pub fn sbrc ( & mut self ) -> SBRC_W { SBRC_W { w : self } } # [ doc = "Bit 5 - High Drive Select" ] # [ inline ( always ) ] pub fn hdrs ( & mut self ) -> HDRS_W { HDRS_W { w : self } } # [ doc = "Bit 6 - Address Extension" ] # [ inline ( always ) ] pub fn adext ( & mut self ) -> ADEXT_W { ADEXT_W { w : self } } # [ doc = "Bit 7 - General Call Address Enable" ] # [ inline ( always ) ] pub fn gcaen ( & mut self ) -> GCAEN_W { GCAEN_W { w : self } } } } # [ doc = "I2C Programmable Input Glitch Filter Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [flt](flt) module" ] pub type FLT = crate :: Reg < u8 , _FLT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FLT ; # [ doc = "`read()` method returns [flt::R](flt::R) reader structure" ] impl crate :: Readable for FLT { } # [ doc = "`write(|w| ..)` method takes [flt::W](flt::W) writer structure" ] impl crate :: Writable for FLT { } # [ doc = "I2C Programmable Input Glitch Filter Register" ] pub mod flt { # [ doc = "Reader of register FLT" ] pub type R = crate :: R < u8 , super :: FLT > ; # [ doc = "Writer for register FLT" ] pub type W = crate :: W < u8 , super :: FLT > ; # [ doc = "Register FLT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FLT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "I2C Programmable Filter Factor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FLT_A { # [ doc = "0: No filter/bypass" ] _0 } impl From < FLT_A > for u8 { # [ inline ( always ) ] fn from ( variant : FLT_A ) -> Self { match variant { FLT_A :: _0 => 0 } } } # [ doc = "Reader of field `FLT`" ] pub type FLT_R = crate :: R < u8 , FLT_A > ; impl FLT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FLT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FLT_A :: _0 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FLT_A :: _0 } } # [ doc = "Write proxy for field `FLT`" ] pub struct FLT_W < 'a > { w : & 'a mut W , } impl < 'a > FLT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FLT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No filter/bypass" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FLT_A :: _0 ) } # [ 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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "I2C Bus Start Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTF_A { # [ doc = "0: No start happens on I2C bus" ] _0 , # [ doc = "1: Start detected on I2C bus" ] _1 } impl From < STARTF_A > for bool { # [ inline ( always ) ] fn from ( variant : STARTF_A ) -> Self { match variant { STARTF_A :: _0 => false , STARTF_A :: _1 => true } } } # [ doc = "Reader of field `STARTF`" ] pub type STARTF_R = crate :: R < bool , STARTF_A > ; impl STARTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STARTF_A { match self . bits { false => STARTF_A :: _0 , true => STARTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STARTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STARTF_A :: _1 } } # [ doc = "Write proxy for field `STARTF`" ] pub struct STARTF_W < 'a > { w : & 'a mut W , } impl < 'a > STARTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STARTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No start happens on I2C bus" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STARTF_A :: _0 ) } # [ doc = "Start detected on I2C bus" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STARTF_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "I2C Bus Stop or Start Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SSIE_A { # [ doc = "0: Stop or start detection interrupt is disabled" ] _0 , # [ doc = "1: Stop or start detection interrupt is enabled" ] _1 } impl From < SSIE_A > for bool { # [ inline ( always ) ] fn from ( variant : SSIE_A ) -> Self { match variant { SSIE_A :: _0 => false , SSIE_A :: _1 => true } } } # [ doc = "Reader of field `SSIE`" ] pub type SSIE_R = crate :: R < bool , SSIE_A > ; impl SSIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SSIE_A { match self . bits { false => SSIE_A :: _0 , true => SSIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SSIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SSIE_A :: _1 } } # [ doc = "Write proxy for field `SSIE`" ] pub struct SSIE_W < 'a > { w : & 'a mut W , } impl < 'a > SSIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SSIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Stop or start detection interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SSIE_A :: _0 ) } # [ doc = "Stop or start detection interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SSIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "I2C Bus Stop Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPF_A { # [ doc = "0: No stop happens on I2C bus" ] _0 , # [ doc = "1: Stop detected on I2C bus" ] _1 } impl From < STOPF_A > for bool { # [ inline ( always ) ] fn from ( variant : STOPF_A ) -> Self { match variant { STOPF_A :: _0 => false , STOPF_A :: _1 => true } } } # [ doc = "Reader of field `STOPF`" ] pub type STOPF_R = crate :: R < bool , STOPF_A > ; impl STOPF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STOPF_A { match self . bits { false => STOPF_A :: _0 , true => STOPF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STOPF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STOPF_A :: _1 } } # [ doc = "Write proxy for field `STOPF`" ] pub struct STOPF_W < 'a > { w : & 'a mut W , } impl < 'a > STOPF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STOPF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No stop happens on I2C bus" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STOPF_A :: _0 ) } # [ doc = "Stop detected on I2C bus" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STOPF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Stop Hold Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHEN_A { # [ doc = "0: Stop holdoff is disabled. The MCU's entry to stop mode is not gated." ] _0 , # [ doc = "1: Stop holdoff is enabled." ] _1 } impl From < SHEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SHEN_A ) -> Self { match variant { SHEN_A :: _0 => false , SHEN_A :: _1 => true } } } # [ doc = "Reader of field `SHEN`" ] pub type SHEN_R = crate :: R < bool , SHEN_A > ; impl SHEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHEN_A { match self . bits { false => SHEN_A :: _0 , true => SHEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHEN_A :: _1 } } # [ doc = "Write proxy for field `SHEN`" ] pub struct SHEN_W < 'a > { w : & 'a mut W , } impl < 'a > SHEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Stop holdoff is disabled. The MCU's entry to stop mode is not gated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHEN_A :: _0 ) } # [ doc = "Stop holdoff is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - I2C Programmable Filter Factor" ] # [ inline ( always ) ] pub fn flt ( & self ) -> FLT_R { FLT_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bit 4 - I2C Bus Start Detect Flag" ] # [ inline ( always ) ] pub fn startf ( & self ) -> STARTF_R { STARTF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - I2C Bus Stop or Start Interrupt Enable" ] # [ inline ( always ) ] pub fn ssie ( & self ) -> SSIE_R { SSIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - I2C Bus Stop Detect Flag" ] # [ inline ( always ) ] pub fn stopf ( & self ) -> STOPF_R { STOPF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Stop Hold Enable" ] # [ inline ( always ) ] pub fn shen ( & self ) -> SHEN_R { SHEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:3 - I2C Programmable Filter Factor" ] # [ inline ( always ) ] pub fn flt ( & mut self ) -> FLT_W { FLT_W { w : self } } # [ doc = "Bit 4 - I2C Bus Start Detect Flag" ] # [ inline ( always ) ] pub fn startf ( & mut self ) -> STARTF_W { STARTF_W { w : self } } # [ doc = "Bit 5 - I2C Bus Stop or Start Interrupt Enable" ] # [ inline ( always ) ] pub fn ssie ( & mut self ) -> SSIE_W { SSIE_W { w : self } } # [ doc = "Bit 6 - I2C Bus Stop Detect Flag" ] # [ inline ( always ) ] pub fn stopf ( & mut self ) -> STOPF_W { STOPF_W { w : self } } # [ doc = "Bit 7 - Stop Hold Enable" ] # [ inline ( always ) ] pub fn shen ( & mut self ) -> SHEN_W { SHEN_W { w : self } } } } # [ doc = "I2C Range Address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ra](ra) module" ] pub type RA = crate :: Reg < u8 , _RA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RA ; # [ doc = "`read()` method returns [ra::R](ra::R) reader structure" ] impl crate :: Readable for RA { } # [ doc = "`write(|w| ..)` method takes [ra::W](ra::W) writer structure" ] impl crate :: Writable for RA { } # [ doc = "I2C Range Address register" ] pub mod ra { # [ doc = "Reader of register RA" ] pub type R = crate :: R < u8 , super :: RA > ; # [ doc = "Writer for register RA" ] pub type W = crate :: W < u8 , super :: RA > ; # [ doc = "Register RA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RA { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RAD`" ] pub type RAD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RAD`" ] pub struct RAD_W < 'a > { w : & 'a mut W , } impl < 'a > RAD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Range Slave Address" ] # [ inline ( always ) ] pub fn rad ( & self ) -> RAD_R { RAD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Range Slave Address" ] # [ inline ( always ) ] pub fn rad ( & mut self ) -> RAD_W { RAD_W { w : self } } } } # [ doc = "I2C SMBus Control and Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [smb](smb) module" ] pub type SMB = crate :: Reg < u8 , _SMB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SMB ; # [ doc = "`read()` method returns [smb::R](smb::R) reader structure" ] impl crate :: Readable for SMB { } # [ doc = "`write(|w| ..)` method takes [smb::W](smb::W) writer structure" ] impl crate :: Writable for SMB { } # [ doc = "I2C SMBus Control and Status register" ] pub mod smb { # [ doc = "Reader of register SMB" ] pub type R = crate :: R < u8 , super :: SMB > ; # [ doc = "Writer for register SMB" ] pub type W = crate :: W < u8 , super :: SMB > ; # [ doc = "Register SMB `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SMB { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "SHTF2 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF2IE_A { # [ doc = "0: SHTF2 interrupt is disabled" ] _0 , # [ doc = "1: SHTF2 interrupt is enabled" ] _1 } impl From < SHTF2IE_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF2IE_A ) -> Self { match variant { SHTF2IE_A :: _0 => false , SHTF2IE_A :: _1 => true } } } # [ doc = "Reader of field `SHTF2IE`" ] pub type SHTF2IE_R = crate :: R < bool , SHTF2IE_A > ; impl SHTF2IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF2IE_A { match self . bits { false => SHTF2IE_A :: _0 , true => SHTF2IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF2IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF2IE_A :: _1 } } # [ doc = "Write proxy for field `SHTF2IE`" ] pub struct SHTF2IE_W < 'a > { w : & 'a mut W , } impl < 'a > SHTF2IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHTF2IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SHTF2 interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHTF2IE_A :: _0 ) } # [ doc = "SHTF2 interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHTF2IE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "SCL High Timeout Flag 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF2_A { # [ doc = "0: No SCL high and SDA low timeout occurs" ] _0 , # [ doc = "1: SCL high and SDA low timeout occurs" ] _1 } impl From < SHTF2_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF2_A ) -> Self { match variant { SHTF2_A :: _0 => false , SHTF2_A :: _1 => true } } } # [ doc = "Reader of field `SHTF2`" ] pub type SHTF2_R = crate :: R < bool , SHTF2_A > ; impl SHTF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF2_A { match self . bits { false => SHTF2_A :: _0 , true => SHTF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF2_A :: _1 } } # [ doc = "Write proxy for field `SHTF2`" ] pub struct SHTF2_W < 'a > { w : & 'a mut W , } impl < 'a > SHTF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHTF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No SCL high and SDA low timeout occurs" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHTF2_A :: _0 ) } # [ doc = "SCL high and SDA low timeout occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHTF2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "SCL High Timeout Flag 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHTF1_A { # [ doc = "0: No SCL high and SDA high timeout occurs" ] _0 , # [ doc = "1: SCL high and SDA high timeout occurs" ] _1 } impl From < SHTF1_A > for bool { # [ inline ( always ) ] fn from ( variant : SHTF1_A ) -> Self { match variant { SHTF1_A :: _0 => false , SHTF1_A :: _1 => true } } } # [ doc = "Reader of field `SHTF1`" ] pub type SHTF1_R = crate :: R < bool , SHTF1_A > ; impl SHTF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHTF1_A { match self . bits { false => SHTF1_A :: _0 , true => SHTF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHTF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHTF1_A :: _1 } } # [ doc = "SCL Low Timeout Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLTF_A { # [ doc = "0: No low timeout occurs" ] _0 , # [ doc = "1: Low timeout occurs" ] _1 } impl From < SLTF_A > for bool { # [ inline ( always ) ] fn from ( variant : SLTF_A ) -> Self { match variant { SLTF_A :: _0 => false , SLTF_A :: _1 => true } } } # [ doc = "Reader of field `SLTF`" ] pub type SLTF_R = crate :: R < bool , SLTF_A > ; impl SLTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLTF_A { match self . bits { false => SLTF_A :: _0 , true => SLTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLTF_A :: _1 } } # [ doc = "Write proxy for field `SLTF`" ] pub struct SLTF_W < 'a > { w : & 'a mut W , } impl < 'a > SLTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No low timeout occurs" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLTF_A :: _0 ) } # [ doc = "Low timeout occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLTF_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Timeout Counter Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCKSEL_A { # [ doc = "0: Timeout counter counts at the frequency of the I2C module clock / 64" ] _0 , # [ doc = "1: Timeout counter counts at the frequency of the I2C module clock" ] _1 } impl From < TCKSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TCKSEL_A ) -> Self { match variant { TCKSEL_A :: _0 => false , TCKSEL_A :: _1 => true } } } # [ doc = "Reader of field `TCKSEL`" ] pub type TCKSEL_R = crate :: R < bool , TCKSEL_A > ; impl TCKSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCKSEL_A { match self . bits { false => TCKSEL_A :: _0 , true => TCKSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCKSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCKSEL_A :: _1 } } # [ doc = "Write proxy for field `TCKSEL`" ] pub struct TCKSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TCKSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCKSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timeout counter counts at the frequency of the I2C module clock / 64" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCKSEL_A :: _0 ) } # [ doc = "Timeout counter counts at the frequency of the I2C module clock" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCKSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Second I2C Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SIICAEN_A { # [ doc = "0: I2C address register 2 matching is disabled" ] _0 , # [ doc = "1: I2C address register 2 matching is enabled" ] _1 } impl From < SIICAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SIICAEN_A ) -> Self { match variant { SIICAEN_A :: _0 => false , SIICAEN_A :: _1 => true } } } # [ doc = "Reader of field `SIICAEN`" ] pub type SIICAEN_R = crate :: R < bool , SIICAEN_A > ; impl SIICAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SIICAEN_A { match self . bits { false => SIICAEN_A :: _0 , true => SIICAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SIICAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SIICAEN_A :: _1 } } # [ doc = "Write proxy for field `SIICAEN`" ] pub struct SIICAEN_W < 'a > { w : & 'a mut W , } impl < 'a > SIICAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SIICAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "I2C address register 2 matching is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SIICAEN_A :: _0 ) } # [ doc = "I2C address register 2 matching is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SIICAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "SMBus Alert Response Address Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ALERTEN_A { # [ doc = "0: SMBus alert response address matching is disabled" ] _0 , # [ doc = "1: SMBus alert response address matching is enabled" ] _1 } impl From < ALERTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ALERTEN_A ) -> Self { match variant { ALERTEN_A :: _0 => false , ALERTEN_A :: _1 => true } } } # [ doc = "Reader of field `ALERTEN`" ] pub type ALERTEN_R = crate :: R < bool , ALERTEN_A > ; impl ALERTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ALERTEN_A { match self . bits { false => ALERTEN_A :: _0 , true => ALERTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ALERTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ALERTEN_A :: _1 } } # [ doc = "Write proxy for field `ALERTEN`" ] pub struct ALERTEN_W < 'a > { w : & 'a mut W , } impl < 'a > ALERTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ALERTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SMBus alert response address matching is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ALERTEN_A :: _0 ) } # [ doc = "SMBus alert response address matching is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ALERTEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Fast NACK/ACK Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FACK_A { # [ doc = "0: An ACK or NACK is sent on the following receiving data byte" ] _0 , # [ doc = "1: Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK." ] _1 } impl From < FACK_A > for bool { # [ inline ( always ) ] fn from ( variant : FACK_A ) -> Self { match variant { FACK_A :: _0 => false , FACK_A :: _1 => true } } } # [ doc = "Reader of field `FACK`" ] pub type FACK_R = crate :: R < bool , FACK_A > ; impl FACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FACK_A { match self . bits { false => FACK_A :: _0 , true => FACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FACK_A :: _1 } } # [ doc = "Write proxy for field `FACK`" ] pub struct FACK_W < 'a > { w : & 'a mut W , } impl < 'a > FACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FACK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "An ACK or NACK is sent on the following receiving data byte" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FACK_A :: _0 ) } # [ doc = "Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FACK_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - SHTF2 Interrupt Enable" ] # [ inline ( always ) ] pub fn shtf2ie ( & self ) -> SHTF2IE_R { SHTF2IE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - SCL High Timeout Flag 2" ] # [ inline ( always ) ] pub fn shtf2 ( & self ) -> SHTF2_R { SHTF2_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - SCL High Timeout Flag 1" ] # [ inline ( always ) ] pub fn shtf1 ( & self ) -> SHTF1_R { SHTF1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - SCL Low Timeout Flag" ] # [ inline ( always ) ] pub fn sltf ( & self ) -> SLTF_R { SLTF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Timeout Counter Clock Select" ] # [ inline ( always ) ] pub fn tcksel ( & self ) -> TCKSEL_R { TCKSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Second I2C Address Enable" ] # [ inline ( always ) ] pub fn siicaen ( & self ) -> SIICAEN_R { SIICAEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - SMBus Alert Response Address Enable" ] # [ inline ( always ) ] pub fn alerten ( & self ) -> ALERTEN_R { ALERTEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Fast NACK/ACK Enable" ] # [ inline ( always ) ] pub fn fack ( & self ) -> FACK_R { FACK_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - SHTF2 Interrupt Enable" ] # [ inline ( always ) ] pub fn shtf2ie ( & mut self ) -> SHTF2IE_W { SHTF2IE_W { w : self } } # [ doc = "Bit 1 - SCL High Timeout Flag 2" ] # [ inline ( always ) ] pub fn shtf2 ( & mut self ) -> SHTF2_W { SHTF2_W { w : self } } # [ doc = "Bit 3 - SCL Low Timeout Flag" ] # [ inline ( always ) ] pub fn sltf ( & mut self ) -> SLTF_W { SLTF_W { w : self } } # [ doc = "Bit 4 - Timeout Counter Clock Select" ] # [ inline ( always ) ] pub fn tcksel ( & mut self ) -> TCKSEL_W { TCKSEL_W { w : self } } # [ doc = "Bit 5 - Second I2C Address Enable" ] # [ inline ( always ) ] pub fn siicaen ( & mut self ) -> SIICAEN_W { SIICAEN_W { w : self } } # [ doc = "Bit 6 - SMBus Alert Response Address Enable" ] # [ inline ( always ) ] pub fn alerten ( & mut self ) -> ALERTEN_W { ALERTEN_W { w : self } } # [ doc = "Bit 7 - Fast NACK/ACK Enable" ] # [ inline ( always ) ] pub fn fack ( & mut self ) -> FACK_W { FACK_W { w : self } } } } # [ doc = "I2C Address Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [a2](a2) module" ] pub type A2 = crate :: Reg < u8 , _A2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _A2 ; # [ doc = "`read()` method returns [a2::R](a2::R) reader structure" ] impl crate :: Readable for A2 { } # [ doc = "`write(|w| ..)` method takes [a2::W](a2::W) writer structure" ] impl crate :: Writable for A2 { } # [ doc = "I2C Address Register 2" ] pub mod a2 { # [ doc = "Reader of register A2" ] pub type R = crate :: R < u8 , super :: A2 > ; # [ doc = "Writer for register A2" ] pub type W = crate :: W < u8 , super :: A2 > ; # [ doc = "Register A2 `reset()`'s with value 0xc2" ] impl crate :: ResetValue for super :: A2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc2 } } # [ doc = "Reader of field `SAD`" ] pub type SAD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SAD`" ] pub struct SAD_W < 'a > { w : & 'a mut W , } impl < 'a > SAD_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - SMBus Address" ] # [ inline ( always ) ] pub fn sad ( & self ) -> SAD_R { SAD_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - SMBus Address" ] # [ inline ( always ) ] pub fn sad ( & mut self ) -> SAD_W { SAD_W { w : self } } } } # [ doc = "I2C SCL Low Timeout Register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [slth](slth) module" ] pub type SLTH = crate :: Reg < u8 , _SLTH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SLTH ; # [ doc = "`read()` method returns [slth::R](slth::R) reader structure" ] impl crate :: Readable for SLTH { } # [ doc = "`write(|w| ..)` method takes [slth::W](slth::W) writer structure" ] impl crate :: Writable for SLTH { } # [ doc = "I2C SCL Low Timeout Register High" ] pub mod slth { # [ doc = "Reader of register SLTH" ] pub type R = crate :: R < u8 , super :: SLTH > ; # [ doc = "Writer for register SLTH" ] pub type W = crate :: W < u8 , super :: SLTH > ; # [ doc = "Register SLTH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SLTH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SSLT`" ] pub type SSLT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SSLT`" ] pub struct SSLT_W < 'a > { w : & 'a mut W , } impl < 'a > SSLT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SSLT\\[15:8\\]" ] # [ inline ( always ) ] pub fn sslt ( & self ) -> SSLT_R { SSLT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SSLT\\[15:8\\]" ] # [ inline ( always ) ] pub fn sslt ( & mut self ) -> SSLT_W { SSLT_W { w : self } } } } # [ doc = "I2C SCL Low Timeout Register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sltl](sltl) module" ] pub type SLTL = crate :: Reg < u8 , _SLTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SLTL ; # [ doc = "`read()` method returns [sltl::R](sltl::R) reader structure" ] impl crate :: Readable for SLTL { } # [ doc = "`write(|w| ..)` method takes [sltl::W](sltl::W) writer structure" ] impl crate :: Writable for SLTL { } # [ doc = "I2C SCL Low Timeout Register Low" ] pub mod sltl { # [ doc = "Reader of register SLTL" ] pub type R = crate :: R < u8 , super :: SLTL > ; # [ doc = "Writer for register SLTL" ] pub type W = crate :: W < u8 , super :: SLTL > ; # [ doc = "Register SLTL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SLTL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SSLT`" ] pub type SSLT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SSLT`" ] pub struct SSLT_W < 'a > { w : & 'a mut W , } impl < 'a > SSLT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - SSLT\\[7:0\\]" ] # [ inline ( always ) ] pub fn sslt ( & self ) -> SSLT_R { SSLT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - SSLT\\[7:0\\]" ] # [ inline ( always ) ] pub fn sslt ( & mut self ) -> SSLT_W { SSLT_W { w : self } } } } } # [ doc = "Serial Communication Interface" ] pub struct UART0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for UART0 { } impl UART0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const uart0 :: RegisterBlock { 0x4006_a000 as * const _ } } impl Deref for UART0 { type Target = uart0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * UART0 :: ptr ( ) } } } # [ doc = "Serial Communication Interface" ] pub mod uart0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - UART Baud Rate Registers: High" ] pub bdh : BDH , # [ doc = "0x01 - UART Baud Rate Registers: Low" ] pub bdl : BDL , # [ doc = "0x02 - UART Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - UART Control Register 2" ] pub c2 : C2 , # [ doc = "0x04 - UART Status Register 1" ] pub s1 : S1 , # [ doc = "0x05 - UART Status Register 2" ] pub s2 : S2 , # [ doc = "0x06 - UART Control Register 3" ] pub c3 : C3 , # [ doc = "0x07 - UART Data Register" ] pub d : D , # [ doc = "0x08 - UART Match Address Registers 1" ] pub ma1 : MA1 , # [ doc = "0x09 - UART Match Address Registers 2" ] pub ma2 : MA2 , # [ doc = "0x0a - UART Control Register 4" ] pub c4 : C4 , # [ doc = "0x0b - UART Control Register 5" ] pub c5 : C5 , # [ doc = "0x0c - UART Extended Data Register" ] pub ed : ED , # [ doc = "0x0d - UART Modem Register" ] pub modem : MODEM , # [ doc = "0x0e - UART Infrared Register" ] pub ir : IR , _reserved15 : [ u8 ; 1usize ] , # [ doc = "0x10 - UART FIFO Parameters" ] pub pfifo : PFIFO , # [ doc = "0x11 - UART FIFO Control Register" ] pub cfifo : CFIFO , # [ doc = "0x12 - UART FIFO Status Register" ] pub sfifo : SFIFO , # [ doc = "0x13 - UART FIFO Transmit Watermark" ] pub twfifo : TWFIFO , # [ doc = "0x14 - UART FIFO Transmit Count" ] pub tcfifo : TCFIFO , # [ doc = "0x15 - UART FIFO Receive Watermark" ] pub rwfifo : RWFIFO , # [ doc = "0x16 - UART FIFO Receive Count" ] pub rcfifo : RCFIFO , _reserved22 : [ u8 ; 1usize ] , # [ doc = "0x18 - UART 7816 Control Register" ] pub c7816 : C7816 , # [ doc = "0x19 - UART 7816 Interrupt Enable Register" ] pub ie7816 : IE7816 , # [ doc = "0x1a - UART 7816 Interrupt Status Register" ] pub is7816 : IS7816 , # [ doc = "0x1b - UART 7816 Wait Parameter Register" ] pub wp7816 : WP7816 , # [ doc = "0x1c - UART 7816 Wait N Register" ] pub wn7816 : WN7816 , # [ doc = "0x1d - UART 7816 Wait FD Register" ] pub wf7816 : WF7816 , # [ doc = "0x1e - UART 7816 Error Threshold Register" ] pub et7816 : ET7816 , # [ doc = "0x1f - UART 7816 Transmit Length Register" ] pub tl7816 : TL7816 , _reserved30 : [ u8 ; 26usize ] , # [ doc = "0x3a - UART 7816 ATR Duration Timer Register A" ] pub ap7816a_t0 : AP7816A_T0 , # [ doc = "0x3b - UART 7816 ATR Duration Timer Register B" ] pub ap7816b_t0 : AP7816B_T0 , _reserved_32_wp7816a_t : [ u8 ; 1usize ] , _reserved_33_wp7816b_t : [ u8 ; 1usize ] , # [ doc = "0x3e - UART 7816 Wait and Guard Parameter Register" ] pub wgp7816_t1 : WGP7816_T1 , # [ doc = "0x3f - UART 7816 Wait Parameter Register C" ] pub wp7816c_t1 : WP7816C_T1 , } impl RegisterBlock { # [ doc = "0x3c - UART 7816 Wait Parameter Register A" ] # [ inline ( always ) ] pub fn wp7816a_t1 ( & self ) -> & WP7816A_T1 { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 60usize ) as * const WP7816A_T1 ) } } # [ doc = "0x3c - UART 7816 Wait Parameter Register A" ] # [ inline ( always ) ] pub fn wp7816a_t1_mut ( & self ) -> & mut WP7816A_T1 { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 60usize ) as * mut WP7816A_T1 ) } } # [ doc = "0x3c - UART 7816 Wait Parameter Register A" ] # [ inline ( always ) ] pub fn wp7816a_t0 ( & self ) -> & WP7816A_T0 { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 60usize ) as * const WP7816A_T0 ) } } # [ doc = "0x3c - UART 7816 Wait Parameter Register A" ] # [ inline ( always ) ] pub fn wp7816a_t0_mut ( & self ) -> & mut WP7816A_T0 { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 60usize ) as * mut WP7816A_T0 ) } } # [ doc = "0x3d - UART 7816 Wait Parameter Register B" ] # [ inline ( always ) ] pub fn wp7816b_t1 ( & self ) -> & WP7816B_T1 { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 61usize ) as * const WP7816B_T1 ) } } # [ doc = "0x3d - UART 7816 Wait Parameter Register B" ] # [ inline ( always ) ] pub fn wp7816b_t1_mut ( & self ) -> & mut WP7816B_T1 { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 61usize ) as * mut WP7816B_T1 ) } } # [ doc = "0x3d - UART 7816 Wait Parameter Register B" ] # [ inline ( always ) ] pub fn wp7816b_t0 ( & self ) -> & WP7816B_T0 { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 61usize ) as * const WP7816B_T0 ) } } # [ doc = "0x3d - UART 7816 Wait Parameter Register B" ] # [ inline ( always ) ] pub fn wp7816b_t0_mut ( & self ) -> & mut WP7816B_T0 { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 61usize ) as * mut WP7816B_T0 ) } } } # [ doc = "UART Baud Rate Registers: High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdh](bdh) module" ] pub type BDH = crate :: Reg < u8 , _BDH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDH ; # [ doc = "`read()` method returns [bdh::R](bdh::R) reader structure" ] impl crate :: Readable for BDH { } # [ doc = "`write(|w| ..)` method takes [bdh::W](bdh::W) writer structure" ] impl crate :: Writable for BDH { } # [ doc = "UART Baud Rate Registers: High" ] pub mod bdh { # [ doc = "Reader of register BDH" ] pub type R = crate :: R < u8 , super :: BDH > ; # [ doc = "Writer for register BDH" ] pub type W = crate :: W < u8 , super :: BDH > ; # [ doc = "Register BDH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BDH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Stop Bit Number Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBNS_A { # [ doc = "0: Data frame consists of a single stop bit." ] _0 , # [ doc = "1: Data frame consists of two stop bits." ] _1 } impl From < SBNS_A > for bool { # [ inline ( always ) ] fn from ( variant : SBNS_A ) -> Self { match variant { SBNS_A :: _0 => false , SBNS_A :: _1 => true } } } # [ doc = "Reader of field `SBNS`" ] pub type SBNS_R = crate :: R < bool , SBNS_A > ; impl SBNS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBNS_A { match self . bits { false => SBNS_A :: _0 , true => SBNS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBNS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBNS_A :: _1 } } # [ doc = "Write proxy for field `SBNS`" ] pub struct SBNS_W < 'a > { w : & 'a mut W , } impl < 'a > SBNS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBNS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data frame consists of a single stop bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _0 ) } # [ doc = "Data frame consists of two stop bits." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Input Active Edge Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIE_A { # [ doc = "0: Hardware interrupts from RXEDGIF disabled using polling." ] _0 , # [ doc = "1: RXEDGIF interrupt request enabled." ] _1 } impl From < RXEDGIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIE_A ) -> Self { match variant { RXEDGIE_A :: _0 => false , RXEDGIE_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIE`" ] pub type RXEDGIE_R = crate :: R < bool , RXEDGIE_A > ; impl RXEDGIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIE_A { match self . bits { false => RXEDGIE_A :: _0 , true => RXEDGIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIE_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIE`" ] pub struct RXEDGIE_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from RXEDGIF disabled using polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _0 ) } # [ doc = "RXEDGIF interrupt request enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIE_A { # [ doc = "0: LBKDIF interrupt requests disabled." ] _0 , # [ doc = "1: LBKDIF interrupt requests enabled." ] _1 } impl From < LBKDIE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIE_A ) -> Self { match variant { LBKDIE_A :: _0 => false , LBKDIE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIE`" ] pub type LBKDIE_R = crate :: R < bool , LBKDIE_A > ; impl LBKDIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIE_A { match self . bits { false => LBKDIE_A :: _0 , true => LBKDIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIE_A :: _1 } } # [ doc = "Write proxy for field `LBKDIE`" ] pub struct LBKDIE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LBKDIF interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _0 ) } # [ doc = "LBKDIF interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & self ) -> SBNS_R { SBNS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & self ) -> RXEDGIE_R { RXEDGIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & self ) -> LBKDIE_R { LBKDIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & mut self ) -> SBNS_W { SBNS_W { w : self } } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & mut self ) -> RXEDGIE_W { RXEDGIE_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & mut self ) -> LBKDIE_W { LBKDIE_W { w : self } } } } # [ doc = "UART Baud Rate Registers: Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdl](bdl) module" ] pub type BDL = crate :: Reg < u8 , _BDL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDL ; # [ doc = "`read()` method returns [bdl::R](bdl::R) reader structure" ] impl crate :: Readable for BDL { } # [ doc = "`write(|w| ..)` method takes [bdl::W](bdl::W) writer structure" ] impl crate :: Writable for BDL { } # [ doc = "UART Baud Rate Registers: Low" ] pub mod bdl { # [ doc = "Reader of register BDL" ] pub type R = crate :: R < u8 , super :: BDL > ; # [ doc = "Writer for register BDL" ] pub type W = crate :: W < u8 , super :: BDL > ; # [ doc = "Register BDL `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: BDL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } } } # [ doc = "UART Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "UART Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PT_A { # [ doc = "0: Even parity." ] _0 , # [ doc = "1: Odd parity." ] _1 } impl From < PT_A > for bool { # [ inline ( always ) ] fn from ( variant : PT_A ) -> Self { match variant { PT_A :: _0 => false , PT_A :: _1 => true } } } # [ doc = "Reader of field `PT`" ] pub type PT_R = crate :: R < bool , PT_A > ; impl PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PT_A { match self . bits { false => PT_A :: _0 , true => PT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PT_A :: _1 } } # [ doc = "Write proxy for field `PT`" ] pub struct PT_W < 'a > { w : & 'a mut W , } impl < 'a > PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Even parity." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PT_A :: _0 ) } # [ doc = "Odd parity." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PT_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Parity Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Parity function disabled." ] _0 , # [ doc = "1: Parity function enabled." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Parity function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Parity function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Idle Line Type Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILT_A { # [ doc = "0: Idle character bit count starts after start bit." ] _0 , # [ doc = "1: Idle character bit count starts after stop bit." ] _1 } impl From < ILT_A > for bool { # [ inline ( always ) ] fn from ( variant : ILT_A ) -> Self { match variant { ILT_A :: _0 => false , ILT_A :: _1 => true } } } # [ doc = "Reader of field `ILT`" ] pub type ILT_R = crate :: R < bool , ILT_A > ; impl ILT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILT_A { match self . bits { false => ILT_A :: _0 , true => ILT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILT_A :: _1 } } # [ doc = "Write proxy for field `ILT`" ] pub struct ILT_W < 'a > { w : & 'a mut W , } impl < 'a > ILT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle character bit count starts after start bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _0 ) } # [ doc = "Idle character bit count starts after stop bit." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver Wakeup Method Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKE_A { # [ doc = "0: Idle line wakeup." ] _0 , # [ doc = "1: Address mark wakeup." ] _1 } impl From < WAKE_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKE_A ) -> Self { match variant { WAKE_A :: _0 => false , WAKE_A :: _1 => true } } } # [ doc = "Reader of field `WAKE`" ] pub type WAKE_R = crate :: R < bool , WAKE_A > ; impl WAKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKE_A { match self . bits { false => WAKE_A :: _0 , true => WAKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKE_A :: _1 } } # [ doc = "Write proxy for field `WAKE`" ] pub struct WAKE_W < 'a > { w : & 'a mut W , } impl < 'a > WAKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle line wakeup." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _0 ) } # [ doc = "Address mark wakeup." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "9-bit or 8-bit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M_A { # [ doc = "0: Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] _0 , # [ doc = "1: Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] _1 } impl From < M_A > for bool { # [ inline ( always ) ] fn from ( variant : M_A ) -> Self { match variant { M_A :: _0 => false , M_A :: _1 => true } } } # [ doc = "Reader of field `M`" ] pub type M_R = crate :: R < bool , M_A > ; impl M_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M_A { match self . bits { false => M_A :: _0 , true => M_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M_A :: _1 } } # [ doc = "Write proxy for field `M`" ] pub struct M_W < 'a > { w : & 'a mut W , } impl < 'a > M_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M_A :: _0 ) } # [ doc = "Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSRC_A { # [ doc = "0: Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] _0 , # [ doc = "1: Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] _1 } impl From < RSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : RSRC_A ) -> Self { match variant { RSRC_A :: _0 => false , RSRC_A :: _1 => true } } } # [ doc = "Reader of field `RSRC`" ] pub type RSRC_R = crate :: R < bool , RSRC_A > ; impl RSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSRC_A { match self . bits { false => RSRC_A :: _0 , true => RSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RSRC_A :: _1 } } # [ doc = "Write proxy for field `RSRC`" ] pub struct RSRC_W < 'a > { w : & 'a mut W , } impl < 'a > RSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _0 ) } # [ doc = "Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "UART Stops in Wait Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UARTSWAI_A { # [ doc = "0: UART clock continues to run in Wait mode." ] _0 , # [ doc = "1: UART clock freezes while CPU is in Wait mode." ] _1 } impl From < UARTSWAI_A > for bool { # [ inline ( always ) ] fn from ( variant : UARTSWAI_A ) -> Self { match variant { UARTSWAI_A :: _0 => false , UARTSWAI_A :: _1 => true } } } # [ doc = "Reader of field `UARTSWAI`" ] pub type UARTSWAI_R = crate :: R < bool , UARTSWAI_A > ; impl UARTSWAI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UARTSWAI_A { match self . bits { false => UARTSWAI_A :: _0 , true => UARTSWAI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UARTSWAI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UARTSWAI_A :: _1 } } # [ doc = "Write proxy for field `UARTSWAI`" ] pub struct UARTSWAI_W < 'a > { w : & 'a mut W , } impl < 'a > UARTSWAI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UARTSWAI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "UART clock continues to run in Wait mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _0 ) } # [ doc = "UART clock freezes while CPU is in Wait mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Loop Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] _1 } impl From < LOOPS_A > for bool { # [ inline ( always ) ] fn from ( variant : LOOPS_A ) -> Self { match variant { LOOPS_A :: _0 => false , LOOPS_A :: _1 => true } } } # [ doc = "Reader of field `LOOPS`" ] pub type LOOPS_R = crate :: R < bool , LOOPS_A > ; impl LOOPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOOPS_A { match self . bits { false => LOOPS_A :: _0 , true => LOOPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOOPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOOPS_A :: _1 } } # [ doc = "Write proxy for field `LOOPS`" ] pub struct LOOPS_W < 'a > { w : & 'a mut W , } impl < 'a > LOOPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOOPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _0 ) } # [ doc = "Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & self ) -> PT_R { PT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & self ) -> ILT_R { ILT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & self ) -> WAKE_R { WAKE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & self ) -> M_R { M_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & self ) -> RSRC_R { RSRC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & self ) -> UARTSWAI_R { UARTSWAI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & self ) -> LOOPS_R { LOOPS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & mut self ) -> PT_W { PT_W { w : self } } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & mut self ) -> ILT_W { ILT_W { w : self } } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & mut self ) -> WAKE_W { WAKE_W { w : self } } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & mut self ) -> M_W { M_W { w : self } } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & mut self ) -> RSRC_W { RSRC_W { w : self } } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & mut self ) -> UARTSWAI_W { UARTSWAI_W { w : self } } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & mut self ) -> LOOPS_W { LOOPS_W { w : self } } } } # [ doc = "UART Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "UART Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Send Break\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBK_A { # [ doc = "0: Normal transmitter operation." ] _0 , # [ doc = "1: Queue break characters to be sent." ] _1 } impl From < SBK_A > for bool { # [ inline ( always ) ] fn from ( variant : SBK_A ) -> Self { match variant { SBK_A :: _0 => false , SBK_A :: _1 => true } } } # [ doc = "Reader of field `SBK`" ] pub type SBK_R = crate :: R < bool , SBK_A > ; impl SBK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBK_A { match self . bits { false => SBK_A :: _0 , true => SBK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBK_A :: _1 } } # [ doc = "Write proxy for field `SBK`" ] pub struct SBK_W < 'a > { w : & 'a mut W , } impl < 'a > SBK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal transmitter operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _0 ) } # [ doc = "Queue break characters to be sent." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Receiver Wakeup Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWU_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] _1 } impl From < RWU_A > for bool { # [ inline ( always ) ] fn from ( variant : RWU_A ) -> Self { match variant { RWU_A :: _0 => false , RWU_A :: _1 => true } } } # [ doc = "Reader of field `RWU`" ] pub type RWU_R = crate :: R < bool , RWU_A > ; impl RWU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWU_A { match self . bits { false => RWU_A :: _0 , true => RWU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWU_A :: _1 } } # [ doc = "Write proxy for field `RWU`" ] pub struct RWU_W < 'a > { w : & 'a mut W , } impl < 'a > RWU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _0 ) } # [ doc = "RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RE_A { # [ doc = "0: Receiver off." ] _0 , # [ doc = "1: Receiver on." ] _1 } impl From < RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RE_A ) -> Self { match variant { RE_A :: _0 => false , RE_A :: _1 => true } } } # [ doc = "Reader of field `RE`" ] pub type RE_R = crate :: R < bool , RE_A > ; impl RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RE_A { match self . bits { false => RE_A :: _0 , true => RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RE_A :: _1 } } # [ doc = "Write proxy for field `RE`" ] pub struct RE_W < 'a > { w : & 'a mut W , } impl < 'a > RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RE_A :: _0 ) } # [ doc = "Receiver on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmitter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TE_A { # [ doc = "0: Transmitter off." ] _0 , # [ doc = "1: Transmitter on." ] _1 } impl From < TE_A > for bool { # [ inline ( always ) ] fn from ( variant : TE_A ) -> Self { match variant { TE_A :: _0 => false , TE_A :: _1 => true } } } # [ doc = "Reader of field `TE`" ] pub type TE_R = crate :: R < bool , TE_A > ; impl TE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TE_A { match self . bits { false => TE_A :: _0 , true => TE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TE_A :: _1 } } # [ doc = "Write proxy for field `TE`" ] pub struct TE_W < 'a > { w : & 'a mut W , } impl < 'a > TE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TE_A :: _0 ) } # [ doc = "Transmitter on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Idle Line Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILIE_A { # [ doc = "0: IDLE interrupt requests disabled." ] _0 , # [ doc = "1: IDLE interrupt requests enabled." ] _1 } impl From < ILIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ILIE_A ) -> Self { match variant { ILIE_A :: _0 => false , ILIE_A :: _1 => true } } } # [ doc = "Reader of field `ILIE`" ] pub type ILIE_R = crate :: R < bool , ILIE_A > ; impl ILIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILIE_A { match self . bits { false => ILIE_A :: _0 , true => ILIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILIE_A :: _1 } } # [ doc = "Write proxy for field `ILIE`" ] pub struct ILIE_W < 'a > { w : & 'a mut W , } impl < 'a > ILIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IDLE interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _0 ) } # [ doc = "IDLE interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Full Interrupt or DMA Transfer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RIE_A { # [ doc = "0: RDRF interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: RDRF interrupt or DMA transfer requests enabled." ] _1 } impl From < RIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RIE_A ) -> Self { match variant { RIE_A :: _0 => false , RIE_A :: _1 => true } } } # [ doc = "Reader of field `RIE`" ] pub type RIE_R = crate :: R < bool , RIE_A > ; impl RIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RIE_A { match self . bits { false => RIE_A :: _0 , true => RIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RIE_A :: _1 } } # [ doc = "Write proxy for field `RIE`" ] pub struct RIE_W < 'a > { w : & 'a mut W , } impl < 'a > RIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RDRF interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _0 ) } # [ doc = "RDRF interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmission Complete Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCIE_A { # [ doc = "0: TC interrupt requests disabled." ] _0 , # [ doc = "1: TC interrupt requests enabled." ] _1 } impl From < TCIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCIE_A ) -> Self { match variant { TCIE_A :: _0 => false , TCIE_A :: _1 => true } } } # [ doc = "Reader of field `TCIE`" ] pub type TCIE_R = crate :: R < bool , TCIE_A > ; impl TCIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCIE_A { match self . bits { false => TCIE_A :: _0 , true => TCIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCIE_A :: _1 } } # [ doc = "Write proxy for field `TCIE`" ] pub struct TCIE_W < 'a > { w : & 'a mut W , } impl < 'a > TCIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TC interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _0 ) } # [ doc = "TC interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmitter Interrupt or DMA Transfer Enable.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: TDRE interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: TDRE interrupt or DMA transfer requests enabled." ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TDRE interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "TDRE interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & self ) -> SBK_R { SBK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & self ) -> RWU_R { RWU_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & self ) -> RE_R { RE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & self ) -> TE_R { TE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & self ) -> ILIE_R { ILIE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & self ) -> RIE_R { RIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & self ) -> TCIE_R { TCIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & mut self ) -> SBK_W { SBK_W { w : self } } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & mut self ) -> RWU_W { RWU_W { w : self } } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & mut self ) -> RE_W { RE_W { w : self } } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & mut self ) -> TE_W { TE_W { w : self } } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & mut self ) -> ILIE_W { ILIE_W { w : self } } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & mut self ) -> RIE_W { RIE_W { w : self } } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & mut self ) -> TCIE_W { TCIE_W { w : self } } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } } } # [ doc = "UART Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s1](s1) module" ] pub type S1 = crate :: Reg < u8 , _S1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S1 ; # [ doc = "`read()` method returns [s1::R](s1::R) reader structure" ] impl crate :: Readable for S1 { } # [ doc = "UART Status Register 1" ] pub mod s1 { # [ doc = "Reader of register S1" ] pub type R = crate :: R < u8 , super :: S1 > ; # [ doc = "Parity Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PF_A { # [ doc = "0: No parity error detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1, then there may be data in the receive buffer what was received with a parity error." ] _0 , # [ doc = "1: At least one dataword was received with a parity error since the last time this flag was cleared." ] _1 } impl From < PF_A > for bool { # [ inline ( always ) ] fn from ( variant : PF_A ) -> Self { match variant { PF_A :: _0 => false , PF_A :: _1 => true } } } # [ doc = "Reader of field `PF`" ] pub type PF_R = crate :: R < bool , PF_A > ; impl PF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PF_A { match self . bits { false => PF_A :: _0 , true => PF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PF_A :: _1 } } # [ doc = "Framing Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FE_A { # [ doc = "0: No framing error detected." ] _0 , # [ doc = "1: Framing error." ] _1 } impl From < FE_A > for bool { # [ inline ( always ) ] fn from ( variant : FE_A ) -> Self { match variant { FE_A :: _0 => false , FE_A :: _1 => true } } } # [ doc = "Reader of field `FE`" ] pub type FE_R = crate :: R < bool , FE_A > ; impl FE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FE_A { match self . bits { false => FE_A :: _0 , true => FE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FE_A :: _1 } } # [ doc = "Noise Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NF_A { # [ doc = "0: No noise detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1 then there may be data in the receiver buffer that was received with noise." ] _0 , # [ doc = "1: At least one dataword was received with noise detected since the last time the flag was cleared." ] _1 } impl From < NF_A > for bool { # [ inline ( always ) ] fn from ( variant : NF_A ) -> Self { match variant { NF_A :: _0 => false , NF_A :: _1 => true } } } # [ doc = "Reader of field `NF`" ] pub type NF_R = crate :: R < bool , NF_A > ; impl NF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NF_A { match self . bits { false => NF_A :: _0 , true => NF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NF_A :: _1 } } # [ doc = "Receiver Overrun Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OR_A { # [ doc = "0: No overrun has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: Overrun has occurred or the overrun flag has not been cleared since the last overrun occurred." ] _1 } impl From < OR_A > for bool { # [ inline ( always ) ] fn from ( variant : OR_A ) -> Self { match variant { OR_A :: _0 => false , OR_A :: _1 => true } } } # [ doc = "Reader of field `OR`" ] pub type OR_R = crate :: R < bool , OR_A > ; impl OR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OR_A { match self . bits { false => OR_A :: _0 , true => OR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OR_A :: _1 } } # [ doc = "Idle Line Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLE_A { # [ doc = "0: Receiver input is either active now or has never become active since the IDLE flag was last cleared." ] _0 , # [ doc = "1: Receiver input has become idle or the flag has not been cleared since it last asserted." ] _1 } impl From < IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLE_A ) -> Self { match variant { IDLE_A :: _0 => false , IDLE_A :: _1 => true } } } # [ doc = "Reader of field `IDLE`" ] pub type IDLE_R = crate :: R < bool , IDLE_A > ; impl IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLE_A { match self . bits { false => IDLE_A :: _0 , true => IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLE_A :: _1 } } # [ doc = "Receive Data Register Full Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDRF_A { # [ doc = "0: The number of datawords in the receive buffer is less than the number indicated by RXWATER." ] _0 , # [ doc = "1: The number of datawords in the receive buffer is equal to or greater than the number indicated by RXWATER at some point in time since this flag was last cleared." ] _1 } impl From < RDRF_A > for bool { # [ inline ( always ) ] fn from ( variant : RDRF_A ) -> Self { match variant { RDRF_A :: _0 => false , RDRF_A :: _1 => true } } } # [ doc = "Reader of field `RDRF`" ] pub type RDRF_R = crate :: R < bool , RDRF_A > ; impl RDRF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDRF_A { match self . bits { false => RDRF_A :: _0 , true => RDRF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDRF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDRF_A :: _1 } } # [ doc = "Transmit Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TC_A { # [ doc = "0: Transmitter active (sending data, a preamble, or a break)." ] _0 , # [ doc = "1: Transmitter idle (transmission activity complete)." ] _1 } impl From < TC_A > for bool { # [ inline ( always ) ] fn from ( variant : TC_A ) -> Self { match variant { TC_A :: _0 => false , TC_A :: _1 => true } } } # [ doc = "Reader of field `TC`" ] pub type TC_R = crate :: R < bool , TC_A > ; impl TC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TC_A { match self . bits { false => TC_A :: _0 , true => TC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TC_A :: _1 } } # [ doc = "Transmit Data Register Empty Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDRE_A { # [ doc = "0: The amount of data in the transmit buffer is greater than the value indicated by TWFIFO\\[TXWATER\\]." ] _0 , # [ doc = "1: The amount of data in the transmit buffer is less than or equal to the value indicated by TWFIFO\\[TXWATER\\] at some point in time since the flag has been cleared." ] _1 } impl From < TDRE_A > for bool { # [ inline ( always ) ] fn from ( variant : TDRE_A ) -> Self { match variant { TDRE_A :: _0 => false , TDRE_A :: _1 => true } } } # [ doc = "Reader of field `TDRE`" ] pub type TDRE_R = crate :: R < bool , TDRE_A > ; impl TDRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDRE_A { match self . bits { false => TDRE_A :: _0 , true => TDRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDRE_A :: _1 } } impl R { # [ doc = "Bit 0 - Parity Error Flag" ] # [ inline ( always ) ] pub fn pf ( & self ) -> PF_R { PF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Flag" ] # [ inline ( always ) ] pub fn fe ( & self ) -> FE_R { FE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Flag" ] # [ inline ( always ) ] pub fn nf ( & self ) -> NF_R { NF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Overrun Flag" ] # [ inline ( always ) ] pub fn or ( & self ) -> OR_R { OR_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Flag" ] # [ inline ( always ) ] pub fn idle ( & self ) -> IDLE_R { IDLE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receive Data Register Full Flag" ] # [ inline ( always ) ] pub fn rdrf ( & self ) -> RDRF_R { RDRF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Complete Flag" ] # [ inline ( always ) ] pub fn tc ( & self ) -> TC_R { TC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Data Register Empty Flag" ] # [ inline ( always ) ] pub fn tdre ( & self ) -> TDRE_R { TDRE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Status Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s2](s2) module" ] pub type S2 = crate :: Reg < u8 , _S2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S2 ; # [ doc = "`read()` method returns [s2::R](s2::R) reader structure" ] impl crate :: Readable for S2 { } # [ doc = "`write(|w| ..)` method takes [s2::W](s2::W) writer structure" ] impl crate :: Writable for S2 { } # [ doc = "UART Status Register 2" ] pub mod s2 { # [ doc = "Reader of register S2" ] pub type R = crate :: R < u8 , super :: S2 > ; # [ doc = "Writer for register S2" ] pub type W = crate :: W < u8 , super :: S2 > ; # [ doc = "Register S2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: S2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Active Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAF_A { # [ doc = "0: UART receiver idle/inactive waiting for a start bit." ] _0 , # [ doc = "1: UART receiver active, RxD input not idle." ] _1 } impl From < RAF_A > for bool { # [ inline ( always ) ] fn from ( variant : RAF_A ) -> Self { match variant { RAF_A :: _0 => false , RAF_A :: _1 => true } } } # [ doc = "Reader of field `RAF`" ] pub type RAF_R = crate :: R < bool , RAF_A > ; impl RAF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAF_A { match self . bits { false => RAF_A :: _0 , true => RAF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAF_A :: _1 } } # [ doc = "LIN Break Detection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDE_A { # [ doc = "0: Break character detection is disabled." ] _0 , # [ doc = "1: Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] _1 } impl From < LBKDE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDE_A ) -> Self { match variant { LBKDE_A :: _0 => false , LBKDE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDE`" ] pub type LBKDE_R = crate :: R < bool , LBKDE_A > ; impl LBKDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDE_A { match self . bits { false => LBKDE_A :: _0 , true => LBKDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDE_A :: _1 } } # [ doc = "Write proxy for field `LBKDE`" ] pub struct LBKDE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character detection is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _0 ) } # [ doc = "Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Break Transmit Character Length\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRK13_A { # [ doc = "0: Break character is 10, 11, or 12 bits long." ] _0 , # [ doc = "1: Break character is 13 or 14 bits long." ] _1 } impl From < BRK13_A > for bool { # [ inline ( always ) ] fn from ( variant : BRK13_A ) -> Self { match variant { BRK13_A :: _0 => false , BRK13_A :: _1 => true } } } # [ doc = "Reader of field `BRK13`" ] pub type BRK13_R = crate :: R < bool , BRK13_A > ; impl BRK13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRK13_A { match self . bits { false => BRK13_A :: _0 , true => BRK13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRK13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRK13_A :: _1 } } # [ doc = "Write proxy for field `BRK13`" ] pub struct BRK13_W < 'a > { w : & 'a mut W , } impl < 'a > BRK13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRK13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character is 10, 11, or 12 bits long." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _0 ) } # [ doc = "Break character is 13 or 14 bits long." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Wakeup Idle Detect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWUID_A { # [ doc = "0: S1\\[IDLE\\] is not set upon detection of an idle character." ] _0 , # [ doc = "1: S1\\[IDLE\\] is set upon detection of an idle character." ] _1 } impl From < RWUID_A > for bool { # [ inline ( always ) ] fn from ( variant : RWUID_A ) -> Self { match variant { RWUID_A :: _0 => false , RWUID_A :: _1 => true } } } # [ doc = "Reader of field `RWUID`" ] pub type RWUID_R = crate :: R < bool , RWUID_A > ; impl RWUID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWUID_A { match self . bits { false => RWUID_A :: _0 , true => RWUID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWUID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWUID_A :: _1 } } # [ doc = "Write proxy for field `RWUID`" ] pub struct RWUID_W < 'a > { w : & 'a mut W , } impl < 'a > RWUID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWUID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "S1\\[IDLE\\] is not set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _0 ) } # [ doc = "S1\\[IDLE\\] is set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Receive Data Inversion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXINV_A { # [ doc = "0: Receive data is not inverted." ] _0 , # [ doc = "1: Receive data is inverted." ] _1 } impl From < RXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXINV_A ) -> Self { match variant { RXINV_A :: _0 => false , RXINV_A :: _1 => true } } } # [ doc = "Reader of field `RXINV`" ] pub type RXINV_R = crate :: R < bool , RXINV_A > ; impl RXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXINV_A { match self . bits { false => RXINV_A :: _0 , true => RXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXINV_A :: _1 } } # [ doc = "Write proxy for field `RXINV`" ] pub struct RXINV_W < 'a > { w : & 'a mut W , } impl < 'a > RXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _0 ) } # [ doc = "Receive data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Most Significant Bit First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSBF_A { # [ doc = "0: LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] _0 , # [ doc = "1: MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] _1 } impl From < MSBF_A > for bool { # [ inline ( always ) ] fn from ( variant : MSBF_A ) -> Self { match variant { MSBF_A :: _0 => false , MSBF_A :: _1 => true } } } # [ doc = "Reader of field `MSBF`" ] pub type MSBF_R = crate :: R < bool , MSBF_A > ; impl MSBF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSBF_A { match self . bits { false => MSBF_A :: _0 , true => MSBF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSBF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSBF_A :: _1 } } # [ doc = "Write proxy for field `MSBF`" ] pub struct MSBF_W < 'a > { w : & 'a mut W , } impl < 'a > MSBF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSBF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _0 ) } # [ doc = "MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Pin Active Edge Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIF_A { # [ doc = "0: No active edge on the receive pin has occurred." ] _0 , # [ doc = "1: An active edge on the receive pin has occurred." ] _1 } impl From < RXEDGIF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIF_A ) -> Self { match variant { RXEDGIF_A :: _0 => false , RXEDGIF_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIF`" ] pub type RXEDGIF_R = crate :: R < bool , RXEDGIF_A > ; impl RXEDGIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIF_A { match self . bits { false => RXEDGIF_A :: _0 , true => RXEDGIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIF_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIF`" ] pub struct RXEDGIF_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _0 ) } # [ doc = "An active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIF_A { # [ doc = "0: No LIN break character detected." ] _0 , # [ doc = "1: LIN break character detected." ] _1 } impl From < LBKDIF_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIF_A ) -> Self { match variant { LBKDIF_A :: _0 => false , LBKDIF_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIF`" ] pub type LBKDIF_R = crate :: R < bool , LBKDIF_A > ; impl LBKDIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIF_A { match self . bits { false => LBKDIF_A :: _0 , true => LBKDIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIF_A :: _1 } } # [ doc = "Write proxy for field `LBKDIF`" ] pub struct LBKDIF_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No LIN break character detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _0 ) } # [ doc = "LIN break character detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receiver Active Flag" ] # [ inline ( always ) ] pub fn raf ( & self ) -> RAF_R { RAF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & self ) -> LBKDE_R { LBKDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & self ) -> BRK13_R { BRK13_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & self ) -> RWUID_R { RWUID_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & self ) -> RXINV_R { RXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & self ) -> MSBF_R { MSBF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & self ) -> RXEDGIF_R { RXEDGIF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & self ) -> LBKDIF_R { LBKDIF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & mut self ) -> LBKDE_W { LBKDE_W { w : self } } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & mut self ) -> BRK13_W { BRK13_W { w : self } } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & mut self ) -> RWUID_W { RWUID_W { w : self } } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & mut self ) -> RXINV_W { RXINV_W { w : self } } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & mut self ) -> MSBF_W { MSBF_W { w : self } } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & mut self ) -> RXEDGIF_W { RXEDGIF_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & mut self ) -> LBKDIF_W { LBKDIF_W { w : self } } } } # [ doc = "UART Control Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c3](c3) module" ] pub type C3 = crate :: Reg < u8 , _C3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C3 ; # [ doc = "`read()` method returns [c3::R](c3::R) reader structure" ] impl crate :: Readable for C3 { } # [ doc = "`write(|w| ..)` method takes [c3::W](c3::W) writer structure" ] impl crate :: Writable for C3 { } # [ doc = "UART Control Register 3" ] pub mod c3 { # [ doc = "Reader of register C3" ] pub type R = crate :: R < u8 , super :: C3 > ; # [ doc = "Writer for register C3" ] pub type W = crate :: W < u8 , super :: C3 > ; # [ doc = "Register C3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEIE_A { # [ doc = "0: PF interrupt requests are disabled." ] _0 , # [ doc = "1: PF interrupt requests are enabled." ] _1 } impl From < PEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : PEIE_A ) -> Self { match variant { PEIE_A :: _0 => false , PEIE_A :: _1 => true } } } # [ doc = "Reader of field `PEIE`" ] pub type PEIE_R = crate :: R < bool , PEIE_A > ; impl PEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEIE_A { match self . bits { false => PEIE_A :: _0 , true => PEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEIE_A :: _1 } } # [ doc = "Write proxy for field `PEIE`" ] pub struct PEIE_W < 'a > { w : & 'a mut W , } impl < 'a > PEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _0 ) } # [ doc = "PF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Framing Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEIE_A { # [ doc = "0: FE interrupt requests are disabled." ] _0 , # [ doc = "1: FE interrupt requests are enabled." ] _1 } impl From < FEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FEIE_A ) -> Self { match variant { FEIE_A :: _0 => false , FEIE_A :: _1 => true } } } # [ doc = "Reader of field `FEIE`" ] pub type FEIE_R = crate :: R < bool , FEIE_A > ; impl FEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEIE_A { match self . bits { false => FEIE_A :: _0 , true => FEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEIE_A :: _1 } } # [ doc = "Write proxy for field `FEIE`" ] pub struct FEIE_W < 'a > { w : & 'a mut W , } impl < 'a > FEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FE interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _0 ) } # [ doc = "FE interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Noise Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NEIE_A { # [ doc = "0: NF interrupt requests are disabled." ] _0 , # [ doc = "1: NF interrupt requests are enabled." ] _1 } impl From < NEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : NEIE_A ) -> Self { match variant { NEIE_A :: _0 => false , NEIE_A :: _1 => true } } } # [ doc = "Reader of field `NEIE`" ] pub type NEIE_R = crate :: R < bool , NEIE_A > ; impl NEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NEIE_A { match self . bits { false => NEIE_A :: _0 , true => NEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NEIE_A :: _1 } } # [ doc = "Write proxy for field `NEIE`" ] pub struct NEIE_W < 'a > { w : & 'a mut W , } impl < 'a > NEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "NF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _0 ) } # [ doc = "NF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Overrun Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORIE_A { # [ doc = "0: OR interrupts are disabled." ] _0 , # [ doc = "1: OR interrupt requests are enabled." ] _1 } impl From < ORIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ORIE_A ) -> Self { match variant { ORIE_A :: _0 => false , ORIE_A :: _1 => true } } } # [ doc = "Reader of field `ORIE`" ] pub type ORIE_R = crate :: R < bool , ORIE_A > ; impl ORIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ORIE_A { match self . bits { false => ORIE_A :: _0 , true => ORIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ORIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ORIE_A :: _1 } } # [ doc = "Write proxy for field `ORIE`" ] pub struct ORIE_W < 'a > { w : & 'a mut W , } impl < 'a > ORIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ORIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OR interrupts are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _0 ) } # [ doc = "OR interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Data Inversion.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXINV_A { # [ doc = "0: Transmit data is not inverted." ] _0 , # [ doc = "1: Transmit data is inverted." ] _1 } impl From < TXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : TXINV_A ) -> Self { match variant { TXINV_A :: _0 => false , TXINV_A :: _1 => true } } } # [ doc = "Reader of field `TXINV`" ] pub type TXINV_R = crate :: R < bool , TXINV_A > ; impl TXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXINV_A { match self . bits { false => TXINV_A :: _0 , true => TXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXINV_A :: _1 } } # [ doc = "Write proxy for field `TXINV`" ] pub struct TXINV_W < 'a > { w : & 'a mut W , } impl < 'a > TXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _0 ) } # [ doc = "Transmit data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Transmitter Pin Data Direction in Single-Wire mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDIR_A { # [ doc = "0: TXD pin is an input in single wire mode." ] _0 , # [ doc = "1: TXD pin is an output in single wire mode." ] _1 } impl From < TXDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TXDIR_A ) -> Self { match variant { TXDIR_A :: _0 => false , TXDIR_A :: _1 => true } } } # [ doc = "Reader of field `TXDIR`" ] pub type TXDIR_R = crate :: R < bool , TXDIR_A > ; impl TXDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXDIR_A { match self . bits { false => TXDIR_A :: _0 , true => TXDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXDIR_A :: _1 } } # [ doc = "Write proxy for field `TXDIR`" ] pub struct TXDIR_W < 'a > { w : & 'a mut W , } impl < 'a > TXDIR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXDIR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXD pin is an input in single wire mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _0 ) } # [ doc = "TXD pin is an output in single wire mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `T8`" ] pub type T8_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `T8`" ] pub struct T8_W < 'a > { w : & 'a mut W , } impl < 'a > T8_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `R8`" ] pub type R8_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & self ) -> PEIE_R { PEIE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & self ) -> FEIE_R { FEIE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & self ) -> NEIE_R { NEIE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & self ) -> ORIE_R { ORIE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & self ) -> TXINV_R { TXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & self ) -> TXDIR_R { TXDIR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & self ) -> T8_R { T8_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Received Bit 8" ] # [ inline ( always ) ] pub fn r8 ( & self ) -> R8_R { R8_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & mut self ) -> PEIE_W { PEIE_W { w : self } } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & mut self ) -> FEIE_W { FEIE_W { w : self } } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & mut self ) -> NEIE_W { NEIE_W { w : self } } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & mut self ) -> ORIE_W { ORIE_W { w : self } } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & mut self ) -> TXINV_W { TXINV_W { w : self } } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & mut self ) -> TXDIR_W { TXDIR_W { w : self } } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & mut self ) -> T8_W { T8_W { w : self } } } } # [ doc = "UART Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "UART Data Register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RT`" ] pub type RT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RT`" ] pub struct RT_W < 'a > { w : & 'a mut W , } impl < 'a > RT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & self ) -> RT_R { RT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & mut self ) -> RT_W { RT_W { w : self } } } } # [ doc = "UART Match Address Registers 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma1](ma1) module" ] pub type MA1 = crate :: Reg < u8 , _MA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA1 ; # [ doc = "`read()` method returns [ma1::R](ma1::R) reader structure" ] impl crate :: Readable for MA1 { } # [ doc = "`write(|w| ..)` method takes [ma1::W](ma1::W) writer structure" ] impl crate :: Writable for MA1 { } # [ doc = "UART Match Address Registers 1" ] pub mod ma1 { # [ doc = "Reader of register MA1" ] pub type R = crate :: R < u8 , super :: MA1 > ; # [ doc = "Writer for register MA1" ] pub type W = crate :: W < u8 , super :: MA1 > ; # [ doc = "Register MA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Match Address Registers 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma2](ma2) module" ] pub type MA2 = crate :: Reg < u8 , _MA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA2 ; # [ doc = "`read()` method returns [ma2::R](ma2::R) reader structure" ] impl crate :: Readable for MA2 { } # [ doc = "`write(|w| ..)` method takes [ma2::W](ma2::W) writer structure" ] impl crate :: Writable for MA2 { } # [ doc = "UART Match Address Registers 2" ] pub mod ma2 { # [ doc = "Reader of register MA2" ] pub type R = crate :: R < u8 , super :: MA2 > ; # [ doc = "Writer for register MA2" ] pub type W = crate :: W < u8 , super :: MA2 > ; # [ doc = "Register MA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Control Register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c4](c4) module" ] pub type C4 = crate :: Reg < u8 , _C4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C4 ; # [ doc = "`read()` method returns [c4::R](c4::R) reader structure" ] impl crate :: Readable for C4 { } # [ doc = "`write(|w| ..)` method takes [c4::W](c4::W) writer structure" ] impl crate :: Writable for C4 { } # [ doc = "UART Control Register 4" ] pub mod c4 { # [ doc = "Reader of register C4" ] pub type R = crate :: R < u8 , super :: C4 > ; # [ doc = "Writer for register C4" ] pub type W = crate :: W < u8 , super :: C4 > ; # [ doc = "Register C4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BRFA`" ] pub type BRFA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BRFA`" ] pub struct BRFA_W < 'a > { w : & 'a mut W , } impl < 'a > BRFA_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "10-bit Mode select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M10_A { # [ doc = "0: The parity bit is the ninth bit in the serial transmission." ] _0 , # [ doc = "1: The parity bit is the tenth bit in the serial transmission." ] _1 } impl From < M10_A > for bool { # [ inline ( always ) ] fn from ( variant : M10_A ) -> Self { match variant { M10_A :: _0 => false , M10_A :: _1 => true } } } # [ doc = "Reader of field `M10`" ] pub type M10_R = crate :: R < bool , M10_A > ; impl M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M10_A { match self . bits { false => M10_A :: _0 , true => M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M10_A :: _1 } } # [ doc = "Write proxy for field `M10`" ] pub struct M10_W < 'a > { w : & 'a mut W , } impl < 'a > M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The parity bit is the ninth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M10_A :: _0 ) } # [ doc = "The parity bit is the tenth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M10_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Match Address Mode Enable 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN2_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN1 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN2_A ) -> Self { match variant { MAEN2_A :: _0 => false , MAEN2_A :: _1 => true } } } # [ doc = "Reader of field `MAEN2`" ] pub type MAEN2_R = crate :: R < bool , MAEN2_A > ; impl MAEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN2_A { match self . bits { false => MAEN2_A :: _0 , true => MAEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN2_A :: _1 } } # [ doc = "Write proxy for field `MAEN2`" ] pub struct MAEN2_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN1 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Match Address Mode Enable 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN1_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN2 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN1_A ) -> Self { match variant { MAEN1_A :: _0 => false , MAEN1_A :: _1 => true } } } # [ doc = "Reader of field `MAEN1`" ] pub type MAEN1_R = crate :: R < bool , MAEN1_A > ; impl MAEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN1_A { match self . bits { false => MAEN1_A :: _0 , true => MAEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN1_A :: _1 } } # [ doc = "Write proxy for field `MAEN1`" ] pub struct MAEN1_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN2 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & self ) -> BRFA_R { BRFA_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & self ) -> M10_R { M10_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & self ) -> MAEN2_R { MAEN2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & self ) -> MAEN1_R { MAEN1_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & mut self ) -> BRFA_W { BRFA_W { w : self } } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & mut self ) -> M10_W { M10_W { w : self } } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & mut self ) -> MAEN2_W { MAEN2_W { w : self } } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & mut self ) -> MAEN1_W { MAEN1_W { w : self } } } } # [ doc = "UART Control Register 5\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c5](c5) module" ] pub type C5 = crate :: Reg < u8 , _C5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C5 ; # [ doc = "`read()` method returns [c5::R](c5::R) reader structure" ] impl crate :: Readable for C5 { } # [ doc = "`write(|w| ..)` method takes [c5::W](c5::W) writer structure" ] impl crate :: Writable for C5 { } # [ doc = "UART Control Register 5" ] pub mod c5 { # [ doc = "Reader of register C5" ] pub type R = crate :: R < u8 , super :: C5 > ; # [ doc = "Writer for register C5" ] pub type W = crate :: W < u8 , super :: C5 > ; # [ doc = "Register C5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C5 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Full DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDMAS_A { # [ doc = "0: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] _0 , # [ doc = "1: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < RDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : RDMAS_A ) -> Self { match variant { RDMAS_A :: _0 => false , RDMAS_A :: _1 => true } } } # [ doc = "Reader of field `RDMAS`" ] pub type RDMAS_R = crate :: R < bool , RDMAS_A > ; impl RDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDMAS_A { match self . bits { false => RDMAS_A :: _0 , true => RDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDMAS_A :: _1 } } # [ doc = "Write proxy for field `RDMAS`" ] pub struct RDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > RDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _0 ) } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmitter DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDMAS_A { # [ doc = "0: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] _0 , # [ doc = "1: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < TDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TDMAS_A ) -> Self { match variant { TDMAS_A :: _0 => false , TDMAS_A :: _1 => true } } } # [ doc = "Reader of field `TDMAS`" ] pub type TDMAS_R = crate :: R < bool , TDMAS_A > ; impl TDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDMAS_A { match self . bits { false => TDMAS_A :: _0 , true => TDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDMAS_A :: _1 } } # [ doc = "Write proxy for field `TDMAS`" ] pub struct TDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > TDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _0 ) } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & self ) -> RDMAS_R { RDMAS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & self ) -> TDMAS_R { TDMAS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & mut self ) -> RDMAS_W { RDMAS_W { w : self } } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & mut self ) -> TDMAS_W { TDMAS_W { w : self } } } } # [ doc = "UART Extended Data Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ed](ed) module" ] pub type ED = crate :: Reg < u8 , _ED > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ED ; # [ doc = "`read()` method returns [ed::R](ed::R) reader structure" ] impl crate :: Readable for ED { } # [ doc = "UART Extended Data Register" ] pub mod ed { # [ doc = "Reader of register ED" ] pub type R = crate :: R < u8 , super :: ED > ; # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with a parity error.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYE_A { # [ doc = "0: The dataword was received without a parity error." ] _0 , # [ doc = "1: The dataword was received with a parity error." ] _1 } impl From < PARITYE_A > for bool { # [ inline ( always ) ] fn from ( variant : PARITYE_A ) -> Self { match variant { PARITYE_A :: _0 => false , PARITYE_A :: _1 => true } } } # [ doc = "Reader of field `PARITYE`" ] pub type PARITYE_R = crate :: R < bool , PARITYE_A > ; impl PARITYE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PARITYE_A { match self . bits { false => PARITYE_A :: _0 , true => PARITYE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PARITYE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PARITYE_A :: _1 } } # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with noise.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOISY_A { # [ doc = "0: The dataword was received without noise." ] _0 , # [ doc = "1: The data was received with noise." ] _1 } impl From < NOISY_A > for bool { # [ inline ( always ) ] fn from ( variant : NOISY_A ) -> Self { match variant { NOISY_A :: _0 => false , NOISY_A :: _1 => true } } } # [ doc = "Reader of field `NOISY`" ] pub type NOISY_R = crate :: R < bool , NOISY_A > ; impl NOISY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOISY_A { match self . bits { false => NOISY_A :: _0 , true => NOISY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOISY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOISY_A :: _1 } } impl R { # [ doc = "Bit 6 - The current received dataword contained in D and C3\\[R8\\] was received with a parity error." ] # [ inline ( always ) ] pub fn paritye ( & self ) -> PARITYE_R { PARITYE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - The current received dataword contained in D and C3\\[R8\\] was received with noise." ] # [ inline ( always ) ] pub fn noisy ( & self ) -> NOISY_R { NOISY_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Modem Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [modem](modem) module" ] pub type MODEM = crate :: Reg < u8 , _MODEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODEM ; # [ doc = "`read()` method returns [modem::R](modem::R) reader structure" ] impl crate :: Readable for MODEM { } # [ doc = "`write(|w| ..)` method takes [modem::W](modem::W) writer structure" ] impl crate :: Writable for MODEM { } # [ doc = "UART Modem Register" ] pub mod modem { # [ doc = "Reader of register MODEM" ] pub type R = crate :: R < u8 , super :: MODEM > ; # [ doc = "Writer for register MODEM" ] pub type W = crate :: W < u8 , super :: MODEM > ; # [ doc = "Register MODEM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MODEM { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter clear-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXCTSE_A { # [ doc = "0: CTS has no effect on the transmitter." ] _0 , # [ doc = "1: Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] _1 } impl From < TXCTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXCTSE_A ) -> Self { match variant { TXCTSE_A :: _0 => false , TXCTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXCTSE`" ] pub type TXCTSE_R = crate :: R < bool , TXCTSE_A > ; impl TXCTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXCTSE_A { match self . bits { false => TXCTSE_A :: _0 , true => TXCTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXCTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXCTSE_A :: _1 } } # [ doc = "Write proxy for field `TXCTSE`" ] pub struct TXCTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXCTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXCTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CTS has no effect on the transmitter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _0 ) } # [ doc = "Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSE_A { # [ doc = "0: The transmitter has no effect on RTS." ] _0 , # [ doc = "1: When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] _1 } impl From < TXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSE_A ) -> Self { match variant { TXRTSE_A :: _0 => false , TXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSE`" ] pub type TXRTSE_R = crate :: R < bool , TXRTSE_A > ; impl TXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSE_A { match self . bits { false => TXRTSE_A :: _0 , true => TXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSE_A :: _1 } } # [ doc = "Write proxy for field `TXRTSE`" ] pub struct TXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The transmitter has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _0 ) } # [ doc = "When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Transmitter request-to-send polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSPOL_A { # [ doc = "0: Transmitter RTS is active low." ] _0 , # [ doc = "1: Transmitter RTS is active high." ] _1 } impl From < TXRTSPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSPOL_A ) -> Self { match variant { TXRTSPOL_A :: _0 => false , TXRTSPOL_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSPOL`" ] pub type TXRTSPOL_R = crate :: R < bool , TXRTSPOL_A > ; impl TXRTSPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSPOL_A { match self . bits { false => TXRTSPOL_A :: _0 , true => TXRTSPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSPOL_A :: _1 } } # [ doc = "Write proxy for field `TXRTSPOL`" ] pub struct TXRTSPOL_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter RTS is active low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _0 ) } # [ doc = "Transmitter RTS is active high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXRTSE_A { # [ doc = "0: The receiver has no effect on RTS." ] _0 , # [ doc = "1: RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] _1 } impl From < RXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXRTSE_A ) -> Self { match variant { RXRTSE_A :: _0 => false , RXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `RXRTSE`" ] pub type RXRTSE_R = crate :: R < bool , RXRTSE_A > ; impl RXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXRTSE_A { match self . bits { false => RXRTSE_A :: _0 , true => RXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXRTSE_A :: _1 } } # [ doc = "Write proxy for field `RXRTSE`" ] pub struct RXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > RXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The receiver has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _0 ) } # [ doc = "RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & self ) -> TXCTSE_R { TXCTSE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & self ) -> TXRTSE_R { TXRTSE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & self ) -> TXRTSPOL_R { TXRTSPOL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & self ) -> RXRTSE_R { RXRTSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & mut self ) -> TXCTSE_W { TXCTSE_W { w : self } } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & mut self ) -> TXRTSE_W { TXRTSE_W { w : self } } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & mut self ) -> TXRTSPOL_W { TXRTSPOL_W { w : self } } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & mut self ) -> RXRTSE_W { RXRTSE_W { w : self } } } } # [ doc = "UART Infrared Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ir](ir) module" ] pub type IR = crate :: Reg < u8 , _IR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IR ; # [ doc = "`read()` method returns [ir::R](ir::R) reader structure" ] impl crate :: Readable for IR { } # [ doc = "`write(|w| ..)` method takes [ir::W](ir::W) writer structure" ] impl crate :: Writable for IR { } # [ doc = "UART Infrared Register" ] pub mod ir { # [ doc = "Reader of register IR" ] pub type R = crate :: R < u8 , super :: IR > ; # [ doc = "Writer for register IR" ] pub type W = crate :: W < u8 , super :: IR > ; # [ doc = "Register IR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter narrow pulse\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TNP_A { # [ doc = "0: 3/16." ] _00 , # [ doc = "1: 1/16." ] _01 , # [ doc = "2: 1/32." ] _10 , # [ doc = "3: 1/4." ] _11 } impl From < TNP_A > for u8 { # [ inline ( always ) ] fn from ( variant : TNP_A ) -> Self { match variant { TNP_A :: _00 => 0 , TNP_A :: _01 => 1 , TNP_A :: _10 => 2 , TNP_A :: _11 => 3 } } } # [ doc = "Reader of field `TNP`" ] pub type TNP_R = crate :: R < u8 , TNP_A > ; impl TNP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TNP_A { match self . bits { 0 => TNP_A :: _00 , 1 => TNP_A :: _01 , 2 => TNP_A :: _10 , 3 => TNP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TNP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TNP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TNP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TNP_A :: _11 } } # [ doc = "Write proxy for field `TNP`" ] pub struct TNP_W < 'a > { w : & 'a mut W , } impl < 'a > TNP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TNP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "3/16." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _00 ) } # [ doc = "1/16." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _01 ) } # [ doc = "1/32." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _10 ) } # [ doc = "1/4." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Infrared enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREN_A { # [ doc = "0: IR disabled." ] _0 , # [ doc = "1: IR enabled." ] _1 } impl From < IREN_A > for bool { # [ inline ( always ) ] fn from ( variant : IREN_A ) -> Self { match variant { IREN_A :: _0 => false , IREN_A :: _1 => true } } } # [ doc = "Reader of field `IREN`" ] pub type IREN_R = crate :: R < bool , IREN_A > ; impl IREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREN_A { match self . bits { false => IREN_A :: _0 , true => IREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREN_A :: _1 } } # [ doc = "Write proxy for field `IREN`" ] pub struct IREN_W < 'a > { w : & 'a mut W , } impl < 'a > IREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IR disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _0 ) } # [ doc = "IR enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & self ) -> TNP_R { TNP_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & self ) -> IREN_R { IREN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & mut self ) -> TNP_W { TNP_W { w : self } } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & mut self ) -> IREN_W { IREN_W { w : self } } } } # [ doc = "UART FIFO Parameters\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pfifo](pfifo) module" ] pub type PFIFO = crate :: Reg < u8 , _PFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PFIFO ; # [ doc = "`read()` method returns [pfifo::R](pfifo::R) reader structure" ] impl crate :: Readable for PFIFO { } # [ doc = "`write(|w| ..)` method takes [pfifo::W](pfifo::W) writer structure" ] impl crate :: Writable for PFIFO { } # [ doc = "UART FIFO Parameters" ] pub mod pfifo { # [ doc = "Reader of register PFIFO" ] pub type R = crate :: R < u8 , super :: PFIFO > ; # [ doc = "Writer for register PFIFO" ] pub type W = crate :: W < u8 , super :: PFIFO > ; # [ doc = "Register PFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFIFOSIZE_A { # [ doc = "0: Receive FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Receive FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Receive FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Receive FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Receive FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Receive FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Receive FIFO/Buffer depth = 128 datawords." ] _110 } impl From < RXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : RXFIFOSIZE_A ) -> Self { match variant { RXFIFOSIZE_A :: _000 => 0 , RXFIFOSIZE_A :: _001 => 1 , RXFIFOSIZE_A :: _010 => 2 , RXFIFOSIZE_A :: _011 => 3 , RXFIFOSIZE_A :: _100 => 4 , RXFIFOSIZE_A :: _101 => 5 , RXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `RXFIFOSIZE`" ] pub type RXFIFOSIZE_R = crate :: R < u8 , RXFIFOSIZE_A > ; impl RXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RXFIFOSIZE_A :: _000 ) , 1 => Val ( RXFIFOSIZE_A :: _001 ) , 2 => Val ( RXFIFOSIZE_A :: _010 ) , 3 => Val ( RXFIFOSIZE_A :: _011 ) , 4 => Val ( RXFIFOSIZE_A :: _100 ) , 5 => Val ( RXFIFOSIZE_A :: _101 ) , 6 => Val ( RXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _110 } } # [ doc = "Receive FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFE_A { # [ doc = "0: Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] _0 , # [ doc = "1: Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] _1 } impl From < RXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXFE_A ) -> Self { match variant { RXFE_A :: _0 => false , RXFE_A :: _1 => true } } } # [ doc = "Reader of field `RXFE`" ] pub type RXFE_R = crate :: R < bool , RXFE_A > ; impl RXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXFE_A { match self . bits { false => RXFE_A :: _0 , true => RXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXFE_A :: _1 } } # [ doc = "Write proxy for field `RXFE`" ] pub struct RXFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _0 ) } # [ doc = "Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFIFOSIZE_A { # [ doc = "0: Transmit FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Transmit FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Transmit FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Transmit FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Transmit FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Transmit FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Transmit FIFO/Buffer depth = 128 datawords." ] _110 } impl From < TXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXFIFOSIZE_A ) -> Self { match variant { TXFIFOSIZE_A :: _000 => 0 , TXFIFOSIZE_A :: _001 => 1 , TXFIFOSIZE_A :: _010 => 2 , TXFIFOSIZE_A :: _011 => 3 , TXFIFOSIZE_A :: _100 => 4 , TXFIFOSIZE_A :: _101 => 5 , TXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `TXFIFOSIZE`" ] pub type TXFIFOSIZE_R = crate :: R < u8 , TXFIFOSIZE_A > ; impl TXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TXFIFOSIZE_A :: _000 ) , 1 => Val ( TXFIFOSIZE_A :: _001 ) , 2 => Val ( TXFIFOSIZE_A :: _010 ) , 3 => Val ( TXFIFOSIZE_A :: _011 ) , 4 => Val ( TXFIFOSIZE_A :: _100 ) , 5 => Val ( TXFIFOSIZE_A :: _101 ) , 6 => Val ( TXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _110 } } # [ doc = "Transmit FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFE_A { # [ doc = "0: Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] _0 , # [ doc = "1: Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] _1 } impl From < TXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXFE_A ) -> Self { match variant { TXFE_A :: _0 => false , TXFE_A :: _1 => true } } } # [ doc = "Reader of field `TXFE`" ] pub type TXFE_R = crate :: R < bool , TXFE_A > ; impl TXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXFE_A { match self . bits { false => TXFE_A :: _0 , true => TXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXFE_A :: _1 } } # [ doc = "Write proxy for field `TXFE`" ] pub struct TXFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _0 ) } # [ doc = "Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Receive FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn rxfifosize ( & self ) -> RXFIFOSIZE_R { RXFIFOSIZE_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & self ) -> RXFE_R { RXFE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:6 - Transmit FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn txfifosize ( & self ) -> TXFIFOSIZE_R { TXFIFOSIZE_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & self ) -> TXFE_R { TXFE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & mut self ) -> RXFE_W { RXFE_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & mut self ) -> TXFE_W { TXFE_W { w : self } } } } # [ doc = "UART FIFO Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfifo](cfifo) module" ] pub type CFIFO = crate :: Reg < u8 , _CFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFIFO ; # [ doc = "`read()` method returns [cfifo::R](cfifo::R) reader structure" ] impl crate :: Readable for CFIFO { } # [ doc = "`write(|w| ..)` method takes [cfifo::W](cfifo::W) writer structure" ] impl crate :: Writable for CFIFO { } # [ doc = "UART FIFO Control Register" ] pub mod cfifo { # [ doc = "Reader of register CFIFO" ] pub type R = crate :: R < u8 , super :: CFIFO > ; # [ doc = "Writer for register CFIFO" ] pub type W = crate :: W < u8 , super :: CFIFO > ; # [ doc = "Register CFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO Underflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUFE_A { # [ doc = "0: RXUF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXUF flag generates an interrupt to the host." ] _1 } impl From < RXUFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUFE_A ) -> Self { match variant { RXUFE_A :: _0 => false , RXUFE_A :: _1 => true } } } # [ doc = "Reader of field `RXUFE`" ] pub type RXUFE_R = crate :: R < bool , RXUFE_A > ; impl RXUFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUFE_A { match self . bits { false => RXUFE_A :: _0 , true => RXUFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUFE_A :: _1 } } # [ doc = "Write proxy for field `RXUFE`" ] pub struct RXUFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXUFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXUF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _0 ) } # [ doc = "RXUF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmit FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOFE_A { # [ doc = "0: TXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: TXOF flag generates an interrupt to the host." ] _1 } impl From < TXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOFE_A ) -> Self { match variant { TXOFE_A :: _0 => false , TXOFE_A :: _1 => true } } } # [ doc = "Reader of field `TXOFE`" ] pub type TXOFE_R = crate :: R < bool , TXOFE_A > ; impl TXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOFE_A { match self . bits { false => TXOFE_A :: _0 , true => TXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOFE_A :: _1 } } # [ doc = "Write proxy for field `TXOFE`" ] pub struct TXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _0 ) } # [ doc = "TXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receive FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOFE_A { # [ doc = "0: RXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXOF flag generates an interrupt to the host." ] _1 } impl From < RXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOFE_A ) -> Self { match variant { RXOFE_A :: _0 => false , RXOFE_A :: _1 => true } } } # [ doc = "Reader of field `RXOFE`" ] pub type RXOFE_R = crate :: R < bool , RXOFE_A > ; impl RXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOFE_A { match self . bits { false => RXOFE_A :: _0 , true => RXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOFE_A :: _1 } } # [ doc = "Write proxy for field `RXOFE`" ] pub struct RXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _0 ) } # [ doc = "RXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the receive FIFO/buffer is cleared out." ] _1 } impl From < RXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : RXFLUSH_AW ) -> Self { match variant { RXFLUSH_AW :: _0 => false , RXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `RXFLUSH`" ] pub struct RXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > RXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _0 ) } # [ doc = "All data in the receive FIFO/buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmit FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the transmit FIFO/Buffer is cleared out." ] _1 } impl From < TXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : TXFLUSH_AW ) -> Self { match variant { TXFLUSH_AW :: _0 => false , TXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `TXFLUSH`" ] pub struct TXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > TXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _0 ) } # [ doc = "All data in the transmit FIFO/Buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & self ) -> RXUFE_R { RXUFE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & self ) -> TXOFE_R { TXOFE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & self ) -> RXOFE_R { RXOFE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & mut self ) -> RXUFE_W { RXUFE_W { w : self } } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & mut self ) -> TXOFE_W { TXOFE_W { w : self } } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & mut self ) -> RXOFE_W { RXOFE_W { w : self } } # [ doc = "Bit 6 - Receive FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn rxflush ( & mut self ) -> RXFLUSH_W { RXFLUSH_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn txflush ( & mut self ) -> TXFLUSH_W { TXFLUSH_W { w : self } } } } # [ doc = "UART FIFO Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sfifo](sfifo) module" ] pub type SFIFO = crate :: Reg < u8 , _SFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SFIFO ; # [ doc = "`read()` method returns [sfifo::R](sfifo::R) reader structure" ] impl crate :: Readable for SFIFO { } # [ doc = "`write(|w| ..)` method takes [sfifo::W](sfifo::W) writer structure" ] impl crate :: Writable for SFIFO { } # [ doc = "UART FIFO Status Register" ] pub mod sfifo { # [ doc = "Reader of register SFIFO" ] pub type R = crate :: R < u8 , super :: SFIFO > ; # [ doc = "Writer for register SFIFO" ] pub type W = crate :: W < u8 , super :: SFIFO > ; # [ doc = "Register SFIFO `reset()`'s with value 0xc0" ] impl crate :: ResetValue for super :: SFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc0 } } # [ doc = "Receiver Buffer Underflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUF_A { # [ doc = "0: No receive buffer underflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer underflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXUF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUF_A ) -> Self { match variant { RXUF_A :: _0 => false , RXUF_A :: _1 => true } } } # [ doc = "Reader of field `RXUF`" ] pub type RXUF_R = crate :: R < bool , RXUF_A > ; impl RXUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUF_A { match self . bits { false => RXUF_A :: _0 , true => RXUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUF_A :: _1 } } # [ doc = "Write proxy for field `RXUF`" ] pub struct RXUF_W < 'a > { w : & 'a mut W , } impl < 'a > RXUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _0 ) } # [ doc = "At least one receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOF_A { # [ doc = "0: No transmit buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < TXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOF_A ) -> Self { match variant { TXOF_A :: _0 => false , TXOF_A :: _1 => true } } } # [ doc = "Reader of field `TXOF`" ] pub type TXOF_R = crate :: R < bool , TXOF_A > ; impl TXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOF_A { match self . bits { false => TXOF_A :: _0 , true => TXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOF_A :: _1 } } # [ doc = "Write proxy for field `TXOF`" ] pub struct TXOF_W < 'a > { w : & 'a mut W , } impl < 'a > TXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _0 ) } # [ doc = "At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOF_A { # [ doc = "0: No receive buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOF_A ) -> Self { match variant { RXOF_A :: _0 => false , RXOF_A :: _1 => true } } } # [ doc = "Reader of field `RXOF`" ] pub type RXOF_R = crate :: R < bool , RXOF_A > ; impl RXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOF_A { match self . bits { false => RXOF_A :: _0 , true => RXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOF_A :: _1 } } # [ doc = "Write proxy for field `RXOF`" ] pub struct RXOF_W < 'a > { w : & 'a mut W , } impl < 'a > RXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _0 ) } # [ doc = "At least one receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEMPT_A { # [ doc = "0: Receive buffer is not empty." ] _0 , # [ doc = "1: Receive buffer is empty." ] _1 } impl From < RXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEMPT_A ) -> Self { match variant { RXEMPT_A :: _0 => false , RXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `RXEMPT`" ] pub type RXEMPT_R = crate :: R < bool , RXEMPT_A > ; impl RXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEMPT_A { match self . bits { false => RXEMPT_A :: _0 , true => RXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEMPT_A :: _1 } } # [ doc = "Transmit Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXEMPT_A { # [ doc = "0: Transmit buffer is not empty." ] _0 , # [ doc = "1: Transmit buffer is empty." ] _1 } impl From < TXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : TXEMPT_A ) -> Self { match variant { TXEMPT_A :: _0 => false , TXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `TXEMPT`" ] pub type TXEMPT_R = crate :: R < bool , TXEMPT_A > ; impl TXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXEMPT_A { match self . bits { false => TXEMPT_A :: _0 , true => TXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXEMPT_A :: _1 } } impl R { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & self ) -> RXUF_R { RXUF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & self ) -> TXOF_R { TXOF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & self ) -> RXOF_R { RXOF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Receive Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn rxempt ( & self ) -> RXEMPT_R { RXEMPT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn txempt ( & self ) -> TXEMPT_R { TXEMPT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & mut self ) -> RXUF_W { RXUF_W { w : self } } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & mut self ) -> TXOF_W { TXOF_W { w : self } } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & mut self ) -> RXOF_W { RXOF_W { w : self } } } } # [ doc = "UART FIFO Transmit Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [twfifo](twfifo) module" ] pub type TWFIFO = crate :: Reg < u8 , _TWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TWFIFO ; # [ doc = "`read()` method returns [twfifo::R](twfifo::R) reader structure" ] impl crate :: Readable for TWFIFO { } # [ doc = "`write(|w| ..)` method takes [twfifo::W](twfifo::W) writer structure" ] impl crate :: Writable for TWFIFO { } # [ doc = "UART FIFO Transmit Watermark" ] pub mod twfifo { # [ doc = "Reader of register TWFIFO" ] pub type R = crate :: R < u8 , super :: TWFIFO > ; # [ doc = "Writer for register TWFIFO" ] pub type W = crate :: W < u8 , super :: TWFIFO > ; # [ doc = "Register TWFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXWATER`" ] pub type TXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXWATER`" ] pub struct TXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > TXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & self ) -> TXWATER_R { TXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & mut self ) -> TXWATER_W { TXWATER_W { w : self } } } } # [ doc = "UART FIFO Transmit Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcfifo](tcfifo) module" ] pub type TCFIFO = crate :: Reg < u8 , _TCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCFIFO ; # [ doc = "`read()` method returns [tcfifo::R](tcfifo::R) reader structure" ] impl crate :: Readable for TCFIFO { } # [ doc = "UART FIFO Transmit Count" ] pub mod tcfifo { # [ doc = "Reader of register TCFIFO" ] pub type R = crate :: R < u8 , super :: TCFIFO > ; # [ doc = "Reader of field `TXCOUNT`" ] pub type TXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Transmit Counter" ] # [ inline ( always ) ] pub fn txcount ( & self ) -> TXCOUNT_R { TXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "UART FIFO Receive Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rwfifo](rwfifo) module" ] pub type RWFIFO = crate :: Reg < u8 , _RWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RWFIFO ; # [ doc = "`read()` method returns [rwfifo::R](rwfifo::R) reader structure" ] impl crate :: Readable for RWFIFO { } # [ doc = "`write(|w| ..)` method takes [rwfifo::W](rwfifo::W) writer structure" ] impl crate :: Writable for RWFIFO { } # [ doc = "UART FIFO Receive Watermark" ] pub mod rwfifo { # [ doc = "Reader of register RWFIFO" ] pub type R = crate :: R < u8 , super :: RWFIFO > ; # [ doc = "Writer for register RWFIFO" ] pub type W = crate :: W < u8 , super :: RWFIFO > ; # [ doc = "Register RWFIFO `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: RWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Reader of field `RXWATER`" ] pub type RXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXWATER`" ] pub struct RXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > RXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & self ) -> RXWATER_R { RXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & mut self ) -> RXWATER_W { RXWATER_W { w : self } } } } # [ doc = "UART FIFO Receive Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcfifo](rcfifo) module" ] pub type RCFIFO = crate :: Reg < u8 , _RCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCFIFO ; # [ doc = "`read()` method returns [rcfifo::R](rcfifo::R) reader structure" ] impl crate :: Readable for RCFIFO { } # [ doc = "UART FIFO Receive Count" ] pub mod rcfifo { # [ doc = "Reader of register RCFIFO" ] pub type R = crate :: R < u8 , super :: RCFIFO > ; # [ doc = "Reader of field `RXCOUNT`" ] pub type RXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Receive Counter" ] # [ inline ( always ) ] pub fn rxcount ( & self ) -> RXCOUNT_R { RXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "UART 7816 Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c7816](c7816) module" ] pub type C7816 = crate :: Reg < u8 , _C7816 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C7816 ; # [ doc = "`read()` method returns [c7816::R](c7816::R) reader structure" ] impl crate :: Readable for C7816 { } # [ doc = "`write(|w| ..)` method takes [c7816::W](c7816::W) writer structure" ] impl crate :: Writable for C7816 { } # [ doc = "UART 7816 Control Register" ] pub mod c7816 { # [ doc = "Reader of register C7816" ] pub type R = crate :: R < u8 , super :: C7816 > ; # [ doc = "Writer for register C7816" ] pub type W = crate :: W < u8 , super :: C7816 > ; # [ doc = "Register C7816 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C7816 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "ISO-7816 Functionality Enabled\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISO_7816E_A { # [ doc = "0: ISO-7816 functionality is turned off/not enabled." ] _0 , # [ doc = "1: ISO-7816 functionality is turned on/enabled." ] _1 } impl From < ISO_7816E_A > for bool { # [ inline ( always ) ] fn from ( variant : ISO_7816E_A ) -> Self { match variant { ISO_7816E_A :: _0 => false , ISO_7816E_A :: _1 => true } } } # [ doc = "Reader of field `ISO_7816E`" ] pub type ISO_7816E_R = crate :: R < bool , ISO_7816E_A > ; impl ISO_7816E_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISO_7816E_A { match self . bits { false => ISO_7816E_A :: _0 , true => ISO_7816E_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISO_7816E_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISO_7816E_A :: _1 } } # [ doc = "Write proxy for field `ISO_7816E`" ] pub struct ISO_7816E_W < 'a > { w : & 'a mut W , } impl < 'a > ISO_7816E_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ISO_7816E_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "ISO-7816 functionality is turned off/not enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ISO_7816E_A :: _0 ) } # [ doc = "ISO-7816 functionality is turned on/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ISO_7816E_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transfer Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TTYPE_A { # [ doc = "0: T = 0 per the ISO-7816 specification." ] _0 , # [ doc = "1: T = 1 per the ISO-7816 specification." ] _1 } impl From < TTYPE_A > for bool { # [ inline ( always ) ] fn from ( variant : TTYPE_A ) -> Self { match variant { TTYPE_A :: _0 => false , TTYPE_A :: _1 => true } } } # [ doc = "Reader of field `TTYPE`" ] pub type TTYPE_R = crate :: R < bool , TTYPE_A > ; impl TTYPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TTYPE_A { match self . bits { false => TTYPE_A :: _0 , true => TTYPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TTYPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TTYPE_A :: _1 } } # [ doc = "Write proxy for field `TTYPE`" ] pub struct TTYPE_W < 'a > { w : & 'a mut W , } impl < 'a > TTYPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TTYPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "T = 0 per the ISO-7816 specification." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TTYPE_A :: _0 ) } # [ doc = "T = 1 per the ISO-7816 specification." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TTYPE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Detect Initial Character\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INIT_A { # [ doc = "0: Normal operating mode. Receiver does not seek to identify initial character." ] _0 , # [ doc = "1: Receiver searches for initial character." ] _1 } impl From < INIT_A > for bool { # [ inline ( always ) ] fn from ( variant : INIT_A ) -> Self { match variant { INIT_A :: _0 => false , INIT_A :: _1 => true } } } # [ doc = "Reader of field `INIT`" ] pub type INIT_R = crate :: R < bool , INIT_A > ; impl INIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INIT_A { match self . bits { false => INIT_A :: _0 , true => INIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INIT_A :: _1 } } # [ doc = "Write proxy for field `INIT`" ] pub struct INIT_W < 'a > { w : & 'a mut W , } impl < 'a > INIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operating mode. Receiver does not seek to identify initial character." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INIT_A :: _0 ) } # [ doc = "Receiver searches for initial character." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INIT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Generate NACK on Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ANACK_A { # [ doc = "0: No NACK is automatically generated." ] _0 , # [ doc = "1: A NACK is automatically generated if a parity error is detected or if an invalid initial character is detected." ] _1 } impl From < ANACK_A > for bool { # [ inline ( always ) ] fn from ( variant : ANACK_A ) -> Self { match variant { ANACK_A :: _0 => false , ANACK_A :: _1 => true } } } # [ doc = "Reader of field `ANACK`" ] pub type ANACK_R = crate :: R < bool , ANACK_A > ; impl ANACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ANACK_A { match self . bits { false => ANACK_A :: _0 , true => ANACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ANACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ANACK_A :: _1 } } # [ doc = "Write proxy for field `ANACK`" ] pub struct ANACK_W < 'a > { w : & 'a mut W , } impl < 'a > ANACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ANACK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No NACK is automatically generated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ANACK_A :: _0 ) } # [ doc = "A NACK is automatically generated if a parity error is detected or if an invalid initial character is detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ANACK_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Generate NACK on Overflow\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ONACK_A { # [ doc = "0: The received data does not generate a NACK when the receipt of the data results in an overflow event." ] _0 , # [ doc = "1: If the receiver buffer overflows, a NACK is automatically sent on a received character." ] _1 } impl From < ONACK_A > for bool { # [ inline ( always ) ] fn from ( variant : ONACK_A ) -> Self { match variant { ONACK_A :: _0 => false , ONACK_A :: _1 => true } } } # [ doc = "Reader of field `ONACK`" ] pub type ONACK_R = crate :: R < bool , ONACK_A > ; impl ONACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ONACK_A { match self . bits { false => ONACK_A :: _0 , true => ONACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ONACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ONACK_A :: _1 } } # [ doc = "Write proxy for field `ONACK`" ] pub struct ONACK_W < 'a > { w : & 'a mut W , } impl < 'a > ONACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ONACK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The received data does not generate a NACK when the receipt of the data results in an overflow event." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ONACK_A :: _0 ) } # [ doc = "If the receiver buffer overflows, a NACK is automatically sent on a received character." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ONACK_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 0 - ISO-7816 Functionality Enabled" ] # [ inline ( always ) ] pub fn iso_7816e ( & self ) -> ISO_7816E_R { ISO_7816E_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transfer Type" ] # [ inline ( always ) ] pub fn ttype ( & self ) -> TTYPE_R { TTYPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Detect Initial Character" ] # [ inline ( always ) ] pub fn init ( & self ) -> INIT_R { INIT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Generate NACK on Error" ] # [ inline ( always ) ] pub fn anack ( & self ) -> ANACK_R { ANACK_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Generate NACK on Overflow" ] # [ inline ( always ) ] pub fn onack ( & self ) -> ONACK_R { ONACK_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - ISO-7816 Functionality Enabled" ] # [ inline ( always ) ] pub fn iso_7816e ( & mut self ) -> ISO_7816E_W { ISO_7816E_W { w : self } } # [ doc = "Bit 1 - Transfer Type" ] # [ inline ( always ) ] pub fn ttype ( & mut self ) -> TTYPE_W { TTYPE_W { w : self } } # [ doc = "Bit 2 - Detect Initial Character" ] # [ inline ( always ) ] pub fn init ( & mut self ) -> INIT_W { INIT_W { w : self } } # [ doc = "Bit 3 - Generate NACK on Error" ] # [ inline ( always ) ] pub fn anack ( & mut self ) -> ANACK_W { ANACK_W { w : self } } # [ doc = "Bit 4 - Generate NACK on Overflow" ] # [ inline ( always ) ] pub fn onack ( & mut self ) -> ONACK_W { ONACK_W { w : self } } } } # [ doc = "UART 7816 Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ie7816](ie7816) module" ] pub type IE7816 = crate :: Reg < u8 , _IE7816 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IE7816 ; # [ doc = "`read()` method returns [ie7816::R](ie7816::R) reader structure" ] impl crate :: Readable for IE7816 { } # [ doc = "`write(|w| ..)` method takes [ie7816::W](ie7816::W) writer structure" ] impl crate :: Writable for IE7816 { } # [ doc = "UART 7816 Interrupt Enable Register" ] pub mod ie7816 { # [ doc = "Reader of register IE7816" ] pub type R = crate :: R < u8 , super :: IE7816 > ; # [ doc = "Writer for register IE7816" ] pub type W = crate :: W < u8 , super :: IE7816 > ; # [ doc = "Register IE7816 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IE7816 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive Threshold Exceeded Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXTE_A { # [ doc = "0: The assertion of IS7816\\[RXT\\] does not result in the generation of an interrupt." ] _0 , # [ doc = "1: The assertion of IS7816\\[RXT\\] results in the generation of an interrupt." ] _1 } impl From < RXTE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXTE_A ) -> Self { match variant { RXTE_A :: _0 => false , RXTE_A :: _1 => true } } } # [ doc = "Reader of field `RXTE`" ] pub type RXTE_R = crate :: R < bool , RXTE_A > ; impl RXTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXTE_A { match self . bits { false => RXTE_A :: _0 , true => RXTE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXTE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXTE_A :: _1 } } # [ doc = "Write proxy for field `RXTE`" ] pub struct RXTE_W < 'a > { w : & 'a mut W , } impl < 'a > RXTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXTE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The assertion of IS7816\\[RXT\\] does not result in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXTE_A :: _0 ) } # [ doc = "The assertion of IS7816\\[RXT\\] results in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXTE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmit Threshold Exceeded Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXTE_A { # [ doc = "0: The assertion of IS7816\\[TXT\\] does not result in the generation of an interrupt." ] _0 , # [ doc = "1: The assertion of IS7816\\[TXT\\] results in the generation of an interrupt." ] _1 } impl From < TXTE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXTE_A ) -> Self { match variant { TXTE_A :: _0 => false , TXTE_A :: _1 => true } } } # [ doc = "Reader of field `TXTE`" ] pub type TXTE_R = crate :: R < bool , TXTE_A > ; impl TXTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXTE_A { match self . bits { false => TXTE_A :: _0 , true => TXTE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXTE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXTE_A :: _1 } } # [ doc = "Write proxy for field `TXTE`" ] pub struct TXTE_W < 'a > { w : & 'a mut W , } impl < 'a > TXTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXTE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The assertion of IS7816\\[TXT\\] does not result in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXTE_A :: _0 ) } # [ doc = "The assertion of IS7816\\[TXT\\] results in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXTE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Guard Timer Violated Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTVE_A { # [ doc = "0: The assertion of IS7816\\[GTV\\] does not result in the generation of an interrupt." ] _0 , # [ doc = "1: The assertion of IS7816\\[GTV\\] results in the generation of an interrupt." ] _1 } impl From < GTVE_A > for bool { # [ inline ( always ) ] fn from ( variant : GTVE_A ) -> Self { match variant { GTVE_A :: _0 => false , GTVE_A :: _1 => true } } } # [ doc = "Reader of field `GTVE`" ] pub type GTVE_R = crate :: R < bool , GTVE_A > ; impl GTVE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTVE_A { match self . bits { false => GTVE_A :: _0 , true => GTVE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTVE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTVE_A :: _1 } } # [ doc = "Write proxy for field `GTVE`" ] pub struct GTVE_W < 'a > { w : & 'a mut W , } impl < 'a > GTVE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTVE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The assertion of IS7816\\[GTV\\] does not result in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTVE_A :: _0 ) } # [ doc = "The assertion of IS7816\\[GTV\\] results in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTVE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "ATR Duration Timer Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADTE_A { # [ doc = "0: The assertion of IS7816\\[ADT\\] does not result in the generation of an interrupt." ] _0 , # [ doc = "1: The assertion of IS7816\\[ADT\\] results in the generation of an interrupt." ] _1 } impl From < ADTE_A > for bool { # [ inline ( always ) ] fn from ( variant : ADTE_A ) -> Self { match variant { ADTE_A :: _0 => false , ADTE_A :: _1 => true } } } # [ doc = "Reader of field `ADTE`" ] pub type ADTE_R = crate :: R < bool , ADTE_A > ; impl ADTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADTE_A { match self . bits { false => ADTE_A :: _0 , true => ADTE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADTE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADTE_A :: _1 } } # [ doc = "Write proxy for field `ADTE`" ] pub struct ADTE_W < 'a > { w : & 'a mut W , } impl < 'a > ADTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADTE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The assertion of IS7816\\[ADT\\] does not result in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADTE_A :: _0 ) } # [ doc = "The assertion of IS7816\\[ADT\\] results in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADTE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Initial Character Detected Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INITDE_A { # [ doc = "0: The assertion of IS7816\\[INITD\\] does not result in the generation of an interrupt." ] _0 , # [ doc = "1: The assertion of IS7816\\[INITD\\] results in the generation of an interrupt." ] _1 } impl From < INITDE_A > for bool { # [ inline ( always ) ] fn from ( variant : INITDE_A ) -> Self { match variant { INITDE_A :: _0 => false , INITDE_A :: _1 => true } } } # [ doc = "Reader of field `INITDE`" ] pub type INITDE_R = crate :: R < bool , INITDE_A > ; impl INITDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INITDE_A { match self . bits { false => INITDE_A :: _0 , true => INITDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INITDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INITDE_A :: _1 } } # [ doc = "Write proxy for field `INITDE`" ] pub struct INITDE_W < 'a > { w : & 'a mut W , } impl < 'a > INITDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INITDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The assertion of IS7816\\[INITD\\] does not result in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INITDE_A :: _0 ) } # [ doc = "The assertion of IS7816\\[INITD\\] results in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INITDE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Block Wait Timer Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BWTE_A { # [ doc = "0: The assertion of IS7816\\[BWT\\] does not result in the generation of an interrupt." ] _0 , # [ doc = "1: The assertion of IS7816\\[BWT\\] results in the generation of an interrupt." ] _1 } impl From < BWTE_A > for bool { # [ inline ( always ) ] fn from ( variant : BWTE_A ) -> Self { match variant { BWTE_A :: _0 => false , BWTE_A :: _1 => true } } } # [ doc = "Reader of field `BWTE`" ] pub type BWTE_R = crate :: R < bool , BWTE_A > ; impl BWTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BWTE_A { match self . bits { false => BWTE_A :: _0 , true => BWTE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BWTE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BWTE_A :: _1 } } # [ doc = "Write proxy for field `BWTE`" ] pub struct BWTE_W < 'a > { w : & 'a mut W , } impl < 'a > BWTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BWTE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The assertion of IS7816\\[BWT\\] does not result in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BWTE_A :: _0 ) } # [ doc = "The assertion of IS7816\\[BWT\\] results in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BWTE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Character Wait Timer Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CWTE_A { # [ doc = "0: The assertion of IS7816\\[CWT\\] does not result in the generation of an interrupt." ] _0 , # [ doc = "1: The assertion of IS7816\\[CWT\\] results in the generation of an interrupt." ] _1 } impl From < CWTE_A > for bool { # [ inline ( always ) ] fn from ( variant : CWTE_A ) -> Self { match variant { CWTE_A :: _0 => false , CWTE_A :: _1 => true } } } # [ doc = "Reader of field `CWTE`" ] pub type CWTE_R = crate :: R < bool , CWTE_A > ; impl CWTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CWTE_A { match self . bits { false => CWTE_A :: _0 , true => CWTE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CWTE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CWTE_A :: _1 } } # [ doc = "Write proxy for field `CWTE`" ] pub struct CWTE_W < 'a > { w : & 'a mut W , } impl < 'a > CWTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CWTE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The assertion of IS7816\\[CWT\\] does not result in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CWTE_A :: _0 ) } # [ doc = "The assertion of IS7816\\[CWT\\] results in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CWTE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Wait Timer Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WTE_A { # [ doc = "0: The assertion of IS7816\\[WT\\] does not result in the generation of an interrupt." ] _0 , # [ doc = "1: The assertion of IS7816\\[WT\\] results in the generation of an interrupt." ] _1 } impl From < WTE_A > for bool { # [ inline ( always ) ] fn from ( variant : WTE_A ) -> Self { match variant { WTE_A :: _0 => false , WTE_A :: _1 => true } } } # [ doc = "Reader of field `WTE`" ] pub type WTE_R = crate :: R < bool , WTE_A > ; impl WTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WTE_A { match self . bits { false => WTE_A :: _0 , true => WTE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WTE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WTE_A :: _1 } } # [ doc = "Write proxy for field `WTE`" ] pub struct WTE_W < 'a > { w : & 'a mut W , } impl < 'a > WTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WTE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The assertion of IS7816\\[WT\\] does not result in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WTE_A :: _0 ) } # [ doc = "The assertion of IS7816\\[WT\\] results in the generation of an interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WTE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receive Threshold Exceeded Interrupt Enable" ] # [ inline ( always ) ] pub fn rxte ( & self ) -> RXTE_R { RXTE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmit Threshold Exceeded Interrupt Enable" ] # [ inline ( always ) ] pub fn txte ( & self ) -> TXTE_R { TXTE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Guard Timer Violated Interrupt Enable" ] # [ inline ( always ) ] pub fn gtve ( & self ) -> GTVE_R { GTVE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - ATR Duration Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn adte ( & self ) -> ADTE_R { ADTE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Initial Character Detected Interrupt Enable" ] # [ inline ( always ) ] pub fn initde ( & self ) -> INITDE_R { INITDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Block Wait Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn bwte ( & self ) -> BWTE_R { BWTE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Character Wait Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn cwte ( & self ) -> CWTE_R { CWTE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wait Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn wte ( & self ) -> WTE_R { WTE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receive Threshold Exceeded Interrupt Enable" ] # [ inline ( always ) ] pub fn rxte ( & mut self ) -> RXTE_W { RXTE_W { w : self } } # [ doc = "Bit 1 - Transmit Threshold Exceeded Interrupt Enable" ] # [ inline ( always ) ] pub fn txte ( & mut self ) -> TXTE_W { TXTE_W { w : self } } # [ doc = "Bit 2 - Guard Timer Violated Interrupt Enable" ] # [ inline ( always ) ] pub fn gtve ( & mut self ) -> GTVE_W { GTVE_W { w : self } } # [ doc = "Bit 3 - ATR Duration Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn adte ( & mut self ) -> ADTE_W { ADTE_W { w : self } } # [ doc = "Bit 4 - Initial Character Detected Interrupt Enable" ] # [ inline ( always ) ] pub fn initde ( & mut self ) -> INITDE_W { INITDE_W { w : self } } # [ doc = "Bit 5 - Block Wait Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn bwte ( & mut self ) -> BWTE_W { BWTE_W { w : self } } # [ doc = "Bit 6 - Character Wait Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn cwte ( & mut self ) -> CWTE_W { CWTE_W { w : self } } # [ doc = "Bit 7 - Wait Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn wte ( & mut self ) -> WTE_W { WTE_W { w : self } } } } # [ doc = "UART 7816 Interrupt Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [is7816](is7816) module" ] pub type IS7816 = crate :: Reg < u8 , _IS7816 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IS7816 ; # [ doc = "`read()` method returns [is7816::R](is7816::R) reader structure" ] impl crate :: Readable for IS7816 { } # [ doc = "`write(|w| ..)` method takes [is7816::W](is7816::W) writer structure" ] impl crate :: Writable for IS7816 { } # [ doc = "UART 7816 Interrupt Status Register" ] pub mod is7816 { # [ doc = "Reader of register IS7816" ] pub type R = crate :: R < u8 , super :: IS7816 > ; # [ doc = "Writer for register IS7816" ] pub type W = crate :: W < u8 , super :: IS7816 > ; # [ doc = "Register IS7816 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IS7816 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive Threshold Exceeded Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXT_A { # [ doc = "0: The number of consecutive NACKS generated as a result of parity errors and buffer overruns is less than or equal to the value in ET7816\\[RXTHRESHOLD\\]." ] _0 , # [ doc = "1: The number of consecutive NACKS generated as a result of parity errors and buffer overruns is greater than the value in ET7816\\[RXTHRESHOLD\\]." ] _1 } impl From < RXT_A > for bool { # [ inline ( always ) ] fn from ( variant : RXT_A ) -> Self { match variant { RXT_A :: _0 => false , RXT_A :: _1 => true } } } # [ doc = "Reader of field `RXT`" ] pub type RXT_R = crate :: R < bool , RXT_A > ; impl RXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXT_A { match self . bits { false => RXT_A :: _0 , true => RXT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXT_A :: _1 } } # [ doc = "Write proxy for field `RXT`" ] pub struct RXT_W < 'a > { w : & 'a mut W , } impl < 'a > RXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The number of consecutive NACKS generated as a result of parity errors and buffer overruns is less than or equal to the value in ET7816\\[RXTHRESHOLD\\]." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXT_A :: _0 ) } # [ doc = "The number of consecutive NACKS generated as a result of parity errors and buffer overruns is greater than the value in ET7816\\[RXTHRESHOLD\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXT_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmit Threshold Exceeded Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXT_A { # [ doc = "0: The number of retries and corresponding NACKS does not exceed the value in ET7816\\[TXTHRESHOLD\\]." ] _0 , # [ doc = "1: The number of retries and corresponding NACKS exceeds the value in ET7816\\[TXTHRESHOLD\\]." ] _1 } impl From < TXT_A > for bool { # [ inline ( always ) ] fn from ( variant : TXT_A ) -> Self { match variant { TXT_A :: _0 => false , TXT_A :: _1 => true } } } # [ doc = "Reader of field `TXT`" ] pub type TXT_R = crate :: R < bool , TXT_A > ; impl TXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXT_A { match self . bits { false => TXT_A :: _0 , true => TXT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXT_A :: _1 } } # [ doc = "Write proxy for field `TXT`" ] pub struct TXT_W < 'a > { w : & 'a mut W , } impl < 'a > TXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The number of retries and corresponding NACKS does not exceed the value in ET7816\\[TXTHRESHOLD\\]." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXT_A :: _0 ) } # [ doc = "The number of retries and corresponding NACKS exceeds the value in ET7816\\[TXTHRESHOLD\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Guard Timer Violated Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTV_A { # [ doc = "0: A guard time (GT, CGT, or BGT) has not been violated." ] _0 , # [ doc = "1: A guard time (GT, CGT, or BGT) has been violated." ] _1 } impl From < GTV_A > for bool { # [ inline ( always ) ] fn from ( variant : GTV_A ) -> Self { match variant { GTV_A :: _0 => false , GTV_A :: _1 => true } } } # [ doc = "Reader of field `GTV`" ] pub type GTV_R = crate :: R < bool , GTV_A > ; impl GTV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTV_A { match self . bits { false => GTV_A :: _0 , true => GTV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTV_A :: _1 } } # [ doc = "Write proxy for field `GTV`" ] pub struct GTV_W < 'a > { w : & 'a mut W , } impl < 'a > GTV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A guard time (GT, CGT, or BGT) has not been violated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTV_A :: _0 ) } # [ doc = "A guard time (GT, CGT, or BGT) has been violated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTV_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "ATR Duration Time Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADT_A { # [ doc = "0: ATR Duration time (ADT) has not been violated." ] _0 , # [ doc = "1: ATR Duration time (ADT) has been violated." ] _1 } impl From < ADT_A > for bool { # [ inline ( always ) ] fn from ( variant : ADT_A ) -> Self { match variant { ADT_A :: _0 => false , ADT_A :: _1 => true } } } # [ doc = "Reader of field `ADT`" ] pub type ADT_R = crate :: R < bool , ADT_A > ; impl ADT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADT_A { match self . bits { false => ADT_A :: _0 , true => ADT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADT_A :: _1 } } # [ doc = "Write proxy for field `ADT`" ] pub struct ADT_W < 'a > { w : & 'a mut W , } impl < 'a > ADT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "ATR Duration time (ADT) has not been violated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADT_A :: _0 ) } # [ doc = "ATR Duration time (ADT) has been violated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADT_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Initial Character Detected Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INITD_A { # [ doc = "0: A valid initial character has not been received." ] _0 , # [ doc = "1: A valid initial character has been received." ] _1 } impl From < INITD_A > for bool { # [ inline ( always ) ] fn from ( variant : INITD_A ) -> Self { match variant { INITD_A :: _0 => false , INITD_A :: _1 => true } } } # [ doc = "Reader of field `INITD`" ] pub type INITD_R = crate :: R < bool , INITD_A > ; impl INITD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INITD_A { match self . bits { false => INITD_A :: _0 , true => INITD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INITD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INITD_A :: _1 } } # [ doc = "Write proxy for field `INITD`" ] pub struct INITD_W < 'a > { w : & 'a mut W , } impl < 'a > INITD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INITD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "A valid initial character has not been received." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INITD_A :: _0 ) } # [ doc = "A valid initial character has been received." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INITD_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Block Wait Timer Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BWT_A { # [ doc = "0: Block wait time (BWT) has not been violated." ] _0 , # [ doc = "1: Block wait time (BWT) has been violated." ] _1 } impl From < BWT_A > for bool { # [ inline ( always ) ] fn from ( variant : BWT_A ) -> Self { match variant { BWT_A :: _0 => false , BWT_A :: _1 => true } } } # [ doc = "Reader of field `BWT`" ] pub type BWT_R = crate :: R < bool , BWT_A > ; impl BWT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BWT_A { match self . bits { false => BWT_A :: _0 , true => BWT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BWT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BWT_A :: _1 } } # [ doc = "Write proxy for field `BWT`" ] pub struct BWT_W < 'a > { w : & 'a mut W , } impl < 'a > BWT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BWT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Block wait time (BWT) has not been violated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BWT_A :: _0 ) } # [ doc = "Block wait time (BWT) has been violated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BWT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Character Wait Timer Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CWT_A { # [ doc = "0: Character wait time (CWT) has not been violated." ] _0 , # [ doc = "1: Character wait time (CWT) has been violated." ] _1 } impl From < CWT_A > for bool { # [ inline ( always ) ] fn from ( variant : CWT_A ) -> Self { match variant { CWT_A :: _0 => false , CWT_A :: _1 => true } } } # [ doc = "Reader of field `CWT`" ] pub type CWT_R = crate :: R < bool , CWT_A > ; impl CWT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CWT_A { match self . bits { false => CWT_A :: _0 , true => CWT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CWT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CWT_A :: _1 } } # [ doc = "Write proxy for field `CWT`" ] pub struct CWT_W < 'a > { w : & 'a mut W , } impl < 'a > CWT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CWT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Character wait time (CWT) has not been violated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CWT_A :: _0 ) } # [ doc = "Character wait time (CWT) has been violated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CWT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Wait Timer Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WT_A { # [ doc = "0: Wait time (WT) has not been violated." ] _0 , # [ doc = "1: Wait time (WT) has been violated." ] _1 } impl From < WT_A > for bool { # [ inline ( always ) ] fn from ( variant : WT_A ) -> Self { match variant { WT_A :: _0 => false , WT_A :: _1 => true } } } # [ doc = "Reader of field `WT`" ] pub type WT_R = crate :: R < bool , WT_A > ; impl WT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WT_A { match self . bits { false => WT_A :: _0 , true => WT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WT_A :: _1 } } # [ doc = "Write proxy for field `WT`" ] pub struct WT_W < 'a > { w : & 'a mut W , } impl < 'a > WT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Wait time (WT) has not been violated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WT_A :: _0 ) } # [ doc = "Wait time (WT) has been violated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receive Threshold Exceeded Interrupt" ] # [ inline ( always ) ] pub fn rxt ( & self ) -> RXT_R { RXT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmit Threshold Exceeded Interrupt" ] # [ inline ( always ) ] pub fn txt ( & self ) -> TXT_R { TXT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Guard Timer Violated Interrupt" ] # [ inline ( always ) ] pub fn gtv ( & self ) -> GTV_R { GTV_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - ATR Duration Time Interrupt" ] # [ inline ( always ) ] pub fn adt ( & self ) -> ADT_R { ADT_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Initial Character Detected Interrupt" ] # [ inline ( always ) ] pub fn initd ( & self ) -> INITD_R { INITD_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Block Wait Timer Interrupt" ] # [ inline ( always ) ] pub fn bwt ( & self ) -> BWT_R { BWT_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Character Wait Timer Interrupt" ] # [ inline ( always ) ] pub fn cwt ( & self ) -> CWT_R { CWT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wait Timer Interrupt" ] # [ inline ( always ) ] pub fn wt ( & self ) -> WT_R { WT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receive Threshold Exceeded Interrupt" ] # [ inline ( always ) ] pub fn rxt ( & mut self ) -> RXT_W { RXT_W { w : self } } # [ doc = "Bit 1 - Transmit Threshold Exceeded Interrupt" ] # [ inline ( always ) ] pub fn txt ( & mut self ) -> TXT_W { TXT_W { w : self } } # [ doc = "Bit 2 - Guard Timer Violated Interrupt" ] # [ inline ( always ) ] pub fn gtv ( & mut self ) -> GTV_W { GTV_W { w : self } } # [ doc = "Bit 3 - ATR Duration Time Interrupt" ] # [ inline ( always ) ] pub fn adt ( & mut self ) -> ADT_W { ADT_W { w : self } } # [ doc = "Bit 4 - Initial Character Detected Interrupt" ] # [ inline ( always ) ] pub fn initd ( & mut self ) -> INITD_W { INITD_W { w : self } } # [ doc = "Bit 5 - Block Wait Timer Interrupt" ] # [ inline ( always ) ] pub fn bwt ( & mut self ) -> BWT_W { BWT_W { w : self } } # [ doc = "Bit 6 - Character Wait Timer Interrupt" ] # [ inline ( always ) ] pub fn cwt ( & mut self ) -> CWT_W { CWT_W { w : self } } # [ doc = "Bit 7 - Wait Timer Interrupt" ] # [ inline ( always ) ] pub fn wt ( & mut self ) -> WT_W { WT_W { w : self } } } } # [ doc = "UART 7816 Wait Parameter Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wp7816](wp7816) module" ] pub type WP7816 = crate :: Reg < u8 , _WP7816 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WP7816 ; # [ doc = "`read()` method returns [wp7816::R](wp7816::R) reader structure" ] impl crate :: Readable for WP7816 { } # [ doc = "`write(|w| ..)` method takes [wp7816::W](wp7816::W) writer structure" ] impl crate :: Writable for WP7816 { } # [ doc = "UART 7816 Wait Parameter Register" ] pub mod wp7816 { # [ doc = "Reader of register WP7816" ] pub type R = crate :: R < u8 , super :: WP7816 > ; # [ doc = "Writer for register WP7816" ] pub type W = crate :: W < u8 , super :: WP7816 > ; # [ doc = "Register WP7816 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WP7816 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `WTX`" ] pub type WTX_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WTX`" ] pub struct WTX_W < 'a > { w : & 'a mut W , } impl < 'a > WTX_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Wait Time Multiplier (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn wtx ( & self ) -> WTX_R { WTX_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Wait Time Multiplier (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn wtx ( & mut self ) -> WTX_W { WTX_W { w : self } } } } # [ doc = "UART 7816 Wait N Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wn7816](wn7816) module" ] pub type WN7816 = crate :: Reg < u8 , _WN7816 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WN7816 ; # [ doc = "`read()` method returns [wn7816::R](wn7816::R) reader structure" ] impl crate :: Readable for WN7816 { } # [ doc = "`write(|w| ..)` method takes [wn7816::W](wn7816::W) writer structure" ] impl crate :: Writable for WN7816 { } # [ doc = "UART 7816 Wait N Register" ] pub mod wn7816 { # [ doc = "Reader of register WN7816" ] pub type R = crate :: R < u8 , super :: WN7816 > ; # [ doc = "Writer for register WN7816" ] pub type W = crate :: W < u8 , super :: WN7816 > ; # [ doc = "Register WN7816 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WN7816 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `GTN`" ] pub type GTN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `GTN`" ] pub struct GTN_W < 'a > { w : & 'a mut W , } impl < 'a > GTN_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Guard Band N" ] # [ inline ( always ) ] pub fn gtn ( & self ) -> GTN_R { GTN_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Guard Band N" ] # [ inline ( always ) ] pub fn gtn ( & mut self ) -> GTN_W { GTN_W { w : self } } } } # [ doc = "UART 7816 Wait FD Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wf7816](wf7816) module" ] pub type WF7816 = crate :: Reg < u8 , _WF7816 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WF7816 ; # [ doc = "`read()` method returns [wf7816::R](wf7816::R) reader structure" ] impl crate :: Readable for WF7816 { } # [ doc = "`write(|w| ..)` method takes [wf7816::W](wf7816::W) writer structure" ] impl crate :: Writable for WF7816 { } # [ doc = "UART 7816 Wait FD Register" ] pub mod wf7816 { # [ doc = "Reader of register WF7816" ] pub type R = crate :: R < u8 , super :: WF7816 > ; # [ doc = "Writer for register WF7816" ] pub type W = crate :: W < u8 , super :: WF7816 > ; # [ doc = "Register WF7816 `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: WF7816 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Reader of field `GTFD`" ] pub type GTFD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `GTFD`" ] pub struct GTFD_W < 'a > { w : & 'a mut W , } impl < 'a > GTFD_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - FD Multiplier" ] # [ inline ( always ) ] pub fn gtfd ( & self ) -> GTFD_R { GTFD_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - FD Multiplier" ] # [ inline ( always ) ] pub fn gtfd ( & mut self ) -> GTFD_W { GTFD_W { w : self } } } } # [ doc = "UART 7816 Error Threshold Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [et7816](et7816) module" ] pub type ET7816 = crate :: Reg < u8 , _ET7816 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ET7816 ; # [ doc = "`read()` method returns [et7816::R](et7816::R) reader structure" ] impl crate :: Readable for ET7816 { } # [ doc = "`write(|w| ..)` method takes [et7816::W](et7816::W) writer structure" ] impl crate :: Writable for ET7816 { } # [ doc = "UART 7816 Error Threshold Register" ] pub mod et7816 { # [ doc = "Reader of register ET7816" ] pub type R = crate :: R < u8 , super :: ET7816 > ; # [ doc = "Writer for register ET7816" ] pub type W = crate :: W < u8 , super :: ET7816 > ; # [ doc = "Register ET7816 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ET7816 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RXTHRESHOLD`" ] pub type RXTHRESHOLD_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXTHRESHOLD`" ] pub struct RXTHRESHOLD_W < 'a > { w : & 'a mut W , } impl < 'a > RXTHRESHOLD_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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "Transmit NACK Threshold\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXTHRESHOLD_A { # [ doc = "0: TXT asserts on the first NACK that is received." ] _0 , # [ doc = "1: TXT asserts on the second NACK that is received." ] _1 } impl From < TXTHRESHOLD_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXTHRESHOLD_A ) -> Self { match variant { TXTHRESHOLD_A :: _0 => 0 , TXTHRESHOLD_A :: _1 => 1 } } } # [ doc = "Reader of field `TXTHRESHOLD`" ] pub type TXTHRESHOLD_R = crate :: R < u8 , TXTHRESHOLD_A > ; impl TXTHRESHOLD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TXTHRESHOLD_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TXTHRESHOLD_A :: _0 ) , 1 => Val ( TXTHRESHOLD_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXTHRESHOLD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXTHRESHOLD_A :: _1 } } # [ doc = "Write proxy for field `TXTHRESHOLD`" ] pub struct TXTHRESHOLD_W < 'a > { w : & 'a mut W , } impl < 'a > TXTHRESHOLD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXTHRESHOLD_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "TXT asserts on the first NACK that is received." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXTHRESHOLD_A :: _0 ) } # [ doc = "TXT asserts on the second NACK that is received." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXTHRESHOLD_A :: _1 ) } # [ 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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u8 ) & 0x0f ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Receive NACK Threshold" ] # [ inline ( always ) ] pub fn rxthreshold ( & self ) -> RXTHRESHOLD_R { RXTHRESHOLD_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Transmit NACK Threshold" ] # [ inline ( always ) ] pub fn txthreshold ( & self ) -> TXTHRESHOLD_R { TXTHRESHOLD_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Receive NACK Threshold" ] # [ inline ( always ) ] pub fn rxthreshold ( & mut self ) -> RXTHRESHOLD_W { RXTHRESHOLD_W { w : self } } # [ doc = "Bits 4:7 - Transmit NACK Threshold" ] # [ inline ( always ) ] pub fn txthreshold ( & mut self ) -> TXTHRESHOLD_W { TXTHRESHOLD_W { w : self } } } } # [ doc = "UART 7816 Transmit Length Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tl7816](tl7816) module" ] pub type TL7816 = crate :: Reg < u8 , _TL7816 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TL7816 ; # [ doc = "`read()` method returns [tl7816::R](tl7816::R) reader structure" ] impl crate :: Readable for TL7816 { } # [ doc = "`write(|w| ..)` method takes [tl7816::W](tl7816::W) writer structure" ] impl crate :: Writable for TL7816 { } # [ doc = "UART 7816 Transmit Length Register" ] pub mod tl7816 { # [ doc = "Reader of register TL7816" ] pub type R = crate :: R < u8 , super :: TL7816 > ; # [ doc = "Writer for register TL7816" ] pub type W = crate :: W < u8 , super :: TL7816 > ; # [ doc = "Register TL7816 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TL7816 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TLEN`" ] pub type TLEN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TLEN`" ] pub struct TLEN_W < 'a > { w : & 'a mut W , } impl < 'a > TLEN_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Transmit Length" ] # [ inline ( always ) ] pub fn tlen ( & self ) -> TLEN_R { TLEN_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Transmit Length" ] # [ inline ( always ) ] pub fn tlen ( & mut self ) -> TLEN_W { TLEN_W { w : self } } } } # [ doc = "UART 7816 ATR Duration Timer Register A\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ap7816a_t0](ap7816a_t0) module" ] pub type AP7816A_T0 = crate :: Reg < u8 , _AP7816A_T0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _AP7816A_T0 ; # [ doc = "`read()` method returns [ap7816a_t0::R](ap7816a_t0::R) reader structure" ] impl crate :: Readable for AP7816A_T0 { } # [ doc = "`write(|w| ..)` method takes [ap7816a_t0::W](ap7816a_t0::W) writer structure" ] impl crate :: Writable for AP7816A_T0 { } # [ doc = "UART 7816 ATR Duration Timer Register A" ] pub mod ap7816a_t0 { # [ doc = "Reader of register AP7816A_T0" ] pub type R = crate :: R < u8 , super :: AP7816A_T0 > ; # [ doc = "Writer for register AP7816A_T0" ] pub type W = crate :: W < u8 , super :: AP7816A_T0 > ; # [ doc = "Register AP7816A_T0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: AP7816A_T0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ADTI_H`" ] pub type ADTI_H_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ADTI_H`" ] pub struct ADTI_H_W < 'a > { w : & 'a mut W , } impl < 'a > ADTI_H_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - ATR Duration Time Integer High (C7816\\[TTYPE\\] = 0)" ] # [ inline ( always ) ] pub fn adti_h ( & self ) -> ADTI_H_R { ADTI_H_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - ATR Duration Time Integer High (C7816\\[TTYPE\\] = 0)" ] # [ inline ( always ) ] pub fn adti_h ( & mut self ) -> ADTI_H_W { ADTI_H_W { w : self } } } } # [ doc = "UART 7816 ATR Duration Timer Register B\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ap7816b_t0](ap7816b_t0) module" ] pub type AP7816B_T0 = crate :: Reg < u8 , _AP7816B_T0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _AP7816B_T0 ; # [ doc = "`read()` method returns [ap7816b_t0::R](ap7816b_t0::R) reader structure" ] impl crate :: Readable for AP7816B_T0 { } # [ doc = "`write(|w| ..)` method takes [ap7816b_t0::W](ap7816b_t0::W) writer structure" ] impl crate :: Writable for AP7816B_T0 { } # [ doc = "UART 7816 ATR Duration Timer Register B" ] pub mod ap7816b_t0 { # [ doc = "Reader of register AP7816B_T0" ] pub type R = crate :: R < u8 , super :: AP7816B_T0 > ; # [ doc = "Writer for register AP7816B_T0" ] pub type W = crate :: W < u8 , super :: AP7816B_T0 > ; # [ doc = "Register AP7816B_T0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: AP7816B_T0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ADTI_L`" ] pub type ADTI_L_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ADTI_L`" ] pub struct ADTI_L_W < 'a > { w : & 'a mut W , } impl < 'a > ADTI_L_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - ATR Duration Time Integer Low (C7816\\[TTYPE\\] = 0)" ] # [ inline ( always ) ] pub fn adti_l ( & self ) -> ADTI_L_R { ADTI_L_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - ATR Duration Time Integer Low (C7816\\[TTYPE\\] = 0)" ] # [ inline ( always ) ] pub fn adti_l ( & mut self ) -> ADTI_L_W { ADTI_L_W { w : self } } } } # [ doc = "UART 7816 Wait Parameter Register A\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wp7816a_t0](wp7816a_t0) module" ] pub type WP7816A_T0 = crate :: Reg < u8 , _WP7816A_T0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WP7816A_T0 ; # [ doc = "`read()` method returns [wp7816a_t0::R](wp7816a_t0::R) reader structure" ] impl crate :: Readable for WP7816A_T0 { } # [ doc = "`write(|w| ..)` method takes [wp7816a_t0::W](wp7816a_t0::W) writer structure" ] impl crate :: Writable for WP7816A_T0 { } # [ doc = "UART 7816 Wait Parameter Register A" ] pub mod wp7816a_t0 { # [ doc = "Reader of register WP7816A_T0" ] pub type R = crate :: R < u8 , super :: WP7816A_T0 > ; # [ doc = "Writer for register WP7816A_T0" ] pub type W = crate :: W < u8 , super :: WP7816A_T0 > ; # [ doc = "Register WP7816A_T0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WP7816A_T0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `WI_H`" ] pub type WI_H_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WI_H`" ] pub struct WI_H_W < 'a > { w : & 'a mut W , } impl < 'a > WI_H_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Wait Time Integer High (C7816\\[TTYPE\\] = 0)" ] # [ inline ( always ) ] pub fn wi_h ( & self ) -> WI_H_R { WI_H_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Wait Time Integer High (C7816\\[TTYPE\\] = 0)" ] # [ inline ( always ) ] pub fn wi_h ( & mut self ) -> WI_H_W { WI_H_W { w : self } } } } # [ doc = "UART 7816 Wait Parameter Register A\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wp7816a_t1](wp7816a_t1) module" ] pub type WP7816A_T1 = crate :: Reg < u8 , _WP7816A_T1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WP7816A_T1 ; # [ doc = "`read()` method returns [wp7816a_t1::R](wp7816a_t1::R) reader structure" ] impl crate :: Readable for WP7816A_T1 { } # [ doc = "`write(|w| ..)` method takes [wp7816a_t1::W](wp7816a_t1::W) writer structure" ] impl crate :: Writable for WP7816A_T1 { } # [ doc = "UART 7816 Wait Parameter Register A" ] pub mod wp7816a_t1 { # [ doc = "Reader of register WP7816A_T1" ] pub type R = crate :: R < u8 , super :: WP7816A_T1 > ; # [ doc = "Writer for register WP7816A_T1" ] pub type W = crate :: W < u8 , super :: WP7816A_T1 > ; # [ doc = "Register WP7816A_T1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: WP7816A_T1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BWI_H`" ] pub type BWI_H_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BWI_H`" ] pub struct BWI_H_W < 'a > { w : & 'a mut W , } impl < 'a > BWI_H_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Block Wait Time Integer High (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn bwi_h ( & self ) -> BWI_H_R { BWI_H_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Block Wait Time Integer High (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn bwi_h ( & mut self ) -> BWI_H_W { BWI_H_W { w : self } } } } # [ doc = "UART 7816 Wait Parameter Register B\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wp7816b_t0](wp7816b_t0) module" ] pub type WP7816B_T0 = crate :: Reg < u8 , _WP7816B_T0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WP7816B_T0 ; # [ doc = "`read()` method returns [wp7816b_t0::R](wp7816b_t0::R) reader structure" ] impl crate :: Readable for WP7816B_T0 { } # [ doc = "`write(|w| ..)` method takes [wp7816b_t0::W](wp7816b_t0::W) writer structure" ] impl crate :: Writable for WP7816B_T0 { } # [ doc = "UART 7816 Wait Parameter Register B" ] pub mod wp7816b_t0 { # [ doc = "Reader of register WP7816B_T0" ] pub type R = crate :: R < u8 , super :: WP7816B_T0 > ; # [ doc = "Writer for register WP7816B_T0" ] pub type W = crate :: W < u8 , super :: WP7816B_T0 > ; # [ doc = "Register WP7816B_T0 `reset()`'s with value 0x14" ] impl crate :: ResetValue for super :: WP7816B_T0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x14 } } # [ doc = "Reader of field `WI_L`" ] pub type WI_L_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WI_L`" ] pub struct WI_L_W < 'a > { w : & 'a mut W , } impl < 'a > WI_L_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Wait Time Integer Low (C7816\\[TTYPE\\] = 0)" ] # [ inline ( always ) ] pub fn wi_l ( & self ) -> WI_L_R { WI_L_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Wait Time Integer Low (C7816\\[TTYPE\\] = 0)" ] # [ inline ( always ) ] pub fn wi_l ( & mut self ) -> WI_L_W { WI_L_W { w : self } } } } # [ doc = "UART 7816 Wait Parameter Register B\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wp7816b_t1](wp7816b_t1) module" ] pub type WP7816B_T1 = crate :: Reg < u8 , _WP7816B_T1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WP7816B_T1 ; # [ doc = "`read()` method returns [wp7816b_t1::R](wp7816b_t1::R) reader structure" ] impl crate :: Readable for WP7816B_T1 { } # [ doc = "`write(|w| ..)` method takes [wp7816b_t1::W](wp7816b_t1::W) writer structure" ] impl crate :: Writable for WP7816B_T1 { } # [ doc = "UART 7816 Wait Parameter Register B" ] pub mod wp7816b_t1 { # [ doc = "Reader of register WP7816B_T1" ] pub type R = crate :: R < u8 , super :: WP7816B_T1 > ; # [ doc = "Writer for register WP7816B_T1" ] pub type W = crate :: W < u8 , super :: WP7816B_T1 > ; # [ doc = "Register WP7816B_T1 `reset()`'s with value 0x14" ] impl crate :: ResetValue for super :: WP7816B_T1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x14 } } # [ doc = "Reader of field `BWI_L`" ] pub type BWI_L_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BWI_L`" ] pub struct BWI_L_W < 'a > { w : & 'a mut W , } impl < 'a > BWI_L_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Block Wait Time Integer Low (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn bwi_l ( & self ) -> BWI_L_R { BWI_L_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Block Wait Time Integer Low (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn bwi_l ( & mut self ) -> BWI_L_W { BWI_L_W { w : self } } } } # [ doc = "UART 7816 Wait and Guard Parameter Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wgp7816_t1](wgp7816_t1) module" ] pub type WGP7816_T1 = crate :: Reg < u8 , _WGP7816_T1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WGP7816_T1 ; # [ doc = "`read()` method returns [wgp7816_t1::R](wgp7816_t1::R) reader structure" ] impl crate :: Readable for WGP7816_T1 { } # [ doc = "`write(|w| ..)` method takes [wgp7816_t1::W](wgp7816_t1::W) writer structure" ] impl crate :: Writable for WGP7816_T1 { } # [ doc = "UART 7816 Wait and Guard Parameter Register" ] pub mod wgp7816_t1 { # [ doc = "Reader of register WGP7816_T1" ] pub type R = crate :: R < u8 , super :: WGP7816_T1 > ; # [ doc = "Writer for register WGP7816_T1" ] pub type W = crate :: W < u8 , super :: WGP7816_T1 > ; # [ doc = "Register WGP7816_T1 `reset()`'s with value 0x06" ] impl crate :: ResetValue for super :: WGP7816_T1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x06 } } # [ doc = "Reader of field `BGI`" ] pub type BGI_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BGI`" ] pub struct BGI_W < 'a > { w : & 'a mut W , } impl < 'a > BGI_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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `CWI1`" ] pub type CWI1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CWI1`" ] pub struct CWI1_W < 'a > { w : & 'a mut W , } impl < 'a > CWI1_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u8 ) & 0x0f ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Block Guard Time Integer (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn bgi ( & self ) -> BGI_R { BGI_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Character Wait Time Integer 1 (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn cwi1 ( & self ) -> CWI1_R { CWI1_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Block Guard Time Integer (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn bgi ( & mut self ) -> BGI_W { BGI_W { w : self } } # [ doc = "Bits 4:7 - Character Wait Time Integer 1 (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn cwi1 ( & mut self ) -> CWI1_W { CWI1_W { w : self } } } } # [ doc = "UART 7816 Wait Parameter Register C\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wp7816c_t1](wp7816c_t1) module" ] pub type WP7816C_T1 = crate :: Reg < u8 , _WP7816C_T1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WP7816C_T1 ; # [ doc = "`read()` method returns [wp7816c_t1::R](wp7816c_t1::R) reader structure" ] impl crate :: Readable for WP7816C_T1 { } # [ doc = "`write(|w| ..)` method takes [wp7816c_t1::W](wp7816c_t1::W) writer structure" ] impl crate :: Writable for WP7816C_T1 { } # [ doc = "UART 7816 Wait Parameter Register C" ] pub mod wp7816c_t1 { # [ doc = "Reader of register WP7816C_T1" ] pub type R = crate :: R < u8 , super :: WP7816C_T1 > ; # [ doc = "Writer for register WP7816C_T1" ] pub type W = crate :: W < u8 , super :: WP7816C_T1 > ; # [ doc = "Register WP7816C_T1 `reset()`'s with value 0x0b" ] impl crate :: ResetValue for super :: WP7816C_T1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0b } } # [ doc = "Reader of field `CWI2`" ] pub type CWI2_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CWI2`" ] pub struct CWI2_W < 'a > { w : & 'a mut W , } impl < 'a > CWI2_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Character Wait Time Integer 2 (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn cwi2 ( & self ) -> CWI2_R { CWI2_R :: new ( ( self . bits & 0x1f ) as u8 ) } } impl W { # [ doc = "Bits 0:4 - Character Wait Time Integer 2 (C7816\\[TTYPE\\] = 1)" ] # [ inline ( always ) ] pub fn cwi2 ( & mut self ) -> CWI2_W { CWI2_W { w : self } } } } } # [ doc = "Serial Communication Interface" ] pub struct UART1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for UART1 { } impl UART1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const uart1 :: RegisterBlock { 0x4006_b000 as * const _ } } impl Deref for UART1 { type Target = uart1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * UART1 :: ptr ( ) } } } # [ doc = "Serial Communication Interface" ] pub mod uart1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - UART Baud Rate Registers: High" ] pub bdh : BDH , # [ doc = "0x01 - UART Baud Rate Registers: Low" ] pub bdl : BDL , # [ doc = "0x02 - UART Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - UART Control Register 2" ] pub c2 : C2 , # [ doc = "0x04 - UART Status Register 1" ] pub s1 : S1 , # [ doc = "0x05 - UART Status Register 2" ] pub s2 : S2 , # [ doc = "0x06 - UART Control Register 3" ] pub c3 : C3 , # [ doc = "0x07 - UART Data Register" ] pub d : D , # [ doc = "0x08 - UART Match Address Registers 1" ] pub ma1 : MA1 , # [ doc = "0x09 - UART Match Address Registers 2" ] pub ma2 : MA2 , # [ doc = "0x0a - UART Control Register 4" ] pub c4 : C4 , # [ doc = "0x0b - UART Control Register 5" ] pub c5 : C5 , # [ doc = "0x0c - UART Extended Data Register" ] pub ed : ED , # [ doc = "0x0d - UART Modem Register" ] pub modem : MODEM , # [ doc = "0x0e - UART Infrared Register" ] pub ir : IR , _reserved15 : [ u8 ; 1usize ] , # [ doc = "0x10 - UART FIFO Parameters" ] pub pfifo : PFIFO , # [ doc = "0x11 - UART FIFO Control Register" ] pub cfifo : CFIFO , # [ doc = "0x12 - UART FIFO Status Register" ] pub sfifo : SFIFO , # [ doc = "0x13 - UART FIFO Transmit Watermark" ] pub twfifo : TWFIFO , # [ doc = "0x14 - UART FIFO Transmit Count" ] pub tcfifo : TCFIFO , # [ doc = "0x15 - UART FIFO Receive Watermark" ] pub rwfifo : RWFIFO , # [ doc = "0x16 - UART FIFO Receive Count" ] pub rcfifo : RCFIFO , } # [ doc = "UART Baud Rate Registers: High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdh](bdh) module" ] pub type BDH = crate :: Reg < u8 , _BDH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDH ; # [ doc = "`read()` method returns [bdh::R](bdh::R) reader structure" ] impl crate :: Readable for BDH { } # [ doc = "`write(|w| ..)` method takes [bdh::W](bdh::W) writer structure" ] impl crate :: Writable for BDH { } # [ doc = "UART Baud Rate Registers: High" ] pub mod bdh { # [ doc = "Reader of register BDH" ] pub type R = crate :: R < u8 , super :: BDH > ; # [ doc = "Writer for register BDH" ] pub type W = crate :: W < u8 , super :: BDH > ; # [ doc = "Register BDH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BDH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Stop Bit Number Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBNS_A { # [ doc = "0: Data frame consists of a single stop bit." ] _0 , # [ doc = "1: Data frame consists of two stop bits." ] _1 } impl From < SBNS_A > for bool { # [ inline ( always ) ] fn from ( variant : SBNS_A ) -> Self { match variant { SBNS_A :: _0 => false , SBNS_A :: _1 => true } } } # [ doc = "Reader of field `SBNS`" ] pub type SBNS_R = crate :: R < bool , SBNS_A > ; impl SBNS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBNS_A { match self . bits { false => SBNS_A :: _0 , true => SBNS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBNS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBNS_A :: _1 } } # [ doc = "Write proxy for field `SBNS`" ] pub struct SBNS_W < 'a > { w : & 'a mut W , } impl < 'a > SBNS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBNS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data frame consists of a single stop bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _0 ) } # [ doc = "Data frame consists of two stop bits." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Input Active Edge Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIE_A { # [ doc = "0: Hardware interrupts from RXEDGIF disabled using polling." ] _0 , # [ doc = "1: RXEDGIF interrupt request enabled." ] _1 } impl From < RXEDGIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIE_A ) -> Self { match variant { RXEDGIE_A :: _0 => false , RXEDGIE_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIE`" ] pub type RXEDGIE_R = crate :: R < bool , RXEDGIE_A > ; impl RXEDGIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIE_A { match self . bits { false => RXEDGIE_A :: _0 , true => RXEDGIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIE_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIE`" ] pub struct RXEDGIE_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from RXEDGIF disabled using polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _0 ) } # [ doc = "RXEDGIF interrupt request enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIE_A { # [ doc = "0: LBKDIF interrupt requests disabled." ] _0 , # [ doc = "1: LBKDIF interrupt requests enabled." ] _1 } impl From < LBKDIE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIE_A ) -> Self { match variant { LBKDIE_A :: _0 => false , LBKDIE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIE`" ] pub type LBKDIE_R = crate :: R < bool , LBKDIE_A > ; impl LBKDIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIE_A { match self . bits { false => LBKDIE_A :: _0 , true => LBKDIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIE_A :: _1 } } # [ doc = "Write proxy for field `LBKDIE`" ] pub struct LBKDIE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LBKDIF interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _0 ) } # [ doc = "LBKDIF interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & self ) -> SBNS_R { SBNS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & self ) -> RXEDGIE_R { RXEDGIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & self ) -> LBKDIE_R { LBKDIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & mut self ) -> SBNS_W { SBNS_W { w : self } } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & mut self ) -> RXEDGIE_W { RXEDGIE_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & mut self ) -> LBKDIE_W { LBKDIE_W { w : self } } } } # [ doc = "UART Baud Rate Registers: Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdl](bdl) module" ] pub type BDL = crate :: Reg < u8 , _BDL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDL ; # [ doc = "`read()` method returns [bdl::R](bdl::R) reader structure" ] impl crate :: Readable for BDL { } # [ doc = "`write(|w| ..)` method takes [bdl::W](bdl::W) writer structure" ] impl crate :: Writable for BDL { } # [ doc = "UART Baud Rate Registers: Low" ] pub mod bdl { # [ doc = "Reader of register BDL" ] pub type R = crate :: R < u8 , super :: BDL > ; # [ doc = "Writer for register BDL" ] pub type W = crate :: W < u8 , super :: BDL > ; # [ doc = "Register BDL `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: BDL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } } } # [ doc = "UART Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "UART Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PT_A { # [ doc = "0: Even parity." ] _0 , # [ doc = "1: Odd parity." ] _1 } impl From < PT_A > for bool { # [ inline ( always ) ] fn from ( variant : PT_A ) -> Self { match variant { PT_A :: _0 => false , PT_A :: _1 => true } } } # [ doc = "Reader of field `PT`" ] pub type PT_R = crate :: R < bool , PT_A > ; impl PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PT_A { match self . bits { false => PT_A :: _0 , true => PT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PT_A :: _1 } } # [ doc = "Write proxy for field `PT`" ] pub struct PT_W < 'a > { w : & 'a mut W , } impl < 'a > PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Even parity." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PT_A :: _0 ) } # [ doc = "Odd parity." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PT_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Parity Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Parity function disabled." ] _0 , # [ doc = "1: Parity function enabled." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Parity function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Parity function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Idle Line Type Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILT_A { # [ doc = "0: Idle character bit count starts after start bit." ] _0 , # [ doc = "1: Idle character bit count starts after stop bit." ] _1 } impl From < ILT_A > for bool { # [ inline ( always ) ] fn from ( variant : ILT_A ) -> Self { match variant { ILT_A :: _0 => false , ILT_A :: _1 => true } } } # [ doc = "Reader of field `ILT`" ] pub type ILT_R = crate :: R < bool , ILT_A > ; impl ILT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILT_A { match self . bits { false => ILT_A :: _0 , true => ILT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILT_A :: _1 } } # [ doc = "Write proxy for field `ILT`" ] pub struct ILT_W < 'a > { w : & 'a mut W , } impl < 'a > ILT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle character bit count starts after start bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _0 ) } # [ doc = "Idle character bit count starts after stop bit." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver Wakeup Method Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKE_A { # [ doc = "0: Idle line wakeup." ] _0 , # [ doc = "1: Address mark wakeup." ] _1 } impl From < WAKE_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKE_A ) -> Self { match variant { WAKE_A :: _0 => false , WAKE_A :: _1 => true } } } # [ doc = "Reader of field `WAKE`" ] pub type WAKE_R = crate :: R < bool , WAKE_A > ; impl WAKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKE_A { match self . bits { false => WAKE_A :: _0 , true => WAKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKE_A :: _1 } } # [ doc = "Write proxy for field `WAKE`" ] pub struct WAKE_W < 'a > { w : & 'a mut W , } impl < 'a > WAKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle line wakeup." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _0 ) } # [ doc = "Address mark wakeup." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "9-bit or 8-bit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M_A { # [ doc = "0: Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] _0 , # [ doc = "1: Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] _1 } impl From < M_A > for bool { # [ inline ( always ) ] fn from ( variant : M_A ) -> Self { match variant { M_A :: _0 => false , M_A :: _1 => true } } } # [ doc = "Reader of field `M`" ] pub type M_R = crate :: R < bool , M_A > ; impl M_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M_A { match self . bits { false => M_A :: _0 , true => M_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M_A :: _1 } } # [ doc = "Write proxy for field `M`" ] pub struct M_W < 'a > { w : & 'a mut W , } impl < 'a > M_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M_A :: _0 ) } # [ doc = "Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSRC_A { # [ doc = "0: Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] _0 , # [ doc = "1: Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] _1 } impl From < RSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : RSRC_A ) -> Self { match variant { RSRC_A :: _0 => false , RSRC_A :: _1 => true } } } # [ doc = "Reader of field `RSRC`" ] pub type RSRC_R = crate :: R < bool , RSRC_A > ; impl RSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSRC_A { match self . bits { false => RSRC_A :: _0 , true => RSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RSRC_A :: _1 } } # [ doc = "Write proxy for field `RSRC`" ] pub struct RSRC_W < 'a > { w : & 'a mut W , } impl < 'a > RSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _0 ) } # [ doc = "Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "UART Stops in Wait Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UARTSWAI_A { # [ doc = "0: UART clock continues to run in Wait mode." ] _0 , # [ doc = "1: UART clock freezes while CPU is in Wait mode." ] _1 } impl From < UARTSWAI_A > for bool { # [ inline ( always ) ] fn from ( variant : UARTSWAI_A ) -> Self { match variant { UARTSWAI_A :: _0 => false , UARTSWAI_A :: _1 => true } } } # [ doc = "Reader of field `UARTSWAI`" ] pub type UARTSWAI_R = crate :: R < bool , UARTSWAI_A > ; impl UARTSWAI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UARTSWAI_A { match self . bits { false => UARTSWAI_A :: _0 , true => UARTSWAI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UARTSWAI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UARTSWAI_A :: _1 } } # [ doc = "Write proxy for field `UARTSWAI`" ] pub struct UARTSWAI_W < 'a > { w : & 'a mut W , } impl < 'a > UARTSWAI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UARTSWAI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "UART clock continues to run in Wait mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _0 ) } # [ doc = "UART clock freezes while CPU is in Wait mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Loop Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] _1 } impl From < LOOPS_A > for bool { # [ inline ( always ) ] fn from ( variant : LOOPS_A ) -> Self { match variant { LOOPS_A :: _0 => false , LOOPS_A :: _1 => true } } } # [ doc = "Reader of field `LOOPS`" ] pub type LOOPS_R = crate :: R < bool , LOOPS_A > ; impl LOOPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOOPS_A { match self . bits { false => LOOPS_A :: _0 , true => LOOPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOOPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOOPS_A :: _1 } } # [ doc = "Write proxy for field `LOOPS`" ] pub struct LOOPS_W < 'a > { w : & 'a mut W , } impl < 'a > LOOPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOOPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _0 ) } # [ doc = "Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & self ) -> PT_R { PT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & self ) -> ILT_R { ILT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & self ) -> WAKE_R { WAKE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & self ) -> M_R { M_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & self ) -> RSRC_R { RSRC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & self ) -> UARTSWAI_R { UARTSWAI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & self ) -> LOOPS_R { LOOPS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & mut self ) -> PT_W { PT_W { w : self } } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & mut self ) -> ILT_W { ILT_W { w : self } } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & mut self ) -> WAKE_W { WAKE_W { w : self } } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & mut self ) -> M_W { M_W { w : self } } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & mut self ) -> RSRC_W { RSRC_W { w : self } } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & mut self ) -> UARTSWAI_W { UARTSWAI_W { w : self } } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & mut self ) -> LOOPS_W { LOOPS_W { w : self } } } } # [ doc = "UART Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "UART Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Send Break\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBK_A { # [ doc = "0: Normal transmitter operation." ] _0 , # [ doc = "1: Queue break characters to be sent." ] _1 } impl From < SBK_A > for bool { # [ inline ( always ) ] fn from ( variant : SBK_A ) -> Self { match variant { SBK_A :: _0 => false , SBK_A :: _1 => true } } } # [ doc = "Reader of field `SBK`" ] pub type SBK_R = crate :: R < bool , SBK_A > ; impl SBK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBK_A { match self . bits { false => SBK_A :: _0 , true => SBK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBK_A :: _1 } } # [ doc = "Write proxy for field `SBK`" ] pub struct SBK_W < 'a > { w : & 'a mut W , } impl < 'a > SBK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal transmitter operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _0 ) } # [ doc = "Queue break characters to be sent." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Receiver Wakeup Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWU_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] _1 } impl From < RWU_A > for bool { # [ inline ( always ) ] fn from ( variant : RWU_A ) -> Self { match variant { RWU_A :: _0 => false , RWU_A :: _1 => true } } } # [ doc = "Reader of field `RWU`" ] pub type RWU_R = crate :: R < bool , RWU_A > ; impl RWU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWU_A { match self . bits { false => RWU_A :: _0 , true => RWU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWU_A :: _1 } } # [ doc = "Write proxy for field `RWU`" ] pub struct RWU_W < 'a > { w : & 'a mut W , } impl < 'a > RWU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _0 ) } # [ doc = "RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RE_A { # [ doc = "0: Receiver off." ] _0 , # [ doc = "1: Receiver on." ] _1 } impl From < RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RE_A ) -> Self { match variant { RE_A :: _0 => false , RE_A :: _1 => true } } } # [ doc = "Reader of field `RE`" ] pub type RE_R = crate :: R < bool , RE_A > ; impl RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RE_A { match self . bits { false => RE_A :: _0 , true => RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RE_A :: _1 } } # [ doc = "Write proxy for field `RE`" ] pub struct RE_W < 'a > { w : & 'a mut W , } impl < 'a > RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RE_A :: _0 ) } # [ doc = "Receiver on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmitter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TE_A { # [ doc = "0: Transmitter off." ] _0 , # [ doc = "1: Transmitter on." ] _1 } impl From < TE_A > for bool { # [ inline ( always ) ] fn from ( variant : TE_A ) -> Self { match variant { TE_A :: _0 => false , TE_A :: _1 => true } } } # [ doc = "Reader of field `TE`" ] pub type TE_R = crate :: R < bool , TE_A > ; impl TE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TE_A { match self . bits { false => TE_A :: _0 , true => TE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TE_A :: _1 } } # [ doc = "Write proxy for field `TE`" ] pub struct TE_W < 'a > { w : & 'a mut W , } impl < 'a > TE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TE_A :: _0 ) } # [ doc = "Transmitter on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Idle Line Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILIE_A { # [ doc = "0: IDLE interrupt requests disabled." ] _0 , # [ doc = "1: IDLE interrupt requests enabled." ] _1 } impl From < ILIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ILIE_A ) -> Self { match variant { ILIE_A :: _0 => false , ILIE_A :: _1 => true } } } # [ doc = "Reader of field `ILIE`" ] pub type ILIE_R = crate :: R < bool , ILIE_A > ; impl ILIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILIE_A { match self . bits { false => ILIE_A :: _0 , true => ILIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILIE_A :: _1 } } # [ doc = "Write proxy for field `ILIE`" ] pub struct ILIE_W < 'a > { w : & 'a mut W , } impl < 'a > ILIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IDLE interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _0 ) } # [ doc = "IDLE interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Full Interrupt or DMA Transfer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RIE_A { # [ doc = "0: RDRF interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: RDRF interrupt or DMA transfer requests enabled." ] _1 } impl From < RIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RIE_A ) -> Self { match variant { RIE_A :: _0 => false , RIE_A :: _1 => true } } } # [ doc = "Reader of field `RIE`" ] pub type RIE_R = crate :: R < bool , RIE_A > ; impl RIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RIE_A { match self . bits { false => RIE_A :: _0 , true => RIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RIE_A :: _1 } } # [ doc = "Write proxy for field `RIE`" ] pub struct RIE_W < 'a > { w : & 'a mut W , } impl < 'a > RIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RDRF interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _0 ) } # [ doc = "RDRF interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmission Complete Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCIE_A { # [ doc = "0: TC interrupt requests disabled." ] _0 , # [ doc = "1: TC interrupt requests enabled." ] _1 } impl From < TCIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCIE_A ) -> Self { match variant { TCIE_A :: _0 => false , TCIE_A :: _1 => true } } } # [ doc = "Reader of field `TCIE`" ] pub type TCIE_R = crate :: R < bool , TCIE_A > ; impl TCIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCIE_A { match self . bits { false => TCIE_A :: _0 , true => TCIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCIE_A :: _1 } } # [ doc = "Write proxy for field `TCIE`" ] pub struct TCIE_W < 'a > { w : & 'a mut W , } impl < 'a > TCIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TC interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _0 ) } # [ doc = "TC interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmitter Interrupt or DMA Transfer Enable.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: TDRE interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: TDRE interrupt or DMA transfer requests enabled." ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TDRE interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "TDRE interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & self ) -> SBK_R { SBK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & self ) -> RWU_R { RWU_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & self ) -> RE_R { RE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & self ) -> TE_R { TE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & self ) -> ILIE_R { ILIE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & self ) -> RIE_R { RIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & self ) -> TCIE_R { TCIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & mut self ) -> SBK_W { SBK_W { w : self } } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & mut self ) -> RWU_W { RWU_W { w : self } } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & mut self ) -> RE_W { RE_W { w : self } } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & mut self ) -> TE_W { TE_W { w : self } } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & mut self ) -> ILIE_W { ILIE_W { w : self } } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & mut self ) -> RIE_W { RIE_W { w : self } } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & mut self ) -> TCIE_W { TCIE_W { w : self } } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } } } # [ doc = "UART Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s1](s1) module" ] pub type S1 = crate :: Reg < u8 , _S1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S1 ; # [ doc = "`read()` method returns [s1::R](s1::R) reader structure" ] impl crate :: Readable for S1 { } # [ doc = "UART Status Register 1" ] pub mod s1 { # [ doc = "Reader of register S1" ] pub type R = crate :: R < u8 , super :: S1 > ; # [ doc = "Parity Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PF_A { # [ doc = "0: No parity error detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1, then there may be data in the receive buffer what was received with a parity error." ] _0 , # [ doc = "1: At least one dataword was received with a parity error since the last time this flag was cleared." ] _1 } impl From < PF_A > for bool { # [ inline ( always ) ] fn from ( variant : PF_A ) -> Self { match variant { PF_A :: _0 => false , PF_A :: _1 => true } } } # [ doc = "Reader of field `PF`" ] pub type PF_R = crate :: R < bool , PF_A > ; impl PF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PF_A { match self . bits { false => PF_A :: _0 , true => PF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PF_A :: _1 } } # [ doc = "Framing Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FE_A { # [ doc = "0: No framing error detected." ] _0 , # [ doc = "1: Framing error." ] _1 } impl From < FE_A > for bool { # [ inline ( always ) ] fn from ( variant : FE_A ) -> Self { match variant { FE_A :: _0 => false , FE_A :: _1 => true } } } # [ doc = "Reader of field `FE`" ] pub type FE_R = crate :: R < bool , FE_A > ; impl FE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FE_A { match self . bits { false => FE_A :: _0 , true => FE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FE_A :: _1 } } # [ doc = "Noise Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NF_A { # [ doc = "0: No noise detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1 then there may be data in the receiver buffer that was received with noise." ] _0 , # [ doc = "1: At least one dataword was received with noise detected since the last time the flag was cleared." ] _1 } impl From < NF_A > for bool { # [ inline ( always ) ] fn from ( variant : NF_A ) -> Self { match variant { NF_A :: _0 => false , NF_A :: _1 => true } } } # [ doc = "Reader of field `NF`" ] pub type NF_R = crate :: R < bool , NF_A > ; impl NF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NF_A { match self . bits { false => NF_A :: _0 , true => NF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NF_A :: _1 } } # [ doc = "Receiver Overrun Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OR_A { # [ doc = "0: No overrun has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: Overrun has occurred or the overrun flag has not been cleared since the last overrun occurred." ] _1 } impl From < OR_A > for bool { # [ inline ( always ) ] fn from ( variant : OR_A ) -> Self { match variant { OR_A :: _0 => false , OR_A :: _1 => true } } } # [ doc = "Reader of field `OR`" ] pub type OR_R = crate :: R < bool , OR_A > ; impl OR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OR_A { match self . bits { false => OR_A :: _0 , true => OR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OR_A :: _1 } } # [ doc = "Idle Line Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLE_A { # [ doc = "0: Receiver input is either active now or has never become active since the IDLE flag was last cleared." ] _0 , # [ doc = "1: Receiver input has become idle or the flag has not been cleared since it last asserted." ] _1 } impl From < IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLE_A ) -> Self { match variant { IDLE_A :: _0 => false , IDLE_A :: _1 => true } } } # [ doc = "Reader of field `IDLE`" ] pub type IDLE_R = crate :: R < bool , IDLE_A > ; impl IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLE_A { match self . bits { false => IDLE_A :: _0 , true => IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLE_A :: _1 } } # [ doc = "Receive Data Register Full Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDRF_A { # [ doc = "0: The number of datawords in the receive buffer is less than the number indicated by RXWATER." ] _0 , # [ doc = "1: The number of datawords in the receive buffer is equal to or greater than the number indicated by RXWATER at some point in time since this flag was last cleared." ] _1 } impl From < RDRF_A > for bool { # [ inline ( always ) ] fn from ( variant : RDRF_A ) -> Self { match variant { RDRF_A :: _0 => false , RDRF_A :: _1 => true } } } # [ doc = "Reader of field `RDRF`" ] pub type RDRF_R = crate :: R < bool , RDRF_A > ; impl RDRF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDRF_A { match self . bits { false => RDRF_A :: _0 , true => RDRF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDRF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDRF_A :: _1 } } # [ doc = "Transmit Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TC_A { # [ doc = "0: Transmitter active (sending data, a preamble, or a break)." ] _0 , # [ doc = "1: Transmitter idle (transmission activity complete)." ] _1 } impl From < TC_A > for bool { # [ inline ( always ) ] fn from ( variant : TC_A ) -> Self { match variant { TC_A :: _0 => false , TC_A :: _1 => true } } } # [ doc = "Reader of field `TC`" ] pub type TC_R = crate :: R < bool , TC_A > ; impl TC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TC_A { match self . bits { false => TC_A :: _0 , true => TC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TC_A :: _1 } } # [ doc = "Transmit Data Register Empty Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDRE_A { # [ doc = "0: The amount of data in the transmit buffer is greater than the value indicated by TWFIFO\\[TXWATER\\]." ] _0 , # [ doc = "1: The amount of data in the transmit buffer is less than or equal to the value indicated by TWFIFO\\[TXWATER\\] at some point in time since the flag has been cleared." ] _1 } impl From < TDRE_A > for bool { # [ inline ( always ) ] fn from ( variant : TDRE_A ) -> Self { match variant { TDRE_A :: _0 => false , TDRE_A :: _1 => true } } } # [ doc = "Reader of field `TDRE`" ] pub type TDRE_R = crate :: R < bool , TDRE_A > ; impl TDRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDRE_A { match self . bits { false => TDRE_A :: _0 , true => TDRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDRE_A :: _1 } } impl R { # [ doc = "Bit 0 - Parity Error Flag" ] # [ inline ( always ) ] pub fn pf ( & self ) -> PF_R { PF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Flag" ] # [ inline ( always ) ] pub fn fe ( & self ) -> FE_R { FE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Flag" ] # [ inline ( always ) ] pub fn nf ( & self ) -> NF_R { NF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Overrun Flag" ] # [ inline ( always ) ] pub fn or ( & self ) -> OR_R { OR_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Flag" ] # [ inline ( always ) ] pub fn idle ( & self ) -> IDLE_R { IDLE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receive Data Register Full Flag" ] # [ inline ( always ) ] pub fn rdrf ( & self ) -> RDRF_R { RDRF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Complete Flag" ] # [ inline ( always ) ] pub fn tc ( & self ) -> TC_R { TC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Data Register Empty Flag" ] # [ inline ( always ) ] pub fn tdre ( & self ) -> TDRE_R { TDRE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Status Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s2](s2) module" ] pub type S2 = crate :: Reg < u8 , _S2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S2 ; # [ doc = "`read()` method returns [s2::R](s2::R) reader structure" ] impl crate :: Readable for S2 { } # [ doc = "`write(|w| ..)` method takes [s2::W](s2::W) writer structure" ] impl crate :: Writable for S2 { } # [ doc = "UART Status Register 2" ] pub mod s2 { # [ doc = "Reader of register S2" ] pub type R = crate :: R < u8 , super :: S2 > ; # [ doc = "Writer for register S2" ] pub type W = crate :: W < u8 , super :: S2 > ; # [ doc = "Register S2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: S2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Active Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAF_A { # [ doc = "0: UART receiver idle/inactive waiting for a start bit." ] _0 , # [ doc = "1: UART receiver active, RxD input not idle." ] _1 } impl From < RAF_A > for bool { # [ inline ( always ) ] fn from ( variant : RAF_A ) -> Self { match variant { RAF_A :: _0 => false , RAF_A :: _1 => true } } } # [ doc = "Reader of field `RAF`" ] pub type RAF_R = crate :: R < bool , RAF_A > ; impl RAF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAF_A { match self . bits { false => RAF_A :: _0 , true => RAF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAF_A :: _1 } } # [ doc = "LIN Break Detection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDE_A { # [ doc = "0: Break character detection is disabled." ] _0 , # [ doc = "1: Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] _1 } impl From < LBKDE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDE_A ) -> Self { match variant { LBKDE_A :: _0 => false , LBKDE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDE`" ] pub type LBKDE_R = crate :: R < bool , LBKDE_A > ; impl LBKDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDE_A { match self . bits { false => LBKDE_A :: _0 , true => LBKDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDE_A :: _1 } } # [ doc = "Write proxy for field `LBKDE`" ] pub struct LBKDE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character detection is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _0 ) } # [ doc = "Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Break Transmit Character Length\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRK13_A { # [ doc = "0: Break character is 10, 11, or 12 bits long." ] _0 , # [ doc = "1: Break character is 13 or 14 bits long." ] _1 } impl From < BRK13_A > for bool { # [ inline ( always ) ] fn from ( variant : BRK13_A ) -> Self { match variant { BRK13_A :: _0 => false , BRK13_A :: _1 => true } } } # [ doc = "Reader of field `BRK13`" ] pub type BRK13_R = crate :: R < bool , BRK13_A > ; impl BRK13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRK13_A { match self . bits { false => BRK13_A :: _0 , true => BRK13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRK13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRK13_A :: _1 } } # [ doc = "Write proxy for field `BRK13`" ] pub struct BRK13_W < 'a > { w : & 'a mut W , } impl < 'a > BRK13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRK13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character is 10, 11, or 12 bits long." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _0 ) } # [ doc = "Break character is 13 or 14 bits long." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Wakeup Idle Detect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWUID_A { # [ doc = "0: S1\\[IDLE\\] is not set upon detection of an idle character." ] _0 , # [ doc = "1: S1\\[IDLE\\] is set upon detection of an idle character." ] _1 } impl From < RWUID_A > for bool { # [ inline ( always ) ] fn from ( variant : RWUID_A ) -> Self { match variant { RWUID_A :: _0 => false , RWUID_A :: _1 => true } } } # [ doc = "Reader of field `RWUID`" ] pub type RWUID_R = crate :: R < bool , RWUID_A > ; impl RWUID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWUID_A { match self . bits { false => RWUID_A :: _0 , true => RWUID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWUID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWUID_A :: _1 } } # [ doc = "Write proxy for field `RWUID`" ] pub struct RWUID_W < 'a > { w : & 'a mut W , } impl < 'a > RWUID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWUID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "S1\\[IDLE\\] is not set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _0 ) } # [ doc = "S1\\[IDLE\\] is set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Receive Data Inversion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXINV_A { # [ doc = "0: Receive data is not inverted." ] _0 , # [ doc = "1: Receive data is inverted." ] _1 } impl From < RXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXINV_A ) -> Self { match variant { RXINV_A :: _0 => false , RXINV_A :: _1 => true } } } # [ doc = "Reader of field `RXINV`" ] pub type RXINV_R = crate :: R < bool , RXINV_A > ; impl RXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXINV_A { match self . bits { false => RXINV_A :: _0 , true => RXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXINV_A :: _1 } } # [ doc = "Write proxy for field `RXINV`" ] pub struct RXINV_W < 'a > { w : & 'a mut W , } impl < 'a > RXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _0 ) } # [ doc = "Receive data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Most Significant Bit First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSBF_A { # [ doc = "0: LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] _0 , # [ doc = "1: MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] _1 } impl From < MSBF_A > for bool { # [ inline ( always ) ] fn from ( variant : MSBF_A ) -> Self { match variant { MSBF_A :: _0 => false , MSBF_A :: _1 => true } } } # [ doc = "Reader of field `MSBF`" ] pub type MSBF_R = crate :: R < bool , MSBF_A > ; impl MSBF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSBF_A { match self . bits { false => MSBF_A :: _0 , true => MSBF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSBF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSBF_A :: _1 } } # [ doc = "Write proxy for field `MSBF`" ] pub struct MSBF_W < 'a > { w : & 'a mut W , } impl < 'a > MSBF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSBF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _0 ) } # [ doc = "MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Pin Active Edge Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIF_A { # [ doc = "0: No active edge on the receive pin has occurred." ] _0 , # [ doc = "1: An active edge on the receive pin has occurred." ] _1 } impl From < RXEDGIF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIF_A ) -> Self { match variant { RXEDGIF_A :: _0 => false , RXEDGIF_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIF`" ] pub type RXEDGIF_R = crate :: R < bool , RXEDGIF_A > ; impl RXEDGIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIF_A { match self . bits { false => RXEDGIF_A :: _0 , true => RXEDGIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIF_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIF`" ] pub struct RXEDGIF_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _0 ) } # [ doc = "An active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIF_A { # [ doc = "0: No LIN break character detected." ] _0 , # [ doc = "1: LIN break character detected." ] _1 } impl From < LBKDIF_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIF_A ) -> Self { match variant { LBKDIF_A :: _0 => false , LBKDIF_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIF`" ] pub type LBKDIF_R = crate :: R < bool , LBKDIF_A > ; impl LBKDIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIF_A { match self . bits { false => LBKDIF_A :: _0 , true => LBKDIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIF_A :: _1 } } # [ doc = "Write proxy for field `LBKDIF`" ] pub struct LBKDIF_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No LIN break character detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _0 ) } # [ doc = "LIN break character detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receiver Active Flag" ] # [ inline ( always ) ] pub fn raf ( & self ) -> RAF_R { RAF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & self ) -> LBKDE_R { LBKDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & self ) -> BRK13_R { BRK13_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & self ) -> RWUID_R { RWUID_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & self ) -> RXINV_R { RXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & self ) -> MSBF_R { MSBF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & self ) -> RXEDGIF_R { RXEDGIF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & self ) -> LBKDIF_R { LBKDIF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & mut self ) -> LBKDE_W { LBKDE_W { w : self } } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & mut self ) -> BRK13_W { BRK13_W { w : self } } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & mut self ) -> RWUID_W { RWUID_W { w : self } } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & mut self ) -> RXINV_W { RXINV_W { w : self } } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & mut self ) -> MSBF_W { MSBF_W { w : self } } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & mut self ) -> RXEDGIF_W { RXEDGIF_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & mut self ) -> LBKDIF_W { LBKDIF_W { w : self } } } } # [ doc = "UART Control Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c3](c3) module" ] pub type C3 = crate :: Reg < u8 , _C3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C3 ; # [ doc = "`read()` method returns [c3::R](c3::R) reader structure" ] impl crate :: Readable for C3 { } # [ doc = "`write(|w| ..)` method takes [c3::W](c3::W) writer structure" ] impl crate :: Writable for C3 { } # [ doc = "UART Control Register 3" ] pub mod c3 { # [ doc = "Reader of register C3" ] pub type R = crate :: R < u8 , super :: C3 > ; # [ doc = "Writer for register C3" ] pub type W = crate :: W < u8 , super :: C3 > ; # [ doc = "Register C3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEIE_A { # [ doc = "0: PF interrupt requests are disabled." ] _0 , # [ doc = "1: PF interrupt requests are enabled." ] _1 } impl From < PEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : PEIE_A ) -> Self { match variant { PEIE_A :: _0 => false , PEIE_A :: _1 => true } } } # [ doc = "Reader of field `PEIE`" ] pub type PEIE_R = crate :: R < bool , PEIE_A > ; impl PEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEIE_A { match self . bits { false => PEIE_A :: _0 , true => PEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEIE_A :: _1 } } # [ doc = "Write proxy for field `PEIE`" ] pub struct PEIE_W < 'a > { w : & 'a mut W , } impl < 'a > PEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _0 ) } # [ doc = "PF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Framing Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEIE_A { # [ doc = "0: FE interrupt requests are disabled." ] _0 , # [ doc = "1: FE interrupt requests are enabled." ] _1 } impl From < FEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FEIE_A ) -> Self { match variant { FEIE_A :: _0 => false , FEIE_A :: _1 => true } } } # [ doc = "Reader of field `FEIE`" ] pub type FEIE_R = crate :: R < bool , FEIE_A > ; impl FEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEIE_A { match self . bits { false => FEIE_A :: _0 , true => FEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEIE_A :: _1 } } # [ doc = "Write proxy for field `FEIE`" ] pub struct FEIE_W < 'a > { w : & 'a mut W , } impl < 'a > FEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FE interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _0 ) } # [ doc = "FE interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Noise Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NEIE_A { # [ doc = "0: NF interrupt requests are disabled." ] _0 , # [ doc = "1: NF interrupt requests are enabled." ] _1 } impl From < NEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : NEIE_A ) -> Self { match variant { NEIE_A :: _0 => false , NEIE_A :: _1 => true } } } # [ doc = "Reader of field `NEIE`" ] pub type NEIE_R = crate :: R < bool , NEIE_A > ; impl NEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NEIE_A { match self . bits { false => NEIE_A :: _0 , true => NEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NEIE_A :: _1 } } # [ doc = "Write proxy for field `NEIE`" ] pub struct NEIE_W < 'a > { w : & 'a mut W , } impl < 'a > NEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "NF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _0 ) } # [ doc = "NF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Overrun Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORIE_A { # [ doc = "0: OR interrupts are disabled." ] _0 , # [ doc = "1: OR interrupt requests are enabled." ] _1 } impl From < ORIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ORIE_A ) -> Self { match variant { ORIE_A :: _0 => false , ORIE_A :: _1 => true } } } # [ doc = "Reader of field `ORIE`" ] pub type ORIE_R = crate :: R < bool , ORIE_A > ; impl ORIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ORIE_A { match self . bits { false => ORIE_A :: _0 , true => ORIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ORIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ORIE_A :: _1 } } # [ doc = "Write proxy for field `ORIE`" ] pub struct ORIE_W < 'a > { w : & 'a mut W , } impl < 'a > ORIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ORIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OR interrupts are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _0 ) } # [ doc = "OR interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Data Inversion.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXINV_A { # [ doc = "0: Transmit data is not inverted." ] _0 , # [ doc = "1: Transmit data is inverted." ] _1 } impl From < TXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : TXINV_A ) -> Self { match variant { TXINV_A :: _0 => false , TXINV_A :: _1 => true } } } # [ doc = "Reader of field `TXINV`" ] pub type TXINV_R = crate :: R < bool , TXINV_A > ; impl TXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXINV_A { match self . bits { false => TXINV_A :: _0 , true => TXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXINV_A :: _1 } } # [ doc = "Write proxy for field `TXINV`" ] pub struct TXINV_W < 'a > { w : & 'a mut W , } impl < 'a > TXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _0 ) } # [ doc = "Transmit data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Transmitter Pin Data Direction in Single-Wire mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDIR_A { # [ doc = "0: TXD pin is an input in single wire mode." ] _0 , # [ doc = "1: TXD pin is an output in single wire mode." ] _1 } impl From < TXDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TXDIR_A ) -> Self { match variant { TXDIR_A :: _0 => false , TXDIR_A :: _1 => true } } } # [ doc = "Reader of field `TXDIR`" ] pub type TXDIR_R = crate :: R < bool , TXDIR_A > ; impl TXDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXDIR_A { match self . bits { false => TXDIR_A :: _0 , true => TXDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXDIR_A :: _1 } } # [ doc = "Write proxy for field `TXDIR`" ] pub struct TXDIR_W < 'a > { w : & 'a mut W , } impl < 'a > TXDIR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXDIR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXD pin is an input in single wire mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _0 ) } # [ doc = "TXD pin is an output in single wire mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `T8`" ] pub type T8_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `T8`" ] pub struct T8_W < 'a > { w : & 'a mut W , } impl < 'a > T8_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `R8`" ] pub type R8_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & self ) -> PEIE_R { PEIE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & self ) -> FEIE_R { FEIE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & self ) -> NEIE_R { NEIE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & self ) -> ORIE_R { ORIE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & self ) -> TXINV_R { TXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & self ) -> TXDIR_R { TXDIR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & self ) -> T8_R { T8_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Received Bit 8" ] # [ inline ( always ) ] pub fn r8 ( & self ) -> R8_R { R8_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & mut self ) -> PEIE_W { PEIE_W { w : self } } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & mut self ) -> FEIE_W { FEIE_W { w : self } } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & mut self ) -> NEIE_W { NEIE_W { w : self } } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & mut self ) -> ORIE_W { ORIE_W { w : self } } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & mut self ) -> TXINV_W { TXINV_W { w : self } } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & mut self ) -> TXDIR_W { TXDIR_W { w : self } } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & mut self ) -> T8_W { T8_W { w : self } } } } # [ doc = "UART Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "UART Data Register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RT`" ] pub type RT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RT`" ] pub struct RT_W < 'a > { w : & 'a mut W , } impl < 'a > RT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & self ) -> RT_R { RT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & mut self ) -> RT_W { RT_W { w : self } } } } # [ doc = "UART Match Address Registers 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma1](ma1) module" ] pub type MA1 = crate :: Reg < u8 , _MA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA1 ; # [ doc = "`read()` method returns [ma1::R](ma1::R) reader structure" ] impl crate :: Readable for MA1 { } # [ doc = "`write(|w| ..)` method takes [ma1::W](ma1::W) writer structure" ] impl crate :: Writable for MA1 { } # [ doc = "UART Match Address Registers 1" ] pub mod ma1 { # [ doc = "Reader of register MA1" ] pub type R = crate :: R < u8 , super :: MA1 > ; # [ doc = "Writer for register MA1" ] pub type W = crate :: W < u8 , super :: MA1 > ; # [ doc = "Register MA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Match Address Registers 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma2](ma2) module" ] pub type MA2 = crate :: Reg < u8 , _MA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA2 ; # [ doc = "`read()` method returns [ma2::R](ma2::R) reader structure" ] impl crate :: Readable for MA2 { } # [ doc = "`write(|w| ..)` method takes [ma2::W](ma2::W) writer structure" ] impl crate :: Writable for MA2 { } # [ doc = "UART Match Address Registers 2" ] pub mod ma2 { # [ doc = "Reader of register MA2" ] pub type R = crate :: R < u8 , super :: MA2 > ; # [ doc = "Writer for register MA2" ] pub type W = crate :: W < u8 , super :: MA2 > ; # [ doc = "Register MA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Control Register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c4](c4) module" ] pub type C4 = crate :: Reg < u8 , _C4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C4 ; # [ doc = "`read()` method returns [c4::R](c4::R) reader structure" ] impl crate :: Readable for C4 { } # [ doc = "`write(|w| ..)` method takes [c4::W](c4::W) writer structure" ] impl crate :: Writable for C4 { } # [ doc = "UART Control Register 4" ] pub mod c4 { # [ doc = "Reader of register C4" ] pub type R = crate :: R < u8 , super :: C4 > ; # [ doc = "Writer for register C4" ] pub type W = crate :: W < u8 , super :: C4 > ; # [ doc = "Register C4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BRFA`" ] pub type BRFA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BRFA`" ] pub struct BRFA_W < 'a > { w : & 'a mut W , } impl < 'a > BRFA_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "10-bit Mode select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M10_A { # [ doc = "0: The parity bit is the ninth bit in the serial transmission." ] _0 , # [ doc = "1: The parity bit is the tenth bit in the serial transmission." ] _1 } impl From < M10_A > for bool { # [ inline ( always ) ] fn from ( variant : M10_A ) -> Self { match variant { M10_A :: _0 => false , M10_A :: _1 => true } } } # [ doc = "Reader of field `M10`" ] pub type M10_R = crate :: R < bool , M10_A > ; impl M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M10_A { match self . bits { false => M10_A :: _0 , true => M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M10_A :: _1 } } # [ doc = "Write proxy for field `M10`" ] pub struct M10_W < 'a > { w : & 'a mut W , } impl < 'a > M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The parity bit is the ninth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M10_A :: _0 ) } # [ doc = "The parity bit is the tenth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M10_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Match Address Mode Enable 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN2_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN1 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN2_A ) -> Self { match variant { MAEN2_A :: _0 => false , MAEN2_A :: _1 => true } } } # [ doc = "Reader of field `MAEN2`" ] pub type MAEN2_R = crate :: R < bool , MAEN2_A > ; impl MAEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN2_A { match self . bits { false => MAEN2_A :: _0 , true => MAEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN2_A :: _1 } } # [ doc = "Write proxy for field `MAEN2`" ] pub struct MAEN2_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN1 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Match Address Mode Enable 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN1_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN2 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN1_A ) -> Self { match variant { MAEN1_A :: _0 => false , MAEN1_A :: _1 => true } } } # [ doc = "Reader of field `MAEN1`" ] pub type MAEN1_R = crate :: R < bool , MAEN1_A > ; impl MAEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN1_A { match self . bits { false => MAEN1_A :: _0 , true => MAEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN1_A :: _1 } } # [ doc = "Write proxy for field `MAEN1`" ] pub struct MAEN1_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN2 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & self ) -> BRFA_R { BRFA_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & self ) -> M10_R { M10_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & self ) -> MAEN2_R { MAEN2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & self ) -> MAEN1_R { MAEN1_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & mut self ) -> BRFA_W { BRFA_W { w : self } } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & mut self ) -> M10_W { M10_W { w : self } } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & mut self ) -> MAEN2_W { MAEN2_W { w : self } } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & mut self ) -> MAEN1_W { MAEN1_W { w : self } } } } # [ doc = "UART Control Register 5\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c5](c5) module" ] pub type C5 = crate :: Reg < u8 , _C5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C5 ; # [ doc = "`read()` method returns [c5::R](c5::R) reader structure" ] impl crate :: Readable for C5 { } # [ doc = "`write(|w| ..)` method takes [c5::W](c5::W) writer structure" ] impl crate :: Writable for C5 { } # [ doc = "UART Control Register 5" ] pub mod c5 { # [ doc = "Reader of register C5" ] pub type R = crate :: R < u8 , super :: C5 > ; # [ doc = "Writer for register C5" ] pub type W = crate :: W < u8 , super :: C5 > ; # [ doc = "Register C5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C5 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Full DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDMAS_A { # [ doc = "0: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] _0 , # [ doc = "1: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < RDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : RDMAS_A ) -> Self { match variant { RDMAS_A :: _0 => false , RDMAS_A :: _1 => true } } } # [ doc = "Reader of field `RDMAS`" ] pub type RDMAS_R = crate :: R < bool , RDMAS_A > ; impl RDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDMAS_A { match self . bits { false => RDMAS_A :: _0 , true => RDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDMAS_A :: _1 } } # [ doc = "Write proxy for field `RDMAS`" ] pub struct RDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > RDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _0 ) } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmitter DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDMAS_A { # [ doc = "0: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] _0 , # [ doc = "1: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < TDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TDMAS_A ) -> Self { match variant { TDMAS_A :: _0 => false , TDMAS_A :: _1 => true } } } # [ doc = "Reader of field `TDMAS`" ] pub type TDMAS_R = crate :: R < bool , TDMAS_A > ; impl TDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDMAS_A { match self . bits { false => TDMAS_A :: _0 , true => TDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDMAS_A :: _1 } } # [ doc = "Write proxy for field `TDMAS`" ] pub struct TDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > TDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _0 ) } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & self ) -> RDMAS_R { RDMAS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & self ) -> TDMAS_R { TDMAS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & mut self ) -> RDMAS_W { RDMAS_W { w : self } } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & mut self ) -> TDMAS_W { TDMAS_W { w : self } } } } # [ doc = "UART Extended Data Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ed](ed) module" ] pub type ED = crate :: Reg < u8 , _ED > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ED ; # [ doc = "`read()` method returns [ed::R](ed::R) reader structure" ] impl crate :: Readable for ED { } # [ doc = "UART Extended Data Register" ] pub mod ed { # [ doc = "Reader of register ED" ] pub type R = crate :: R < u8 , super :: ED > ; # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with a parity error.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYE_A { # [ doc = "0: The dataword was received without a parity error." ] _0 , # [ doc = "1: The dataword was received with a parity error." ] _1 } impl From < PARITYE_A > for bool { # [ inline ( always ) ] fn from ( variant : PARITYE_A ) -> Self { match variant { PARITYE_A :: _0 => false , PARITYE_A :: _1 => true } } } # [ doc = "Reader of field `PARITYE`" ] pub type PARITYE_R = crate :: R < bool , PARITYE_A > ; impl PARITYE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PARITYE_A { match self . bits { false => PARITYE_A :: _0 , true => PARITYE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PARITYE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PARITYE_A :: _1 } } # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with noise.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOISY_A { # [ doc = "0: The dataword was received without noise." ] _0 , # [ doc = "1: The data was received with noise." ] _1 } impl From < NOISY_A > for bool { # [ inline ( always ) ] fn from ( variant : NOISY_A ) -> Self { match variant { NOISY_A :: _0 => false , NOISY_A :: _1 => true } } } # [ doc = "Reader of field `NOISY`" ] pub type NOISY_R = crate :: R < bool , NOISY_A > ; impl NOISY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOISY_A { match self . bits { false => NOISY_A :: _0 , true => NOISY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOISY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOISY_A :: _1 } } impl R { # [ doc = "Bit 6 - The current received dataword contained in D and C3\\[R8\\] was received with a parity error." ] # [ inline ( always ) ] pub fn paritye ( & self ) -> PARITYE_R { PARITYE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - The current received dataword contained in D and C3\\[R8\\] was received with noise." ] # [ inline ( always ) ] pub fn noisy ( & self ) -> NOISY_R { NOISY_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Modem Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [modem](modem) module" ] pub type MODEM = crate :: Reg < u8 , _MODEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODEM ; # [ doc = "`read()` method returns [modem::R](modem::R) reader structure" ] impl crate :: Readable for MODEM { } # [ doc = "`write(|w| ..)` method takes [modem::W](modem::W) writer structure" ] impl crate :: Writable for MODEM { } # [ doc = "UART Modem Register" ] pub mod modem { # [ doc = "Reader of register MODEM" ] pub type R = crate :: R < u8 , super :: MODEM > ; # [ doc = "Writer for register MODEM" ] pub type W = crate :: W < u8 , super :: MODEM > ; # [ doc = "Register MODEM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MODEM { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter clear-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXCTSE_A { # [ doc = "0: CTS has no effect on the transmitter." ] _0 , # [ doc = "1: Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] _1 } impl From < TXCTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXCTSE_A ) -> Self { match variant { TXCTSE_A :: _0 => false , TXCTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXCTSE`" ] pub type TXCTSE_R = crate :: R < bool , TXCTSE_A > ; impl TXCTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXCTSE_A { match self . bits { false => TXCTSE_A :: _0 , true => TXCTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXCTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXCTSE_A :: _1 } } # [ doc = "Write proxy for field `TXCTSE`" ] pub struct TXCTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXCTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXCTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CTS has no effect on the transmitter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _0 ) } # [ doc = "Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSE_A { # [ doc = "0: The transmitter has no effect on RTS." ] _0 , # [ doc = "1: When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] _1 } impl From < TXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSE_A ) -> Self { match variant { TXRTSE_A :: _0 => false , TXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSE`" ] pub type TXRTSE_R = crate :: R < bool , TXRTSE_A > ; impl TXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSE_A { match self . bits { false => TXRTSE_A :: _0 , true => TXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSE_A :: _1 } } # [ doc = "Write proxy for field `TXRTSE`" ] pub struct TXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The transmitter has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _0 ) } # [ doc = "When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Transmitter request-to-send polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSPOL_A { # [ doc = "0: Transmitter RTS is active low." ] _0 , # [ doc = "1: Transmitter RTS is active high." ] _1 } impl From < TXRTSPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSPOL_A ) -> Self { match variant { TXRTSPOL_A :: _0 => false , TXRTSPOL_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSPOL`" ] pub type TXRTSPOL_R = crate :: R < bool , TXRTSPOL_A > ; impl TXRTSPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSPOL_A { match self . bits { false => TXRTSPOL_A :: _0 , true => TXRTSPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSPOL_A :: _1 } } # [ doc = "Write proxy for field `TXRTSPOL`" ] pub struct TXRTSPOL_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter RTS is active low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _0 ) } # [ doc = "Transmitter RTS is active high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXRTSE_A { # [ doc = "0: The receiver has no effect on RTS." ] _0 , # [ doc = "1: RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] _1 } impl From < RXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXRTSE_A ) -> Self { match variant { RXRTSE_A :: _0 => false , RXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `RXRTSE`" ] pub type RXRTSE_R = crate :: R < bool , RXRTSE_A > ; impl RXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXRTSE_A { match self . bits { false => RXRTSE_A :: _0 , true => RXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXRTSE_A :: _1 } } # [ doc = "Write proxy for field `RXRTSE`" ] pub struct RXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > RXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The receiver has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _0 ) } # [ doc = "RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & self ) -> TXCTSE_R { TXCTSE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & self ) -> TXRTSE_R { TXRTSE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & self ) -> TXRTSPOL_R { TXRTSPOL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & self ) -> RXRTSE_R { RXRTSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & mut self ) -> TXCTSE_W { TXCTSE_W { w : self } } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & mut self ) -> TXRTSE_W { TXRTSE_W { w : self } } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & mut self ) -> TXRTSPOL_W { TXRTSPOL_W { w : self } } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & mut self ) -> RXRTSE_W { RXRTSE_W { w : self } } } } # [ doc = "UART Infrared Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ir](ir) module" ] pub type IR = crate :: Reg < u8 , _IR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IR ; # [ doc = "`read()` method returns [ir::R](ir::R) reader structure" ] impl crate :: Readable for IR { } # [ doc = "`write(|w| ..)` method takes [ir::W](ir::W) writer structure" ] impl crate :: Writable for IR { } # [ doc = "UART Infrared Register" ] pub mod ir { # [ doc = "Reader of register IR" ] pub type R = crate :: R < u8 , super :: IR > ; # [ doc = "Writer for register IR" ] pub type W = crate :: W < u8 , super :: IR > ; # [ doc = "Register IR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter narrow pulse\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TNP_A { # [ doc = "0: 3/16." ] _00 , # [ doc = "1: 1/16." ] _01 , # [ doc = "2: 1/32." ] _10 , # [ doc = "3: 1/4." ] _11 } impl From < TNP_A > for u8 { # [ inline ( always ) ] fn from ( variant : TNP_A ) -> Self { match variant { TNP_A :: _00 => 0 , TNP_A :: _01 => 1 , TNP_A :: _10 => 2 , TNP_A :: _11 => 3 } } } # [ doc = "Reader of field `TNP`" ] pub type TNP_R = crate :: R < u8 , TNP_A > ; impl TNP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TNP_A { match self . bits { 0 => TNP_A :: _00 , 1 => TNP_A :: _01 , 2 => TNP_A :: _10 , 3 => TNP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TNP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TNP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TNP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TNP_A :: _11 } } # [ doc = "Write proxy for field `TNP`" ] pub struct TNP_W < 'a > { w : & 'a mut W , } impl < 'a > TNP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TNP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "3/16." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _00 ) } # [ doc = "1/16." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _01 ) } # [ doc = "1/32." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _10 ) } # [ doc = "1/4." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Infrared enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREN_A { # [ doc = "0: IR disabled." ] _0 , # [ doc = "1: IR enabled." ] _1 } impl From < IREN_A > for bool { # [ inline ( always ) ] fn from ( variant : IREN_A ) -> Self { match variant { IREN_A :: _0 => false , IREN_A :: _1 => true } } } # [ doc = "Reader of field `IREN`" ] pub type IREN_R = crate :: R < bool , IREN_A > ; impl IREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREN_A { match self . bits { false => IREN_A :: _0 , true => IREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREN_A :: _1 } } # [ doc = "Write proxy for field `IREN`" ] pub struct IREN_W < 'a > { w : & 'a mut W , } impl < 'a > IREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IR disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _0 ) } # [ doc = "IR enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & self ) -> TNP_R { TNP_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & self ) -> IREN_R { IREN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & mut self ) -> TNP_W { TNP_W { w : self } } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & mut self ) -> IREN_W { IREN_W { w : self } } } } # [ doc = "UART FIFO Parameters\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pfifo](pfifo) module" ] pub type PFIFO = crate :: Reg < u8 , _PFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PFIFO ; # [ doc = "`read()` method returns [pfifo::R](pfifo::R) reader structure" ] impl crate :: Readable for PFIFO { } # [ doc = "`write(|w| ..)` method takes [pfifo::W](pfifo::W) writer structure" ] impl crate :: Writable for PFIFO { } # [ doc = "UART FIFO Parameters" ] pub mod pfifo { # [ doc = "Reader of register PFIFO" ] pub type R = crate :: R < u8 , super :: PFIFO > ; # [ doc = "Writer for register PFIFO" ] pub type W = crate :: W < u8 , super :: PFIFO > ; # [ doc = "Register PFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFIFOSIZE_A { # [ doc = "0: Receive FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Receive FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Receive FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Receive FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Receive FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Receive FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Receive FIFO/Buffer depth = 128 datawords." ] _110 } impl From < RXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : RXFIFOSIZE_A ) -> Self { match variant { RXFIFOSIZE_A :: _000 => 0 , RXFIFOSIZE_A :: _001 => 1 , RXFIFOSIZE_A :: _010 => 2 , RXFIFOSIZE_A :: _011 => 3 , RXFIFOSIZE_A :: _100 => 4 , RXFIFOSIZE_A :: _101 => 5 , RXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `RXFIFOSIZE`" ] pub type RXFIFOSIZE_R = crate :: R < u8 , RXFIFOSIZE_A > ; impl RXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RXFIFOSIZE_A :: _000 ) , 1 => Val ( RXFIFOSIZE_A :: _001 ) , 2 => Val ( RXFIFOSIZE_A :: _010 ) , 3 => Val ( RXFIFOSIZE_A :: _011 ) , 4 => Val ( RXFIFOSIZE_A :: _100 ) , 5 => Val ( RXFIFOSIZE_A :: _101 ) , 6 => Val ( RXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _110 } } # [ doc = "Receive FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFE_A { # [ doc = "0: Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] _0 , # [ doc = "1: Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] _1 } impl From < RXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXFE_A ) -> Self { match variant { RXFE_A :: _0 => false , RXFE_A :: _1 => true } } } # [ doc = "Reader of field `RXFE`" ] pub type RXFE_R = crate :: R < bool , RXFE_A > ; impl RXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXFE_A { match self . bits { false => RXFE_A :: _0 , true => RXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXFE_A :: _1 } } # [ doc = "Write proxy for field `RXFE`" ] pub struct RXFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _0 ) } # [ doc = "Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFIFOSIZE_A { # [ doc = "0: Transmit FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Transmit FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Transmit FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Transmit FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Transmit FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Transmit FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Transmit FIFO/Buffer depth = 128 datawords." ] _110 } impl From < TXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXFIFOSIZE_A ) -> Self { match variant { TXFIFOSIZE_A :: _000 => 0 , TXFIFOSIZE_A :: _001 => 1 , TXFIFOSIZE_A :: _010 => 2 , TXFIFOSIZE_A :: _011 => 3 , TXFIFOSIZE_A :: _100 => 4 , TXFIFOSIZE_A :: _101 => 5 , TXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `TXFIFOSIZE`" ] pub type TXFIFOSIZE_R = crate :: R < u8 , TXFIFOSIZE_A > ; impl TXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TXFIFOSIZE_A :: _000 ) , 1 => Val ( TXFIFOSIZE_A :: _001 ) , 2 => Val ( TXFIFOSIZE_A :: _010 ) , 3 => Val ( TXFIFOSIZE_A :: _011 ) , 4 => Val ( TXFIFOSIZE_A :: _100 ) , 5 => Val ( TXFIFOSIZE_A :: _101 ) , 6 => Val ( TXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _110 } } # [ doc = "Transmit FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFE_A { # [ doc = "0: Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] _0 , # [ doc = "1: Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] _1 } impl From < TXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXFE_A ) -> Self { match variant { TXFE_A :: _0 => false , TXFE_A :: _1 => true } } } # [ doc = "Reader of field `TXFE`" ] pub type TXFE_R = crate :: R < bool , TXFE_A > ; impl TXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXFE_A { match self . bits { false => TXFE_A :: _0 , true => TXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXFE_A :: _1 } } # [ doc = "Write proxy for field `TXFE`" ] pub struct TXFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _0 ) } # [ doc = "Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Receive FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn rxfifosize ( & self ) -> RXFIFOSIZE_R { RXFIFOSIZE_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & self ) -> RXFE_R { RXFE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:6 - Transmit FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn txfifosize ( & self ) -> TXFIFOSIZE_R { TXFIFOSIZE_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & self ) -> TXFE_R { TXFE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & mut self ) -> RXFE_W { RXFE_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & mut self ) -> TXFE_W { TXFE_W { w : self } } } } # [ doc = "UART FIFO Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfifo](cfifo) module" ] pub type CFIFO = crate :: Reg < u8 , _CFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFIFO ; # [ doc = "`read()` method returns [cfifo::R](cfifo::R) reader structure" ] impl crate :: Readable for CFIFO { } # [ doc = "`write(|w| ..)` method takes [cfifo::W](cfifo::W) writer structure" ] impl crate :: Writable for CFIFO { } # [ doc = "UART FIFO Control Register" ] pub mod cfifo { # [ doc = "Reader of register CFIFO" ] pub type R = crate :: R < u8 , super :: CFIFO > ; # [ doc = "Writer for register CFIFO" ] pub type W = crate :: W < u8 , super :: CFIFO > ; # [ doc = "Register CFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO Underflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUFE_A { # [ doc = "0: RXUF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXUF flag generates an interrupt to the host." ] _1 } impl From < RXUFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUFE_A ) -> Self { match variant { RXUFE_A :: _0 => false , RXUFE_A :: _1 => true } } } # [ doc = "Reader of field `RXUFE`" ] pub type RXUFE_R = crate :: R < bool , RXUFE_A > ; impl RXUFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUFE_A { match self . bits { false => RXUFE_A :: _0 , true => RXUFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUFE_A :: _1 } } # [ doc = "Write proxy for field `RXUFE`" ] pub struct RXUFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXUFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXUF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _0 ) } # [ doc = "RXUF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmit FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOFE_A { # [ doc = "0: TXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: TXOF flag generates an interrupt to the host." ] _1 } impl From < TXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOFE_A ) -> Self { match variant { TXOFE_A :: _0 => false , TXOFE_A :: _1 => true } } } # [ doc = "Reader of field `TXOFE`" ] pub type TXOFE_R = crate :: R < bool , TXOFE_A > ; impl TXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOFE_A { match self . bits { false => TXOFE_A :: _0 , true => TXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOFE_A :: _1 } } # [ doc = "Write proxy for field `TXOFE`" ] pub struct TXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _0 ) } # [ doc = "TXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receive FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOFE_A { # [ doc = "0: RXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXOF flag generates an interrupt to the host." ] _1 } impl From < RXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOFE_A ) -> Self { match variant { RXOFE_A :: _0 => false , RXOFE_A :: _1 => true } } } # [ doc = "Reader of field `RXOFE`" ] pub type RXOFE_R = crate :: R < bool , RXOFE_A > ; impl RXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOFE_A { match self . bits { false => RXOFE_A :: _0 , true => RXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOFE_A :: _1 } } # [ doc = "Write proxy for field `RXOFE`" ] pub struct RXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _0 ) } # [ doc = "RXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the receive FIFO/buffer is cleared out." ] _1 } impl From < RXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : RXFLUSH_AW ) -> Self { match variant { RXFLUSH_AW :: _0 => false , RXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `RXFLUSH`" ] pub struct RXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > RXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _0 ) } # [ doc = "All data in the receive FIFO/buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmit FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the transmit FIFO/Buffer is cleared out." ] _1 } impl From < TXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : TXFLUSH_AW ) -> Self { match variant { TXFLUSH_AW :: _0 => false , TXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `TXFLUSH`" ] pub struct TXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > TXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _0 ) } # [ doc = "All data in the transmit FIFO/Buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & self ) -> RXUFE_R { RXUFE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & self ) -> TXOFE_R { TXOFE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & self ) -> RXOFE_R { RXOFE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & mut self ) -> RXUFE_W { RXUFE_W { w : self } } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & mut self ) -> TXOFE_W { TXOFE_W { w : self } } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & mut self ) -> RXOFE_W { RXOFE_W { w : self } } # [ doc = "Bit 6 - Receive FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn rxflush ( & mut self ) -> RXFLUSH_W { RXFLUSH_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn txflush ( & mut self ) -> TXFLUSH_W { TXFLUSH_W { w : self } } } } # [ doc = "UART FIFO Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sfifo](sfifo) module" ] pub type SFIFO = crate :: Reg < u8 , _SFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SFIFO ; # [ doc = "`read()` method returns [sfifo::R](sfifo::R) reader structure" ] impl crate :: Readable for SFIFO { } # [ doc = "`write(|w| ..)` method takes [sfifo::W](sfifo::W) writer structure" ] impl crate :: Writable for SFIFO { } # [ doc = "UART FIFO Status Register" ] pub mod sfifo { # [ doc = "Reader of register SFIFO" ] pub type R = crate :: R < u8 , super :: SFIFO > ; # [ doc = "Writer for register SFIFO" ] pub type W = crate :: W < u8 , super :: SFIFO > ; # [ doc = "Register SFIFO `reset()`'s with value 0xc0" ] impl crate :: ResetValue for super :: SFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc0 } } # [ doc = "Receiver Buffer Underflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUF_A { # [ doc = "0: No receive buffer underflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer underflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXUF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUF_A ) -> Self { match variant { RXUF_A :: _0 => false , RXUF_A :: _1 => true } } } # [ doc = "Reader of field `RXUF`" ] pub type RXUF_R = crate :: R < bool , RXUF_A > ; impl RXUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUF_A { match self . bits { false => RXUF_A :: _0 , true => RXUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUF_A :: _1 } } # [ doc = "Write proxy for field `RXUF`" ] pub struct RXUF_W < 'a > { w : & 'a mut W , } impl < 'a > RXUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _0 ) } # [ doc = "At least one receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOF_A { # [ doc = "0: No transmit buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < TXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOF_A ) -> Self { match variant { TXOF_A :: _0 => false , TXOF_A :: _1 => true } } } # [ doc = "Reader of field `TXOF`" ] pub type TXOF_R = crate :: R < bool , TXOF_A > ; impl TXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOF_A { match self . bits { false => TXOF_A :: _0 , true => TXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOF_A :: _1 } } # [ doc = "Write proxy for field `TXOF`" ] pub struct TXOF_W < 'a > { w : & 'a mut W , } impl < 'a > TXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _0 ) } # [ doc = "At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOF_A { # [ doc = "0: No receive buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOF_A ) -> Self { match variant { RXOF_A :: _0 => false , RXOF_A :: _1 => true } } } # [ doc = "Reader of field `RXOF`" ] pub type RXOF_R = crate :: R < bool , RXOF_A > ; impl RXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOF_A { match self . bits { false => RXOF_A :: _0 , true => RXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOF_A :: _1 } } # [ doc = "Write proxy for field `RXOF`" ] pub struct RXOF_W < 'a > { w : & 'a mut W , } impl < 'a > RXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _0 ) } # [ doc = "At least one receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEMPT_A { # [ doc = "0: Receive buffer is not empty." ] _0 , # [ doc = "1: Receive buffer is empty." ] _1 } impl From < RXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEMPT_A ) -> Self { match variant { RXEMPT_A :: _0 => false , RXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `RXEMPT`" ] pub type RXEMPT_R = crate :: R < bool , RXEMPT_A > ; impl RXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEMPT_A { match self . bits { false => RXEMPT_A :: _0 , true => RXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEMPT_A :: _1 } } # [ doc = "Transmit Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXEMPT_A { # [ doc = "0: Transmit buffer is not empty." ] _0 , # [ doc = "1: Transmit buffer is empty." ] _1 } impl From < TXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : TXEMPT_A ) -> Self { match variant { TXEMPT_A :: _0 => false , TXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `TXEMPT`" ] pub type TXEMPT_R = crate :: R < bool , TXEMPT_A > ; impl TXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXEMPT_A { match self . bits { false => TXEMPT_A :: _0 , true => TXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXEMPT_A :: _1 } } impl R { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & self ) -> RXUF_R { RXUF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & self ) -> TXOF_R { TXOF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & self ) -> RXOF_R { RXOF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Receive Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn rxempt ( & self ) -> RXEMPT_R { RXEMPT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn txempt ( & self ) -> TXEMPT_R { TXEMPT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & mut self ) -> RXUF_W { RXUF_W { w : self } } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & mut self ) -> TXOF_W { TXOF_W { w : self } } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & mut self ) -> RXOF_W { RXOF_W { w : self } } } } # [ doc = "UART FIFO Transmit Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [twfifo](twfifo) module" ] pub type TWFIFO = crate :: Reg < u8 , _TWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TWFIFO ; # [ doc = "`read()` method returns [twfifo::R](twfifo::R) reader structure" ] impl crate :: Readable for TWFIFO { } # [ doc = "`write(|w| ..)` method takes [twfifo::W](twfifo::W) writer structure" ] impl crate :: Writable for TWFIFO { } # [ doc = "UART FIFO Transmit Watermark" ] pub mod twfifo { # [ doc = "Reader of register TWFIFO" ] pub type R = crate :: R < u8 , super :: TWFIFO > ; # [ doc = "Writer for register TWFIFO" ] pub type W = crate :: W < u8 , super :: TWFIFO > ; # [ doc = "Register TWFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXWATER`" ] pub type TXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXWATER`" ] pub struct TXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > TXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & self ) -> TXWATER_R { TXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & mut self ) -> TXWATER_W { TXWATER_W { w : self } } } } # [ doc = "UART FIFO Transmit Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcfifo](tcfifo) module" ] pub type TCFIFO = crate :: Reg < u8 , _TCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCFIFO ; # [ doc = "`read()` method returns [tcfifo::R](tcfifo::R) reader structure" ] impl crate :: Readable for TCFIFO { } # [ doc = "UART FIFO Transmit Count" ] pub mod tcfifo { # [ doc = "Reader of register TCFIFO" ] pub type R = crate :: R < u8 , super :: TCFIFO > ; # [ doc = "Reader of field `TXCOUNT`" ] pub type TXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Transmit Counter" ] # [ inline ( always ) ] pub fn txcount ( & self ) -> TXCOUNT_R { TXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "UART FIFO Receive Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rwfifo](rwfifo) module" ] pub type RWFIFO = crate :: Reg < u8 , _RWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RWFIFO ; # [ doc = "`read()` method returns [rwfifo::R](rwfifo::R) reader structure" ] impl crate :: Readable for RWFIFO { } # [ doc = "`write(|w| ..)` method takes [rwfifo::W](rwfifo::W) writer structure" ] impl crate :: Writable for RWFIFO { } # [ doc = "UART FIFO Receive Watermark" ] pub mod rwfifo { # [ doc = "Reader of register RWFIFO" ] pub type R = crate :: R < u8 , super :: RWFIFO > ; # [ doc = "Writer for register RWFIFO" ] pub type W = crate :: W < u8 , super :: RWFIFO > ; # [ doc = "Register RWFIFO `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: RWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Reader of field `RXWATER`" ] pub type RXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXWATER`" ] pub struct RXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > RXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & self ) -> RXWATER_R { RXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & mut self ) -> RXWATER_W { RXWATER_W { w : self } } } } # [ doc = "UART FIFO Receive Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcfifo](rcfifo) module" ] pub type RCFIFO = crate :: Reg < u8 , _RCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCFIFO ; # [ doc = "`read()` method returns [rcfifo::R](rcfifo::R) reader structure" ] impl crate :: Readable for RCFIFO { } # [ doc = "UART FIFO Receive Count" ] pub mod rcfifo { # [ doc = "Reader of register RCFIFO" ] pub type R = crate :: R < u8 , super :: RCFIFO > ; # [ doc = "Reader of field `RXCOUNT`" ] pub type RXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Receive Counter" ] # [ inline ( always ) ] pub fn rxcount ( & self ) -> RXCOUNT_R { RXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } } # [ doc = "Serial Communication Interface" ] pub struct UART2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for UART2 { } impl UART2 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const uart2 :: RegisterBlock { 0x4006_c000 as * const _ } } impl Deref for UART2 { type Target = uart2 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * UART2 :: ptr ( ) } } } # [ doc = "Serial Communication Interface" ] pub mod uart2 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - UART Baud Rate Registers: High" ] pub bdh : BDH , # [ doc = "0x01 - UART Baud Rate Registers: Low" ] pub bdl : BDL , # [ doc = "0x02 - UART Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - UART Control Register 2" ] pub c2 : C2 , # [ doc = "0x04 - UART Status Register 1" ] pub s1 : S1 , # [ doc = "0x05 - UART Status Register 2" ] pub s2 : S2 , # [ doc = "0x06 - UART Control Register 3" ] pub c3 : C3 , # [ doc = "0x07 - UART Data Register" ] pub d : D , # [ doc = "0x08 - UART Match Address Registers 1" ] pub ma1 : MA1 , # [ doc = "0x09 - UART Match Address Registers 2" ] pub ma2 : MA2 , # [ doc = "0x0a - UART Control Register 4" ] pub c4 : C4 , # [ doc = "0x0b - UART Control Register 5" ] pub c5 : C5 , # [ doc = "0x0c - UART Extended Data Register" ] pub ed : ED , # [ doc = "0x0d - UART Modem Register" ] pub modem : MODEM , # [ doc = "0x0e - UART Infrared Register" ] pub ir : IR , _reserved15 : [ u8 ; 1usize ] , # [ doc = "0x10 - UART FIFO Parameters" ] pub pfifo : PFIFO , # [ doc = "0x11 - UART FIFO Control Register" ] pub cfifo : CFIFO , # [ doc = "0x12 - UART FIFO Status Register" ] pub sfifo : SFIFO , # [ doc = "0x13 - UART FIFO Transmit Watermark" ] pub twfifo : TWFIFO , # [ doc = "0x14 - UART FIFO Transmit Count" ] pub tcfifo : TCFIFO , # [ doc = "0x15 - UART FIFO Receive Watermark" ] pub rwfifo : RWFIFO , # [ doc = "0x16 - UART FIFO Receive Count" ] pub rcfifo : RCFIFO , } # [ doc = "UART Baud Rate Registers: High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdh](bdh) module" ] pub type BDH = crate :: Reg < u8 , _BDH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDH ; # [ doc = "`read()` method returns [bdh::R](bdh::R) reader structure" ] impl crate :: Readable for BDH { } # [ doc = "`write(|w| ..)` method takes [bdh::W](bdh::W) writer structure" ] impl crate :: Writable for BDH { } # [ doc = "UART Baud Rate Registers: High" ] pub mod bdh { # [ doc = "Reader of register BDH" ] pub type R = crate :: R < u8 , super :: BDH > ; # [ doc = "Writer for register BDH" ] pub type W = crate :: W < u8 , super :: BDH > ; # [ doc = "Register BDH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BDH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Stop Bit Number Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBNS_A { # [ doc = "0: Data frame consists of a single stop bit." ] _0 , # [ doc = "1: Data frame consists of two stop bits." ] _1 } impl From < SBNS_A > for bool { # [ inline ( always ) ] fn from ( variant : SBNS_A ) -> Self { match variant { SBNS_A :: _0 => false , SBNS_A :: _1 => true } } } # [ doc = "Reader of field `SBNS`" ] pub type SBNS_R = crate :: R < bool , SBNS_A > ; impl SBNS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBNS_A { match self . bits { false => SBNS_A :: _0 , true => SBNS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBNS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBNS_A :: _1 } } # [ doc = "Write proxy for field `SBNS`" ] pub struct SBNS_W < 'a > { w : & 'a mut W , } impl < 'a > SBNS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBNS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data frame consists of a single stop bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _0 ) } # [ doc = "Data frame consists of two stop bits." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Input Active Edge Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIE_A { # [ doc = "0: Hardware interrupts from RXEDGIF disabled using polling." ] _0 , # [ doc = "1: RXEDGIF interrupt request enabled." ] _1 } impl From < RXEDGIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIE_A ) -> Self { match variant { RXEDGIE_A :: _0 => false , RXEDGIE_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIE`" ] pub type RXEDGIE_R = crate :: R < bool , RXEDGIE_A > ; impl RXEDGIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIE_A { match self . bits { false => RXEDGIE_A :: _0 , true => RXEDGIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIE_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIE`" ] pub struct RXEDGIE_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from RXEDGIF disabled using polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _0 ) } # [ doc = "RXEDGIF interrupt request enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIE_A { # [ doc = "0: LBKDIF interrupt requests disabled." ] _0 , # [ doc = "1: LBKDIF interrupt requests enabled." ] _1 } impl From < LBKDIE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIE_A ) -> Self { match variant { LBKDIE_A :: _0 => false , LBKDIE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIE`" ] pub type LBKDIE_R = crate :: R < bool , LBKDIE_A > ; impl LBKDIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIE_A { match self . bits { false => LBKDIE_A :: _0 , true => LBKDIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIE_A :: _1 } } # [ doc = "Write proxy for field `LBKDIE`" ] pub struct LBKDIE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LBKDIF interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _0 ) } # [ doc = "LBKDIF interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & self ) -> SBNS_R { SBNS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & self ) -> RXEDGIE_R { RXEDGIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & self ) -> LBKDIE_R { LBKDIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & mut self ) -> SBNS_W { SBNS_W { w : self } } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & mut self ) -> RXEDGIE_W { RXEDGIE_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & mut self ) -> LBKDIE_W { LBKDIE_W { w : self } } } } # [ doc = "UART Baud Rate Registers: Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdl](bdl) module" ] pub type BDL = crate :: Reg < u8 , _BDL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDL ; # [ doc = "`read()` method returns [bdl::R](bdl::R) reader structure" ] impl crate :: Readable for BDL { } # [ doc = "`write(|w| ..)` method takes [bdl::W](bdl::W) writer structure" ] impl crate :: Writable for BDL { } # [ doc = "UART Baud Rate Registers: Low" ] pub mod bdl { # [ doc = "Reader of register BDL" ] pub type R = crate :: R < u8 , super :: BDL > ; # [ doc = "Writer for register BDL" ] pub type W = crate :: W < u8 , super :: BDL > ; # [ doc = "Register BDL `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: BDL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } } } # [ doc = "UART Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "UART Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PT_A { # [ doc = "0: Even parity." ] _0 , # [ doc = "1: Odd parity." ] _1 } impl From < PT_A > for bool { # [ inline ( always ) ] fn from ( variant : PT_A ) -> Self { match variant { PT_A :: _0 => false , PT_A :: _1 => true } } } # [ doc = "Reader of field `PT`" ] pub type PT_R = crate :: R < bool , PT_A > ; impl PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PT_A { match self . bits { false => PT_A :: _0 , true => PT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PT_A :: _1 } } # [ doc = "Write proxy for field `PT`" ] pub struct PT_W < 'a > { w : & 'a mut W , } impl < 'a > PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Even parity." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PT_A :: _0 ) } # [ doc = "Odd parity." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PT_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Parity Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Parity function disabled." ] _0 , # [ doc = "1: Parity function enabled." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Parity function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Parity function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Idle Line Type Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILT_A { # [ doc = "0: Idle character bit count starts after start bit." ] _0 , # [ doc = "1: Idle character bit count starts after stop bit." ] _1 } impl From < ILT_A > for bool { # [ inline ( always ) ] fn from ( variant : ILT_A ) -> Self { match variant { ILT_A :: _0 => false , ILT_A :: _1 => true } } } # [ doc = "Reader of field `ILT`" ] pub type ILT_R = crate :: R < bool , ILT_A > ; impl ILT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILT_A { match self . bits { false => ILT_A :: _0 , true => ILT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILT_A :: _1 } } # [ doc = "Write proxy for field `ILT`" ] pub struct ILT_W < 'a > { w : & 'a mut W , } impl < 'a > ILT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle character bit count starts after start bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _0 ) } # [ doc = "Idle character bit count starts after stop bit." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver Wakeup Method Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKE_A { # [ doc = "0: Idle line wakeup." ] _0 , # [ doc = "1: Address mark wakeup." ] _1 } impl From < WAKE_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKE_A ) -> Self { match variant { WAKE_A :: _0 => false , WAKE_A :: _1 => true } } } # [ doc = "Reader of field `WAKE`" ] pub type WAKE_R = crate :: R < bool , WAKE_A > ; impl WAKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKE_A { match self . bits { false => WAKE_A :: _0 , true => WAKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKE_A :: _1 } } # [ doc = "Write proxy for field `WAKE`" ] pub struct WAKE_W < 'a > { w : & 'a mut W , } impl < 'a > WAKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle line wakeup." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _0 ) } # [ doc = "Address mark wakeup." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "9-bit or 8-bit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M_A { # [ doc = "0: Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] _0 , # [ doc = "1: Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] _1 } impl From < M_A > for bool { # [ inline ( always ) ] fn from ( variant : M_A ) -> Self { match variant { M_A :: _0 => false , M_A :: _1 => true } } } # [ doc = "Reader of field `M`" ] pub type M_R = crate :: R < bool , M_A > ; impl M_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M_A { match self . bits { false => M_A :: _0 , true => M_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M_A :: _1 } } # [ doc = "Write proxy for field `M`" ] pub struct M_W < 'a > { w : & 'a mut W , } impl < 'a > M_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M_A :: _0 ) } # [ doc = "Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSRC_A { # [ doc = "0: Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] _0 , # [ doc = "1: Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] _1 } impl From < RSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : RSRC_A ) -> Self { match variant { RSRC_A :: _0 => false , RSRC_A :: _1 => true } } } # [ doc = "Reader of field `RSRC`" ] pub type RSRC_R = crate :: R < bool , RSRC_A > ; impl RSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSRC_A { match self . bits { false => RSRC_A :: _0 , true => RSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RSRC_A :: _1 } } # [ doc = "Write proxy for field `RSRC`" ] pub struct RSRC_W < 'a > { w : & 'a mut W , } impl < 'a > RSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _0 ) } # [ doc = "Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "UART Stops in Wait Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UARTSWAI_A { # [ doc = "0: UART clock continues to run in Wait mode." ] _0 , # [ doc = "1: UART clock freezes while CPU is in Wait mode." ] _1 } impl From < UARTSWAI_A > for bool { # [ inline ( always ) ] fn from ( variant : UARTSWAI_A ) -> Self { match variant { UARTSWAI_A :: _0 => false , UARTSWAI_A :: _1 => true } } } # [ doc = "Reader of field `UARTSWAI`" ] pub type UARTSWAI_R = crate :: R < bool , UARTSWAI_A > ; impl UARTSWAI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UARTSWAI_A { match self . bits { false => UARTSWAI_A :: _0 , true => UARTSWAI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UARTSWAI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UARTSWAI_A :: _1 } } # [ doc = "Write proxy for field `UARTSWAI`" ] pub struct UARTSWAI_W < 'a > { w : & 'a mut W , } impl < 'a > UARTSWAI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UARTSWAI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "UART clock continues to run in Wait mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _0 ) } # [ doc = "UART clock freezes while CPU is in Wait mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Loop Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] _1 } impl From < LOOPS_A > for bool { # [ inline ( always ) ] fn from ( variant : LOOPS_A ) -> Self { match variant { LOOPS_A :: _0 => false , LOOPS_A :: _1 => true } } } # [ doc = "Reader of field `LOOPS`" ] pub type LOOPS_R = crate :: R < bool , LOOPS_A > ; impl LOOPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOOPS_A { match self . bits { false => LOOPS_A :: _0 , true => LOOPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOOPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOOPS_A :: _1 } } # [ doc = "Write proxy for field `LOOPS`" ] pub struct LOOPS_W < 'a > { w : & 'a mut W , } impl < 'a > LOOPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOOPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _0 ) } # [ doc = "Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & self ) -> PT_R { PT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & self ) -> ILT_R { ILT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & self ) -> WAKE_R { WAKE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & self ) -> M_R { M_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & self ) -> RSRC_R { RSRC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & self ) -> UARTSWAI_R { UARTSWAI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & self ) -> LOOPS_R { LOOPS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & mut self ) -> PT_W { PT_W { w : self } } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & mut self ) -> ILT_W { ILT_W { w : self } } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & mut self ) -> WAKE_W { WAKE_W { w : self } } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & mut self ) -> M_W { M_W { w : self } } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & mut self ) -> RSRC_W { RSRC_W { w : self } } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & mut self ) -> UARTSWAI_W { UARTSWAI_W { w : self } } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & mut self ) -> LOOPS_W { LOOPS_W { w : self } } } } # [ doc = "UART Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "UART Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Send Break\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBK_A { # [ doc = "0: Normal transmitter operation." ] _0 , # [ doc = "1: Queue break characters to be sent." ] _1 } impl From < SBK_A > for bool { # [ inline ( always ) ] fn from ( variant : SBK_A ) -> Self { match variant { SBK_A :: _0 => false , SBK_A :: _1 => true } } } # [ doc = "Reader of field `SBK`" ] pub type SBK_R = crate :: R < bool , SBK_A > ; impl SBK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBK_A { match self . bits { false => SBK_A :: _0 , true => SBK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBK_A :: _1 } } # [ doc = "Write proxy for field `SBK`" ] pub struct SBK_W < 'a > { w : & 'a mut W , } impl < 'a > SBK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal transmitter operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _0 ) } # [ doc = "Queue break characters to be sent." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Receiver Wakeup Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWU_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] _1 } impl From < RWU_A > for bool { # [ inline ( always ) ] fn from ( variant : RWU_A ) -> Self { match variant { RWU_A :: _0 => false , RWU_A :: _1 => true } } } # [ doc = "Reader of field `RWU`" ] pub type RWU_R = crate :: R < bool , RWU_A > ; impl RWU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWU_A { match self . bits { false => RWU_A :: _0 , true => RWU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWU_A :: _1 } } # [ doc = "Write proxy for field `RWU`" ] pub struct RWU_W < 'a > { w : & 'a mut W , } impl < 'a > RWU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _0 ) } # [ doc = "RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RE_A { # [ doc = "0: Receiver off." ] _0 , # [ doc = "1: Receiver on." ] _1 } impl From < RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RE_A ) -> Self { match variant { RE_A :: _0 => false , RE_A :: _1 => true } } } # [ doc = "Reader of field `RE`" ] pub type RE_R = crate :: R < bool , RE_A > ; impl RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RE_A { match self . bits { false => RE_A :: _0 , true => RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RE_A :: _1 } } # [ doc = "Write proxy for field `RE`" ] pub struct RE_W < 'a > { w : & 'a mut W , } impl < 'a > RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RE_A :: _0 ) } # [ doc = "Receiver on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmitter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TE_A { # [ doc = "0: Transmitter off." ] _0 , # [ doc = "1: Transmitter on." ] _1 } impl From < TE_A > for bool { # [ inline ( always ) ] fn from ( variant : TE_A ) -> Self { match variant { TE_A :: _0 => false , TE_A :: _1 => true } } } # [ doc = "Reader of field `TE`" ] pub type TE_R = crate :: R < bool , TE_A > ; impl TE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TE_A { match self . bits { false => TE_A :: _0 , true => TE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TE_A :: _1 } } # [ doc = "Write proxy for field `TE`" ] pub struct TE_W < 'a > { w : & 'a mut W , } impl < 'a > TE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TE_A :: _0 ) } # [ doc = "Transmitter on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Idle Line Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILIE_A { # [ doc = "0: IDLE interrupt requests disabled." ] _0 , # [ doc = "1: IDLE interrupt requests enabled." ] _1 } impl From < ILIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ILIE_A ) -> Self { match variant { ILIE_A :: _0 => false , ILIE_A :: _1 => true } } } # [ doc = "Reader of field `ILIE`" ] pub type ILIE_R = crate :: R < bool , ILIE_A > ; impl ILIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILIE_A { match self . bits { false => ILIE_A :: _0 , true => ILIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILIE_A :: _1 } } # [ doc = "Write proxy for field `ILIE`" ] pub struct ILIE_W < 'a > { w : & 'a mut W , } impl < 'a > ILIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IDLE interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _0 ) } # [ doc = "IDLE interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Full Interrupt or DMA Transfer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RIE_A { # [ doc = "0: RDRF interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: RDRF interrupt or DMA transfer requests enabled." ] _1 } impl From < RIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RIE_A ) -> Self { match variant { RIE_A :: _0 => false , RIE_A :: _1 => true } } } # [ doc = "Reader of field `RIE`" ] pub type RIE_R = crate :: R < bool , RIE_A > ; impl RIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RIE_A { match self . bits { false => RIE_A :: _0 , true => RIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RIE_A :: _1 } } # [ doc = "Write proxy for field `RIE`" ] pub struct RIE_W < 'a > { w : & 'a mut W , } impl < 'a > RIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RDRF interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _0 ) } # [ doc = "RDRF interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmission Complete Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCIE_A { # [ doc = "0: TC interrupt requests disabled." ] _0 , # [ doc = "1: TC interrupt requests enabled." ] _1 } impl From < TCIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCIE_A ) -> Self { match variant { TCIE_A :: _0 => false , TCIE_A :: _1 => true } } } # [ doc = "Reader of field `TCIE`" ] pub type TCIE_R = crate :: R < bool , TCIE_A > ; impl TCIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCIE_A { match self . bits { false => TCIE_A :: _0 , true => TCIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCIE_A :: _1 } } # [ doc = "Write proxy for field `TCIE`" ] pub struct TCIE_W < 'a > { w : & 'a mut W , } impl < 'a > TCIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TC interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _0 ) } # [ doc = "TC interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmitter Interrupt or DMA Transfer Enable.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: TDRE interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: TDRE interrupt or DMA transfer requests enabled." ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TDRE interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "TDRE interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & self ) -> SBK_R { SBK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & self ) -> RWU_R { RWU_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & self ) -> RE_R { RE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & self ) -> TE_R { TE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & self ) -> ILIE_R { ILIE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & self ) -> RIE_R { RIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & self ) -> TCIE_R { TCIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & mut self ) -> SBK_W { SBK_W { w : self } } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & mut self ) -> RWU_W { RWU_W { w : self } } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & mut self ) -> RE_W { RE_W { w : self } } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & mut self ) -> TE_W { TE_W { w : self } } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & mut self ) -> ILIE_W { ILIE_W { w : self } } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & mut self ) -> RIE_W { RIE_W { w : self } } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & mut self ) -> TCIE_W { TCIE_W { w : self } } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } } } # [ doc = "UART Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s1](s1) module" ] pub type S1 = crate :: Reg < u8 , _S1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S1 ; # [ doc = "`read()` method returns [s1::R](s1::R) reader structure" ] impl crate :: Readable for S1 { } # [ doc = "UART Status Register 1" ] pub mod s1 { # [ doc = "Reader of register S1" ] pub type R = crate :: R < u8 , super :: S1 > ; # [ doc = "Parity Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PF_A { # [ doc = "0: No parity error detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1, then there may be data in the receive buffer what was received with a parity error." ] _0 , # [ doc = "1: At least one dataword was received with a parity error since the last time this flag was cleared." ] _1 } impl From < PF_A > for bool { # [ inline ( always ) ] fn from ( variant : PF_A ) -> Self { match variant { PF_A :: _0 => false , PF_A :: _1 => true } } } # [ doc = "Reader of field `PF`" ] pub type PF_R = crate :: R < bool , PF_A > ; impl PF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PF_A { match self . bits { false => PF_A :: _0 , true => PF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PF_A :: _1 } } # [ doc = "Framing Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FE_A { # [ doc = "0: No framing error detected." ] _0 , # [ doc = "1: Framing error." ] _1 } impl From < FE_A > for bool { # [ inline ( always ) ] fn from ( variant : FE_A ) -> Self { match variant { FE_A :: _0 => false , FE_A :: _1 => true } } } # [ doc = "Reader of field `FE`" ] pub type FE_R = crate :: R < bool , FE_A > ; impl FE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FE_A { match self . bits { false => FE_A :: _0 , true => FE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FE_A :: _1 } } # [ doc = "Noise Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NF_A { # [ doc = "0: No noise detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1 then there may be data in the receiver buffer that was received with noise." ] _0 , # [ doc = "1: At least one dataword was received with noise detected since the last time the flag was cleared." ] _1 } impl From < NF_A > for bool { # [ inline ( always ) ] fn from ( variant : NF_A ) -> Self { match variant { NF_A :: _0 => false , NF_A :: _1 => true } } } # [ doc = "Reader of field `NF`" ] pub type NF_R = crate :: R < bool , NF_A > ; impl NF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NF_A { match self . bits { false => NF_A :: _0 , true => NF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NF_A :: _1 } } # [ doc = "Receiver Overrun Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OR_A { # [ doc = "0: No overrun has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: Overrun has occurred or the overrun flag has not been cleared since the last overrun occurred." ] _1 } impl From < OR_A > for bool { # [ inline ( always ) ] fn from ( variant : OR_A ) -> Self { match variant { OR_A :: _0 => false , OR_A :: _1 => true } } } # [ doc = "Reader of field `OR`" ] pub type OR_R = crate :: R < bool , OR_A > ; impl OR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OR_A { match self . bits { false => OR_A :: _0 , true => OR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OR_A :: _1 } } # [ doc = "Idle Line Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLE_A { # [ doc = "0: Receiver input is either active now or has never become active since the IDLE flag was last cleared." ] _0 , # [ doc = "1: Receiver input has become idle or the flag has not been cleared since it last asserted." ] _1 } impl From < IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLE_A ) -> Self { match variant { IDLE_A :: _0 => false , IDLE_A :: _1 => true } } } # [ doc = "Reader of field `IDLE`" ] pub type IDLE_R = crate :: R < bool , IDLE_A > ; impl IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLE_A { match self . bits { false => IDLE_A :: _0 , true => IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLE_A :: _1 } } # [ doc = "Receive Data Register Full Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDRF_A { # [ doc = "0: The number of datawords in the receive buffer is less than the number indicated by RXWATER." ] _0 , # [ doc = "1: The number of datawords in the receive buffer is equal to or greater than the number indicated by RXWATER at some point in time since this flag was last cleared." ] _1 } impl From < RDRF_A > for bool { # [ inline ( always ) ] fn from ( variant : RDRF_A ) -> Self { match variant { RDRF_A :: _0 => false , RDRF_A :: _1 => true } } } # [ doc = "Reader of field `RDRF`" ] pub type RDRF_R = crate :: R < bool , RDRF_A > ; impl RDRF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDRF_A { match self . bits { false => RDRF_A :: _0 , true => RDRF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDRF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDRF_A :: _1 } } # [ doc = "Transmit Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TC_A { # [ doc = "0: Transmitter active (sending data, a preamble, or a break)." ] _0 , # [ doc = "1: Transmitter idle (transmission activity complete)." ] _1 } impl From < TC_A > for bool { # [ inline ( always ) ] fn from ( variant : TC_A ) -> Self { match variant { TC_A :: _0 => false , TC_A :: _1 => true } } } # [ doc = "Reader of field `TC`" ] pub type TC_R = crate :: R < bool , TC_A > ; impl TC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TC_A { match self . bits { false => TC_A :: _0 , true => TC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TC_A :: _1 } } # [ doc = "Transmit Data Register Empty Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDRE_A { # [ doc = "0: The amount of data in the transmit buffer is greater than the value indicated by TWFIFO\\[TXWATER\\]." ] _0 , # [ doc = "1: The amount of data in the transmit buffer is less than or equal to the value indicated by TWFIFO\\[TXWATER\\] at some point in time since the flag has been cleared." ] _1 } impl From < TDRE_A > for bool { # [ inline ( always ) ] fn from ( variant : TDRE_A ) -> Self { match variant { TDRE_A :: _0 => false , TDRE_A :: _1 => true } } } # [ doc = "Reader of field `TDRE`" ] pub type TDRE_R = crate :: R < bool , TDRE_A > ; impl TDRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDRE_A { match self . bits { false => TDRE_A :: _0 , true => TDRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDRE_A :: _1 } } impl R { # [ doc = "Bit 0 - Parity Error Flag" ] # [ inline ( always ) ] pub fn pf ( & self ) -> PF_R { PF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Flag" ] # [ inline ( always ) ] pub fn fe ( & self ) -> FE_R { FE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Flag" ] # [ inline ( always ) ] pub fn nf ( & self ) -> NF_R { NF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Overrun Flag" ] # [ inline ( always ) ] pub fn or ( & self ) -> OR_R { OR_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Flag" ] # [ inline ( always ) ] pub fn idle ( & self ) -> IDLE_R { IDLE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receive Data Register Full Flag" ] # [ inline ( always ) ] pub fn rdrf ( & self ) -> RDRF_R { RDRF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Complete Flag" ] # [ inline ( always ) ] pub fn tc ( & self ) -> TC_R { TC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Data Register Empty Flag" ] # [ inline ( always ) ] pub fn tdre ( & self ) -> TDRE_R { TDRE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Status Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s2](s2) module" ] pub type S2 = crate :: Reg < u8 , _S2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S2 ; # [ doc = "`read()` method returns [s2::R](s2::R) reader structure" ] impl crate :: Readable for S2 { } # [ doc = "`write(|w| ..)` method takes [s2::W](s2::W) writer structure" ] impl crate :: Writable for S2 { } # [ doc = "UART Status Register 2" ] pub mod s2 { # [ doc = "Reader of register S2" ] pub type R = crate :: R < u8 , super :: S2 > ; # [ doc = "Writer for register S2" ] pub type W = crate :: W < u8 , super :: S2 > ; # [ doc = "Register S2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: S2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Active Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAF_A { # [ doc = "0: UART receiver idle/inactive waiting for a start bit." ] _0 , # [ doc = "1: UART receiver active, RxD input not idle." ] _1 } impl From < RAF_A > for bool { # [ inline ( always ) ] fn from ( variant : RAF_A ) -> Self { match variant { RAF_A :: _0 => false , RAF_A :: _1 => true } } } # [ doc = "Reader of field `RAF`" ] pub type RAF_R = crate :: R < bool , RAF_A > ; impl RAF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAF_A { match self . bits { false => RAF_A :: _0 , true => RAF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAF_A :: _1 } } # [ doc = "LIN Break Detection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDE_A { # [ doc = "0: Break character detection is disabled." ] _0 , # [ doc = "1: Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] _1 } impl From < LBKDE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDE_A ) -> Self { match variant { LBKDE_A :: _0 => false , LBKDE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDE`" ] pub type LBKDE_R = crate :: R < bool , LBKDE_A > ; impl LBKDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDE_A { match self . bits { false => LBKDE_A :: _0 , true => LBKDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDE_A :: _1 } } # [ doc = "Write proxy for field `LBKDE`" ] pub struct LBKDE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character detection is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _0 ) } # [ doc = "Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Break Transmit Character Length\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRK13_A { # [ doc = "0: Break character is 10, 11, or 12 bits long." ] _0 , # [ doc = "1: Break character is 13 or 14 bits long." ] _1 } impl From < BRK13_A > for bool { # [ inline ( always ) ] fn from ( variant : BRK13_A ) -> Self { match variant { BRK13_A :: _0 => false , BRK13_A :: _1 => true } } } # [ doc = "Reader of field `BRK13`" ] pub type BRK13_R = crate :: R < bool , BRK13_A > ; impl BRK13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRK13_A { match self . bits { false => BRK13_A :: _0 , true => BRK13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRK13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRK13_A :: _1 } } # [ doc = "Write proxy for field `BRK13`" ] pub struct BRK13_W < 'a > { w : & 'a mut W , } impl < 'a > BRK13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRK13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character is 10, 11, or 12 bits long." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _0 ) } # [ doc = "Break character is 13 or 14 bits long." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Wakeup Idle Detect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWUID_A { # [ doc = "0: S1\\[IDLE\\] is not set upon detection of an idle character." ] _0 , # [ doc = "1: S1\\[IDLE\\] is set upon detection of an idle character." ] _1 } impl From < RWUID_A > for bool { # [ inline ( always ) ] fn from ( variant : RWUID_A ) -> Self { match variant { RWUID_A :: _0 => false , RWUID_A :: _1 => true } } } # [ doc = "Reader of field `RWUID`" ] pub type RWUID_R = crate :: R < bool , RWUID_A > ; impl RWUID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWUID_A { match self . bits { false => RWUID_A :: _0 , true => RWUID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWUID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWUID_A :: _1 } } # [ doc = "Write proxy for field `RWUID`" ] pub struct RWUID_W < 'a > { w : & 'a mut W , } impl < 'a > RWUID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWUID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "S1\\[IDLE\\] is not set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _0 ) } # [ doc = "S1\\[IDLE\\] is set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Receive Data Inversion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXINV_A { # [ doc = "0: Receive data is not inverted." ] _0 , # [ doc = "1: Receive data is inverted." ] _1 } impl From < RXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXINV_A ) -> Self { match variant { RXINV_A :: _0 => false , RXINV_A :: _1 => true } } } # [ doc = "Reader of field `RXINV`" ] pub type RXINV_R = crate :: R < bool , RXINV_A > ; impl RXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXINV_A { match self . bits { false => RXINV_A :: _0 , true => RXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXINV_A :: _1 } } # [ doc = "Write proxy for field `RXINV`" ] pub struct RXINV_W < 'a > { w : & 'a mut W , } impl < 'a > RXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _0 ) } # [ doc = "Receive data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Most Significant Bit First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSBF_A { # [ doc = "0: LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] _0 , # [ doc = "1: MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] _1 } impl From < MSBF_A > for bool { # [ inline ( always ) ] fn from ( variant : MSBF_A ) -> Self { match variant { MSBF_A :: _0 => false , MSBF_A :: _1 => true } } } # [ doc = "Reader of field `MSBF`" ] pub type MSBF_R = crate :: R < bool , MSBF_A > ; impl MSBF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSBF_A { match self . bits { false => MSBF_A :: _0 , true => MSBF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSBF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSBF_A :: _1 } } # [ doc = "Write proxy for field `MSBF`" ] pub struct MSBF_W < 'a > { w : & 'a mut W , } impl < 'a > MSBF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSBF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _0 ) } # [ doc = "MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Pin Active Edge Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIF_A { # [ doc = "0: No active edge on the receive pin has occurred." ] _0 , # [ doc = "1: An active edge on the receive pin has occurred." ] _1 } impl From < RXEDGIF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIF_A ) -> Self { match variant { RXEDGIF_A :: _0 => false , RXEDGIF_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIF`" ] pub type RXEDGIF_R = crate :: R < bool , RXEDGIF_A > ; impl RXEDGIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIF_A { match self . bits { false => RXEDGIF_A :: _0 , true => RXEDGIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIF_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIF`" ] pub struct RXEDGIF_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _0 ) } # [ doc = "An active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIF_A { # [ doc = "0: No LIN break character detected." ] _0 , # [ doc = "1: LIN break character detected." ] _1 } impl From < LBKDIF_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIF_A ) -> Self { match variant { LBKDIF_A :: _0 => false , LBKDIF_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIF`" ] pub type LBKDIF_R = crate :: R < bool , LBKDIF_A > ; impl LBKDIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIF_A { match self . bits { false => LBKDIF_A :: _0 , true => LBKDIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIF_A :: _1 } } # [ doc = "Write proxy for field `LBKDIF`" ] pub struct LBKDIF_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No LIN break character detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _0 ) } # [ doc = "LIN break character detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receiver Active Flag" ] # [ inline ( always ) ] pub fn raf ( & self ) -> RAF_R { RAF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & self ) -> LBKDE_R { LBKDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & self ) -> BRK13_R { BRK13_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & self ) -> RWUID_R { RWUID_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & self ) -> RXINV_R { RXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & self ) -> MSBF_R { MSBF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & self ) -> RXEDGIF_R { RXEDGIF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & self ) -> LBKDIF_R { LBKDIF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & mut self ) -> LBKDE_W { LBKDE_W { w : self } } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & mut self ) -> BRK13_W { BRK13_W { w : self } } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & mut self ) -> RWUID_W { RWUID_W { w : self } } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & mut self ) -> RXINV_W { RXINV_W { w : self } } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & mut self ) -> MSBF_W { MSBF_W { w : self } } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & mut self ) -> RXEDGIF_W { RXEDGIF_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & mut self ) -> LBKDIF_W { LBKDIF_W { w : self } } } } # [ doc = "UART Control Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c3](c3) module" ] pub type C3 = crate :: Reg < u8 , _C3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C3 ; # [ doc = "`read()` method returns [c3::R](c3::R) reader structure" ] impl crate :: Readable for C3 { } # [ doc = "`write(|w| ..)` method takes [c3::W](c3::W) writer structure" ] impl crate :: Writable for C3 { } # [ doc = "UART Control Register 3" ] pub mod c3 { # [ doc = "Reader of register C3" ] pub type R = crate :: R < u8 , super :: C3 > ; # [ doc = "Writer for register C3" ] pub type W = crate :: W < u8 , super :: C3 > ; # [ doc = "Register C3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEIE_A { # [ doc = "0: PF interrupt requests are disabled." ] _0 , # [ doc = "1: PF interrupt requests are enabled." ] _1 } impl From < PEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : PEIE_A ) -> Self { match variant { PEIE_A :: _0 => false , PEIE_A :: _1 => true } } } # [ doc = "Reader of field `PEIE`" ] pub type PEIE_R = crate :: R < bool , PEIE_A > ; impl PEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEIE_A { match self . bits { false => PEIE_A :: _0 , true => PEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEIE_A :: _1 } } # [ doc = "Write proxy for field `PEIE`" ] pub struct PEIE_W < 'a > { w : & 'a mut W , } impl < 'a > PEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _0 ) } # [ doc = "PF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Framing Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEIE_A { # [ doc = "0: FE interrupt requests are disabled." ] _0 , # [ doc = "1: FE interrupt requests are enabled." ] _1 } impl From < FEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FEIE_A ) -> Self { match variant { FEIE_A :: _0 => false , FEIE_A :: _1 => true } } } # [ doc = "Reader of field `FEIE`" ] pub type FEIE_R = crate :: R < bool , FEIE_A > ; impl FEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEIE_A { match self . bits { false => FEIE_A :: _0 , true => FEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEIE_A :: _1 } } # [ doc = "Write proxy for field `FEIE`" ] pub struct FEIE_W < 'a > { w : & 'a mut W , } impl < 'a > FEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FE interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _0 ) } # [ doc = "FE interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Noise Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NEIE_A { # [ doc = "0: NF interrupt requests are disabled." ] _0 , # [ doc = "1: NF interrupt requests are enabled." ] _1 } impl From < NEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : NEIE_A ) -> Self { match variant { NEIE_A :: _0 => false , NEIE_A :: _1 => true } } } # [ doc = "Reader of field `NEIE`" ] pub type NEIE_R = crate :: R < bool , NEIE_A > ; impl NEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NEIE_A { match self . bits { false => NEIE_A :: _0 , true => NEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NEIE_A :: _1 } } # [ doc = "Write proxy for field `NEIE`" ] pub struct NEIE_W < 'a > { w : & 'a mut W , } impl < 'a > NEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "NF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _0 ) } # [ doc = "NF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Overrun Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORIE_A { # [ doc = "0: OR interrupts are disabled." ] _0 , # [ doc = "1: OR interrupt requests are enabled." ] _1 } impl From < ORIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ORIE_A ) -> Self { match variant { ORIE_A :: _0 => false , ORIE_A :: _1 => true } } } # [ doc = "Reader of field `ORIE`" ] pub type ORIE_R = crate :: R < bool , ORIE_A > ; impl ORIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ORIE_A { match self . bits { false => ORIE_A :: _0 , true => ORIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ORIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ORIE_A :: _1 } } # [ doc = "Write proxy for field `ORIE`" ] pub struct ORIE_W < 'a > { w : & 'a mut W , } impl < 'a > ORIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ORIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OR interrupts are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _0 ) } # [ doc = "OR interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Data Inversion.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXINV_A { # [ doc = "0: Transmit data is not inverted." ] _0 , # [ doc = "1: Transmit data is inverted." ] _1 } impl From < TXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : TXINV_A ) -> Self { match variant { TXINV_A :: _0 => false , TXINV_A :: _1 => true } } } # [ doc = "Reader of field `TXINV`" ] pub type TXINV_R = crate :: R < bool , TXINV_A > ; impl TXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXINV_A { match self . bits { false => TXINV_A :: _0 , true => TXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXINV_A :: _1 } } # [ doc = "Write proxy for field `TXINV`" ] pub struct TXINV_W < 'a > { w : & 'a mut W , } impl < 'a > TXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _0 ) } # [ doc = "Transmit data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Transmitter Pin Data Direction in Single-Wire mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDIR_A { # [ doc = "0: TXD pin is an input in single wire mode." ] _0 , # [ doc = "1: TXD pin is an output in single wire mode." ] _1 } impl From < TXDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TXDIR_A ) -> Self { match variant { TXDIR_A :: _0 => false , TXDIR_A :: _1 => true } } } # [ doc = "Reader of field `TXDIR`" ] pub type TXDIR_R = crate :: R < bool , TXDIR_A > ; impl TXDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXDIR_A { match self . bits { false => TXDIR_A :: _0 , true => TXDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXDIR_A :: _1 } } # [ doc = "Write proxy for field `TXDIR`" ] pub struct TXDIR_W < 'a > { w : & 'a mut W , } impl < 'a > TXDIR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXDIR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXD pin is an input in single wire mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _0 ) } # [ doc = "TXD pin is an output in single wire mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `T8`" ] pub type T8_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `T8`" ] pub struct T8_W < 'a > { w : & 'a mut W , } impl < 'a > T8_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `R8`" ] pub type R8_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & self ) -> PEIE_R { PEIE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & self ) -> FEIE_R { FEIE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & self ) -> NEIE_R { NEIE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & self ) -> ORIE_R { ORIE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & self ) -> TXINV_R { TXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & self ) -> TXDIR_R { TXDIR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & self ) -> T8_R { T8_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Received Bit 8" ] # [ inline ( always ) ] pub fn r8 ( & self ) -> R8_R { R8_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & mut self ) -> PEIE_W { PEIE_W { w : self } } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & mut self ) -> FEIE_W { FEIE_W { w : self } } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & mut self ) -> NEIE_W { NEIE_W { w : self } } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & mut self ) -> ORIE_W { ORIE_W { w : self } } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & mut self ) -> TXINV_W { TXINV_W { w : self } } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & mut self ) -> TXDIR_W { TXDIR_W { w : self } } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & mut self ) -> T8_W { T8_W { w : self } } } } # [ doc = "UART Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "UART Data Register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RT`" ] pub type RT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RT`" ] pub struct RT_W < 'a > { w : & 'a mut W , } impl < 'a > RT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & self ) -> RT_R { RT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & mut self ) -> RT_W { RT_W { w : self } } } } # [ doc = "UART Match Address Registers 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma1](ma1) module" ] pub type MA1 = crate :: Reg < u8 , _MA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA1 ; # [ doc = "`read()` method returns [ma1::R](ma1::R) reader structure" ] impl crate :: Readable for MA1 { } # [ doc = "`write(|w| ..)` method takes [ma1::W](ma1::W) writer structure" ] impl crate :: Writable for MA1 { } # [ doc = "UART Match Address Registers 1" ] pub mod ma1 { # [ doc = "Reader of register MA1" ] pub type R = crate :: R < u8 , super :: MA1 > ; # [ doc = "Writer for register MA1" ] pub type W = crate :: W < u8 , super :: MA1 > ; # [ doc = "Register MA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Match Address Registers 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma2](ma2) module" ] pub type MA2 = crate :: Reg < u8 , _MA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA2 ; # [ doc = "`read()` method returns [ma2::R](ma2::R) reader structure" ] impl crate :: Readable for MA2 { } # [ doc = "`write(|w| ..)` method takes [ma2::W](ma2::W) writer structure" ] impl crate :: Writable for MA2 { } # [ doc = "UART Match Address Registers 2" ] pub mod ma2 { # [ doc = "Reader of register MA2" ] pub type R = crate :: R < u8 , super :: MA2 > ; # [ doc = "Writer for register MA2" ] pub type W = crate :: W < u8 , super :: MA2 > ; # [ doc = "Register MA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Control Register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c4](c4) module" ] pub type C4 = crate :: Reg < u8 , _C4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C4 ; # [ doc = "`read()` method returns [c4::R](c4::R) reader structure" ] impl crate :: Readable for C4 { } # [ doc = "`write(|w| ..)` method takes [c4::W](c4::W) writer structure" ] impl crate :: Writable for C4 { } # [ doc = "UART Control Register 4" ] pub mod c4 { # [ doc = "Reader of register C4" ] pub type R = crate :: R < u8 , super :: C4 > ; # [ doc = "Writer for register C4" ] pub type W = crate :: W < u8 , super :: C4 > ; # [ doc = "Register C4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BRFA`" ] pub type BRFA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BRFA`" ] pub struct BRFA_W < 'a > { w : & 'a mut W , } impl < 'a > BRFA_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "10-bit Mode select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M10_A { # [ doc = "0: The parity bit is the ninth bit in the serial transmission." ] _0 , # [ doc = "1: The parity bit is the tenth bit in the serial transmission." ] _1 } impl From < M10_A > for bool { # [ inline ( always ) ] fn from ( variant : M10_A ) -> Self { match variant { M10_A :: _0 => false , M10_A :: _1 => true } } } # [ doc = "Reader of field `M10`" ] pub type M10_R = crate :: R < bool , M10_A > ; impl M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M10_A { match self . bits { false => M10_A :: _0 , true => M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M10_A :: _1 } } # [ doc = "Write proxy for field `M10`" ] pub struct M10_W < 'a > { w : & 'a mut W , } impl < 'a > M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The parity bit is the ninth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M10_A :: _0 ) } # [ doc = "The parity bit is the tenth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M10_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Match Address Mode Enable 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN2_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN1 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN2_A ) -> Self { match variant { MAEN2_A :: _0 => false , MAEN2_A :: _1 => true } } } # [ doc = "Reader of field `MAEN2`" ] pub type MAEN2_R = crate :: R < bool , MAEN2_A > ; impl MAEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN2_A { match self . bits { false => MAEN2_A :: _0 , true => MAEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN2_A :: _1 } } # [ doc = "Write proxy for field `MAEN2`" ] pub struct MAEN2_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN1 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Match Address Mode Enable 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN1_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN2 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN1_A ) -> Self { match variant { MAEN1_A :: _0 => false , MAEN1_A :: _1 => true } } } # [ doc = "Reader of field `MAEN1`" ] pub type MAEN1_R = crate :: R < bool , MAEN1_A > ; impl MAEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN1_A { match self . bits { false => MAEN1_A :: _0 , true => MAEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN1_A :: _1 } } # [ doc = "Write proxy for field `MAEN1`" ] pub struct MAEN1_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN2 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & self ) -> BRFA_R { BRFA_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & self ) -> M10_R { M10_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & self ) -> MAEN2_R { MAEN2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & self ) -> MAEN1_R { MAEN1_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & mut self ) -> BRFA_W { BRFA_W { w : self } } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & mut self ) -> M10_W { M10_W { w : self } } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & mut self ) -> MAEN2_W { MAEN2_W { w : self } } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & mut self ) -> MAEN1_W { MAEN1_W { w : self } } } } # [ doc = "UART Control Register 5\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c5](c5) module" ] pub type C5 = crate :: Reg < u8 , _C5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C5 ; # [ doc = "`read()` method returns [c5::R](c5::R) reader structure" ] impl crate :: Readable for C5 { } # [ doc = "`write(|w| ..)` method takes [c5::W](c5::W) writer structure" ] impl crate :: Writable for C5 { } # [ doc = "UART Control Register 5" ] pub mod c5 { # [ doc = "Reader of register C5" ] pub type R = crate :: R < u8 , super :: C5 > ; # [ doc = "Writer for register C5" ] pub type W = crate :: W < u8 , super :: C5 > ; # [ doc = "Register C5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C5 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Full DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDMAS_A { # [ doc = "0: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] _0 , # [ doc = "1: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < RDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : RDMAS_A ) -> Self { match variant { RDMAS_A :: _0 => false , RDMAS_A :: _1 => true } } } # [ doc = "Reader of field `RDMAS`" ] pub type RDMAS_R = crate :: R < bool , RDMAS_A > ; impl RDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDMAS_A { match self . bits { false => RDMAS_A :: _0 , true => RDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDMAS_A :: _1 } } # [ doc = "Write proxy for field `RDMAS`" ] pub struct RDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > RDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _0 ) } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmitter DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDMAS_A { # [ doc = "0: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] _0 , # [ doc = "1: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < TDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TDMAS_A ) -> Self { match variant { TDMAS_A :: _0 => false , TDMAS_A :: _1 => true } } } # [ doc = "Reader of field `TDMAS`" ] pub type TDMAS_R = crate :: R < bool , TDMAS_A > ; impl TDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDMAS_A { match self . bits { false => TDMAS_A :: _0 , true => TDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDMAS_A :: _1 } } # [ doc = "Write proxy for field `TDMAS`" ] pub struct TDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > TDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _0 ) } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & self ) -> RDMAS_R { RDMAS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & self ) -> TDMAS_R { TDMAS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & mut self ) -> RDMAS_W { RDMAS_W { w : self } } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & mut self ) -> TDMAS_W { TDMAS_W { w : self } } } } # [ doc = "UART Extended Data Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ed](ed) module" ] pub type ED = crate :: Reg < u8 , _ED > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ED ; # [ doc = "`read()` method returns [ed::R](ed::R) reader structure" ] impl crate :: Readable for ED { } # [ doc = "UART Extended Data Register" ] pub mod ed { # [ doc = "Reader of register ED" ] pub type R = crate :: R < u8 , super :: ED > ; # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with a parity error.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYE_A { # [ doc = "0: The dataword was received without a parity error." ] _0 , # [ doc = "1: The dataword was received with a parity error." ] _1 } impl From < PARITYE_A > for bool { # [ inline ( always ) ] fn from ( variant : PARITYE_A ) -> Self { match variant { PARITYE_A :: _0 => false , PARITYE_A :: _1 => true } } } # [ doc = "Reader of field `PARITYE`" ] pub type PARITYE_R = crate :: R < bool , PARITYE_A > ; impl PARITYE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PARITYE_A { match self . bits { false => PARITYE_A :: _0 , true => PARITYE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PARITYE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PARITYE_A :: _1 } } # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with noise.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOISY_A { # [ doc = "0: The dataword was received without noise." ] _0 , # [ doc = "1: The data was received with noise." ] _1 } impl From < NOISY_A > for bool { # [ inline ( always ) ] fn from ( variant : NOISY_A ) -> Self { match variant { NOISY_A :: _0 => false , NOISY_A :: _1 => true } } } # [ doc = "Reader of field `NOISY`" ] pub type NOISY_R = crate :: R < bool , NOISY_A > ; impl NOISY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOISY_A { match self . bits { false => NOISY_A :: _0 , true => NOISY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOISY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOISY_A :: _1 } } impl R { # [ doc = "Bit 6 - The current received dataword contained in D and C3\\[R8\\] was received with a parity error." ] # [ inline ( always ) ] pub fn paritye ( & self ) -> PARITYE_R { PARITYE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - The current received dataword contained in D and C3\\[R8\\] was received with noise." ] # [ inline ( always ) ] pub fn noisy ( & self ) -> NOISY_R { NOISY_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Modem Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [modem](modem) module" ] pub type MODEM = crate :: Reg < u8 , _MODEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODEM ; # [ doc = "`read()` method returns [modem::R](modem::R) reader structure" ] impl crate :: Readable for MODEM { } # [ doc = "`write(|w| ..)` method takes [modem::W](modem::W) writer structure" ] impl crate :: Writable for MODEM { } # [ doc = "UART Modem Register" ] pub mod modem { # [ doc = "Reader of register MODEM" ] pub type R = crate :: R < u8 , super :: MODEM > ; # [ doc = "Writer for register MODEM" ] pub type W = crate :: W < u8 , super :: MODEM > ; # [ doc = "Register MODEM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MODEM { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter clear-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXCTSE_A { # [ doc = "0: CTS has no effect on the transmitter." ] _0 , # [ doc = "1: Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] _1 } impl From < TXCTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXCTSE_A ) -> Self { match variant { TXCTSE_A :: _0 => false , TXCTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXCTSE`" ] pub type TXCTSE_R = crate :: R < bool , TXCTSE_A > ; impl TXCTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXCTSE_A { match self . bits { false => TXCTSE_A :: _0 , true => TXCTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXCTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXCTSE_A :: _1 } } # [ doc = "Write proxy for field `TXCTSE`" ] pub struct TXCTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXCTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXCTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CTS has no effect on the transmitter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _0 ) } # [ doc = "Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSE_A { # [ doc = "0: The transmitter has no effect on RTS." ] _0 , # [ doc = "1: When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] _1 } impl From < TXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSE_A ) -> Self { match variant { TXRTSE_A :: _0 => false , TXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSE`" ] pub type TXRTSE_R = crate :: R < bool , TXRTSE_A > ; impl TXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSE_A { match self . bits { false => TXRTSE_A :: _0 , true => TXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSE_A :: _1 } } # [ doc = "Write proxy for field `TXRTSE`" ] pub struct TXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The transmitter has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _0 ) } # [ doc = "When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Transmitter request-to-send polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSPOL_A { # [ doc = "0: Transmitter RTS is active low." ] _0 , # [ doc = "1: Transmitter RTS is active high." ] _1 } impl From < TXRTSPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSPOL_A ) -> Self { match variant { TXRTSPOL_A :: _0 => false , TXRTSPOL_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSPOL`" ] pub type TXRTSPOL_R = crate :: R < bool , TXRTSPOL_A > ; impl TXRTSPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSPOL_A { match self . bits { false => TXRTSPOL_A :: _0 , true => TXRTSPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSPOL_A :: _1 } } # [ doc = "Write proxy for field `TXRTSPOL`" ] pub struct TXRTSPOL_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter RTS is active low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _0 ) } # [ doc = "Transmitter RTS is active high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXRTSE_A { # [ doc = "0: The receiver has no effect on RTS." ] _0 , # [ doc = "1: RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] _1 } impl From < RXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXRTSE_A ) -> Self { match variant { RXRTSE_A :: _0 => false , RXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `RXRTSE`" ] pub type RXRTSE_R = crate :: R < bool , RXRTSE_A > ; impl RXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXRTSE_A { match self . bits { false => RXRTSE_A :: _0 , true => RXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXRTSE_A :: _1 } } # [ doc = "Write proxy for field `RXRTSE`" ] pub struct RXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > RXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The receiver has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _0 ) } # [ doc = "RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & self ) -> TXCTSE_R { TXCTSE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & self ) -> TXRTSE_R { TXRTSE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & self ) -> TXRTSPOL_R { TXRTSPOL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & self ) -> RXRTSE_R { RXRTSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & mut self ) -> TXCTSE_W { TXCTSE_W { w : self } } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & mut self ) -> TXRTSE_W { TXRTSE_W { w : self } } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & mut self ) -> TXRTSPOL_W { TXRTSPOL_W { w : self } } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & mut self ) -> RXRTSE_W { RXRTSE_W { w : self } } } } # [ doc = "UART Infrared Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ir](ir) module" ] pub type IR = crate :: Reg < u8 , _IR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IR ; # [ doc = "`read()` method returns [ir::R](ir::R) reader structure" ] impl crate :: Readable for IR { } # [ doc = "`write(|w| ..)` method takes [ir::W](ir::W) writer structure" ] impl crate :: Writable for IR { } # [ doc = "UART Infrared Register" ] pub mod ir { # [ doc = "Reader of register IR" ] pub type R = crate :: R < u8 , super :: IR > ; # [ doc = "Writer for register IR" ] pub type W = crate :: W < u8 , super :: IR > ; # [ doc = "Register IR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter narrow pulse\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TNP_A { # [ doc = "0: 3/16." ] _00 , # [ doc = "1: 1/16." ] _01 , # [ doc = "2: 1/32." ] _10 , # [ doc = "3: 1/4." ] _11 } impl From < TNP_A > for u8 { # [ inline ( always ) ] fn from ( variant : TNP_A ) -> Self { match variant { TNP_A :: _00 => 0 , TNP_A :: _01 => 1 , TNP_A :: _10 => 2 , TNP_A :: _11 => 3 } } } # [ doc = "Reader of field `TNP`" ] pub type TNP_R = crate :: R < u8 , TNP_A > ; impl TNP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TNP_A { match self . bits { 0 => TNP_A :: _00 , 1 => TNP_A :: _01 , 2 => TNP_A :: _10 , 3 => TNP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TNP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TNP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TNP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TNP_A :: _11 } } # [ doc = "Write proxy for field `TNP`" ] pub struct TNP_W < 'a > { w : & 'a mut W , } impl < 'a > TNP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TNP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "3/16." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _00 ) } # [ doc = "1/16." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _01 ) } # [ doc = "1/32." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _10 ) } # [ doc = "1/4." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Infrared enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREN_A { # [ doc = "0: IR disabled." ] _0 , # [ doc = "1: IR enabled." ] _1 } impl From < IREN_A > for bool { # [ inline ( always ) ] fn from ( variant : IREN_A ) -> Self { match variant { IREN_A :: _0 => false , IREN_A :: _1 => true } } } # [ doc = "Reader of field `IREN`" ] pub type IREN_R = crate :: R < bool , IREN_A > ; impl IREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREN_A { match self . bits { false => IREN_A :: _0 , true => IREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREN_A :: _1 } } # [ doc = "Write proxy for field `IREN`" ] pub struct IREN_W < 'a > { w : & 'a mut W , } impl < 'a > IREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IR disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _0 ) } # [ doc = "IR enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & self ) -> TNP_R { TNP_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & self ) -> IREN_R { IREN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & mut self ) -> TNP_W { TNP_W { w : self } } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & mut self ) -> IREN_W { IREN_W { w : self } } } } # [ doc = "UART FIFO Parameters\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pfifo](pfifo) module" ] pub type PFIFO = crate :: Reg < u8 , _PFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PFIFO ; # [ doc = "`read()` method returns [pfifo::R](pfifo::R) reader structure" ] impl crate :: Readable for PFIFO { } # [ doc = "`write(|w| ..)` method takes [pfifo::W](pfifo::W) writer structure" ] impl crate :: Writable for PFIFO { } # [ doc = "UART FIFO Parameters" ] pub mod pfifo { # [ doc = "Reader of register PFIFO" ] pub type R = crate :: R < u8 , super :: PFIFO > ; # [ doc = "Writer for register PFIFO" ] pub type W = crate :: W < u8 , super :: PFIFO > ; # [ doc = "Register PFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFIFOSIZE_A { # [ doc = "0: Receive FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Receive FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Receive FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Receive FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Receive FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Receive FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Receive FIFO/Buffer depth = 128 datawords." ] _110 } impl From < RXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : RXFIFOSIZE_A ) -> Self { match variant { RXFIFOSIZE_A :: _000 => 0 , RXFIFOSIZE_A :: _001 => 1 , RXFIFOSIZE_A :: _010 => 2 , RXFIFOSIZE_A :: _011 => 3 , RXFIFOSIZE_A :: _100 => 4 , RXFIFOSIZE_A :: _101 => 5 , RXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `RXFIFOSIZE`" ] pub type RXFIFOSIZE_R = crate :: R < u8 , RXFIFOSIZE_A > ; impl RXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RXFIFOSIZE_A :: _000 ) , 1 => Val ( RXFIFOSIZE_A :: _001 ) , 2 => Val ( RXFIFOSIZE_A :: _010 ) , 3 => Val ( RXFIFOSIZE_A :: _011 ) , 4 => Val ( RXFIFOSIZE_A :: _100 ) , 5 => Val ( RXFIFOSIZE_A :: _101 ) , 6 => Val ( RXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _110 } } # [ doc = "Receive FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFE_A { # [ doc = "0: Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] _0 , # [ doc = "1: Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] _1 } impl From < RXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXFE_A ) -> Self { match variant { RXFE_A :: _0 => false , RXFE_A :: _1 => true } } } # [ doc = "Reader of field `RXFE`" ] pub type RXFE_R = crate :: R < bool , RXFE_A > ; impl RXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXFE_A { match self . bits { false => RXFE_A :: _0 , true => RXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXFE_A :: _1 } } # [ doc = "Write proxy for field `RXFE`" ] pub struct RXFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _0 ) } # [ doc = "Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFIFOSIZE_A { # [ doc = "0: Transmit FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Transmit FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Transmit FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Transmit FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Transmit FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Transmit FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Transmit FIFO/Buffer depth = 128 datawords." ] _110 } impl From < TXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXFIFOSIZE_A ) -> Self { match variant { TXFIFOSIZE_A :: _000 => 0 , TXFIFOSIZE_A :: _001 => 1 , TXFIFOSIZE_A :: _010 => 2 , TXFIFOSIZE_A :: _011 => 3 , TXFIFOSIZE_A :: _100 => 4 , TXFIFOSIZE_A :: _101 => 5 , TXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `TXFIFOSIZE`" ] pub type TXFIFOSIZE_R = crate :: R < u8 , TXFIFOSIZE_A > ; impl TXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TXFIFOSIZE_A :: _000 ) , 1 => Val ( TXFIFOSIZE_A :: _001 ) , 2 => Val ( TXFIFOSIZE_A :: _010 ) , 3 => Val ( TXFIFOSIZE_A :: _011 ) , 4 => Val ( TXFIFOSIZE_A :: _100 ) , 5 => Val ( TXFIFOSIZE_A :: _101 ) , 6 => Val ( TXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _110 } } # [ doc = "Transmit FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFE_A { # [ doc = "0: Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] _0 , # [ doc = "1: Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] _1 } impl From < TXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXFE_A ) -> Self { match variant { TXFE_A :: _0 => false , TXFE_A :: _1 => true } } } # [ doc = "Reader of field `TXFE`" ] pub type TXFE_R = crate :: R < bool , TXFE_A > ; impl TXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXFE_A { match self . bits { false => TXFE_A :: _0 , true => TXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXFE_A :: _1 } } # [ doc = "Write proxy for field `TXFE`" ] pub struct TXFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _0 ) } # [ doc = "Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Receive FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn rxfifosize ( & self ) -> RXFIFOSIZE_R { RXFIFOSIZE_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & self ) -> RXFE_R { RXFE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:6 - Transmit FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn txfifosize ( & self ) -> TXFIFOSIZE_R { TXFIFOSIZE_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & self ) -> TXFE_R { TXFE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & mut self ) -> RXFE_W { RXFE_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & mut self ) -> TXFE_W { TXFE_W { w : self } } } } # [ doc = "UART FIFO Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfifo](cfifo) module" ] pub type CFIFO = crate :: Reg < u8 , _CFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFIFO ; # [ doc = "`read()` method returns [cfifo::R](cfifo::R) reader structure" ] impl crate :: Readable for CFIFO { } # [ doc = "`write(|w| ..)` method takes [cfifo::W](cfifo::W) writer structure" ] impl crate :: Writable for CFIFO { } # [ doc = "UART FIFO Control Register" ] pub mod cfifo { # [ doc = "Reader of register CFIFO" ] pub type R = crate :: R < u8 , super :: CFIFO > ; # [ doc = "Writer for register CFIFO" ] pub type W = crate :: W < u8 , super :: CFIFO > ; # [ doc = "Register CFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO Underflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUFE_A { # [ doc = "0: RXUF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXUF flag generates an interrupt to the host." ] _1 } impl From < RXUFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUFE_A ) -> Self { match variant { RXUFE_A :: _0 => false , RXUFE_A :: _1 => true } } } # [ doc = "Reader of field `RXUFE`" ] pub type RXUFE_R = crate :: R < bool , RXUFE_A > ; impl RXUFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUFE_A { match self . bits { false => RXUFE_A :: _0 , true => RXUFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUFE_A :: _1 } } # [ doc = "Write proxy for field `RXUFE`" ] pub struct RXUFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXUFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXUF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _0 ) } # [ doc = "RXUF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmit FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOFE_A { # [ doc = "0: TXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: TXOF flag generates an interrupt to the host." ] _1 } impl From < TXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOFE_A ) -> Self { match variant { TXOFE_A :: _0 => false , TXOFE_A :: _1 => true } } } # [ doc = "Reader of field `TXOFE`" ] pub type TXOFE_R = crate :: R < bool , TXOFE_A > ; impl TXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOFE_A { match self . bits { false => TXOFE_A :: _0 , true => TXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOFE_A :: _1 } } # [ doc = "Write proxy for field `TXOFE`" ] pub struct TXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _0 ) } # [ doc = "TXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receive FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOFE_A { # [ doc = "0: RXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXOF flag generates an interrupt to the host." ] _1 } impl From < RXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOFE_A ) -> Self { match variant { RXOFE_A :: _0 => false , RXOFE_A :: _1 => true } } } # [ doc = "Reader of field `RXOFE`" ] pub type RXOFE_R = crate :: R < bool , RXOFE_A > ; impl RXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOFE_A { match self . bits { false => RXOFE_A :: _0 , true => RXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOFE_A :: _1 } } # [ doc = "Write proxy for field `RXOFE`" ] pub struct RXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _0 ) } # [ doc = "RXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the receive FIFO/buffer is cleared out." ] _1 } impl From < RXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : RXFLUSH_AW ) -> Self { match variant { RXFLUSH_AW :: _0 => false , RXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `RXFLUSH`" ] pub struct RXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > RXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _0 ) } # [ doc = "All data in the receive FIFO/buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmit FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the transmit FIFO/Buffer is cleared out." ] _1 } impl From < TXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : TXFLUSH_AW ) -> Self { match variant { TXFLUSH_AW :: _0 => false , TXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `TXFLUSH`" ] pub struct TXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > TXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _0 ) } # [ doc = "All data in the transmit FIFO/Buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & self ) -> RXUFE_R { RXUFE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & self ) -> TXOFE_R { TXOFE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & self ) -> RXOFE_R { RXOFE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & mut self ) -> RXUFE_W { RXUFE_W { w : self } } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & mut self ) -> TXOFE_W { TXOFE_W { w : self } } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & mut self ) -> RXOFE_W { RXOFE_W { w : self } } # [ doc = "Bit 6 - Receive FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn rxflush ( & mut self ) -> RXFLUSH_W { RXFLUSH_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn txflush ( & mut self ) -> TXFLUSH_W { TXFLUSH_W { w : self } } } } # [ doc = "UART FIFO Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sfifo](sfifo) module" ] pub type SFIFO = crate :: Reg < u8 , _SFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SFIFO ; # [ doc = "`read()` method returns [sfifo::R](sfifo::R) reader structure" ] impl crate :: Readable for SFIFO { } # [ doc = "`write(|w| ..)` method takes [sfifo::W](sfifo::W) writer structure" ] impl crate :: Writable for SFIFO { } # [ doc = "UART FIFO Status Register" ] pub mod sfifo { # [ doc = "Reader of register SFIFO" ] pub type R = crate :: R < u8 , super :: SFIFO > ; # [ doc = "Writer for register SFIFO" ] pub type W = crate :: W < u8 , super :: SFIFO > ; # [ doc = "Register SFIFO `reset()`'s with value 0xc0" ] impl crate :: ResetValue for super :: SFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc0 } } # [ doc = "Receiver Buffer Underflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUF_A { # [ doc = "0: No receive buffer underflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer underflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXUF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUF_A ) -> Self { match variant { RXUF_A :: _0 => false , RXUF_A :: _1 => true } } } # [ doc = "Reader of field `RXUF`" ] pub type RXUF_R = crate :: R < bool , RXUF_A > ; impl RXUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUF_A { match self . bits { false => RXUF_A :: _0 , true => RXUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUF_A :: _1 } } # [ doc = "Write proxy for field `RXUF`" ] pub struct RXUF_W < 'a > { w : & 'a mut W , } impl < 'a > RXUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _0 ) } # [ doc = "At least one receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOF_A { # [ doc = "0: No transmit buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < TXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOF_A ) -> Self { match variant { TXOF_A :: _0 => false , TXOF_A :: _1 => true } } } # [ doc = "Reader of field `TXOF`" ] pub type TXOF_R = crate :: R < bool , TXOF_A > ; impl TXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOF_A { match self . bits { false => TXOF_A :: _0 , true => TXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOF_A :: _1 } } # [ doc = "Write proxy for field `TXOF`" ] pub struct TXOF_W < 'a > { w : & 'a mut W , } impl < 'a > TXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _0 ) } # [ doc = "At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOF_A { # [ doc = "0: No receive buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOF_A ) -> Self { match variant { RXOF_A :: _0 => false , RXOF_A :: _1 => true } } } # [ doc = "Reader of field `RXOF`" ] pub type RXOF_R = crate :: R < bool , RXOF_A > ; impl RXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOF_A { match self . bits { false => RXOF_A :: _0 , true => RXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOF_A :: _1 } } # [ doc = "Write proxy for field `RXOF`" ] pub struct RXOF_W < 'a > { w : & 'a mut W , } impl < 'a > RXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _0 ) } # [ doc = "At least one receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEMPT_A { # [ doc = "0: Receive buffer is not empty." ] _0 , # [ doc = "1: Receive buffer is empty." ] _1 } impl From < RXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEMPT_A ) -> Self { match variant { RXEMPT_A :: _0 => false , RXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `RXEMPT`" ] pub type RXEMPT_R = crate :: R < bool , RXEMPT_A > ; impl RXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEMPT_A { match self . bits { false => RXEMPT_A :: _0 , true => RXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEMPT_A :: _1 } } # [ doc = "Transmit Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXEMPT_A { # [ doc = "0: Transmit buffer is not empty." ] _0 , # [ doc = "1: Transmit buffer is empty." ] _1 } impl From < TXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : TXEMPT_A ) -> Self { match variant { TXEMPT_A :: _0 => false , TXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `TXEMPT`" ] pub type TXEMPT_R = crate :: R < bool , TXEMPT_A > ; impl TXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXEMPT_A { match self . bits { false => TXEMPT_A :: _0 , true => TXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXEMPT_A :: _1 } } impl R { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & self ) -> RXUF_R { RXUF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & self ) -> TXOF_R { TXOF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & self ) -> RXOF_R { RXOF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Receive Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn rxempt ( & self ) -> RXEMPT_R { RXEMPT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn txempt ( & self ) -> TXEMPT_R { TXEMPT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & mut self ) -> RXUF_W { RXUF_W { w : self } } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & mut self ) -> TXOF_W { TXOF_W { w : self } } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & mut self ) -> RXOF_W { RXOF_W { w : self } } } } # [ doc = "UART FIFO Transmit Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [twfifo](twfifo) module" ] pub type TWFIFO = crate :: Reg < u8 , _TWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TWFIFO ; # [ doc = "`read()` method returns [twfifo::R](twfifo::R) reader structure" ] impl crate :: Readable for TWFIFO { } # [ doc = "`write(|w| ..)` method takes [twfifo::W](twfifo::W) writer structure" ] impl crate :: Writable for TWFIFO { } # [ doc = "UART FIFO Transmit Watermark" ] pub mod twfifo { # [ doc = "Reader of register TWFIFO" ] pub type R = crate :: R < u8 , super :: TWFIFO > ; # [ doc = "Writer for register TWFIFO" ] pub type W = crate :: W < u8 , super :: TWFIFO > ; # [ doc = "Register TWFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXWATER`" ] pub type TXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXWATER`" ] pub struct TXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > TXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & self ) -> TXWATER_R { TXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & mut self ) -> TXWATER_W { TXWATER_W { w : self } } } } # [ doc = "UART FIFO Transmit Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcfifo](tcfifo) module" ] pub type TCFIFO = crate :: Reg < u8 , _TCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCFIFO ; # [ doc = "`read()` method returns [tcfifo::R](tcfifo::R) reader structure" ] impl crate :: Readable for TCFIFO { } # [ doc = "UART FIFO Transmit Count" ] pub mod tcfifo { # [ doc = "Reader of register TCFIFO" ] pub type R = crate :: R < u8 , super :: TCFIFO > ; # [ doc = "Reader of field `TXCOUNT`" ] pub type TXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Transmit Counter" ] # [ inline ( always ) ] pub fn txcount ( & self ) -> TXCOUNT_R { TXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "UART FIFO Receive Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rwfifo](rwfifo) module" ] pub type RWFIFO = crate :: Reg < u8 , _RWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RWFIFO ; # [ doc = "`read()` method returns [rwfifo::R](rwfifo::R) reader structure" ] impl crate :: Readable for RWFIFO { } # [ doc = "`write(|w| ..)` method takes [rwfifo::W](rwfifo::W) writer structure" ] impl crate :: Writable for RWFIFO { } # [ doc = "UART FIFO Receive Watermark" ] pub mod rwfifo { # [ doc = "Reader of register RWFIFO" ] pub type R = crate :: R < u8 , super :: RWFIFO > ; # [ doc = "Writer for register RWFIFO" ] pub type W = crate :: W < u8 , super :: RWFIFO > ; # [ doc = "Register RWFIFO `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: RWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Reader of field `RXWATER`" ] pub type RXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXWATER`" ] pub struct RXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > RXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & self ) -> RXWATER_R { RXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & mut self ) -> RXWATER_W { RXWATER_W { w : self } } } } # [ doc = "UART FIFO Receive Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcfifo](rcfifo) module" ] pub type RCFIFO = crate :: Reg < u8 , _RCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCFIFO ; # [ doc = "`read()` method returns [rcfifo::R](rcfifo::R) reader structure" ] impl crate :: Readable for RCFIFO { } # [ doc = "UART FIFO Receive Count" ] pub mod rcfifo { # [ doc = "Reader of register RCFIFO" ] pub type R = crate :: R < u8 , super :: RCFIFO > ; # [ doc = "Reader of field `RXCOUNT`" ] pub type RXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Receive Counter" ] # [ inline ( always ) ] pub fn rxcount ( & self ) -> RXCOUNT_R { RXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } } # [ doc = "Serial Communication Interface" ] pub struct UART3 { _marker : PhantomData < * const ( ) > } unsafe impl Send for UART3 { } impl UART3 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const uart3 :: RegisterBlock { 0x4006_d000 as * const _ } } impl Deref for UART3 { type Target = uart3 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * UART3 :: ptr ( ) } } } # [ doc = "Serial Communication Interface" ] pub mod uart3 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - UART Baud Rate Registers: High" ] pub bdh : BDH , # [ doc = "0x01 - UART Baud Rate Registers: Low" ] pub bdl : BDL , # [ doc = "0x02 - UART Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - UART Control Register 2" ] pub c2 : C2 , # [ doc = "0x04 - UART Status Register 1" ] pub s1 : S1 , # [ doc = "0x05 - UART Status Register 2" ] pub s2 : S2 , # [ doc = "0x06 - UART Control Register 3" ] pub c3 : C3 , # [ doc = "0x07 - UART Data Register" ] pub d : D , # [ doc = "0x08 - UART Match Address Registers 1" ] pub ma1 : MA1 , # [ doc = "0x09 - UART Match Address Registers 2" ] pub ma2 : MA2 , # [ doc = "0x0a - UART Control Register 4" ] pub c4 : C4 , # [ doc = "0x0b - UART Control Register 5" ] pub c5 : C5 , # [ doc = "0x0c - UART Extended Data Register" ] pub ed : ED , # [ doc = "0x0d - UART Modem Register" ] pub modem : MODEM , # [ doc = "0x0e - UART Infrared Register" ] pub ir : IR , _reserved15 : [ u8 ; 1usize ] , # [ doc = "0x10 - UART FIFO Parameters" ] pub pfifo : PFIFO , # [ doc = "0x11 - UART FIFO Control Register" ] pub cfifo : CFIFO , # [ doc = "0x12 - UART FIFO Status Register" ] pub sfifo : SFIFO , # [ doc = "0x13 - UART FIFO Transmit Watermark" ] pub twfifo : TWFIFO , # [ doc = "0x14 - UART FIFO Transmit Count" ] pub tcfifo : TCFIFO , # [ doc = "0x15 - UART FIFO Receive Watermark" ] pub rwfifo : RWFIFO , # [ doc = "0x16 - UART FIFO Receive Count" ] pub rcfifo : RCFIFO , } # [ doc = "UART Baud Rate Registers: High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdh](bdh) module" ] pub type BDH = crate :: Reg < u8 , _BDH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDH ; # [ doc = "`read()` method returns [bdh::R](bdh::R) reader structure" ] impl crate :: Readable for BDH { } # [ doc = "`write(|w| ..)` method takes [bdh::W](bdh::W) writer structure" ] impl crate :: Writable for BDH { } # [ doc = "UART Baud Rate Registers: High" ] pub mod bdh { # [ doc = "Reader of register BDH" ] pub type R = crate :: R < u8 , super :: BDH > ; # [ doc = "Writer for register BDH" ] pub type W = crate :: W < u8 , super :: BDH > ; # [ doc = "Register BDH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BDH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Stop Bit Number Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBNS_A { # [ doc = "0: Data frame consists of a single stop bit." ] _0 , # [ doc = "1: Data frame consists of two stop bits." ] _1 } impl From < SBNS_A > for bool { # [ inline ( always ) ] fn from ( variant : SBNS_A ) -> Self { match variant { SBNS_A :: _0 => false , SBNS_A :: _1 => true } } } # [ doc = "Reader of field `SBNS`" ] pub type SBNS_R = crate :: R < bool , SBNS_A > ; impl SBNS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBNS_A { match self . bits { false => SBNS_A :: _0 , true => SBNS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBNS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBNS_A :: _1 } } # [ doc = "Write proxy for field `SBNS`" ] pub struct SBNS_W < 'a > { w : & 'a mut W , } impl < 'a > SBNS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBNS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data frame consists of a single stop bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _0 ) } # [ doc = "Data frame consists of two stop bits." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Input Active Edge Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIE_A { # [ doc = "0: Hardware interrupts from RXEDGIF disabled using polling." ] _0 , # [ doc = "1: RXEDGIF interrupt request enabled." ] _1 } impl From < RXEDGIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIE_A ) -> Self { match variant { RXEDGIE_A :: _0 => false , RXEDGIE_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIE`" ] pub type RXEDGIE_R = crate :: R < bool , RXEDGIE_A > ; impl RXEDGIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIE_A { match self . bits { false => RXEDGIE_A :: _0 , true => RXEDGIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIE_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIE`" ] pub struct RXEDGIE_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from RXEDGIF disabled using polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _0 ) } # [ doc = "RXEDGIF interrupt request enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIE_A { # [ doc = "0: LBKDIF interrupt requests disabled." ] _0 , # [ doc = "1: LBKDIF interrupt requests enabled." ] _1 } impl From < LBKDIE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIE_A ) -> Self { match variant { LBKDIE_A :: _0 => false , LBKDIE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIE`" ] pub type LBKDIE_R = crate :: R < bool , LBKDIE_A > ; impl LBKDIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIE_A { match self . bits { false => LBKDIE_A :: _0 , true => LBKDIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIE_A :: _1 } } # [ doc = "Write proxy for field `LBKDIE`" ] pub struct LBKDIE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LBKDIF interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _0 ) } # [ doc = "LBKDIF interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & self ) -> SBNS_R { SBNS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & self ) -> RXEDGIE_R { RXEDGIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & self ) -> LBKDIE_R { LBKDIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & mut self ) -> SBNS_W { SBNS_W { w : self } } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & mut self ) -> RXEDGIE_W { RXEDGIE_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & mut self ) -> LBKDIE_W { LBKDIE_W { w : self } } } } # [ doc = "UART Baud Rate Registers: Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdl](bdl) module" ] pub type BDL = crate :: Reg < u8 , _BDL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDL ; # [ doc = "`read()` method returns [bdl::R](bdl::R) reader structure" ] impl crate :: Readable for BDL { } # [ doc = "`write(|w| ..)` method takes [bdl::W](bdl::W) writer structure" ] impl crate :: Writable for BDL { } # [ doc = "UART Baud Rate Registers: Low" ] pub mod bdl { # [ doc = "Reader of register BDL" ] pub type R = crate :: R < u8 , super :: BDL > ; # [ doc = "Writer for register BDL" ] pub type W = crate :: W < u8 , super :: BDL > ; # [ doc = "Register BDL `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: BDL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } } } # [ doc = "UART Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "UART Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PT_A { # [ doc = "0: Even parity." ] _0 , # [ doc = "1: Odd parity." ] _1 } impl From < PT_A > for bool { # [ inline ( always ) ] fn from ( variant : PT_A ) -> Self { match variant { PT_A :: _0 => false , PT_A :: _1 => true } } } # [ doc = "Reader of field `PT`" ] pub type PT_R = crate :: R < bool , PT_A > ; impl PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PT_A { match self . bits { false => PT_A :: _0 , true => PT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PT_A :: _1 } } # [ doc = "Write proxy for field `PT`" ] pub struct PT_W < 'a > { w : & 'a mut W , } impl < 'a > PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Even parity." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PT_A :: _0 ) } # [ doc = "Odd parity." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PT_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Parity Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Parity function disabled." ] _0 , # [ doc = "1: Parity function enabled." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Parity function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Parity function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Idle Line Type Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILT_A { # [ doc = "0: Idle character bit count starts after start bit." ] _0 , # [ doc = "1: Idle character bit count starts after stop bit." ] _1 } impl From < ILT_A > for bool { # [ inline ( always ) ] fn from ( variant : ILT_A ) -> Self { match variant { ILT_A :: _0 => false , ILT_A :: _1 => true } } } # [ doc = "Reader of field `ILT`" ] pub type ILT_R = crate :: R < bool , ILT_A > ; impl ILT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILT_A { match self . bits { false => ILT_A :: _0 , true => ILT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILT_A :: _1 } } # [ doc = "Write proxy for field `ILT`" ] pub struct ILT_W < 'a > { w : & 'a mut W , } impl < 'a > ILT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle character bit count starts after start bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _0 ) } # [ doc = "Idle character bit count starts after stop bit." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver Wakeup Method Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKE_A { # [ doc = "0: Idle line wakeup." ] _0 , # [ doc = "1: Address mark wakeup." ] _1 } impl From < WAKE_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKE_A ) -> Self { match variant { WAKE_A :: _0 => false , WAKE_A :: _1 => true } } } # [ doc = "Reader of field `WAKE`" ] pub type WAKE_R = crate :: R < bool , WAKE_A > ; impl WAKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKE_A { match self . bits { false => WAKE_A :: _0 , true => WAKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKE_A :: _1 } } # [ doc = "Write proxy for field `WAKE`" ] pub struct WAKE_W < 'a > { w : & 'a mut W , } impl < 'a > WAKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle line wakeup." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _0 ) } # [ doc = "Address mark wakeup." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "9-bit or 8-bit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M_A { # [ doc = "0: Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] _0 , # [ doc = "1: Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] _1 } impl From < M_A > for bool { # [ inline ( always ) ] fn from ( variant : M_A ) -> Self { match variant { M_A :: _0 => false , M_A :: _1 => true } } } # [ doc = "Reader of field `M`" ] pub type M_R = crate :: R < bool , M_A > ; impl M_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M_A { match self . bits { false => M_A :: _0 , true => M_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M_A :: _1 } } # [ doc = "Write proxy for field `M`" ] pub struct M_W < 'a > { w : & 'a mut W , } impl < 'a > M_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M_A :: _0 ) } # [ doc = "Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSRC_A { # [ doc = "0: Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] _0 , # [ doc = "1: Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] _1 } impl From < RSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : RSRC_A ) -> Self { match variant { RSRC_A :: _0 => false , RSRC_A :: _1 => true } } } # [ doc = "Reader of field `RSRC`" ] pub type RSRC_R = crate :: R < bool , RSRC_A > ; impl RSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSRC_A { match self . bits { false => RSRC_A :: _0 , true => RSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RSRC_A :: _1 } } # [ doc = "Write proxy for field `RSRC`" ] pub struct RSRC_W < 'a > { w : & 'a mut W , } impl < 'a > RSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _0 ) } # [ doc = "Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "UART Stops in Wait Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UARTSWAI_A { # [ doc = "0: UART clock continues to run in Wait mode." ] _0 , # [ doc = "1: UART clock freezes while CPU is in Wait mode." ] _1 } impl From < UARTSWAI_A > for bool { # [ inline ( always ) ] fn from ( variant : UARTSWAI_A ) -> Self { match variant { UARTSWAI_A :: _0 => false , UARTSWAI_A :: _1 => true } } } # [ doc = "Reader of field `UARTSWAI`" ] pub type UARTSWAI_R = crate :: R < bool , UARTSWAI_A > ; impl UARTSWAI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UARTSWAI_A { match self . bits { false => UARTSWAI_A :: _0 , true => UARTSWAI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UARTSWAI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UARTSWAI_A :: _1 } } # [ doc = "Write proxy for field `UARTSWAI`" ] pub struct UARTSWAI_W < 'a > { w : & 'a mut W , } impl < 'a > UARTSWAI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UARTSWAI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "UART clock continues to run in Wait mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _0 ) } # [ doc = "UART clock freezes while CPU is in Wait mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Loop Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] _1 } impl From < LOOPS_A > for bool { # [ inline ( always ) ] fn from ( variant : LOOPS_A ) -> Self { match variant { LOOPS_A :: _0 => false , LOOPS_A :: _1 => true } } } # [ doc = "Reader of field `LOOPS`" ] pub type LOOPS_R = crate :: R < bool , LOOPS_A > ; impl LOOPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOOPS_A { match self . bits { false => LOOPS_A :: _0 , true => LOOPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOOPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOOPS_A :: _1 } } # [ doc = "Write proxy for field `LOOPS`" ] pub struct LOOPS_W < 'a > { w : & 'a mut W , } impl < 'a > LOOPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOOPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _0 ) } # [ doc = "Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & self ) -> PT_R { PT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & self ) -> ILT_R { ILT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & self ) -> WAKE_R { WAKE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & self ) -> M_R { M_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & self ) -> RSRC_R { RSRC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & self ) -> UARTSWAI_R { UARTSWAI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & self ) -> LOOPS_R { LOOPS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & mut self ) -> PT_W { PT_W { w : self } } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & mut self ) -> ILT_W { ILT_W { w : self } } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & mut self ) -> WAKE_W { WAKE_W { w : self } } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & mut self ) -> M_W { M_W { w : self } } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & mut self ) -> RSRC_W { RSRC_W { w : self } } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & mut self ) -> UARTSWAI_W { UARTSWAI_W { w : self } } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & mut self ) -> LOOPS_W { LOOPS_W { w : self } } } } # [ doc = "UART Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "UART Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Send Break\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBK_A { # [ doc = "0: Normal transmitter operation." ] _0 , # [ doc = "1: Queue break characters to be sent." ] _1 } impl From < SBK_A > for bool { # [ inline ( always ) ] fn from ( variant : SBK_A ) -> Self { match variant { SBK_A :: _0 => false , SBK_A :: _1 => true } } } # [ doc = "Reader of field `SBK`" ] pub type SBK_R = crate :: R < bool , SBK_A > ; impl SBK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBK_A { match self . bits { false => SBK_A :: _0 , true => SBK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBK_A :: _1 } } # [ doc = "Write proxy for field `SBK`" ] pub struct SBK_W < 'a > { w : & 'a mut W , } impl < 'a > SBK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal transmitter operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _0 ) } # [ doc = "Queue break characters to be sent." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Receiver Wakeup Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWU_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] _1 } impl From < RWU_A > for bool { # [ inline ( always ) ] fn from ( variant : RWU_A ) -> Self { match variant { RWU_A :: _0 => false , RWU_A :: _1 => true } } } # [ doc = "Reader of field `RWU`" ] pub type RWU_R = crate :: R < bool , RWU_A > ; impl RWU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWU_A { match self . bits { false => RWU_A :: _0 , true => RWU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWU_A :: _1 } } # [ doc = "Write proxy for field `RWU`" ] pub struct RWU_W < 'a > { w : & 'a mut W , } impl < 'a > RWU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _0 ) } # [ doc = "RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RE_A { # [ doc = "0: Receiver off." ] _0 , # [ doc = "1: Receiver on." ] _1 } impl From < RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RE_A ) -> Self { match variant { RE_A :: _0 => false , RE_A :: _1 => true } } } # [ doc = "Reader of field `RE`" ] pub type RE_R = crate :: R < bool , RE_A > ; impl RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RE_A { match self . bits { false => RE_A :: _0 , true => RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RE_A :: _1 } } # [ doc = "Write proxy for field `RE`" ] pub struct RE_W < 'a > { w : & 'a mut W , } impl < 'a > RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RE_A :: _0 ) } # [ doc = "Receiver on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmitter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TE_A { # [ doc = "0: Transmitter off." ] _0 , # [ doc = "1: Transmitter on." ] _1 } impl From < TE_A > for bool { # [ inline ( always ) ] fn from ( variant : TE_A ) -> Self { match variant { TE_A :: _0 => false , TE_A :: _1 => true } } } # [ doc = "Reader of field `TE`" ] pub type TE_R = crate :: R < bool , TE_A > ; impl TE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TE_A { match self . bits { false => TE_A :: _0 , true => TE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TE_A :: _1 } } # [ doc = "Write proxy for field `TE`" ] pub struct TE_W < 'a > { w : & 'a mut W , } impl < 'a > TE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TE_A :: _0 ) } # [ doc = "Transmitter on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Idle Line Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILIE_A { # [ doc = "0: IDLE interrupt requests disabled." ] _0 , # [ doc = "1: IDLE interrupt requests enabled." ] _1 } impl From < ILIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ILIE_A ) -> Self { match variant { ILIE_A :: _0 => false , ILIE_A :: _1 => true } } } # [ doc = "Reader of field `ILIE`" ] pub type ILIE_R = crate :: R < bool , ILIE_A > ; impl ILIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILIE_A { match self . bits { false => ILIE_A :: _0 , true => ILIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILIE_A :: _1 } } # [ doc = "Write proxy for field `ILIE`" ] pub struct ILIE_W < 'a > { w : & 'a mut W , } impl < 'a > ILIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IDLE interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _0 ) } # [ doc = "IDLE interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Full Interrupt or DMA Transfer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RIE_A { # [ doc = "0: RDRF interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: RDRF interrupt or DMA transfer requests enabled." ] _1 } impl From < RIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RIE_A ) -> Self { match variant { RIE_A :: _0 => false , RIE_A :: _1 => true } } } # [ doc = "Reader of field `RIE`" ] pub type RIE_R = crate :: R < bool , RIE_A > ; impl RIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RIE_A { match self . bits { false => RIE_A :: _0 , true => RIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RIE_A :: _1 } } # [ doc = "Write proxy for field `RIE`" ] pub struct RIE_W < 'a > { w : & 'a mut W , } impl < 'a > RIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RDRF interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _0 ) } # [ doc = "RDRF interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmission Complete Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCIE_A { # [ doc = "0: TC interrupt requests disabled." ] _0 , # [ doc = "1: TC interrupt requests enabled." ] _1 } impl From < TCIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCIE_A ) -> Self { match variant { TCIE_A :: _0 => false , TCIE_A :: _1 => true } } } # [ doc = "Reader of field `TCIE`" ] pub type TCIE_R = crate :: R < bool , TCIE_A > ; impl TCIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCIE_A { match self . bits { false => TCIE_A :: _0 , true => TCIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCIE_A :: _1 } } # [ doc = "Write proxy for field `TCIE`" ] pub struct TCIE_W < 'a > { w : & 'a mut W , } impl < 'a > TCIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TC interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _0 ) } # [ doc = "TC interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmitter Interrupt or DMA Transfer Enable.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: TDRE interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: TDRE interrupt or DMA transfer requests enabled." ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TDRE interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "TDRE interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & self ) -> SBK_R { SBK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & self ) -> RWU_R { RWU_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & self ) -> RE_R { RE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & self ) -> TE_R { TE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & self ) -> ILIE_R { ILIE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & self ) -> RIE_R { RIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & self ) -> TCIE_R { TCIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & mut self ) -> SBK_W { SBK_W { w : self } } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & mut self ) -> RWU_W { RWU_W { w : self } } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & mut self ) -> RE_W { RE_W { w : self } } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & mut self ) -> TE_W { TE_W { w : self } } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & mut self ) -> ILIE_W { ILIE_W { w : self } } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & mut self ) -> RIE_W { RIE_W { w : self } } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & mut self ) -> TCIE_W { TCIE_W { w : self } } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } } } # [ doc = "UART Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s1](s1) module" ] pub type S1 = crate :: Reg < u8 , _S1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S1 ; # [ doc = "`read()` method returns [s1::R](s1::R) reader structure" ] impl crate :: Readable for S1 { } # [ doc = "UART Status Register 1" ] pub mod s1 { # [ doc = "Reader of register S1" ] pub type R = crate :: R < u8 , super :: S1 > ; # [ doc = "Parity Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PF_A { # [ doc = "0: No parity error detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1, then there may be data in the receive buffer what was received with a parity error." ] _0 , # [ doc = "1: At least one dataword was received with a parity error since the last time this flag was cleared." ] _1 } impl From < PF_A > for bool { # [ inline ( always ) ] fn from ( variant : PF_A ) -> Self { match variant { PF_A :: _0 => false , PF_A :: _1 => true } } } # [ doc = "Reader of field `PF`" ] pub type PF_R = crate :: R < bool , PF_A > ; impl PF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PF_A { match self . bits { false => PF_A :: _0 , true => PF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PF_A :: _1 } } # [ doc = "Framing Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FE_A { # [ doc = "0: No framing error detected." ] _0 , # [ doc = "1: Framing error." ] _1 } impl From < FE_A > for bool { # [ inline ( always ) ] fn from ( variant : FE_A ) -> Self { match variant { FE_A :: _0 => false , FE_A :: _1 => true } } } # [ doc = "Reader of field `FE`" ] pub type FE_R = crate :: R < bool , FE_A > ; impl FE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FE_A { match self . bits { false => FE_A :: _0 , true => FE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FE_A :: _1 } } # [ doc = "Noise Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NF_A { # [ doc = "0: No noise detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1 then there may be data in the receiver buffer that was received with noise." ] _0 , # [ doc = "1: At least one dataword was received with noise detected since the last time the flag was cleared." ] _1 } impl From < NF_A > for bool { # [ inline ( always ) ] fn from ( variant : NF_A ) -> Self { match variant { NF_A :: _0 => false , NF_A :: _1 => true } } } # [ doc = "Reader of field `NF`" ] pub type NF_R = crate :: R < bool , NF_A > ; impl NF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NF_A { match self . bits { false => NF_A :: _0 , true => NF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NF_A :: _1 } } # [ doc = "Receiver Overrun Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OR_A { # [ doc = "0: No overrun has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: Overrun has occurred or the overrun flag has not been cleared since the last overrun occurred." ] _1 } impl From < OR_A > for bool { # [ inline ( always ) ] fn from ( variant : OR_A ) -> Self { match variant { OR_A :: _0 => false , OR_A :: _1 => true } } } # [ doc = "Reader of field `OR`" ] pub type OR_R = crate :: R < bool , OR_A > ; impl OR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OR_A { match self . bits { false => OR_A :: _0 , true => OR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OR_A :: _1 } } # [ doc = "Idle Line Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLE_A { # [ doc = "0: Receiver input is either active now or has never become active since the IDLE flag was last cleared." ] _0 , # [ doc = "1: Receiver input has become idle or the flag has not been cleared since it last asserted." ] _1 } impl From < IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLE_A ) -> Self { match variant { IDLE_A :: _0 => false , IDLE_A :: _1 => true } } } # [ doc = "Reader of field `IDLE`" ] pub type IDLE_R = crate :: R < bool , IDLE_A > ; impl IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLE_A { match self . bits { false => IDLE_A :: _0 , true => IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLE_A :: _1 } } # [ doc = "Receive Data Register Full Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDRF_A { # [ doc = "0: The number of datawords in the receive buffer is less than the number indicated by RXWATER." ] _0 , # [ doc = "1: The number of datawords in the receive buffer is equal to or greater than the number indicated by RXWATER at some point in time since this flag was last cleared." ] _1 } impl From < RDRF_A > for bool { # [ inline ( always ) ] fn from ( variant : RDRF_A ) -> Self { match variant { RDRF_A :: _0 => false , RDRF_A :: _1 => true } } } # [ doc = "Reader of field `RDRF`" ] pub type RDRF_R = crate :: R < bool , RDRF_A > ; impl RDRF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDRF_A { match self . bits { false => RDRF_A :: _0 , true => RDRF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDRF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDRF_A :: _1 } } # [ doc = "Transmit Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TC_A { # [ doc = "0: Transmitter active (sending data, a preamble, or a break)." ] _0 , # [ doc = "1: Transmitter idle (transmission activity complete)." ] _1 } impl From < TC_A > for bool { # [ inline ( always ) ] fn from ( variant : TC_A ) -> Self { match variant { TC_A :: _0 => false , TC_A :: _1 => true } } } # [ doc = "Reader of field `TC`" ] pub type TC_R = crate :: R < bool , TC_A > ; impl TC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TC_A { match self . bits { false => TC_A :: _0 , true => TC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TC_A :: _1 } } # [ doc = "Transmit Data Register Empty Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDRE_A { # [ doc = "0: The amount of data in the transmit buffer is greater than the value indicated by TWFIFO\\[TXWATER\\]." ] _0 , # [ doc = "1: The amount of data in the transmit buffer is less than or equal to the value indicated by TWFIFO\\[TXWATER\\] at some point in time since the flag has been cleared." ] _1 } impl From < TDRE_A > for bool { # [ inline ( always ) ] fn from ( variant : TDRE_A ) -> Self { match variant { TDRE_A :: _0 => false , TDRE_A :: _1 => true } } } # [ doc = "Reader of field `TDRE`" ] pub type TDRE_R = crate :: R < bool , TDRE_A > ; impl TDRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDRE_A { match self . bits { false => TDRE_A :: _0 , true => TDRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDRE_A :: _1 } } impl R { # [ doc = "Bit 0 - Parity Error Flag" ] # [ inline ( always ) ] pub fn pf ( & self ) -> PF_R { PF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Flag" ] # [ inline ( always ) ] pub fn fe ( & self ) -> FE_R { FE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Flag" ] # [ inline ( always ) ] pub fn nf ( & self ) -> NF_R { NF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Overrun Flag" ] # [ inline ( always ) ] pub fn or ( & self ) -> OR_R { OR_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Flag" ] # [ inline ( always ) ] pub fn idle ( & self ) -> IDLE_R { IDLE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receive Data Register Full Flag" ] # [ inline ( always ) ] pub fn rdrf ( & self ) -> RDRF_R { RDRF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Complete Flag" ] # [ inline ( always ) ] pub fn tc ( & self ) -> TC_R { TC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Data Register Empty Flag" ] # [ inline ( always ) ] pub fn tdre ( & self ) -> TDRE_R { TDRE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Status Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s2](s2) module" ] pub type S2 = crate :: Reg < u8 , _S2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S2 ; # [ doc = "`read()` method returns [s2::R](s2::R) reader structure" ] impl crate :: Readable for S2 { } # [ doc = "`write(|w| ..)` method takes [s2::W](s2::W) writer structure" ] impl crate :: Writable for S2 { } # [ doc = "UART Status Register 2" ] pub mod s2 { # [ doc = "Reader of register S2" ] pub type R = crate :: R < u8 , super :: S2 > ; # [ doc = "Writer for register S2" ] pub type W = crate :: W < u8 , super :: S2 > ; # [ doc = "Register S2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: S2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Active Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAF_A { # [ doc = "0: UART receiver idle/inactive waiting for a start bit." ] _0 , # [ doc = "1: UART receiver active, RxD input not idle." ] _1 } impl From < RAF_A > for bool { # [ inline ( always ) ] fn from ( variant : RAF_A ) -> Self { match variant { RAF_A :: _0 => false , RAF_A :: _1 => true } } } # [ doc = "Reader of field `RAF`" ] pub type RAF_R = crate :: R < bool , RAF_A > ; impl RAF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAF_A { match self . bits { false => RAF_A :: _0 , true => RAF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAF_A :: _1 } } # [ doc = "LIN Break Detection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDE_A { # [ doc = "0: Break character detection is disabled." ] _0 , # [ doc = "1: Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] _1 } impl From < LBKDE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDE_A ) -> Self { match variant { LBKDE_A :: _0 => false , LBKDE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDE`" ] pub type LBKDE_R = crate :: R < bool , LBKDE_A > ; impl LBKDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDE_A { match self . bits { false => LBKDE_A :: _0 , true => LBKDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDE_A :: _1 } } # [ doc = "Write proxy for field `LBKDE`" ] pub struct LBKDE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character detection is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _0 ) } # [ doc = "Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Break Transmit Character Length\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRK13_A { # [ doc = "0: Break character is 10, 11, or 12 bits long." ] _0 , # [ doc = "1: Break character is 13 or 14 bits long." ] _1 } impl From < BRK13_A > for bool { # [ inline ( always ) ] fn from ( variant : BRK13_A ) -> Self { match variant { BRK13_A :: _0 => false , BRK13_A :: _1 => true } } } # [ doc = "Reader of field `BRK13`" ] pub type BRK13_R = crate :: R < bool , BRK13_A > ; impl BRK13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRK13_A { match self . bits { false => BRK13_A :: _0 , true => BRK13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRK13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRK13_A :: _1 } } # [ doc = "Write proxy for field `BRK13`" ] pub struct BRK13_W < 'a > { w : & 'a mut W , } impl < 'a > BRK13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRK13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character is 10, 11, or 12 bits long." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _0 ) } # [ doc = "Break character is 13 or 14 bits long." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Wakeup Idle Detect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWUID_A { # [ doc = "0: S1\\[IDLE\\] is not set upon detection of an idle character." ] _0 , # [ doc = "1: S1\\[IDLE\\] is set upon detection of an idle character." ] _1 } impl From < RWUID_A > for bool { # [ inline ( always ) ] fn from ( variant : RWUID_A ) -> Self { match variant { RWUID_A :: _0 => false , RWUID_A :: _1 => true } } } # [ doc = "Reader of field `RWUID`" ] pub type RWUID_R = crate :: R < bool , RWUID_A > ; impl RWUID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWUID_A { match self . bits { false => RWUID_A :: _0 , true => RWUID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWUID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWUID_A :: _1 } } # [ doc = "Write proxy for field `RWUID`" ] pub struct RWUID_W < 'a > { w : & 'a mut W , } impl < 'a > RWUID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWUID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "S1\\[IDLE\\] is not set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _0 ) } # [ doc = "S1\\[IDLE\\] is set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Receive Data Inversion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXINV_A { # [ doc = "0: Receive data is not inverted." ] _0 , # [ doc = "1: Receive data is inverted." ] _1 } impl From < RXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXINV_A ) -> Self { match variant { RXINV_A :: _0 => false , RXINV_A :: _1 => true } } } # [ doc = "Reader of field `RXINV`" ] pub type RXINV_R = crate :: R < bool , RXINV_A > ; impl RXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXINV_A { match self . bits { false => RXINV_A :: _0 , true => RXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXINV_A :: _1 } } # [ doc = "Write proxy for field `RXINV`" ] pub struct RXINV_W < 'a > { w : & 'a mut W , } impl < 'a > RXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _0 ) } # [ doc = "Receive data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Most Significant Bit First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSBF_A { # [ doc = "0: LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] _0 , # [ doc = "1: MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] _1 } impl From < MSBF_A > for bool { # [ inline ( always ) ] fn from ( variant : MSBF_A ) -> Self { match variant { MSBF_A :: _0 => false , MSBF_A :: _1 => true } } } # [ doc = "Reader of field `MSBF`" ] pub type MSBF_R = crate :: R < bool , MSBF_A > ; impl MSBF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSBF_A { match self . bits { false => MSBF_A :: _0 , true => MSBF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSBF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSBF_A :: _1 } } # [ doc = "Write proxy for field `MSBF`" ] pub struct MSBF_W < 'a > { w : & 'a mut W , } impl < 'a > MSBF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSBF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _0 ) } # [ doc = "MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Pin Active Edge Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIF_A { # [ doc = "0: No active edge on the receive pin has occurred." ] _0 , # [ doc = "1: An active edge on the receive pin has occurred." ] _1 } impl From < RXEDGIF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIF_A ) -> Self { match variant { RXEDGIF_A :: _0 => false , RXEDGIF_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIF`" ] pub type RXEDGIF_R = crate :: R < bool , RXEDGIF_A > ; impl RXEDGIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIF_A { match self . bits { false => RXEDGIF_A :: _0 , true => RXEDGIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIF_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIF`" ] pub struct RXEDGIF_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _0 ) } # [ doc = "An active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIF_A { # [ doc = "0: No LIN break character detected." ] _0 , # [ doc = "1: LIN break character detected." ] _1 } impl From < LBKDIF_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIF_A ) -> Self { match variant { LBKDIF_A :: _0 => false , LBKDIF_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIF`" ] pub type LBKDIF_R = crate :: R < bool , LBKDIF_A > ; impl LBKDIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIF_A { match self . bits { false => LBKDIF_A :: _0 , true => LBKDIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIF_A :: _1 } } # [ doc = "Write proxy for field `LBKDIF`" ] pub struct LBKDIF_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No LIN break character detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _0 ) } # [ doc = "LIN break character detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receiver Active Flag" ] # [ inline ( always ) ] pub fn raf ( & self ) -> RAF_R { RAF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & self ) -> LBKDE_R { LBKDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & self ) -> BRK13_R { BRK13_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & self ) -> RWUID_R { RWUID_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & self ) -> RXINV_R { RXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & self ) -> MSBF_R { MSBF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & self ) -> RXEDGIF_R { RXEDGIF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & self ) -> LBKDIF_R { LBKDIF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & mut self ) -> LBKDE_W { LBKDE_W { w : self } } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & mut self ) -> BRK13_W { BRK13_W { w : self } } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & mut self ) -> RWUID_W { RWUID_W { w : self } } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & mut self ) -> RXINV_W { RXINV_W { w : self } } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & mut self ) -> MSBF_W { MSBF_W { w : self } } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & mut self ) -> RXEDGIF_W { RXEDGIF_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & mut self ) -> LBKDIF_W { LBKDIF_W { w : self } } } } # [ doc = "UART Control Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c3](c3) module" ] pub type C3 = crate :: Reg < u8 , _C3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C3 ; # [ doc = "`read()` method returns [c3::R](c3::R) reader structure" ] impl crate :: Readable for C3 { } # [ doc = "`write(|w| ..)` method takes [c3::W](c3::W) writer structure" ] impl crate :: Writable for C3 { } # [ doc = "UART Control Register 3" ] pub mod c3 { # [ doc = "Reader of register C3" ] pub type R = crate :: R < u8 , super :: C3 > ; # [ doc = "Writer for register C3" ] pub type W = crate :: W < u8 , super :: C3 > ; # [ doc = "Register C3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEIE_A { # [ doc = "0: PF interrupt requests are disabled." ] _0 , # [ doc = "1: PF interrupt requests are enabled." ] _1 } impl From < PEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : PEIE_A ) -> Self { match variant { PEIE_A :: _0 => false , PEIE_A :: _1 => true } } } # [ doc = "Reader of field `PEIE`" ] pub type PEIE_R = crate :: R < bool , PEIE_A > ; impl PEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEIE_A { match self . bits { false => PEIE_A :: _0 , true => PEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEIE_A :: _1 } } # [ doc = "Write proxy for field `PEIE`" ] pub struct PEIE_W < 'a > { w : & 'a mut W , } impl < 'a > PEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _0 ) } # [ doc = "PF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Framing Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEIE_A { # [ doc = "0: FE interrupt requests are disabled." ] _0 , # [ doc = "1: FE interrupt requests are enabled." ] _1 } impl From < FEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FEIE_A ) -> Self { match variant { FEIE_A :: _0 => false , FEIE_A :: _1 => true } } } # [ doc = "Reader of field `FEIE`" ] pub type FEIE_R = crate :: R < bool , FEIE_A > ; impl FEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEIE_A { match self . bits { false => FEIE_A :: _0 , true => FEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEIE_A :: _1 } } # [ doc = "Write proxy for field `FEIE`" ] pub struct FEIE_W < 'a > { w : & 'a mut W , } impl < 'a > FEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FE interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _0 ) } # [ doc = "FE interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Noise Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NEIE_A { # [ doc = "0: NF interrupt requests are disabled." ] _0 , # [ doc = "1: NF interrupt requests are enabled." ] _1 } impl From < NEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : NEIE_A ) -> Self { match variant { NEIE_A :: _0 => false , NEIE_A :: _1 => true } } } # [ doc = "Reader of field `NEIE`" ] pub type NEIE_R = crate :: R < bool , NEIE_A > ; impl NEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NEIE_A { match self . bits { false => NEIE_A :: _0 , true => NEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NEIE_A :: _1 } } # [ doc = "Write proxy for field `NEIE`" ] pub struct NEIE_W < 'a > { w : & 'a mut W , } impl < 'a > NEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "NF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _0 ) } # [ doc = "NF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Overrun Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORIE_A { # [ doc = "0: OR interrupts are disabled." ] _0 , # [ doc = "1: OR interrupt requests are enabled." ] _1 } impl From < ORIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ORIE_A ) -> Self { match variant { ORIE_A :: _0 => false , ORIE_A :: _1 => true } } } # [ doc = "Reader of field `ORIE`" ] pub type ORIE_R = crate :: R < bool , ORIE_A > ; impl ORIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ORIE_A { match self . bits { false => ORIE_A :: _0 , true => ORIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ORIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ORIE_A :: _1 } } # [ doc = "Write proxy for field `ORIE`" ] pub struct ORIE_W < 'a > { w : & 'a mut W , } impl < 'a > ORIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ORIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OR interrupts are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _0 ) } # [ doc = "OR interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Data Inversion.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXINV_A { # [ doc = "0: Transmit data is not inverted." ] _0 , # [ doc = "1: Transmit data is inverted." ] _1 } impl From < TXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : TXINV_A ) -> Self { match variant { TXINV_A :: _0 => false , TXINV_A :: _1 => true } } } # [ doc = "Reader of field `TXINV`" ] pub type TXINV_R = crate :: R < bool , TXINV_A > ; impl TXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXINV_A { match self . bits { false => TXINV_A :: _0 , true => TXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXINV_A :: _1 } } # [ doc = "Write proxy for field `TXINV`" ] pub struct TXINV_W < 'a > { w : & 'a mut W , } impl < 'a > TXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _0 ) } # [ doc = "Transmit data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Transmitter Pin Data Direction in Single-Wire mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDIR_A { # [ doc = "0: TXD pin is an input in single wire mode." ] _0 , # [ doc = "1: TXD pin is an output in single wire mode." ] _1 } impl From < TXDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TXDIR_A ) -> Self { match variant { TXDIR_A :: _0 => false , TXDIR_A :: _1 => true } } } # [ doc = "Reader of field `TXDIR`" ] pub type TXDIR_R = crate :: R < bool , TXDIR_A > ; impl TXDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXDIR_A { match self . bits { false => TXDIR_A :: _0 , true => TXDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXDIR_A :: _1 } } # [ doc = "Write proxy for field `TXDIR`" ] pub struct TXDIR_W < 'a > { w : & 'a mut W , } impl < 'a > TXDIR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXDIR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXD pin is an input in single wire mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _0 ) } # [ doc = "TXD pin is an output in single wire mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `T8`" ] pub type T8_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `T8`" ] pub struct T8_W < 'a > { w : & 'a mut W , } impl < 'a > T8_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `R8`" ] pub type R8_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & self ) -> PEIE_R { PEIE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & self ) -> FEIE_R { FEIE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & self ) -> NEIE_R { NEIE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & self ) -> ORIE_R { ORIE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & self ) -> TXINV_R { TXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & self ) -> TXDIR_R { TXDIR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & self ) -> T8_R { T8_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Received Bit 8" ] # [ inline ( always ) ] pub fn r8 ( & self ) -> R8_R { R8_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & mut self ) -> PEIE_W { PEIE_W { w : self } } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & mut self ) -> FEIE_W { FEIE_W { w : self } } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & mut self ) -> NEIE_W { NEIE_W { w : self } } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & mut self ) -> ORIE_W { ORIE_W { w : self } } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & mut self ) -> TXINV_W { TXINV_W { w : self } } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & mut self ) -> TXDIR_W { TXDIR_W { w : self } } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & mut self ) -> T8_W { T8_W { w : self } } } } # [ doc = "UART Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "UART Data Register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RT`" ] pub type RT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RT`" ] pub struct RT_W < 'a > { w : & 'a mut W , } impl < 'a > RT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & self ) -> RT_R { RT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & mut self ) -> RT_W { RT_W { w : self } } } } # [ doc = "UART Match Address Registers 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma1](ma1) module" ] pub type MA1 = crate :: Reg < u8 , _MA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA1 ; # [ doc = "`read()` method returns [ma1::R](ma1::R) reader structure" ] impl crate :: Readable for MA1 { } # [ doc = "`write(|w| ..)` method takes [ma1::W](ma1::W) writer structure" ] impl crate :: Writable for MA1 { } # [ doc = "UART Match Address Registers 1" ] pub mod ma1 { # [ doc = "Reader of register MA1" ] pub type R = crate :: R < u8 , super :: MA1 > ; # [ doc = "Writer for register MA1" ] pub type W = crate :: W < u8 , super :: MA1 > ; # [ doc = "Register MA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Match Address Registers 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma2](ma2) module" ] pub type MA2 = crate :: Reg < u8 , _MA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA2 ; # [ doc = "`read()` method returns [ma2::R](ma2::R) reader structure" ] impl crate :: Readable for MA2 { } # [ doc = "`write(|w| ..)` method takes [ma2::W](ma2::W) writer structure" ] impl crate :: Writable for MA2 { } # [ doc = "UART Match Address Registers 2" ] pub mod ma2 { # [ doc = "Reader of register MA2" ] pub type R = crate :: R < u8 , super :: MA2 > ; # [ doc = "Writer for register MA2" ] pub type W = crate :: W < u8 , super :: MA2 > ; # [ doc = "Register MA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Control Register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c4](c4) module" ] pub type C4 = crate :: Reg < u8 , _C4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C4 ; # [ doc = "`read()` method returns [c4::R](c4::R) reader structure" ] impl crate :: Readable for C4 { } # [ doc = "`write(|w| ..)` method takes [c4::W](c4::W) writer structure" ] impl crate :: Writable for C4 { } # [ doc = "UART Control Register 4" ] pub mod c4 { # [ doc = "Reader of register C4" ] pub type R = crate :: R < u8 , super :: C4 > ; # [ doc = "Writer for register C4" ] pub type W = crate :: W < u8 , super :: C4 > ; # [ doc = "Register C4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BRFA`" ] pub type BRFA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BRFA`" ] pub struct BRFA_W < 'a > { w : & 'a mut W , } impl < 'a > BRFA_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "10-bit Mode select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M10_A { # [ doc = "0: The parity bit is the ninth bit in the serial transmission." ] _0 , # [ doc = "1: The parity bit is the tenth bit in the serial transmission." ] _1 } impl From < M10_A > for bool { # [ inline ( always ) ] fn from ( variant : M10_A ) -> Self { match variant { M10_A :: _0 => false , M10_A :: _1 => true } } } # [ doc = "Reader of field `M10`" ] pub type M10_R = crate :: R < bool , M10_A > ; impl M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M10_A { match self . bits { false => M10_A :: _0 , true => M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M10_A :: _1 } } # [ doc = "Write proxy for field `M10`" ] pub struct M10_W < 'a > { w : & 'a mut W , } impl < 'a > M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The parity bit is the ninth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M10_A :: _0 ) } # [ doc = "The parity bit is the tenth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M10_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Match Address Mode Enable 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN2_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN1 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN2_A ) -> Self { match variant { MAEN2_A :: _0 => false , MAEN2_A :: _1 => true } } } # [ doc = "Reader of field `MAEN2`" ] pub type MAEN2_R = crate :: R < bool , MAEN2_A > ; impl MAEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN2_A { match self . bits { false => MAEN2_A :: _0 , true => MAEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN2_A :: _1 } } # [ doc = "Write proxy for field `MAEN2`" ] pub struct MAEN2_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN1 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Match Address Mode Enable 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN1_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN2 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN1_A ) -> Self { match variant { MAEN1_A :: _0 => false , MAEN1_A :: _1 => true } } } # [ doc = "Reader of field `MAEN1`" ] pub type MAEN1_R = crate :: R < bool , MAEN1_A > ; impl MAEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN1_A { match self . bits { false => MAEN1_A :: _0 , true => MAEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN1_A :: _1 } } # [ doc = "Write proxy for field `MAEN1`" ] pub struct MAEN1_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN2 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & self ) -> BRFA_R { BRFA_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & self ) -> M10_R { M10_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & self ) -> MAEN2_R { MAEN2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & self ) -> MAEN1_R { MAEN1_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & mut self ) -> BRFA_W { BRFA_W { w : self } } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & mut self ) -> M10_W { M10_W { w : self } } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & mut self ) -> MAEN2_W { MAEN2_W { w : self } } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & mut self ) -> MAEN1_W { MAEN1_W { w : self } } } } # [ doc = "UART Control Register 5\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c5](c5) module" ] pub type C5 = crate :: Reg < u8 , _C5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C5 ; # [ doc = "`read()` method returns [c5::R](c5::R) reader structure" ] impl crate :: Readable for C5 { } # [ doc = "`write(|w| ..)` method takes [c5::W](c5::W) writer structure" ] impl crate :: Writable for C5 { } # [ doc = "UART Control Register 5" ] pub mod c5 { # [ doc = "Reader of register C5" ] pub type R = crate :: R < u8 , super :: C5 > ; # [ doc = "Writer for register C5" ] pub type W = crate :: W < u8 , super :: C5 > ; # [ doc = "Register C5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C5 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Full DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDMAS_A { # [ doc = "0: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] _0 , # [ doc = "1: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < RDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : RDMAS_A ) -> Self { match variant { RDMAS_A :: _0 => false , RDMAS_A :: _1 => true } } } # [ doc = "Reader of field `RDMAS`" ] pub type RDMAS_R = crate :: R < bool , RDMAS_A > ; impl RDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDMAS_A { match self . bits { false => RDMAS_A :: _0 , true => RDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDMAS_A :: _1 } } # [ doc = "Write proxy for field `RDMAS`" ] pub struct RDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > RDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _0 ) } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmitter DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDMAS_A { # [ doc = "0: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] _0 , # [ doc = "1: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < TDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TDMAS_A ) -> Self { match variant { TDMAS_A :: _0 => false , TDMAS_A :: _1 => true } } } # [ doc = "Reader of field `TDMAS`" ] pub type TDMAS_R = crate :: R < bool , TDMAS_A > ; impl TDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDMAS_A { match self . bits { false => TDMAS_A :: _0 , true => TDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDMAS_A :: _1 } } # [ doc = "Write proxy for field `TDMAS`" ] pub struct TDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > TDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _0 ) } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & self ) -> RDMAS_R { RDMAS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & self ) -> TDMAS_R { TDMAS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & mut self ) -> RDMAS_W { RDMAS_W { w : self } } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & mut self ) -> TDMAS_W { TDMAS_W { w : self } } } } # [ doc = "UART Extended Data Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ed](ed) module" ] pub type ED = crate :: Reg < u8 , _ED > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ED ; # [ doc = "`read()` method returns [ed::R](ed::R) reader structure" ] impl crate :: Readable for ED { } # [ doc = "UART Extended Data Register" ] pub mod ed { # [ doc = "Reader of register ED" ] pub type R = crate :: R < u8 , super :: ED > ; # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with a parity error.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYE_A { # [ doc = "0: The dataword was received without a parity error." ] _0 , # [ doc = "1: The dataword was received with a parity error." ] _1 } impl From < PARITYE_A > for bool { # [ inline ( always ) ] fn from ( variant : PARITYE_A ) -> Self { match variant { PARITYE_A :: _0 => false , PARITYE_A :: _1 => true } } } # [ doc = "Reader of field `PARITYE`" ] pub type PARITYE_R = crate :: R < bool , PARITYE_A > ; impl PARITYE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PARITYE_A { match self . bits { false => PARITYE_A :: _0 , true => PARITYE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PARITYE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PARITYE_A :: _1 } } # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with noise.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOISY_A { # [ doc = "0: The dataword was received without noise." ] _0 , # [ doc = "1: The data was received with noise." ] _1 } impl From < NOISY_A > for bool { # [ inline ( always ) ] fn from ( variant : NOISY_A ) -> Self { match variant { NOISY_A :: _0 => false , NOISY_A :: _1 => true } } } # [ doc = "Reader of field `NOISY`" ] pub type NOISY_R = crate :: R < bool , NOISY_A > ; impl NOISY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOISY_A { match self . bits { false => NOISY_A :: _0 , true => NOISY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOISY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOISY_A :: _1 } } impl R { # [ doc = "Bit 6 - The current received dataword contained in D and C3\\[R8\\] was received with a parity error." ] # [ inline ( always ) ] pub fn paritye ( & self ) -> PARITYE_R { PARITYE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - The current received dataword contained in D and C3\\[R8\\] was received with noise." ] # [ inline ( always ) ] pub fn noisy ( & self ) -> NOISY_R { NOISY_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Modem Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [modem](modem) module" ] pub type MODEM = crate :: Reg < u8 , _MODEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODEM ; # [ doc = "`read()` method returns [modem::R](modem::R) reader structure" ] impl crate :: Readable for MODEM { } # [ doc = "`write(|w| ..)` method takes [modem::W](modem::W) writer structure" ] impl crate :: Writable for MODEM { } # [ doc = "UART Modem Register" ] pub mod modem { # [ doc = "Reader of register MODEM" ] pub type R = crate :: R < u8 , super :: MODEM > ; # [ doc = "Writer for register MODEM" ] pub type W = crate :: W < u8 , super :: MODEM > ; # [ doc = "Register MODEM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MODEM { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter clear-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXCTSE_A { # [ doc = "0: CTS has no effect on the transmitter." ] _0 , # [ doc = "1: Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] _1 } impl From < TXCTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXCTSE_A ) -> Self { match variant { TXCTSE_A :: _0 => false , TXCTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXCTSE`" ] pub type TXCTSE_R = crate :: R < bool , TXCTSE_A > ; impl TXCTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXCTSE_A { match self . bits { false => TXCTSE_A :: _0 , true => TXCTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXCTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXCTSE_A :: _1 } } # [ doc = "Write proxy for field `TXCTSE`" ] pub struct TXCTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXCTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXCTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CTS has no effect on the transmitter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _0 ) } # [ doc = "Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSE_A { # [ doc = "0: The transmitter has no effect on RTS." ] _0 , # [ doc = "1: When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] _1 } impl From < TXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSE_A ) -> Self { match variant { TXRTSE_A :: _0 => false , TXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSE`" ] pub type TXRTSE_R = crate :: R < bool , TXRTSE_A > ; impl TXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSE_A { match self . bits { false => TXRTSE_A :: _0 , true => TXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSE_A :: _1 } } # [ doc = "Write proxy for field `TXRTSE`" ] pub struct TXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The transmitter has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _0 ) } # [ doc = "When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Transmitter request-to-send polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSPOL_A { # [ doc = "0: Transmitter RTS is active low." ] _0 , # [ doc = "1: Transmitter RTS is active high." ] _1 } impl From < TXRTSPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSPOL_A ) -> Self { match variant { TXRTSPOL_A :: _0 => false , TXRTSPOL_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSPOL`" ] pub type TXRTSPOL_R = crate :: R < bool , TXRTSPOL_A > ; impl TXRTSPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSPOL_A { match self . bits { false => TXRTSPOL_A :: _0 , true => TXRTSPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSPOL_A :: _1 } } # [ doc = "Write proxy for field `TXRTSPOL`" ] pub struct TXRTSPOL_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter RTS is active low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _0 ) } # [ doc = "Transmitter RTS is active high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXRTSE_A { # [ doc = "0: The receiver has no effect on RTS." ] _0 , # [ doc = "1: RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] _1 } impl From < RXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXRTSE_A ) -> Self { match variant { RXRTSE_A :: _0 => false , RXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `RXRTSE`" ] pub type RXRTSE_R = crate :: R < bool , RXRTSE_A > ; impl RXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXRTSE_A { match self . bits { false => RXRTSE_A :: _0 , true => RXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXRTSE_A :: _1 } } # [ doc = "Write proxy for field `RXRTSE`" ] pub struct RXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > RXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The receiver has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _0 ) } # [ doc = "RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & self ) -> TXCTSE_R { TXCTSE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & self ) -> TXRTSE_R { TXRTSE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & self ) -> TXRTSPOL_R { TXRTSPOL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & self ) -> RXRTSE_R { RXRTSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & mut self ) -> TXCTSE_W { TXCTSE_W { w : self } } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & mut self ) -> TXRTSE_W { TXRTSE_W { w : self } } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & mut self ) -> TXRTSPOL_W { TXRTSPOL_W { w : self } } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & mut self ) -> RXRTSE_W { RXRTSE_W { w : self } } } } # [ doc = "UART Infrared Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ir](ir) module" ] pub type IR = crate :: Reg < u8 , _IR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IR ; # [ doc = "`read()` method returns [ir::R](ir::R) reader structure" ] impl crate :: Readable for IR { } # [ doc = "`write(|w| ..)` method takes [ir::W](ir::W) writer structure" ] impl crate :: Writable for IR { } # [ doc = "UART Infrared Register" ] pub mod ir { # [ doc = "Reader of register IR" ] pub type R = crate :: R < u8 , super :: IR > ; # [ doc = "Writer for register IR" ] pub type W = crate :: W < u8 , super :: IR > ; # [ doc = "Register IR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter narrow pulse\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TNP_A { # [ doc = "0: 3/16." ] _00 , # [ doc = "1: 1/16." ] _01 , # [ doc = "2: 1/32." ] _10 , # [ doc = "3: 1/4." ] _11 } impl From < TNP_A > for u8 { # [ inline ( always ) ] fn from ( variant : TNP_A ) -> Self { match variant { TNP_A :: _00 => 0 , TNP_A :: _01 => 1 , TNP_A :: _10 => 2 , TNP_A :: _11 => 3 } } } # [ doc = "Reader of field `TNP`" ] pub type TNP_R = crate :: R < u8 , TNP_A > ; impl TNP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TNP_A { match self . bits { 0 => TNP_A :: _00 , 1 => TNP_A :: _01 , 2 => TNP_A :: _10 , 3 => TNP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TNP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TNP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TNP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TNP_A :: _11 } } # [ doc = "Write proxy for field `TNP`" ] pub struct TNP_W < 'a > { w : & 'a mut W , } impl < 'a > TNP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TNP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "3/16." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _00 ) } # [ doc = "1/16." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _01 ) } # [ doc = "1/32." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _10 ) } # [ doc = "1/4." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Infrared enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREN_A { # [ doc = "0: IR disabled." ] _0 , # [ doc = "1: IR enabled." ] _1 } impl From < IREN_A > for bool { # [ inline ( always ) ] fn from ( variant : IREN_A ) -> Self { match variant { IREN_A :: _0 => false , IREN_A :: _1 => true } } } # [ doc = "Reader of field `IREN`" ] pub type IREN_R = crate :: R < bool , IREN_A > ; impl IREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREN_A { match self . bits { false => IREN_A :: _0 , true => IREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREN_A :: _1 } } # [ doc = "Write proxy for field `IREN`" ] pub struct IREN_W < 'a > { w : & 'a mut W , } impl < 'a > IREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IR disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _0 ) } # [ doc = "IR enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & self ) -> TNP_R { TNP_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & self ) -> IREN_R { IREN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & mut self ) -> TNP_W { TNP_W { w : self } } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & mut self ) -> IREN_W { IREN_W { w : self } } } } # [ doc = "UART FIFO Parameters\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pfifo](pfifo) module" ] pub type PFIFO = crate :: Reg < u8 , _PFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PFIFO ; # [ doc = "`read()` method returns [pfifo::R](pfifo::R) reader structure" ] impl crate :: Readable for PFIFO { } # [ doc = "`write(|w| ..)` method takes [pfifo::W](pfifo::W) writer structure" ] impl crate :: Writable for PFIFO { } # [ doc = "UART FIFO Parameters" ] pub mod pfifo { # [ doc = "Reader of register PFIFO" ] pub type R = crate :: R < u8 , super :: PFIFO > ; # [ doc = "Writer for register PFIFO" ] pub type W = crate :: W < u8 , super :: PFIFO > ; # [ doc = "Register PFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFIFOSIZE_A { # [ doc = "0: Receive FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Receive FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Receive FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Receive FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Receive FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Receive FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Receive FIFO/Buffer depth = 128 datawords." ] _110 } impl From < RXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : RXFIFOSIZE_A ) -> Self { match variant { RXFIFOSIZE_A :: _000 => 0 , RXFIFOSIZE_A :: _001 => 1 , RXFIFOSIZE_A :: _010 => 2 , RXFIFOSIZE_A :: _011 => 3 , RXFIFOSIZE_A :: _100 => 4 , RXFIFOSIZE_A :: _101 => 5 , RXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `RXFIFOSIZE`" ] pub type RXFIFOSIZE_R = crate :: R < u8 , RXFIFOSIZE_A > ; impl RXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RXFIFOSIZE_A :: _000 ) , 1 => Val ( RXFIFOSIZE_A :: _001 ) , 2 => Val ( RXFIFOSIZE_A :: _010 ) , 3 => Val ( RXFIFOSIZE_A :: _011 ) , 4 => Val ( RXFIFOSIZE_A :: _100 ) , 5 => Val ( RXFIFOSIZE_A :: _101 ) , 6 => Val ( RXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _110 } } # [ doc = "Receive FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFE_A { # [ doc = "0: Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] _0 , # [ doc = "1: Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] _1 } impl From < RXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXFE_A ) -> Self { match variant { RXFE_A :: _0 => false , RXFE_A :: _1 => true } } } # [ doc = "Reader of field `RXFE`" ] pub type RXFE_R = crate :: R < bool , RXFE_A > ; impl RXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXFE_A { match self . bits { false => RXFE_A :: _0 , true => RXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXFE_A :: _1 } } # [ doc = "Write proxy for field `RXFE`" ] pub struct RXFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _0 ) } # [ doc = "Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFIFOSIZE_A { # [ doc = "0: Transmit FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Transmit FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Transmit FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Transmit FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Transmit FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Transmit FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Transmit FIFO/Buffer depth = 128 datawords." ] _110 } impl From < TXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXFIFOSIZE_A ) -> Self { match variant { TXFIFOSIZE_A :: _000 => 0 , TXFIFOSIZE_A :: _001 => 1 , TXFIFOSIZE_A :: _010 => 2 , TXFIFOSIZE_A :: _011 => 3 , TXFIFOSIZE_A :: _100 => 4 , TXFIFOSIZE_A :: _101 => 5 , TXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `TXFIFOSIZE`" ] pub type TXFIFOSIZE_R = crate :: R < u8 , TXFIFOSIZE_A > ; impl TXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TXFIFOSIZE_A :: _000 ) , 1 => Val ( TXFIFOSIZE_A :: _001 ) , 2 => Val ( TXFIFOSIZE_A :: _010 ) , 3 => Val ( TXFIFOSIZE_A :: _011 ) , 4 => Val ( TXFIFOSIZE_A :: _100 ) , 5 => Val ( TXFIFOSIZE_A :: _101 ) , 6 => Val ( TXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _110 } } # [ doc = "Transmit FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFE_A { # [ doc = "0: Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] _0 , # [ doc = "1: Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] _1 } impl From < TXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXFE_A ) -> Self { match variant { TXFE_A :: _0 => false , TXFE_A :: _1 => true } } } # [ doc = "Reader of field `TXFE`" ] pub type TXFE_R = crate :: R < bool , TXFE_A > ; impl TXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXFE_A { match self . bits { false => TXFE_A :: _0 , true => TXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXFE_A :: _1 } } # [ doc = "Write proxy for field `TXFE`" ] pub struct TXFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _0 ) } # [ doc = "Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Receive FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn rxfifosize ( & self ) -> RXFIFOSIZE_R { RXFIFOSIZE_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & self ) -> RXFE_R { RXFE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:6 - Transmit FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn txfifosize ( & self ) -> TXFIFOSIZE_R { TXFIFOSIZE_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & self ) -> TXFE_R { TXFE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & mut self ) -> RXFE_W { RXFE_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & mut self ) -> TXFE_W { TXFE_W { w : self } } } } # [ doc = "UART FIFO Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfifo](cfifo) module" ] pub type CFIFO = crate :: Reg < u8 , _CFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFIFO ; # [ doc = "`read()` method returns [cfifo::R](cfifo::R) reader structure" ] impl crate :: Readable for CFIFO { } # [ doc = "`write(|w| ..)` method takes [cfifo::W](cfifo::W) writer structure" ] impl crate :: Writable for CFIFO { } # [ doc = "UART FIFO Control Register" ] pub mod cfifo { # [ doc = "Reader of register CFIFO" ] pub type R = crate :: R < u8 , super :: CFIFO > ; # [ doc = "Writer for register CFIFO" ] pub type W = crate :: W < u8 , super :: CFIFO > ; # [ doc = "Register CFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO Underflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUFE_A { # [ doc = "0: RXUF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXUF flag generates an interrupt to the host." ] _1 } impl From < RXUFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUFE_A ) -> Self { match variant { RXUFE_A :: _0 => false , RXUFE_A :: _1 => true } } } # [ doc = "Reader of field `RXUFE`" ] pub type RXUFE_R = crate :: R < bool , RXUFE_A > ; impl RXUFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUFE_A { match self . bits { false => RXUFE_A :: _0 , true => RXUFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUFE_A :: _1 } } # [ doc = "Write proxy for field `RXUFE`" ] pub struct RXUFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXUFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXUF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _0 ) } # [ doc = "RXUF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmit FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOFE_A { # [ doc = "0: TXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: TXOF flag generates an interrupt to the host." ] _1 } impl From < TXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOFE_A ) -> Self { match variant { TXOFE_A :: _0 => false , TXOFE_A :: _1 => true } } } # [ doc = "Reader of field `TXOFE`" ] pub type TXOFE_R = crate :: R < bool , TXOFE_A > ; impl TXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOFE_A { match self . bits { false => TXOFE_A :: _0 , true => TXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOFE_A :: _1 } } # [ doc = "Write proxy for field `TXOFE`" ] pub struct TXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _0 ) } # [ doc = "TXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receive FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOFE_A { # [ doc = "0: RXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXOF flag generates an interrupt to the host." ] _1 } impl From < RXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOFE_A ) -> Self { match variant { RXOFE_A :: _0 => false , RXOFE_A :: _1 => true } } } # [ doc = "Reader of field `RXOFE`" ] pub type RXOFE_R = crate :: R < bool , RXOFE_A > ; impl RXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOFE_A { match self . bits { false => RXOFE_A :: _0 , true => RXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOFE_A :: _1 } } # [ doc = "Write proxy for field `RXOFE`" ] pub struct RXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _0 ) } # [ doc = "RXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the receive FIFO/buffer is cleared out." ] _1 } impl From < RXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : RXFLUSH_AW ) -> Self { match variant { RXFLUSH_AW :: _0 => false , RXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `RXFLUSH`" ] pub struct RXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > RXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _0 ) } # [ doc = "All data in the receive FIFO/buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmit FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the transmit FIFO/Buffer is cleared out." ] _1 } impl From < TXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : TXFLUSH_AW ) -> Self { match variant { TXFLUSH_AW :: _0 => false , TXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `TXFLUSH`" ] pub struct TXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > TXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _0 ) } # [ doc = "All data in the transmit FIFO/Buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & self ) -> RXUFE_R { RXUFE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & self ) -> TXOFE_R { TXOFE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & self ) -> RXOFE_R { RXOFE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & mut self ) -> RXUFE_W { RXUFE_W { w : self } } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & mut self ) -> TXOFE_W { TXOFE_W { w : self } } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & mut self ) -> RXOFE_W { RXOFE_W { w : self } } # [ doc = "Bit 6 - Receive FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn rxflush ( & mut self ) -> RXFLUSH_W { RXFLUSH_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn txflush ( & mut self ) -> TXFLUSH_W { TXFLUSH_W { w : self } } } } # [ doc = "UART FIFO Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sfifo](sfifo) module" ] pub type SFIFO = crate :: Reg < u8 , _SFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SFIFO ; # [ doc = "`read()` method returns [sfifo::R](sfifo::R) reader structure" ] impl crate :: Readable for SFIFO { } # [ doc = "`write(|w| ..)` method takes [sfifo::W](sfifo::W) writer structure" ] impl crate :: Writable for SFIFO { } # [ doc = "UART FIFO Status Register" ] pub mod sfifo { # [ doc = "Reader of register SFIFO" ] pub type R = crate :: R < u8 , super :: SFIFO > ; # [ doc = "Writer for register SFIFO" ] pub type W = crate :: W < u8 , super :: SFIFO > ; # [ doc = "Register SFIFO `reset()`'s with value 0xc0" ] impl crate :: ResetValue for super :: SFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc0 } } # [ doc = "Receiver Buffer Underflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUF_A { # [ doc = "0: No receive buffer underflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer underflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXUF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUF_A ) -> Self { match variant { RXUF_A :: _0 => false , RXUF_A :: _1 => true } } } # [ doc = "Reader of field `RXUF`" ] pub type RXUF_R = crate :: R < bool , RXUF_A > ; impl RXUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUF_A { match self . bits { false => RXUF_A :: _0 , true => RXUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUF_A :: _1 } } # [ doc = "Write proxy for field `RXUF`" ] pub struct RXUF_W < 'a > { w : & 'a mut W , } impl < 'a > RXUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _0 ) } # [ doc = "At least one receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOF_A { # [ doc = "0: No transmit buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < TXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOF_A ) -> Self { match variant { TXOF_A :: _0 => false , TXOF_A :: _1 => true } } } # [ doc = "Reader of field `TXOF`" ] pub type TXOF_R = crate :: R < bool , TXOF_A > ; impl TXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOF_A { match self . bits { false => TXOF_A :: _0 , true => TXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOF_A :: _1 } } # [ doc = "Write proxy for field `TXOF`" ] pub struct TXOF_W < 'a > { w : & 'a mut W , } impl < 'a > TXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _0 ) } # [ doc = "At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOF_A { # [ doc = "0: No receive buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOF_A ) -> Self { match variant { RXOF_A :: _0 => false , RXOF_A :: _1 => true } } } # [ doc = "Reader of field `RXOF`" ] pub type RXOF_R = crate :: R < bool , RXOF_A > ; impl RXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOF_A { match self . bits { false => RXOF_A :: _0 , true => RXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOF_A :: _1 } } # [ doc = "Write proxy for field `RXOF`" ] pub struct RXOF_W < 'a > { w : & 'a mut W , } impl < 'a > RXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _0 ) } # [ doc = "At least one receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEMPT_A { # [ doc = "0: Receive buffer is not empty." ] _0 , # [ doc = "1: Receive buffer is empty." ] _1 } impl From < RXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEMPT_A ) -> Self { match variant { RXEMPT_A :: _0 => false , RXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `RXEMPT`" ] pub type RXEMPT_R = crate :: R < bool , RXEMPT_A > ; impl RXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEMPT_A { match self . bits { false => RXEMPT_A :: _0 , true => RXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEMPT_A :: _1 } } # [ doc = "Transmit Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXEMPT_A { # [ doc = "0: Transmit buffer is not empty." ] _0 , # [ doc = "1: Transmit buffer is empty." ] _1 } impl From < TXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : TXEMPT_A ) -> Self { match variant { TXEMPT_A :: _0 => false , TXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `TXEMPT`" ] pub type TXEMPT_R = crate :: R < bool , TXEMPT_A > ; impl TXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXEMPT_A { match self . bits { false => TXEMPT_A :: _0 , true => TXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXEMPT_A :: _1 } } impl R { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & self ) -> RXUF_R { RXUF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & self ) -> TXOF_R { TXOF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & self ) -> RXOF_R { RXOF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Receive Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn rxempt ( & self ) -> RXEMPT_R { RXEMPT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn txempt ( & self ) -> TXEMPT_R { TXEMPT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & mut self ) -> RXUF_W { RXUF_W { w : self } } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & mut self ) -> TXOF_W { TXOF_W { w : self } } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & mut self ) -> RXOF_W { RXOF_W { w : self } } } } # [ doc = "UART FIFO Transmit Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [twfifo](twfifo) module" ] pub type TWFIFO = crate :: Reg < u8 , _TWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TWFIFO ; # [ doc = "`read()` method returns [twfifo::R](twfifo::R) reader structure" ] impl crate :: Readable for TWFIFO { } # [ doc = "`write(|w| ..)` method takes [twfifo::W](twfifo::W) writer structure" ] impl crate :: Writable for TWFIFO { } # [ doc = "UART FIFO Transmit Watermark" ] pub mod twfifo { # [ doc = "Reader of register TWFIFO" ] pub type R = crate :: R < u8 , super :: TWFIFO > ; # [ doc = "Writer for register TWFIFO" ] pub type W = crate :: W < u8 , super :: TWFIFO > ; # [ doc = "Register TWFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXWATER`" ] pub type TXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXWATER`" ] pub struct TXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > TXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & self ) -> TXWATER_R { TXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & mut self ) -> TXWATER_W { TXWATER_W { w : self } } } } # [ doc = "UART FIFO Transmit Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcfifo](tcfifo) module" ] pub type TCFIFO = crate :: Reg < u8 , _TCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCFIFO ; # [ doc = "`read()` method returns [tcfifo::R](tcfifo::R) reader structure" ] impl crate :: Readable for TCFIFO { } # [ doc = "UART FIFO Transmit Count" ] pub mod tcfifo { # [ doc = "Reader of register TCFIFO" ] pub type R = crate :: R < u8 , super :: TCFIFO > ; # [ doc = "Reader of field `TXCOUNT`" ] pub type TXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Transmit Counter" ] # [ inline ( always ) ] pub fn txcount ( & self ) -> TXCOUNT_R { TXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "UART FIFO Receive Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rwfifo](rwfifo) module" ] pub type RWFIFO = crate :: Reg < u8 , _RWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RWFIFO ; # [ doc = "`read()` method returns [rwfifo::R](rwfifo::R) reader structure" ] impl crate :: Readable for RWFIFO { } # [ doc = "`write(|w| ..)` method takes [rwfifo::W](rwfifo::W) writer structure" ] impl crate :: Writable for RWFIFO { } # [ doc = "UART FIFO Receive Watermark" ] pub mod rwfifo { # [ doc = "Reader of register RWFIFO" ] pub type R = crate :: R < u8 , super :: RWFIFO > ; # [ doc = "Writer for register RWFIFO" ] pub type W = crate :: W < u8 , super :: RWFIFO > ; # [ doc = "Register RWFIFO `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: RWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Reader of field `RXWATER`" ] pub type RXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXWATER`" ] pub struct RXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > RXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & self ) -> RXWATER_R { RXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & mut self ) -> RXWATER_W { RXWATER_W { w : self } } } } # [ doc = "UART FIFO Receive Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcfifo](rcfifo) module" ] pub type RCFIFO = crate :: Reg < u8 , _RCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCFIFO ; # [ doc = "`read()` method returns [rcfifo::R](rcfifo::R) reader structure" ] impl crate :: Readable for RCFIFO { } # [ doc = "UART FIFO Receive Count" ] pub mod rcfifo { # [ doc = "Reader of register RCFIFO" ] pub type R = crate :: R < u8 , super :: RCFIFO > ; # [ doc = "Reader of field `RXCOUNT`" ] pub type RXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Receive Counter" ] # [ inline ( always ) ] pub fn rxcount ( & self ) -> RXCOUNT_R { RXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } } # [ doc = "Serial Communication Interface" ] pub struct UART4 { _marker : PhantomData < * const ( ) > } unsafe impl Send for UART4 { } impl UART4 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const uart4 :: RegisterBlock { 0x400e_a000 as * const _ } } impl Deref for UART4 { type Target = uart4 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * UART4 :: ptr ( ) } } } # [ doc = "Serial Communication Interface" ] pub mod uart4 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - UART Baud Rate Registers: High" ] pub bdh : BDH , # [ doc = "0x01 - UART Baud Rate Registers: Low" ] pub bdl : BDL , # [ doc = "0x02 - UART Control Register 1" ] pub c1 : C1 , # [ doc = "0x03 - UART Control Register 2" ] pub c2 : C2 , # [ doc = "0x04 - UART Status Register 1" ] pub s1 : S1 , # [ doc = "0x05 - UART Status Register 2" ] pub s2 : S2 , # [ doc = "0x06 - UART Control Register 3" ] pub c3 : C3 , # [ doc = "0x07 - UART Data Register" ] pub d : D , # [ doc = "0x08 - UART Match Address Registers 1" ] pub ma1 : MA1 , # [ doc = "0x09 - UART Match Address Registers 2" ] pub ma2 : MA2 , # [ doc = "0x0a - UART Control Register 4" ] pub c4 : C4 , # [ doc = "0x0b - UART Control Register 5" ] pub c5 : C5 , # [ doc = "0x0c - UART Extended Data Register" ] pub ed : ED , # [ doc = "0x0d - UART Modem Register" ] pub modem : MODEM , # [ doc = "0x0e - UART Infrared Register" ] pub ir : IR , _reserved15 : [ u8 ; 1usize ] , # [ doc = "0x10 - UART FIFO Parameters" ] pub pfifo : PFIFO , # [ doc = "0x11 - UART FIFO Control Register" ] pub cfifo : CFIFO , # [ doc = "0x12 - UART FIFO Status Register" ] pub sfifo : SFIFO , # [ doc = "0x13 - UART FIFO Transmit Watermark" ] pub twfifo : TWFIFO , # [ doc = "0x14 - UART FIFO Transmit Count" ] pub tcfifo : TCFIFO , # [ doc = "0x15 - UART FIFO Receive Watermark" ] pub rwfifo : RWFIFO , # [ doc = "0x16 - UART FIFO Receive Count" ] pub rcfifo : RCFIFO , } # [ doc = "UART Baud Rate Registers: High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdh](bdh) module" ] pub type BDH = crate :: Reg < u8 , _BDH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDH ; # [ doc = "`read()` method returns [bdh::R](bdh::R) reader structure" ] impl crate :: Readable for BDH { } # [ doc = "`write(|w| ..)` method takes [bdh::W](bdh::W) writer structure" ] impl crate :: Writable for BDH { } # [ doc = "UART Baud Rate Registers: High" ] pub mod bdh { # [ doc = "Reader of register BDH" ] pub type R = crate :: R < u8 , super :: BDH > ; # [ doc = "Writer for register BDH" ] pub type W = crate :: W < u8 , super :: BDH > ; # [ doc = "Register BDH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BDH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Stop Bit Number Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBNS_A { # [ doc = "0: Data frame consists of a single stop bit." ] _0 , # [ doc = "1: Data frame consists of two stop bits." ] _1 } impl From < SBNS_A > for bool { # [ inline ( always ) ] fn from ( variant : SBNS_A ) -> Self { match variant { SBNS_A :: _0 => false , SBNS_A :: _1 => true } } } # [ doc = "Reader of field `SBNS`" ] pub type SBNS_R = crate :: R < bool , SBNS_A > ; impl SBNS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBNS_A { match self . bits { false => SBNS_A :: _0 , true => SBNS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBNS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBNS_A :: _1 } } # [ doc = "Write proxy for field `SBNS`" ] pub struct SBNS_W < 'a > { w : & 'a mut W , } impl < 'a > SBNS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBNS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data frame consists of a single stop bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _0 ) } # [ doc = "Data frame consists of two stop bits." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Input Active Edge Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIE_A { # [ doc = "0: Hardware interrupts from RXEDGIF disabled using polling." ] _0 , # [ doc = "1: RXEDGIF interrupt request enabled." ] _1 } impl From < RXEDGIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIE_A ) -> Self { match variant { RXEDGIE_A :: _0 => false , RXEDGIE_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIE`" ] pub type RXEDGIE_R = crate :: R < bool , RXEDGIE_A > ; impl RXEDGIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIE_A { match self . bits { false => RXEDGIE_A :: _0 , true => RXEDGIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIE_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIE`" ] pub struct RXEDGIE_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from RXEDGIF disabled using polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _0 ) } # [ doc = "RXEDGIF interrupt request enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIE_A { # [ doc = "0: LBKDIF interrupt requests disabled." ] _0 , # [ doc = "1: LBKDIF interrupt requests enabled." ] _1 } impl From < LBKDIE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIE_A ) -> Self { match variant { LBKDIE_A :: _0 => false , LBKDIE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIE`" ] pub type LBKDIE_R = crate :: R < bool , LBKDIE_A > ; impl LBKDIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIE_A { match self . bits { false => LBKDIE_A :: _0 , true => LBKDIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIE_A :: _1 } } # [ doc = "Write proxy for field `LBKDIE`" ] pub struct LBKDIE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LBKDIF interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _0 ) } # [ doc = "LBKDIF interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & self ) -> SBNS_R { SBNS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & self ) -> RXEDGIE_R { RXEDGIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & self ) -> LBKDIE_R { LBKDIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } # [ doc = "Bit 5 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & mut self ) -> SBNS_W { SBNS_W { w : self } } # [ doc = "Bit 6 - RxD Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & mut self ) -> RXEDGIE_W { RXEDGIE_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & mut self ) -> LBKDIE_W { LBKDIE_W { w : self } } } } # [ doc = "UART Baud Rate Registers: Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdl](bdl) module" ] pub type BDL = crate :: Reg < u8 , _BDL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDL ; # [ doc = "`read()` method returns [bdl::R](bdl::R) reader structure" ] impl crate :: Readable for BDL { } # [ doc = "`write(|w| ..)` method takes [bdl::W](bdl::W) writer structure" ] impl crate :: Writable for BDL { } # [ doc = "UART Baud Rate Registers: Low" ] pub mod bdl { # [ doc = "Reader of register BDL" ] pub type R = crate :: R < u8 , super :: BDL > ; # [ doc = "Writer for register BDL" ] pub type W = crate :: W < u8 , super :: BDL > ; # [ doc = "Register BDL `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: BDL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - UART Baud Rate Bits" ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } } } # [ doc = "UART Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "UART Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PT_A { # [ doc = "0: Even parity." ] _0 , # [ doc = "1: Odd parity." ] _1 } impl From < PT_A > for bool { # [ inline ( always ) ] fn from ( variant : PT_A ) -> Self { match variant { PT_A :: _0 => false , PT_A :: _1 => true } } } # [ doc = "Reader of field `PT`" ] pub type PT_R = crate :: R < bool , PT_A > ; impl PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PT_A { match self . bits { false => PT_A :: _0 , true => PT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PT_A :: _1 } } # [ doc = "Write proxy for field `PT`" ] pub struct PT_W < 'a > { w : & 'a mut W , } impl < 'a > PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Even parity." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PT_A :: _0 ) } # [ doc = "Odd parity." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PT_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Parity Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: Parity function disabled." ] _0 , # [ doc = "1: Parity function enabled." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Parity function disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Parity function enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Idle Line Type Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILT_A { # [ doc = "0: Idle character bit count starts after start bit." ] _0 , # [ doc = "1: Idle character bit count starts after stop bit." ] _1 } impl From < ILT_A > for bool { # [ inline ( always ) ] fn from ( variant : ILT_A ) -> Self { match variant { ILT_A :: _0 => false , ILT_A :: _1 => true } } } # [ doc = "Reader of field `ILT`" ] pub type ILT_R = crate :: R < bool , ILT_A > ; impl ILT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILT_A { match self . bits { false => ILT_A :: _0 , true => ILT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILT_A :: _1 } } # [ doc = "Write proxy for field `ILT`" ] pub struct ILT_W < 'a > { w : & 'a mut W , } impl < 'a > ILT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle character bit count starts after start bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _0 ) } # [ doc = "Idle character bit count starts after stop bit." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver Wakeup Method Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKE_A { # [ doc = "0: Idle line wakeup." ] _0 , # [ doc = "1: Address mark wakeup." ] _1 } impl From < WAKE_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKE_A ) -> Self { match variant { WAKE_A :: _0 => false , WAKE_A :: _1 => true } } } # [ doc = "Reader of field `WAKE`" ] pub type WAKE_R = crate :: R < bool , WAKE_A > ; impl WAKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKE_A { match self . bits { false => WAKE_A :: _0 , true => WAKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKE_A :: _1 } } # [ doc = "Write proxy for field `WAKE`" ] pub struct WAKE_W < 'a > { w : & 'a mut W , } impl < 'a > WAKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle line wakeup." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _0 ) } # [ doc = "Address mark wakeup." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "9-bit or 8-bit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M_A { # [ doc = "0: Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] _0 , # [ doc = "1: Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] _1 } impl From < M_A > for bool { # [ inline ( always ) ] fn from ( variant : M_A ) -> Self { match variant { M_A :: _0 => false , M_A :: _1 => true } } } # [ doc = "Reader of field `M`" ] pub type M_R = crate :: R < bool , M_A > ; impl M_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M_A { match self . bits { false => M_A :: _0 , true => M_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M_A :: _1 } } # [ doc = "Write proxy for field `M`" ] pub struct M_W < 'a > { w : & 'a mut W , } impl < 'a > M_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M_A :: _0 ) } # [ doc = "Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSRC_A { # [ doc = "0: Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] _0 , # [ doc = "1: Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] _1 } impl From < RSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : RSRC_A ) -> Self { match variant { RSRC_A :: _0 => false , RSRC_A :: _1 => true } } } # [ doc = "Reader of field `RSRC`" ] pub type RSRC_R = crate :: R < bool , RSRC_A > ; impl RSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSRC_A { match self . bits { false => RSRC_A :: _0 , true => RSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RSRC_A :: _1 } } # [ doc = "Write proxy for field `RSRC`" ] pub struct RSRC_W < 'a > { w : & 'a mut W , } impl < 'a > RSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Selects internal loop back mode. The receiver input is internally connected to transmitter output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _0 ) } # [ doc = "Single wire UART mode where the receiver input is connected to the transmit pin input signal." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "UART Stops in Wait Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UARTSWAI_A { # [ doc = "0: UART clock continues to run in Wait mode." ] _0 , # [ doc = "1: UART clock freezes while CPU is in Wait mode." ] _1 } impl From < UARTSWAI_A > for bool { # [ inline ( always ) ] fn from ( variant : UARTSWAI_A ) -> Self { match variant { UARTSWAI_A :: _0 => false , UARTSWAI_A :: _1 => true } } } # [ doc = "Reader of field `UARTSWAI`" ] pub type UARTSWAI_R = crate :: R < bool , UARTSWAI_A > ; impl UARTSWAI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UARTSWAI_A { match self . bits { false => UARTSWAI_A :: _0 , true => UARTSWAI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UARTSWAI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UARTSWAI_A :: _1 } } # [ doc = "Write proxy for field `UARTSWAI`" ] pub struct UARTSWAI_W < 'a > { w : & 'a mut W , } impl < 'a > UARTSWAI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UARTSWAI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "UART clock continues to run in Wait mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _0 ) } # [ doc = "UART clock freezes while CPU is in Wait mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UARTSWAI_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Loop Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] _1 } impl From < LOOPS_A > for bool { # [ inline ( always ) ] fn from ( variant : LOOPS_A ) -> Self { match variant { LOOPS_A :: _0 => false , LOOPS_A :: _1 => true } } } # [ doc = "Reader of field `LOOPS`" ] pub type LOOPS_R = crate :: R < bool , LOOPS_A > ; impl LOOPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOOPS_A { match self . bits { false => LOOPS_A :: _0 , true => LOOPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOOPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOOPS_A :: _1 } } # [ doc = "Write proxy for field `LOOPS`" ] pub struct LOOPS_W < 'a > { w : & 'a mut W , } impl < 'a > LOOPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOOPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _0 ) } # [ doc = "Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & self ) -> PT_R { PT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & self ) -> ILT_R { ILT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & self ) -> WAKE_R { WAKE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & self ) -> M_R { M_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & self ) -> RSRC_R { RSRC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & self ) -> UARTSWAI_R { UARTSWAI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & self ) -> LOOPS_R { LOOPS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & mut self ) -> PT_W { PT_W { w : self } } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & mut self ) -> ILT_W { ILT_W { w : self } } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & mut self ) -> WAKE_W { WAKE_W { w : self } } # [ doc = "Bit 4 - 9-bit or 8-bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & mut self ) -> M_W { M_W { w : self } } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & mut self ) -> RSRC_W { RSRC_W { w : self } } # [ doc = "Bit 6 - UART Stops in Wait Mode" ] # [ inline ( always ) ] pub fn uartswai ( & mut self ) -> UARTSWAI_W { UARTSWAI_W { w : self } } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & mut self ) -> LOOPS_W { LOOPS_W { w : self } } } } # [ doc = "UART Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "UART Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Send Break\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBK_A { # [ doc = "0: Normal transmitter operation." ] _0 , # [ doc = "1: Queue break characters to be sent." ] _1 } impl From < SBK_A > for bool { # [ inline ( always ) ] fn from ( variant : SBK_A ) -> Self { match variant { SBK_A :: _0 => false , SBK_A :: _1 => true } } } # [ doc = "Reader of field `SBK`" ] pub type SBK_R = crate :: R < bool , SBK_A > ; impl SBK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBK_A { match self . bits { false => SBK_A :: _0 , true => SBK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBK_A :: _1 } } # [ doc = "Write proxy for field `SBK`" ] pub struct SBK_W < 'a > { w : & 'a mut W , } impl < 'a > SBK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal transmitter operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _0 ) } # [ doc = "Queue break characters to be sent." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Receiver Wakeup Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWU_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] _1 } impl From < RWU_A > for bool { # [ inline ( always ) ] fn from ( variant : RWU_A ) -> Self { match variant { RWU_A :: _0 => false , RWU_A :: _1 => true } } } # [ doc = "Reader of field `RWU`" ] pub type RWU_R = crate :: R < bool , RWU_A > ; impl RWU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWU_A { match self . bits { false => RWU_A :: _0 , true => RWU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWU_A :: _1 } } # [ doc = "Write proxy for field `RWU`" ] pub struct RWU_W < 'a > { w : & 'a mut W , } impl < 'a > RWU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _0 ) } # [ doc = "RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RE_A { # [ doc = "0: Receiver off." ] _0 , # [ doc = "1: Receiver on." ] _1 } impl From < RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RE_A ) -> Self { match variant { RE_A :: _0 => false , RE_A :: _1 => true } } } # [ doc = "Reader of field `RE`" ] pub type RE_R = crate :: R < bool , RE_A > ; impl RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RE_A { match self . bits { false => RE_A :: _0 , true => RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RE_A :: _1 } } # [ doc = "Write proxy for field `RE`" ] pub struct RE_W < 'a > { w : & 'a mut W , } impl < 'a > RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RE_A :: _0 ) } # [ doc = "Receiver on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Transmitter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TE_A { # [ doc = "0: Transmitter off." ] _0 , # [ doc = "1: Transmitter on." ] _1 } impl From < TE_A > for bool { # [ inline ( always ) ] fn from ( variant : TE_A ) -> Self { match variant { TE_A :: _0 => false , TE_A :: _1 => true } } } # [ doc = "Reader of field `TE`" ] pub type TE_R = crate :: R < bool , TE_A > ; impl TE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TE_A { match self . bits { false => TE_A :: _0 , true => TE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TE_A :: _1 } } # [ doc = "Write proxy for field `TE`" ] pub struct TE_W < 'a > { w : & 'a mut W , } impl < 'a > TE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TE_A :: _0 ) } # [ doc = "Transmitter on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Idle Line Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILIE_A { # [ doc = "0: IDLE interrupt requests disabled." ] _0 , # [ doc = "1: IDLE interrupt requests enabled." ] _1 } impl From < ILIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ILIE_A ) -> Self { match variant { ILIE_A :: _0 => false , ILIE_A :: _1 => true } } } # [ doc = "Reader of field `ILIE`" ] pub type ILIE_R = crate :: R < bool , ILIE_A > ; impl ILIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILIE_A { match self . bits { false => ILIE_A :: _0 , true => ILIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILIE_A :: _1 } } # [ doc = "Write proxy for field `ILIE`" ] pub struct ILIE_W < 'a > { w : & 'a mut W , } impl < 'a > ILIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IDLE interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _0 ) } # [ doc = "IDLE interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Full Interrupt or DMA Transfer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RIE_A { # [ doc = "0: RDRF interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: RDRF interrupt or DMA transfer requests enabled." ] _1 } impl From < RIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RIE_A ) -> Self { match variant { RIE_A :: _0 => false , RIE_A :: _1 => true } } } # [ doc = "Reader of field `RIE`" ] pub type RIE_R = crate :: R < bool , RIE_A > ; impl RIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RIE_A { match self . bits { false => RIE_A :: _0 , true => RIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RIE_A :: _1 } } # [ doc = "Write proxy for field `RIE`" ] pub struct RIE_W < 'a > { w : & 'a mut W , } impl < 'a > RIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RDRF interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _0 ) } # [ doc = "RDRF interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmission Complete Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCIE_A { # [ doc = "0: TC interrupt requests disabled." ] _0 , # [ doc = "1: TC interrupt requests enabled." ] _1 } impl From < TCIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCIE_A ) -> Self { match variant { TCIE_A :: _0 => false , TCIE_A :: _1 => true } } } # [ doc = "Reader of field `TCIE`" ] pub type TCIE_R = crate :: R < bool , TCIE_A > ; impl TCIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCIE_A { match self . bits { false => TCIE_A :: _0 , true => TCIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCIE_A :: _1 } } # [ doc = "Write proxy for field `TCIE`" ] pub struct TCIE_W < 'a > { w : & 'a mut W , } impl < 'a > TCIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TC interrupt requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _0 ) } # [ doc = "TC interrupt requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmitter Interrupt or DMA Transfer Enable.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: TDRE interrupt and DMA transfer requests disabled." ] _0 , # [ doc = "1: TDRE interrupt or DMA transfer requests enabled." ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TDRE interrupt and DMA transfer requests disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "TDRE interrupt or DMA transfer requests enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & self ) -> SBK_R { SBK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & self ) -> RWU_R { RWU_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & self ) -> RE_R { RE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & self ) -> TE_R { TE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & self ) -> ILIE_R { ILIE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & self ) -> RIE_R { RIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & self ) -> TCIE_R { TCIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & mut self ) -> SBK_W { SBK_W { w : self } } # [ doc = "Bit 1 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & mut self ) -> RWU_W { RWU_W { w : self } } # [ doc = "Bit 2 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & mut self ) -> RE_W { RE_W { w : self } } # [ doc = "Bit 3 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & mut self ) -> TE_W { TE_W { w : self } } # [ doc = "Bit 4 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & mut self ) -> ILIE_W { ILIE_W { w : self } } # [ doc = "Bit 5 - Receiver Full Interrupt or DMA Transfer Enable" ] # [ inline ( always ) ] pub fn rie ( & mut self ) -> RIE_W { RIE_W { w : self } } # [ doc = "Bit 6 - Transmission Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcie ( & mut self ) -> TCIE_W { TCIE_W { w : self } } # [ doc = "Bit 7 - Transmitter Interrupt or DMA Transfer Enable." ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } } } # [ doc = "UART Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s1](s1) module" ] pub type S1 = crate :: Reg < u8 , _S1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S1 ; # [ doc = "`read()` method returns [s1::R](s1::R) reader structure" ] impl crate :: Readable for S1 { } # [ doc = "UART Status Register 1" ] pub mod s1 { # [ doc = "Reader of register S1" ] pub type R = crate :: R < u8 , super :: S1 > ; # [ doc = "Parity Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PF_A { # [ doc = "0: No parity error detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1, then there may be data in the receive buffer what was received with a parity error." ] _0 , # [ doc = "1: At least one dataword was received with a parity error since the last time this flag was cleared." ] _1 } impl From < PF_A > for bool { # [ inline ( always ) ] fn from ( variant : PF_A ) -> Self { match variant { PF_A :: _0 => false , PF_A :: _1 => true } } } # [ doc = "Reader of field `PF`" ] pub type PF_R = crate :: R < bool , PF_A > ; impl PF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PF_A { match self . bits { false => PF_A :: _0 , true => PF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PF_A :: _1 } } # [ doc = "Framing Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FE_A { # [ doc = "0: No framing error detected." ] _0 , # [ doc = "1: Framing error." ] _1 } impl From < FE_A > for bool { # [ inline ( always ) ] fn from ( variant : FE_A ) -> Self { match variant { FE_A :: _0 => false , FE_A :: _1 => true } } } # [ doc = "Reader of field `FE`" ] pub type FE_R = crate :: R < bool , FE_A > ; impl FE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FE_A { match self . bits { false => FE_A :: _0 , true => FE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FE_A :: _1 } } # [ doc = "Noise Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NF_A { # [ doc = "0: No noise detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1 then there may be data in the receiver buffer that was received with noise." ] _0 , # [ doc = "1: At least one dataword was received with noise detected since the last time the flag was cleared." ] _1 } impl From < NF_A > for bool { # [ inline ( always ) ] fn from ( variant : NF_A ) -> Self { match variant { NF_A :: _0 => false , NF_A :: _1 => true } } } # [ doc = "Reader of field `NF`" ] pub type NF_R = crate :: R < bool , NF_A > ; impl NF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NF_A { match self . bits { false => NF_A :: _0 , true => NF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NF_A :: _1 } } # [ doc = "Receiver Overrun Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OR_A { # [ doc = "0: No overrun has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: Overrun has occurred or the overrun flag has not been cleared since the last overrun occurred." ] _1 } impl From < OR_A > for bool { # [ inline ( always ) ] fn from ( variant : OR_A ) -> Self { match variant { OR_A :: _0 => false , OR_A :: _1 => true } } } # [ doc = "Reader of field `OR`" ] pub type OR_R = crate :: R < bool , OR_A > ; impl OR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OR_A { match self . bits { false => OR_A :: _0 , true => OR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OR_A :: _1 } } # [ doc = "Idle Line Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLE_A { # [ doc = "0: Receiver input is either active now or has never become active since the IDLE flag was last cleared." ] _0 , # [ doc = "1: Receiver input has become idle or the flag has not been cleared since it last asserted." ] _1 } impl From < IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLE_A ) -> Self { match variant { IDLE_A :: _0 => false , IDLE_A :: _1 => true } } } # [ doc = "Reader of field `IDLE`" ] pub type IDLE_R = crate :: R < bool , IDLE_A > ; impl IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLE_A { match self . bits { false => IDLE_A :: _0 , true => IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLE_A :: _1 } } # [ doc = "Receive Data Register Full Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDRF_A { # [ doc = "0: The number of datawords in the receive buffer is less than the number indicated by RXWATER." ] _0 , # [ doc = "1: The number of datawords in the receive buffer is equal to or greater than the number indicated by RXWATER at some point in time since this flag was last cleared." ] _1 } impl From < RDRF_A > for bool { # [ inline ( always ) ] fn from ( variant : RDRF_A ) -> Self { match variant { RDRF_A :: _0 => false , RDRF_A :: _1 => true } } } # [ doc = "Reader of field `RDRF`" ] pub type RDRF_R = crate :: R < bool , RDRF_A > ; impl RDRF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDRF_A { match self . bits { false => RDRF_A :: _0 , true => RDRF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDRF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDRF_A :: _1 } } # [ doc = "Transmit Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TC_A { # [ doc = "0: Transmitter active (sending data, a preamble, or a break)." ] _0 , # [ doc = "1: Transmitter idle (transmission activity complete)." ] _1 } impl From < TC_A > for bool { # [ inline ( always ) ] fn from ( variant : TC_A ) -> Self { match variant { TC_A :: _0 => false , TC_A :: _1 => true } } } # [ doc = "Reader of field `TC`" ] pub type TC_R = crate :: R < bool , TC_A > ; impl TC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TC_A { match self . bits { false => TC_A :: _0 , true => TC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TC_A :: _1 } } # [ doc = "Transmit Data Register Empty Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDRE_A { # [ doc = "0: The amount of data in the transmit buffer is greater than the value indicated by TWFIFO\\[TXWATER\\]." ] _0 , # [ doc = "1: The amount of data in the transmit buffer is less than or equal to the value indicated by TWFIFO\\[TXWATER\\] at some point in time since the flag has been cleared." ] _1 } impl From < TDRE_A > for bool { # [ inline ( always ) ] fn from ( variant : TDRE_A ) -> Self { match variant { TDRE_A :: _0 => false , TDRE_A :: _1 => true } } } # [ doc = "Reader of field `TDRE`" ] pub type TDRE_R = crate :: R < bool , TDRE_A > ; impl TDRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDRE_A { match self . bits { false => TDRE_A :: _0 , true => TDRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDRE_A :: _1 } } impl R { # [ doc = "Bit 0 - Parity Error Flag" ] # [ inline ( always ) ] pub fn pf ( & self ) -> PF_R { PF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Flag" ] # [ inline ( always ) ] pub fn fe ( & self ) -> FE_R { FE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Flag" ] # [ inline ( always ) ] pub fn nf ( & self ) -> NF_R { NF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Overrun Flag" ] # [ inline ( always ) ] pub fn or ( & self ) -> OR_R { OR_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Idle Line Flag" ] # [ inline ( always ) ] pub fn idle ( & self ) -> IDLE_R { IDLE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receive Data Register Full Flag" ] # [ inline ( always ) ] pub fn rdrf ( & self ) -> RDRF_R { RDRF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Complete Flag" ] # [ inline ( always ) ] pub fn tc ( & self ) -> TC_R { TC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Data Register Empty Flag" ] # [ inline ( always ) ] pub fn tdre ( & self ) -> TDRE_R { TDRE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Status Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [s2](s2) module" ] pub type S2 = crate :: Reg < u8 , _S2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _S2 ; # [ doc = "`read()` method returns [s2::R](s2::R) reader structure" ] impl crate :: Readable for S2 { } # [ doc = "`write(|w| ..)` method takes [s2::W](s2::W) writer structure" ] impl crate :: Writable for S2 { } # [ doc = "UART Status Register 2" ] pub mod s2 { # [ doc = "Reader of register S2" ] pub type R = crate :: R < u8 , super :: S2 > ; # [ doc = "Writer for register S2" ] pub type W = crate :: W < u8 , super :: S2 > ; # [ doc = "Register S2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: S2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Active Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAF_A { # [ doc = "0: UART receiver idle/inactive waiting for a start bit." ] _0 , # [ doc = "1: UART receiver active, RxD input not idle." ] _1 } impl From < RAF_A > for bool { # [ inline ( always ) ] fn from ( variant : RAF_A ) -> Self { match variant { RAF_A :: _0 => false , RAF_A :: _1 => true } } } # [ doc = "Reader of field `RAF`" ] pub type RAF_R = crate :: R < bool , RAF_A > ; impl RAF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAF_A { match self . bits { false => RAF_A :: _0 , true => RAF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAF_A :: _1 } } # [ doc = "LIN Break Detection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDE_A { # [ doc = "0: Break character detection is disabled." ] _0 , # [ doc = "1: Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] _1 } impl From < LBKDE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDE_A ) -> Self { match variant { LBKDE_A :: _0 => false , LBKDE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDE`" ] pub type LBKDE_R = crate :: R < bool , LBKDE_A > ; impl LBKDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDE_A { match self . bits { false => LBKDE_A :: _0 , true => LBKDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDE_A :: _1 } } # [ doc = "Write proxy for field `LBKDE`" ] pub struct LBKDE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character detection is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _0 ) } # [ doc = "Break character is detected at length of 11 bit times if C1\\[M\\] = 0 or 12 bits time if C1\\[M\\] = 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Break Transmit Character Length\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRK13_A { # [ doc = "0: Break character is 10, 11, or 12 bits long." ] _0 , # [ doc = "1: Break character is 13 or 14 bits long." ] _1 } impl From < BRK13_A > for bool { # [ inline ( always ) ] fn from ( variant : BRK13_A ) -> Self { match variant { BRK13_A :: _0 => false , BRK13_A :: _1 => true } } } # [ doc = "Reader of field `BRK13`" ] pub type BRK13_R = crate :: R < bool , BRK13_A > ; impl BRK13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRK13_A { match self . bits { false => BRK13_A :: _0 , true => BRK13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRK13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRK13_A :: _1 } } # [ doc = "Write proxy for field `BRK13`" ] pub struct BRK13_W < 'a > { w : & 'a mut W , } impl < 'a > BRK13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRK13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character is 10, 11, or 12 bits long." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _0 ) } # [ doc = "Break character is 13 or 14 bits long." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Wakeup Idle Detect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWUID_A { # [ doc = "0: S1\\[IDLE\\] is not set upon detection of an idle character." ] _0 , # [ doc = "1: S1\\[IDLE\\] is set upon detection of an idle character." ] _1 } impl From < RWUID_A > for bool { # [ inline ( always ) ] fn from ( variant : RWUID_A ) -> Self { match variant { RWUID_A :: _0 => false , RWUID_A :: _1 => true } } } # [ doc = "Reader of field `RWUID`" ] pub type RWUID_R = crate :: R < bool , RWUID_A > ; impl RWUID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWUID_A { match self . bits { false => RWUID_A :: _0 , true => RWUID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWUID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWUID_A :: _1 } } # [ doc = "Write proxy for field `RWUID`" ] pub struct RWUID_W < 'a > { w : & 'a mut W , } impl < 'a > RWUID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWUID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "S1\\[IDLE\\] is not set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _0 ) } # [ doc = "S1\\[IDLE\\] is set upon detection of an idle character." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Receive Data Inversion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXINV_A { # [ doc = "0: Receive data is not inverted." ] _0 , # [ doc = "1: Receive data is inverted." ] _1 } impl From < RXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXINV_A ) -> Self { match variant { RXINV_A :: _0 => false , RXINV_A :: _1 => true } } } # [ doc = "Reader of field `RXINV`" ] pub type RXINV_R = crate :: R < bool , RXINV_A > ; impl RXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXINV_A { match self . bits { false => RXINV_A :: _0 , true => RXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXINV_A :: _1 } } # [ doc = "Write proxy for field `RXINV`" ] pub struct RXINV_W < 'a > { w : & 'a mut W , } impl < 'a > RXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _0 ) } # [ doc = "Receive data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Most Significant Bit First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSBF_A { # [ doc = "0: LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] _0 , # [ doc = "1: MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] _1 } impl From < MSBF_A > for bool { # [ inline ( always ) ] fn from ( variant : MSBF_A ) -> Self { match variant { MSBF_A :: _0 => false , MSBF_A :: _1 => true } } } # [ doc = "Reader of field `MSBF`" ] pub type MSBF_R = crate :: R < bool , MSBF_A > ; impl MSBF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSBF_A { match self . bits { false => MSBF_A :: _0 , true => MSBF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSBF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSBF_A :: _1 } } # [ doc = "Write proxy for field `MSBF`" ] pub struct MSBF_W < 'a > { w : & 'a mut W , } impl < 'a > MSBF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSBF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _0 ) } # [ doc = "MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1\\[M\\] and C1\\[PE\\]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1\\[M\\] and C1\\[PE\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "RxD Pin Active Edge Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIF_A { # [ doc = "0: No active edge on the receive pin has occurred." ] _0 , # [ doc = "1: An active edge on the receive pin has occurred." ] _1 } impl From < RXEDGIF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIF_A ) -> Self { match variant { RXEDGIF_A :: _0 => false , RXEDGIF_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIF`" ] pub type RXEDGIF_R = crate :: R < bool , RXEDGIF_A > ; impl RXEDGIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIF_A { match self . bits { false => RXEDGIF_A :: _0 , true => RXEDGIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIF_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIF`" ] pub struct RXEDGIF_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _0 ) } # [ doc = "An active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIF_A { # [ doc = "0: No LIN break character detected." ] _0 , # [ doc = "1: LIN break character detected." ] _1 } impl From < LBKDIF_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIF_A ) -> Self { match variant { LBKDIF_A :: _0 => false , LBKDIF_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIF`" ] pub type LBKDIF_R = crate :: R < bool , LBKDIF_A > ; impl LBKDIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIF_A { match self . bits { false => LBKDIF_A :: _0 , true => LBKDIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIF_A :: _1 } } # [ doc = "Write proxy for field `LBKDIF`" ] pub struct LBKDIF_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No LIN break character detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _0 ) } # [ doc = "LIN break character detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receiver Active Flag" ] # [ inline ( always ) ] pub fn raf ( & self ) -> RAF_R { RAF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & self ) -> LBKDE_R { LBKDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & self ) -> BRK13_R { BRK13_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & self ) -> RWUID_R { RWUID_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & self ) -> RXINV_R { RXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & self ) -> MSBF_R { MSBF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & self ) -> RXEDGIF_R { RXEDGIF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & self ) -> LBKDIF_R { LBKDIF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & mut self ) -> LBKDE_W { LBKDE_W { w : self } } # [ doc = "Bit 2 - Break Transmit Character Length" ] # [ inline ( always ) ] pub fn brk13 ( & mut self ) -> BRK13_W { BRK13_W { w : self } } # [ doc = "Bit 3 - Receive Wakeup Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & mut self ) -> RWUID_W { RWUID_W { w : self } } # [ doc = "Bit 4 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & mut self ) -> RXINV_W { RXINV_W { w : self } } # [ doc = "Bit 5 - Most Significant Bit First" ] # [ inline ( always ) ] pub fn msbf ( & mut self ) -> MSBF_W { MSBF_W { w : self } } # [ doc = "Bit 6 - RxD Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & mut self ) -> RXEDGIF_W { RXEDGIF_W { w : self } } # [ doc = "Bit 7 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & mut self ) -> LBKDIF_W { LBKDIF_W { w : self } } } } # [ doc = "UART Control Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c3](c3) module" ] pub type C3 = crate :: Reg < u8 , _C3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C3 ; # [ doc = "`read()` method returns [c3::R](c3::R) reader structure" ] impl crate :: Readable for C3 { } # [ doc = "`write(|w| ..)` method takes [c3::W](c3::W) writer structure" ] impl crate :: Writable for C3 { } # [ doc = "UART Control Register 3" ] pub mod c3 { # [ doc = "Reader of register C3" ] pub type R = crate :: R < u8 , super :: C3 > ; # [ doc = "Writer for register C3" ] pub type W = crate :: W < u8 , super :: C3 > ; # [ doc = "Register C3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEIE_A { # [ doc = "0: PF interrupt requests are disabled." ] _0 , # [ doc = "1: PF interrupt requests are enabled." ] _1 } impl From < PEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : PEIE_A ) -> Self { match variant { PEIE_A :: _0 => false , PEIE_A :: _1 => true } } } # [ doc = "Reader of field `PEIE`" ] pub type PEIE_R = crate :: R < bool , PEIE_A > ; impl PEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEIE_A { match self . bits { false => PEIE_A :: _0 , true => PEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEIE_A :: _1 } } # [ doc = "Write proxy for field `PEIE`" ] pub struct PEIE_W < 'a > { w : & 'a mut W , } impl < 'a > PEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _0 ) } # [ doc = "PF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Framing Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEIE_A { # [ doc = "0: FE interrupt requests are disabled." ] _0 , # [ doc = "1: FE interrupt requests are enabled." ] _1 } impl From < FEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FEIE_A ) -> Self { match variant { FEIE_A :: _0 => false , FEIE_A :: _1 => true } } } # [ doc = "Reader of field `FEIE`" ] pub type FEIE_R = crate :: R < bool , FEIE_A > ; impl FEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEIE_A { match self . bits { false => FEIE_A :: _0 , true => FEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEIE_A :: _1 } } # [ doc = "Write proxy for field `FEIE`" ] pub struct FEIE_W < 'a > { w : & 'a mut W , } impl < 'a > FEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FE interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _0 ) } # [ doc = "FE interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Noise Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NEIE_A { # [ doc = "0: NF interrupt requests are disabled." ] _0 , # [ doc = "1: NF interrupt requests are enabled." ] _1 } impl From < NEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : NEIE_A ) -> Self { match variant { NEIE_A :: _0 => false , NEIE_A :: _1 => true } } } # [ doc = "Reader of field `NEIE`" ] pub type NEIE_R = crate :: R < bool , NEIE_A > ; impl NEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NEIE_A { match self . bits { false => NEIE_A :: _0 , true => NEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NEIE_A :: _1 } } # [ doc = "Write proxy for field `NEIE`" ] pub struct NEIE_W < 'a > { w : & 'a mut W , } impl < 'a > NEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "NF interrupt requests are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _0 ) } # [ doc = "NF interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Overrun Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORIE_A { # [ doc = "0: OR interrupts are disabled." ] _0 , # [ doc = "1: OR interrupt requests are enabled." ] _1 } impl From < ORIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ORIE_A ) -> Self { match variant { ORIE_A :: _0 => false , ORIE_A :: _1 => true } } } # [ doc = "Reader of field `ORIE`" ] pub type ORIE_R = crate :: R < bool , ORIE_A > ; impl ORIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ORIE_A { match self . bits { false => ORIE_A :: _0 , true => ORIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ORIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ORIE_A :: _1 } } # [ doc = "Write proxy for field `ORIE`" ] pub struct ORIE_W < 'a > { w : & 'a mut W , } impl < 'a > ORIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ORIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OR interrupts are disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _0 ) } # [ doc = "OR interrupt requests are enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit Data Inversion.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXINV_A { # [ doc = "0: Transmit data is not inverted." ] _0 , # [ doc = "1: Transmit data is inverted." ] _1 } impl From < TXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : TXINV_A ) -> Self { match variant { TXINV_A :: _0 => false , TXINV_A :: _1 => true } } } # [ doc = "Reader of field `TXINV`" ] pub type TXINV_R = crate :: R < bool , TXINV_A > ; impl TXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXINV_A { match self . bits { false => TXINV_A :: _0 , true => TXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXINV_A :: _1 } } # [ doc = "Write proxy for field `TXINV`" ] pub struct TXINV_W < 'a > { w : & 'a mut W , } impl < 'a > TXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit data is not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _0 ) } # [ doc = "Transmit data is inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Transmitter Pin Data Direction in Single-Wire mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDIR_A { # [ doc = "0: TXD pin is an input in single wire mode." ] _0 , # [ doc = "1: TXD pin is an output in single wire mode." ] _1 } impl From < TXDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TXDIR_A ) -> Self { match variant { TXDIR_A :: _0 => false , TXDIR_A :: _1 => true } } } # [ doc = "Reader of field `TXDIR`" ] pub type TXDIR_R = crate :: R < bool , TXDIR_A > ; impl TXDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXDIR_A { match self . bits { false => TXDIR_A :: _0 , true => TXDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXDIR_A :: _1 } } # [ doc = "Write proxy for field `TXDIR`" ] pub struct TXDIR_W < 'a > { w : & 'a mut W , } impl < 'a > TXDIR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXDIR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXD pin is an input in single wire mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _0 ) } # [ doc = "TXD pin is an output in single wire mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `T8`" ] pub type T8_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `T8`" ] pub struct T8_W < 'a > { w : & 'a mut W , } impl < 'a > T8_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `R8`" ] pub type R8_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & self ) -> PEIE_R { PEIE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & self ) -> FEIE_R { FEIE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & self ) -> NEIE_R { NEIE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & self ) -> ORIE_R { ORIE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & self ) -> TXINV_R { TXINV_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & self ) -> TXDIR_R { TXDIR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & self ) -> T8_R { T8_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Received Bit 8" ] # [ inline ( always ) ] pub fn r8 ( & self ) -> R8_R { R8_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & mut self ) -> PEIE_W { PEIE_W { w : self } } # [ doc = "Bit 1 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & mut self ) -> FEIE_W { FEIE_W { w : self } } # [ doc = "Bit 2 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & mut self ) -> NEIE_W { NEIE_W { w : self } } # [ doc = "Bit 3 - Overrun Error Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & mut self ) -> ORIE_W { ORIE_W { w : self } } # [ doc = "Bit 4 - Transmit Data Inversion." ] # [ inline ( always ) ] pub fn txinv ( & mut self ) -> TXINV_W { TXINV_W { w : self } } # [ doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode" ] # [ inline ( always ) ] pub fn txdir ( & mut self ) -> TXDIR_W { TXDIR_W { w : self } } # [ doc = "Bit 6 - Transmit Bit 8" ] # [ inline ( always ) ] pub fn t8 ( & mut self ) -> T8_W { T8_W { w : self } } } } # [ doc = "UART Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [d](d) module" ] pub type D = crate :: Reg < u8 , _D > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _D ; # [ doc = "`read()` method returns [d::R](d::R) reader structure" ] impl crate :: Readable for D { } # [ doc = "`write(|w| ..)` method takes [d::W](d::W) writer structure" ] impl crate :: Writable for D { } # [ doc = "UART Data Register" ] pub mod d { # [ doc = "Reader of register D" ] pub type R = crate :: R < u8 , super :: D > ; # [ doc = "Writer for register D" ] pub type W = crate :: W < u8 , super :: D > ; # [ doc = "Register D `reset()`'s with value 0" ] impl crate :: ResetValue for super :: D { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RT`" ] pub type RT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RT`" ] pub struct RT_W < 'a > { w : & 'a mut W , } impl < 'a > RT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & self ) -> RT_R { RT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Reads return the contents of the read-only receive data register and writes go to the write-only transmit data register" ] # [ inline ( always ) ] pub fn rt ( & mut self ) -> RT_W { RT_W { w : self } } } } # [ doc = "UART Match Address Registers 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma1](ma1) module" ] pub type MA1 = crate :: Reg < u8 , _MA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA1 ; # [ doc = "`read()` method returns [ma1::R](ma1::R) reader structure" ] impl crate :: Readable for MA1 { } # [ doc = "`write(|w| ..)` method takes [ma1::W](ma1::W) writer structure" ] impl crate :: Writable for MA1 { } # [ doc = "UART Match Address Registers 1" ] pub mod ma1 { # [ doc = "Reader of register MA1" ] pub type R = crate :: R < u8 , super :: MA1 > ; # [ doc = "Writer for register MA1" ] pub type W = crate :: W < u8 , super :: MA1 > ; # [ doc = "Register MA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Match Address Registers 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ma2](ma2) module" ] pub type MA2 = crate :: Reg < u8 , _MA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MA2 ; # [ doc = "`read()` method returns [ma2::R](ma2::R) reader structure" ] impl crate :: Readable for MA2 { } # [ doc = "`write(|w| ..)` method takes [ma2::W](ma2::W) writer structure" ] impl crate :: Writable for MA2 { } # [ doc = "UART Match Address Registers 2" ] pub mod ma2 { # [ doc = "Reader of register MA2" ] pub type R = crate :: R < u8 , super :: MA2 > ; # [ doc = "Writer for register MA2" ] pub type W = crate :: W < u8 , super :: MA2 > ; # [ doc = "Register MA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MA2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA`" ] pub type MA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MA`" ] pub struct MA_W < 'a > { w : & 'a mut W , } impl < 'a > MA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & self ) -> MA_R { MA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Match Address" ] # [ inline ( always ) ] pub fn ma ( & mut self ) -> MA_W { MA_W { w : self } } } } # [ doc = "UART Control Register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c4](c4) module" ] pub type C4 = crate :: Reg < u8 , _C4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C4 ; # [ doc = "`read()` method returns [c4::R](c4::R) reader structure" ] impl crate :: Readable for C4 { } # [ doc = "`write(|w| ..)` method takes [c4::W](c4::W) writer structure" ] impl crate :: Writable for C4 { } # [ doc = "UART Control Register 4" ] pub mod c4 { # [ doc = "Reader of register C4" ] pub type R = crate :: R < u8 , super :: C4 > ; # [ doc = "Writer for register C4" ] pub type W = crate :: W < u8 , super :: C4 > ; # [ doc = "Register C4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BRFA`" ] pub type BRFA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BRFA`" ] pub struct BRFA_W < 'a > { w : & 'a mut W , } impl < 'a > BRFA_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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "10-bit Mode select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M10_A { # [ doc = "0: The parity bit is the ninth bit in the serial transmission." ] _0 , # [ doc = "1: The parity bit is the tenth bit in the serial transmission." ] _1 } impl From < M10_A > for bool { # [ inline ( always ) ] fn from ( variant : M10_A ) -> Self { match variant { M10_A :: _0 => false , M10_A :: _1 => true } } } # [ doc = "Reader of field `M10`" ] pub type M10_R = crate :: R < bool , M10_A > ; impl M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M10_A { match self . bits { false => M10_A :: _0 , true => M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M10_A :: _1 } } # [ doc = "Write proxy for field `M10`" ] pub struct M10_W < 'a > { w : & 'a mut W , } impl < 'a > M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The parity bit is the ninth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M10_A :: _0 ) } # [ doc = "The parity bit is the tenth bit in the serial transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M10_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Match Address Mode Enable 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN2_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN1 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN2_A ) -> Self { match variant { MAEN2_A :: _0 => false , MAEN2_A :: _1 => true } } } # [ doc = "Reader of field `MAEN2`" ] pub type MAEN2_R = crate :: R < bool , MAEN2_A > ; impl MAEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN2_A { match self . bits { false => MAEN2_A :: _0 , true => MAEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN2_A :: _1 } } # [ doc = "Write proxy for field `MAEN2`" ] pub struct MAEN2_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN1 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Match Address Mode Enable 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN1_A { # [ doc = "0: All data received is transferred to the data buffer if MAEN2 is cleared." ] _0 , # [ doc = "1: All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] _1 } impl From < MAEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN1_A ) -> Self { match variant { MAEN1_A :: _0 => false , MAEN1_A :: _1 => true } } } # [ doc = "Reader of field `MAEN1`" ] pub type MAEN1_R = crate :: R < bool , MAEN1_A > ; impl MAEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN1_A { match self . bits { false => MAEN1_A :: _0 , true => MAEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN1_A :: _1 } } # [ doc = "Write proxy for field `MAEN1`" ] pub struct MAEN1_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All data received is transferred to the data buffer if MAEN2 is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _0 ) } # [ doc = "All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816\\[ISO7816E\\] is set/enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & self ) -> BRFA_R { BRFA_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & self ) -> M10_R { M10_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & self ) -> MAEN2_R { MAEN2_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & self ) -> MAEN1_R { MAEN1_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Baud Rate Fine Adjust" ] # [ inline ( always ) ] pub fn brfa ( & mut self ) -> BRFA_W { BRFA_W { w : self } } # [ doc = "Bit 5 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & mut self ) -> M10_W { M10_W { w : self } } # [ doc = "Bit 6 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & mut self ) -> MAEN2_W { MAEN2_W { w : self } } # [ doc = "Bit 7 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & mut self ) -> MAEN1_W { MAEN1_W { w : self } } } } # [ doc = "UART Control Register 5\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c5](c5) module" ] pub type C5 = crate :: Reg < u8 , _C5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C5 ; # [ doc = "`read()` method returns [c5::R](c5::R) reader structure" ] impl crate :: Readable for C5 { } # [ doc = "`write(|w| ..)` method takes [c5::W](c5::W) writer structure" ] impl crate :: Writable for C5 { } # [ doc = "UART Control Register 5" ] pub mod c5 { # [ doc = "Reader of register C5" ] pub type R = crate :: R < u8 , super :: C5 > ; # [ doc = "Writer for register C5" ] pub type W = crate :: W < u8 , super :: C5 > ; # [ doc = "Register C5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C5 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receiver Full DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDMAS_A { # [ doc = "0: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] _0 , # [ doc = "1: If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < RDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : RDMAS_A ) -> Self { match variant { RDMAS_A :: _0 => false , RDMAS_A :: _1 => true } } } # [ doc = "Reader of field `RDMAS`" ] pub type RDMAS_R = crate :: R < bool , RDMAS_A > ; impl RDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDMAS_A { match self . bits { false => RDMAS_A :: _0 , true => RDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDMAS_A :: _1 } } # [ doc = "Write proxy for field `RDMAS`" ] pub struct RDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > RDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDFR interrupt request signal is asserted to request an interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _0 ) } # [ doc = "If C2\\[RIE\\] and S1\\[RDRF\\] are set, the RDRF DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Transmitter DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDMAS_A { # [ doc = "0: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] _0 , # [ doc = "1: If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] _1 } impl From < TDMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TDMAS_A ) -> Self { match variant { TDMAS_A :: _0 => false , TDMAS_A :: _1 => true } } } # [ doc = "Reader of field `TDMAS`" ] pub type TDMAS_R = crate :: R < bool , TDMAS_A > ; impl TDMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDMAS_A { match self . bits { false => TDMAS_A :: _0 , true => TDMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDMAS_A :: _1 } } # [ doc = "Write proxy for field `TDMAS`" ] pub struct TDMAS_W < 'a > { w : & 'a mut W , } impl < 'a > TDMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TDMAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE interrupt request signal is asserted to request interrupt service." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _0 ) } # [ doc = "If C2\\[TIE\\] is set and the S1\\[TDRE\\] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TDMAS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & self ) -> RDMAS_R { RDMAS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & self ) -> TDMAS_R { TDMAS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 5 - Receiver Full DMA Select" ] # [ inline ( always ) ] pub fn rdmas ( & mut self ) -> RDMAS_W { RDMAS_W { w : self } } # [ doc = "Bit 7 - Transmitter DMA Select" ] # [ inline ( always ) ] pub fn tdmas ( & mut self ) -> TDMAS_W { TDMAS_W { w : self } } } } # [ doc = "UART Extended Data Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ed](ed) module" ] pub type ED = crate :: Reg < u8 , _ED > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ED ; # [ doc = "`read()` method returns [ed::R](ed::R) reader structure" ] impl crate :: Readable for ED { } # [ doc = "UART Extended Data Register" ] pub mod ed { # [ doc = "Reader of register ED" ] pub type R = crate :: R < u8 , super :: ED > ; # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with a parity error.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYE_A { # [ doc = "0: The dataword was received without a parity error." ] _0 , # [ doc = "1: The dataword was received with a parity error." ] _1 } impl From < PARITYE_A > for bool { # [ inline ( always ) ] fn from ( variant : PARITYE_A ) -> Self { match variant { PARITYE_A :: _0 => false , PARITYE_A :: _1 => true } } } # [ doc = "Reader of field `PARITYE`" ] pub type PARITYE_R = crate :: R < bool , PARITYE_A > ; impl PARITYE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PARITYE_A { match self . bits { false => PARITYE_A :: _0 , true => PARITYE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PARITYE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PARITYE_A :: _1 } } # [ doc = "The current received dataword contained in D and C3\\[R8\\] was received with noise.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOISY_A { # [ doc = "0: The dataword was received without noise." ] _0 , # [ doc = "1: The data was received with noise." ] _1 } impl From < NOISY_A > for bool { # [ inline ( always ) ] fn from ( variant : NOISY_A ) -> Self { match variant { NOISY_A :: _0 => false , NOISY_A :: _1 => true } } } # [ doc = "Reader of field `NOISY`" ] pub type NOISY_R = crate :: R < bool , NOISY_A > ; impl NOISY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOISY_A { match self . bits { false => NOISY_A :: _0 , true => NOISY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOISY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOISY_A :: _1 } } impl R { # [ doc = "Bit 6 - The current received dataword contained in D and C3\\[R8\\] was received with a parity error." ] # [ inline ( always ) ] pub fn paritye ( & self ) -> PARITYE_R { PARITYE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - The current received dataword contained in D and C3\\[R8\\] was received with noise." ] # [ inline ( always ) ] pub fn noisy ( & self ) -> NOISY_R { NOISY_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "UART Modem Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [modem](modem) module" ] pub type MODEM = crate :: Reg < u8 , _MODEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODEM ; # [ doc = "`read()` method returns [modem::R](modem::R) reader structure" ] impl crate :: Readable for MODEM { } # [ doc = "`write(|w| ..)` method takes [modem::W](modem::W) writer structure" ] impl crate :: Writable for MODEM { } # [ doc = "UART Modem Register" ] pub mod modem { # [ doc = "Reader of register MODEM" ] pub type R = crate :: R < u8 , super :: MODEM > ; # [ doc = "Writer for register MODEM" ] pub type W = crate :: W < u8 , super :: MODEM > ; # [ doc = "Register MODEM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MODEM { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter clear-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXCTSE_A { # [ doc = "0: CTS has no effect on the transmitter." ] _0 , # [ doc = "1: Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] _1 } impl From < TXCTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXCTSE_A ) -> Self { match variant { TXCTSE_A :: _0 => false , TXCTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXCTSE`" ] pub type TXCTSE_R = crate :: R < bool , TXCTSE_A > ; impl TXCTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXCTSE_A { match self . bits { false => TXCTSE_A :: _0 , true => TXCTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXCTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXCTSE_A :: _1 } } # [ doc = "Write proxy for field `TXCTSE`" ] pub struct TXCTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXCTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXCTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CTS has no effect on the transmitter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _0 ) } # [ doc = "Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSE_A { # [ doc = "0: The transmitter has no effect on RTS." ] _0 , # [ doc = "1: When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] _1 } impl From < TXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSE_A ) -> Self { match variant { TXRTSE_A :: _0 => false , TXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSE`" ] pub type TXRTSE_R = crate :: R < bool , TXRTSE_A > ; impl TXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSE_A { match self . bits { false => TXRTSE_A :: _0 , true => TXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSE_A :: _1 } } # [ doc = "Write proxy for field `TXRTSE`" ] pub struct TXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The transmitter has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _0 ) } # [ doc = "When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) (FIFO)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Transmitter request-to-send polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSPOL_A { # [ doc = "0: Transmitter RTS is active low." ] _0 , # [ doc = "1: Transmitter RTS is active high." ] _1 } impl From < TXRTSPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSPOL_A ) -> Self { match variant { TXRTSPOL_A :: _0 => false , TXRTSPOL_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSPOL`" ] pub type TXRTSPOL_R = crate :: R < bool , TXRTSPOL_A > ; impl TXRTSPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSPOL_A { match self . bits { false => TXRTSPOL_A :: _0 , true => TXRTSPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSPOL_A :: _1 } } # [ doc = "Write proxy for field `TXRTSPOL`" ] pub struct TXRTSPOL_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter RTS is active low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _0 ) } # [ doc = "Transmitter RTS is active high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receiver request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXRTSE_A { # [ doc = "0: The receiver has no effect on RTS." ] _0 , # [ doc = "1: RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] _1 } impl From < RXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXRTSE_A ) -> Self { match variant { RXRTSE_A :: _0 => false , RXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `RXRTSE`" ] pub type RXRTSE_R = crate :: R < bool , RXRTSE_A > ; impl RXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXRTSE_A { match self . bits { false => RXRTSE_A :: _0 , true => RXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXRTSE_A :: _1 } } # [ doc = "Write proxy for field `RXRTSE`" ] pub struct RXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > RXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The receiver has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _0 ) } # [ doc = "RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO\\[RXWATER\\]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO\\[RXWATER\\]. See Hardware flow control" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & self ) -> TXCTSE_R { TXCTSE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & self ) -> TXRTSE_R { TXRTSE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & self ) -> TXRTSPOL_R { TXRTSPOL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & self ) -> RXRTSE_R { RXRTSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & mut self ) -> TXCTSE_W { TXCTSE_W { w : self } } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & mut self ) -> TXRTSE_W { TXRTSE_W { w : self } } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & mut self ) -> TXRTSPOL_W { TXRTSPOL_W { w : self } } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & mut self ) -> RXRTSE_W { RXRTSE_W { w : self } } } } # [ doc = "UART Infrared Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ir](ir) module" ] pub type IR = crate :: Reg < u8 , _IR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IR ; # [ doc = "`read()` method returns [ir::R](ir::R) reader structure" ] impl crate :: Readable for IR { } # [ doc = "`write(|w| ..)` method takes [ir::W](ir::W) writer structure" ] impl crate :: Writable for IR { } # [ doc = "UART Infrared Register" ] pub mod ir { # [ doc = "Reader of register IR" ] pub type R = crate :: R < u8 , super :: IR > ; # [ doc = "Writer for register IR" ] pub type W = crate :: W < u8 , super :: IR > ; # [ doc = "Register IR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter narrow pulse\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TNP_A { # [ doc = "0: 3/16." ] _00 , # [ doc = "1: 1/16." ] _01 , # [ doc = "2: 1/32." ] _10 , # [ doc = "3: 1/4." ] _11 } impl From < TNP_A > for u8 { # [ inline ( always ) ] fn from ( variant : TNP_A ) -> Self { match variant { TNP_A :: _00 => 0 , TNP_A :: _01 => 1 , TNP_A :: _10 => 2 , TNP_A :: _11 => 3 } } } # [ doc = "Reader of field `TNP`" ] pub type TNP_R = crate :: R < u8 , TNP_A > ; impl TNP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TNP_A { match self . bits { 0 => TNP_A :: _00 , 1 => TNP_A :: _01 , 2 => TNP_A :: _10 , 3 => TNP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TNP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TNP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TNP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TNP_A :: _11 } } # [ doc = "Write proxy for field `TNP`" ] pub struct TNP_W < 'a > { w : & 'a mut W , } impl < 'a > TNP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TNP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "3/16." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _00 ) } # [ doc = "1/16." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _01 ) } # [ doc = "1/32." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _10 ) } # [ doc = "1/4." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Infrared enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREN_A { # [ doc = "0: IR disabled." ] _0 , # [ doc = "1: IR enabled." ] _1 } impl From < IREN_A > for bool { # [ inline ( always ) ] fn from ( variant : IREN_A ) -> Self { match variant { IREN_A :: _0 => false , IREN_A :: _1 => true } } } # [ doc = "Reader of field `IREN`" ] pub type IREN_R = crate :: R < bool , IREN_A > ; impl IREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREN_A { match self . bits { false => IREN_A :: _0 , true => IREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREN_A :: _1 } } # [ doc = "Write proxy for field `IREN`" ] pub struct IREN_W < 'a > { w : & 'a mut W , } impl < 'a > IREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IR disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _0 ) } # [ doc = "IR enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & self ) -> TNP_R { TNP_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & self ) -> IREN_R { IREN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & mut self ) -> TNP_W { TNP_W { w : self } } # [ doc = "Bit 2 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & mut self ) -> IREN_W { IREN_W { w : self } } } } # [ doc = "UART FIFO Parameters\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pfifo](pfifo) module" ] pub type PFIFO = crate :: Reg < u8 , _PFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PFIFO ; # [ doc = "`read()` method returns [pfifo::R](pfifo::R) reader structure" ] impl crate :: Readable for PFIFO { } # [ doc = "`write(|w| ..)` method takes [pfifo::W](pfifo::W) writer structure" ] impl crate :: Writable for PFIFO { } # [ doc = "UART FIFO Parameters" ] pub mod pfifo { # [ doc = "Reader of register PFIFO" ] pub type R = crate :: R < u8 , super :: PFIFO > ; # [ doc = "Writer for register PFIFO" ] pub type W = crate :: W < u8 , super :: PFIFO > ; # [ doc = "Register PFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFIFOSIZE_A { # [ doc = "0: Receive FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Receive FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Receive FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Receive FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Receive FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Receive FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Receive FIFO/Buffer depth = 128 datawords." ] _110 } impl From < RXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : RXFIFOSIZE_A ) -> Self { match variant { RXFIFOSIZE_A :: _000 => 0 , RXFIFOSIZE_A :: _001 => 1 , RXFIFOSIZE_A :: _010 => 2 , RXFIFOSIZE_A :: _011 => 3 , RXFIFOSIZE_A :: _100 => 4 , RXFIFOSIZE_A :: _101 => 5 , RXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `RXFIFOSIZE`" ] pub type RXFIFOSIZE_R = crate :: R < u8 , RXFIFOSIZE_A > ; impl RXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RXFIFOSIZE_A :: _000 ) , 1 => Val ( RXFIFOSIZE_A :: _001 ) , 2 => Val ( RXFIFOSIZE_A :: _010 ) , 3 => Val ( RXFIFOSIZE_A :: _011 ) , 4 => Val ( RXFIFOSIZE_A :: _100 ) , 5 => Val ( RXFIFOSIZE_A :: _101 ) , 6 => Val ( RXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == RXFIFOSIZE_A :: _110 } } # [ doc = "Receive FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFE_A { # [ doc = "0: Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] _0 , # [ doc = "1: Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] _1 } impl From < RXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXFE_A ) -> Self { match variant { RXFE_A :: _0 => false , RXFE_A :: _1 => true } } } # [ doc = "Reader of field `RXFE`" ] pub type RXFE_R = crate :: R < bool , RXFE_A > ; impl RXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXFE_A { match self . bits { false => RXFE_A :: _0 , true => RXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXFE_A :: _1 } } # [ doc = "Write proxy for field `RXFE`" ] pub struct RXFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _0 ) } # [ doc = "Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit FIFO. Buffer Depth\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFIFOSIZE_A { # [ doc = "0: Transmit FIFO/Buffer depth = 1 dataword." ] _000 , # [ doc = "1: Transmit FIFO/Buffer depth = 4 datawords." ] _001 , # [ doc = "2: Transmit FIFO/Buffer depth = 8 datawords." ] _010 , # [ doc = "3: Transmit FIFO/Buffer depth = 16 datawords." ] _011 , # [ doc = "4: Transmit FIFO/Buffer depth = 32 datawords." ] _100 , # [ doc = "5: Transmit FIFO/Buffer depth = 64 datawords." ] _101 , # [ doc = "6: Transmit FIFO/Buffer depth = 128 datawords." ] _110 } impl From < TXFIFOSIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXFIFOSIZE_A ) -> Self { match variant { TXFIFOSIZE_A :: _000 => 0 , TXFIFOSIZE_A :: _001 => 1 , TXFIFOSIZE_A :: _010 => 2 , TXFIFOSIZE_A :: _011 => 3 , TXFIFOSIZE_A :: _100 => 4 , TXFIFOSIZE_A :: _101 => 5 , TXFIFOSIZE_A :: _110 => 6 } } } # [ doc = "Reader of field `TXFIFOSIZE`" ] pub type TXFIFOSIZE_R = crate :: R < u8 , TXFIFOSIZE_A > ; impl TXFIFOSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TXFIFOSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TXFIFOSIZE_A :: _000 ) , 1 => Val ( TXFIFOSIZE_A :: _001 ) , 2 => Val ( TXFIFOSIZE_A :: _010 ) , 3 => Val ( TXFIFOSIZE_A :: _011 ) , 4 => Val ( TXFIFOSIZE_A :: _100 ) , 5 => Val ( TXFIFOSIZE_A :: _101 ) , 6 => Val ( TXFIFOSIZE_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == TXFIFOSIZE_A :: _110 } } # [ doc = "Transmit FIFO Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFE_A { # [ doc = "0: Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] _0 , # [ doc = "1: Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] _1 } impl From < TXFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXFE_A ) -> Self { match variant { TXFE_A :: _0 => false , TXFE_A :: _1 => true } } } # [ doc = "Reader of field `TXFE`" ] pub type TXFE_R = crate :: R < bool , TXFE_A > ; impl TXFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXFE_A { match self . bits { false => TXFE_A :: _0 , true => TXFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXFE_A :: _1 } } # [ doc = "Write proxy for field `TXFE`" ] pub struct TXFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _0 ) } # [ doc = "Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Receive FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn rxfifosize ( & self ) -> RXFIFOSIZE_R { RXFIFOSIZE_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & self ) -> RXFE_R { RXFE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:6 - Transmit FIFO. Buffer Depth" ] # [ inline ( always ) ] pub fn txfifosize ( & self ) -> TXFIFOSIZE_R { TXFIFOSIZE_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & self ) -> TXFE_R { TXFE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 3 - Receive FIFO Enable" ] # [ inline ( always ) ] pub fn rxfe ( & mut self ) -> RXFE_W { RXFE_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO Enable" ] # [ inline ( always ) ] pub fn txfe ( & mut self ) -> TXFE_W { TXFE_W { w : self } } } } # [ doc = "UART FIFO Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfifo](cfifo) module" ] pub type CFIFO = crate :: Reg < u8 , _CFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFIFO ; # [ doc = "`read()` method returns [cfifo::R](cfifo::R) reader structure" ] impl crate :: Readable for CFIFO { } # [ doc = "`write(|w| ..)` method takes [cfifo::W](cfifo::W) writer structure" ] impl crate :: Writable for CFIFO { } # [ doc = "UART FIFO Control Register" ] pub mod cfifo { # [ doc = "Reader of register CFIFO" ] pub type R = crate :: R < u8 , super :: CFIFO > ; # [ doc = "Writer for register CFIFO" ] pub type W = crate :: W < u8 , super :: CFIFO > ; # [ doc = "Register CFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Receive FIFO Underflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUFE_A { # [ doc = "0: RXUF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXUF flag generates an interrupt to the host." ] _1 } impl From < RXUFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUFE_A ) -> Self { match variant { RXUFE_A :: _0 => false , RXUFE_A :: _1 => true } } } # [ doc = "Reader of field `RXUFE`" ] pub type RXUFE_R = crate :: R < bool , RXUFE_A > ; impl RXUFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUFE_A { match self . bits { false => RXUFE_A :: _0 , true => RXUFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUFE_A :: _1 } } # [ doc = "Write proxy for field `RXUFE`" ] pub struct RXUFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXUFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXUF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _0 ) } # [ doc = "RXUF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUFE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmit FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOFE_A { # [ doc = "0: TXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: TXOF flag generates an interrupt to the host." ] _1 } impl From < TXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOFE_A ) -> Self { match variant { TXOFE_A :: _0 => false , TXOFE_A :: _1 => true } } } # [ doc = "Reader of field `TXOFE`" ] pub type TXOFE_R = crate :: R < bool , TXOFE_A > ; impl TXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOFE_A { match self . bits { false => TXOFE_A :: _0 , true => TXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOFE_A :: _1 } } # [ doc = "Write proxy for field `TXOFE`" ] pub struct TXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > TXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _0 ) } # [ doc = "TXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receive FIFO Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOFE_A { # [ doc = "0: RXOF flag does not generate an interrupt to the host." ] _0 , # [ doc = "1: RXOF flag generates an interrupt to the host." ] _1 } impl From < RXOFE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOFE_A ) -> Self { match variant { RXOFE_A :: _0 => false , RXOFE_A :: _1 => true } } } # [ doc = "Reader of field `RXOFE`" ] pub type RXOFE_R = crate :: R < bool , RXOFE_A > ; impl RXOFE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOFE_A { match self . bits { false => RXOFE_A :: _0 , true => RXOFE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOFE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOFE_A :: _1 } } # [ doc = "Write proxy for field `RXOFE`" ] pub struct RXOFE_W < 'a > { w : & 'a mut W , } impl < 'a > RXOFE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOFE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RXOF flag does not generate an interrupt to the host." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _0 ) } # [ doc = "RXOF flag generates an interrupt to the host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOFE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the receive FIFO/buffer is cleared out." ] _1 } impl From < RXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : RXFLUSH_AW ) -> Self { match variant { RXFLUSH_AW :: _0 => false , RXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `RXFLUSH`" ] pub struct RXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > RXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _0 ) } # [ doc = "All data in the receive FIFO/buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Transmit FIFO/Buffer Flush\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFLUSH_AW { # [ doc = "0: No flush operation occurs." ] _0 , # [ doc = "1: All data in the transmit FIFO/Buffer is cleared out." ] _1 } impl From < TXFLUSH_AW > for bool { # [ inline ( always ) ] fn from ( variant : TXFLUSH_AW ) -> Self { match variant { TXFLUSH_AW :: _0 => false , TXFLUSH_AW :: _1 => true } } } # [ doc = "Write proxy for field `TXFLUSH`" ] pub struct TXFLUSH_W < 'a > { w : & 'a mut W , } impl < 'a > TXFLUSH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXFLUSH_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No flush operation occurs." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _0 ) } # [ doc = "All data in the transmit FIFO/Buffer is cleared out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXFLUSH_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & self ) -> RXUFE_R { RXUFE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & self ) -> TXOFE_R { TXOFE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & self ) -> RXOFE_R { RXOFE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receive FIFO Underflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxufe ( & mut self ) -> RXUFE_W { RXUFE_W { w : self } } # [ doc = "Bit 1 - Transmit FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn txofe ( & mut self ) -> TXOFE_W { TXOFE_W { w : self } } # [ doc = "Bit 2 - Receive FIFO Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn rxofe ( & mut self ) -> RXOFE_W { RXOFE_W { w : self } } # [ doc = "Bit 6 - Receive FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn rxflush ( & mut self ) -> RXFLUSH_W { RXFLUSH_W { w : self } } # [ doc = "Bit 7 - Transmit FIFO/Buffer Flush" ] # [ inline ( always ) ] pub fn txflush ( & mut self ) -> TXFLUSH_W { TXFLUSH_W { w : self } } } } # [ doc = "UART FIFO Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sfifo](sfifo) module" ] pub type SFIFO = crate :: Reg < u8 , _SFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SFIFO ; # [ doc = "`read()` method returns [sfifo::R](sfifo::R) reader structure" ] impl crate :: Readable for SFIFO { } # [ doc = "`write(|w| ..)` method takes [sfifo::W](sfifo::W) writer structure" ] impl crate :: Writable for SFIFO { } # [ doc = "UART FIFO Status Register" ] pub mod sfifo { # [ doc = "Reader of register SFIFO" ] pub type R = crate :: R < u8 , super :: SFIFO > ; # [ doc = "Writer for register SFIFO" ] pub type W = crate :: W < u8 , super :: SFIFO > ; # [ doc = "Register SFIFO `reset()`'s with value 0xc0" ] impl crate :: ResetValue for super :: SFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc0 } } # [ doc = "Receiver Buffer Underflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXUF_A { # [ doc = "0: No receive buffer underflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer underflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXUF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXUF_A ) -> Self { match variant { RXUF_A :: _0 => false , RXUF_A :: _1 => true } } } # [ doc = "Reader of field `RXUF`" ] pub type RXUF_R = crate :: R < bool , RXUF_A > ; impl RXUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXUF_A { match self . bits { false => RXUF_A :: _0 , true => RXUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXUF_A :: _1 } } # [ doc = "Write proxy for field `RXUF`" ] pub struct RXUF_W < 'a > { w : & 'a mut W , } impl < 'a > RXUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _0 ) } # [ doc = "At least one receive buffer underflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXUF_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXOF_A { # [ doc = "0: No transmit buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < TXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TXOF_A ) -> Self { match variant { TXOF_A :: _0 => false , TXOF_A :: _1 => true } } } # [ doc = "Reader of field `TXOF`" ] pub type TXOF_R = crate :: R < bool , TXOF_A > ; impl TXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXOF_A { match self . bits { false => TXOF_A :: _0 , true => TXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXOF_A :: _1 } } # [ doc = "Write proxy for field `TXOF`" ] pub struct TXOF_W < 'a > { w : & 'a mut W , } impl < 'a > TXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _0 ) } # [ doc = "At least one transmit buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Receiver Buffer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXOF_A { # [ doc = "0: No receive buffer overflow has occurred since the last time the flag was cleared." ] _0 , # [ doc = "1: At least one receive buffer overflow has occurred since the last time the flag was cleared." ] _1 } impl From < RXOF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXOF_A ) -> Self { match variant { RXOF_A :: _0 => false , RXOF_A :: _1 => true } } } # [ doc = "Reader of field `RXOF`" ] pub type RXOF_R = crate :: R < bool , RXOF_A > ; impl RXOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXOF_A { match self . bits { false => RXOF_A :: _0 , true => RXOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXOF_A :: _1 } } # [ doc = "Write proxy for field `RXOF`" ] pub struct RXOF_W < 'a > { w : & 'a mut W , } impl < 'a > RXOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _0 ) } # [ doc = "At least one receive buffer overflow has occurred since the last time the flag was cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXOF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Receive Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEMPT_A { # [ doc = "0: Receive buffer is not empty." ] _0 , # [ doc = "1: Receive buffer is empty." ] _1 } impl From < RXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEMPT_A ) -> Self { match variant { RXEMPT_A :: _0 => false , RXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `RXEMPT`" ] pub type RXEMPT_R = crate :: R < bool , RXEMPT_A > ; impl RXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEMPT_A { match self . bits { false => RXEMPT_A :: _0 , true => RXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEMPT_A :: _1 } } # [ doc = "Transmit Buffer/FIFO Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXEMPT_A { # [ doc = "0: Transmit buffer is not empty." ] _0 , # [ doc = "1: Transmit buffer is empty." ] _1 } impl From < TXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : TXEMPT_A ) -> Self { match variant { TXEMPT_A :: _0 => false , TXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `TXEMPT`" ] pub type TXEMPT_R = crate :: R < bool , TXEMPT_A > ; impl TXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXEMPT_A { match self . bits { false => TXEMPT_A :: _0 , true => TXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXEMPT_A :: _1 } } impl R { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & self ) -> RXUF_R { RXUF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & self ) -> TXOF_R { TXOF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & self ) -> RXOF_R { RXOF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Receive Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn rxempt ( & self ) -> RXEMPT_R { RXEMPT_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Transmit Buffer/FIFO Empty" ] # [ inline ( always ) ] pub fn txempt ( & self ) -> TXEMPT_R { TXEMPT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Receiver Buffer Underflow Flag" ] # [ inline ( always ) ] pub fn rxuf ( & mut self ) -> RXUF_W { RXUF_W { w : self } } # [ doc = "Bit 1 - Transmitter Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn txof ( & mut self ) -> TXOF_W { TXOF_W { w : self } } # [ doc = "Bit 2 - Receiver Buffer Overflow Flag" ] # [ inline ( always ) ] pub fn rxof ( & mut self ) -> RXOF_W { RXOF_W { w : self } } } } # [ doc = "UART FIFO Transmit Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [twfifo](twfifo) module" ] pub type TWFIFO = crate :: Reg < u8 , _TWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TWFIFO ; # [ doc = "`read()` method returns [twfifo::R](twfifo::R) reader structure" ] impl crate :: Readable for TWFIFO { } # [ doc = "`write(|w| ..)` method takes [twfifo::W](twfifo::W) writer structure" ] impl crate :: Writable for TWFIFO { } # [ doc = "UART FIFO Transmit Watermark" ] pub mod twfifo { # [ doc = "Reader of register TWFIFO" ] pub type R = crate :: R < u8 , super :: TWFIFO > ; # [ doc = "Writer for register TWFIFO" ] pub type W = crate :: W < u8 , super :: TWFIFO > ; # [ doc = "Register TWFIFO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXWATER`" ] pub type TXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXWATER`" ] pub struct TXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > TXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & self ) -> TXWATER_R { TXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Transmit Watermark" ] # [ inline ( always ) ] pub fn txwater ( & mut self ) -> TXWATER_W { TXWATER_W { w : self } } } } # [ doc = "UART FIFO Transmit Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcfifo](tcfifo) module" ] pub type TCFIFO = crate :: Reg < u8 , _TCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCFIFO ; # [ doc = "`read()` method returns [tcfifo::R](tcfifo::R) reader structure" ] impl crate :: Readable for TCFIFO { } # [ doc = "UART FIFO Transmit Count" ] pub mod tcfifo { # [ doc = "Reader of register TCFIFO" ] pub type R = crate :: R < u8 , super :: TCFIFO > ; # [ doc = "Reader of field `TXCOUNT`" ] pub type TXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Transmit Counter" ] # [ inline ( always ) ] pub fn txcount ( & self ) -> TXCOUNT_R { TXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "UART FIFO Receive Watermark\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rwfifo](rwfifo) module" ] pub type RWFIFO = crate :: Reg < u8 , _RWFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RWFIFO ; # [ doc = "`read()` method returns [rwfifo::R](rwfifo::R) reader structure" ] impl crate :: Readable for RWFIFO { } # [ doc = "`write(|w| ..)` method takes [rwfifo::W](rwfifo::W) writer structure" ] impl crate :: Writable for RWFIFO { } # [ doc = "UART FIFO Receive Watermark" ] pub mod rwfifo { # [ doc = "Reader of register RWFIFO" ] pub type R = crate :: R < u8 , super :: RWFIFO > ; # [ doc = "Writer for register RWFIFO" ] pub type W = crate :: W < u8 , super :: RWFIFO > ; # [ doc = "Register RWFIFO `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: RWFIFO { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Reader of field `RXWATER`" ] pub type RXWATER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXWATER`" ] pub struct RXWATER_W < 'a > { w : & 'a mut W , } impl < 'a > RXWATER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & self ) -> RXWATER_R { RXWATER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Receive Watermark" ] # [ inline ( always ) ] pub fn rxwater ( & mut self ) -> RXWATER_W { RXWATER_W { w : self } } } } # [ doc = "UART FIFO Receive Count\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcfifo](rcfifo) module" ] pub type RCFIFO = crate :: Reg < u8 , _RCFIFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCFIFO ; # [ doc = "`read()` method returns [rcfifo::R](rcfifo::R) reader structure" ] impl crate :: Readable for RCFIFO { } # [ doc = "UART FIFO Receive Count" ] pub mod rcfifo { # [ doc = "Reader of register RCFIFO" ] pub type R = crate :: R < u8 , super :: RCFIFO > ; # [ doc = "Reader of field `RXCOUNT`" ] pub type RXCOUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Receive Counter" ] # [ inline ( always ) ] pub fn rxcount ( & self ) -> RXCOUNT_R { RXCOUNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } } # [ doc = "Universal Serial Bus, OTG Capable Controller" ] pub struct USB0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for USB0 { } impl USB0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const usb0 :: RegisterBlock { 0x4007_2000 as * const _ } } impl Deref for USB0 { type Target = usb0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * USB0 :: ptr ( ) } } } # [ doc = "Universal Serial Bus, OTG Capable Controller" ] pub mod usb0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Peripheral ID register" ] pub perid : PERID , _reserved1 : [ u8 ; 3usize ] , # [ doc = "0x04 - Peripheral ID Complement register" ] pub idcomp : IDCOMP , _reserved2 : [ u8 ; 3usize ] , # [ doc = "0x08 - Peripheral Revision register" ] pub rev : REV , _reserved3 : [ u8 ; 3usize ] , # [ doc = "0x0c - Peripheral Additional Info register" ] pub addinfo : ADDINFO , _reserved4 : [ u8 ; 3usize ] , # [ doc = "0x10 - OTG Interrupt Status register" ] pub otgistat : OTGISTAT , _reserved5 : [ u8 ; 3usize ] , # [ doc = "0x14 - OTG Interrupt Control register" ] pub otgicr : OTGICR , _reserved6 : [ u8 ; 3usize ] , # [ doc = "0x18 - OTG Status register" ] pub otgstat : OTGSTAT , _reserved7 : [ u8 ; 3usize ] , # [ doc = "0x1c - OTG Control register" ] pub otgctl : OTGCTL , _reserved8 : [ u8 ; 99usize ] , # [ doc = "0x80 - Interrupt Status register" ] pub istat : ISTAT , _reserved9 : [ u8 ; 3usize ] , # [ doc = "0x84 - Interrupt Enable register" ] pub inten : INTEN , _reserved10 : [ u8 ; 3usize ] , # [ doc = "0x88 - Error Interrupt Status register" ] pub errstat : ERRSTAT , _reserved11 : [ u8 ; 3usize ] , # [ doc = "0x8c - Error Interrupt Enable register" ] pub erren : ERREN , _reserved12 : [ u8 ; 3usize ] , # [ doc = "0x90 - Status register" ] pub stat : STAT , _reserved13 : [ u8 ; 3usize ] , # [ doc = "0x94 - Control register" ] pub ctl : CTL , _reserved14 : [ u8 ; 3usize ] , # [ doc = "0x98 - Address register" ] pub addr : ADDR , _reserved15 : [ u8 ; 3usize ] , # [ doc = "0x9c - BDT Page register 1" ] pub bdtpage1 : BDTPAGE1 , _reserved16 : [ u8 ; 3usize ] , # [ doc = "0xa0 - Frame Number register Low" ] pub frmnuml : FRMNUML , _reserved17 : [ u8 ; 3usize ] , # [ doc = "0xa4 - Frame Number register High" ] pub frmnumh : FRMNUMH , _reserved18 : [ u8 ; 3usize ] , # [ doc = "0xa8 - Token register" ] pub token : TOKEN , _reserved19 : [ u8 ; 3usize ] , # [ doc = "0xac - SOF Threshold register" ] pub softhld : SOFTHLD , _reserved20 : [ u8 ; 3usize ] , # [ doc = "0xb0 - BDT Page Register 2" ] pub bdtpage2 : BDTPAGE2 , _reserved21 : [ u8 ; 3usize ] , # [ doc = "0xb4 - BDT Page Register 3" ] pub bdtpage3 : BDTPAGE3 , _reserved22 : [ u8 ; 11usize ] , # [ doc = "0xc0 - Endpoint Control register" ] pub endpt0 : ENDPT , _reserved23 : [ u8 ; 3usize ] , # [ doc = "0xc4 - Endpoint Control register" ] pub endpt1 : ENDPT , _reserved24 : [ u8 ; 3usize ] , # [ doc = "0xc8 - Endpoint Control register" ] pub endpt2 : ENDPT , _reserved25 : [ u8 ; 3usize ] , # [ doc = "0xcc - Endpoint Control register" ] pub endpt3 : ENDPT , _reserved26 : [ u8 ; 3usize ] , # [ doc = "0xd0 - Endpoint Control register" ] pub endpt4 : ENDPT , _reserved27 : [ u8 ; 3usize ] , # [ doc = "0xd4 - Endpoint Control register" ] pub endpt5 : ENDPT , _reserved28 : [ u8 ; 3usize ] , # [ doc = "0xd8 - Endpoint Control register" ] pub endpt6 : ENDPT , _reserved29 : [ u8 ; 3usize ] , # [ doc = "0xdc - Endpoint Control register" ] pub endpt7 : ENDPT , _reserved30 : [ u8 ; 3usize ] , # [ doc = "0xe0 - Endpoint Control register" ] pub endpt8 : ENDPT , _reserved31 : [ u8 ; 3usize ] , # [ doc = "0xe4 - Endpoint Control register" ] pub endpt9 : ENDPT , _reserved32 : [ u8 ; 3usize ] , # [ doc = "0xe8 - Endpoint Control register" ] pub endpt10 : ENDPT , _reserved33 : [ u8 ; 3usize ] , # [ doc = "0xec - Endpoint Control register" ] pub endpt11 : ENDPT , _reserved34 : [ u8 ; 3usize ] , # [ doc = "0xf0 - Endpoint Control register" ] pub endpt12 : ENDPT , _reserved35 : [ u8 ; 3usize ] , # [ doc = "0xf4 - Endpoint Control register" ] pub endpt13 : ENDPT , _reserved36 : [ u8 ; 3usize ] , # [ doc = "0xf8 - Endpoint Control register" ] pub endpt14 : ENDPT , _reserved37 : [ u8 ; 3usize ] , # [ doc = "0xfc - Endpoint Control register" ] pub endpt15 : ENDPT , _reserved38 : [ u8 ; 3usize ] , # [ doc = "0x100 - USB Control register" ] pub usbctrl : USBCTRL , _reserved39 : [ u8 ; 3usize ] , # [ doc = "0x104 - USB OTG Observe register" ] pub observe : OBSERVE , _reserved40 : [ u8 ; 3usize ] , # [ doc = "0x108 - USB OTG Control register" ] pub control : CONTROL , _reserved41 : [ u8 ; 3usize ] , # [ doc = "0x10c - USB Transceiver Control register 0" ] pub usbtrc0 : USBTRC0 , _reserved42 : [ u8 ; 7usize ] , # [ doc = "0x114 - Frame Adjust Register" ] pub usbfrmadjust : USBFRMADJUST , _reserved43 : [ u8 ; 43usize ] , # [ doc = "0x140 - USB Clock recovery control" ] pub clk_recover_ctrl : CLK_RECOVER_CTRL , _reserved44 : [ u8 ; 3usize ] , # [ doc = "0x144 - IRC48M oscillator enable register" ] pub clk_recover_irc_en : CLK_RECOVER_IRC_EN , _reserved45 : [ u8 ; 15usize ] , # [ doc = "0x154 - Clock recovery combined interrupt enable" ] pub clk_recover_int_en : CLK_RECOVER_INT_EN , _reserved46 : [ u8 ; 7usize ] , # [ doc = "0x15c - Clock recovery separated interrupt status" ] pub clk_recover_int_status : CLK_RECOVER_INT_STATUS , } # [ doc = "Peripheral ID register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [perid](perid) module" ] pub type PERID = crate :: Reg < u8 , _PERID > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PERID ; # [ doc = "`read()` method returns [perid::R](perid::R) reader structure" ] impl crate :: Readable for PERID { } # [ doc = "Peripheral ID register" ] pub mod perid { # [ doc = "Reader of register PERID" ] pub type R = crate :: R < u8 , super :: PERID > ; # [ doc = "Reader of field `ID`" ] pub type ID_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:5 - Peripheral Identification" ] # [ inline ( always ) ] pub fn id ( & self ) -> ID_R { ID_R :: new ( ( self . bits & 0x3f ) as u8 ) } } } # [ doc = "Peripheral ID Complement register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idcomp](idcomp) module" ] pub type IDCOMP = crate :: Reg < u8 , _IDCOMP > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IDCOMP ; # [ doc = "`read()` method returns [idcomp::R](idcomp::R) reader structure" ] impl crate :: Readable for IDCOMP { } # [ doc = "Peripheral ID Complement register" ] pub mod idcomp { # [ doc = "Reader of register IDCOMP" ] pub type R = crate :: R < u8 , super :: IDCOMP > ; # [ doc = "Reader of field `NID`" ] pub type NID_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:5 - Ones' complement of PERID\\[ID\\]. bits." ] # [ inline ( always ) ] pub fn nid ( & self ) -> NID_R { NID_R :: new ( ( self . bits & 0x3f ) as u8 ) } } } # [ doc = "Peripheral Revision register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rev](rev) module" ] pub type REV = crate :: Reg < u8 , _REV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _REV ; # [ doc = "`read()` method returns [rev::R](rev::R) reader structure" ] impl crate :: Readable for REV { } # [ doc = "Peripheral Revision register" ] pub mod rev { # [ doc = "Reader of register REV" ] pub type R = crate :: R < u8 , super :: REV > ; # [ doc = "Reader of field `REV`" ] pub type REV_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Revision" ] # [ inline ( always ) ] pub fn rev ( & self ) -> REV_R { REV_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Peripheral Additional Info register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [addinfo](addinfo) module" ] pub type ADDINFO = crate :: Reg < u8 , _ADDINFO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ADDINFO ; # [ doc = "`read()` method returns [addinfo::R](addinfo::R) reader structure" ] impl crate :: Readable for ADDINFO { } # [ doc = "Peripheral Additional Info register" ] pub mod addinfo { # [ doc = "Reader of register ADDINFO" ] pub type R = crate :: R < u8 , super :: ADDINFO > ; # [ doc = "Reader of field `IEHOST`" ] pub type IEHOST_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - This bit is set if host mode is enabled." ] # [ inline ( always ) ] pub fn iehost ( & self ) -> IEHOST_R { IEHOST_R :: new ( ( self . bits & 0x01 ) != 0 ) } } } # [ doc = "OTG Interrupt Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [otgistat](otgistat) module" ] pub type OTGISTAT = crate :: Reg < u8 , _OTGISTAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OTGISTAT ; # [ doc = "`read()` method returns [otgistat::R](otgistat::R) reader structure" ] impl crate :: Readable for OTGISTAT { } # [ doc = "`write(|w| ..)` method takes [otgistat::W](otgistat::W) writer structure" ] impl crate :: Writable for OTGISTAT { } # [ doc = "OTG Interrupt Status register" ] pub mod otgistat { # [ doc = "Reader of register OTGISTAT" ] pub type R = crate :: R < u8 , super :: OTGISTAT > ; # [ doc = "Writer for register OTGISTAT" ] pub type W = crate :: W < u8 , super :: OTGISTAT > ; # [ doc = "Register OTGISTAT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OTGISTAT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AVBUSCHG`" ] pub type AVBUSCHG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AVBUSCHG`" ] pub struct AVBUSCHG_W < 'a > { w : & 'a mut W , } impl < 'a > AVBUSCHG_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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `B_SESS_CHG`" ] pub type B_SESS_CHG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `B_SESS_CHG`" ] pub struct B_SESS_CHG_W < 'a > { w : & 'a mut W , } impl < 'a > B_SESS_CHG_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Reader of field `SESSVLDCHG`" ] pub type SESSVLDCHG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SESSVLDCHG`" ] pub struct SESSVLDCHG_W < 'a > { w : & 'a mut W , } impl < 'a > SESSVLDCHG_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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `LINE_STATE_CHG`" ] pub type LINE_STATE_CHG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `LINE_STATE_CHG`" ] pub struct LINE_STATE_CHG_W < 'a > { w : & 'a mut W , } impl < 'a > LINE_STATE_CHG_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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `ONEMSEC`" ] pub type ONEMSEC_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ONEMSEC`" ] pub struct ONEMSEC_W < 'a > { w : & 'a mut W , } impl < 'a > ONEMSEC_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `IDCHG`" ] pub type IDCHG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDCHG`" ] pub struct IDCHG_W < 'a > { w : & 'a mut W , } impl < 'a > IDCHG_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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - This bit is set when a change in VBUS is detected on an A device." ] # [ inline ( always ) ] pub fn avbuschg ( & self ) -> AVBUSCHG_R { AVBUSCHG_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - This bit is set when a change in VBUS is detected on a B device." ] # [ inline ( always ) ] pub fn b_sess_chg ( & self ) -> B_SESS_CHG_R { B_SESS_CHG_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - This bit is set when a change in VBUS is detected indicating a session valid or a session no longer valid" ] # [ inline ( always ) ] pub fn sessvldchg ( & self ) -> SESSVLDCHG_R { SESSVLDCHG_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - This interrupt is set when the USB line state (CTL\\[SE0\\] and CTL\\[JSTATE\\] bits) are stable without change for 1 millisecond, and the value of the line state is different from the last time when the line state was stable" ] # [ inline ( always ) ] pub fn line_state_chg ( & self ) -> LINE_STATE_CHG_R { LINE_STATE_CHG_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - This bit is set when the 1 millisecond timer expires" ] # [ inline ( always ) ] pub fn onemsec ( & self ) -> ONEMSEC_R { ONEMSEC_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - This bit is set when a change in the ID Signal from the USB connector is sensed." ] # [ inline ( always ) ] pub fn idchg ( & self ) -> IDCHG_R { IDCHG_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - This bit is set when a change in VBUS is detected on an A device." ] # [ inline ( always ) ] pub fn avbuschg ( & mut self ) -> AVBUSCHG_W { AVBUSCHG_W { w : self } } # [ doc = "Bit 2 - This bit is set when a change in VBUS is detected on a B device." ] # [ inline ( always ) ] pub fn b_sess_chg ( & mut self ) -> B_SESS_CHG_W { B_SESS_CHG_W { w : self } } # [ doc = "Bit 3 - This bit is set when a change in VBUS is detected indicating a session valid or a session no longer valid" ] # [ inline ( always ) ] pub fn sessvldchg ( & mut self ) -> SESSVLDCHG_W { SESSVLDCHG_W { w : self } } # [ doc = "Bit 5 - This interrupt is set when the USB line state (CTL\\[SE0\\] and CTL\\[JSTATE\\] bits) are stable without change for 1 millisecond, and the value of the line state is different from the last time when the line state was stable" ] # [ inline ( always ) ] pub fn line_state_chg ( & mut self ) -> LINE_STATE_CHG_W { LINE_STATE_CHG_W { w : self } } # [ doc = "Bit 6 - This bit is set when the 1 millisecond timer expires" ] # [ inline ( always ) ] pub fn onemsec ( & mut self ) -> ONEMSEC_W { ONEMSEC_W { w : self } } # [ doc = "Bit 7 - This bit is set when a change in the ID Signal from the USB connector is sensed." ] # [ inline ( always ) ] pub fn idchg ( & mut self ) -> IDCHG_W { IDCHG_W { w : self } } } } # [ doc = "OTG Interrupt Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [otgicr](otgicr) module" ] pub type OTGICR = crate :: Reg < u8 , _OTGICR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OTGICR ; # [ doc = "`read()` method returns [otgicr::R](otgicr::R) reader structure" ] impl crate :: Readable for OTGICR { } # [ doc = "`write(|w| ..)` method takes [otgicr::W](otgicr::W) writer structure" ] impl crate :: Writable for OTGICR { } # [ doc = "OTG Interrupt Control register" ] pub mod otgicr { # [ doc = "Reader of register OTGICR" ] pub type R = crate :: R < u8 , super :: OTGICR > ; # [ doc = "Writer for register OTGICR" ] pub type W = crate :: W < u8 , super :: OTGICR > ; # [ doc = "Register OTGICR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OTGICR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "A VBUS Valid Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVBUSEN_A { # [ doc = "0: Disables the AVBUSCHG interrupt." ] _0 , # [ doc = "1: Enables the AVBUSCHG interrupt." ] _1 } impl From < AVBUSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : AVBUSEN_A ) -> Self { match variant { AVBUSEN_A :: _0 => false , AVBUSEN_A :: _1 => true } } } # [ doc = "Reader of field `AVBUSEN`" ] pub type AVBUSEN_R = crate :: R < bool , AVBUSEN_A > ; impl AVBUSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVBUSEN_A { match self . bits { false => AVBUSEN_A :: _0 , true => AVBUSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVBUSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVBUSEN_A :: _1 } } # [ doc = "Write proxy for field `AVBUSEN`" ] pub struct AVBUSEN_W < 'a > { w : & 'a mut W , } impl < 'a > AVBUSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVBUSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the AVBUSCHG interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AVBUSEN_A :: _0 ) } # [ doc = "Enables the AVBUSCHG interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AVBUSEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "B Session END Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BSESSEN_A { # [ doc = "0: Disables the B_SESS_CHG interrupt." ] _0 , # [ doc = "1: Enables the B_SESS_CHG interrupt." ] _1 } impl From < BSESSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BSESSEN_A ) -> Self { match variant { BSESSEN_A :: _0 => false , BSESSEN_A :: _1 => true } } } # [ doc = "Reader of field `BSESSEN`" ] pub type BSESSEN_R = crate :: R < bool , BSESSEN_A > ; impl BSESSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BSESSEN_A { match self . bits { false => BSESSEN_A :: _0 , true => BSESSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BSESSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BSESSEN_A :: _1 } } # [ doc = "Write proxy for field `BSESSEN`" ] pub struct BSESSEN_W < 'a > { w : & 'a mut W , } impl < 'a > BSESSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BSESSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the B_SESS_CHG interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BSESSEN_A :: _0 ) } # [ doc = "Enables the B_SESS_CHG interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BSESSEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Session Valid Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SESSVLDEN_A { # [ doc = "0: Disables the SESSVLDCHG interrupt." ] _0 , # [ doc = "1: Enables the SESSVLDCHG interrupt." ] _1 } impl From < SESSVLDEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SESSVLDEN_A ) -> Self { match variant { SESSVLDEN_A :: _0 => false , SESSVLDEN_A :: _1 => true } } } # [ doc = "Reader of field `SESSVLDEN`" ] pub type SESSVLDEN_R = crate :: R < bool , SESSVLDEN_A > ; impl SESSVLDEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SESSVLDEN_A { match self . bits { false => SESSVLDEN_A :: _0 , true => SESSVLDEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SESSVLDEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SESSVLDEN_A :: _1 } } # [ doc = "Write proxy for field `SESSVLDEN`" ] pub struct SESSVLDEN_W < 'a > { w : & 'a mut W , } impl < 'a > SESSVLDEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SESSVLDEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the SESSVLDCHG interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SESSVLDEN_A :: _0 ) } # [ doc = "Enables the SESSVLDCHG interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SESSVLDEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Line State Change Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LINESTATEEN_A { # [ doc = "0: Disables the LINE_STAT_CHG interrupt." ] _0 , # [ doc = "1: Enables the LINE_STAT_CHG interrupt." ] _1 } impl From < LINESTATEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : LINESTATEEN_A ) -> Self { match variant { LINESTATEEN_A :: _0 => false , LINESTATEEN_A :: _1 => true } } } # [ doc = "Reader of field `LINESTATEEN`" ] pub type LINESTATEEN_R = crate :: R < bool , LINESTATEEN_A > ; impl LINESTATEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LINESTATEEN_A { match self . bits { false => LINESTATEEN_A :: _0 , true => LINESTATEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LINESTATEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LINESTATEEN_A :: _1 } } # [ doc = "Write proxy for field `LINESTATEEN`" ] pub struct LINESTATEEN_W < 'a > { w : & 'a mut W , } impl < 'a > LINESTATEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LINESTATEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the LINE_STAT_CHG interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LINESTATEEN_A :: _0 ) } # [ doc = "Enables the LINE_STAT_CHG interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LINESTATEEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "One Millisecond Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ONEMSECEN_A { # [ doc = "0: Diables the 1ms timer interrupt." ] _0 , # [ doc = "1: Enables the 1ms timer interrupt." ] _1 } impl From < ONEMSECEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ONEMSECEN_A ) -> Self { match variant { ONEMSECEN_A :: _0 => false , ONEMSECEN_A :: _1 => true } } } # [ doc = "Reader of field `ONEMSECEN`" ] pub type ONEMSECEN_R = crate :: R < bool , ONEMSECEN_A > ; impl ONEMSECEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ONEMSECEN_A { match self . bits { false => ONEMSECEN_A :: _0 , true => ONEMSECEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ONEMSECEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ONEMSECEN_A :: _1 } } # [ doc = "Write proxy for field `ONEMSECEN`" ] pub struct ONEMSECEN_W < 'a > { w : & 'a mut W , } impl < 'a > ONEMSECEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ONEMSECEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Diables the 1ms timer interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ONEMSECEN_A :: _0 ) } # [ doc = "Enables the 1ms timer interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ONEMSECEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "ID Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDEN_A { # [ doc = "0: The ID interrupt is disabled" ] _0 , # [ doc = "1: The ID interrupt is enabled" ] _1 } impl From < IDEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IDEN_A ) -> Self { match variant { IDEN_A :: _0 => false , IDEN_A :: _1 => true } } } # [ doc = "Reader of field `IDEN`" ] pub type IDEN_R = crate :: R < bool , IDEN_A > ; impl IDEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDEN_A { match self . bits { false => IDEN_A :: _0 , true => IDEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDEN_A :: _1 } } # [ doc = "Write proxy for field `IDEN`" ] pub struct IDEN_W < 'a > { w : & 'a mut W , } impl < 'a > IDEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IDEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The ID interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IDEN_A :: _0 ) } # [ doc = "The ID interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IDEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - A VBUS Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn avbusen ( & self ) -> AVBUSEN_R { AVBUSEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - B Session END Interrupt Enable" ] # [ inline ( always ) ] pub fn bsessen ( & self ) -> BSESSEN_R { BSESSEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Session Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn sessvlden ( & self ) -> SESSVLDEN_R { SESSVLDEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Line State Change Interrupt Enable" ] # [ inline ( always ) ] pub fn linestateen ( & self ) -> LINESTATEEN_R { LINESTATEEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - One Millisecond Interrupt Enable" ] # [ inline ( always ) ] pub fn onemsecen ( & self ) -> ONEMSECEN_R { ONEMSECEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - ID Interrupt Enable" ] # [ inline ( always ) ] pub fn iden ( & self ) -> IDEN_R { IDEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - A VBUS Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn avbusen ( & mut self ) -> AVBUSEN_W { AVBUSEN_W { w : self } } # [ doc = "Bit 2 - B Session END Interrupt Enable" ] # [ inline ( always ) ] pub fn bsessen ( & mut self ) -> BSESSEN_W { BSESSEN_W { w : self } } # [ doc = "Bit 3 - Session Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn sessvlden ( & mut self ) -> SESSVLDEN_W { SESSVLDEN_W { w : self } } # [ doc = "Bit 5 - Line State Change Interrupt Enable" ] # [ inline ( always ) ] pub fn linestateen ( & mut self ) -> LINESTATEEN_W { LINESTATEEN_W { w : self } } # [ doc = "Bit 6 - One Millisecond Interrupt Enable" ] # [ inline ( always ) ] pub fn onemsecen ( & mut self ) -> ONEMSECEN_W { ONEMSECEN_W { w : self } } # [ doc = "Bit 7 - ID Interrupt Enable" ] # [ inline ( always ) ] pub fn iden ( & mut self ) -> IDEN_W { IDEN_W { w : self } } } } # [ doc = "OTG Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [otgstat](otgstat) module" ] pub type OTGSTAT = crate :: Reg < u8 , _OTGSTAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OTGSTAT ; # [ doc = "`read()` method returns [otgstat::R](otgstat::R) reader structure" ] impl crate :: Readable for OTGSTAT { } # [ doc = "`write(|w| ..)` method takes [otgstat::W](otgstat::W) writer structure" ] impl crate :: Writable for OTGSTAT { } # [ doc = "OTG Status register" ] pub mod otgstat { # [ doc = "Reader of register OTGSTAT" ] pub type R = crate :: R < u8 , super :: OTGSTAT > ; # [ doc = "Writer for register OTGSTAT" ] pub type W = crate :: W < u8 , super :: OTGSTAT > ; # [ doc = "Register OTGSTAT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OTGSTAT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "A VBUS Valid\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVBUSVLD_A { # [ doc = "0: The VBUS voltage is below the A VBUS Valid threshold." ] _0 , # [ doc = "1: The VBUS voltage is above the A VBUS Valid threshold." ] _1 } impl From < AVBUSVLD_A > for bool { # [ inline ( always ) ] fn from ( variant : AVBUSVLD_A ) -> Self { match variant { AVBUSVLD_A :: _0 => false , AVBUSVLD_A :: _1 => true } } } # [ doc = "Reader of field `AVBUSVLD`" ] pub type AVBUSVLD_R = crate :: R < bool , AVBUSVLD_A > ; impl AVBUSVLD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVBUSVLD_A { match self . bits { false => AVBUSVLD_A :: _0 , true => AVBUSVLD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVBUSVLD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVBUSVLD_A :: _1 } } # [ doc = "Write proxy for field `AVBUSVLD`" ] pub struct AVBUSVLD_W < 'a > { w : & 'a mut W , } impl < 'a > AVBUSVLD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVBUSVLD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The VBUS voltage is below the A VBUS Valid threshold." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AVBUSVLD_A :: _0 ) } # [ doc = "The VBUS voltage is above the A VBUS Valid threshold." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AVBUSVLD_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "B Session End\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BSESSEND_A { # [ doc = "0: The VBUS voltage is above the B session end threshold." ] _0 , # [ doc = "1: The VBUS voltage is below the B session end threshold." ] _1 } impl From < BSESSEND_A > for bool { # [ inline ( always ) ] fn from ( variant : BSESSEND_A ) -> Self { match variant { BSESSEND_A :: _0 => false , BSESSEND_A :: _1 => true } } } # [ doc = "Reader of field `BSESSEND`" ] pub type BSESSEND_R = crate :: R < bool , BSESSEND_A > ; impl BSESSEND_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BSESSEND_A { match self . bits { false => BSESSEND_A :: _0 , true => BSESSEND_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BSESSEND_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BSESSEND_A :: _1 } } # [ doc = "Write proxy for field `BSESSEND`" ] pub struct BSESSEND_W < 'a > { w : & 'a mut W , } impl < 'a > BSESSEND_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BSESSEND_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The VBUS voltage is above the B session end threshold." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BSESSEND_A :: _0 ) } # [ doc = "The VBUS voltage is below the B session end threshold." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BSESSEND_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Session Valid\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SESS_VLD_A { # [ doc = "0: The VBUS voltage is below the B session valid threshold" ] _0 , # [ doc = "1: The VBUS voltage is above the B session valid threshold." ] _1 } impl From < SESS_VLD_A > for bool { # [ inline ( always ) ] fn from ( variant : SESS_VLD_A ) -> Self { match variant { SESS_VLD_A :: _0 => false , SESS_VLD_A :: _1 => true } } } # [ doc = "Reader of field `SESS_VLD`" ] pub type SESS_VLD_R = crate :: R < bool , SESS_VLD_A > ; impl SESS_VLD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SESS_VLD_A { match self . bits { false => SESS_VLD_A :: _0 , true => SESS_VLD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SESS_VLD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SESS_VLD_A :: _1 } } # [ doc = "Write proxy for field `SESS_VLD`" ] pub struct SESS_VLD_W < 'a > { w : & 'a mut W , } impl < 'a > SESS_VLD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SESS_VLD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The VBUS voltage is below the B session valid threshold" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SESS_VLD_A :: _0 ) } # [ doc = "The VBUS voltage is above the B session valid threshold." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SESS_VLD_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Indicates that the internal signals that control the LINE_STATE_CHG field of OTGISTAT are stable for at least 1 ms\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LINESTATESTABLE_A { # [ doc = "0: The LINE_STAT_CHG bit is not yet stable." ] _0 , # [ doc = "1: The LINE_STAT_CHG bit has been debounced and is stable." ] _1 } impl From < LINESTATESTABLE_A > for bool { # [ inline ( always ) ] fn from ( variant : LINESTATESTABLE_A ) -> Self { match variant { LINESTATESTABLE_A :: _0 => false , LINESTATESTABLE_A :: _1 => true } } } # [ doc = "Reader of field `LINESTATESTABLE`" ] pub type LINESTATESTABLE_R = crate :: R < bool , LINESTATESTABLE_A > ; impl LINESTATESTABLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LINESTATESTABLE_A { match self . bits { false => LINESTATESTABLE_A :: _0 , true => LINESTATESTABLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LINESTATESTABLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LINESTATESTABLE_A :: _1 } } # [ doc = "Write proxy for field `LINESTATESTABLE`" ] pub struct LINESTATESTABLE_W < 'a > { w : & 'a mut W , } impl < 'a > LINESTATESTABLE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LINESTATESTABLE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The LINE_STAT_CHG bit is not yet stable." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LINESTATESTABLE_A :: _0 ) } # [ doc = "The LINE_STAT_CHG bit has been debounced and is stable." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LINESTATESTABLE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `ONEMSECEN`" ] pub type ONEMSECEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ONEMSECEN`" ] pub struct ONEMSECEN_W < 'a > { w : & 'a mut W , } impl < 'a > ONEMSECEN_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Indicates the current state of the ID pin on the USB connector\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ID_A { # [ doc = "0: Indicates a Type A cable is plugged into the USB connector." ] _0 , # [ doc = "1: Indicates no cable is attached or a Type B cable is plugged into the USB connector." ] _1 } impl From < ID_A > for bool { # [ inline ( always ) ] fn from ( variant : ID_A ) -> Self { match variant { ID_A :: _0 => false , ID_A :: _1 => true } } } # [ doc = "Reader of field `ID`" ] pub type ID_R = crate :: R < bool , ID_A > ; impl ID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ID_A { match self . bits { false => ID_A :: _0 , true => ID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ID_A :: _1 } } # [ doc = "Write proxy for field `ID`" ] pub struct ID_W < 'a > { w : & 'a mut W , } impl < 'a > ID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Indicates a Type A cable is plugged into the USB connector." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ID_A :: _0 ) } # [ doc = "Indicates no cable is attached or a Type B cable is plugged into the USB connector." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ID_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - A VBUS Valid" ] # [ inline ( always ) ] pub fn avbusvld ( & self ) -> AVBUSVLD_R { AVBUSVLD_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - B Session End" ] # [ inline ( always ) ] pub fn bsessend ( & self ) -> BSESSEND_R { BSESSEND_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Session Valid" ] # [ inline ( always ) ] pub fn sess_vld ( & self ) -> SESS_VLD_R { SESS_VLD_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Indicates that the internal signals that control the LINE_STATE_CHG field of OTGISTAT are stable for at least 1 ms" ] # [ inline ( always ) ] pub fn linestatestable ( & self ) -> LINESTATESTABLE_R { LINESTATESTABLE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - This bit is reserved for the 1ms count, but it is not useful to software." ] # [ inline ( always ) ] pub fn onemsecen ( & self ) -> ONEMSECEN_R { ONEMSECEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Indicates the current state of the ID pin on the USB connector" ] # [ inline ( always ) ] pub fn id ( & self ) -> ID_R { ID_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - A VBUS Valid" ] # [ inline ( always ) ] pub fn avbusvld ( & mut self ) -> AVBUSVLD_W { AVBUSVLD_W { w : self } } # [ doc = "Bit 2 - B Session End" ] # [ inline ( always ) ] pub fn bsessend ( & mut self ) -> BSESSEND_W { BSESSEND_W { w : self } } # [ doc = "Bit 3 - Session Valid" ] # [ inline ( always ) ] pub fn sess_vld ( & mut self ) -> SESS_VLD_W { SESS_VLD_W { w : self } } # [ doc = "Bit 5 - Indicates that the internal signals that control the LINE_STATE_CHG field of OTGISTAT are stable for at least 1 ms" ] # [ inline ( always ) ] pub fn linestatestable ( & mut self ) -> LINESTATESTABLE_W { LINESTATESTABLE_W { w : self } } # [ doc = "Bit 6 - This bit is reserved for the 1ms count, but it is not useful to software." ] # [ inline ( always ) ] pub fn onemsecen ( & mut self ) -> ONEMSECEN_W { ONEMSECEN_W { w : self } } # [ doc = "Bit 7 - Indicates the current state of the ID pin on the USB connector" ] # [ inline ( always ) ] pub fn id ( & mut self ) -> ID_W { ID_W { w : self } } } } # [ doc = "OTG Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [otgctl](otgctl) module" ] pub type OTGCTL = crate :: Reg < u8 , _OTGCTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OTGCTL ; # [ doc = "`read()` method returns [otgctl::R](otgctl::R) reader structure" ] impl crate :: Readable for OTGCTL { } # [ doc = "`write(|w| ..)` method takes [otgctl::W](otgctl::W) writer structure" ] impl crate :: Writable for OTGCTL { } # [ doc = "OTG Control register" ] pub mod otgctl { # [ doc = "Reader of register OTGCTL" ] pub type R = crate :: R < u8 , super :: OTGCTL > ; # [ doc = "Writer for register OTGCTL" ] pub type W = crate :: W < u8 , super :: OTGCTL > ; # [ doc = "Register OTGCTL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: OTGCTL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "On-The-Go pullup/pulldown resistor enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OTGEN_A { # [ doc = "0: If USB_EN is 1 and HOST_MODE is 0 in the Control Register (CTL), then the D+ Data Line pull-up resistors are enabled. If HOST_MODE is 1 the D+ and D- Data Line pull-down resistors are engaged." ] _0 , # [ doc = "1: The pull-up and pull-down controls in this register are used." ] _1 } impl From < OTGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : OTGEN_A ) -> Self { match variant { OTGEN_A :: _0 => false , OTGEN_A :: _1 => true } } } # [ doc = "Reader of field `OTGEN`" ] pub type OTGEN_R = crate :: R < bool , OTGEN_A > ; impl OTGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OTGEN_A { match self . bits { false => OTGEN_A :: _0 , true => OTGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OTGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OTGEN_A :: _1 } } # [ doc = "Write proxy for field `OTGEN`" ] pub struct OTGEN_W < 'a > { w : & 'a mut W , } impl < 'a > OTGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OTGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "If USB_EN is 1 and HOST_MODE is 0 in the Control Register (CTL), then the D+ Data Line pull-up resistors are enabled. If HOST_MODE is 1 the D+ and D- Data Line pull-down resistors are engaged." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OTGEN_A :: _0 ) } # [ doc = "The pull-up and pull-down controls in this register are used." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OTGEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "D- Data Line pull-down resistor enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMLOW_A { # [ doc = "0: D- pulldown resistor is not enabled." ] _0 , # [ doc = "1: D- pulldown resistor is enabled." ] _1 } impl From < DMLOW_A > for bool { # [ inline ( always ) ] fn from ( variant : DMLOW_A ) -> Self { match variant { DMLOW_A :: _0 => false , DMLOW_A :: _1 => true } } } # [ doc = "Reader of field `DMLOW`" ] pub type DMLOW_R = crate :: R < bool , DMLOW_A > ; impl DMLOW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMLOW_A { match self . bits { false => DMLOW_A :: _0 , true => DMLOW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMLOW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMLOW_A :: _1 } } # [ doc = "Write proxy for field `DMLOW`" ] pub struct DMLOW_W < 'a > { w : & 'a mut W , } impl < 'a > DMLOW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMLOW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "D- pulldown resistor is not enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMLOW_A :: _0 ) } # [ doc = "D- pulldown resistor is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMLOW_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "D+ Data Line pull-down resistor enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPLOW_A { # [ doc = "0: D+ pulldown resistor is not enabled." ] _0 , # [ doc = "1: D+ pulldown resistor is enabled." ] _1 } impl From < DPLOW_A > for bool { # [ inline ( always ) ] fn from ( variant : DPLOW_A ) -> Self { match variant { DPLOW_A :: _0 => false , DPLOW_A :: _1 => true } } } # [ doc = "Reader of field `DPLOW`" ] pub type DPLOW_R = crate :: R < bool , DPLOW_A > ; impl DPLOW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPLOW_A { match self . bits { false => DPLOW_A :: _0 , true => DPLOW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPLOW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPLOW_A :: _1 } } # [ doc = "Write proxy for field `DPLOW`" ] pub struct DPLOW_W < 'a > { w : & 'a mut W , } impl < 'a > DPLOW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPLOW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "D+ pulldown resistor is not enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPLOW_A :: _0 ) } # [ doc = "D+ pulldown resistor is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPLOW_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "D+ Data Line pullup resistor enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPHIGH_A { # [ doc = "0: D+ pullup resistor is not enabled" ] _0 , # [ doc = "1: D+ pullup resistor is enabled" ] _1 } impl From < DPHIGH_A > for bool { # [ inline ( always ) ] fn from ( variant : DPHIGH_A ) -> Self { match variant { DPHIGH_A :: _0 => false , DPHIGH_A :: _1 => true } } } # [ doc = "Reader of field `DPHIGH`" ] pub type DPHIGH_R = crate :: R < bool , DPHIGH_A > ; impl DPHIGH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPHIGH_A { match self . bits { false => DPHIGH_A :: _0 , true => DPHIGH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPHIGH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPHIGH_A :: _1 } } # [ doc = "Write proxy for field `DPHIGH`" ] pub struct DPHIGH_W < 'a > { w : & 'a mut W , } impl < 'a > DPHIGH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPHIGH_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "D+ pullup resistor is not enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPHIGH_A :: _0 ) } # [ doc = "D+ pullup resistor is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPHIGH_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 2 - On-The-Go pullup/pulldown resistor enable" ] # [ inline ( always ) ] pub fn otgen ( & self ) -> OTGEN_R { OTGEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - D- Data Line pull-down resistor enable" ] # [ inline ( always ) ] pub fn dmlow ( & self ) -> DMLOW_R { DMLOW_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - D+ Data Line pull-down resistor enable" ] # [ inline ( always ) ] pub fn dplow ( & self ) -> DPLOW_R { DPLOW_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - D+ Data Line pullup resistor enable" ] # [ inline ( always ) ] pub fn dphigh ( & self ) -> DPHIGH_R { DPHIGH_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 2 - On-The-Go pullup/pulldown resistor enable" ] # [ inline ( always ) ] pub fn otgen ( & mut self ) -> OTGEN_W { OTGEN_W { w : self } } # [ doc = "Bit 4 - D- Data Line pull-down resistor enable" ] # [ inline ( always ) ] pub fn dmlow ( & mut self ) -> DMLOW_W { DMLOW_W { w : self } } # [ doc = "Bit 5 - D+ Data Line pull-down resistor enable" ] # [ inline ( always ) ] pub fn dplow ( & mut self ) -> DPLOW_W { DPLOW_W { w : self } } # [ doc = "Bit 7 - D+ Data Line pullup resistor enable" ] # [ inline ( always ) ] pub fn dphigh ( & mut self ) -> DPHIGH_W { DPHIGH_W { w : self } } } } # [ doc = "Interrupt Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [istat](istat) module" ] pub type ISTAT = crate :: Reg < u8 , _ISTAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ISTAT ; # [ doc = "`read()` method returns [istat::R](istat::R) reader structure" ] impl crate :: Readable for ISTAT { } # [ doc = "`write(|w| ..)` method takes [istat::W](istat::W) writer structure" ] impl crate :: Writable for ISTAT { } # [ doc = "Interrupt Status register" ] pub mod istat { # [ doc = "Reader of register ISTAT" ] pub type R = crate :: R < u8 , super :: ISTAT > ; # [ doc = "Writer for register ISTAT" ] pub type W = crate :: W < u8 , super :: ISTAT > ; # [ doc = "Register ISTAT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ISTAT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `USBRST`" ] pub type USBRST_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `USBRST`" ] pub struct USBRST_W < 'a > { w : & 'a mut W , } impl < 'a > USBRST_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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ERROR`" ] pub type ERROR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ERROR`" ] pub struct ERROR_W < 'a > { w : & 'a mut W , } impl < 'a > ERROR_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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Reader of field `SOFTOK`" ] pub type SOFTOK_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SOFTOK`" ] pub struct SOFTOK_W < 'a > { w : & 'a mut W , } impl < 'a > SOFTOK_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Reader of field `TOKDNE`" ] pub type TOKDNE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TOKDNE`" ] pub struct TOKDNE_W < 'a > { w : & 'a mut W , } impl < 'a > TOKDNE_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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `SLEEP`" ] pub type SLEEP_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SLEEP`" ] pub struct SLEEP_W < 'a > { w : & 'a mut W , } impl < 'a > SLEEP_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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `RESUME`" ] pub type RESUME_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RESUME`" ] pub struct RESUME_W < 'a > { w : & 'a mut W , } impl < 'a > RESUME_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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Attach Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ATTACH_A { # [ doc = "0: No Attach is detected since the last time the ATTACH bit was cleared." ] _0 , # [ doc = "1: A peripheral is now present and must be configured (a stable non-SE0 state is detected for more than 2.5 us)." ] _1 } impl From < ATTACH_A > for bool { # [ inline ( always ) ] fn from ( variant : ATTACH_A ) -> Self { match variant { ATTACH_A :: _0 => false , ATTACH_A :: _1 => true } } } # [ doc = "Reader of field `ATTACH`" ] pub type ATTACH_R = crate :: R < bool , ATTACH_A > ; impl ATTACH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ATTACH_A { match self . bits { false => ATTACH_A :: _0 , true => ATTACH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ATTACH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ATTACH_A :: _1 } } # [ doc = "Write proxy for field `ATTACH`" ] pub struct ATTACH_W < 'a > { w : & 'a mut W , } impl < 'a > ATTACH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ATTACH_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No Attach is detected since the last time the ATTACH bit was cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ATTACH_A :: _0 ) } # [ doc = "A peripheral is now present and must be configured (a stable non-SE0 state is detected for more than 2.5 us)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ATTACH_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `STALL`" ] pub type STALL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `STALL`" ] pub struct STALL_W < 'a > { w : & 'a mut W , } impl < 'a > STALL_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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - This bit is set when the USB Module has decoded a valid USB reset" ] # [ inline ( always ) ] pub fn usbrst ( & self ) -> USBRST_R { USBRST_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - This bit is set when any of the error conditions within Error Interrupt Status (ERRSTAT) register occur" ] # [ inline ( always ) ] pub fn error ( & self ) -> ERROR_R { ERROR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - This bit is set when the USB Module receives a Start Of Frame (SOF) token" ] # [ inline ( always ) ] pub fn softok ( & self ) -> SOFTOK_R { SOFTOK_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - This bit is set when the current token being processed has completed" ] # [ inline ( always ) ] pub fn tokdne ( & self ) -> TOKDNE_R { TOKDNE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - This bit is set when the USB Module detects a constant idle on the USB bus for 3 ms" ] # [ inline ( always ) ] pub fn sleep ( & self ) -> SLEEP_R { SLEEP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - This bit is set when a K-state is observed on the DP/DM signals for 2" ] # [ inline ( always ) ] pub fn resume ( & self ) -> RESUME_R { RESUME_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Attach Interrupt" ] # [ inline ( always ) ] pub fn attach ( & self ) -> ATTACH_R { ATTACH_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Stall Interrupt" ] # [ inline ( always ) ] pub fn stall ( & self ) -> STALL_R { STALL_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - This bit is set when the USB Module has decoded a valid USB reset" ] # [ inline ( always ) ] pub fn usbrst ( & mut self ) -> USBRST_W { USBRST_W { w : self } } # [ doc = "Bit 1 - This bit is set when any of the error conditions within Error Interrupt Status (ERRSTAT) register occur" ] # [ inline ( always ) ] pub fn error ( & mut self ) -> ERROR_W { ERROR_W { w : self } } # [ doc = "Bit 2 - This bit is set when the USB Module receives a Start Of Frame (SOF) token" ] # [ inline ( always ) ] pub fn softok ( & mut self ) -> SOFTOK_W { SOFTOK_W { w : self } } # [ doc = "Bit 3 - This bit is set when the current token being processed has completed" ] # [ inline ( always ) ] pub fn tokdne ( & mut self ) -> TOKDNE_W { TOKDNE_W { w : self } } # [ doc = "Bit 4 - This bit is set when the USB Module detects a constant idle on the USB bus for 3 ms" ] # [ inline ( always ) ] pub fn sleep ( & mut self ) -> SLEEP_W { SLEEP_W { w : self } } # [ doc = "Bit 5 - This bit is set when a K-state is observed on the DP/DM signals for 2" ] # [ inline ( always ) ] pub fn resume ( & mut self ) -> RESUME_W { RESUME_W { w : self } } # [ doc = "Bit 6 - Attach Interrupt" ] # [ inline ( always ) ] pub fn attach ( & mut self ) -> ATTACH_W { ATTACH_W { w : self } } # [ doc = "Bit 7 - Stall Interrupt" ] # [ inline ( always ) ] pub fn stall ( & mut self ) -> STALL_W { STALL_W { w : self } } } } # [ doc = "Interrupt Enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [inten](inten) module" ] pub type INTEN = crate :: Reg < u8 , _INTEN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _INTEN ; # [ doc = "`read()` method returns [inten::R](inten::R) reader structure" ] impl crate :: Readable for INTEN { } # [ doc = "`write(|w| ..)` method takes [inten::W](inten::W) writer structure" ] impl crate :: Writable for INTEN { } # [ doc = "Interrupt Enable register" ] pub mod inten { # [ doc = "Reader of register INTEN" ] pub type R = crate :: R < u8 , super :: INTEN > ; # [ doc = "Writer for register INTEN" ] pub type W = crate :: W < u8 , super :: INTEN > ; # [ doc = "Register INTEN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: INTEN { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "USBRST Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBRSTEN_A { # [ doc = "0: Disables the USBRST interrupt." ] _0 , # [ doc = "1: Enables the USBRST interrupt." ] _1 } impl From < USBRSTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : USBRSTEN_A ) -> Self { match variant { USBRSTEN_A :: _0 => false , USBRSTEN_A :: _1 => true } } } # [ doc = "Reader of field `USBRSTEN`" ] pub type USBRSTEN_R = crate :: R < bool , USBRSTEN_A > ; impl USBRSTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBRSTEN_A { match self . bits { false => USBRSTEN_A :: _0 , true => USBRSTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBRSTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBRSTEN_A :: _1 } } # [ doc = "Write proxy for field `USBRSTEN`" ] pub struct USBRSTEN_W < 'a > { w : & 'a mut W , } impl < 'a > USBRSTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBRSTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the USBRST interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBRSTEN_A :: _0 ) } # [ doc = "Enables the USBRST interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBRSTEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "ERROR Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERROREN_A { # [ doc = "0: Disables the ERROR interrupt." ] _0 , # [ doc = "1: Enables the ERROR interrupt." ] _1 } impl From < ERROREN_A > for bool { # [ inline ( always ) ] fn from ( variant : ERROREN_A ) -> Self { match variant { ERROREN_A :: _0 => false , ERROREN_A :: _1 => true } } } # [ doc = "Reader of field `ERROREN`" ] pub type ERROREN_R = crate :: R < bool , ERROREN_A > ; impl ERROREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERROREN_A { match self . bits { false => ERROREN_A :: _0 , true => ERROREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERROREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERROREN_A :: _1 } } # [ doc = "Write proxy for field `ERROREN`" ] pub struct ERROREN_W < 'a > { w : & 'a mut W , } impl < 'a > ERROREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ERROREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the ERROR interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ERROREN_A :: _0 ) } # [ doc = "Enables the ERROR interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ERROREN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "SOFTOK Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SOFTOKEN_A { # [ doc = "0: Disbles the SOFTOK interrupt." ] _0 , # [ doc = "1: Enables the SOFTOK interrupt." ] _1 } impl From < SOFTOKEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SOFTOKEN_A ) -> Self { match variant { SOFTOKEN_A :: _0 => false , SOFTOKEN_A :: _1 => true } } } # [ doc = "Reader of field `SOFTOKEN`" ] pub type SOFTOKEN_R = crate :: R < bool , SOFTOKEN_A > ; impl SOFTOKEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SOFTOKEN_A { match self . bits { false => SOFTOKEN_A :: _0 , true => SOFTOKEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SOFTOKEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SOFTOKEN_A :: _1 } } # [ doc = "Write proxy for field `SOFTOKEN`" ] pub struct SOFTOKEN_W < 'a > { w : & 'a mut W , } impl < 'a > SOFTOKEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SOFTOKEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disbles the SOFTOK interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SOFTOKEN_A :: _0 ) } # [ doc = "Enables the SOFTOK interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SOFTOKEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "TOKDNE Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOKDNEEN_A { # [ doc = "0: Disables the TOKDNE interrupt." ] _0 , # [ doc = "1: Enables the TOKDNE interrupt." ] _1 } impl From < TOKDNEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : TOKDNEEN_A ) -> Self { match variant { TOKDNEEN_A :: _0 => false , TOKDNEEN_A :: _1 => true } } } # [ doc = "Reader of field `TOKDNEEN`" ] pub type TOKDNEEN_R = crate :: R < bool , TOKDNEEN_A > ; impl TOKDNEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOKDNEEN_A { match self . bits { false => TOKDNEEN_A :: _0 , true => TOKDNEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOKDNEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOKDNEEN_A :: _1 } } # [ doc = "Write proxy for field `TOKDNEEN`" ] pub struct TOKDNEEN_W < 'a > { w : & 'a mut W , } impl < 'a > TOKDNEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOKDNEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the TOKDNE interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOKDNEEN_A :: _0 ) } # [ doc = "Enables the TOKDNE interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOKDNEEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "SLEEP Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEPEN_A { # [ doc = "0: Disables the SLEEP interrupt." ] _0 , # [ doc = "1: Enables the SLEEP interrupt." ] _1 } impl From < SLEEPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : SLEEPEN_A ) -> Self { match variant { SLEEPEN_A :: _0 => false , SLEEPEN_A :: _1 => true } } } # [ doc = "Reader of field `SLEEPEN`" ] pub type SLEEPEN_R = crate :: R < bool , SLEEPEN_A > ; impl SLEEPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLEEPEN_A { match self . bits { false => SLEEPEN_A :: _0 , true => SLEEPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLEEPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLEEPEN_A :: _1 } } # [ doc = "Write proxy for field `SLEEPEN`" ] pub struct SLEEPEN_W < 'a > { w : & 'a mut W , } impl < 'a > SLEEPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLEEPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the SLEEP interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLEEPEN_A :: _0 ) } # [ doc = "Enables the SLEEP interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLEEPEN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "RESUME Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESUMEEN_A { # [ doc = "0: Disables the RESUME interrupt." ] _0 , # [ doc = "1: Enables the RESUME interrupt." ] _1 } impl From < RESUMEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : RESUMEEN_A ) -> Self { match variant { RESUMEEN_A :: _0 => false , RESUMEEN_A :: _1 => true } } } # [ doc = "Reader of field `RESUMEEN`" ] pub type RESUMEEN_R = crate :: R < bool , RESUMEEN_A > ; impl RESUMEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RESUMEEN_A { match self . bits { false => RESUMEEN_A :: _0 , true => RESUMEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RESUMEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RESUMEEN_A :: _1 } } # [ doc = "Write proxy for field `RESUMEEN`" ] pub struct RESUMEEN_W < 'a > { w : & 'a mut W , } impl < 'a > RESUMEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RESUMEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the RESUME interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RESUMEEN_A :: _0 ) } # [ doc = "Enables the RESUME interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RESUMEEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "ATTACH Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ATTACHEN_A { # [ doc = "0: Disables the ATTACH interrupt." ] _0 , # [ doc = "1: Enables the ATTACH interrupt." ] _1 } impl From < ATTACHEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ATTACHEN_A ) -> Self { match variant { ATTACHEN_A :: _0 => false , ATTACHEN_A :: _1 => true } } } # [ doc = "Reader of field `ATTACHEN`" ] pub type ATTACHEN_R = crate :: R < bool , ATTACHEN_A > ; impl ATTACHEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ATTACHEN_A { match self . bits { false => ATTACHEN_A :: _0 , true => ATTACHEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ATTACHEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ATTACHEN_A :: _1 } } # [ doc = "Write proxy for field `ATTACHEN`" ] pub struct ATTACHEN_W < 'a > { w : & 'a mut W , } impl < 'a > ATTACHEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ATTACHEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the ATTACH interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ATTACHEN_A :: _0 ) } # [ doc = "Enables the ATTACH interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ATTACHEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "STALL Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STALLEN_A { # [ doc = "0: Diasbles the STALL interrupt." ] _0 , # [ doc = "1: Enables the STALL interrupt." ] _1 } impl From < STALLEN_A > for bool { # [ inline ( always ) ] fn from ( variant : STALLEN_A ) -> Self { match variant { STALLEN_A :: _0 => false , STALLEN_A :: _1 => true } } } # [ doc = "Reader of field `STALLEN`" ] pub type STALLEN_R = crate :: R < bool , STALLEN_A > ; impl STALLEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STALLEN_A { match self . bits { false => STALLEN_A :: _0 , true => STALLEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STALLEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STALLEN_A :: _1 } } # [ doc = "Write proxy for field `STALLEN`" ] pub struct STALLEN_W < 'a > { w : & 'a mut W , } impl < 'a > STALLEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STALLEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Diasbles the STALL interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STALLEN_A :: _0 ) } # [ doc = "Enables the STALL interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STALLEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - USBRST Interrupt Enable" ] # [ inline ( always ) ] pub fn usbrsten ( & self ) -> USBRSTEN_R { USBRSTEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - ERROR Interrupt Enable" ] # [ inline ( always ) ] pub fn erroren ( & self ) -> ERROREN_R { ERROREN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - SOFTOK Interrupt Enable" ] # [ inline ( always ) ] pub fn softoken ( & self ) -> SOFTOKEN_R { SOFTOKEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - TOKDNE Interrupt Enable" ] # [ inline ( always ) ] pub fn tokdneen ( & self ) -> TOKDNEEN_R { TOKDNEEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - SLEEP Interrupt Enable" ] # [ inline ( always ) ] pub fn sleepen ( & self ) -> SLEEPEN_R { SLEEPEN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - RESUME Interrupt Enable" ] # [ inline ( always ) ] pub fn resumeen ( & self ) -> RESUMEEN_R { RESUMEEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - ATTACH Interrupt Enable" ] # [ inline ( always ) ] pub fn attachen ( & self ) -> ATTACHEN_R { ATTACHEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - STALL Interrupt Enable" ] # [ inline ( always ) ] pub fn stallen ( & self ) -> STALLEN_R { STALLEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - USBRST Interrupt Enable" ] # [ inline ( always ) ] pub fn usbrsten ( & mut self ) -> USBRSTEN_W { USBRSTEN_W { w : self } } # [ doc = "Bit 1 - ERROR Interrupt Enable" ] # [ inline ( always ) ] pub fn erroren ( & mut self ) -> ERROREN_W { ERROREN_W { w : self } } # [ doc = "Bit 2 - SOFTOK Interrupt Enable" ] # [ inline ( always ) ] pub fn softoken ( & mut self ) -> SOFTOKEN_W { SOFTOKEN_W { w : self } } # [ doc = "Bit 3 - TOKDNE Interrupt Enable" ] # [ inline ( always ) ] pub fn tokdneen ( & mut self ) -> TOKDNEEN_W { TOKDNEEN_W { w : self } } # [ doc = "Bit 4 - SLEEP Interrupt Enable" ] # [ inline ( always ) ] pub fn sleepen ( & mut self ) -> SLEEPEN_W { SLEEPEN_W { w : self } } # [ doc = "Bit 5 - RESUME Interrupt Enable" ] # [ inline ( always ) ] pub fn resumeen ( & mut self ) -> RESUMEEN_W { RESUMEEN_W { w : self } } # [ doc = "Bit 6 - ATTACH Interrupt Enable" ] # [ inline ( always ) ] pub fn attachen ( & mut self ) -> ATTACHEN_W { ATTACHEN_W { w : self } } # [ doc = "Bit 7 - STALL Interrupt Enable" ] # [ inline ( always ) ] pub fn stallen ( & mut self ) -> STALLEN_W { STALLEN_W { w : self } } } } # [ doc = "Error Interrupt Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [errstat](errstat) module" ] pub type ERRSTAT = crate :: Reg < u8 , _ERRSTAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ERRSTAT ; # [ doc = "`read()` method returns [errstat::R](errstat::R) reader structure" ] impl crate :: Readable for ERRSTAT { } # [ doc = "`write(|w| ..)` method takes [errstat::W](errstat::W) writer structure" ] impl crate :: Writable for ERRSTAT { } # [ doc = "Error Interrupt Status register" ] pub mod errstat { # [ doc = "Reader of register ERRSTAT" ] pub type R = crate :: R < u8 , super :: ERRSTAT > ; # [ doc = "Writer for register ERRSTAT" ] pub type W = crate :: W < u8 , super :: ERRSTAT > ; # [ doc = "Register ERRSTAT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ERRSTAT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PIDERR`" ] pub type PIDERR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PIDERR`" ] pub struct PIDERR_W < 'a > { w : & 'a mut W , } impl < 'a > PIDERR_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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `CRC5EOF`" ] pub type CRC5EOF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CRC5EOF`" ] pub struct CRC5EOF_W < 'a > { w : & 'a mut W , } impl < 'a > CRC5EOF_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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Reader of field `CRC16`" ] pub type CRC16_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CRC16`" ] pub struct CRC16_W < 'a > { w : & 'a mut W , } impl < 'a > CRC16_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Reader of field `DFN8`" ] pub type DFN8_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DFN8`" ] pub struct DFN8_W < 'a > { w : & 'a mut W , } impl < 'a > DFN8_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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `BTOERR`" ] pub type BTOERR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BTOERR`" ] pub struct BTOERR_W < 'a > { w : & 'a mut W , } impl < 'a > BTOERR_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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `DMAERR`" ] pub type DMAERR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DMAERR`" ] pub struct DMAERR_W < 'a > { w : & 'a mut W , } impl < 'a > DMAERR_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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `BTSERR`" ] pub type BTSERR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BTSERR`" ] pub struct BTSERR_W < 'a > { w : & 'a mut W , } impl < 'a > BTSERR_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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - This bit is set when the PID check field fails." ] # [ inline ( always ) ] pub fn piderr ( & self ) -> PIDERR_R { PIDERR_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - This error interrupt has two functions" ] # [ inline ( always ) ] pub fn crc5eof ( & self ) -> CRC5EOF_R { CRC5EOF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - This bit is set when a data packet is rejected due to a CRC16 error." ] # [ inline ( always ) ] pub fn crc16 ( & self ) -> CRC16_R { CRC16_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - This bit is set if the data field received was not 8 bits in length" ] # [ inline ( always ) ] pub fn dfn8 ( & self ) -> DFN8_R { DFN8_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - This bit is set when a bus turnaround timeout error occurs" ] # [ inline ( always ) ] pub fn btoerr ( & self ) -> BTOERR_R { BTOERR_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - This bit is set if the USB Module has requested a DMA access to read a new BDT but has not been given the bus before it needs to receive or transmit data" ] # [ inline ( always ) ] pub fn dmaerr ( & self ) -> DMAERR_R { DMAERR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - This bit is set when a bit stuff error is detected" ] # [ inline ( always ) ] pub fn btserr ( & self ) -> BTSERR_R { BTSERR_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - This bit is set when the PID check field fails." ] # [ inline ( always ) ] pub fn piderr ( & mut self ) -> PIDERR_W { PIDERR_W { w : self } } # [ doc = "Bit 1 - This error interrupt has two functions" ] # [ inline ( always ) ] pub fn crc5eof ( & mut self ) -> CRC5EOF_W { CRC5EOF_W { w : self } } # [ doc = "Bit 2 - This bit is set when a data packet is rejected due to a CRC16 error." ] # [ inline ( always ) ] pub fn crc16 ( & mut self ) -> CRC16_W { CRC16_W { w : self } } # [ doc = "Bit 3 - This bit is set if the data field received was not 8 bits in length" ] # [ inline ( always ) ] pub fn dfn8 ( & mut self ) -> DFN8_W { DFN8_W { w : self } } # [ doc = "Bit 4 - This bit is set when a bus turnaround timeout error occurs" ] # [ inline ( always ) ] pub fn btoerr ( & mut self ) -> BTOERR_W { BTOERR_W { w : self } } # [ doc = "Bit 5 - This bit is set if the USB Module has requested a DMA access to read a new BDT but has not been given the bus before it needs to receive or transmit data" ] # [ inline ( always ) ] pub fn dmaerr ( & mut self ) -> DMAERR_W { DMAERR_W { w : self } } # [ doc = "Bit 7 - This bit is set when a bit stuff error is detected" ] # [ inline ( always ) ] pub fn btserr ( & mut self ) -> BTSERR_W { BTSERR_W { w : self } } } } # [ doc = "Error Interrupt Enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [erren](erren) module" ] pub type ERREN = crate :: Reg < u8 , _ERREN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ERREN ; # [ doc = "`read()` method returns [erren::R](erren::R) reader structure" ] impl crate :: Readable for ERREN { } # [ doc = "`write(|w| ..)` method takes [erren::W](erren::W) writer structure" ] impl crate :: Writable for ERREN { } # [ doc = "Error Interrupt Enable register" ] pub mod erren { # [ doc = "Reader of register ERREN" ] pub type R = crate :: R < u8 , super :: ERREN > ; # [ doc = "Writer for register ERREN" ] pub type W = crate :: W < u8 , super :: ERREN > ; # [ doc = "Register ERREN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ERREN { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "PIDERR Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIDERREN_A { # [ doc = "0: Disables the PIDERR interrupt." ] _0 , # [ doc = "1: Enters the PIDERR interrupt." ] _1 } impl From < PIDERREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PIDERREN_A ) -> Self { match variant { PIDERREN_A :: _0 => false , PIDERREN_A :: _1 => true } } } # [ doc = "Reader of field `PIDERREN`" ] pub type PIDERREN_R = crate :: R < bool , PIDERREN_A > ; impl PIDERREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PIDERREN_A { match self . bits { false => PIDERREN_A :: _0 , true => PIDERREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PIDERREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PIDERREN_A :: _1 } } # [ doc = "Write proxy for field `PIDERREN`" ] pub struct PIDERREN_W < 'a > { w : & 'a mut W , } impl < 'a > PIDERREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PIDERREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the PIDERR interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PIDERREN_A :: _0 ) } # [ doc = "Enters the PIDERR interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PIDERREN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "CRC5/EOF Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRC5EOFEN_A { # [ doc = "0: Disables the CRC5/EOF interrupt." ] _0 , # [ doc = "1: Enables the CRC5/EOF interrupt." ] _1 } impl From < CRC5EOFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CRC5EOFEN_A ) -> Self { match variant { CRC5EOFEN_A :: _0 => false , CRC5EOFEN_A :: _1 => true } } } # [ doc = "Reader of field `CRC5EOFEN`" ] pub type CRC5EOFEN_R = crate :: R < bool , CRC5EOFEN_A > ; impl CRC5EOFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRC5EOFEN_A { match self . bits { false => CRC5EOFEN_A :: _0 , true => CRC5EOFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRC5EOFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRC5EOFEN_A :: _1 } } # [ doc = "Write proxy for field `CRC5EOFEN`" ] pub struct CRC5EOFEN_W < 'a > { w : & 'a mut W , } impl < 'a > CRC5EOFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRC5EOFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the CRC5/EOF interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRC5EOFEN_A :: _0 ) } # [ doc = "Enables the CRC5/EOF interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRC5EOFEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "CRC16 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRC16EN_A { # [ doc = "0: Disables the CRC16 interrupt." ] _0 , # [ doc = "1: Enables the CRC16 interrupt." ] _1 } impl From < CRC16EN_A > for bool { # [ inline ( always ) ] fn from ( variant : CRC16EN_A ) -> Self { match variant { CRC16EN_A :: _0 => false , CRC16EN_A :: _1 => true } } } # [ doc = "Reader of field `CRC16EN`" ] pub type CRC16EN_R = crate :: R < bool , CRC16EN_A > ; impl CRC16EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRC16EN_A { match self . bits { false => CRC16EN_A :: _0 , true => CRC16EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRC16EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRC16EN_A :: _1 } } # [ doc = "Write proxy for field `CRC16EN`" ] pub struct CRC16EN_W < 'a > { w : & 'a mut W , } impl < 'a > CRC16EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRC16EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the CRC16 interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRC16EN_A :: _0 ) } # [ doc = "Enables the CRC16 interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRC16EN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "DFN8 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DFN8EN_A { # [ doc = "0: Disables the DFN8 interrupt." ] _0 , # [ doc = "1: Enables the DFN8 interrupt." ] _1 } impl From < DFN8EN_A > for bool { # [ inline ( always ) ] fn from ( variant : DFN8EN_A ) -> Self { match variant { DFN8EN_A :: _0 => false , DFN8EN_A :: _1 => true } } } # [ doc = "Reader of field `DFN8EN`" ] pub type DFN8EN_R = crate :: R < bool , DFN8EN_A > ; impl DFN8EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DFN8EN_A { match self . bits { false => DFN8EN_A :: _0 , true => DFN8EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DFN8EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DFN8EN_A :: _1 } } # [ doc = "Write proxy for field `DFN8EN`" ] pub struct DFN8EN_W < 'a > { w : & 'a mut W , } impl < 'a > DFN8EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DFN8EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the DFN8 interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DFN8EN_A :: _0 ) } # [ doc = "Enables the DFN8 interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DFN8EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "BTOERR Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BTOERREN_A { # [ doc = "0: Disables the BTOERR interrupt." ] _0 , # [ doc = "1: Enables the BTOERR interrupt." ] _1 } impl From < BTOERREN_A > for bool { # [ inline ( always ) ] fn from ( variant : BTOERREN_A ) -> Self { match variant { BTOERREN_A :: _0 => false , BTOERREN_A :: _1 => true } } } # [ doc = "Reader of field `BTOERREN`" ] pub type BTOERREN_R = crate :: R < bool , BTOERREN_A > ; impl BTOERREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BTOERREN_A { match self . bits { false => BTOERREN_A :: _0 , true => BTOERREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BTOERREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BTOERREN_A :: _1 } } # [ doc = "Write proxy for field `BTOERREN`" ] pub struct BTOERREN_W < 'a > { w : & 'a mut W , } impl < 'a > BTOERREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BTOERREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the BTOERR interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BTOERREN_A :: _0 ) } # [ doc = "Enables the BTOERR interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BTOERREN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "DMAERR Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAERREN_A { # [ doc = "0: Disables the DMAERR interrupt." ] _0 , # [ doc = "1: Enables the DMAERR interrupt." ] _1 } impl From < DMAERREN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAERREN_A ) -> Self { match variant { DMAERREN_A :: _0 => false , DMAERREN_A :: _1 => true } } } # [ doc = "Reader of field `DMAERREN`" ] pub type DMAERREN_R = crate :: R < bool , DMAERREN_A > ; impl DMAERREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAERREN_A { match self . bits { false => DMAERREN_A :: _0 , true => DMAERREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAERREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAERREN_A :: _1 } } # [ doc = "Write proxy for field `DMAERREN`" ] pub struct DMAERREN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAERREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAERREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the DMAERR interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAERREN_A :: _0 ) } # [ doc = "Enables the DMAERR interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAERREN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "BTSERR Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BTSERREN_A { # [ doc = "0: Disables the BTSERR interrupt." ] _0 , # [ doc = "1: Enables the BTSERR interrupt." ] _1 } impl From < BTSERREN_A > for bool { # [ inline ( always ) ] fn from ( variant : BTSERREN_A ) -> Self { match variant { BTSERREN_A :: _0 => false , BTSERREN_A :: _1 => true } } } # [ doc = "Reader of field `BTSERREN`" ] pub type BTSERREN_R = crate :: R < bool , BTSERREN_A > ; impl BTSERREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BTSERREN_A { match self . bits { false => BTSERREN_A :: _0 , true => BTSERREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BTSERREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BTSERREN_A :: _1 } } # [ doc = "Write proxy for field `BTSERREN`" ] pub struct BTSERREN_W < 'a > { w : & 'a mut W , } impl < 'a > BTSERREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BTSERREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the BTSERR interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BTSERREN_A :: _0 ) } # [ doc = "Enables the BTSERR interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BTSERREN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - PIDERR Interrupt Enable" ] # [ inline ( always ) ] pub fn piderren ( & self ) -> PIDERREN_R { PIDERREN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - CRC5/EOF Interrupt Enable" ] # [ inline ( always ) ] pub fn crc5eofen ( & self ) -> CRC5EOFEN_R { CRC5EOFEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - CRC16 Interrupt Enable" ] # [ inline ( always ) ] pub fn crc16en ( & self ) -> CRC16EN_R { CRC16EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - DFN8 Interrupt Enable" ] # [ inline ( always ) ] pub fn dfn8en ( & self ) -> DFN8EN_R { DFN8EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - BTOERR Interrupt Enable" ] # [ inline ( always ) ] pub fn btoerren ( & self ) -> BTOERREN_R { BTOERREN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - DMAERR Interrupt Enable" ] # [ inline ( always ) ] pub fn dmaerren ( & self ) -> DMAERREN_R { DMAERREN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - BTSERR Interrupt Enable" ] # [ inline ( always ) ] pub fn btserren ( & self ) -> BTSERREN_R { BTSERREN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - PIDERR Interrupt Enable" ] # [ inline ( always ) ] pub fn piderren ( & mut self ) -> PIDERREN_W { PIDERREN_W { w : self } } # [ doc = "Bit 1 - CRC5/EOF Interrupt Enable" ] # [ inline ( always ) ] pub fn crc5eofen ( & mut self ) -> CRC5EOFEN_W { CRC5EOFEN_W { w : self } } # [ doc = "Bit 2 - CRC16 Interrupt Enable" ] # [ inline ( always ) ] pub fn crc16en ( & mut self ) -> CRC16EN_W { CRC16EN_W { w : self } } # [ doc = "Bit 3 - DFN8 Interrupt Enable" ] # [ inline ( always ) ] pub fn dfn8en ( & mut self ) -> DFN8EN_W { DFN8EN_W { w : self } } # [ doc = "Bit 4 - BTOERR Interrupt Enable" ] # [ inline ( always ) ] pub fn btoerren ( & mut self ) -> BTOERREN_W { BTOERREN_W { w : self } } # [ doc = "Bit 5 - DMAERR Interrupt Enable" ] # [ inline ( always ) ] pub fn dmaerren ( & mut self ) -> DMAERREN_W { DMAERREN_W { w : self } } # [ doc = "Bit 7 - BTSERR Interrupt Enable" ] # [ inline ( always ) ] pub fn btserren ( & mut self ) -> BTSERREN_W { BTSERREN_W { w : self } } } } # [ doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module" ] pub type STAT = crate :: Reg < u8 , _STAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STAT ; # [ doc = "`read()` method returns [stat::R](stat::R) reader structure" ] impl crate :: Readable for STAT { } # [ doc = "Status register" ] pub mod stat { # [ doc = "Reader of register STAT" ] pub type R = crate :: R < u8 , super :: STAT > ; # [ doc = "Reader of field `ODD`" ] pub type ODD_R = crate :: R < bool , bool > ; # [ doc = "Transmit Indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TX_A { # [ doc = "0: The most recent transaction was a receive operation." ] _0 , # [ doc = "1: The most recent transaction was a transmit operation." ] _1 } impl From < TX_A > for bool { # [ inline ( always ) ] fn from ( variant : TX_A ) -> Self { match variant { TX_A :: _0 => false , TX_A :: _1 => true } } } # [ doc = "Reader of field `TX`" ] pub type TX_R = crate :: R < bool , TX_A > ; impl TX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TX_A { match self . bits { false => TX_A :: _0 , true => TX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TX_A :: _1 } } # [ doc = "Reader of field `ENDP`" ] pub type ENDP_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 2 - This bit is set if the last buffer descriptor updated was in the odd bank of the BDT." ] # [ inline ( always ) ] pub fn odd ( & self ) -> ODD_R { ODD_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmit Indicator" ] # [ inline ( always ) ] pub fn tx ( & self ) -> TX_R { TX_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:7 - This four-bit field encodes the endpoint address that received or transmitted the previous token" ] # [ inline ( always ) ] pub fn endp ( & self ) -> ENDP_R { ENDP_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } } } # [ doc = "Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module" ] pub type CTL = crate :: Reg < u8 , _CTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTL ; # [ doc = "`read()` method returns [ctl::R](ctl::R) reader structure" ] impl crate :: Readable for CTL { } # [ doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure" ] impl crate :: Writable for CTL { } # [ doc = "Control register" ] pub mod ctl { # [ doc = "Reader of register CTL" ] pub type R = crate :: R < u8 , super :: CTL > ; # [ doc = "Writer for register CTL" ] pub type W = crate :: W < u8 , super :: CTL > ; # [ doc = "Register CTL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CTL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "USB Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBENSOFEN_A { # [ doc = "0: Disables the USB Module." ] _0 , # [ doc = "1: Enables the USB Module." ] _1 } impl From < USBENSOFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : USBENSOFEN_A ) -> Self { match variant { USBENSOFEN_A :: _0 => false , USBENSOFEN_A :: _1 => true } } } # [ doc = "Reader of field `USBENSOFEN`" ] pub type USBENSOFEN_R = crate :: R < bool , USBENSOFEN_A > ; impl USBENSOFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBENSOFEN_A { match self . bits { false => USBENSOFEN_A :: _0 , true => USBENSOFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBENSOFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBENSOFEN_A :: _1 } } # [ doc = "Write proxy for field `USBENSOFEN`" ] pub struct USBENSOFEN_W < 'a > { w : & 'a mut W , } impl < 'a > USBENSOFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBENSOFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables the USB Module." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBENSOFEN_A :: _0 ) } # [ doc = "Enables the USB Module." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBENSOFEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ODDRST`" ] pub type ODDRST_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ODDRST`" ] pub struct ODDRST_W < 'a > { w : & 'a mut W , } impl < 'a > ODDRST_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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Reader of field `RESUME`" ] pub type RESUME_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RESUME`" ] pub struct RESUME_W < 'a > { w : & 'a mut W , } impl < 'a > RESUME_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Reader of field `HOSTMODEEN`" ] pub type HOSTMODEEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOSTMODEEN`" ] pub struct HOSTMODEEN_W < 'a > { w : & 'a mut W , } impl < 'a > HOSTMODEEN_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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `RESET`" ] pub type RESET_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RESET`" ] pub struct RESET_W < 'a > { w : & 'a mut W , } impl < 'a > RESET_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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TXSUSPENDTOKENBUSY`" ] pub type TXSUSPENDTOKENBUSY_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TXSUSPENDTOKENBUSY`" ] pub struct TXSUSPENDTOKENBUSY_W < 'a > { w : & 'a mut W , } impl < 'a > TXSUSPENDTOKENBUSY_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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reader of field `SE0`" ] pub type SE0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SE0`" ] pub struct SE0_W < 'a > { w : & 'a mut W , } impl < 'a > SE0_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Reader of field `JSTATE`" ] pub type JSTATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `JSTATE`" ] pub struct JSTATE_W < 'a > { w : & 'a mut W , } impl < 'a > JSTATE_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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - USB Enable" ] # [ inline ( always ) ] pub fn usbensofen ( & self ) -> USBENSOFEN_R { USBENSOFEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Setting this bit to 1 resets all the BDT ODD ping/pong fields to 0, which then specifies the EVEN BDT bank" ] # [ inline ( always ) ] pub fn oddrst ( & self ) -> ODDRST_R { ODDRST_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - When set to 1 this bit enables the USB Module to execute resume signaling" ] # [ inline ( always ) ] pub fn resume ( & self ) -> RESUME_R { RESUME_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - When set to 1, this bit enables the USB Module to operate in Host mode" ] # [ inline ( always ) ] pub fn hostmodeen ( & self ) -> HOSTMODEEN_R { HOSTMODEEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Setting this bit enables the USB Module to generate USB reset signaling" ] # [ inline ( always ) ] pub fn reset ( & self ) -> RESET_R { RESET_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - In Host mode, TOKEN_BUSY is set when the USB module is busy executing a USB token" ] # [ inline ( always ) ] pub fn txsuspendtokenbusy ( & self ) -> TXSUSPENDTOKENBUSY_R { TXSUSPENDTOKENBUSY_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Live USB Single Ended Zero signal" ] # [ inline ( always ) ] pub fn se0 ( & self ) -> SE0_R { SE0_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Live USB differential receiver JSTATE signal" ] # [ inline ( always ) ] pub fn jstate ( & self ) -> JSTATE_R { JSTATE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - USB Enable" ] # [ inline ( always ) ] pub fn usbensofen ( & mut self ) -> USBENSOFEN_W { USBENSOFEN_W { w : self } } # [ doc = "Bit 1 - Setting this bit to 1 resets all the BDT ODD ping/pong fields to 0, which then specifies the EVEN BDT bank" ] # [ inline ( always ) ] pub fn oddrst ( & mut self ) -> ODDRST_W { ODDRST_W { w : self } } # [ doc = "Bit 2 - When set to 1 this bit enables the USB Module to execute resume signaling" ] # [ inline ( always ) ] pub fn resume ( & mut self ) -> RESUME_W { RESUME_W { w : self } } # [ doc = "Bit 3 - When set to 1, this bit enables the USB Module to operate in Host mode" ] # [ inline ( always ) ] pub fn hostmodeen ( & mut self ) -> HOSTMODEEN_W { HOSTMODEEN_W { w : self } } # [ doc = "Bit 4 - Setting this bit enables the USB Module to generate USB reset signaling" ] # [ inline ( always ) ] pub fn reset ( & mut self ) -> RESET_W { RESET_W { w : self } } # [ doc = "Bit 5 - In Host mode, TOKEN_BUSY is set when the USB module is busy executing a USB token" ] # [ inline ( always ) ] pub fn txsuspendtokenbusy ( & mut self ) -> TXSUSPENDTOKENBUSY_W { TXSUSPENDTOKENBUSY_W { w : self } } # [ doc = "Bit 6 - Live USB Single Ended Zero signal" ] # [ inline ( always ) ] pub fn se0 ( & mut self ) -> SE0_W { SE0_W { w : self } } # [ doc = "Bit 7 - Live USB differential receiver JSTATE signal" ] # [ inline ( always ) ] pub fn jstate ( & mut self ) -> JSTATE_W { JSTATE_W { w : self } } } } # [ doc = "Address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [addr](addr) module" ] pub type ADDR = crate :: Reg < u8 , _ADDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ADDR ; # [ doc = "`read()` method returns [addr::R](addr::R) reader structure" ] impl crate :: Readable for ADDR { } # [ doc = "`write(|w| ..)` method takes [addr::W](addr::W) writer structure" ] impl crate :: Writable for ADDR { } # [ doc = "Address register" ] pub mod addr { # [ doc = "Reader of register ADDR" ] pub type R = crate :: R < u8 , super :: ADDR > ; # [ doc = "Writer for register ADDR" ] pub type W = crate :: W < u8 , super :: ADDR > ; # [ doc = "Register ADDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ADDR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ADDR`" ] pub type ADDR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ADDR`" ] pub struct ADDR_W < 'a > { w : & 'a mut W , } impl < 'a > ADDR_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 & ! 0x7f ) | ( ( value as u8 ) & 0x7f ) ; self . w } } # [ doc = "Reader of field `LSEN`" ] pub type LSEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `LSEN`" ] pub struct LSEN_W < 'a > { w : & 'a mut W , } impl < 'a > LSEN_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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:6 - USB Address" ] # [ inline ( always ) ] pub fn addr ( & self ) -> ADDR_R { ADDR_R :: new ( ( self . bits & 0x7f ) as u8 ) } # [ doc = "Bit 7 - Low Speed Enable bit" ] # [ inline ( always ) ] pub fn lsen ( & self ) -> LSEN_R { LSEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:6 - USB Address" ] # [ inline ( always ) ] pub fn addr ( & mut self ) -> ADDR_W { ADDR_W { w : self } } # [ doc = "Bit 7 - Low Speed Enable bit" ] # [ inline ( always ) ] pub fn lsen ( & mut self ) -> LSEN_W { LSEN_W { w : self } } } } # [ doc = "BDT Page register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdtpage1](bdtpage1) module" ] pub type BDTPAGE1 = crate :: Reg < u8 , _BDTPAGE1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDTPAGE1 ; # [ doc = "`read()` method returns [bdtpage1::R](bdtpage1::R) reader structure" ] impl crate :: Readable for BDTPAGE1 { } # [ doc = "`write(|w| ..)` method takes [bdtpage1::W](bdtpage1::W) writer structure" ] impl crate :: Writable for BDTPAGE1 { } # [ doc = "BDT Page register 1" ] pub mod bdtpage1 { # [ doc = "Reader of register BDTPAGE1" ] pub type R = crate :: R < u8 , super :: BDTPAGE1 > ; # [ doc = "Writer for register BDTPAGE1" ] pub type W = crate :: W < u8 , super :: BDTPAGE1 > ; # [ doc = "Register BDTPAGE1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BDTPAGE1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BDTBA`" ] pub type BDTBA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BDTBA`" ] pub struct BDTBA_W < 'a > { w : & 'a mut W , } impl < 'a > BDTBA_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 & ! ( 0x7f << 1 ) ) | ( ( ( value as u8 ) & 0x7f ) << 1 ) ; self . w } } impl R { # [ doc = "Bits 1:7 - Provides address bits 15 through 9 of the BDT base address." ] # [ inline ( always ) ] pub fn bdtba ( & self ) -> BDTBA_R { BDTBA_R :: new ( ( ( self . bits >> 1 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 1:7 - Provides address bits 15 through 9 of the BDT base address." ] # [ inline ( always ) ] pub fn bdtba ( & mut self ) -> BDTBA_W { BDTBA_W { w : self } } } } # [ doc = "Frame Number register Low\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [frmnuml](frmnuml) module" ] pub type FRMNUML = crate :: Reg < u8 , _FRMNUML > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FRMNUML ; # [ doc = "`read()` method returns [frmnuml::R](frmnuml::R) reader structure" ] impl crate :: Readable for FRMNUML { } # [ doc = "`write(|w| ..)` method takes [frmnuml::W](frmnuml::W) writer structure" ] impl crate :: Writable for FRMNUML { } # [ doc = "Frame Number register Low" ] pub mod frmnuml { # [ doc = "Reader of register FRMNUML" ] pub type R = crate :: R < u8 , super :: FRMNUML > ; # [ doc = "Writer for register FRMNUML" ] pub type W = crate :: W < u8 , super :: FRMNUML > ; # [ doc = "Register FRMNUML `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FRMNUML { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FRM`" ] pub type FRM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FRM`" ] pub struct FRM_W < 'a > { w : & 'a mut W , } impl < 'a > FRM_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - This 8-bit field and the 3-bit field in the Frame Number Register High are used to compute the address where the current Buffer Descriptor Table (BDT) resides in system memory" ] # [ inline ( always ) ] pub fn frm ( & self ) -> FRM_R { FRM_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - This 8-bit field and the 3-bit field in the Frame Number Register High are used to compute the address where the current Buffer Descriptor Table (BDT) resides in system memory" ] # [ inline ( always ) ] pub fn frm ( & mut self ) -> FRM_W { FRM_W { w : self } } } } # [ doc = "Frame Number register High\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [frmnumh](frmnumh) module" ] pub type FRMNUMH = crate :: Reg < u8 , _FRMNUMH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FRMNUMH ; # [ doc = "`read()` method returns [frmnumh::R](frmnumh::R) reader structure" ] impl crate :: Readable for FRMNUMH { } # [ doc = "`write(|w| ..)` method takes [frmnumh::W](frmnumh::W) writer structure" ] impl crate :: Writable for FRMNUMH { } # [ doc = "Frame Number register High" ] pub mod frmnumh { # [ doc = "Reader of register FRMNUMH" ] pub type R = crate :: R < u8 , super :: FRMNUMH > ; # [ doc = "Writer for register FRMNUMH" ] pub type W = crate :: W < u8 , super :: FRMNUMH > ; # [ doc = "Register FRMNUMH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FRMNUMH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FRM`" ] pub type FRM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FRM`" ] pub struct FRM_W < 'a > { w : & 'a mut W , } impl < 'a > FRM_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 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - This 3-bit field and the 8-bit field in the Frame Number Register Low are used to compute the address where the current Buffer Descriptor Table (BDT) resides in system memory" ] # [ inline ( always ) ] pub fn frm ( & self ) -> FRM_R { FRM_R :: new ( ( self . bits & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - This 3-bit field and the 8-bit field in the Frame Number Register Low are used to compute the address where the current Buffer Descriptor Table (BDT) resides in system memory" ] # [ inline ( always ) ] pub fn frm ( & mut self ) -> FRM_W { FRM_W { w : self } } } } # [ doc = "Token register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [token](token) module" ] pub type TOKEN = crate :: Reg < u8 , _TOKEN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TOKEN ; # [ doc = "`read()` method returns [token::R](token::R) reader structure" ] impl crate :: Readable for TOKEN { } # [ doc = "`write(|w| ..)` method takes [token::W](token::W) writer structure" ] impl crate :: Writable for TOKEN { } # [ doc = "Token register" ] pub mod token { # [ doc = "Reader of register TOKEN" ] pub type R = crate :: R < u8 , super :: TOKEN > ; # [ doc = "Writer for register TOKEN" ] pub type W = crate :: W < u8 , super :: TOKEN > ; # [ doc = "Register TOKEN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TOKEN { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TOKENENDPT`" ] pub type TOKENENDPT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TOKENENDPT`" ] pub struct TOKENENDPT_W < 'a > { w : & 'a mut W , } impl < 'a > TOKENENDPT_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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "Contains the token type executed by the USB module.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOKENPID_A { # [ doc = "1: OUT Token. USB Module performs an OUT (TX) transaction." ] _0001 , # [ doc = "9: IN Token. USB Module performs an In (RX) transaction." ] _1001 , # [ doc = "13: SETUP Token. USB Module performs a SETUP (TX) transaction" ] _1101 } impl From < TOKENPID_A > for u8 { # [ inline ( always ) ] fn from ( variant : TOKENPID_A ) -> Self { match variant { TOKENPID_A :: _0001 => 1 , TOKENPID_A :: _1001 => 9 , TOKENPID_A :: _1101 => 13 } } } # [ doc = "Reader of field `TOKENPID`" ] pub type TOKENPID_R = crate :: R < u8 , TOKENPID_A > ; impl TOKENPID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TOKENPID_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( TOKENPID_A :: _0001 ) , 9 => Val ( TOKENPID_A :: _1001 ) , 13 => Val ( TOKENPID_A :: _1101 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == TOKENPID_A :: _0001 } # [ doc = "Checks if the value of the field is `_1001`" ] # [ inline ( always ) ] pub fn is_1001 ( & self ) -> bool { * self == TOKENPID_A :: _1001 } # [ doc = "Checks if the value of the field is `_1101`" ] # [ inline ( always ) ] pub fn is_1101 ( & self ) -> bool { * self == TOKENPID_A :: _1101 } } # [ doc = "Write proxy for field `TOKENPID`" ] pub struct TOKENPID_W < 'a > { w : & 'a mut W , } impl < 'a > TOKENPID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOKENPID_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "OUT Token. USB Module performs an OUT (TX) transaction." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( TOKENPID_A :: _0001 ) } # [ doc = "IN Token. USB Module performs an In (RX) transaction." ] # [ inline ( always ) ] pub fn _1001 ( self ) -> & 'a mut W { self . variant ( TOKENPID_A :: _1001 ) } # [ doc = "SETUP Token. USB Module performs a SETUP (TX) transaction" ] # [ inline ( always ) ] pub fn _1101 ( self ) -> & 'a mut W { self . variant ( TOKENPID_A :: _1101 ) } # [ 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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u8 ) & 0x0f ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Holds the Endpoint address for the token command" ] # [ inline ( always ) ] pub fn tokenendpt ( & self ) -> TOKENENDPT_R { TOKENENDPT_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Contains the token type executed by the USB module." ] # [ inline ( always ) ] pub fn tokenpid ( & self ) -> TOKENPID_R { TOKENPID_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Holds the Endpoint address for the token command" ] # [ inline ( always ) ] pub fn tokenendpt ( & mut self ) -> TOKENENDPT_W { TOKENENDPT_W { w : self } } # [ doc = "Bits 4:7 - Contains the token type executed by the USB module." ] # [ inline ( always ) ] pub fn tokenpid ( & mut self ) -> TOKENPID_W { TOKENPID_W { w : self } } } } # [ doc = "SOF Threshold register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [softhld](softhld) module" ] pub type SOFTHLD = crate :: Reg < u8 , _SOFTHLD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SOFTHLD ; # [ doc = "`read()` method returns [softhld::R](softhld::R) reader structure" ] impl crate :: Readable for SOFTHLD { } # [ doc = "`write(|w| ..)` method takes [softhld::W](softhld::W) writer structure" ] impl crate :: Writable for SOFTHLD { } # [ doc = "SOF Threshold register" ] pub mod softhld { # [ doc = "Reader of register SOFTHLD" ] pub type R = crate :: R < u8 , super :: SOFTHLD > ; # [ doc = "Writer for register SOFTHLD" ] pub type W = crate :: W < u8 , super :: SOFTHLD > ; # [ doc = "Register SOFTHLD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SOFTHLD { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CNT`" ] pub type CNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CNT`" ] pub struct CNT_W < 'a > { w : & 'a mut W , } impl < 'a > CNT_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Represents the SOF count threshold in byte times." ] # [ inline ( always ) ] pub fn cnt ( & self ) -> CNT_R { CNT_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Represents the SOF count threshold in byte times." ] # [ inline ( always ) ] pub fn cnt ( & mut self ) -> CNT_W { CNT_W { w : self } } } } # [ doc = "BDT Page Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdtpage2](bdtpage2) module" ] pub type BDTPAGE2 = crate :: Reg < u8 , _BDTPAGE2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDTPAGE2 ; # [ doc = "`read()` method returns [bdtpage2::R](bdtpage2::R) reader structure" ] impl crate :: Readable for BDTPAGE2 { } # [ doc = "`write(|w| ..)` method takes [bdtpage2::W](bdtpage2::W) writer structure" ] impl crate :: Writable for BDTPAGE2 { } # [ doc = "BDT Page Register 2" ] pub mod bdtpage2 { # [ doc = "Reader of register BDTPAGE2" ] pub type R = crate :: R < u8 , super :: BDTPAGE2 > ; # [ doc = "Writer for register BDTPAGE2" ] pub type W = crate :: W < u8 , super :: BDTPAGE2 > ; # [ doc = "Register BDTPAGE2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BDTPAGE2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BDTBA`" ] pub type BDTBA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BDTBA`" ] pub struct BDTBA_W < 'a > { w : & 'a mut W , } impl < 'a > BDTBA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Provides address bits 23 through 16 of the BDT base address that defines the location of Buffer Descriptor Table resides in system memory" ] # [ inline ( always ) ] pub fn bdtba ( & self ) -> BDTBA_R { BDTBA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Provides address bits 23 through 16 of the BDT base address that defines the location of Buffer Descriptor Table resides in system memory" ] # [ inline ( always ) ] pub fn bdtba ( & mut self ) -> BDTBA_W { BDTBA_W { w : self } } } } # [ doc = "BDT Page Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdtpage3](bdtpage3) module" ] pub type BDTPAGE3 = crate :: Reg < u8 , _BDTPAGE3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BDTPAGE3 ; # [ doc = "`read()` method returns [bdtpage3::R](bdtpage3::R) reader structure" ] impl crate :: Readable for BDTPAGE3 { } # [ doc = "`write(|w| ..)` method takes [bdtpage3::W](bdtpage3::W) writer structure" ] impl crate :: Writable for BDTPAGE3 { } # [ doc = "BDT Page Register 3" ] pub mod bdtpage3 { # [ doc = "Reader of register BDTPAGE3" ] pub type R = crate :: R < u8 , super :: BDTPAGE3 > ; # [ doc = "Writer for register BDTPAGE3" ] pub type W = crate :: W < u8 , super :: BDTPAGE3 > ; # [ doc = "Register BDTPAGE3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BDTPAGE3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `BDTBA`" ] pub type BDTBA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `BDTBA`" ] pub struct BDTBA_W < 'a > { w : & 'a mut W , } impl < 'a > BDTBA_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Provides address bits 31 through 24 of the BDT base address that defines the location of Buffer Descriptor Table resides in system memory" ] # [ inline ( always ) ] pub fn bdtba ( & self ) -> BDTBA_R { BDTBA_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Provides address bits 31 through 24 of the BDT base address that defines the location of Buffer Descriptor Table resides in system memory" ] # [ inline ( always ) ] pub fn bdtba ( & mut self ) -> BDTBA_W { BDTBA_W { w : self } } } } # [ doc = "Endpoint Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [endpt](endpt) module" ] pub type ENDPT = crate :: Reg < u8 , _ENDPT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ENDPT ; # [ doc = "`read()` method returns [endpt::R](endpt::R) reader structure" ] impl crate :: Readable for ENDPT { } # [ doc = "`write(|w| ..)` method takes [endpt::W](endpt::W) writer structure" ] impl crate :: Writable for ENDPT { } # [ doc = "Endpoint Control register" ] pub mod endpt { # [ doc = "Reader of register ENDPT%s" ] pub type R = crate :: R < u8 , super :: ENDPT > ; # [ doc = "Writer for register ENDPT%s" ] pub type W = crate :: W < u8 , super :: ENDPT > ; # [ doc = "Register ENDPT%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ENDPT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EPHSHK`" ] pub type EPHSHK_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `EPHSHK`" ] pub struct EPHSHK_W < 'a > { w : & 'a mut W , } impl < 'a > EPHSHK_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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `EPSTALL`" ] pub type EPSTALL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `EPSTALL`" ] pub struct EPSTALL_W < 'a > { w : & 'a mut W , } impl < 'a > EPSTALL_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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Reader of field `EPTXEN`" ] pub type EPTXEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `EPTXEN`" ] pub struct EPTXEN_W < 'a > { w : & 'a mut W , } impl < 'a > EPTXEN_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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Reader of field `EPRXEN`" ] pub type EPRXEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `EPRXEN`" ] pub struct EPRXEN_W < 'a > { w : & 'a mut W , } impl < 'a > EPRXEN_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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `EPCTLDIS`" ] pub type EPCTLDIS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `EPCTLDIS`" ] pub struct EPCTLDIS_W < 'a > { w : & 'a mut W , } impl < 'a > EPCTLDIS_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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `RETRYDIS`" ] pub type RETRYDIS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RETRYDIS`" ] pub struct RETRYDIS_W < 'a > { w : & 'a mut W , } impl < 'a > RETRYDIS_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Host without a hub This is a Host mode only field and is present in the control register for endpoint 0 (ENDPT0) only\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HOSTWOHUB_A { # [ doc = "0: Low-speed device connected to Host through a hub. PRE_PID will be generated as required." ] _0 , # [ doc = "1: Low-speed device directly connected. No hub, or no low-speed device attached." ] _1 } impl From < HOSTWOHUB_A > for bool { # [ inline ( always ) ] fn from ( variant : HOSTWOHUB_A ) -> Self { match variant { HOSTWOHUB_A :: _0 => false , HOSTWOHUB_A :: _1 => true } } } # [ doc = "Reader of field `HOSTWOHUB`" ] pub type HOSTWOHUB_R = crate :: R < bool , HOSTWOHUB_A > ; impl HOSTWOHUB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HOSTWOHUB_A { match self . bits { false => HOSTWOHUB_A :: _0 , true => HOSTWOHUB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HOSTWOHUB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HOSTWOHUB_A :: _1 } } # [ doc = "Write proxy for field `HOSTWOHUB`" ] pub struct HOSTWOHUB_W < 'a > { w : & 'a mut W , } impl < 'a > HOSTWOHUB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HOSTWOHUB_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low-speed device connected to Host through a hub. PRE_PID will be generated as required." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HOSTWOHUB_A :: _0 ) } # [ doc = "Low-speed device directly connected. No hub, or no low-speed device attached." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HOSTWOHUB_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - When set this bit enables an endpoint to perform handshaking during a transaction to this endpoint" ] # [ inline ( always ) ] pub fn ephshk ( & self ) -> EPHSHK_R { EPHSHK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - When set this bit indicates that the endpoint is called" ] # [ inline ( always ) ] pub fn epstall ( & self ) -> EPSTALL_R { EPSTALL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - This bit, when set, enables the endpoint for TX transfers. See" ] # [ inline ( always ) ] pub fn eptxen ( & self ) -> EPTXEN_R { EPTXEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - This bit, when set, enables the endpoint for RX transfers. See" ] # [ inline ( always ) ] pub fn eprxen ( & self ) -> EPRXEN_R { EPRXEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - This bit, when set, disables control (SETUP) transfers" ] # [ inline ( always ) ] pub fn epctldis ( & self ) -> EPCTLDIS_R { EPCTLDIS_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - This is a Host mode only bit and is present in the control register for endpoint 0 (ENDPT0) only" ] # [ inline ( always ) ] pub fn retrydis ( & self ) -> RETRYDIS_R { RETRYDIS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Host without a hub This is a Host mode only field and is present in the control register for endpoint 0 (ENDPT0) only" ] # [ inline ( always ) ] pub fn hostwohub ( & self ) -> HOSTWOHUB_R { HOSTWOHUB_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - When set this bit enables an endpoint to perform handshaking during a transaction to this endpoint" ] # [ inline ( always ) ] pub fn ephshk ( & mut self ) -> EPHSHK_W { EPHSHK_W { w : self } } # [ doc = "Bit 1 - When set this bit indicates that the endpoint is called" ] # [ inline ( always ) ] pub fn epstall ( & mut self ) -> EPSTALL_W { EPSTALL_W { w : self } } # [ doc = "Bit 2 - This bit, when set, enables the endpoint for TX transfers. See" ] # [ inline ( always ) ] pub fn eptxen ( & mut self ) -> EPTXEN_W { EPTXEN_W { w : self } } # [ doc = "Bit 3 - This bit, when set, enables the endpoint for RX transfers. See" ] # [ inline ( always ) ] pub fn eprxen ( & mut self ) -> EPRXEN_W { EPRXEN_W { w : self } } # [ doc = "Bit 4 - This bit, when set, disables control (SETUP) transfers" ] # [ inline ( always ) ] pub fn epctldis ( & mut self ) -> EPCTLDIS_W { EPCTLDIS_W { w : self } } # [ doc = "Bit 6 - This is a Host mode only bit and is present in the control register for endpoint 0 (ENDPT0) only" ] # [ inline ( always ) ] pub fn retrydis ( & mut self ) -> RETRYDIS_W { RETRYDIS_W { w : self } } # [ doc = "Bit 7 - Host without a hub This is a Host mode only field and is present in the control register for endpoint 0 (ENDPT0) only" ] # [ inline ( always ) ] pub fn hostwohub ( & mut self ) -> HOSTWOHUB_W { HOSTWOHUB_W { w : self } } } } # [ doc = "USB Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbctrl](usbctrl) module" ] pub type USBCTRL = crate :: Reg < u8 , _USBCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBCTRL ; # [ doc = "`read()` method returns [usbctrl::R](usbctrl::R) reader structure" ] impl crate :: Readable for USBCTRL { } # [ doc = "`write(|w| ..)` method takes [usbctrl::W](usbctrl::W) writer structure" ] impl crate :: Writable for USBCTRL { } # [ doc = "USB Control register" ] pub mod usbctrl { # [ doc = "Reader of register USBCTRL" ] pub type R = crate :: R < u8 , super :: USBCTRL > ; # [ doc = "Writer for register USBCTRL" ] pub type W = crate :: W < u8 , super :: USBCTRL > ; # [ doc = "Register USBCTRL `reset()`'s with value 0xc0" ] impl crate :: ResetValue for super :: USBCTRL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc0 } } # [ doc = "Enables the weak pulldowns on the USB transceiver.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDE_A { # [ doc = "0: Weak pulldowns are disabled on D+ and D-." ] _0 , # [ doc = "1: Weak pulldowns are enabled on D+ and D-." ] _1 } impl From < PDE_A > for bool { # [ inline ( always ) ] fn from ( variant : PDE_A ) -> Self { match variant { PDE_A :: _0 => false , PDE_A :: _1 => true } } } # [ doc = "Reader of field `PDE`" ] pub type PDE_R = crate :: R < bool , PDE_A > ; impl PDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDE_A { match self . bits { false => PDE_A :: _0 , true => PDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDE_A :: _1 } } # [ doc = "Write proxy for field `PDE`" ] pub struct PDE_W < 'a > { w : & 'a mut W , } impl < 'a > PDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Weak pulldowns are disabled on D+ and D-." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDE_A :: _0 ) } # [ doc = "Weak pulldowns are enabled on D+ and D-." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Places the USB transceiver into the suspend state.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUSP_A { # [ doc = "0: USB transceiver is not in suspend state." ] _0 , # [ doc = "1: USB transceiver is in suspend state." ] _1 } impl From < SUSP_A > for bool { # [ inline ( always ) ] fn from ( variant : SUSP_A ) -> Self { match variant { SUSP_A :: _0 => false , SUSP_A :: _1 => true } } } # [ doc = "Reader of field `SUSP`" ] pub type SUSP_R = crate :: R < bool , SUSP_A > ; impl SUSP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SUSP_A { match self . bits { false => SUSP_A :: _0 , true => SUSP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SUSP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SUSP_A :: _1 } } # [ doc = "Write proxy for field `SUSP`" ] pub struct SUSP_W < 'a > { w : & 'a mut W , } impl < 'a > SUSP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SUSP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "USB transceiver is not in suspend state." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SUSP_A :: _0 ) } # [ doc = "USB transceiver is in suspend state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SUSP_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 6 - Enables the weak pulldowns on the USB transceiver." ] # [ inline ( always ) ] pub fn pde ( & self ) -> PDE_R { PDE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Places the USB transceiver into the suspend state." ] # [ inline ( always ) ] pub fn susp ( & self ) -> SUSP_R { SUSP_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 6 - Enables the weak pulldowns on the USB transceiver." ] # [ inline ( always ) ] pub fn pde ( & mut self ) -> PDE_W { PDE_W { w : self } } # [ doc = "Bit 7 - Places the USB transceiver into the suspend state." ] # [ inline ( always ) ] pub fn susp ( & mut self ) -> SUSP_W { SUSP_W { w : self } } } } # [ doc = "USB OTG Observe register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [observe](observe) module" ] pub type OBSERVE = crate :: Reg < u8 , _OBSERVE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OBSERVE ; # [ doc = "`read()` method returns [observe::R](observe::R) reader structure" ] impl crate :: Readable for OBSERVE { } # [ doc = "USB OTG Observe register" ] pub mod observe { # [ doc = "Reader of register OBSERVE" ] pub type R = crate :: R < u8 , super :: OBSERVE > ; # [ doc = "Provides observability of the D- Pulldown enable at the USB transceiver.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMPD_A { # [ doc = "0: D- pulldown disabled." ] _0 , # [ doc = "1: D- pulldown enabled." ] _1 } impl From < DMPD_A > for bool { # [ inline ( always ) ] fn from ( variant : DMPD_A ) -> Self { match variant { DMPD_A :: _0 => false , DMPD_A :: _1 => true } } } # [ doc = "Reader of field `DMPD`" ] pub type DMPD_R = crate :: R < bool , DMPD_A > ; impl DMPD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMPD_A { match self . bits { false => DMPD_A :: _0 , true => DMPD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMPD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMPD_A :: _1 } } # [ doc = "Provides observability of the D+ Pulldown enable at the USB transceiver.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPPD_A { # [ doc = "0: D+ pulldown disabled." ] _0 , # [ doc = "1: D+ pulldown enabled." ] _1 } impl From < DPPD_A > for bool { # [ inline ( always ) ] fn from ( variant : DPPD_A ) -> Self { match variant { DPPD_A :: _0 => false , DPPD_A :: _1 => true } } } # [ doc = "Reader of field `DPPD`" ] pub type DPPD_R = crate :: R < bool , DPPD_A > ; impl DPPD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPPD_A { match self . bits { false => DPPD_A :: _0 , true => DPPD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPPD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPPD_A :: _1 } } # [ doc = "Provides observability of the D+ Pullup enable at the USB transceiver.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPPU_A { # [ doc = "0: D+ pullup disabled." ] _0 , # [ doc = "1: D+ pullup enabled." ] _1 } impl From < DPPU_A > for bool { # [ inline ( always ) ] fn from ( variant : DPPU_A ) -> Self { match variant { DPPU_A :: _0 => false , DPPU_A :: _1 => true } } } # [ doc = "Reader of field `DPPU`" ] pub type DPPU_R = crate :: R < bool , DPPU_A > ; impl DPPU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPPU_A { match self . bits { false => DPPU_A :: _0 , true => DPPU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPPU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPPU_A :: _1 } } impl R { # [ doc = "Bit 4 - Provides observability of the D- Pulldown enable at the USB transceiver." ] # [ inline ( always ) ] pub fn dmpd ( & self ) -> DMPD_R { DMPD_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Provides observability of the D+ Pulldown enable at the USB transceiver." ] # [ inline ( always ) ] pub fn dppd ( & self ) -> DPPD_R { DPPD_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Provides observability of the D+ Pullup enable at the USB transceiver." ] # [ inline ( always ) ] pub fn dppu ( & self ) -> DPPU_R { DPPU_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "USB OTG Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [control](control) module" ] pub type CONTROL = crate :: Reg < u8 , _CONTROL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONTROL ; # [ doc = "`read()` method returns [control::R](control::R) reader structure" ] impl crate :: Readable for CONTROL { } # [ doc = "`write(|w| ..)` method takes [control::W](control::W) writer structure" ] impl crate :: Writable for CONTROL { } # [ doc = "USB OTG Control register" ] pub mod control { # [ doc = "Reader of register CONTROL" ] pub type R = crate :: R < u8 , super :: CONTROL > ; # [ doc = "Writer for register CONTROL" ] pub type W = crate :: W < u8 , super :: CONTROL > ; # [ doc = "Register CONTROL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CONTROL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Provides control of the DP Pullup in USBOTG, if USB is configured in non-OTG device mode.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPPULLUPNONOTG_A { # [ doc = "0: DP Pullup in non-OTG device mode is not enabled." ] _0 , # [ doc = "1: DP Pullup in non-OTG device mode is enabled." ] _1 } impl From < DPPULLUPNONOTG_A > for bool { # [ inline ( always ) ] fn from ( variant : DPPULLUPNONOTG_A ) -> Self { match variant { DPPULLUPNONOTG_A :: _0 => false , DPPULLUPNONOTG_A :: _1 => true } } } # [ doc = "Reader of field `DPPULLUPNONOTG`" ] pub type DPPULLUPNONOTG_R = crate :: R < bool , DPPULLUPNONOTG_A > ; impl DPPULLUPNONOTG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPPULLUPNONOTG_A { match self . bits { false => DPPULLUPNONOTG_A :: _0 , true => DPPULLUPNONOTG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPPULLUPNONOTG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPPULLUPNONOTG_A :: _1 } } # [ doc = "Write proxy for field `DPPULLUPNONOTG`" ] pub struct DPPULLUPNONOTG_W < 'a > { w : & 'a mut W , } impl < 'a > DPPULLUPNONOTG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPPULLUPNONOTG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DP Pullup in non-OTG device mode is not enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPPULLUPNONOTG_A :: _0 ) } # [ doc = "DP Pullup in non-OTG device mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPPULLUPNONOTG_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 4 - Provides control of the DP Pullup in USBOTG, if USB is configured in non-OTG device mode." ] # [ inline ( always ) ] pub fn dppullupnonotg ( & self ) -> DPPULLUPNONOTG_R { DPPULLUPNONOTG_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Provides control of the DP Pullup in USBOTG, if USB is configured in non-OTG device mode." ] # [ inline ( always ) ] pub fn dppullupnonotg ( & mut self ) -> DPPULLUPNONOTG_W { DPPULLUPNONOTG_W { w : self } } } } # [ doc = "USB Transceiver Control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbtrc0](usbtrc0) module" ] pub type USBTRC0 = crate :: Reg < u8 , _USBTRC0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBTRC0 ; # [ doc = "`read()` method returns [usbtrc0::R](usbtrc0::R) reader structure" ] impl crate :: Readable for USBTRC0 { } # [ doc = "`write(|w| ..)` method takes [usbtrc0::W](usbtrc0::W) writer structure" ] impl crate :: Writable for USBTRC0 { } # [ doc = "USB Transceiver Control register 0" ] pub mod usbtrc0 { # [ doc = "Reader of register USBTRC0" ] pub type R = crate :: R < u8 , super :: USBTRC0 > ; # [ doc = "Writer for register USBTRC0" ] pub type W = crate :: W < u8 , super :: USBTRC0 > ; # [ doc = "Register USBTRC0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: USBTRC0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "USB Asynchronous Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USB_RESUME_INT_A { # [ doc = "0: No interrupt was generated." ] _0 , # [ doc = "1: Interrupt was generated because of the USB asynchronous interrupt." ] _1 } impl From < USB_RESUME_INT_A > for bool { # [ inline ( always ) ] fn from ( variant : USB_RESUME_INT_A ) -> Self { match variant { USB_RESUME_INT_A :: _0 => false , USB_RESUME_INT_A :: _1 => true } } } # [ doc = "Reader of field `USB_RESUME_INT`" ] pub type USB_RESUME_INT_R = crate :: R < bool , USB_RESUME_INT_A > ; impl USB_RESUME_INT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USB_RESUME_INT_A { match self . bits { false => USB_RESUME_INT_A :: _0 , true => USB_RESUME_INT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USB_RESUME_INT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USB_RESUME_INT_A :: _1 } } # [ doc = "Synchronous USB Interrupt Detect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYNC_DET_A { # [ doc = "0: Synchronous interrupt has not been detected." ] _0 , # [ doc = "1: Synchronous interrupt has been detected." ] _1 } impl From < SYNC_DET_A > for bool { # [ inline ( always ) ] fn from ( variant : SYNC_DET_A ) -> Self { match variant { SYNC_DET_A :: _0 => false , SYNC_DET_A :: _1 => true } } } # [ doc = "Reader of field `SYNC_DET`" ] pub type SYNC_DET_R = crate :: R < bool , SYNC_DET_A > ; impl SYNC_DET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYNC_DET_A { match self . bits { false => SYNC_DET_A :: _0 , true => SYNC_DET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYNC_DET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYNC_DET_A :: _1 } } # [ doc = "Reader of field `USB_CLK_RECOVERY_INT`" ] pub type USB_CLK_RECOVERY_INT_R = crate :: R < bool , bool > ; # [ doc = "Asynchronous Resume Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBRESMEN_A { # [ doc = "0: USB asynchronous wakeup from suspend mode disabled." ] _0 , # [ doc = "1: USB asynchronous wakeup from suspend mode enabled. The asynchronous resume interrupt differs from the synchronous resume interrupt in that it asynchronously detects K-state using the unfiltered state of the D+ and D- pins. This interrupt should only be enabled when the Transceiver is suspended." ] _1 } impl From < USBRESMEN_A > for bool { # [ inline ( always ) ] fn from ( variant : USBRESMEN_A ) -> Self { match variant { USBRESMEN_A :: _0 => false , USBRESMEN_A :: _1 => true } } } # [ doc = "Reader of field `USBRESMEN`" ] pub type USBRESMEN_R = crate :: R < bool , USBRESMEN_A > ; impl USBRESMEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBRESMEN_A { match self . bits { false => USBRESMEN_A :: _0 , true => USBRESMEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBRESMEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBRESMEN_A :: _1 } } # [ doc = "Write proxy for field `USBRESMEN`" ] pub struct USBRESMEN_W < 'a > { w : & 'a mut W , } impl < 'a > USBRESMEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBRESMEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "USB asynchronous wakeup from suspend mode disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBRESMEN_A :: _0 ) } # [ doc = "USB asynchronous wakeup from suspend mode enabled. The asynchronous resume interrupt differs from the synchronous resume interrupt in that it asynchronously detects K-state using the unfiltered state of the D+ and D- pins. This interrupt should only be enabled when the Transceiver is suspended." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBRESMEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "USB Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBRESET_AW { # [ doc = "0: Normal USB module operation." ] _0 , # [ doc = "1: Returns the USB module to its reset state." ] _1 } impl From < USBRESET_AW > for bool { # [ inline ( always ) ] fn from ( variant : USBRESET_AW ) -> Self { match variant { USBRESET_AW :: _0 => false , USBRESET_AW :: _1 => true } } } # [ doc = "Write proxy for field `USBRESET`" ] pub struct USBRESET_W < 'a > { w : & 'a mut W , } impl < 'a > USBRESET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBRESET_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal USB module operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBRESET_AW :: _0 ) } # [ doc = "Returns the USB module to its reset state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBRESET_AW :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - USB Asynchronous Interrupt" ] # [ inline ( always ) ] pub fn usb_resume_int ( & self ) -> USB_RESUME_INT_R { USB_RESUME_INT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Synchronous USB Interrupt Detect" ] # [ inline ( always ) ] pub fn sync_det ( & self ) -> SYNC_DET_R { SYNC_DET_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Combined USB Clock Recovery interrupt status" ] # [ inline ( always ) ] pub fn usb_clk_recovery_int ( & self ) -> USB_CLK_RECOVERY_INT_R { USB_CLK_RECOVERY_INT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Asynchronous Resume Interrupt Enable" ] # [ inline ( always ) ] pub fn usbresmen ( & self ) -> USBRESMEN_R { USBRESMEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 5 - Asynchronous Resume Interrupt Enable" ] # [ inline ( always ) ] pub fn usbresmen ( & mut self ) -> USBRESMEN_W { USBRESMEN_W { w : self } } # [ doc = "Bit 7 - USB Reset" ] # [ inline ( always ) ] pub fn usbreset ( & mut self ) -> USBRESET_W { USBRESET_W { w : self } } } } # [ doc = "Frame Adjust Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbfrmadjust](usbfrmadjust) module" ] pub type USBFRMADJUST = crate :: Reg < u8 , _USBFRMADJUST > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBFRMADJUST ; # [ doc = "`read()` method returns [usbfrmadjust::R](usbfrmadjust::R) reader structure" ] impl crate :: Readable for USBFRMADJUST { } # [ doc = "`write(|w| ..)` method takes [usbfrmadjust::W](usbfrmadjust::W) writer structure" ] impl crate :: Writable for USBFRMADJUST { } # [ doc = "Frame Adjust Register" ] pub mod usbfrmadjust { # [ doc = "Reader of register USBFRMADJUST" ] pub type R = crate :: R < u8 , super :: USBFRMADJUST > ; # [ doc = "Writer for register USBFRMADJUST" ] pub type W = crate :: W < u8 , super :: USBFRMADJUST > ; # [ doc = "Register USBFRMADJUST `reset()`'s with value 0" ] impl crate :: ResetValue for super :: USBFRMADJUST { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ADJ`" ] pub type ADJ_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ADJ`" ] pub struct ADJ_W < 'a > { w : & 'a mut W , } impl < 'a > ADJ_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Frame Adjustment" ] # [ inline ( always ) ] pub fn adj ( & self ) -> ADJ_R { ADJ_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Frame Adjustment" ] # [ inline ( always ) ] pub fn adj ( & mut self ) -> ADJ_W { ADJ_W { w : self } } } } # [ doc = "USB Clock recovery control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clk_recover_ctrl](clk_recover_ctrl) module" ] pub type CLK_RECOVER_CTRL = crate :: Reg < u8 , _CLK_RECOVER_CTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLK_RECOVER_CTRL ; # [ doc = "`read()` method returns [clk_recover_ctrl::R](clk_recover_ctrl::R) reader structure" ] impl crate :: Readable for CLK_RECOVER_CTRL { } # [ doc = "`write(|w| ..)` method takes [clk_recover_ctrl::W](clk_recover_ctrl::W) writer structure" ] impl crate :: Writable for CLK_RECOVER_CTRL { } # [ doc = "USB Clock recovery control" ] pub mod clk_recover_ctrl { # [ doc = "Reader of register CLK_RECOVER_CTRL" ] pub type R = crate :: R < u8 , super :: CLK_RECOVER_CTRL > ; # [ doc = "Writer for register CLK_RECOVER_CTRL" ] pub type W = crate :: W < u8 , super :: CLK_RECOVER_CTRL > ; # [ doc = "Register CLK_RECOVER_CTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CLK_RECOVER_CTRL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Restart from IFR trim value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESTART_IFRTRIM_EN_A { # [ doc = "0: Trim fine adjustment always works based on the previous updated trim fine value (default)" ] _0 , # [ doc = "1: Trim fine restarts from the IFR trim value whenever bus_reset/bus_resume is detected or module enable is desasserted" ] _1 } impl From < RESTART_IFRTRIM_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : RESTART_IFRTRIM_EN_A ) -> Self { match variant { RESTART_IFRTRIM_EN_A :: _0 => false , RESTART_IFRTRIM_EN_A :: _1 => true } } } # [ doc = "Reader of field `RESTART_IFRTRIM_EN`" ] pub type RESTART_IFRTRIM_EN_R = crate :: R < bool , RESTART_IFRTRIM_EN_A > ; impl RESTART_IFRTRIM_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RESTART_IFRTRIM_EN_A { match self . bits { false => RESTART_IFRTRIM_EN_A :: _0 , true => RESTART_IFRTRIM_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RESTART_IFRTRIM_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RESTART_IFRTRIM_EN_A :: _1 } } # [ doc = "Write proxy for field `RESTART_IFRTRIM_EN`" ] pub struct RESTART_IFRTRIM_EN_W < 'a > { w : & 'a mut W , } impl < 'a > RESTART_IFRTRIM_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RESTART_IFRTRIM_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trim fine adjustment always works based on the previous updated trim fine value (default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RESTART_IFRTRIM_EN_A :: _0 ) } # [ doc = "Trim fine restarts from the IFR trim value whenever bus_reset/bus_resume is detected or module enable is desasserted" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RESTART_IFRTRIM_EN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Reset/resume to rough phase enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESET_RESUME_ROUGH_EN_A { # [ doc = "0: Always works in tracking phase after the 1st time rough to track transition (default)" ] _0 , # [ doc = "1: Go back to rough stage whenever bus reset or bus resume occurs" ] _1 } impl From < RESET_RESUME_ROUGH_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : RESET_RESUME_ROUGH_EN_A ) -> Self { match variant { RESET_RESUME_ROUGH_EN_A :: _0 => false , RESET_RESUME_ROUGH_EN_A :: _1 => true } } } # [ doc = "Reader of field `RESET_RESUME_ROUGH_EN`" ] pub type RESET_RESUME_ROUGH_EN_R = crate :: R < bool , RESET_RESUME_ROUGH_EN_A > ; impl RESET_RESUME_ROUGH_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RESET_RESUME_ROUGH_EN_A { match self . bits { false => RESET_RESUME_ROUGH_EN_A :: _0 , true => RESET_RESUME_ROUGH_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RESET_RESUME_ROUGH_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RESET_RESUME_ROUGH_EN_A :: _1 } } # [ doc = "Write proxy for field `RESET_RESUME_ROUGH_EN`" ] pub struct RESET_RESUME_ROUGH_EN_W < 'a > { w : & 'a mut W , } impl < 'a > RESET_RESUME_ROUGH_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RESET_RESUME_ROUGH_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Always works in tracking phase after the 1st time rough to track transition (default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RESET_RESUME_ROUGH_EN_A :: _0 ) } # [ doc = "Go back to rough stage whenever bus reset or bus resume occurs" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RESET_RESUME_ROUGH_EN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Crystal-less USB enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLOCK_RECOVER_EN_A { # [ doc = "0: Disable clock recovery block (default)" ] _0 , # [ doc = "1: Enable clock recovery block" ] _1 } impl From < CLOCK_RECOVER_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : CLOCK_RECOVER_EN_A ) -> Self { match variant { CLOCK_RECOVER_EN_A :: _0 => false , CLOCK_RECOVER_EN_A :: _1 => true } } } # [ doc = "Reader of field `CLOCK_RECOVER_EN`" ] pub type CLOCK_RECOVER_EN_R = crate :: R < bool , CLOCK_RECOVER_EN_A > ; impl CLOCK_RECOVER_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLOCK_RECOVER_EN_A { match self . bits { false => CLOCK_RECOVER_EN_A :: _0 , true => CLOCK_RECOVER_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLOCK_RECOVER_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLOCK_RECOVER_EN_A :: _1 } } # [ doc = "Write proxy for field `CLOCK_RECOVER_EN`" ] pub struct CLOCK_RECOVER_EN_W < 'a > { w : & 'a mut W , } impl < 'a > CLOCK_RECOVER_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLOCK_RECOVER_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable clock recovery block (default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLOCK_RECOVER_EN_A :: _0 ) } # [ doc = "Enable clock recovery block" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLOCK_RECOVER_EN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 5 - Restart from IFR trim value" ] # [ inline ( always ) ] pub fn restart_ifrtrim_en ( & self ) -> RESTART_IFRTRIM_EN_R { RESTART_IFRTRIM_EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Reset/resume to rough phase enable" ] # [ inline ( always ) ] pub fn reset_resume_rough_en ( & self ) -> RESET_RESUME_ROUGH_EN_R { RESET_RESUME_ROUGH_EN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Crystal-less USB enable" ] # [ inline ( always ) ] pub fn clock_recover_en ( & self ) -> CLOCK_RECOVER_EN_R { CLOCK_RECOVER_EN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 5 - Restart from IFR trim value" ] # [ inline ( always ) ] pub fn restart_ifrtrim_en ( & mut self ) -> RESTART_IFRTRIM_EN_W { RESTART_IFRTRIM_EN_W { w : self } } # [ doc = "Bit 6 - Reset/resume to rough phase enable" ] # [ inline ( always ) ] pub fn reset_resume_rough_en ( & mut self ) -> RESET_RESUME_ROUGH_EN_W { RESET_RESUME_ROUGH_EN_W { w : self } } # [ doc = "Bit 7 - Crystal-less USB enable" ] # [ inline ( always ) ] pub fn clock_recover_en ( & mut self ) -> CLOCK_RECOVER_EN_W { CLOCK_RECOVER_EN_W { w : self } } } } # [ doc = "IRC48M oscillator enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clk_recover_irc_en](clk_recover_irc_en) module" ] pub type CLK_RECOVER_IRC_EN = crate :: Reg < u8 , _CLK_RECOVER_IRC_EN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLK_RECOVER_IRC_EN ; # [ doc = "`read()` method returns [clk_recover_irc_en::R](clk_recover_irc_en::R) reader structure" ] impl crate :: Readable for CLK_RECOVER_IRC_EN { } # [ doc = "`write(|w| ..)` method takes [clk_recover_irc_en::W](clk_recover_irc_en::W) writer structure" ] impl crate :: Writable for CLK_RECOVER_IRC_EN { } # [ doc = "IRC48M oscillator enable register" ] pub mod clk_recover_irc_en { # [ doc = "Reader of register CLK_RECOVER_IRC_EN" ] pub type R = crate :: R < u8 , super :: CLK_RECOVER_IRC_EN > ; # [ doc = "Writer for register CLK_RECOVER_IRC_EN" ] pub type W = crate :: W < u8 , super :: CLK_RECOVER_IRC_EN > ; # [ doc = "Register CLK_RECOVER_IRC_EN `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: CLK_RECOVER_IRC_EN { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "IRC48M regulator enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REG_EN_A { # [ doc = "0: IRC48M local regulator is disabled" ] _0 , # [ doc = "1: IRC48M local regulator is enabled (default)" ] _1 } impl From < REG_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : REG_EN_A ) -> Self { match variant { REG_EN_A :: _0 => false , REG_EN_A :: _1 => true } } } # [ doc = "Reader of field `REG_EN`" ] pub type REG_EN_R = crate :: R < bool , REG_EN_A > ; impl REG_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> REG_EN_A { match self . bits { false => REG_EN_A :: _0 , true => REG_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == REG_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == REG_EN_A :: _1 } } # [ doc = "Write proxy for field `REG_EN`" ] pub struct REG_EN_W < 'a > { w : & 'a mut W , } impl < 'a > REG_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REG_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IRC48M local regulator is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( REG_EN_A :: _0 ) } # [ doc = "IRC48M local regulator is enabled (default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( REG_EN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "IRC48M enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRC_EN_A { # [ doc = "0: Disable the IRC48M module (default)" ] _0 , # [ doc = "1: Enable the IRC48M module" ] _1 } impl From < IRC_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : IRC_EN_A ) -> Self { match variant { IRC_EN_A :: _0 => false , IRC_EN_A :: _1 => true } } } # [ doc = "Reader of field `IRC_EN`" ] pub type IRC_EN_R = crate :: R < bool , IRC_EN_A > ; impl IRC_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IRC_EN_A { match self . bits { false => IRC_EN_A :: _0 , true => IRC_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IRC_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IRC_EN_A :: _1 } } # [ doc = "Write proxy for field `IRC_EN`" ] pub struct IRC_EN_W < 'a > { w : & 'a mut W , } impl < 'a > IRC_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRC_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable the IRC48M module (default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IRC_EN_A :: _0 ) } # [ doc = "Enable the IRC48M module" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IRC_EN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } impl R { # [ doc = "Bit 0 - IRC48M regulator enable" ] # [ inline ( always ) ] pub fn reg_en ( & self ) -> REG_EN_R { REG_EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - IRC48M enable" ] # [ inline ( always ) ] pub fn irc_en ( & self ) -> IRC_EN_R { IRC_EN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - IRC48M regulator enable" ] # [ inline ( always ) ] pub fn reg_en ( & mut self ) -> REG_EN_W { REG_EN_W { w : self } } # [ doc = "Bit 1 - IRC48M enable" ] # [ inline ( always ) ] pub fn irc_en ( & mut self ) -> IRC_EN_W { IRC_EN_W { w : self } } } } # [ doc = "Clock recovery combined interrupt enable\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clk_recover_int_en](clk_recover_int_en) module" ] pub type CLK_RECOVER_INT_EN = crate :: Reg < u8 , _CLK_RECOVER_INT_EN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLK_RECOVER_INT_EN ; # [ doc = "`read()` method returns [clk_recover_int_en::R](clk_recover_int_en::R) reader structure" ] impl crate :: Readable for CLK_RECOVER_INT_EN { } # [ doc = "`write(|w| ..)` method takes [clk_recover_int_en::W](clk_recover_int_en::W) writer structure" ] impl crate :: Writable for CLK_RECOVER_INT_EN { } # [ doc = "Clock recovery combined interrupt enable" ] pub mod clk_recover_int_en { # [ doc = "Reader of register CLK_RECOVER_INT_EN" ] pub type R = crate :: R < u8 , super :: CLK_RECOVER_INT_EN > ; # [ doc = "Writer for register CLK_RECOVER_INT_EN" ] pub type W = crate :: W < u8 , super :: CLK_RECOVER_INT_EN > ; # [ doc = "Register CLK_RECOVER_INT_EN `reset()`'s with value 0x10" ] impl crate :: ResetValue for super :: CLK_RECOVER_INT_EN { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x10 } } # [ doc = "Determines whether OVF_ERROR condition signal is used in generation of USB_CLK_RECOVERY_INT.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVF_ERROR_EN_A { # [ doc = "0: The interrupt will be masked" ] _0 , # [ doc = "1: The interrupt will be enabled (default)" ] _1 } impl From < OVF_ERROR_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : OVF_ERROR_EN_A ) -> Self { match variant { OVF_ERROR_EN_A :: _0 => false , OVF_ERROR_EN_A :: _1 => true } } } # [ doc = "Reader of field `OVF_ERROR_EN`" ] pub type OVF_ERROR_EN_R = crate :: R < bool , OVF_ERROR_EN_A > ; impl OVF_ERROR_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OVF_ERROR_EN_A { match self . bits { false => OVF_ERROR_EN_A :: _0 , true => OVF_ERROR_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OVF_ERROR_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OVF_ERROR_EN_A :: _1 } } # [ doc = "Write proxy for field `OVF_ERROR_EN`" ] pub struct OVF_ERROR_EN_W < 'a > { w : & 'a mut W , } impl < 'a > OVF_ERROR_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OVF_ERROR_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The interrupt will be masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OVF_ERROR_EN_A :: _0 ) } # [ doc = "The interrupt will be enabled (default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OVF_ERROR_EN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 4 - Determines whether OVF_ERROR condition signal is used in generation of USB_CLK_RECOVERY_INT." ] # [ inline ( always ) ] pub fn ovf_error_en ( & self ) -> OVF_ERROR_EN_R { OVF_ERROR_EN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Determines whether OVF_ERROR condition signal is used in generation of USB_CLK_RECOVERY_INT." ] # [ inline ( always ) ] pub fn ovf_error_en ( & mut self ) -> OVF_ERROR_EN_W { OVF_ERROR_EN_W { w : self } } } } # [ doc = "Clock recovery separated interrupt status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clk_recover_int_status](clk_recover_int_status) module" ] pub type CLK_RECOVER_INT_STATUS = crate :: Reg < u8 , _CLK_RECOVER_INT_STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLK_RECOVER_INT_STATUS ; # [ doc = "`read()` method returns [clk_recover_int_status::R](clk_recover_int_status::R) reader structure" ] impl crate :: Readable for CLK_RECOVER_INT_STATUS { } # [ doc = "`write(|w| ..)` method takes [clk_recover_int_status::W](clk_recover_int_status::W) writer structure" ] impl crate :: Writable for CLK_RECOVER_INT_STATUS { } # [ doc = "Clock recovery separated interrupt status" ] pub mod clk_recover_int_status { # [ doc = "Reader of register CLK_RECOVER_INT_STATUS" ] pub type R = crate :: R < u8 , super :: CLK_RECOVER_INT_STATUS > ; # [ doc = "Writer for register CLK_RECOVER_INT_STATUS" ] pub type W = crate :: W < u8 , super :: CLK_RECOVER_INT_STATUS > ; # [ doc = "Register CLK_RECOVER_INT_STATUS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CLK_RECOVER_INT_STATUS { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Indicates that the USB clock recovery algorithm has detected that the frequency trim adjustment needed for the IRC48M output clock is outside the available TRIM_FINE adjustment range for the IRC48M module\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVF_ERROR_A { # [ doc = "0: No interrupt is reported" ] _0 , # [ doc = "1: Unmasked interrupt has been generated" ] _1 } impl From < OVF_ERROR_A > for bool { # [ inline ( always ) ] fn from ( variant : OVF_ERROR_A ) -> Self { match variant { OVF_ERROR_A :: _0 => false , OVF_ERROR_A :: _1 => true } } } # [ doc = "Reader of field `OVF_ERROR`" ] pub type OVF_ERROR_R = crate :: R < bool , OVF_ERROR_A > ; impl OVF_ERROR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OVF_ERROR_A { match self . bits { false => OVF_ERROR_A :: _0 , true => OVF_ERROR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OVF_ERROR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OVF_ERROR_A :: _1 } } # [ doc = "Write proxy for field `OVF_ERROR`" ] pub struct OVF_ERROR_W < 'a > { w : & 'a mut W , } impl < 'a > OVF_ERROR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OVF_ERROR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No interrupt is reported" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OVF_ERROR_A :: _0 ) } # [ doc = "Unmasked interrupt has been generated" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OVF_ERROR_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 4 - Indicates that the USB clock recovery algorithm has detected that the frequency trim adjustment needed for the IRC48M output clock is outside the available TRIM_FINE adjustment range for the IRC48M module" ] # [ inline ( always ) ] pub fn ovf_error ( & self ) -> OVF_ERROR_R { OVF_ERROR_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 4 - Indicates that the USB clock recovery algorithm has detected that the frequency trim adjustment needed for the IRC48M output clock is outside the available TRIM_FINE adjustment range for the IRC48M module" ] # [ inline ( always ) ] pub fn ovf_error ( & mut self ) -> OVF_ERROR_W { OVF_ERROR_W { w : self } } } } } # [ doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)" ] pub struct CMP0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for CMP0 { } impl CMP0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const cmp0 :: RegisterBlock { 0x4007_3000 as * const _ } } impl Deref for CMP0 { type Target = cmp0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CMP0 :: ptr ( ) } } } # [ doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)" ] pub mod cmp0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - CMP Control Register 0" ] pub cr0 : CR0 , # [ doc = "0x01 - CMP Control Register 1" ] pub cr1 : CR1 , # [ doc = "0x02 - CMP Filter Period Register" ] pub fpr : FPR , # [ doc = "0x03 - CMP Status and Control Register" ] pub scr : SCR , # [ doc = "0x04 - DAC Control Register" ] pub daccr : DACCR , # [ doc = "0x05 - MUX Control Register" ] pub muxcr : MUXCR , } # [ doc = "CMP Control Register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr0](cr0) module" ] pub type CR0 = crate :: Reg < u8 , _CR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR0 ; # [ doc = "`read()` method returns [cr0::R](cr0::R) reader structure" ] impl crate :: Readable for CR0 { } # [ doc = "`write(|w| ..)` method takes [cr0::W](cr0::W) writer structure" ] impl crate :: Writable for CR0 { } # [ doc = "CMP Control Register 0" ] pub mod cr0 { # [ doc = "Reader of register CR0" ] pub type R = crate :: R < u8 , super :: CR0 > ; # [ doc = "Writer for register CR0" ] pub type W = crate :: W < u8 , super :: CR0 > ; # [ doc = "Register CR0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Comparator hard block hysteresis control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HYSTCTR_A { # [ doc = "0: Level 0" ] _00 , # [ doc = "1: Level 1" ] _01 , # [ doc = "2: Level 2" ] _10 , # [ doc = "3: Level 3" ] _11 } impl From < HYSTCTR_A > for u8 { # [ inline ( always ) ] fn from ( variant : HYSTCTR_A ) -> Self { match variant { HYSTCTR_A :: _00 => 0 , HYSTCTR_A :: _01 => 1 , HYSTCTR_A :: _10 => 2 , HYSTCTR_A :: _11 => 3 } } } # [ doc = "Reader of field `HYSTCTR`" ] pub type HYSTCTR_R = crate :: R < u8 , HYSTCTR_A > ; impl HYSTCTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HYSTCTR_A { match self . bits { 0 => HYSTCTR_A :: _00 , 1 => HYSTCTR_A :: _01 , 2 => HYSTCTR_A :: _10 , 3 => HYSTCTR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == HYSTCTR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == HYSTCTR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == HYSTCTR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == HYSTCTR_A :: _11 } } # [ doc = "Write proxy for field `HYSTCTR`" ] pub struct HYSTCTR_W < 'a > { w : & 'a mut W , } impl < 'a > HYSTCTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HYSTCTR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Level 0" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _00 ) } # [ doc = "Level 1" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _01 ) } # [ doc = "Level 2" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _10 ) } # [ doc = "Level 3" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Filter Sample Count\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTER_CNT_A { # [ doc = "0: Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA." ] _000 , # [ doc = "1: One sample must agree. The comparator output is simply sampled." ] _001 , # [ doc = "2: 2 consecutive samples must agree." ] _010 , # [ doc = "3: 3 consecutive samples must agree." ] _011 , # [ doc = "4: 4 consecutive samples must agree." ] _100 , # [ doc = "5: 5 consecutive samples must agree." ] _101 , # [ doc = "6: 6 consecutive samples must agree." ] _110 , # [ doc = "7: 7 consecutive samples must agree." ] _111 } impl From < FILTER_CNT_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTER_CNT_A ) -> Self { match variant { FILTER_CNT_A :: _000 => 0 , FILTER_CNT_A :: _001 => 1 , FILTER_CNT_A :: _010 => 2 , FILTER_CNT_A :: _011 => 3 , FILTER_CNT_A :: _100 => 4 , FILTER_CNT_A :: _101 => 5 , FILTER_CNT_A :: _110 => 6 , FILTER_CNT_A :: _111 => 7 } } } # [ doc = "Reader of field `FILTER_CNT`" ] pub type FILTER_CNT_R = crate :: R < u8 , FILTER_CNT_A > ; impl FILTER_CNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTER_CNT_A { match self . bits { 0 => FILTER_CNT_A :: _000 , 1 => FILTER_CNT_A :: _001 , 2 => FILTER_CNT_A :: _010 , 3 => FILTER_CNT_A :: _011 , 4 => FILTER_CNT_A :: _100 , 5 => FILTER_CNT_A :: _101 , 6 => FILTER_CNT_A :: _110 , 7 => FILTER_CNT_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == FILTER_CNT_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == FILTER_CNT_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == FILTER_CNT_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == FILTER_CNT_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == FILTER_CNT_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == FILTER_CNT_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == FILTER_CNT_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == FILTER_CNT_A :: _111 } } # [ doc = "Write proxy for field `FILTER_CNT`" ] pub struct FILTER_CNT_W < 'a > { w : & 'a mut W , } impl < 'a > FILTER_CNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTER_CNT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _000 ) } # [ doc = "One sample must agree. The comparator output is simply sampled." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _001 ) } # [ doc = "2 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _010 ) } # [ doc = "3 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _011 ) } # [ doc = "4 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _100 ) } # [ doc = "5 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _101 ) } # [ doc = "6 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _110 ) } # [ doc = "7 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 4 ) ) | ( ( ( value as u8 ) & 0x07 ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Comparator hard block hysteresis control" ] # [ inline ( always ) ] pub fn hystctr ( & self ) -> HYSTCTR_R { HYSTCTR_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 4:6 - Filter Sample Count" ] # [ inline ( always ) ] pub fn filter_cnt ( & self ) -> FILTER_CNT_R { FILTER_CNT_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Comparator hard block hysteresis control" ] # [ inline ( always ) ] pub fn hystctr ( & mut self ) -> HYSTCTR_W { HYSTCTR_W { w : self } } # [ doc = "Bits 4:6 - Filter Sample Count" ] # [ inline ( always ) ] pub fn filter_cnt ( & mut self ) -> FILTER_CNT_W { FILTER_CNT_W { w : self } } } } # [ doc = "CMP Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr1](cr1) module" ] pub type CR1 = crate :: Reg < u8 , _CR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR1 ; # [ doc = "`read()` method returns [cr1::R](cr1::R) reader structure" ] impl crate :: Readable for CR1 { } # [ doc = "`write(|w| ..)` method takes [cr1::W](cr1::W) writer structure" ] impl crate :: Writable for CR1 { } # [ doc = "CMP Control Register 1" ] pub mod cr1 { # [ doc = "Reader of register CR1" ] pub type R = crate :: R < u8 , super :: CR1 > ; # [ doc = "Writer for register CR1" ] pub type W = crate :: W < u8 , super :: CR1 > ; # [ doc = "Register CR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Comparator Module Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_A { # [ doc = "0: Analog Comparator is disabled." ] _0 , # [ doc = "1: Analog Comparator is enabled." ] _1 } impl From < EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_A ) -> Self { match variant { EN_A :: _0 => false , EN_A :: _1 => true } } } # [ doc = "Reader of field `EN`" ] pub type EN_R = crate :: R < bool , EN_A > ; impl EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_A { match self . bits { false => EN_A :: _0 , true => EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_A :: _1 } } # [ doc = "Write proxy for field `EN`" ] pub struct EN_W < 'a > { w : & 'a mut W , } impl < 'a > EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Analog Comparator is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_A :: _0 ) } # [ doc = "Analog Comparator is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Comparator Output Pin Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OPE_A { # [ doc = "0: CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect." ] _0 , # [ doc = "1: CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect." ] _1 } impl From < OPE_A > for bool { # [ inline ( always ) ] fn from ( variant : OPE_A ) -> Self { match variant { OPE_A :: _0 => false , OPE_A :: _1 => true } } } # [ doc = "Reader of field `OPE`" ] pub type OPE_R = crate :: R < bool , OPE_A > ; impl OPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OPE_A { match self . bits { false => OPE_A :: _0 , true => OPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OPE_A :: _1 } } # [ doc = "Write proxy for field `OPE`" ] pub struct OPE_W < 'a > { w : & 'a mut W , } impl < 'a > OPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OPE_A :: _0 ) } # [ doc = "CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OPE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Comparator Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COS_A { # [ doc = "0: Set the filtered comparator output (CMPO) to equal COUT." ] _0 , # [ doc = "1: Set the unfiltered comparator output (CMPO) to equal COUTA." ] _1 } impl From < COS_A > for bool { # [ inline ( always ) ] fn from ( variant : COS_A ) -> Self { match variant { COS_A :: _0 => false , COS_A :: _1 => true } } } # [ doc = "Reader of field `COS`" ] pub type COS_R = crate :: R < bool , COS_A > ; impl COS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COS_A { match self . bits { false => COS_A :: _0 , true => COS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COS_A :: _1 } } # [ doc = "Write proxy for field `COS`" ] pub struct COS_W < 'a > { w : & 'a mut W , } impl < 'a > COS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Set the filtered comparator output (CMPO) to equal COUT." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COS_A :: _0 ) } # [ doc = "Set the unfiltered comparator output (CMPO) to equal COUTA." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Comparator INVERT\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV_A { # [ doc = "0: Does not invert the comparator output." ] _0 , # [ doc = "1: Inverts the comparator output." ] _1 } impl From < INV_A > for bool { # [ inline ( always ) ] fn from ( variant : INV_A ) -> Self { match variant { INV_A :: _0 => false , INV_A :: _1 => true } } } # [ doc = "Reader of field `INV`" ] pub type INV_R = crate :: R < bool , INV_A > ; impl INV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV_A { match self . bits { false => INV_A :: _0 , true => INV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV_A :: _1 } } # [ doc = "Write proxy for field `INV`" ] pub struct INV_W < 'a > { w : & 'a mut W , } impl < 'a > INV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Does not invert the comparator output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV_A :: _0 ) } # [ doc = "Inverts the comparator output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Power Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PMODE_A { # [ doc = "0: Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption." ] _0 , # [ doc = "1: High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption." ] _1 } impl From < PMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : PMODE_A ) -> Self { match variant { PMODE_A :: _0 => false , PMODE_A :: _1 => true } } } # [ doc = "Reader of field `PMODE`" ] pub type PMODE_R = crate :: R < bool , PMODE_A > ; impl PMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PMODE_A { match self . bits { false => PMODE_A :: _0 , true => PMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PMODE_A :: _1 } } # [ doc = "Write proxy for field `PMODE`" ] pub struct PMODE_W < 'a > { w : & 'a mut W , } impl < 'a > PMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PMODE_A :: _0 ) } # [ doc = "High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PMODE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Trigger Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGM_A { # [ doc = "0: Trigger mode is disabled." ] _0 , # [ doc = "1: Trigger mode is enabled." ] _1 } impl From < TRIGM_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIGM_A ) -> Self { match variant { TRIGM_A :: _0 => false , TRIGM_A :: _1 => true } } } # [ doc = "Reader of field `TRIGM`" ] pub type TRIGM_R = crate :: R < bool , TRIGM_A > ; impl TRIGM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIGM_A { match self . bits { false => TRIGM_A :: _0 , true => TRIGM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIGM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIGM_A :: _1 } } # [ doc = "Write proxy for field `TRIGM`" ] pub struct TRIGM_W < 'a > { w : & 'a mut W , } impl < 'a > TRIGM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIGM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIGM_A :: _0 ) } # [ doc = "Trigger mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIGM_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Windowing Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WE_A { # [ doc = "0: Windowing mode is not selected." ] _0 , # [ doc = "1: Windowing mode is selected." ] _1 } impl From < WE_A > for bool { # [ inline ( always ) ] fn from ( variant : WE_A ) -> Self { match variant { WE_A :: _0 => false , WE_A :: _1 => true } } } # [ doc = "Reader of field `WE`" ] pub type WE_R = crate :: R < bool , WE_A > ; impl WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WE_A { match self . bits { false => WE_A :: _0 , true => WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WE_A :: _1 } } # [ doc = "Write proxy for field `WE`" ] pub struct WE_W < 'a > { w : & 'a mut W , } impl < 'a > WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Windowing mode is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WE_A :: _0 ) } # [ doc = "Windowing mode is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Sample Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SE_A { # [ doc = "0: Sampling mode is not selected." ] _0 , # [ doc = "1: Sampling mode is selected." ] _1 } impl From < SE_A > for bool { # [ inline ( always ) ] fn from ( variant : SE_A ) -> Self { match variant { SE_A :: _0 => false , SE_A :: _1 => true } } } # [ doc = "Reader of field `SE`" ] pub type SE_R = crate :: R < bool , SE_A > ; impl SE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SE_A { match self . bits { false => SE_A :: _0 , true => SE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SE_A :: _1 } } # [ doc = "Write proxy for field `SE`" ] pub struct SE_W < 'a > { w : & 'a mut W , } impl < 'a > SE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sampling mode is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SE_A :: _0 ) } # [ doc = "Sampling mode is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Comparator Module Enable" ] # [ inline ( always ) ] pub fn en ( & self ) -> EN_R { EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Comparator Output Pin Enable" ] # [ inline ( always ) ] pub fn ope ( & self ) -> OPE_R { OPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Comparator Output Select" ] # [ inline ( always ) ] pub fn cos ( & self ) -> COS_R { COS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Comparator INVERT" ] # [ inline ( always ) ] pub fn inv ( & self ) -> INV_R { INV_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Power Mode Select" ] # [ inline ( always ) ] pub fn pmode ( & self ) -> PMODE_R { PMODE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Trigger Mode Enable" ] # [ inline ( always ) ] pub fn trigm ( & self ) -> TRIGM_R { TRIGM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Windowing Enable" ] # [ inline ( always ) ] pub fn we ( & self ) -> WE_R { WE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Sample Enable" ] # [ inline ( always ) ] pub fn se ( & self ) -> SE_R { SE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Comparator Module Enable" ] # [ inline ( always ) ] pub fn en ( & mut self ) -> EN_W { EN_W { w : self } } # [ doc = "Bit 1 - Comparator Output Pin Enable" ] # [ inline ( always ) ] pub fn ope ( & mut self ) -> OPE_W { OPE_W { w : self } } # [ doc = "Bit 2 - Comparator Output Select" ] # [ inline ( always ) ] pub fn cos ( & mut self ) -> COS_W { COS_W { w : self } } # [ doc = "Bit 3 - Comparator INVERT" ] # [ inline ( always ) ] pub fn inv ( & mut self ) -> INV_W { INV_W { w : self } } # [ doc = "Bit 4 - Power Mode Select" ] # [ inline ( always ) ] pub fn pmode ( & mut self ) -> PMODE_W { PMODE_W { w : self } } # [ doc = "Bit 5 - Trigger Mode Enable" ] # [ inline ( always ) ] pub fn trigm ( & mut self ) -> TRIGM_W { TRIGM_W { w : self } } # [ doc = "Bit 6 - Windowing Enable" ] # [ inline ( always ) ] pub fn we ( & mut self ) -> WE_W { WE_W { w : self } } # [ doc = "Bit 7 - Sample Enable" ] # [ inline ( always ) ] pub fn se ( & mut self ) -> SE_W { SE_W { w : self } } } } # [ doc = "CMP Filter Period Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fpr](fpr) module" ] pub type FPR = crate :: Reg < u8 , _FPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPR ; # [ doc = "`read()` method returns [fpr::R](fpr::R) reader structure" ] impl crate :: Readable for FPR { } # [ doc = "`write(|w| ..)` method takes [fpr::W](fpr::W) writer structure" ] impl crate :: Writable for FPR { } # [ doc = "CMP Filter Period Register" ] pub mod fpr { # [ doc = "Reader of register FPR" ] pub type R = crate :: R < u8 , super :: FPR > ; # [ doc = "Writer for register FPR" ] pub type W = crate :: W < u8 , super :: FPR > ; # [ doc = "Register FPR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FPR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FILT_PER`" ] pub type FILT_PER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FILT_PER`" ] pub struct FILT_PER_W < 'a > { w : & 'a mut W , } impl < 'a > FILT_PER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Filter Sample Period" ] # [ inline ( always ) ] pub fn filt_per ( & self ) -> FILT_PER_R { FILT_PER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Filter Sample Period" ] # [ inline ( always ) ] pub fn filt_per ( & mut self ) -> FILT_PER_W { FILT_PER_W { w : self } } } } # [ doc = "CMP Status and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scr](scr) module" ] pub type SCR = crate :: Reg < u8 , _SCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCR ; # [ doc = "`read()` method returns [scr::R](scr::R) reader structure" ] impl crate :: Readable for SCR { } # [ doc = "`write(|w| ..)` method takes [scr::W](scr::W) writer structure" ] impl crate :: Writable for SCR { } # [ doc = "CMP Status and Control Register" ] pub mod scr { # [ doc = "Reader of register SCR" ] pub type R = crate :: R < u8 , super :: SCR > ; # [ doc = "Writer for register SCR" ] pub type W = crate :: W < u8 , super :: SCR > ; # [ doc = "Register SCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUT`" ] pub type COUT_R = crate :: R < bool , bool > ; # [ doc = "Analog Comparator Flag Falling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFF_A { # [ doc = "0: Falling-edge on COUT has not been detected." ] _0 , # [ doc = "1: Falling-edge on COUT has occurred." ] _1 } impl From < CFF_A > for bool { # [ inline ( always ) ] fn from ( variant : CFF_A ) -> Self { match variant { CFF_A :: _0 => false , CFF_A :: _1 => true } } } # [ doc = "Reader of field `CFF`" ] pub type CFF_R = crate :: R < bool , CFF_A > ; impl CFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFF_A { match self . bits { false => CFF_A :: _0 , true => CFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFF_A :: _1 } } # [ doc = "Write proxy for field `CFF`" ] pub struct CFF_W < 'a > { w : & 'a mut W , } impl < 'a > CFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Falling-edge on COUT has not been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFF_A :: _0 ) } # [ doc = "Falling-edge on COUT has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Analog Comparator Flag Rising\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFR_A { # [ doc = "0: Rising-edge on COUT has not been detected." ] _0 , # [ doc = "1: Rising-edge on COUT has occurred." ] _1 } impl From < CFR_A > for bool { # [ inline ( always ) ] fn from ( variant : CFR_A ) -> Self { match variant { CFR_A :: _0 => false , CFR_A :: _1 => true } } } # [ doc = "Reader of field `CFR`" ] pub type CFR_R = crate :: R < bool , CFR_A > ; impl CFR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFR_A { match self . bits { false => CFR_A :: _0 , true => CFR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFR_A :: _1 } } # [ doc = "Write proxy for field `CFR`" ] pub struct CFR_W < 'a > { w : & 'a mut W , } impl < 'a > CFR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rising-edge on COUT has not been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFR_A :: _0 ) } # [ doc = "Rising-edge on COUT has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Comparator Interrupt Enable Falling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IEF_A { # [ doc = "0: Interrupt is disabled." ] _0 , # [ doc = "1: Interrupt is enabled." ] _1 } impl From < IEF_A > for bool { # [ inline ( always ) ] fn from ( variant : IEF_A ) -> Self { match variant { IEF_A :: _0 => false , IEF_A :: _1 => true } } } # [ doc = "Reader of field `IEF`" ] pub type IEF_R = crate :: R < bool , IEF_A > ; impl IEF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IEF_A { match self . bits { false => IEF_A :: _0 , true => IEF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IEF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IEF_A :: _1 } } # [ doc = "Write proxy for field `IEF`" ] pub struct IEF_W < 'a > { w : & 'a mut W , } impl < 'a > IEF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IEF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IEF_A :: _0 ) } # [ doc = "Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IEF_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Comparator Interrupt Enable Rising\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IER_A { # [ doc = "0: Interrupt is disabled." ] _0 , # [ doc = "1: Interrupt is enabled." ] _1 } impl From < IER_A > for bool { # [ inline ( always ) ] fn from ( variant : IER_A ) -> Self { match variant { IER_A :: _0 => false , IER_A :: _1 => true } } } # [ doc = "Reader of field `IER`" ] pub type IER_R = crate :: R < bool , IER_A > ; impl IER_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IER_A { match self . bits { false => IER_A :: _0 , true => IER_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IER_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IER_A :: _1 } } # [ doc = "Write proxy for field `IER`" ] pub struct IER_W < 'a > { w : & 'a mut W , } impl < 'a > IER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IER_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IER_A :: _0 ) } # [ doc = "Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IER_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "DMA Enable Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA is disabled." ] _0 , # [ doc = "1: DMA is enabled." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - Analog Comparator Output" ] # [ inline ( always ) ] pub fn cout ( & self ) -> COUT_R { COUT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Analog Comparator Flag Falling" ] # [ inline ( always ) ] pub fn cff ( & self ) -> CFF_R { CFF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Analog Comparator Flag Rising" ] # [ inline ( always ) ] pub fn cfr ( & self ) -> CFR_R { CFR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Comparator Interrupt Enable Falling" ] # [ inline ( always ) ] pub fn ief ( & self ) -> IEF_R { IEF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Comparator Interrupt Enable Rising" ] # [ inline ( always ) ] pub fn ier ( & self ) -> IER_R { IER_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - DMA Enable Control" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Analog Comparator Flag Falling" ] # [ inline ( always ) ] pub fn cff ( & mut self ) -> CFF_W { CFF_W { w : self } } # [ doc = "Bit 2 - Analog Comparator Flag Rising" ] # [ inline ( always ) ] pub fn cfr ( & mut self ) -> CFR_W { CFR_W { w : self } } # [ doc = "Bit 3 - Comparator Interrupt Enable Falling" ] # [ inline ( always ) ] pub fn ief ( & mut self ) -> IEF_W { IEF_W { w : self } } # [ doc = "Bit 4 - Comparator Interrupt Enable Rising" ] # [ inline ( always ) ] pub fn ier ( & mut self ) -> IER_W { IER_W { w : self } } # [ doc = "Bit 6 - DMA Enable Control" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } } } # [ doc = "DAC Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [daccr](daccr) module" ] pub type DACCR = crate :: Reg < u8 , _DACCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DACCR ; # [ doc = "`read()` method returns [daccr::R](daccr::R) reader structure" ] impl crate :: Readable for DACCR { } # [ doc = "`write(|w| ..)` method takes [daccr::W](daccr::W) writer structure" ] impl crate :: Writable for DACCR { } # [ doc = "DAC Control Register" ] pub mod daccr { # [ doc = "Reader of register DACCR" ] pub type R = crate :: R < u8 , super :: DACCR > ; # [ doc = "Writer for register DACCR" ] pub type W = crate :: W < u8 , super :: DACCR > ; # [ doc = "Register DACCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DACCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VOSEL`" ] pub type VOSEL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `VOSEL`" ] pub struct VOSEL_W < 'a > { w : & 'a mut W , } impl < 'a > VOSEL_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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Supply Voltage Reference Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VRSEL_A { # [ doc = "0: Vin1 is selected as resistor ladder network supply reference." ] _0 , # [ doc = "1: Vin2 is selected as resistor ladder network supply reference." ] _1 } impl From < VRSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : VRSEL_A ) -> Self { match variant { VRSEL_A :: _0 => false , VRSEL_A :: _1 => true } } } # [ doc = "Reader of field `VRSEL`" ] pub type VRSEL_R = crate :: R < bool , VRSEL_A > ; impl VRSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VRSEL_A { match self . bits { false => VRSEL_A :: _0 , true => VRSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VRSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VRSEL_A :: _1 } } # [ doc = "Write proxy for field `VRSEL`" ] pub struct VRSEL_W < 'a > { w : & 'a mut W , } impl < 'a > VRSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VRSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Vin1 is selected as resistor ladder network supply reference." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VRSEL_A :: _0 ) } # [ doc = "Vin2 is selected as resistor ladder network supply reference." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VRSEL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "DAC Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACEN_A { # [ doc = "0: DAC is disabled." ] _0 , # [ doc = "1: DAC is enabled." ] _1 } impl From < DACEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACEN_A ) -> Self { match variant { DACEN_A :: _0 => false , DACEN_A :: _1 => true } } } # [ doc = "Reader of field `DACEN`" ] pub type DACEN_R = crate :: R < bool , DACEN_A > ; impl DACEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACEN_A { match self . bits { false => DACEN_A :: _0 , true => DACEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACEN_A :: _1 } } # [ doc = "Write proxy for field `DACEN`" ] pub struct DACEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DAC is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _0 ) } # [ doc = "DAC is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - DAC Output Voltage Select" ] # [ inline ( always ) ] pub fn vosel ( & self ) -> VOSEL_R { VOSEL_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bit 6 - Supply Voltage Reference Source Select" ] # [ inline ( always ) ] pub fn vrsel ( & self ) -> VRSEL_R { VRSEL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & self ) -> DACEN_R { DACEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:5 - DAC Output Voltage Select" ] # [ inline ( always ) ] pub fn vosel ( & mut self ) -> VOSEL_W { VOSEL_W { w : self } } # [ doc = "Bit 6 - Supply Voltage Reference Source Select" ] # [ inline ( always ) ] pub fn vrsel ( & mut self ) -> VRSEL_W { VRSEL_W { w : self } } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & mut self ) -> DACEN_W { DACEN_W { w : self } } } } # [ doc = "MUX Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [muxcr](muxcr) module" ] pub type MUXCR = crate :: Reg < u8 , _MUXCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MUXCR ; # [ doc = "`read()` method returns [muxcr::R](muxcr::R) reader structure" ] impl crate :: Readable for MUXCR { } # [ doc = "`write(|w| ..)` method takes [muxcr::W](muxcr::W) writer structure" ] impl crate :: Writable for MUXCR { } # [ doc = "MUX Control Register" ] pub mod muxcr { # [ doc = "Reader of register MUXCR" ] pub type R = crate :: R < u8 , super :: MUXCR > ; # [ doc = "Writer for register MUXCR" ] pub type W = crate :: W < u8 , super :: MUXCR > ; # [ doc = "Register MUXCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MUXCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Minus Input Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSEL_A { # [ doc = "0: IN0" ] _000 , # [ doc = "1: IN1" ] _001 , # [ doc = "2: IN2" ] _010 , # [ doc = "3: IN3" ] _011 , # [ doc = "4: IN4" ] _100 , # [ doc = "5: IN5" ] _101 , # [ doc = "6: IN6" ] _110 , # [ doc = "7: IN7" ] _111 } impl From < MSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : MSEL_A ) -> Self { match variant { MSEL_A :: _000 => 0 , MSEL_A :: _001 => 1 , MSEL_A :: _010 => 2 , MSEL_A :: _011 => 3 , MSEL_A :: _100 => 4 , MSEL_A :: _101 => 5 , MSEL_A :: _110 => 6 , MSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `MSEL`" ] pub type MSEL_R = crate :: R < u8 , MSEL_A > ; impl MSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSEL_A { match self . bits { 0 => MSEL_A :: _000 , 1 => MSEL_A :: _001 , 2 => MSEL_A :: _010 , 3 => MSEL_A :: _011 , 4 => MSEL_A :: _100 , 5 => MSEL_A :: _101 , 6 => MSEL_A :: _110 , 7 => MSEL_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MSEL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MSEL_A :: _111 } } # [ doc = "Write proxy for field `MSEL`" ] pub struct MSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IN0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _000 ) } # [ doc = "IN1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _001 ) } # [ doc = "IN2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _010 ) } # [ doc = "IN3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _011 ) } # [ doc = "IN4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _100 ) } # [ doc = "IN5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _101 ) } # [ doc = "IN6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _110 ) } # [ doc = "IN7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Plus Input Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSEL_A { # [ doc = "0: IN0" ] _000 , # [ doc = "1: IN1" ] _001 , # [ doc = "2: IN2" ] _010 , # [ doc = "3: IN3" ] _011 , # [ doc = "4: IN4" ] _100 , # [ doc = "5: IN5" ] _101 , # [ doc = "6: IN6" ] _110 , # [ doc = "7: IN7" ] _111 } impl From < PSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PSEL_A ) -> Self { match variant { PSEL_A :: _000 => 0 , PSEL_A :: _001 => 1 , PSEL_A :: _010 => 2 , PSEL_A :: _011 => 3 , PSEL_A :: _100 => 4 , PSEL_A :: _101 => 5 , PSEL_A :: _110 => 6 , PSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `PSEL`" ] pub type PSEL_R = crate :: R < u8 , PSEL_A > ; impl PSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSEL_A { match self . bits { 0 => PSEL_A :: _000 , 1 => PSEL_A :: _001 , 2 => PSEL_A :: _010 , 3 => PSEL_A :: _011 , 4 => PSEL_A :: _100 , 5 => PSEL_A :: _101 , 6 => PSEL_A :: _110 , 7 => PSEL_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PSEL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PSEL_A :: _111 } } # [ doc = "Write proxy for field `PSEL`" ] pub struct PSEL_W < 'a > { w : & 'a mut W , } impl < 'a > PSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IN0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _000 ) } # [ doc = "IN1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _001 ) } # [ doc = "IN2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _010 ) } # [ doc = "IN3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _011 ) } # [ doc = "IN4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _100 ) } # [ doc = "IN5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _101 ) } # [ doc = "IN6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _110 ) } # [ doc = "IN7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 3 ) ) | ( ( ( value as u8 ) & 0x07 ) << 3 ) ; self . w } } # [ doc = "Pass Through Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSTM_A { # [ doc = "0: Pass Through Mode is disabled." ] _0 , # [ doc = "1: Pass Through Mode is enabled." ] _1 } impl From < PSTM_A > for bool { # [ inline ( always ) ] fn from ( variant : PSTM_A ) -> Self { match variant { PSTM_A :: _0 => false , PSTM_A :: _1 => true } } } # [ doc = "Reader of field `PSTM`" ] pub type PSTM_R = crate :: R < bool , PSTM_A > ; impl PSTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSTM_A { match self . bits { false => PSTM_A :: _0 , true => PSTM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PSTM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PSTM_A :: _1 } } # [ doc = "Write proxy for field `PSTM`" ] pub struct PSTM_W < 'a > { w : & 'a mut W , } impl < 'a > PSTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSTM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pass Through Mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PSTM_A :: _0 ) } # [ doc = "Pass Through Mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PSTM_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Minus Input Mux Control" ] # [ inline ( always ) ] pub fn msel ( & self ) -> MSEL_R { MSEL_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:5 - Plus Input Mux Control" ] # [ inline ( always ) ] pub fn psel ( & self ) -> PSEL_R { PSEL_R :: new ( ( ( self . bits >> 3 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Pass Through Mode Enable" ] # [ inline ( always ) ] pub fn pstm ( & self ) -> PSTM_R { PSTM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Minus Input Mux Control" ] # [ inline ( always ) ] pub fn msel ( & mut self ) -> MSEL_W { MSEL_W { w : self } } # [ doc = "Bits 3:5 - Plus Input Mux Control" ] # [ inline ( always ) ] pub fn psel ( & mut self ) -> PSEL_W { PSEL_W { w : self } } # [ doc = "Bit 7 - Pass Through Mode Enable" ] # [ inline ( always ) ] pub fn pstm ( & mut self ) -> PSTM_W { PSTM_W { w : self } } } } } # [ doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)" ] pub struct CMP1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for CMP1 { } impl CMP1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const cmp1 :: RegisterBlock { 0x4007_3008 as * const _ } } impl Deref for CMP1 { type Target = cmp1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CMP1 :: ptr ( ) } } } # [ doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)" ] pub mod cmp1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - CMP Control Register 0" ] pub cr0 : CR0 , # [ doc = "0x01 - CMP Control Register 1" ] pub cr1 : CR1 , # [ doc = "0x02 - CMP Filter Period Register" ] pub fpr : FPR , # [ doc = "0x03 - CMP Status and Control Register" ] pub scr : SCR , # [ doc = "0x04 - DAC Control Register" ] pub daccr : DACCR , # [ doc = "0x05 - MUX Control Register" ] pub muxcr : MUXCR , } # [ doc = "CMP Control Register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr0](cr0) module" ] pub type CR0 = crate :: Reg < u8 , _CR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR0 ; # [ doc = "`read()` method returns [cr0::R](cr0::R) reader structure" ] impl crate :: Readable for CR0 { } # [ doc = "`write(|w| ..)` method takes [cr0::W](cr0::W) writer structure" ] impl crate :: Writable for CR0 { } # [ doc = "CMP Control Register 0" ] pub mod cr0 { # [ doc = "Reader of register CR0" ] pub type R = crate :: R < u8 , super :: CR0 > ; # [ doc = "Writer for register CR0" ] pub type W = crate :: W < u8 , super :: CR0 > ; # [ doc = "Register CR0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Comparator hard block hysteresis control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HYSTCTR_A { # [ doc = "0: Level 0" ] _00 , # [ doc = "1: Level 1" ] _01 , # [ doc = "2: Level 2" ] _10 , # [ doc = "3: Level 3" ] _11 } impl From < HYSTCTR_A > for u8 { # [ inline ( always ) ] fn from ( variant : HYSTCTR_A ) -> Self { match variant { HYSTCTR_A :: _00 => 0 , HYSTCTR_A :: _01 => 1 , HYSTCTR_A :: _10 => 2 , HYSTCTR_A :: _11 => 3 } } } # [ doc = "Reader of field `HYSTCTR`" ] pub type HYSTCTR_R = crate :: R < u8 , HYSTCTR_A > ; impl HYSTCTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HYSTCTR_A { match self . bits { 0 => HYSTCTR_A :: _00 , 1 => HYSTCTR_A :: _01 , 2 => HYSTCTR_A :: _10 , 3 => HYSTCTR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == HYSTCTR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == HYSTCTR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == HYSTCTR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == HYSTCTR_A :: _11 } } # [ doc = "Write proxy for field `HYSTCTR`" ] pub struct HYSTCTR_W < 'a > { w : & 'a mut W , } impl < 'a > HYSTCTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HYSTCTR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Level 0" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _00 ) } # [ doc = "Level 1" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _01 ) } # [ doc = "Level 2" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _10 ) } # [ doc = "Level 3" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Filter Sample Count\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTER_CNT_A { # [ doc = "0: Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA." ] _000 , # [ doc = "1: One sample must agree. The comparator output is simply sampled." ] _001 , # [ doc = "2: 2 consecutive samples must agree." ] _010 , # [ doc = "3: 3 consecutive samples must agree." ] _011 , # [ doc = "4: 4 consecutive samples must agree." ] _100 , # [ doc = "5: 5 consecutive samples must agree." ] _101 , # [ doc = "6: 6 consecutive samples must agree." ] _110 , # [ doc = "7: 7 consecutive samples must agree." ] _111 } impl From < FILTER_CNT_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTER_CNT_A ) -> Self { match variant { FILTER_CNT_A :: _000 => 0 , FILTER_CNT_A :: _001 => 1 , FILTER_CNT_A :: _010 => 2 , FILTER_CNT_A :: _011 => 3 , FILTER_CNT_A :: _100 => 4 , FILTER_CNT_A :: _101 => 5 , FILTER_CNT_A :: _110 => 6 , FILTER_CNT_A :: _111 => 7 } } } # [ doc = "Reader of field `FILTER_CNT`" ] pub type FILTER_CNT_R = crate :: R < u8 , FILTER_CNT_A > ; impl FILTER_CNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTER_CNT_A { match self . bits { 0 => FILTER_CNT_A :: _000 , 1 => FILTER_CNT_A :: _001 , 2 => FILTER_CNT_A :: _010 , 3 => FILTER_CNT_A :: _011 , 4 => FILTER_CNT_A :: _100 , 5 => FILTER_CNT_A :: _101 , 6 => FILTER_CNT_A :: _110 , 7 => FILTER_CNT_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == FILTER_CNT_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == FILTER_CNT_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == FILTER_CNT_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == FILTER_CNT_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == FILTER_CNT_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == FILTER_CNT_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == FILTER_CNT_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == FILTER_CNT_A :: _111 } } # [ doc = "Write proxy for field `FILTER_CNT`" ] pub struct FILTER_CNT_W < 'a > { w : & 'a mut W , } impl < 'a > FILTER_CNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTER_CNT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _000 ) } # [ doc = "One sample must agree. The comparator output is simply sampled." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _001 ) } # [ doc = "2 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _010 ) } # [ doc = "3 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _011 ) } # [ doc = "4 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _100 ) } # [ doc = "5 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _101 ) } # [ doc = "6 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _110 ) } # [ doc = "7 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 4 ) ) | ( ( ( value as u8 ) & 0x07 ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Comparator hard block hysteresis control" ] # [ inline ( always ) ] pub fn hystctr ( & self ) -> HYSTCTR_R { HYSTCTR_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 4:6 - Filter Sample Count" ] # [ inline ( always ) ] pub fn filter_cnt ( & self ) -> FILTER_CNT_R { FILTER_CNT_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Comparator hard block hysteresis control" ] # [ inline ( always ) ] pub fn hystctr ( & mut self ) -> HYSTCTR_W { HYSTCTR_W { w : self } } # [ doc = "Bits 4:6 - Filter Sample Count" ] # [ inline ( always ) ] pub fn filter_cnt ( & mut self ) -> FILTER_CNT_W { FILTER_CNT_W { w : self } } } } # [ doc = "CMP Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr1](cr1) module" ] pub type CR1 = crate :: Reg < u8 , _CR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR1 ; # [ doc = "`read()` method returns [cr1::R](cr1::R) reader structure" ] impl crate :: Readable for CR1 { } # [ doc = "`write(|w| ..)` method takes [cr1::W](cr1::W) writer structure" ] impl crate :: Writable for CR1 { } # [ doc = "CMP Control Register 1" ] pub mod cr1 { # [ doc = "Reader of register CR1" ] pub type R = crate :: R < u8 , super :: CR1 > ; # [ doc = "Writer for register CR1" ] pub type W = crate :: W < u8 , super :: CR1 > ; # [ doc = "Register CR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Comparator Module Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_A { # [ doc = "0: Analog Comparator is disabled." ] _0 , # [ doc = "1: Analog Comparator is enabled." ] _1 } impl From < EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_A ) -> Self { match variant { EN_A :: _0 => false , EN_A :: _1 => true } } } # [ doc = "Reader of field `EN`" ] pub type EN_R = crate :: R < bool , EN_A > ; impl EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_A { match self . bits { false => EN_A :: _0 , true => EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_A :: _1 } } # [ doc = "Write proxy for field `EN`" ] pub struct EN_W < 'a > { w : & 'a mut W , } impl < 'a > EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Analog Comparator is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_A :: _0 ) } # [ doc = "Analog Comparator is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Comparator Output Pin Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OPE_A { # [ doc = "0: CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect." ] _0 , # [ doc = "1: CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect." ] _1 } impl From < OPE_A > for bool { # [ inline ( always ) ] fn from ( variant : OPE_A ) -> Self { match variant { OPE_A :: _0 => false , OPE_A :: _1 => true } } } # [ doc = "Reader of field `OPE`" ] pub type OPE_R = crate :: R < bool , OPE_A > ; impl OPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OPE_A { match self . bits { false => OPE_A :: _0 , true => OPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OPE_A :: _1 } } # [ doc = "Write proxy for field `OPE`" ] pub struct OPE_W < 'a > { w : & 'a mut W , } impl < 'a > OPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OPE_A :: _0 ) } # [ doc = "CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OPE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Comparator Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COS_A { # [ doc = "0: Set the filtered comparator output (CMPO) to equal COUT." ] _0 , # [ doc = "1: Set the unfiltered comparator output (CMPO) to equal COUTA." ] _1 } impl From < COS_A > for bool { # [ inline ( always ) ] fn from ( variant : COS_A ) -> Self { match variant { COS_A :: _0 => false , COS_A :: _1 => true } } } # [ doc = "Reader of field `COS`" ] pub type COS_R = crate :: R < bool , COS_A > ; impl COS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COS_A { match self . bits { false => COS_A :: _0 , true => COS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COS_A :: _1 } } # [ doc = "Write proxy for field `COS`" ] pub struct COS_W < 'a > { w : & 'a mut W , } impl < 'a > COS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Set the filtered comparator output (CMPO) to equal COUT." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COS_A :: _0 ) } # [ doc = "Set the unfiltered comparator output (CMPO) to equal COUTA." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Comparator INVERT\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV_A { # [ doc = "0: Does not invert the comparator output." ] _0 , # [ doc = "1: Inverts the comparator output." ] _1 } impl From < INV_A > for bool { # [ inline ( always ) ] fn from ( variant : INV_A ) -> Self { match variant { INV_A :: _0 => false , INV_A :: _1 => true } } } # [ doc = "Reader of field `INV`" ] pub type INV_R = crate :: R < bool , INV_A > ; impl INV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV_A { match self . bits { false => INV_A :: _0 , true => INV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV_A :: _1 } } # [ doc = "Write proxy for field `INV`" ] pub struct INV_W < 'a > { w : & 'a mut W , } impl < 'a > INV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Does not invert the comparator output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV_A :: _0 ) } # [ doc = "Inverts the comparator output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Power Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PMODE_A { # [ doc = "0: Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption." ] _0 , # [ doc = "1: High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption." ] _1 } impl From < PMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : PMODE_A ) -> Self { match variant { PMODE_A :: _0 => false , PMODE_A :: _1 => true } } } # [ doc = "Reader of field `PMODE`" ] pub type PMODE_R = crate :: R < bool , PMODE_A > ; impl PMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PMODE_A { match self . bits { false => PMODE_A :: _0 , true => PMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PMODE_A :: _1 } } # [ doc = "Write proxy for field `PMODE`" ] pub struct PMODE_W < 'a > { w : & 'a mut W , } impl < 'a > PMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PMODE_A :: _0 ) } # [ doc = "High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PMODE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Trigger Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGM_A { # [ doc = "0: Trigger mode is disabled." ] _0 , # [ doc = "1: Trigger mode is enabled." ] _1 } impl From < TRIGM_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIGM_A ) -> Self { match variant { TRIGM_A :: _0 => false , TRIGM_A :: _1 => true } } } # [ doc = "Reader of field `TRIGM`" ] pub type TRIGM_R = crate :: R < bool , TRIGM_A > ; impl TRIGM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIGM_A { match self . bits { false => TRIGM_A :: _0 , true => TRIGM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIGM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIGM_A :: _1 } } # [ doc = "Write proxy for field `TRIGM`" ] pub struct TRIGM_W < 'a > { w : & 'a mut W , } impl < 'a > TRIGM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIGM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIGM_A :: _0 ) } # [ doc = "Trigger mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIGM_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Windowing Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WE_A { # [ doc = "0: Windowing mode is not selected." ] _0 , # [ doc = "1: Windowing mode is selected." ] _1 } impl From < WE_A > for bool { # [ inline ( always ) ] fn from ( variant : WE_A ) -> Self { match variant { WE_A :: _0 => false , WE_A :: _1 => true } } } # [ doc = "Reader of field `WE`" ] pub type WE_R = crate :: R < bool , WE_A > ; impl WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WE_A { match self . bits { false => WE_A :: _0 , true => WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WE_A :: _1 } } # [ doc = "Write proxy for field `WE`" ] pub struct WE_W < 'a > { w : & 'a mut W , } impl < 'a > WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Windowing mode is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WE_A :: _0 ) } # [ doc = "Windowing mode is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Sample Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SE_A { # [ doc = "0: Sampling mode is not selected." ] _0 , # [ doc = "1: Sampling mode is selected." ] _1 } impl From < SE_A > for bool { # [ inline ( always ) ] fn from ( variant : SE_A ) -> Self { match variant { SE_A :: _0 => false , SE_A :: _1 => true } } } # [ doc = "Reader of field `SE`" ] pub type SE_R = crate :: R < bool , SE_A > ; impl SE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SE_A { match self . bits { false => SE_A :: _0 , true => SE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SE_A :: _1 } } # [ doc = "Write proxy for field `SE`" ] pub struct SE_W < 'a > { w : & 'a mut W , } impl < 'a > SE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sampling mode is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SE_A :: _0 ) } # [ doc = "Sampling mode is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Comparator Module Enable" ] # [ inline ( always ) ] pub fn en ( & self ) -> EN_R { EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Comparator Output Pin Enable" ] # [ inline ( always ) ] pub fn ope ( & self ) -> OPE_R { OPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Comparator Output Select" ] # [ inline ( always ) ] pub fn cos ( & self ) -> COS_R { COS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Comparator INVERT" ] # [ inline ( always ) ] pub fn inv ( & self ) -> INV_R { INV_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Power Mode Select" ] # [ inline ( always ) ] pub fn pmode ( & self ) -> PMODE_R { PMODE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Trigger Mode Enable" ] # [ inline ( always ) ] pub fn trigm ( & self ) -> TRIGM_R { TRIGM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Windowing Enable" ] # [ inline ( always ) ] pub fn we ( & self ) -> WE_R { WE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Sample Enable" ] # [ inline ( always ) ] pub fn se ( & self ) -> SE_R { SE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Comparator Module Enable" ] # [ inline ( always ) ] pub fn en ( & mut self ) -> EN_W { EN_W { w : self } } # [ doc = "Bit 1 - Comparator Output Pin Enable" ] # [ inline ( always ) ] pub fn ope ( & mut self ) -> OPE_W { OPE_W { w : self } } # [ doc = "Bit 2 - Comparator Output Select" ] # [ inline ( always ) ] pub fn cos ( & mut self ) -> COS_W { COS_W { w : self } } # [ doc = "Bit 3 - Comparator INVERT" ] # [ inline ( always ) ] pub fn inv ( & mut self ) -> INV_W { INV_W { w : self } } # [ doc = "Bit 4 - Power Mode Select" ] # [ inline ( always ) ] pub fn pmode ( & mut self ) -> PMODE_W { PMODE_W { w : self } } # [ doc = "Bit 5 - Trigger Mode Enable" ] # [ inline ( always ) ] pub fn trigm ( & mut self ) -> TRIGM_W { TRIGM_W { w : self } } # [ doc = "Bit 6 - Windowing Enable" ] # [ inline ( always ) ] pub fn we ( & mut self ) -> WE_W { WE_W { w : self } } # [ doc = "Bit 7 - Sample Enable" ] # [ inline ( always ) ] pub fn se ( & mut self ) -> SE_W { SE_W { w : self } } } } # [ doc = "CMP Filter Period Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fpr](fpr) module" ] pub type FPR = crate :: Reg < u8 , _FPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPR ; # [ doc = "`read()` method returns [fpr::R](fpr::R) reader structure" ] impl crate :: Readable for FPR { } # [ doc = "`write(|w| ..)` method takes [fpr::W](fpr::W) writer structure" ] impl crate :: Writable for FPR { } # [ doc = "CMP Filter Period Register" ] pub mod fpr { # [ doc = "Reader of register FPR" ] pub type R = crate :: R < u8 , super :: FPR > ; # [ doc = "Writer for register FPR" ] pub type W = crate :: W < u8 , super :: FPR > ; # [ doc = "Register FPR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FPR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FILT_PER`" ] pub type FILT_PER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FILT_PER`" ] pub struct FILT_PER_W < 'a > { w : & 'a mut W , } impl < 'a > FILT_PER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Filter Sample Period" ] # [ inline ( always ) ] pub fn filt_per ( & self ) -> FILT_PER_R { FILT_PER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Filter Sample Period" ] # [ inline ( always ) ] pub fn filt_per ( & mut self ) -> FILT_PER_W { FILT_PER_W { w : self } } } } # [ doc = "CMP Status and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scr](scr) module" ] pub type SCR = crate :: Reg < u8 , _SCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCR ; # [ doc = "`read()` method returns [scr::R](scr::R) reader structure" ] impl crate :: Readable for SCR { } # [ doc = "`write(|w| ..)` method takes [scr::W](scr::W) writer structure" ] impl crate :: Writable for SCR { } # [ doc = "CMP Status and Control Register" ] pub mod scr { # [ doc = "Reader of register SCR" ] pub type R = crate :: R < u8 , super :: SCR > ; # [ doc = "Writer for register SCR" ] pub type W = crate :: W < u8 , super :: SCR > ; # [ doc = "Register SCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUT`" ] pub type COUT_R = crate :: R < bool , bool > ; # [ doc = "Analog Comparator Flag Falling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFF_A { # [ doc = "0: Falling-edge on COUT has not been detected." ] _0 , # [ doc = "1: Falling-edge on COUT has occurred." ] _1 } impl From < CFF_A > for bool { # [ inline ( always ) ] fn from ( variant : CFF_A ) -> Self { match variant { CFF_A :: _0 => false , CFF_A :: _1 => true } } } # [ doc = "Reader of field `CFF`" ] pub type CFF_R = crate :: R < bool , CFF_A > ; impl CFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFF_A { match self . bits { false => CFF_A :: _0 , true => CFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFF_A :: _1 } } # [ doc = "Write proxy for field `CFF`" ] pub struct CFF_W < 'a > { w : & 'a mut W , } impl < 'a > CFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Falling-edge on COUT has not been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFF_A :: _0 ) } # [ doc = "Falling-edge on COUT has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Analog Comparator Flag Rising\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFR_A { # [ doc = "0: Rising-edge on COUT has not been detected." ] _0 , # [ doc = "1: Rising-edge on COUT has occurred." ] _1 } impl From < CFR_A > for bool { # [ inline ( always ) ] fn from ( variant : CFR_A ) -> Self { match variant { CFR_A :: _0 => false , CFR_A :: _1 => true } } } # [ doc = "Reader of field `CFR`" ] pub type CFR_R = crate :: R < bool , CFR_A > ; impl CFR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFR_A { match self . bits { false => CFR_A :: _0 , true => CFR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFR_A :: _1 } } # [ doc = "Write proxy for field `CFR`" ] pub struct CFR_W < 'a > { w : & 'a mut W , } impl < 'a > CFR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rising-edge on COUT has not been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFR_A :: _0 ) } # [ doc = "Rising-edge on COUT has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Comparator Interrupt Enable Falling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IEF_A { # [ doc = "0: Interrupt is disabled." ] _0 , # [ doc = "1: Interrupt is enabled." ] _1 } impl From < IEF_A > for bool { # [ inline ( always ) ] fn from ( variant : IEF_A ) -> Self { match variant { IEF_A :: _0 => false , IEF_A :: _1 => true } } } # [ doc = "Reader of field `IEF`" ] pub type IEF_R = crate :: R < bool , IEF_A > ; impl IEF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IEF_A { match self . bits { false => IEF_A :: _0 , true => IEF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IEF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IEF_A :: _1 } } # [ doc = "Write proxy for field `IEF`" ] pub struct IEF_W < 'a > { w : & 'a mut W , } impl < 'a > IEF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IEF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IEF_A :: _0 ) } # [ doc = "Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IEF_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Comparator Interrupt Enable Rising\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IER_A { # [ doc = "0: Interrupt is disabled." ] _0 , # [ doc = "1: Interrupt is enabled." ] _1 } impl From < IER_A > for bool { # [ inline ( always ) ] fn from ( variant : IER_A ) -> Self { match variant { IER_A :: _0 => false , IER_A :: _1 => true } } } # [ doc = "Reader of field `IER`" ] pub type IER_R = crate :: R < bool , IER_A > ; impl IER_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IER_A { match self . bits { false => IER_A :: _0 , true => IER_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IER_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IER_A :: _1 } } # [ doc = "Write proxy for field `IER`" ] pub struct IER_W < 'a > { w : & 'a mut W , } impl < 'a > IER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IER_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IER_A :: _0 ) } # [ doc = "Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IER_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "DMA Enable Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA is disabled." ] _0 , # [ doc = "1: DMA is enabled." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - Analog Comparator Output" ] # [ inline ( always ) ] pub fn cout ( & self ) -> COUT_R { COUT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Analog Comparator Flag Falling" ] # [ inline ( always ) ] pub fn cff ( & self ) -> CFF_R { CFF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Analog Comparator Flag Rising" ] # [ inline ( always ) ] pub fn cfr ( & self ) -> CFR_R { CFR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Comparator Interrupt Enable Falling" ] # [ inline ( always ) ] pub fn ief ( & self ) -> IEF_R { IEF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Comparator Interrupt Enable Rising" ] # [ inline ( always ) ] pub fn ier ( & self ) -> IER_R { IER_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - DMA Enable Control" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Analog Comparator Flag Falling" ] # [ inline ( always ) ] pub fn cff ( & mut self ) -> CFF_W { CFF_W { w : self } } # [ doc = "Bit 2 - Analog Comparator Flag Rising" ] # [ inline ( always ) ] pub fn cfr ( & mut self ) -> CFR_W { CFR_W { w : self } } # [ doc = "Bit 3 - Comparator Interrupt Enable Falling" ] # [ inline ( always ) ] pub fn ief ( & mut self ) -> IEF_W { IEF_W { w : self } } # [ doc = "Bit 4 - Comparator Interrupt Enable Rising" ] # [ inline ( always ) ] pub fn ier ( & mut self ) -> IER_W { IER_W { w : self } } # [ doc = "Bit 6 - DMA Enable Control" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } } } # [ doc = "DAC Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [daccr](daccr) module" ] pub type DACCR = crate :: Reg < u8 , _DACCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DACCR ; # [ doc = "`read()` method returns [daccr::R](daccr::R) reader structure" ] impl crate :: Readable for DACCR { } # [ doc = "`write(|w| ..)` method takes [daccr::W](daccr::W) writer structure" ] impl crate :: Writable for DACCR { } # [ doc = "DAC Control Register" ] pub mod daccr { # [ doc = "Reader of register DACCR" ] pub type R = crate :: R < u8 , super :: DACCR > ; # [ doc = "Writer for register DACCR" ] pub type W = crate :: W < u8 , super :: DACCR > ; # [ doc = "Register DACCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DACCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VOSEL`" ] pub type VOSEL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `VOSEL`" ] pub struct VOSEL_W < 'a > { w : & 'a mut W , } impl < 'a > VOSEL_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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Supply Voltage Reference Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VRSEL_A { # [ doc = "0: Vin1 is selected as resistor ladder network supply reference." ] _0 , # [ doc = "1: Vin2 is selected as resistor ladder network supply reference." ] _1 } impl From < VRSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : VRSEL_A ) -> Self { match variant { VRSEL_A :: _0 => false , VRSEL_A :: _1 => true } } } # [ doc = "Reader of field `VRSEL`" ] pub type VRSEL_R = crate :: R < bool , VRSEL_A > ; impl VRSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VRSEL_A { match self . bits { false => VRSEL_A :: _0 , true => VRSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VRSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VRSEL_A :: _1 } } # [ doc = "Write proxy for field `VRSEL`" ] pub struct VRSEL_W < 'a > { w : & 'a mut W , } impl < 'a > VRSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VRSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Vin1 is selected as resistor ladder network supply reference." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VRSEL_A :: _0 ) } # [ doc = "Vin2 is selected as resistor ladder network supply reference." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VRSEL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "DAC Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACEN_A { # [ doc = "0: DAC is disabled." ] _0 , # [ doc = "1: DAC is enabled." ] _1 } impl From < DACEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACEN_A ) -> Self { match variant { DACEN_A :: _0 => false , DACEN_A :: _1 => true } } } # [ doc = "Reader of field `DACEN`" ] pub type DACEN_R = crate :: R < bool , DACEN_A > ; impl DACEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACEN_A { match self . bits { false => DACEN_A :: _0 , true => DACEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACEN_A :: _1 } } # [ doc = "Write proxy for field `DACEN`" ] pub struct DACEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DAC is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _0 ) } # [ doc = "DAC is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - DAC Output Voltage Select" ] # [ inline ( always ) ] pub fn vosel ( & self ) -> VOSEL_R { VOSEL_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bit 6 - Supply Voltage Reference Source Select" ] # [ inline ( always ) ] pub fn vrsel ( & self ) -> VRSEL_R { VRSEL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & self ) -> DACEN_R { DACEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:5 - DAC Output Voltage Select" ] # [ inline ( always ) ] pub fn vosel ( & mut self ) -> VOSEL_W { VOSEL_W { w : self } } # [ doc = "Bit 6 - Supply Voltage Reference Source Select" ] # [ inline ( always ) ] pub fn vrsel ( & mut self ) -> VRSEL_W { VRSEL_W { w : self } } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & mut self ) -> DACEN_W { DACEN_W { w : self } } } } # [ doc = "MUX Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [muxcr](muxcr) module" ] pub type MUXCR = crate :: Reg < u8 , _MUXCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MUXCR ; # [ doc = "`read()` method returns [muxcr::R](muxcr::R) reader structure" ] impl crate :: Readable for MUXCR { } # [ doc = "`write(|w| ..)` method takes [muxcr::W](muxcr::W) writer structure" ] impl crate :: Writable for MUXCR { } # [ doc = "MUX Control Register" ] pub mod muxcr { # [ doc = "Reader of register MUXCR" ] pub type R = crate :: R < u8 , super :: MUXCR > ; # [ doc = "Writer for register MUXCR" ] pub type W = crate :: W < u8 , super :: MUXCR > ; # [ doc = "Register MUXCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MUXCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Minus Input Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSEL_A { # [ doc = "0: IN0" ] _000 , # [ doc = "1: IN1" ] _001 , # [ doc = "2: IN2" ] _010 , # [ doc = "3: IN3" ] _011 , # [ doc = "4: IN4" ] _100 , # [ doc = "5: IN5" ] _101 , # [ doc = "6: IN6" ] _110 , # [ doc = "7: IN7" ] _111 } impl From < MSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : MSEL_A ) -> Self { match variant { MSEL_A :: _000 => 0 , MSEL_A :: _001 => 1 , MSEL_A :: _010 => 2 , MSEL_A :: _011 => 3 , MSEL_A :: _100 => 4 , MSEL_A :: _101 => 5 , MSEL_A :: _110 => 6 , MSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `MSEL`" ] pub type MSEL_R = crate :: R < u8 , MSEL_A > ; impl MSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSEL_A { match self . bits { 0 => MSEL_A :: _000 , 1 => MSEL_A :: _001 , 2 => MSEL_A :: _010 , 3 => MSEL_A :: _011 , 4 => MSEL_A :: _100 , 5 => MSEL_A :: _101 , 6 => MSEL_A :: _110 , 7 => MSEL_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MSEL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MSEL_A :: _111 } } # [ doc = "Write proxy for field `MSEL`" ] pub struct MSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IN0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _000 ) } # [ doc = "IN1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _001 ) } # [ doc = "IN2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _010 ) } # [ doc = "IN3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _011 ) } # [ doc = "IN4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _100 ) } # [ doc = "IN5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _101 ) } # [ doc = "IN6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _110 ) } # [ doc = "IN7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Plus Input Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSEL_A { # [ doc = "0: IN0" ] _000 , # [ doc = "1: IN1" ] _001 , # [ doc = "2: IN2" ] _010 , # [ doc = "3: IN3" ] _011 , # [ doc = "4: IN4" ] _100 , # [ doc = "5: IN5" ] _101 , # [ doc = "6: IN6" ] _110 , # [ doc = "7: IN7" ] _111 } impl From < PSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PSEL_A ) -> Self { match variant { PSEL_A :: _000 => 0 , PSEL_A :: _001 => 1 , PSEL_A :: _010 => 2 , PSEL_A :: _011 => 3 , PSEL_A :: _100 => 4 , PSEL_A :: _101 => 5 , PSEL_A :: _110 => 6 , PSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `PSEL`" ] pub type PSEL_R = crate :: R < u8 , PSEL_A > ; impl PSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSEL_A { match self . bits { 0 => PSEL_A :: _000 , 1 => PSEL_A :: _001 , 2 => PSEL_A :: _010 , 3 => PSEL_A :: _011 , 4 => PSEL_A :: _100 , 5 => PSEL_A :: _101 , 6 => PSEL_A :: _110 , 7 => PSEL_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PSEL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PSEL_A :: _111 } } # [ doc = "Write proxy for field `PSEL`" ] pub struct PSEL_W < 'a > { w : & 'a mut W , } impl < 'a > PSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IN0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _000 ) } # [ doc = "IN1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _001 ) } # [ doc = "IN2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _010 ) } # [ doc = "IN3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _011 ) } # [ doc = "IN4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _100 ) } # [ doc = "IN5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _101 ) } # [ doc = "IN6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _110 ) } # [ doc = "IN7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 3 ) ) | ( ( ( value as u8 ) & 0x07 ) << 3 ) ; self . w } } # [ doc = "Pass Through Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSTM_A { # [ doc = "0: Pass Through Mode is disabled." ] _0 , # [ doc = "1: Pass Through Mode is enabled." ] _1 } impl From < PSTM_A > for bool { # [ inline ( always ) ] fn from ( variant : PSTM_A ) -> Self { match variant { PSTM_A :: _0 => false , PSTM_A :: _1 => true } } } # [ doc = "Reader of field `PSTM`" ] pub type PSTM_R = crate :: R < bool , PSTM_A > ; impl PSTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSTM_A { match self . bits { false => PSTM_A :: _0 , true => PSTM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PSTM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PSTM_A :: _1 } } # [ doc = "Write proxy for field `PSTM`" ] pub struct PSTM_W < 'a > { w : & 'a mut W , } impl < 'a > PSTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSTM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pass Through Mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PSTM_A :: _0 ) } # [ doc = "Pass Through Mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PSTM_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Minus Input Mux Control" ] # [ inline ( always ) ] pub fn msel ( & self ) -> MSEL_R { MSEL_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:5 - Plus Input Mux Control" ] # [ inline ( always ) ] pub fn psel ( & self ) -> PSEL_R { PSEL_R :: new ( ( ( self . bits >> 3 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Pass Through Mode Enable" ] # [ inline ( always ) ] pub fn pstm ( & self ) -> PSTM_R { PSTM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Minus Input Mux Control" ] # [ inline ( always ) ] pub fn msel ( & mut self ) -> MSEL_W { MSEL_W { w : self } } # [ doc = "Bits 3:5 - Plus Input Mux Control" ] # [ inline ( always ) ] pub fn psel ( & mut self ) -> PSEL_W { PSEL_W { w : self } } # [ doc = "Bit 7 - Pass Through Mode Enable" ] # [ inline ( always ) ] pub fn pstm ( & mut self ) -> PSTM_W { PSTM_W { w : self } } } } } # [ doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)" ] pub struct CMP2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for CMP2 { } impl CMP2 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const cmp2 :: RegisterBlock { 0x4007_3010 as * const _ } } impl Deref for CMP2 { type Target = cmp2 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CMP2 :: ptr ( ) } } } # [ doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)" ] pub mod cmp2 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - CMP Control Register 0" ] pub cr0 : CR0 , # [ doc = "0x01 - CMP Control Register 1" ] pub cr1 : CR1 , # [ doc = "0x02 - CMP Filter Period Register" ] pub fpr : FPR , # [ doc = "0x03 - CMP Status and Control Register" ] pub scr : SCR , # [ doc = "0x04 - DAC Control Register" ] pub daccr : DACCR , # [ doc = "0x05 - MUX Control Register" ] pub muxcr : MUXCR , } # [ doc = "CMP Control Register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr0](cr0) module" ] pub type CR0 = crate :: Reg < u8 , _CR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR0 ; # [ doc = "`read()` method returns [cr0::R](cr0::R) reader structure" ] impl crate :: Readable for CR0 { } # [ doc = "`write(|w| ..)` method takes [cr0::W](cr0::W) writer structure" ] impl crate :: Writable for CR0 { } # [ doc = "CMP Control Register 0" ] pub mod cr0 { # [ doc = "Reader of register CR0" ] pub type R = crate :: R < u8 , super :: CR0 > ; # [ doc = "Writer for register CR0" ] pub type W = crate :: W < u8 , super :: CR0 > ; # [ doc = "Register CR0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Comparator hard block hysteresis control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HYSTCTR_A { # [ doc = "0: Level 0" ] _00 , # [ doc = "1: Level 1" ] _01 , # [ doc = "2: Level 2" ] _10 , # [ doc = "3: Level 3" ] _11 } impl From < HYSTCTR_A > for u8 { # [ inline ( always ) ] fn from ( variant : HYSTCTR_A ) -> Self { match variant { HYSTCTR_A :: _00 => 0 , HYSTCTR_A :: _01 => 1 , HYSTCTR_A :: _10 => 2 , HYSTCTR_A :: _11 => 3 } } } # [ doc = "Reader of field `HYSTCTR`" ] pub type HYSTCTR_R = crate :: R < u8 , HYSTCTR_A > ; impl HYSTCTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HYSTCTR_A { match self . bits { 0 => HYSTCTR_A :: _00 , 1 => HYSTCTR_A :: _01 , 2 => HYSTCTR_A :: _10 , 3 => HYSTCTR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == HYSTCTR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == HYSTCTR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == HYSTCTR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == HYSTCTR_A :: _11 } } # [ doc = "Write proxy for field `HYSTCTR`" ] pub struct HYSTCTR_W < 'a > { w : & 'a mut W , } impl < 'a > HYSTCTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HYSTCTR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Level 0" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _00 ) } # [ doc = "Level 1" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _01 ) } # [ doc = "Level 2" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _10 ) } # [ doc = "Level 3" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Filter Sample Count\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTER_CNT_A { # [ doc = "0: Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA." ] _000 , # [ doc = "1: One sample must agree. The comparator output is simply sampled." ] _001 , # [ doc = "2: 2 consecutive samples must agree." ] _010 , # [ doc = "3: 3 consecutive samples must agree." ] _011 , # [ doc = "4: 4 consecutive samples must agree." ] _100 , # [ doc = "5: 5 consecutive samples must agree." ] _101 , # [ doc = "6: 6 consecutive samples must agree." ] _110 , # [ doc = "7: 7 consecutive samples must agree." ] _111 } impl From < FILTER_CNT_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTER_CNT_A ) -> Self { match variant { FILTER_CNT_A :: _000 => 0 , FILTER_CNT_A :: _001 => 1 , FILTER_CNT_A :: _010 => 2 , FILTER_CNT_A :: _011 => 3 , FILTER_CNT_A :: _100 => 4 , FILTER_CNT_A :: _101 => 5 , FILTER_CNT_A :: _110 => 6 , FILTER_CNT_A :: _111 => 7 } } } # [ doc = "Reader of field `FILTER_CNT`" ] pub type FILTER_CNT_R = crate :: R < u8 , FILTER_CNT_A > ; impl FILTER_CNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTER_CNT_A { match self . bits { 0 => FILTER_CNT_A :: _000 , 1 => FILTER_CNT_A :: _001 , 2 => FILTER_CNT_A :: _010 , 3 => FILTER_CNT_A :: _011 , 4 => FILTER_CNT_A :: _100 , 5 => FILTER_CNT_A :: _101 , 6 => FILTER_CNT_A :: _110 , 7 => FILTER_CNT_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == FILTER_CNT_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == FILTER_CNT_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == FILTER_CNT_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == FILTER_CNT_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == FILTER_CNT_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == FILTER_CNT_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == FILTER_CNT_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == FILTER_CNT_A :: _111 } } # [ doc = "Write proxy for field `FILTER_CNT`" ] pub struct FILTER_CNT_W < 'a > { w : & 'a mut W , } impl < 'a > FILTER_CNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTER_CNT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _000 ) } # [ doc = "One sample must agree. The comparator output is simply sampled." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _001 ) } # [ doc = "2 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _010 ) } # [ doc = "3 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _011 ) } # [ doc = "4 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _100 ) } # [ doc = "5 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _101 ) } # [ doc = "6 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _110 ) } # [ doc = "7 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 4 ) ) | ( ( ( value as u8 ) & 0x07 ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Comparator hard block hysteresis control" ] # [ inline ( always ) ] pub fn hystctr ( & self ) -> HYSTCTR_R { HYSTCTR_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 4:6 - Filter Sample Count" ] # [ inline ( always ) ] pub fn filter_cnt ( & self ) -> FILTER_CNT_R { FILTER_CNT_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Comparator hard block hysteresis control" ] # [ inline ( always ) ] pub fn hystctr ( & mut self ) -> HYSTCTR_W { HYSTCTR_W { w : self } } # [ doc = "Bits 4:6 - Filter Sample Count" ] # [ inline ( always ) ] pub fn filter_cnt ( & mut self ) -> FILTER_CNT_W { FILTER_CNT_W { w : self } } } } # [ doc = "CMP Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr1](cr1) module" ] pub type CR1 = crate :: Reg < u8 , _CR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR1 ; # [ doc = "`read()` method returns [cr1::R](cr1::R) reader structure" ] impl crate :: Readable for CR1 { } # [ doc = "`write(|w| ..)` method takes [cr1::W](cr1::W) writer structure" ] impl crate :: Writable for CR1 { } # [ doc = "CMP Control Register 1" ] pub mod cr1 { # [ doc = "Reader of register CR1" ] pub type R = crate :: R < u8 , super :: CR1 > ; # [ doc = "Writer for register CR1" ] pub type W = crate :: W < u8 , super :: CR1 > ; # [ doc = "Register CR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Comparator Module Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_A { # [ doc = "0: Analog Comparator is disabled." ] _0 , # [ doc = "1: Analog Comparator is enabled." ] _1 } impl From < EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_A ) -> Self { match variant { EN_A :: _0 => false , EN_A :: _1 => true } } } # [ doc = "Reader of field `EN`" ] pub type EN_R = crate :: R < bool , EN_A > ; impl EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_A { match self . bits { false => EN_A :: _0 , true => EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_A :: _1 } } # [ doc = "Write proxy for field `EN`" ] pub struct EN_W < 'a > { w : & 'a mut W , } impl < 'a > EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Analog Comparator is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_A :: _0 ) } # [ doc = "Analog Comparator is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Comparator Output Pin Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OPE_A { # [ doc = "0: CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect." ] _0 , # [ doc = "1: CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect." ] _1 } impl From < OPE_A > for bool { # [ inline ( always ) ] fn from ( variant : OPE_A ) -> Self { match variant { OPE_A :: _0 => false , OPE_A :: _1 => true } } } # [ doc = "Reader of field `OPE`" ] pub type OPE_R = crate :: R < bool , OPE_A > ; impl OPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OPE_A { match self . bits { false => OPE_A :: _0 , true => OPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OPE_A :: _1 } } # [ doc = "Write proxy for field `OPE`" ] pub struct OPE_W < 'a > { w : & 'a mut W , } impl < 'a > OPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OPE_A :: _0 ) } # [ doc = "CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OPE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Comparator Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COS_A { # [ doc = "0: Set the filtered comparator output (CMPO) to equal COUT." ] _0 , # [ doc = "1: Set the unfiltered comparator output (CMPO) to equal COUTA." ] _1 } impl From < COS_A > for bool { # [ inline ( always ) ] fn from ( variant : COS_A ) -> Self { match variant { COS_A :: _0 => false , COS_A :: _1 => true } } } # [ doc = "Reader of field `COS`" ] pub type COS_R = crate :: R < bool , COS_A > ; impl COS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COS_A { match self . bits { false => COS_A :: _0 , true => COS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COS_A :: _1 } } # [ doc = "Write proxy for field `COS`" ] pub struct COS_W < 'a > { w : & 'a mut W , } impl < 'a > COS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Set the filtered comparator output (CMPO) to equal COUT." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COS_A :: _0 ) } # [ doc = "Set the unfiltered comparator output (CMPO) to equal COUTA." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Comparator INVERT\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV_A { # [ doc = "0: Does not invert the comparator output." ] _0 , # [ doc = "1: Inverts the comparator output." ] _1 } impl From < INV_A > for bool { # [ inline ( always ) ] fn from ( variant : INV_A ) -> Self { match variant { INV_A :: _0 => false , INV_A :: _1 => true } } } # [ doc = "Reader of field `INV`" ] pub type INV_R = crate :: R < bool , INV_A > ; impl INV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV_A { match self . bits { false => INV_A :: _0 , true => INV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV_A :: _1 } } # [ doc = "Write proxy for field `INV`" ] pub struct INV_W < 'a > { w : & 'a mut W , } impl < 'a > INV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Does not invert the comparator output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV_A :: _0 ) } # [ doc = "Inverts the comparator output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Power Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PMODE_A { # [ doc = "0: Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption." ] _0 , # [ doc = "1: High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption." ] _1 } impl From < PMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : PMODE_A ) -> Self { match variant { PMODE_A :: _0 => false , PMODE_A :: _1 => true } } } # [ doc = "Reader of field `PMODE`" ] pub type PMODE_R = crate :: R < bool , PMODE_A > ; impl PMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PMODE_A { match self . bits { false => PMODE_A :: _0 , true => PMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PMODE_A :: _1 } } # [ doc = "Write proxy for field `PMODE`" ] pub struct PMODE_W < 'a > { w : & 'a mut W , } impl < 'a > PMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PMODE_A :: _0 ) } # [ doc = "High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PMODE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Trigger Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGM_A { # [ doc = "0: Trigger mode is disabled." ] _0 , # [ doc = "1: Trigger mode is enabled." ] _1 } impl From < TRIGM_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIGM_A ) -> Self { match variant { TRIGM_A :: _0 => false , TRIGM_A :: _1 => true } } } # [ doc = "Reader of field `TRIGM`" ] pub type TRIGM_R = crate :: R < bool , TRIGM_A > ; impl TRIGM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIGM_A { match self . bits { false => TRIGM_A :: _0 , true => TRIGM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIGM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIGM_A :: _1 } } # [ doc = "Write proxy for field `TRIGM`" ] pub struct TRIGM_W < 'a > { w : & 'a mut W , } impl < 'a > TRIGM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIGM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIGM_A :: _0 ) } # [ doc = "Trigger mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIGM_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Windowing Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WE_A { # [ doc = "0: Windowing mode is not selected." ] _0 , # [ doc = "1: Windowing mode is selected." ] _1 } impl From < WE_A > for bool { # [ inline ( always ) ] fn from ( variant : WE_A ) -> Self { match variant { WE_A :: _0 => false , WE_A :: _1 => true } } } # [ doc = "Reader of field `WE`" ] pub type WE_R = crate :: R < bool , WE_A > ; impl WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WE_A { match self . bits { false => WE_A :: _0 , true => WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WE_A :: _1 } } # [ doc = "Write proxy for field `WE`" ] pub struct WE_W < 'a > { w : & 'a mut W , } impl < 'a > WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Windowing mode is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WE_A :: _0 ) } # [ doc = "Windowing mode is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Sample Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SE_A { # [ doc = "0: Sampling mode is not selected." ] _0 , # [ doc = "1: Sampling mode is selected." ] _1 } impl From < SE_A > for bool { # [ inline ( always ) ] fn from ( variant : SE_A ) -> Self { match variant { SE_A :: _0 => false , SE_A :: _1 => true } } } # [ doc = "Reader of field `SE`" ] pub type SE_R = crate :: R < bool , SE_A > ; impl SE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SE_A { match self . bits { false => SE_A :: _0 , true => SE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SE_A :: _1 } } # [ doc = "Write proxy for field `SE`" ] pub struct SE_W < 'a > { w : & 'a mut W , } impl < 'a > SE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sampling mode is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SE_A :: _0 ) } # [ doc = "Sampling mode is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Comparator Module Enable" ] # [ inline ( always ) ] pub fn en ( & self ) -> EN_R { EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Comparator Output Pin Enable" ] # [ inline ( always ) ] pub fn ope ( & self ) -> OPE_R { OPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Comparator Output Select" ] # [ inline ( always ) ] pub fn cos ( & self ) -> COS_R { COS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Comparator INVERT" ] # [ inline ( always ) ] pub fn inv ( & self ) -> INV_R { INV_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Power Mode Select" ] # [ inline ( always ) ] pub fn pmode ( & self ) -> PMODE_R { PMODE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Trigger Mode Enable" ] # [ inline ( always ) ] pub fn trigm ( & self ) -> TRIGM_R { TRIGM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Windowing Enable" ] # [ inline ( always ) ] pub fn we ( & self ) -> WE_R { WE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Sample Enable" ] # [ inline ( always ) ] pub fn se ( & self ) -> SE_R { SE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Comparator Module Enable" ] # [ inline ( always ) ] pub fn en ( & mut self ) -> EN_W { EN_W { w : self } } # [ doc = "Bit 1 - Comparator Output Pin Enable" ] # [ inline ( always ) ] pub fn ope ( & mut self ) -> OPE_W { OPE_W { w : self } } # [ doc = "Bit 2 - Comparator Output Select" ] # [ inline ( always ) ] pub fn cos ( & mut self ) -> COS_W { COS_W { w : self } } # [ doc = "Bit 3 - Comparator INVERT" ] # [ inline ( always ) ] pub fn inv ( & mut self ) -> INV_W { INV_W { w : self } } # [ doc = "Bit 4 - Power Mode Select" ] # [ inline ( always ) ] pub fn pmode ( & mut self ) -> PMODE_W { PMODE_W { w : self } } # [ doc = "Bit 5 - Trigger Mode Enable" ] # [ inline ( always ) ] pub fn trigm ( & mut self ) -> TRIGM_W { TRIGM_W { w : self } } # [ doc = "Bit 6 - Windowing Enable" ] # [ inline ( always ) ] pub fn we ( & mut self ) -> WE_W { WE_W { w : self } } # [ doc = "Bit 7 - Sample Enable" ] # [ inline ( always ) ] pub fn se ( & mut self ) -> SE_W { SE_W { w : self } } } } # [ doc = "CMP Filter Period Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fpr](fpr) module" ] pub type FPR = crate :: Reg < u8 , _FPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPR ; # [ doc = "`read()` method returns [fpr::R](fpr::R) reader structure" ] impl crate :: Readable for FPR { } # [ doc = "`write(|w| ..)` method takes [fpr::W](fpr::W) writer structure" ] impl crate :: Writable for FPR { } # [ doc = "CMP Filter Period Register" ] pub mod fpr { # [ doc = "Reader of register FPR" ] pub type R = crate :: R < u8 , super :: FPR > ; # [ doc = "Writer for register FPR" ] pub type W = crate :: W < u8 , super :: FPR > ; # [ doc = "Register FPR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FPR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FILT_PER`" ] pub type FILT_PER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FILT_PER`" ] pub struct FILT_PER_W < 'a > { w : & 'a mut W , } impl < 'a > FILT_PER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Filter Sample Period" ] # [ inline ( always ) ] pub fn filt_per ( & self ) -> FILT_PER_R { FILT_PER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Filter Sample Period" ] # [ inline ( always ) ] pub fn filt_per ( & mut self ) -> FILT_PER_W { FILT_PER_W { w : self } } } } # [ doc = "CMP Status and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scr](scr) module" ] pub type SCR = crate :: Reg < u8 , _SCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCR ; # [ doc = "`read()` method returns [scr::R](scr::R) reader structure" ] impl crate :: Readable for SCR { } # [ doc = "`write(|w| ..)` method takes [scr::W](scr::W) writer structure" ] impl crate :: Writable for SCR { } # [ doc = "CMP Status and Control Register" ] pub mod scr { # [ doc = "Reader of register SCR" ] pub type R = crate :: R < u8 , super :: SCR > ; # [ doc = "Writer for register SCR" ] pub type W = crate :: W < u8 , super :: SCR > ; # [ doc = "Register SCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUT`" ] pub type COUT_R = crate :: R < bool , bool > ; # [ doc = "Analog Comparator Flag Falling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFF_A { # [ doc = "0: Falling-edge on COUT has not been detected." ] _0 , # [ doc = "1: Falling-edge on COUT has occurred." ] _1 } impl From < CFF_A > for bool { # [ inline ( always ) ] fn from ( variant : CFF_A ) -> Self { match variant { CFF_A :: _0 => false , CFF_A :: _1 => true } } } # [ doc = "Reader of field `CFF`" ] pub type CFF_R = crate :: R < bool , CFF_A > ; impl CFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFF_A { match self . bits { false => CFF_A :: _0 , true => CFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFF_A :: _1 } } # [ doc = "Write proxy for field `CFF`" ] pub struct CFF_W < 'a > { w : & 'a mut W , } impl < 'a > CFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Falling-edge on COUT has not been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFF_A :: _0 ) } # [ doc = "Falling-edge on COUT has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Analog Comparator Flag Rising\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFR_A { # [ doc = "0: Rising-edge on COUT has not been detected." ] _0 , # [ doc = "1: Rising-edge on COUT has occurred." ] _1 } impl From < CFR_A > for bool { # [ inline ( always ) ] fn from ( variant : CFR_A ) -> Self { match variant { CFR_A :: _0 => false , CFR_A :: _1 => true } } } # [ doc = "Reader of field `CFR`" ] pub type CFR_R = crate :: R < bool , CFR_A > ; impl CFR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFR_A { match self . bits { false => CFR_A :: _0 , true => CFR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFR_A :: _1 } } # [ doc = "Write proxy for field `CFR`" ] pub struct CFR_W < 'a > { w : & 'a mut W , } impl < 'a > CFR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rising-edge on COUT has not been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFR_A :: _0 ) } # [ doc = "Rising-edge on COUT has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Comparator Interrupt Enable Falling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IEF_A { # [ doc = "0: Interrupt is disabled." ] _0 , # [ doc = "1: Interrupt is enabled." ] _1 } impl From < IEF_A > for bool { # [ inline ( always ) ] fn from ( variant : IEF_A ) -> Self { match variant { IEF_A :: _0 => false , IEF_A :: _1 => true } } } # [ doc = "Reader of field `IEF`" ] pub type IEF_R = crate :: R < bool , IEF_A > ; impl IEF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IEF_A { match self . bits { false => IEF_A :: _0 , true => IEF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IEF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IEF_A :: _1 } } # [ doc = "Write proxy for field `IEF`" ] pub struct IEF_W < 'a > { w : & 'a mut W , } impl < 'a > IEF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IEF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IEF_A :: _0 ) } # [ doc = "Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IEF_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Comparator Interrupt Enable Rising\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IER_A { # [ doc = "0: Interrupt is disabled." ] _0 , # [ doc = "1: Interrupt is enabled." ] _1 } impl From < IER_A > for bool { # [ inline ( always ) ] fn from ( variant : IER_A ) -> Self { match variant { IER_A :: _0 => false , IER_A :: _1 => true } } } # [ doc = "Reader of field `IER`" ] pub type IER_R = crate :: R < bool , IER_A > ; impl IER_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IER_A { match self . bits { false => IER_A :: _0 , true => IER_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IER_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IER_A :: _1 } } # [ doc = "Write proxy for field `IER`" ] pub struct IER_W < 'a > { w : & 'a mut W , } impl < 'a > IER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IER_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IER_A :: _0 ) } # [ doc = "Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IER_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "DMA Enable Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA is disabled." ] _0 , # [ doc = "1: DMA is enabled." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - Analog Comparator Output" ] # [ inline ( always ) ] pub fn cout ( & self ) -> COUT_R { COUT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Analog Comparator Flag Falling" ] # [ inline ( always ) ] pub fn cff ( & self ) -> CFF_R { CFF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Analog Comparator Flag Rising" ] # [ inline ( always ) ] pub fn cfr ( & self ) -> CFR_R { CFR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Comparator Interrupt Enable Falling" ] # [ inline ( always ) ] pub fn ief ( & self ) -> IEF_R { IEF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Comparator Interrupt Enable Rising" ] # [ inline ( always ) ] pub fn ier ( & self ) -> IER_R { IER_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - DMA Enable Control" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Analog Comparator Flag Falling" ] # [ inline ( always ) ] pub fn cff ( & mut self ) -> CFF_W { CFF_W { w : self } } # [ doc = "Bit 2 - Analog Comparator Flag Rising" ] # [ inline ( always ) ] pub fn cfr ( & mut self ) -> CFR_W { CFR_W { w : self } } # [ doc = "Bit 3 - Comparator Interrupt Enable Falling" ] # [ inline ( always ) ] pub fn ief ( & mut self ) -> IEF_W { IEF_W { w : self } } # [ doc = "Bit 4 - Comparator Interrupt Enable Rising" ] # [ inline ( always ) ] pub fn ier ( & mut self ) -> IER_W { IER_W { w : self } } # [ doc = "Bit 6 - DMA Enable Control" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } } } # [ doc = "DAC Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [daccr](daccr) module" ] pub type DACCR = crate :: Reg < u8 , _DACCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DACCR ; # [ doc = "`read()` method returns [daccr::R](daccr::R) reader structure" ] impl crate :: Readable for DACCR { } # [ doc = "`write(|w| ..)` method takes [daccr::W](daccr::W) writer structure" ] impl crate :: Writable for DACCR { } # [ doc = "DAC Control Register" ] pub mod daccr { # [ doc = "Reader of register DACCR" ] pub type R = crate :: R < u8 , super :: DACCR > ; # [ doc = "Writer for register DACCR" ] pub type W = crate :: W < u8 , super :: DACCR > ; # [ doc = "Register DACCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DACCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VOSEL`" ] pub type VOSEL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `VOSEL`" ] pub struct VOSEL_W < 'a > { w : & 'a mut W , } impl < 'a > VOSEL_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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Supply Voltage Reference Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VRSEL_A { # [ doc = "0: Vin1 is selected as resistor ladder network supply reference." ] _0 , # [ doc = "1: Vin2 is selected as resistor ladder network supply reference." ] _1 } impl From < VRSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : VRSEL_A ) -> Self { match variant { VRSEL_A :: _0 => false , VRSEL_A :: _1 => true } } } # [ doc = "Reader of field `VRSEL`" ] pub type VRSEL_R = crate :: R < bool , VRSEL_A > ; impl VRSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VRSEL_A { match self . bits { false => VRSEL_A :: _0 , true => VRSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VRSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VRSEL_A :: _1 } } # [ doc = "Write proxy for field `VRSEL`" ] pub struct VRSEL_W < 'a > { w : & 'a mut W , } impl < 'a > VRSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VRSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Vin1 is selected as resistor ladder network supply reference." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VRSEL_A :: _0 ) } # [ doc = "Vin2 is selected as resistor ladder network supply reference." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VRSEL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "DAC Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACEN_A { # [ doc = "0: DAC is disabled." ] _0 , # [ doc = "1: DAC is enabled." ] _1 } impl From < DACEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACEN_A ) -> Self { match variant { DACEN_A :: _0 => false , DACEN_A :: _1 => true } } } # [ doc = "Reader of field `DACEN`" ] pub type DACEN_R = crate :: R < bool , DACEN_A > ; impl DACEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACEN_A { match self . bits { false => DACEN_A :: _0 , true => DACEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACEN_A :: _1 } } # [ doc = "Write proxy for field `DACEN`" ] pub struct DACEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DAC is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _0 ) } # [ doc = "DAC is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - DAC Output Voltage Select" ] # [ inline ( always ) ] pub fn vosel ( & self ) -> VOSEL_R { VOSEL_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bit 6 - Supply Voltage Reference Source Select" ] # [ inline ( always ) ] pub fn vrsel ( & self ) -> VRSEL_R { VRSEL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & self ) -> DACEN_R { DACEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:5 - DAC Output Voltage Select" ] # [ inline ( always ) ] pub fn vosel ( & mut self ) -> VOSEL_W { VOSEL_W { w : self } } # [ doc = "Bit 6 - Supply Voltage Reference Source Select" ] # [ inline ( always ) ] pub fn vrsel ( & mut self ) -> VRSEL_W { VRSEL_W { w : self } } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & mut self ) -> DACEN_W { DACEN_W { w : self } } } } # [ doc = "MUX Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [muxcr](muxcr) module" ] pub type MUXCR = crate :: Reg < u8 , _MUXCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MUXCR ; # [ doc = "`read()` method returns [muxcr::R](muxcr::R) reader structure" ] impl crate :: Readable for MUXCR { } # [ doc = "`write(|w| ..)` method takes [muxcr::W](muxcr::W) writer structure" ] impl crate :: Writable for MUXCR { } # [ doc = "MUX Control Register" ] pub mod muxcr { # [ doc = "Reader of register MUXCR" ] pub type R = crate :: R < u8 , super :: MUXCR > ; # [ doc = "Writer for register MUXCR" ] pub type W = crate :: W < u8 , super :: MUXCR > ; # [ doc = "Register MUXCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MUXCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Minus Input Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSEL_A { # [ doc = "0: IN0" ] _000 , # [ doc = "1: IN1" ] _001 , # [ doc = "2: IN2" ] _010 , # [ doc = "3: IN3" ] _011 , # [ doc = "4: IN4" ] _100 , # [ doc = "5: IN5" ] _101 , # [ doc = "6: IN6" ] _110 , # [ doc = "7: IN7" ] _111 } impl From < MSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : MSEL_A ) -> Self { match variant { MSEL_A :: _000 => 0 , MSEL_A :: _001 => 1 , MSEL_A :: _010 => 2 , MSEL_A :: _011 => 3 , MSEL_A :: _100 => 4 , MSEL_A :: _101 => 5 , MSEL_A :: _110 => 6 , MSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `MSEL`" ] pub type MSEL_R = crate :: R < u8 , MSEL_A > ; impl MSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSEL_A { match self . bits { 0 => MSEL_A :: _000 , 1 => MSEL_A :: _001 , 2 => MSEL_A :: _010 , 3 => MSEL_A :: _011 , 4 => MSEL_A :: _100 , 5 => MSEL_A :: _101 , 6 => MSEL_A :: _110 , 7 => MSEL_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MSEL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MSEL_A :: _111 } } # [ doc = "Write proxy for field `MSEL`" ] pub struct MSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IN0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _000 ) } # [ doc = "IN1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _001 ) } # [ doc = "IN2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _010 ) } # [ doc = "IN3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _011 ) } # [ doc = "IN4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _100 ) } # [ doc = "IN5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _101 ) } # [ doc = "IN6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _110 ) } # [ doc = "IN7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Plus Input Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSEL_A { # [ doc = "0: IN0" ] _000 , # [ doc = "1: IN1" ] _001 , # [ doc = "2: IN2" ] _010 , # [ doc = "3: IN3" ] _011 , # [ doc = "4: IN4" ] _100 , # [ doc = "5: IN5" ] _101 , # [ doc = "6: IN6" ] _110 , # [ doc = "7: IN7" ] _111 } impl From < PSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PSEL_A ) -> Self { match variant { PSEL_A :: _000 => 0 , PSEL_A :: _001 => 1 , PSEL_A :: _010 => 2 , PSEL_A :: _011 => 3 , PSEL_A :: _100 => 4 , PSEL_A :: _101 => 5 , PSEL_A :: _110 => 6 , PSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `PSEL`" ] pub type PSEL_R = crate :: R < u8 , PSEL_A > ; impl PSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSEL_A { match self . bits { 0 => PSEL_A :: _000 , 1 => PSEL_A :: _001 , 2 => PSEL_A :: _010 , 3 => PSEL_A :: _011 , 4 => PSEL_A :: _100 , 5 => PSEL_A :: _101 , 6 => PSEL_A :: _110 , 7 => PSEL_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PSEL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PSEL_A :: _111 } } # [ doc = "Write proxy for field `PSEL`" ] pub struct PSEL_W < 'a > { w : & 'a mut W , } impl < 'a > PSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IN0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _000 ) } # [ doc = "IN1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _001 ) } # [ doc = "IN2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _010 ) } # [ doc = "IN3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _011 ) } # [ doc = "IN4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _100 ) } # [ doc = "IN5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _101 ) } # [ doc = "IN6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _110 ) } # [ doc = "IN7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 3 ) ) | ( ( ( value as u8 ) & 0x07 ) << 3 ) ; self . w } } # [ doc = "Pass Through Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSTM_A { # [ doc = "0: Pass Through Mode is disabled." ] _0 , # [ doc = "1: Pass Through Mode is enabled." ] _1 } impl From < PSTM_A > for bool { # [ inline ( always ) ] fn from ( variant : PSTM_A ) -> Self { match variant { PSTM_A :: _0 => false , PSTM_A :: _1 => true } } } # [ doc = "Reader of field `PSTM`" ] pub type PSTM_R = crate :: R < bool , PSTM_A > ; impl PSTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSTM_A { match self . bits { false => PSTM_A :: _0 , true => PSTM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PSTM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PSTM_A :: _1 } } # [ doc = "Write proxy for field `PSTM`" ] pub struct PSTM_W < 'a > { w : & 'a mut W , } impl < 'a > PSTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSTM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pass Through Mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PSTM_A :: _0 ) } # [ doc = "Pass Through Mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PSTM_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Minus Input Mux Control" ] # [ inline ( always ) ] pub fn msel ( & self ) -> MSEL_R { MSEL_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:5 - Plus Input Mux Control" ] # [ inline ( always ) ] pub fn psel ( & self ) -> PSEL_R { PSEL_R :: new ( ( ( self . bits >> 3 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Pass Through Mode Enable" ] # [ inline ( always ) ] pub fn pstm ( & self ) -> PSTM_R { PSTM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Minus Input Mux Control" ] # [ inline ( always ) ] pub fn msel ( & mut self ) -> MSEL_W { MSEL_W { w : self } } # [ doc = "Bits 3:5 - Plus Input Mux Control" ] # [ inline ( always ) ] pub fn psel ( & mut self ) -> PSEL_W { PSEL_W { w : self } } # [ doc = "Bit 7 - Pass Through Mode Enable" ] # [ inline ( always ) ] pub fn pstm ( & mut self ) -> PSTM_W { PSTM_W { w : self } } } } } # [ doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)" ] pub struct CMP3 { _marker : PhantomData < * const ( ) > } unsafe impl Send for CMP3 { } impl CMP3 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const cmp3 :: RegisterBlock { 0x4007_3018 as * const _ } } impl Deref for CMP3 { type Target = cmp3 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CMP3 :: ptr ( ) } } } # [ doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)" ] pub mod cmp3 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - CMP Control Register 0" ] pub cr0 : CR0 , # [ doc = "0x01 - CMP Control Register 1" ] pub cr1 : CR1 , # [ doc = "0x02 - CMP Filter Period Register" ] pub fpr : FPR , # [ doc = "0x03 - CMP Status and Control Register" ] pub scr : SCR , # [ doc = "0x04 - DAC Control Register" ] pub daccr : DACCR , # [ doc = "0x05 - MUX Control Register" ] pub muxcr : MUXCR , } # [ doc = "CMP Control Register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr0](cr0) module" ] pub type CR0 = crate :: Reg < u8 , _CR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR0 ; # [ doc = "`read()` method returns [cr0::R](cr0::R) reader structure" ] impl crate :: Readable for CR0 { } # [ doc = "`write(|w| ..)` method takes [cr0::W](cr0::W) writer structure" ] impl crate :: Writable for CR0 { } # [ doc = "CMP Control Register 0" ] pub mod cr0 { # [ doc = "Reader of register CR0" ] pub type R = crate :: R < u8 , super :: CR0 > ; # [ doc = "Writer for register CR0" ] pub type W = crate :: W < u8 , super :: CR0 > ; # [ doc = "Register CR0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Comparator hard block hysteresis control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HYSTCTR_A { # [ doc = "0: Level 0" ] _00 , # [ doc = "1: Level 1" ] _01 , # [ doc = "2: Level 2" ] _10 , # [ doc = "3: Level 3" ] _11 } impl From < HYSTCTR_A > for u8 { # [ inline ( always ) ] fn from ( variant : HYSTCTR_A ) -> Self { match variant { HYSTCTR_A :: _00 => 0 , HYSTCTR_A :: _01 => 1 , HYSTCTR_A :: _10 => 2 , HYSTCTR_A :: _11 => 3 } } } # [ doc = "Reader of field `HYSTCTR`" ] pub type HYSTCTR_R = crate :: R < u8 , HYSTCTR_A > ; impl HYSTCTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HYSTCTR_A { match self . bits { 0 => HYSTCTR_A :: _00 , 1 => HYSTCTR_A :: _01 , 2 => HYSTCTR_A :: _10 , 3 => HYSTCTR_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == HYSTCTR_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == HYSTCTR_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == HYSTCTR_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == HYSTCTR_A :: _11 } } # [ doc = "Write proxy for field `HYSTCTR`" ] pub struct HYSTCTR_W < 'a > { w : & 'a mut W , } impl < 'a > HYSTCTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HYSTCTR_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Level 0" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _00 ) } # [ doc = "Level 1" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _01 ) } # [ doc = "Level 2" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _10 ) } # [ doc = "Level 3" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( HYSTCTR_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Filter Sample Count\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTER_CNT_A { # [ doc = "0: Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA." ] _000 , # [ doc = "1: One sample must agree. The comparator output is simply sampled." ] _001 , # [ doc = "2: 2 consecutive samples must agree." ] _010 , # [ doc = "3: 3 consecutive samples must agree." ] _011 , # [ doc = "4: 4 consecutive samples must agree." ] _100 , # [ doc = "5: 5 consecutive samples must agree." ] _101 , # [ doc = "6: 6 consecutive samples must agree." ] _110 , # [ doc = "7: 7 consecutive samples must agree." ] _111 } impl From < FILTER_CNT_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTER_CNT_A ) -> Self { match variant { FILTER_CNT_A :: _000 => 0 , FILTER_CNT_A :: _001 => 1 , FILTER_CNT_A :: _010 => 2 , FILTER_CNT_A :: _011 => 3 , FILTER_CNT_A :: _100 => 4 , FILTER_CNT_A :: _101 => 5 , FILTER_CNT_A :: _110 => 6 , FILTER_CNT_A :: _111 => 7 } } } # [ doc = "Reader of field `FILTER_CNT`" ] pub type FILTER_CNT_R = crate :: R < u8 , FILTER_CNT_A > ; impl FILTER_CNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTER_CNT_A { match self . bits { 0 => FILTER_CNT_A :: _000 , 1 => FILTER_CNT_A :: _001 , 2 => FILTER_CNT_A :: _010 , 3 => FILTER_CNT_A :: _011 , 4 => FILTER_CNT_A :: _100 , 5 => FILTER_CNT_A :: _101 , 6 => FILTER_CNT_A :: _110 , 7 => FILTER_CNT_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == FILTER_CNT_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == FILTER_CNT_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == FILTER_CNT_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == FILTER_CNT_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == FILTER_CNT_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == FILTER_CNT_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == FILTER_CNT_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == FILTER_CNT_A :: _111 } } # [ doc = "Write proxy for field `FILTER_CNT`" ] pub struct FILTER_CNT_W < 'a > { w : & 'a mut W , } impl < 'a > FILTER_CNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTER_CNT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _000 ) } # [ doc = "One sample must agree. The comparator output is simply sampled." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _001 ) } # [ doc = "2 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _010 ) } # [ doc = "3 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _011 ) } # [ doc = "4 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _100 ) } # [ doc = "5 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _101 ) } # [ doc = "6 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _110 ) } # [ doc = "7 consecutive samples must agree." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( FILTER_CNT_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 4 ) ) | ( ( ( value as u8 ) & 0x07 ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Comparator hard block hysteresis control" ] # [ inline ( always ) ] pub fn hystctr ( & self ) -> HYSTCTR_R { HYSTCTR_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 4:6 - Filter Sample Count" ] # [ inline ( always ) ] pub fn filter_cnt ( & self ) -> FILTER_CNT_R { FILTER_CNT_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Comparator hard block hysteresis control" ] # [ inline ( always ) ] pub fn hystctr ( & mut self ) -> HYSTCTR_W { HYSTCTR_W { w : self } } # [ doc = "Bits 4:6 - Filter Sample Count" ] # [ inline ( always ) ] pub fn filter_cnt ( & mut self ) -> FILTER_CNT_W { FILTER_CNT_W { w : self } } } } # [ doc = "CMP Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr1](cr1) module" ] pub type CR1 = crate :: Reg < u8 , _CR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR1 ; # [ doc = "`read()` method returns [cr1::R](cr1::R) reader structure" ] impl crate :: Readable for CR1 { } # [ doc = "`write(|w| ..)` method takes [cr1::W](cr1::W) writer structure" ] impl crate :: Writable for CR1 { } # [ doc = "CMP Control Register 1" ] pub mod cr1 { # [ doc = "Reader of register CR1" ] pub type R = crate :: R < u8 , super :: CR1 > ; # [ doc = "Writer for register CR1" ] pub type W = crate :: W < u8 , super :: CR1 > ; # [ doc = "Register CR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Comparator Module Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_A { # [ doc = "0: Analog Comparator is disabled." ] _0 , # [ doc = "1: Analog Comparator is enabled." ] _1 } impl From < EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_A ) -> Self { match variant { EN_A :: _0 => false , EN_A :: _1 => true } } } # [ doc = "Reader of field `EN`" ] pub type EN_R = crate :: R < bool , EN_A > ; impl EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_A { match self . bits { false => EN_A :: _0 , true => EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_A :: _1 } } # [ doc = "Write proxy for field `EN`" ] pub struct EN_W < 'a > { w : & 'a mut W , } impl < 'a > EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Analog Comparator is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_A :: _0 ) } # [ doc = "Analog Comparator is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Comparator Output Pin Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OPE_A { # [ doc = "0: CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect." ] _0 , # [ doc = "1: CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect." ] _1 } impl From < OPE_A > for bool { # [ inline ( always ) ] fn from ( variant : OPE_A ) -> Self { match variant { OPE_A :: _0 => false , OPE_A :: _1 => true } } } # [ doc = "Reader of field `OPE`" ] pub type OPE_R = crate :: R < bool , OPE_A > ; impl OPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OPE_A { match self . bits { false => OPE_A :: _0 , true => OPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OPE_A :: _1 } } # [ doc = "Write proxy for field `OPE`" ] pub struct OPE_W < 'a > { w : & 'a mut W , } impl < 'a > OPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OPE_A :: _0 ) } # [ doc = "CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OPE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Comparator Output Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COS_A { # [ doc = "0: Set the filtered comparator output (CMPO) to equal COUT." ] _0 , # [ doc = "1: Set the unfiltered comparator output (CMPO) to equal COUTA." ] _1 } impl From < COS_A > for bool { # [ inline ( always ) ] fn from ( variant : COS_A ) -> Self { match variant { COS_A :: _0 => false , COS_A :: _1 => true } } } # [ doc = "Reader of field `COS`" ] pub type COS_R = crate :: R < bool , COS_A > ; impl COS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COS_A { match self . bits { false => COS_A :: _0 , true => COS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COS_A :: _1 } } # [ doc = "Write proxy for field `COS`" ] pub struct COS_W < 'a > { w : & 'a mut W , } impl < 'a > COS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Set the filtered comparator output (CMPO) to equal COUT." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COS_A :: _0 ) } # [ doc = "Set the unfiltered comparator output (CMPO) to equal COUTA." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Comparator INVERT\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INV_A { # [ doc = "0: Does not invert the comparator output." ] _0 , # [ doc = "1: Inverts the comparator output." ] _1 } impl From < INV_A > for bool { # [ inline ( always ) ] fn from ( variant : INV_A ) -> Self { match variant { INV_A :: _0 => false , INV_A :: _1 => true } } } # [ doc = "Reader of field `INV`" ] pub type INV_R = crate :: R < bool , INV_A > ; impl INV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INV_A { match self . bits { false => INV_A :: _0 , true => INV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INV_A :: _1 } } # [ doc = "Write proxy for field `INV`" ] pub struct INV_W < 'a > { w : & 'a mut W , } impl < 'a > INV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Does not invert the comparator output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INV_A :: _0 ) } # [ doc = "Inverts the comparator output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INV_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Power Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PMODE_A { # [ doc = "0: Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption." ] _0 , # [ doc = "1: High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption." ] _1 } impl From < PMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : PMODE_A ) -> Self { match variant { PMODE_A :: _0 => false , PMODE_A :: _1 => true } } } # [ doc = "Reader of field `PMODE`" ] pub type PMODE_R = crate :: R < bool , PMODE_A > ; impl PMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PMODE_A { match self . bits { false => PMODE_A :: _0 , true => PMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PMODE_A :: _1 } } # [ doc = "Write proxy for field `PMODE`" ] pub struct PMODE_W < 'a > { w : & 'a mut W , } impl < 'a > PMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PMODE_A :: _0 ) } # [ doc = "High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PMODE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Trigger Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGM_A { # [ doc = "0: Trigger mode is disabled." ] _0 , # [ doc = "1: Trigger mode is enabled." ] _1 } impl From < TRIGM_A > for bool { # [ inline ( always ) ] fn from ( variant : TRIGM_A ) -> Self { match variant { TRIGM_A :: _0 => false , TRIGM_A :: _1 => true } } } # [ doc = "Reader of field `TRIGM`" ] pub type TRIGM_R = crate :: R < bool , TRIGM_A > ; impl TRIGM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRIGM_A { match self . bits { false => TRIGM_A :: _0 , true => TRIGM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRIGM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRIGM_A :: _1 } } # [ doc = "Write proxy for field `TRIGM`" ] pub struct TRIGM_W < 'a > { w : & 'a mut W , } impl < 'a > TRIGM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIGM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRIGM_A :: _0 ) } # [ doc = "Trigger mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRIGM_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Windowing Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WE_A { # [ doc = "0: Windowing mode is not selected." ] _0 , # [ doc = "1: Windowing mode is selected." ] _1 } impl From < WE_A > for bool { # [ inline ( always ) ] fn from ( variant : WE_A ) -> Self { match variant { WE_A :: _0 => false , WE_A :: _1 => true } } } # [ doc = "Reader of field `WE`" ] pub type WE_R = crate :: R < bool , WE_A > ; impl WE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WE_A { match self . bits { false => WE_A :: _0 , true => WE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WE_A :: _1 } } # [ doc = "Write proxy for field `WE`" ] pub struct WE_W < 'a > { w : & 'a mut W , } impl < 'a > WE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Windowing mode is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WE_A :: _0 ) } # [ doc = "Windowing mode is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Sample Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SE_A { # [ doc = "0: Sampling mode is not selected." ] _0 , # [ doc = "1: Sampling mode is selected." ] _1 } impl From < SE_A > for bool { # [ inline ( always ) ] fn from ( variant : SE_A ) -> Self { match variant { SE_A :: _0 => false , SE_A :: _1 => true } } } # [ doc = "Reader of field `SE`" ] pub type SE_R = crate :: R < bool , SE_A > ; impl SE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SE_A { match self . bits { false => SE_A :: _0 , true => SE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SE_A :: _1 } } # [ doc = "Write proxy for field `SE`" ] pub struct SE_W < 'a > { w : & 'a mut W , } impl < 'a > SE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Sampling mode is not selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SE_A :: _0 ) } # [ doc = "Sampling mode is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Comparator Module Enable" ] # [ inline ( always ) ] pub fn en ( & self ) -> EN_R { EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Comparator Output Pin Enable" ] # [ inline ( always ) ] pub fn ope ( & self ) -> OPE_R { OPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Comparator Output Select" ] # [ inline ( always ) ] pub fn cos ( & self ) -> COS_R { COS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Comparator INVERT" ] # [ inline ( always ) ] pub fn inv ( & self ) -> INV_R { INV_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Power Mode Select" ] # [ inline ( always ) ] pub fn pmode ( & self ) -> PMODE_R { PMODE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Trigger Mode Enable" ] # [ inline ( always ) ] pub fn trigm ( & self ) -> TRIGM_R { TRIGM_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Windowing Enable" ] # [ inline ( always ) ] pub fn we ( & self ) -> WE_R { WE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Sample Enable" ] # [ inline ( always ) ] pub fn se ( & self ) -> SE_R { SE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Comparator Module Enable" ] # [ inline ( always ) ] pub fn en ( & mut self ) -> EN_W { EN_W { w : self } } # [ doc = "Bit 1 - Comparator Output Pin Enable" ] # [ inline ( always ) ] pub fn ope ( & mut self ) -> OPE_W { OPE_W { w : self } } # [ doc = "Bit 2 - Comparator Output Select" ] # [ inline ( always ) ] pub fn cos ( & mut self ) -> COS_W { COS_W { w : self } } # [ doc = "Bit 3 - Comparator INVERT" ] # [ inline ( always ) ] pub fn inv ( & mut self ) -> INV_W { INV_W { w : self } } # [ doc = "Bit 4 - Power Mode Select" ] # [ inline ( always ) ] pub fn pmode ( & mut self ) -> PMODE_W { PMODE_W { w : self } } # [ doc = "Bit 5 - Trigger Mode Enable" ] # [ inline ( always ) ] pub fn trigm ( & mut self ) -> TRIGM_W { TRIGM_W { w : self } } # [ doc = "Bit 6 - Windowing Enable" ] # [ inline ( always ) ] pub fn we ( & mut self ) -> WE_W { WE_W { w : self } } # [ doc = "Bit 7 - Sample Enable" ] # [ inline ( always ) ] pub fn se ( & mut self ) -> SE_W { SE_W { w : self } } } } # [ doc = "CMP Filter Period Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fpr](fpr) module" ] pub type FPR = crate :: Reg < u8 , _FPR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPR ; # [ doc = "`read()` method returns [fpr::R](fpr::R) reader structure" ] impl crate :: Readable for FPR { } # [ doc = "`write(|w| ..)` method takes [fpr::W](fpr::W) writer structure" ] impl crate :: Writable for FPR { } # [ doc = "CMP Filter Period Register" ] pub mod fpr { # [ doc = "Reader of register FPR" ] pub type R = crate :: R < u8 , super :: FPR > ; # [ doc = "Writer for register FPR" ] pub type W = crate :: W < u8 , super :: FPR > ; # [ doc = "Register FPR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FPR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FILT_PER`" ] pub type FILT_PER_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FILT_PER`" ] pub struct FILT_PER_W < 'a > { w : & 'a mut W , } impl < 'a > FILT_PER_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Filter Sample Period" ] # [ inline ( always ) ] pub fn filt_per ( & self ) -> FILT_PER_R { FILT_PER_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Filter Sample Period" ] # [ inline ( always ) ] pub fn filt_per ( & mut self ) -> FILT_PER_W { FILT_PER_W { w : self } } } } # [ doc = "CMP Status and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scr](scr) module" ] pub type SCR = crate :: Reg < u8 , _SCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCR ; # [ doc = "`read()` method returns [scr::R](scr::R) reader structure" ] impl crate :: Readable for SCR { } # [ doc = "`write(|w| ..)` method takes [scr::W](scr::W) writer structure" ] impl crate :: Writable for SCR { } # [ doc = "CMP Status and Control Register" ] pub mod scr { # [ doc = "Reader of register SCR" ] pub type R = crate :: R < u8 , super :: SCR > ; # [ doc = "Writer for register SCR" ] pub type W = crate :: W < u8 , super :: SCR > ; # [ doc = "Register SCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUT`" ] pub type COUT_R = crate :: R < bool , bool > ; # [ doc = "Analog Comparator Flag Falling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFF_A { # [ doc = "0: Falling-edge on COUT has not been detected." ] _0 , # [ doc = "1: Falling-edge on COUT has occurred." ] _1 } impl From < CFF_A > for bool { # [ inline ( always ) ] fn from ( variant : CFF_A ) -> Self { match variant { CFF_A :: _0 => false , CFF_A :: _1 => true } } } # [ doc = "Reader of field `CFF`" ] pub type CFF_R = crate :: R < bool , CFF_A > ; impl CFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFF_A { match self . bits { false => CFF_A :: _0 , true => CFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFF_A :: _1 } } # [ doc = "Write proxy for field `CFF`" ] pub struct CFF_W < 'a > { w : & 'a mut W , } impl < 'a > CFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Falling-edge on COUT has not been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFF_A :: _0 ) } # [ doc = "Falling-edge on COUT has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Analog Comparator Flag Rising\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFR_A { # [ doc = "0: Rising-edge on COUT has not been detected." ] _0 , # [ doc = "1: Rising-edge on COUT has occurred." ] _1 } impl From < CFR_A > for bool { # [ inline ( always ) ] fn from ( variant : CFR_A ) -> Self { match variant { CFR_A :: _0 => false , CFR_A :: _1 => true } } } # [ doc = "Reader of field `CFR`" ] pub type CFR_R = crate :: R < bool , CFR_A > ; impl CFR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFR_A { match self . bits { false => CFR_A :: _0 , true => CFR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFR_A :: _1 } } # [ doc = "Write proxy for field `CFR`" ] pub struct CFR_W < 'a > { w : & 'a mut W , } impl < 'a > CFR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Rising-edge on COUT has not been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFR_A :: _0 ) } # [ doc = "Rising-edge on COUT has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Comparator Interrupt Enable Falling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IEF_A { # [ doc = "0: Interrupt is disabled." ] _0 , # [ doc = "1: Interrupt is enabled." ] _1 } impl From < IEF_A > for bool { # [ inline ( always ) ] fn from ( variant : IEF_A ) -> Self { match variant { IEF_A :: _0 => false , IEF_A :: _1 => true } } } # [ doc = "Reader of field `IEF`" ] pub type IEF_R = crate :: R < bool , IEF_A > ; impl IEF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IEF_A { match self . bits { false => IEF_A :: _0 , true => IEF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IEF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IEF_A :: _1 } } # [ doc = "Write proxy for field `IEF`" ] pub struct IEF_W < 'a > { w : & 'a mut W , } impl < 'a > IEF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IEF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IEF_A :: _0 ) } # [ doc = "Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IEF_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Comparator Interrupt Enable Rising\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IER_A { # [ doc = "0: Interrupt is disabled." ] _0 , # [ doc = "1: Interrupt is enabled." ] _1 } impl From < IER_A > for bool { # [ inline ( always ) ] fn from ( variant : IER_A ) -> Self { match variant { IER_A :: _0 => false , IER_A :: _1 => true } } } # [ doc = "Reader of field `IER`" ] pub type IER_R = crate :: R < bool , IER_A > ; impl IER_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IER_A { match self . bits { false => IER_A :: _0 , true => IER_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IER_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IER_A :: _1 } } # [ doc = "Write proxy for field `IER`" ] pub struct IER_W < 'a > { w : & 'a mut W , } impl < 'a > IER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IER_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IER_A :: _0 ) } # [ doc = "Interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IER_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "DMA Enable Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA is disabled." ] _0 , # [ doc = "1: DMA is enabled." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } impl R { # [ doc = "Bit 0 - Analog Comparator Output" ] # [ inline ( always ) ] pub fn cout ( & self ) -> COUT_R { COUT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Analog Comparator Flag Falling" ] # [ inline ( always ) ] pub fn cff ( & self ) -> CFF_R { CFF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Analog Comparator Flag Rising" ] # [ inline ( always ) ] pub fn cfr ( & self ) -> CFR_R { CFR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Comparator Interrupt Enable Falling" ] # [ inline ( always ) ] pub fn ief ( & self ) -> IEF_R { IEF_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Comparator Interrupt Enable Rising" ] # [ inline ( always ) ] pub fn ier ( & self ) -> IER_R { IER_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - DMA Enable Control" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Analog Comparator Flag Falling" ] # [ inline ( always ) ] pub fn cff ( & mut self ) -> CFF_W { CFF_W { w : self } } # [ doc = "Bit 2 - Analog Comparator Flag Rising" ] # [ inline ( always ) ] pub fn cfr ( & mut self ) -> CFR_W { CFR_W { w : self } } # [ doc = "Bit 3 - Comparator Interrupt Enable Falling" ] # [ inline ( always ) ] pub fn ief ( & mut self ) -> IEF_W { IEF_W { w : self } } # [ doc = "Bit 4 - Comparator Interrupt Enable Rising" ] # [ inline ( always ) ] pub fn ier ( & mut self ) -> IER_W { IER_W { w : self } } # [ doc = "Bit 6 - DMA Enable Control" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } } } # [ doc = "DAC Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [daccr](daccr) module" ] pub type DACCR = crate :: Reg < u8 , _DACCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DACCR ; # [ doc = "`read()` method returns [daccr::R](daccr::R) reader structure" ] impl crate :: Readable for DACCR { } # [ doc = "`write(|w| ..)` method takes [daccr::W](daccr::W) writer structure" ] impl crate :: Writable for DACCR { } # [ doc = "DAC Control Register" ] pub mod daccr { # [ doc = "Reader of register DACCR" ] pub type R = crate :: R < u8 , super :: DACCR > ; # [ doc = "Writer for register DACCR" ] pub type W = crate :: W < u8 , super :: DACCR > ; # [ doc = "Register DACCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DACCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VOSEL`" ] pub type VOSEL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `VOSEL`" ] pub struct VOSEL_W < 'a > { w : & 'a mut W , } impl < 'a > VOSEL_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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Supply Voltage Reference Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VRSEL_A { # [ doc = "0: Vin1 is selected as resistor ladder network supply reference." ] _0 , # [ doc = "1: Vin2 is selected as resistor ladder network supply reference." ] _1 } impl From < VRSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : VRSEL_A ) -> Self { match variant { VRSEL_A :: _0 => false , VRSEL_A :: _1 => true } } } # [ doc = "Reader of field `VRSEL`" ] pub type VRSEL_R = crate :: R < bool , VRSEL_A > ; impl VRSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VRSEL_A { match self . bits { false => VRSEL_A :: _0 , true => VRSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VRSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VRSEL_A :: _1 } } # [ doc = "Write proxy for field `VRSEL`" ] pub struct VRSEL_W < 'a > { w : & 'a mut W , } impl < 'a > VRSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VRSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Vin1 is selected as resistor ladder network supply reference." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VRSEL_A :: _0 ) } # [ doc = "Vin2 is selected as resistor ladder network supply reference." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VRSEL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "DAC Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACEN_A { # [ doc = "0: DAC is disabled." ] _0 , # [ doc = "1: DAC is enabled." ] _1 } impl From < DACEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACEN_A ) -> Self { match variant { DACEN_A :: _0 => false , DACEN_A :: _1 => true } } } # [ doc = "Reader of field `DACEN`" ] pub type DACEN_R = crate :: R < bool , DACEN_A > ; impl DACEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACEN_A { match self . bits { false => DACEN_A :: _0 , true => DACEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACEN_A :: _1 } } # [ doc = "Write proxy for field `DACEN`" ] pub struct DACEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DAC is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _0 ) } # [ doc = "DAC is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - DAC Output Voltage Select" ] # [ inline ( always ) ] pub fn vosel ( & self ) -> VOSEL_R { VOSEL_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bit 6 - Supply Voltage Reference Source Select" ] # [ inline ( always ) ] pub fn vrsel ( & self ) -> VRSEL_R { VRSEL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & self ) -> DACEN_R { DACEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:5 - DAC Output Voltage Select" ] # [ inline ( always ) ] pub fn vosel ( & mut self ) -> VOSEL_W { VOSEL_W { w : self } } # [ doc = "Bit 6 - Supply Voltage Reference Source Select" ] # [ inline ( always ) ] pub fn vrsel ( & mut self ) -> VRSEL_W { VRSEL_W { w : self } } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & mut self ) -> DACEN_W { DACEN_W { w : self } } } } # [ doc = "MUX Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [muxcr](muxcr) module" ] pub type MUXCR = crate :: Reg < u8 , _MUXCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MUXCR ; # [ doc = "`read()` method returns [muxcr::R](muxcr::R) reader structure" ] impl crate :: Readable for MUXCR { } # [ doc = "`write(|w| ..)` method takes [muxcr::W](muxcr::W) writer structure" ] impl crate :: Writable for MUXCR { } # [ doc = "MUX Control Register" ] pub mod muxcr { # [ doc = "Reader of register MUXCR" ] pub type R = crate :: R < u8 , super :: MUXCR > ; # [ doc = "Writer for register MUXCR" ] pub type W = crate :: W < u8 , super :: MUXCR > ; # [ doc = "Register MUXCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MUXCR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Minus Input Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSEL_A { # [ doc = "0: IN0" ] _000 , # [ doc = "1: IN1" ] _001 , # [ doc = "2: IN2" ] _010 , # [ doc = "3: IN3" ] _011 , # [ doc = "4: IN4" ] _100 , # [ doc = "5: IN5" ] _101 , # [ doc = "6: IN6" ] _110 , # [ doc = "7: IN7" ] _111 } impl From < MSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : MSEL_A ) -> Self { match variant { MSEL_A :: _000 => 0 , MSEL_A :: _001 => 1 , MSEL_A :: _010 => 2 , MSEL_A :: _011 => 3 , MSEL_A :: _100 => 4 , MSEL_A :: _101 => 5 , MSEL_A :: _110 => 6 , MSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `MSEL`" ] pub type MSEL_R = crate :: R < u8 , MSEL_A > ; impl MSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSEL_A { match self . bits { 0 => MSEL_A :: _000 , 1 => MSEL_A :: _001 , 2 => MSEL_A :: _010 , 3 => MSEL_A :: _011 , 4 => MSEL_A :: _100 , 5 => MSEL_A :: _101 , 6 => MSEL_A :: _110 , 7 => MSEL_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MSEL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == MSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == MSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == MSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == MSEL_A :: _111 } } # [ doc = "Write proxy for field `MSEL`" ] pub struct MSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IN0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _000 ) } # [ doc = "IN1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _001 ) } # [ doc = "IN2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _010 ) } # [ doc = "IN3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _011 ) } # [ doc = "IN4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _100 ) } # [ doc = "IN5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _101 ) } # [ doc = "IN6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _110 ) } # [ doc = "IN7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( MSEL_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Plus Input Mux Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSEL_A { # [ doc = "0: IN0" ] _000 , # [ doc = "1: IN1" ] _001 , # [ doc = "2: IN2" ] _010 , # [ doc = "3: IN3" ] _011 , # [ doc = "4: IN4" ] _100 , # [ doc = "5: IN5" ] _101 , # [ doc = "6: IN6" ] _110 , # [ doc = "7: IN7" ] _111 } impl From < PSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PSEL_A ) -> Self { match variant { PSEL_A :: _000 => 0 , PSEL_A :: _001 => 1 , PSEL_A :: _010 => 2 , PSEL_A :: _011 => 3 , PSEL_A :: _100 => 4 , PSEL_A :: _101 => 5 , PSEL_A :: _110 => 6 , PSEL_A :: _111 => 7 } } } # [ doc = "Reader of field `PSEL`" ] pub type PSEL_R = crate :: R < u8 , PSEL_A > ; impl PSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSEL_A { match self . bits { 0 => PSEL_A :: _000 , 1 => PSEL_A :: _001 , 2 => PSEL_A :: _010 , 3 => PSEL_A :: _011 , 4 => PSEL_A :: _100 , 5 => PSEL_A :: _101 , 6 => PSEL_A :: _110 , 7 => PSEL_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PSEL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PSEL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PSEL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PSEL_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PSEL_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PSEL_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PSEL_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PSEL_A :: _111 } } # [ doc = "Write proxy for field `PSEL`" ] pub struct PSEL_W < 'a > { w : & 'a mut W , } impl < 'a > PSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "IN0" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _000 ) } # [ doc = "IN1" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _001 ) } # [ doc = "IN2" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _010 ) } # [ doc = "IN3" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _011 ) } # [ doc = "IN4" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _100 ) } # [ doc = "IN5" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _101 ) } # [ doc = "IN6" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _110 ) } # [ doc = "IN7" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PSEL_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 3 ) ) | ( ( ( value as u8 ) & 0x07 ) << 3 ) ; self . w } } # [ doc = "Pass Through Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSTM_A { # [ doc = "0: Pass Through Mode is disabled." ] _0 , # [ doc = "1: Pass Through Mode is enabled." ] _1 } impl From < PSTM_A > for bool { # [ inline ( always ) ] fn from ( variant : PSTM_A ) -> Self { match variant { PSTM_A :: _0 => false , PSTM_A :: _1 => true } } } # [ doc = "Reader of field `PSTM`" ] pub type PSTM_R = crate :: R < bool , PSTM_A > ; impl PSTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSTM_A { match self . bits { false => PSTM_A :: _0 , true => PSTM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PSTM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PSTM_A :: _1 } } # [ doc = "Write proxy for field `PSTM`" ] pub struct PSTM_W < 'a > { w : & 'a mut W , } impl < 'a > PSTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSTM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pass Through Mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PSTM_A :: _0 ) } # [ doc = "Pass Through Mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PSTM_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Minus Input Mux Control" ] # [ inline ( always ) ] pub fn msel ( & self ) -> MSEL_R { MSEL_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:5 - Plus Input Mux Control" ] # [ inline ( always ) ] pub fn psel ( & self ) -> PSEL_R { PSEL_R :: new ( ( ( self . bits >> 3 ) & 0x07 ) as u8 ) } # [ doc = "Bit 7 - Pass Through Mode Enable" ] # [ inline ( always ) ] pub fn pstm ( & self ) -> PSTM_R { PSTM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Minus Input Mux Control" ] # [ inline ( always ) ] pub fn msel ( & mut self ) -> MSEL_W { MSEL_W { w : self } } # [ doc = "Bits 3:5 - Plus Input Mux Control" ] # [ inline ( always ) ] pub fn psel ( & mut self ) -> PSEL_W { PSEL_W { w : self } } # [ doc = "Bit 7 - Pass Through Mode Enable" ] # [ inline ( always ) ] pub fn pstm ( & mut self ) -> PSTM_W { PSTM_W { w : self } } } } } # [ doc = "Voltage Reference" ] pub struct VREF { _marker : PhantomData < * const ( ) > } unsafe impl Send for VREF { } impl VREF { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const vref :: RegisterBlock { 0x4007_4000 as * const _ } } impl Deref for VREF { type Target = vref :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * VREF :: ptr ( ) } } } # [ doc = "Voltage Reference" ] pub mod vref { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - VREF Trim Register" ] pub trm : TRM , # [ doc = "0x01 - VREF Status and Control Register" ] pub sc : SC , } # [ doc = "VREF Trim Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [trm](trm) module" ] pub type TRM = crate :: Reg < u8 , _TRM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TRM ; # [ doc = "`read()` method returns [trm::R](trm::R) reader structure" ] impl crate :: Readable for TRM { } # [ doc = "`write(|w| ..)` method takes [trm::W](trm::W) writer structure" ] impl crate :: Writable for TRM { } # [ doc = "VREF Trim Register" ] pub mod trm { # [ doc = "Reader of register TRM" ] pub type R = crate :: R < u8 , super :: TRM > ; # [ doc = "Writer for register TRM" ] pub type W = crate :: W < u8 , super :: TRM > ; # [ doc = "Register TRM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TRM { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Trim bits\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIM_A { # [ doc = "0: Min" ] _000000 , # [ doc = "63: Max" ] _111111 } impl From < TRIM_A > for u8 { # [ inline ( always ) ] fn from ( variant : TRIM_A ) -> Self { match variant { TRIM_A :: _000000 => 0 , TRIM_A :: _111111 => 63 } } } # [ doc = "Reader of field `TRIM`" ] pub type TRIM_R = crate :: R < u8 , TRIM_A > ; impl TRIM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TRIM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TRIM_A :: _000000 ) , 63 => Val ( TRIM_A :: _111111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000000`" ] # [ inline ( always ) ] pub fn is_000000 ( & self ) -> bool { * self == TRIM_A :: _000000 } # [ doc = "Checks if the value of the field is `_111111`" ] # [ inline ( always ) ] pub fn is_111111 ( & self ) -> bool { * self == TRIM_A :: _111111 } } # [ doc = "Write proxy for field `TRIM`" ] pub struct TRIM_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRIM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Min" ] # [ inline ( always ) ] pub fn _000000 ( self ) -> & 'a mut W { self . variant ( TRIM_A :: _000000 ) } # [ doc = "Max" ] # [ inline ( always ) ] pub fn _111111 ( self ) -> & 'a mut W { self . variant ( TRIM_A :: _111111 ) } # [ 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 & ! 0x3f ) | ( ( value as u8 ) & 0x3f ) ; self . w } } # [ doc = "Chop oscillator enable. When set, internal chopping operation is enabled and the internal analog offset will be minimized.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHOPEN_A { # [ doc = "0: Chop oscillator is disabled." ] _0 , # [ doc = "1: Chop oscillator is enabled." ] _1 } impl From < CHOPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CHOPEN_A ) -> Self { match variant { CHOPEN_A :: _0 => false , CHOPEN_A :: _1 => true } } } # [ doc = "Reader of field `CHOPEN`" ] pub type CHOPEN_R = crate :: R < bool , CHOPEN_A > ; impl CHOPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHOPEN_A { match self . bits { false => CHOPEN_A :: _0 , true => CHOPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHOPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHOPEN_A :: _1 } } # [ doc = "Write proxy for field `CHOPEN`" ] pub struct CHOPEN_W < 'a > { w : & 'a mut W , } impl < 'a > CHOPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHOPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Chop oscillator is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHOPEN_A :: _0 ) } # [ doc = "Chop oscillator is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHOPEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Trim bits" ] # [ inline ( always ) ] pub fn trim ( & self ) -> TRIM_R { TRIM_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bit 6 - Chop oscillator enable. When set, internal chopping operation is enabled and the internal analog offset will be minimized." ] # [ inline ( always ) ] pub fn chopen ( & self ) -> CHOPEN_R { CHOPEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:5 - Trim bits" ] # [ inline ( always ) ] pub fn trim ( & mut self ) -> TRIM_W { TRIM_W { w : self } } # [ doc = "Bit 6 - Chop oscillator enable. When set, internal chopping operation is enabled and the internal analog offset will be minimized." ] # [ inline ( always ) ] pub fn chopen ( & mut self ) -> CHOPEN_W { CHOPEN_W { w : self } } } } # [ doc = "VREF Status and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u8 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "VREF Status and Control Register" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u8 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u8 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Buffer Mode selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODE_LV_A { # [ doc = "0: Bandgap on only, for stabilization and startup" ] _00 , # [ doc = "1: High power buffer mode enabled" ] _01 , # [ doc = "2: Low-power buffer mode enabled" ] _10 } impl From < MODE_LV_A > for u8 { # [ inline ( always ) ] fn from ( variant : MODE_LV_A ) -> Self { match variant { MODE_LV_A :: _00 => 0 , MODE_LV_A :: _01 => 1 , MODE_LV_A :: _10 => 2 } } } # [ doc = "Reader of field `MODE_LV`" ] pub type MODE_LV_R = crate :: R < u8 , MODE_LV_A > ; impl MODE_LV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , MODE_LV_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( MODE_LV_A :: _00 ) , 1 => Val ( MODE_LV_A :: _01 ) , 2 => Val ( MODE_LV_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MODE_LV_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MODE_LV_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MODE_LV_A :: _10 } } # [ doc = "Write proxy for field `MODE_LV`" ] pub struct MODE_LV_W < 'a > { w : & 'a mut W , } impl < 'a > MODE_LV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MODE_LV_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Bandgap on only, for stabilization and startup" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MODE_LV_A :: _00 ) } # [ doc = "High power buffer mode enabled" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MODE_LV_A :: _01 ) } # [ doc = "Low-power buffer mode enabled" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MODE_LV_A :: _10 ) } # [ 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 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Internal Voltage Reference stable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VREFST_A { # [ doc = "0: The module is disabled or not stable." ] _0 , # [ doc = "1: The module is stable." ] _1 } impl From < VREFST_A > for bool { # [ inline ( always ) ] fn from ( variant : VREFST_A ) -> Self { match variant { VREFST_A :: _0 => false , VREFST_A :: _1 => true } } } # [ doc = "Reader of field `VREFST`" ] pub type VREFST_R = crate :: R < bool , VREFST_A > ; impl VREFST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VREFST_A { match self . bits { false => VREFST_A :: _0 , true => VREFST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VREFST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VREFST_A :: _1 } } # [ doc = "Second order curvature compensation enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ICOMPEN_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < ICOMPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ICOMPEN_A ) -> Self { match variant { ICOMPEN_A :: _0 => false , ICOMPEN_A :: _1 => true } } } # [ doc = "Reader of field `ICOMPEN`" ] pub type ICOMPEN_R = crate :: R < bool , ICOMPEN_A > ; impl ICOMPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ICOMPEN_A { match self . bits { false => ICOMPEN_A :: _0 , true => ICOMPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ICOMPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ICOMPEN_A :: _1 } } # [ doc = "Write proxy for field `ICOMPEN`" ] pub struct ICOMPEN_W < 'a > { w : & 'a mut W , } impl < 'a > ICOMPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ICOMPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ICOMPEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ICOMPEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Regulator enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGEN_A { # [ doc = "0: Internal 1.75 V regulator is disabled." ] _0 , # [ doc = "1: Internal 1.75 V regulator is enabled." ] _1 } impl From < REGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : REGEN_A ) -> Self { match variant { REGEN_A :: _0 => false , REGEN_A :: _1 => true } } } # [ doc = "Reader of field `REGEN`" ] pub type REGEN_R = crate :: R < bool , REGEN_A > ; impl REGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> REGEN_A { match self . bits { false => REGEN_A :: _0 , true => REGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == REGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == REGEN_A :: _1 } } # [ doc = "Write proxy for field `REGEN`" ] pub struct REGEN_W < 'a > { w : & 'a mut W , } impl < 'a > REGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : REGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal 1.75 V regulator is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( REGEN_A :: _0 ) } # [ doc = "Internal 1.75 V regulator is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( REGEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Internal Voltage Reference enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VREFEN_A { # [ doc = "0: The module is disabled." ] _0 , # [ doc = "1: The module is enabled." ] _1 } impl From < VREFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : VREFEN_A ) -> Self { match variant { VREFEN_A :: _0 => false , VREFEN_A :: _1 => true } } } # [ doc = "Reader of field `VREFEN`" ] pub type VREFEN_R = crate :: R < bool , VREFEN_A > ; impl VREFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VREFEN_A { match self . bits { false => VREFEN_A :: _0 , true => VREFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VREFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VREFEN_A :: _1 } } # [ doc = "Write proxy for field `VREFEN`" ] pub struct VREFEN_W < 'a > { w : & 'a mut W , } impl < 'a > VREFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VREFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The module is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VREFEN_A :: _0 ) } # [ doc = "The module is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VREFEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Buffer Mode selection" ] # [ inline ( always ) ] pub fn mode_lv ( & self ) -> MODE_LV_R { MODE_LV_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Internal Voltage Reference stable" ] # [ inline ( always ) ] pub fn vrefst ( & self ) -> VREFST_R { VREFST_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Second order curvature compensation enable" ] # [ inline ( always ) ] pub fn icompen ( & self ) -> ICOMPEN_R { ICOMPEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Regulator enable" ] # [ inline ( always ) ] pub fn regen ( & self ) -> REGEN_R { REGEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Internal Voltage Reference enable" ] # [ inline ( always ) ] pub fn vrefen ( & self ) -> VREFEN_R { VREFEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Buffer Mode selection" ] # [ inline ( always ) ] pub fn mode_lv ( & mut self ) -> MODE_LV_W { MODE_LV_W { w : self } } # [ doc = "Bit 5 - Second order curvature compensation enable" ] # [ inline ( always ) ] pub fn icompen ( & mut self ) -> ICOMPEN_W { ICOMPEN_W { w : self } } # [ doc = "Bit 6 - Regulator enable" ] # [ inline ( always ) ] pub fn regen ( & mut self ) -> REGEN_W { REGEN_W { w : self } } # [ doc = "Bit 7 - Internal Voltage Reference enable" ] # [ inline ( always ) ] pub fn vrefen ( & mut self ) -> VREFEN_W { VREFEN_W { w : self } } } } } # [ doc = "Low leakage wakeup unit" ] pub struct LLWU { _marker : PhantomData < * const ( ) > } unsafe impl Send for LLWU { } impl LLWU { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const llwu :: RegisterBlock { 0x4007_c000 as * const _ } } impl Deref for LLWU { type Target = llwu :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * LLWU :: ptr ( ) } } } # [ doc = "Low leakage wakeup unit" ] pub mod llwu { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - LLWU Pin Enable 1 register" ] pub pe1 : PE1 , # [ doc = "0x01 - LLWU Pin Enable 2 register" ] pub pe2 : PE2 , # [ doc = "0x02 - LLWU Pin Enable 3 register" ] pub pe3 : PE3 , # [ doc = "0x03 - LLWU Pin Enable 4 register" ] pub pe4 : PE4 , # [ doc = "0x04 - LLWU Pin Enable 5 register" ] pub pe5 : PE5 , # [ doc = "0x05 - LLWU Pin Enable 6 register" ] pub pe6 : PE6 , # [ doc = "0x06 - LLWU Pin Enable 7 register" ] pub pe7 : PE7 , # [ doc = "0x07 - LLWU Pin Enable 8 register" ] pub pe8 : PE8 , # [ doc = "0x08 - LLWU Module Enable register" ] pub me : ME , # [ doc = "0x09 - LLWU Pin Flag 1 register" ] pub pf1 : PF1 , # [ doc = "0x0a - LLWU Pin Flag 2 register" ] pub pf2 : PF2 , # [ doc = "0x0b - LLWU Pin Flag 3 register" ] pub pf3 : PF3 , # [ doc = "0x0c - LLWU Pin Flag 4 register" ] pub pf4 : PF4 , # [ doc = "0x0d - LLWU Module Flag 5 register" ] pub mf5 : MF5 , # [ doc = "0x0e - LLWU Pin Filter 1 register" ] pub filt1 : FILT1 , # [ doc = "0x0f - LLWU Pin Filter 2 register" ] pub filt2 : FILT2 , # [ doc = "0x10 - LLWU Pin Filter 3 register" ] pub filt3 : FILT3 , # [ doc = "0x11 - LLWU Pin Filter 4 register" ] pub filt4 : FILT4 , } # [ doc = "LLWU Pin Enable 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pe1](pe1) module" ] pub type PE1 = crate :: Reg < u8 , _PE1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PE1 ; # [ doc = "`read()` method returns [pe1::R](pe1::R) reader structure" ] impl crate :: Readable for PE1 { } # [ doc = "`write(|w| ..)` method takes [pe1::W](pe1::W) writer structure" ] impl crate :: Writable for PE1 { } # [ doc = "LLWU Pin Enable 1 register" ] pub mod pe1 { # [ doc = "Reader of register PE1" ] pub type R = crate :: R < u8 , super :: PE1 > ; # [ doc = "Writer for register PE1" ] pub type W = crate :: W < u8 , super :: PE1 > ; # [ doc = "Register PE1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PE1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Pin Enable For LLWU_P0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE0_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE0_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE0_A ) -> Self { match variant { WUPE0_A :: _00 => 0 , WUPE0_A :: _01 => 1 , WUPE0_A :: _10 => 2 , WUPE0_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE0`" ] pub type WUPE0_R = crate :: R < u8 , WUPE0_A > ; impl WUPE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE0_A { match self . bits { 0 => WUPE0_A :: _00 , 1 => WUPE0_A :: _01 , 2 => WUPE0_A :: _10 , 3 => WUPE0_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE0_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE0_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE0_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE0_A :: _11 } } # [ doc = "Write proxy for field `WUPE0`" ] pub struct WUPE0_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE0_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE0_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE0_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE0_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE0_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE1_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE1_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE1_A ) -> Self { match variant { WUPE1_A :: _00 => 0 , WUPE1_A :: _01 => 1 , WUPE1_A :: _10 => 2 , WUPE1_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE1`" ] pub type WUPE1_R = crate :: R < u8 , WUPE1_A > ; impl WUPE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE1_A { match self . bits { 0 => WUPE1_A :: _00 , 1 => WUPE1_A :: _01 , 2 => WUPE1_A :: _10 , 3 => WUPE1_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE1_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE1_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE1_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE1_A :: _11 } } # [ doc = "Write proxy for field `WUPE1`" ] pub struct WUPE1_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE1_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE1_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE1_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE1_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE1_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u8 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE2_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE2_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE2_A ) -> Self { match variant { WUPE2_A :: _00 => 0 , WUPE2_A :: _01 => 1 , WUPE2_A :: _10 => 2 , WUPE2_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE2`" ] pub type WUPE2_R = crate :: R < u8 , WUPE2_A > ; impl WUPE2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE2_A { match self . bits { 0 => WUPE2_A :: _00 , 1 => WUPE2_A :: _01 , 2 => WUPE2_A :: _10 , 3 => WUPE2_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE2_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE2_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE2_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE2_A :: _11 } } # [ doc = "Write proxy for field `WUPE2`" ] pub struct WUPE2_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE2_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE2_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE2_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE2_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE2_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE3_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE3_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE3_A ) -> Self { match variant { WUPE3_A :: _00 => 0 , WUPE3_A :: _01 => 1 , WUPE3_A :: _10 => 2 , WUPE3_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE3`" ] pub type WUPE3_R = crate :: R < u8 , WUPE3_A > ; impl WUPE3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE3_A { match self . bits { 0 => WUPE3_A :: _00 , 1 => WUPE3_A :: _01 , 2 => WUPE3_A :: _10 , 3 => WUPE3_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE3_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE3_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE3_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE3_A :: _11 } } # [ doc = "Write proxy for field `WUPE3`" ] pub struct WUPE3_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE3_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE3_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE3_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE3_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE3_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P0" ] # [ inline ( always ) ] pub fn wupe0 ( & self ) -> WUPE0_R { WUPE0_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P1" ] # [ inline ( always ) ] pub fn wupe1 ( & self ) -> WUPE1_R { WUPE1_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P2" ] # [ inline ( always ) ] pub fn wupe2 ( & self ) -> WUPE2_R { WUPE2_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P3" ] # [ inline ( always ) ] pub fn wupe3 ( & self ) -> WUPE3_R { WUPE3_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P0" ] # [ inline ( always ) ] pub fn wupe0 ( & mut self ) -> WUPE0_W { WUPE0_W { w : self } } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P1" ] # [ inline ( always ) ] pub fn wupe1 ( & mut self ) -> WUPE1_W { WUPE1_W { w : self } } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P2" ] # [ inline ( always ) ] pub fn wupe2 ( & mut self ) -> WUPE2_W { WUPE2_W { w : self } } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P3" ] # [ inline ( always ) ] pub fn wupe3 ( & mut self ) -> WUPE3_W { WUPE3_W { w : self } } } } # [ doc = "LLWU Pin Enable 2 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pe2](pe2) module" ] pub type PE2 = crate :: Reg < u8 , _PE2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PE2 ; # [ doc = "`read()` method returns [pe2::R](pe2::R) reader structure" ] impl crate :: Readable for PE2 { } # [ doc = "`write(|w| ..)` method takes [pe2::W](pe2::W) writer structure" ] impl crate :: Writable for PE2 { } # [ doc = "LLWU Pin Enable 2 register" ] pub mod pe2 { # [ doc = "Reader of register PE2" ] pub type R = crate :: R < u8 , super :: PE2 > ; # [ doc = "Writer for register PE2" ] pub type W = crate :: W < u8 , super :: PE2 > ; # [ doc = "Register PE2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PE2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Pin Enable For LLWU_P4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE4_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE4_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE4_A ) -> Self { match variant { WUPE4_A :: _00 => 0 , WUPE4_A :: _01 => 1 , WUPE4_A :: _10 => 2 , WUPE4_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE4`" ] pub type WUPE4_R = crate :: R < u8 , WUPE4_A > ; impl WUPE4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE4_A { match self . bits { 0 => WUPE4_A :: _00 , 1 => WUPE4_A :: _01 , 2 => WUPE4_A :: _10 , 3 => WUPE4_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE4_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE4_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE4_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE4_A :: _11 } } # [ doc = "Write proxy for field `WUPE4`" ] pub struct WUPE4_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE4_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE4_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE4_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE4_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE4_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE5_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE5_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE5_A ) -> Self { match variant { WUPE5_A :: _00 => 0 , WUPE5_A :: _01 => 1 , WUPE5_A :: _10 => 2 , WUPE5_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE5`" ] pub type WUPE5_R = crate :: R < u8 , WUPE5_A > ; impl WUPE5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE5_A { match self . bits { 0 => WUPE5_A :: _00 , 1 => WUPE5_A :: _01 , 2 => WUPE5_A :: _10 , 3 => WUPE5_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE5_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE5_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE5_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE5_A :: _11 } } # [ doc = "Write proxy for field `WUPE5`" ] pub struct WUPE5_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE5_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE5_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE5_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE5_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE5_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u8 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE6_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE6_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE6_A ) -> Self { match variant { WUPE6_A :: _00 => 0 , WUPE6_A :: _01 => 1 , WUPE6_A :: _10 => 2 , WUPE6_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE6`" ] pub type WUPE6_R = crate :: R < u8 , WUPE6_A > ; impl WUPE6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE6_A { match self . bits { 0 => WUPE6_A :: _00 , 1 => WUPE6_A :: _01 , 2 => WUPE6_A :: _10 , 3 => WUPE6_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE6_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE6_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE6_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE6_A :: _11 } } # [ doc = "Write proxy for field `WUPE6`" ] pub struct WUPE6_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE6_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE6_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE6_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE6_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE6_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE7_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE7_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE7_A ) -> Self { match variant { WUPE7_A :: _00 => 0 , WUPE7_A :: _01 => 1 , WUPE7_A :: _10 => 2 , WUPE7_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE7`" ] pub type WUPE7_R = crate :: R < u8 , WUPE7_A > ; impl WUPE7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE7_A { match self . bits { 0 => WUPE7_A :: _00 , 1 => WUPE7_A :: _01 , 2 => WUPE7_A :: _10 , 3 => WUPE7_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE7_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE7_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE7_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE7_A :: _11 } } # [ doc = "Write proxy for field `WUPE7`" ] pub struct WUPE7_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE7_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE7_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE7_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE7_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE7_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P4" ] # [ inline ( always ) ] pub fn wupe4 ( & self ) -> WUPE4_R { WUPE4_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P5" ] # [ inline ( always ) ] pub fn wupe5 ( & self ) -> WUPE5_R { WUPE5_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P6" ] # [ inline ( always ) ] pub fn wupe6 ( & self ) -> WUPE6_R { WUPE6_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P7" ] # [ inline ( always ) ] pub fn wupe7 ( & self ) -> WUPE7_R { WUPE7_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P4" ] # [ inline ( always ) ] pub fn wupe4 ( & mut self ) -> WUPE4_W { WUPE4_W { w : self } } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P5" ] # [ inline ( always ) ] pub fn wupe5 ( & mut self ) -> WUPE5_W { WUPE5_W { w : self } } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P6" ] # [ inline ( always ) ] pub fn wupe6 ( & mut self ) -> WUPE6_W { WUPE6_W { w : self } } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P7" ] # [ inline ( always ) ] pub fn wupe7 ( & mut self ) -> WUPE7_W { WUPE7_W { w : self } } } } # [ doc = "LLWU Pin Enable 3 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pe3](pe3) module" ] pub type PE3 = crate :: Reg < u8 , _PE3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PE3 ; # [ doc = "`read()` method returns [pe3::R](pe3::R) reader structure" ] impl crate :: Readable for PE3 { } # [ doc = "`write(|w| ..)` method takes [pe3::W](pe3::W) writer structure" ] impl crate :: Writable for PE3 { } # [ doc = "LLWU Pin Enable 3 register" ] pub mod pe3 { # [ doc = "Reader of register PE3" ] pub type R = crate :: R < u8 , super :: PE3 > ; # [ doc = "Writer for register PE3" ] pub type W = crate :: W < u8 , super :: PE3 > ; # [ doc = "Register PE3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PE3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Pin Enable For LLWU_P8\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE8_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE8_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE8_A ) -> Self { match variant { WUPE8_A :: _00 => 0 , WUPE8_A :: _01 => 1 , WUPE8_A :: _10 => 2 , WUPE8_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE8`" ] pub type WUPE8_R = crate :: R < u8 , WUPE8_A > ; impl WUPE8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE8_A { match self . bits { 0 => WUPE8_A :: _00 , 1 => WUPE8_A :: _01 , 2 => WUPE8_A :: _10 , 3 => WUPE8_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE8_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE8_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE8_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE8_A :: _11 } } # [ doc = "Write proxy for field `WUPE8`" ] pub struct WUPE8_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE8_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE8_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE8_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE8_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE8_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P9\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE9_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE9_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE9_A ) -> Self { match variant { WUPE9_A :: _00 => 0 , WUPE9_A :: _01 => 1 , WUPE9_A :: _10 => 2 , WUPE9_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE9`" ] pub type WUPE9_R = crate :: R < u8 , WUPE9_A > ; impl WUPE9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE9_A { match self . bits { 0 => WUPE9_A :: _00 , 1 => WUPE9_A :: _01 , 2 => WUPE9_A :: _10 , 3 => WUPE9_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE9_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE9_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE9_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE9_A :: _11 } } # [ doc = "Write proxy for field `WUPE9`" ] pub struct WUPE9_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE9_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE9_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE9_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE9_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE9_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u8 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P10\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE10_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE10_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE10_A ) -> Self { match variant { WUPE10_A :: _00 => 0 , WUPE10_A :: _01 => 1 , WUPE10_A :: _10 => 2 , WUPE10_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE10`" ] pub type WUPE10_R = crate :: R < u8 , WUPE10_A > ; impl WUPE10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE10_A { match self . bits { 0 => WUPE10_A :: _00 , 1 => WUPE10_A :: _01 , 2 => WUPE10_A :: _10 , 3 => WUPE10_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE10_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE10_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE10_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE10_A :: _11 } } # [ doc = "Write proxy for field `WUPE10`" ] pub struct WUPE10_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE10_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE10_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE10_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE10_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE10_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P11\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE11_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE11_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE11_A ) -> Self { match variant { WUPE11_A :: _00 => 0 , WUPE11_A :: _01 => 1 , WUPE11_A :: _10 => 2 , WUPE11_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE11`" ] pub type WUPE11_R = crate :: R < u8 , WUPE11_A > ; impl WUPE11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE11_A { match self . bits { 0 => WUPE11_A :: _00 , 1 => WUPE11_A :: _01 , 2 => WUPE11_A :: _10 , 3 => WUPE11_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE11_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE11_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE11_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE11_A :: _11 } } # [ doc = "Write proxy for field `WUPE11`" ] pub struct WUPE11_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE11_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE11_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE11_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE11_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE11_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P8" ] # [ inline ( always ) ] pub fn wupe8 ( & self ) -> WUPE8_R { WUPE8_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P9" ] # [ inline ( always ) ] pub fn wupe9 ( & self ) -> WUPE9_R { WUPE9_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P10" ] # [ inline ( always ) ] pub fn wupe10 ( & self ) -> WUPE10_R { WUPE10_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P11" ] # [ inline ( always ) ] pub fn wupe11 ( & self ) -> WUPE11_R { WUPE11_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P8" ] # [ inline ( always ) ] pub fn wupe8 ( & mut self ) -> WUPE8_W { WUPE8_W { w : self } } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P9" ] # [ inline ( always ) ] pub fn wupe9 ( & mut self ) -> WUPE9_W { WUPE9_W { w : self } } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P10" ] # [ inline ( always ) ] pub fn wupe10 ( & mut self ) -> WUPE10_W { WUPE10_W { w : self } } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P11" ] # [ inline ( always ) ] pub fn wupe11 ( & mut self ) -> WUPE11_W { WUPE11_W { w : self } } } } # [ doc = "LLWU Pin Enable 4 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pe4](pe4) module" ] pub type PE4 = crate :: Reg < u8 , _PE4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PE4 ; # [ doc = "`read()` method returns [pe4::R](pe4::R) reader structure" ] impl crate :: Readable for PE4 { } # [ doc = "`write(|w| ..)` method takes [pe4::W](pe4::W) writer structure" ] impl crate :: Writable for PE4 { } # [ doc = "LLWU Pin Enable 4 register" ] pub mod pe4 { # [ doc = "Reader of register PE4" ] pub type R = crate :: R < u8 , super :: PE4 > ; # [ doc = "Writer for register PE4" ] pub type W = crate :: W < u8 , super :: PE4 > ; # [ doc = "Register PE4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PE4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Pin Enable For LLWU_P12\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE12_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE12_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE12_A ) -> Self { match variant { WUPE12_A :: _00 => 0 , WUPE12_A :: _01 => 1 , WUPE12_A :: _10 => 2 , WUPE12_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE12`" ] pub type WUPE12_R = crate :: R < u8 , WUPE12_A > ; impl WUPE12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE12_A { match self . bits { 0 => WUPE12_A :: _00 , 1 => WUPE12_A :: _01 , 2 => WUPE12_A :: _10 , 3 => WUPE12_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE12_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE12_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE12_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE12_A :: _11 } } # [ doc = "Write proxy for field `WUPE12`" ] pub struct WUPE12_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE12_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE12_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE12_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE12_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE12_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P13\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE13_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE13_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE13_A ) -> Self { match variant { WUPE13_A :: _00 => 0 , WUPE13_A :: _01 => 1 , WUPE13_A :: _10 => 2 , WUPE13_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE13`" ] pub type WUPE13_R = crate :: R < u8 , WUPE13_A > ; impl WUPE13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE13_A { match self . bits { 0 => WUPE13_A :: _00 , 1 => WUPE13_A :: _01 , 2 => WUPE13_A :: _10 , 3 => WUPE13_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE13_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE13_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE13_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE13_A :: _11 } } # [ doc = "Write proxy for field `WUPE13`" ] pub struct WUPE13_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE13_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE13_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE13_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE13_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE13_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u8 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P14\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE14_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE14_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE14_A ) -> Self { match variant { WUPE14_A :: _00 => 0 , WUPE14_A :: _01 => 1 , WUPE14_A :: _10 => 2 , WUPE14_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE14`" ] pub type WUPE14_R = crate :: R < u8 , WUPE14_A > ; impl WUPE14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE14_A { match self . bits { 0 => WUPE14_A :: _00 , 1 => WUPE14_A :: _01 , 2 => WUPE14_A :: _10 , 3 => WUPE14_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE14_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE14_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE14_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE14_A :: _11 } } # [ doc = "Write proxy for field `WUPE14`" ] pub struct WUPE14_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE14_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE14_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE14_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE14_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE14_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P15\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE15_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE15_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE15_A ) -> Self { match variant { WUPE15_A :: _00 => 0 , WUPE15_A :: _01 => 1 , WUPE15_A :: _10 => 2 , WUPE15_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE15`" ] pub type WUPE15_R = crate :: R < u8 , WUPE15_A > ; impl WUPE15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE15_A { match self . bits { 0 => WUPE15_A :: _00 , 1 => WUPE15_A :: _01 , 2 => WUPE15_A :: _10 , 3 => WUPE15_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE15_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE15_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE15_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE15_A :: _11 } } # [ doc = "Write proxy for field `WUPE15`" ] pub struct WUPE15_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE15_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE15_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE15_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE15_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE15_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P12" ] # [ inline ( always ) ] pub fn wupe12 ( & self ) -> WUPE12_R { WUPE12_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P13" ] # [ inline ( always ) ] pub fn wupe13 ( & self ) -> WUPE13_R { WUPE13_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P14" ] # [ inline ( always ) ] pub fn wupe14 ( & self ) -> WUPE14_R { WUPE14_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P15" ] # [ inline ( always ) ] pub fn wupe15 ( & self ) -> WUPE15_R { WUPE15_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P12" ] # [ inline ( always ) ] pub fn wupe12 ( & mut self ) -> WUPE12_W { WUPE12_W { w : self } } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P13" ] # [ inline ( always ) ] pub fn wupe13 ( & mut self ) -> WUPE13_W { WUPE13_W { w : self } } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P14" ] # [ inline ( always ) ] pub fn wupe14 ( & mut self ) -> WUPE14_W { WUPE14_W { w : self } } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P15" ] # [ inline ( always ) ] pub fn wupe15 ( & mut self ) -> WUPE15_W { WUPE15_W { w : self } } } } # [ doc = "LLWU Pin Enable 5 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pe5](pe5) module" ] pub type PE5 = crate :: Reg < u8 , _PE5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PE5 ; # [ doc = "`read()` method returns [pe5::R](pe5::R) reader structure" ] impl crate :: Readable for PE5 { } # [ doc = "`write(|w| ..)` method takes [pe5::W](pe5::W) writer structure" ] impl crate :: Writable for PE5 { } # [ doc = "LLWU Pin Enable 5 register" ] pub mod pe5 { # [ doc = "Reader of register PE5" ] pub type R = crate :: R < u8 , super :: PE5 > ; # [ doc = "Writer for register PE5" ] pub type W = crate :: W < u8 , super :: PE5 > ; # [ doc = "Register PE5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PE5 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Pin Enable For LLWU_P16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE16_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE16_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE16_A ) -> Self { match variant { WUPE16_A :: _00 => 0 , WUPE16_A :: _01 => 1 , WUPE16_A :: _10 => 2 , WUPE16_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE16`" ] pub type WUPE16_R = crate :: R < u8 , WUPE16_A > ; impl WUPE16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE16_A { match self . bits { 0 => WUPE16_A :: _00 , 1 => WUPE16_A :: _01 , 2 => WUPE16_A :: _10 , 3 => WUPE16_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE16_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE16_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE16_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE16_A :: _11 } } # [ doc = "Write proxy for field `WUPE16`" ] pub struct WUPE16_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE16_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE16_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE16_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE16_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE16_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P17\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE17_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE17_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE17_A ) -> Self { match variant { WUPE17_A :: _00 => 0 , WUPE17_A :: _01 => 1 , WUPE17_A :: _10 => 2 , WUPE17_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE17`" ] pub type WUPE17_R = crate :: R < u8 , WUPE17_A > ; impl WUPE17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE17_A { match self . bits { 0 => WUPE17_A :: _00 , 1 => WUPE17_A :: _01 , 2 => WUPE17_A :: _10 , 3 => WUPE17_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE17_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE17_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE17_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE17_A :: _11 } } # [ doc = "Write proxy for field `WUPE17`" ] pub struct WUPE17_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE17_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE17_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE17_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE17_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE17_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u8 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P18\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE18_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE18_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE18_A ) -> Self { match variant { WUPE18_A :: _00 => 0 , WUPE18_A :: _01 => 1 , WUPE18_A :: _10 => 2 , WUPE18_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE18`" ] pub type WUPE18_R = crate :: R < u8 , WUPE18_A > ; impl WUPE18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE18_A { match self . bits { 0 => WUPE18_A :: _00 , 1 => WUPE18_A :: _01 , 2 => WUPE18_A :: _10 , 3 => WUPE18_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE18_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE18_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE18_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE18_A :: _11 } } # [ doc = "Write proxy for field `WUPE18`" ] pub struct WUPE18_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE18_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE18_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE18_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE18_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE18_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P19\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE19_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE19_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE19_A ) -> Self { match variant { WUPE19_A :: _00 => 0 , WUPE19_A :: _01 => 1 , WUPE19_A :: _10 => 2 , WUPE19_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE19`" ] pub type WUPE19_R = crate :: R < u8 , WUPE19_A > ; impl WUPE19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE19_A { match self . bits { 0 => WUPE19_A :: _00 , 1 => WUPE19_A :: _01 , 2 => WUPE19_A :: _10 , 3 => WUPE19_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE19_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE19_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE19_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE19_A :: _11 } } # [ doc = "Write proxy for field `WUPE19`" ] pub struct WUPE19_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE19_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE19_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE19_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE19_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE19_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P16" ] # [ inline ( always ) ] pub fn wupe16 ( & self ) -> WUPE16_R { WUPE16_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P17" ] # [ inline ( always ) ] pub fn wupe17 ( & self ) -> WUPE17_R { WUPE17_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P18" ] # [ inline ( always ) ] pub fn wupe18 ( & self ) -> WUPE18_R { WUPE18_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P19" ] # [ inline ( always ) ] pub fn wupe19 ( & self ) -> WUPE19_R { WUPE19_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P16" ] # [ inline ( always ) ] pub fn wupe16 ( & mut self ) -> WUPE16_W { WUPE16_W { w : self } } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P17" ] # [ inline ( always ) ] pub fn wupe17 ( & mut self ) -> WUPE17_W { WUPE17_W { w : self } } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P18" ] # [ inline ( always ) ] pub fn wupe18 ( & mut self ) -> WUPE18_W { WUPE18_W { w : self } } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P19" ] # [ inline ( always ) ] pub fn wupe19 ( & mut self ) -> WUPE19_W { WUPE19_W { w : self } } } } # [ doc = "LLWU Pin Enable 6 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pe6](pe6) module" ] pub type PE6 = crate :: Reg < u8 , _PE6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PE6 ; # [ doc = "`read()` method returns [pe6::R](pe6::R) reader structure" ] impl crate :: Readable for PE6 { } # [ doc = "`write(|w| ..)` method takes [pe6::W](pe6::W) writer structure" ] impl crate :: Writable for PE6 { } # [ doc = "LLWU Pin Enable 6 register" ] pub mod pe6 { # [ doc = "Reader of register PE6" ] pub type R = crate :: R < u8 , super :: PE6 > ; # [ doc = "Writer for register PE6" ] pub type W = crate :: W < u8 , super :: PE6 > ; # [ doc = "Register PE6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PE6 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Pin Enable For LLWU_P20\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE20_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE20_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE20_A ) -> Self { match variant { WUPE20_A :: _00 => 0 , WUPE20_A :: _01 => 1 , WUPE20_A :: _10 => 2 , WUPE20_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE20`" ] pub type WUPE20_R = crate :: R < u8 , WUPE20_A > ; impl WUPE20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE20_A { match self . bits { 0 => WUPE20_A :: _00 , 1 => WUPE20_A :: _01 , 2 => WUPE20_A :: _10 , 3 => WUPE20_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE20_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE20_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE20_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE20_A :: _11 } } # [ doc = "Write proxy for field `WUPE20`" ] pub struct WUPE20_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE20_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE20_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE20_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE20_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE20_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P21\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE21_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE21_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE21_A ) -> Self { match variant { WUPE21_A :: _00 => 0 , WUPE21_A :: _01 => 1 , WUPE21_A :: _10 => 2 , WUPE21_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE21`" ] pub type WUPE21_R = crate :: R < u8 , WUPE21_A > ; impl WUPE21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE21_A { match self . bits { 0 => WUPE21_A :: _00 , 1 => WUPE21_A :: _01 , 2 => WUPE21_A :: _10 , 3 => WUPE21_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE21_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE21_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE21_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE21_A :: _11 } } # [ doc = "Write proxy for field `WUPE21`" ] pub struct WUPE21_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE21_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE21_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE21_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE21_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE21_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u8 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P22\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE22_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE22_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE22_A ) -> Self { match variant { WUPE22_A :: _00 => 0 , WUPE22_A :: _01 => 1 , WUPE22_A :: _10 => 2 , WUPE22_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE22`" ] pub type WUPE22_R = crate :: R < u8 , WUPE22_A > ; impl WUPE22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE22_A { match self . bits { 0 => WUPE22_A :: _00 , 1 => WUPE22_A :: _01 , 2 => WUPE22_A :: _10 , 3 => WUPE22_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE22_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE22_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE22_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE22_A :: _11 } } # [ doc = "Write proxy for field `WUPE22`" ] pub struct WUPE22_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE22_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE22_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE22_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE22_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE22_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P23\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE23_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE23_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE23_A ) -> Self { match variant { WUPE23_A :: _00 => 0 , WUPE23_A :: _01 => 1 , WUPE23_A :: _10 => 2 , WUPE23_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE23`" ] pub type WUPE23_R = crate :: R < u8 , WUPE23_A > ; impl WUPE23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE23_A { match self . bits { 0 => WUPE23_A :: _00 , 1 => WUPE23_A :: _01 , 2 => WUPE23_A :: _10 , 3 => WUPE23_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE23_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE23_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE23_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE23_A :: _11 } } # [ doc = "Write proxy for field `WUPE23`" ] pub struct WUPE23_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE23_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE23_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE23_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE23_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE23_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P20" ] # [ inline ( always ) ] pub fn wupe20 ( & self ) -> WUPE20_R { WUPE20_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P21" ] # [ inline ( always ) ] pub fn wupe21 ( & self ) -> WUPE21_R { WUPE21_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P22" ] # [ inline ( always ) ] pub fn wupe22 ( & self ) -> WUPE22_R { WUPE22_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P23" ] # [ inline ( always ) ] pub fn wupe23 ( & self ) -> WUPE23_R { WUPE23_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P20" ] # [ inline ( always ) ] pub fn wupe20 ( & mut self ) -> WUPE20_W { WUPE20_W { w : self } } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P21" ] # [ inline ( always ) ] pub fn wupe21 ( & mut self ) -> WUPE21_W { WUPE21_W { w : self } } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P22" ] # [ inline ( always ) ] pub fn wupe22 ( & mut self ) -> WUPE22_W { WUPE22_W { w : self } } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P23" ] # [ inline ( always ) ] pub fn wupe23 ( & mut self ) -> WUPE23_W { WUPE23_W { w : self } } } } # [ doc = "LLWU Pin Enable 7 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pe7](pe7) module" ] pub type PE7 = crate :: Reg < u8 , _PE7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PE7 ; # [ doc = "`read()` method returns [pe7::R](pe7::R) reader structure" ] impl crate :: Readable for PE7 { } # [ doc = "`write(|w| ..)` method takes [pe7::W](pe7::W) writer structure" ] impl crate :: Writable for PE7 { } # [ doc = "LLWU Pin Enable 7 register" ] pub mod pe7 { # [ doc = "Reader of register PE7" ] pub type R = crate :: R < u8 , super :: PE7 > ; # [ doc = "Writer for register PE7" ] pub type W = crate :: W < u8 , super :: PE7 > ; # [ doc = "Register PE7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PE7 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Pin Enable For LLWU_P24\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE24_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE24_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE24_A ) -> Self { match variant { WUPE24_A :: _00 => 0 , WUPE24_A :: _01 => 1 , WUPE24_A :: _10 => 2 , WUPE24_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE24`" ] pub type WUPE24_R = crate :: R < u8 , WUPE24_A > ; impl WUPE24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE24_A { match self . bits { 0 => WUPE24_A :: _00 , 1 => WUPE24_A :: _01 , 2 => WUPE24_A :: _10 , 3 => WUPE24_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE24_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE24_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE24_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE24_A :: _11 } } # [ doc = "Write proxy for field `WUPE24`" ] pub struct WUPE24_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE24_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE24_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE24_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE24_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE24_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P25\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE25_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE25_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE25_A ) -> Self { match variant { WUPE25_A :: _00 => 0 , WUPE25_A :: _01 => 1 , WUPE25_A :: _10 => 2 , WUPE25_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE25`" ] pub type WUPE25_R = crate :: R < u8 , WUPE25_A > ; impl WUPE25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE25_A { match self . bits { 0 => WUPE25_A :: _00 , 1 => WUPE25_A :: _01 , 2 => WUPE25_A :: _10 , 3 => WUPE25_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE25_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE25_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE25_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE25_A :: _11 } } # [ doc = "Write proxy for field `WUPE25`" ] pub struct WUPE25_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE25_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE25_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE25_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE25_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE25_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u8 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P26\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE26_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE26_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE26_A ) -> Self { match variant { WUPE26_A :: _00 => 0 , WUPE26_A :: _01 => 1 , WUPE26_A :: _10 => 2 , WUPE26_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE26`" ] pub type WUPE26_R = crate :: R < u8 , WUPE26_A > ; impl WUPE26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE26_A { match self . bits { 0 => WUPE26_A :: _00 , 1 => WUPE26_A :: _01 , 2 => WUPE26_A :: _10 , 3 => WUPE26_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE26_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE26_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE26_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE26_A :: _11 } } # [ doc = "Write proxy for field `WUPE26`" ] pub struct WUPE26_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE26_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE26_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE26_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE26_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE26_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P27\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE27_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE27_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE27_A ) -> Self { match variant { WUPE27_A :: _00 => 0 , WUPE27_A :: _01 => 1 , WUPE27_A :: _10 => 2 , WUPE27_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE27`" ] pub type WUPE27_R = crate :: R < u8 , WUPE27_A > ; impl WUPE27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE27_A { match self . bits { 0 => WUPE27_A :: _00 , 1 => WUPE27_A :: _01 , 2 => WUPE27_A :: _10 , 3 => WUPE27_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE27_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE27_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE27_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE27_A :: _11 } } # [ doc = "Write proxy for field `WUPE27`" ] pub struct WUPE27_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE27_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE27_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE27_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE27_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE27_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P24" ] # [ inline ( always ) ] pub fn wupe24 ( & self ) -> WUPE24_R { WUPE24_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P25" ] # [ inline ( always ) ] pub fn wupe25 ( & self ) -> WUPE25_R { WUPE25_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P26" ] # [ inline ( always ) ] pub fn wupe26 ( & self ) -> WUPE26_R { WUPE26_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P27" ] # [ inline ( always ) ] pub fn wupe27 ( & self ) -> WUPE27_R { WUPE27_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P24" ] # [ inline ( always ) ] pub fn wupe24 ( & mut self ) -> WUPE24_W { WUPE24_W { w : self } } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P25" ] # [ inline ( always ) ] pub fn wupe25 ( & mut self ) -> WUPE25_W { WUPE25_W { w : self } } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P26" ] # [ inline ( always ) ] pub fn wupe26 ( & mut self ) -> WUPE26_W { WUPE26_W { w : self } } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P27" ] # [ inline ( always ) ] pub fn wupe27 ( & mut self ) -> WUPE27_W { WUPE27_W { w : self } } } } # [ doc = "LLWU Pin Enable 8 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pe8](pe8) module" ] pub type PE8 = crate :: Reg < u8 , _PE8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PE8 ; # [ doc = "`read()` method returns [pe8::R](pe8::R) reader structure" ] impl crate :: Readable for PE8 { } # [ doc = "`write(|w| ..)` method takes [pe8::W](pe8::W) writer structure" ] impl crate :: Writable for PE8 { } # [ doc = "LLWU Pin Enable 8 register" ] pub mod pe8 { # [ doc = "Reader of register PE8" ] pub type R = crate :: R < u8 , super :: PE8 > ; # [ doc = "Writer for register PE8" ] pub type W = crate :: W < u8 , super :: PE8 > ; # [ doc = "Register PE8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PE8 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Pin Enable For LLWU_P28\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE28_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE28_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE28_A ) -> Self { match variant { WUPE28_A :: _00 => 0 , WUPE28_A :: _01 => 1 , WUPE28_A :: _10 => 2 , WUPE28_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE28`" ] pub type WUPE28_R = crate :: R < u8 , WUPE28_A > ; impl WUPE28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE28_A { match self . bits { 0 => WUPE28_A :: _00 , 1 => WUPE28_A :: _01 , 2 => WUPE28_A :: _10 , 3 => WUPE28_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE28_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE28_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE28_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE28_A :: _11 } } # [ doc = "Write proxy for field `WUPE28`" ] pub struct WUPE28_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE28_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE28_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE28_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE28_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE28_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P29\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE29_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE29_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE29_A ) -> Self { match variant { WUPE29_A :: _00 => 0 , WUPE29_A :: _01 => 1 , WUPE29_A :: _10 => 2 , WUPE29_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE29`" ] pub type WUPE29_R = crate :: R < u8 , WUPE29_A > ; impl WUPE29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE29_A { match self . bits { 0 => WUPE29_A :: _00 , 1 => WUPE29_A :: _01 , 2 => WUPE29_A :: _10 , 3 => WUPE29_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE29_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE29_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE29_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE29_A :: _11 } } # [ doc = "Write proxy for field `WUPE29`" ] pub struct WUPE29_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE29_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE29_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE29_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE29_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE29_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u8 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P30\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE30_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE30_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE30_A ) -> Self { match variant { WUPE30_A :: _00 => 0 , WUPE30_A :: _01 => 1 , WUPE30_A :: _10 => 2 , WUPE30_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE30`" ] pub type WUPE30_R = crate :: R < u8 , WUPE30_A > ; impl WUPE30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE30_A { match self . bits { 0 => WUPE30_A :: _00 , 1 => WUPE30_A :: _01 , 2 => WUPE30_A :: _10 , 3 => WUPE30_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE30_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE30_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE30_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE30_A :: _11 } } # [ doc = "Write proxy for field `WUPE30`" ] pub struct WUPE30_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE30_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE30_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE30_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE30_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE30_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u8 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Wakeup Pin Enable For LLWU_P31\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUPE31_A { # [ doc = "0: External input pin disabled as wakeup input" ] _00 , # [ doc = "1: External input pin enabled with rising edge detection" ] _01 , # [ doc = "2: External input pin enabled with falling edge detection" ] _10 , # [ doc = "3: External input pin enabled with any change detection" ] _11 } impl From < WUPE31_A > for u8 { # [ inline ( always ) ] fn from ( variant : WUPE31_A ) -> Self { match variant { WUPE31_A :: _00 => 0 , WUPE31_A :: _01 => 1 , WUPE31_A :: _10 => 2 , WUPE31_A :: _11 => 3 } } } # [ doc = "Reader of field `WUPE31`" ] pub type WUPE31_R = crate :: R < u8 , WUPE31_A > ; impl WUPE31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUPE31_A { match self . bits { 0 => WUPE31_A :: _00 , 1 => WUPE31_A :: _01 , 2 => WUPE31_A :: _10 , 3 => WUPE31_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == WUPE31_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == WUPE31_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == WUPE31_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == WUPE31_A :: _11 } } # [ doc = "Write proxy for field `WUPE31`" ] pub struct WUPE31_W < 'a > { w : & 'a mut W , } impl < 'a > WUPE31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUPE31_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "External input pin disabled as wakeup input" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( WUPE31_A :: _00 ) } # [ doc = "External input pin enabled with rising edge detection" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( WUPE31_A :: _01 ) } # [ doc = "External input pin enabled with falling edge detection" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( WUPE31_A :: _10 ) } # [ doc = "External input pin enabled with any change detection" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( WUPE31_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P28" ] # [ inline ( always ) ] pub fn wupe28 ( & self ) -> WUPE28_R { WUPE28_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P29" ] # [ inline ( always ) ] pub fn wupe29 ( & self ) -> WUPE29_R { WUPE29_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P30" ] # [ inline ( always ) ] pub fn wupe30 ( & self ) -> WUPE30_R { WUPE30_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P31" ] # [ inline ( always ) ] pub fn wupe31 ( & self ) -> WUPE31_R { WUPE31_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P28" ] # [ inline ( always ) ] pub fn wupe28 ( & mut self ) -> WUPE28_W { WUPE28_W { w : self } } # [ doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P29" ] # [ inline ( always ) ] pub fn wupe29 ( & mut self ) -> WUPE29_W { WUPE29_W { w : self } } # [ doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P30" ] # [ inline ( always ) ] pub fn wupe30 ( & mut self ) -> WUPE30_W { WUPE30_W { w : self } } # [ doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P31" ] # [ inline ( always ) ] pub fn wupe31 ( & mut self ) -> WUPE31_W { WUPE31_W { w : self } } } } # [ doc = "LLWU Module Enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [me](me) module" ] pub type ME = crate :: Reg < u8 , _ME > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ME ; # [ doc = "`read()` method returns [me::R](me::R) reader structure" ] impl crate :: Readable for ME { } # [ doc = "`write(|w| ..)` method takes [me::W](me::W) writer structure" ] impl crate :: Writable for ME { } # [ doc = "LLWU Module Enable register" ] pub mod me { # [ doc = "Reader of register ME" ] pub type R = crate :: R < u8 , super :: ME > ; # [ doc = "Writer for register ME" ] pub type W = crate :: W < u8 , super :: ME > ; # [ doc = "Register ME `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ME { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Module Enable For Module 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUME0_A { # [ doc = "0: Internal module flag not used as wakeup source" ] _0 , # [ doc = "1: Internal module flag used as wakeup source" ] _1 } impl From < WUME0_A > for bool { # [ inline ( always ) ] fn from ( variant : WUME0_A ) -> Self { match variant { WUME0_A :: _0 => false , WUME0_A :: _1 => true } } } # [ doc = "Reader of field `WUME0`" ] pub type WUME0_R = crate :: R < bool , WUME0_A > ; impl WUME0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUME0_A { match self . bits { false => WUME0_A :: _0 , true => WUME0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUME0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUME0_A :: _1 } } # [ doc = "Write proxy for field `WUME0`" ] pub struct WUME0_W < 'a > { w : & 'a mut W , } impl < 'a > WUME0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUME0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal module flag not used as wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUME0_A :: _0 ) } # [ doc = "Internal module flag used as wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUME0_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Module Enable for Module 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUME1_A { # [ doc = "0: Internal module flag not used as wakeup source" ] _0 , # [ doc = "1: Internal module flag used as wakeup source" ] _1 } impl From < WUME1_A > for bool { # [ inline ( always ) ] fn from ( variant : WUME1_A ) -> Self { match variant { WUME1_A :: _0 => false , WUME1_A :: _1 => true } } } # [ doc = "Reader of field `WUME1`" ] pub type WUME1_R = crate :: R < bool , WUME1_A > ; impl WUME1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUME1_A { match self . bits { false => WUME1_A :: _0 , true => WUME1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUME1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUME1_A :: _1 } } # [ doc = "Write proxy for field `WUME1`" ] pub struct WUME1_W < 'a > { w : & 'a mut W , } impl < 'a > WUME1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUME1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal module flag not used as wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUME1_A :: _0 ) } # [ doc = "Internal module flag used as wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUME1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Wakeup Module Enable For Module 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUME2_A { # [ doc = "0: Internal module flag not used as wakeup source" ] _0 , # [ doc = "1: Internal module flag used as wakeup source" ] _1 } impl From < WUME2_A > for bool { # [ inline ( always ) ] fn from ( variant : WUME2_A ) -> Self { match variant { WUME2_A :: _0 => false , WUME2_A :: _1 => true } } } # [ doc = "Reader of field `WUME2`" ] pub type WUME2_R = crate :: R < bool , WUME2_A > ; impl WUME2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUME2_A { match self . bits { false => WUME2_A :: _0 , true => WUME2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUME2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUME2_A :: _1 } } # [ doc = "Write proxy for field `WUME2`" ] pub struct WUME2_W < 'a > { w : & 'a mut W , } impl < 'a > WUME2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUME2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal module flag not used as wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUME2_A :: _0 ) } # [ doc = "Internal module flag used as wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUME2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Wakeup Module Enable For Module 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUME3_A { # [ doc = "0: Internal module flag not used as wakeup source" ] _0 , # [ doc = "1: Internal module flag used as wakeup source" ] _1 } impl From < WUME3_A > for bool { # [ inline ( always ) ] fn from ( variant : WUME3_A ) -> Self { match variant { WUME3_A :: _0 => false , WUME3_A :: _1 => true } } } # [ doc = "Reader of field `WUME3`" ] pub type WUME3_R = crate :: R < bool , WUME3_A > ; impl WUME3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUME3_A { match self . bits { false => WUME3_A :: _0 , true => WUME3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUME3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUME3_A :: _1 } } # [ doc = "Write proxy for field `WUME3`" ] pub struct WUME3_W < 'a > { w : & 'a mut W , } impl < 'a > WUME3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUME3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal module flag not used as wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUME3_A :: _0 ) } # [ doc = "Internal module flag used as wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUME3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Wakeup Module Enable For Module 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUME4_A { # [ doc = "0: Internal module flag not used as wakeup source" ] _0 , # [ doc = "1: Internal module flag used as wakeup source" ] _1 } impl From < WUME4_A > for bool { # [ inline ( always ) ] fn from ( variant : WUME4_A ) -> Self { match variant { WUME4_A :: _0 => false , WUME4_A :: _1 => true } } } # [ doc = "Reader of field `WUME4`" ] pub type WUME4_R = crate :: R < bool , WUME4_A > ; impl WUME4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUME4_A { match self . bits { false => WUME4_A :: _0 , true => WUME4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUME4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUME4_A :: _1 } } # [ doc = "Write proxy for field `WUME4`" ] pub struct WUME4_W < 'a > { w : & 'a mut W , } impl < 'a > WUME4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUME4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal module flag not used as wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUME4_A :: _0 ) } # [ doc = "Internal module flag used as wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUME4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Wakeup Module Enable For Module 5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUME5_A { # [ doc = "0: Internal module flag not used as wakeup source" ] _0 , # [ doc = "1: Internal module flag used as wakeup source" ] _1 } impl From < WUME5_A > for bool { # [ inline ( always ) ] fn from ( variant : WUME5_A ) -> Self { match variant { WUME5_A :: _0 => false , WUME5_A :: _1 => true } } } # [ doc = "Reader of field `WUME5`" ] pub type WUME5_R = crate :: R < bool , WUME5_A > ; impl WUME5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUME5_A { match self . bits { false => WUME5_A :: _0 , true => WUME5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUME5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUME5_A :: _1 } } # [ doc = "Write proxy for field `WUME5`" ] pub struct WUME5_W < 'a > { w : & 'a mut W , } impl < 'a > WUME5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUME5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal module flag not used as wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUME5_A :: _0 ) } # [ doc = "Internal module flag used as wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUME5_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Wakeup Module Enable For Module 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUME6_A { # [ doc = "0: Internal module flag not used as wakeup source" ] _0 , # [ doc = "1: Internal module flag used as wakeup source" ] _1 } impl From < WUME6_A > for bool { # [ inline ( always ) ] fn from ( variant : WUME6_A ) -> Self { match variant { WUME6_A :: _0 => false , WUME6_A :: _1 => true } } } # [ doc = "Reader of field `WUME6`" ] pub type WUME6_R = crate :: R < bool , WUME6_A > ; impl WUME6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUME6_A { match self . bits { false => WUME6_A :: _0 , true => WUME6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUME6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUME6_A :: _1 } } # [ doc = "Write proxy for field `WUME6`" ] pub struct WUME6_W < 'a > { w : & 'a mut W , } impl < 'a > WUME6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUME6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal module flag not used as wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUME6_A :: _0 ) } # [ doc = "Internal module flag used as wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUME6_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Wakeup Module Enable For Module 7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUME7_A { # [ doc = "0: Internal module flag not used as wakeup source" ] _0 , # [ doc = "1: Internal module flag used as wakeup source" ] _1 } impl From < WUME7_A > for bool { # [ inline ( always ) ] fn from ( variant : WUME7_A ) -> Self { match variant { WUME7_A :: _0 => false , WUME7_A :: _1 => true } } } # [ doc = "Reader of field `WUME7`" ] pub type WUME7_R = crate :: R < bool , WUME7_A > ; impl WUME7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUME7_A { match self . bits { false => WUME7_A :: _0 , true => WUME7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUME7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUME7_A :: _1 } } # [ doc = "Write proxy for field `WUME7`" ] pub struct WUME7_W < 'a > { w : & 'a mut W , } impl < 'a > WUME7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUME7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal module flag not used as wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUME7_A :: _0 ) } # [ doc = "Internal module flag used as wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUME7_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Wakeup Module Enable For Module 0" ] # [ inline ( always ) ] pub fn wume0 ( & self ) -> WUME0_R { WUME0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Module Enable for Module 1" ] # [ inline ( always ) ] pub fn wume1 ( & self ) -> WUME1_R { WUME1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Wakeup Module Enable For Module 2" ] # [ inline ( always ) ] pub fn wume2 ( & self ) -> WUME2_R { WUME2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Wakeup Module Enable For Module 3" ] # [ inline ( always ) ] pub fn wume3 ( & self ) -> WUME3_R { WUME3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Wakeup Module Enable For Module 4" ] # [ inline ( always ) ] pub fn wume4 ( & self ) -> WUME4_R { WUME4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Wakeup Module Enable For Module 5" ] # [ inline ( always ) ] pub fn wume5 ( & self ) -> WUME5_R { WUME5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Wakeup Module Enable For Module 6" ] # [ inline ( always ) ] pub fn wume6 ( & self ) -> WUME6_R { WUME6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wakeup Module Enable For Module 7" ] # [ inline ( always ) ] pub fn wume7 ( & self ) -> WUME7_R { WUME7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Wakeup Module Enable For Module 0" ] # [ inline ( always ) ] pub fn wume0 ( & mut self ) -> WUME0_W { WUME0_W { w : self } } # [ doc = "Bit 1 - Wakeup Module Enable for Module 1" ] # [ inline ( always ) ] pub fn wume1 ( & mut self ) -> WUME1_W { WUME1_W { w : self } } # [ doc = "Bit 2 - Wakeup Module Enable For Module 2" ] # [ inline ( always ) ] pub fn wume2 ( & mut self ) -> WUME2_W { WUME2_W { w : self } } # [ doc = "Bit 3 - Wakeup Module Enable For Module 3" ] # [ inline ( always ) ] pub fn wume3 ( & mut self ) -> WUME3_W { WUME3_W { w : self } } # [ doc = "Bit 4 - Wakeup Module Enable For Module 4" ] # [ inline ( always ) ] pub fn wume4 ( & mut self ) -> WUME4_W { WUME4_W { w : self } } # [ doc = "Bit 5 - Wakeup Module Enable For Module 5" ] # [ inline ( always ) ] pub fn wume5 ( & mut self ) -> WUME5_W { WUME5_W { w : self } } # [ doc = "Bit 6 - Wakeup Module Enable For Module 6" ] # [ inline ( always ) ] pub fn wume6 ( & mut self ) -> WUME6_W { WUME6_W { w : self } } # [ doc = "Bit 7 - Wakeup Module Enable For Module 7" ] # [ inline ( always ) ] pub fn wume7 ( & mut self ) -> WUME7_W { WUME7_W { w : self } } } } # [ doc = "LLWU Pin Flag 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pf1](pf1) module" ] pub type PF1 = crate :: Reg < u8 , _PF1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PF1 ; # [ doc = "`read()` method returns [pf1::R](pf1::R) reader structure" ] impl crate :: Readable for PF1 { } # [ doc = "`write(|w| ..)` method takes [pf1::W](pf1::W) writer structure" ] impl crate :: Writable for PF1 { } # [ doc = "LLWU Pin Flag 1 register" ] pub mod pf1 { # [ doc = "Reader of register PF1" ] pub type R = crate :: R < u8 , super :: PF1 > ; # [ doc = "Writer for register PF1" ] pub type W = crate :: W < u8 , super :: PF1 > ; # [ doc = "Register PF1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PF1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Flag For LLWU_P0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF0_A { # [ doc = "0: LLWU_P0 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P0 input was a wakeup source" ] _1 } impl From < WUF0_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF0_A ) -> Self { match variant { WUF0_A :: _0 => false , WUF0_A :: _1 => true } } } # [ doc = "Reader of field `WUF0`" ] pub type WUF0_R = crate :: R < bool , WUF0_A > ; impl WUF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF0_A { match self . bits { false => WUF0_A :: _0 , true => WUF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF0_A :: _1 } } # [ doc = "Write proxy for field `WUF0`" ] pub struct WUF0_W < 'a > { w : & 'a mut W , } impl < 'a > WUF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P0 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF0_A :: _0 ) } # [ doc = "LLWU_P0 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF0_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF1_A { # [ doc = "0: LLWU_P1 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P1 input was a wakeup source" ] _1 } impl From < WUF1_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF1_A ) -> Self { match variant { WUF1_A :: _0 => false , WUF1_A :: _1 => true } } } # [ doc = "Reader of field `WUF1`" ] pub type WUF1_R = crate :: R < bool , WUF1_A > ; impl WUF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF1_A { match self . bits { false => WUF1_A :: _0 , true => WUF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF1_A :: _1 } } # [ doc = "Write proxy for field `WUF1`" ] pub struct WUF1_W < 'a > { w : & 'a mut W , } impl < 'a > WUF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P1 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF1_A :: _0 ) } # [ doc = "LLWU_P1 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF1_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF2_A { # [ doc = "0: LLWU_P2 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P2 input was a wakeup source" ] _1 } impl From < WUF2_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF2_A ) -> Self { match variant { WUF2_A :: _0 => false , WUF2_A :: _1 => true } } } # [ doc = "Reader of field `WUF2`" ] pub type WUF2_R = crate :: R < bool , WUF2_A > ; impl WUF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF2_A { match self . bits { false => WUF2_A :: _0 , true => WUF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF2_A :: _1 } } # [ doc = "Write proxy for field `WUF2`" ] pub struct WUF2_W < 'a > { w : & 'a mut W , } impl < 'a > WUF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P2 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF2_A :: _0 ) } # [ doc = "LLWU_P2 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF2_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF3_A { # [ doc = "0: LLWU_P3 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P3 input was a wakeup source" ] _1 } impl From < WUF3_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF3_A ) -> Self { match variant { WUF3_A :: _0 => false , WUF3_A :: _1 => true } } } # [ doc = "Reader of field `WUF3`" ] pub type WUF3_R = crate :: R < bool , WUF3_A > ; impl WUF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF3_A { match self . bits { false => WUF3_A :: _0 , true => WUF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF3_A :: _1 } } # [ doc = "Write proxy for field `WUF3`" ] pub struct WUF3_W < 'a > { w : & 'a mut W , } impl < 'a > WUF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P3 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF3_A :: _0 ) } # [ doc = "LLWU_P3 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF4_A { # [ doc = "0: LLWU_P4 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P4 input was a wakeup source" ] _1 } impl From < WUF4_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF4_A ) -> Self { match variant { WUF4_A :: _0 => false , WUF4_A :: _1 => true } } } # [ doc = "Reader of field `WUF4`" ] pub type WUF4_R = crate :: R < bool , WUF4_A > ; impl WUF4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF4_A { match self . bits { false => WUF4_A :: _0 , true => WUF4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF4_A :: _1 } } # [ doc = "Write proxy for field `WUF4`" ] pub struct WUF4_W < 'a > { w : & 'a mut W , } impl < 'a > WUF4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P4 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF4_A :: _0 ) } # [ doc = "LLWU_P4 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF5_A { # [ doc = "0: LLWU_P5 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P5 input was a wakeup source" ] _1 } impl From < WUF5_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF5_A ) -> Self { match variant { WUF5_A :: _0 => false , WUF5_A :: _1 => true } } } # [ doc = "Reader of field `WUF5`" ] pub type WUF5_R = crate :: R < bool , WUF5_A > ; impl WUF5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF5_A { match self . bits { false => WUF5_A :: _0 , true => WUF5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF5_A :: _1 } } # [ doc = "Write proxy for field `WUF5`" ] pub struct WUF5_W < 'a > { w : & 'a mut W , } impl < 'a > WUF5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P5 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF5_A :: _0 ) } # [ doc = "LLWU_P5 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF5_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF6_A { # [ doc = "0: LLWU_P6 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P6 input was a wakeup source" ] _1 } impl From < WUF6_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF6_A ) -> Self { match variant { WUF6_A :: _0 => false , WUF6_A :: _1 => true } } } # [ doc = "Reader of field `WUF6`" ] pub type WUF6_R = crate :: R < bool , WUF6_A > ; impl WUF6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF6_A { match self . bits { false => WUF6_A :: _0 , true => WUF6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF6_A :: _1 } } # [ doc = "Write proxy for field `WUF6`" ] pub struct WUF6_W < 'a > { w : & 'a mut W , } impl < 'a > WUF6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P6 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF6_A :: _0 ) } # [ doc = "LLWU_P6 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF6_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF7_A { # [ doc = "0: LLWU_P7 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P7 input was a wakeup source" ] _1 } impl From < WUF7_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF7_A ) -> Self { match variant { WUF7_A :: _0 => false , WUF7_A :: _1 => true } } } # [ doc = "Reader of field `WUF7`" ] pub type WUF7_R = crate :: R < bool , WUF7_A > ; impl WUF7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF7_A { match self . bits { false => WUF7_A :: _0 , true => WUF7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF7_A :: _1 } } # [ doc = "Write proxy for field `WUF7`" ] pub struct WUF7_W < 'a > { w : & 'a mut W , } impl < 'a > WUF7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P7 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF7_A :: _0 ) } # [ doc = "LLWU_P7 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF7_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Wakeup Flag For LLWU_P0" ] # [ inline ( always ) ] pub fn wuf0 ( & self ) -> WUF0_R { WUF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Flag For LLWU_P1" ] # [ inline ( always ) ] pub fn wuf1 ( & self ) -> WUF1_R { WUF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Wakeup Flag For LLWU_P2" ] # [ inline ( always ) ] pub fn wuf2 ( & self ) -> WUF2_R { WUF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Wakeup Flag For LLWU_P3" ] # [ inline ( always ) ] pub fn wuf3 ( & self ) -> WUF3_R { WUF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Wakeup Flag For LLWU_P4" ] # [ inline ( always ) ] pub fn wuf4 ( & self ) -> WUF4_R { WUF4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Wakeup Flag For LLWU_P5" ] # [ inline ( always ) ] pub fn wuf5 ( & self ) -> WUF5_R { WUF5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Wakeup Flag For LLWU_P6" ] # [ inline ( always ) ] pub fn wuf6 ( & self ) -> WUF6_R { WUF6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wakeup Flag For LLWU_P7" ] # [ inline ( always ) ] pub fn wuf7 ( & self ) -> WUF7_R { WUF7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Wakeup Flag For LLWU_P0" ] # [ inline ( always ) ] pub fn wuf0 ( & mut self ) -> WUF0_W { WUF0_W { w : self } } # [ doc = "Bit 1 - Wakeup Flag For LLWU_P1" ] # [ inline ( always ) ] pub fn wuf1 ( & mut self ) -> WUF1_W { WUF1_W { w : self } } # [ doc = "Bit 2 - Wakeup Flag For LLWU_P2" ] # [ inline ( always ) ] pub fn wuf2 ( & mut self ) -> WUF2_W { WUF2_W { w : self } } # [ doc = "Bit 3 - Wakeup Flag For LLWU_P3" ] # [ inline ( always ) ] pub fn wuf3 ( & mut self ) -> WUF3_W { WUF3_W { w : self } } # [ doc = "Bit 4 - Wakeup Flag For LLWU_P4" ] # [ inline ( always ) ] pub fn wuf4 ( & mut self ) -> WUF4_W { WUF4_W { w : self } } # [ doc = "Bit 5 - Wakeup Flag For LLWU_P5" ] # [ inline ( always ) ] pub fn wuf5 ( & mut self ) -> WUF5_W { WUF5_W { w : self } } # [ doc = "Bit 6 - Wakeup Flag For LLWU_P6" ] # [ inline ( always ) ] pub fn wuf6 ( & mut self ) -> WUF6_W { WUF6_W { w : self } } # [ doc = "Bit 7 - Wakeup Flag For LLWU_P7" ] # [ inline ( always ) ] pub fn wuf7 ( & mut self ) -> WUF7_W { WUF7_W { w : self } } } } # [ doc = "LLWU Pin Flag 2 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pf2](pf2) module" ] pub type PF2 = crate :: Reg < u8 , _PF2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PF2 ; # [ doc = "`read()` method returns [pf2::R](pf2::R) reader structure" ] impl crate :: Readable for PF2 { } # [ doc = "`write(|w| ..)` method takes [pf2::W](pf2::W) writer structure" ] impl crate :: Writable for PF2 { } # [ doc = "LLWU Pin Flag 2 register" ] pub mod pf2 { # [ doc = "Reader of register PF2" ] pub type R = crate :: R < u8 , super :: PF2 > ; # [ doc = "Writer for register PF2" ] pub type W = crate :: W < u8 , super :: PF2 > ; # [ doc = "Register PF2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PF2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Flag For LLWU_P8\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF8_A { # [ doc = "0: LLWU_P8 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P8 input was a wakeup source" ] _1 } impl From < WUF8_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF8_A ) -> Self { match variant { WUF8_A :: _0 => false , WUF8_A :: _1 => true } } } # [ doc = "Reader of field `WUF8`" ] pub type WUF8_R = crate :: R < bool , WUF8_A > ; impl WUF8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF8_A { match self . bits { false => WUF8_A :: _0 , true => WUF8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF8_A :: _1 } } # [ doc = "Write proxy for field `WUF8`" ] pub struct WUF8_W < 'a > { w : & 'a mut W , } impl < 'a > WUF8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P8 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF8_A :: _0 ) } # [ doc = "LLWU_P8 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF8_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P9\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF9_A { # [ doc = "0: LLWU_P9 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P9 input was a wakeup source" ] _1 } impl From < WUF9_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF9_A ) -> Self { match variant { WUF9_A :: _0 => false , WUF9_A :: _1 => true } } } # [ doc = "Reader of field `WUF9`" ] pub type WUF9_R = crate :: R < bool , WUF9_A > ; impl WUF9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF9_A { match self . bits { false => WUF9_A :: _0 , true => WUF9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF9_A :: _1 } } # [ doc = "Write proxy for field `WUF9`" ] pub struct WUF9_W < 'a > { w : & 'a mut W , } impl < 'a > WUF9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P9 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF9_A :: _0 ) } # [ doc = "LLWU_P9 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF9_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P10\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF10_A { # [ doc = "0: LLWU_P10 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P10 input was a wakeup source" ] _1 } impl From < WUF10_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF10_A ) -> Self { match variant { WUF10_A :: _0 => false , WUF10_A :: _1 => true } } } # [ doc = "Reader of field `WUF10`" ] pub type WUF10_R = crate :: R < bool , WUF10_A > ; impl WUF10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF10_A { match self . bits { false => WUF10_A :: _0 , true => WUF10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF10_A :: _1 } } # [ doc = "Write proxy for field `WUF10`" ] pub struct WUF10_W < 'a > { w : & 'a mut W , } impl < 'a > WUF10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P10 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF10_A :: _0 ) } # [ doc = "LLWU_P10 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF10_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P11\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF11_A { # [ doc = "0: LLWU_P11 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P11 input was a wakeup source" ] _1 } impl From < WUF11_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF11_A ) -> Self { match variant { WUF11_A :: _0 => false , WUF11_A :: _1 => true } } } # [ doc = "Reader of field `WUF11`" ] pub type WUF11_R = crate :: R < bool , WUF11_A > ; impl WUF11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF11_A { match self . bits { false => WUF11_A :: _0 , true => WUF11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF11_A :: _1 } } # [ doc = "Write proxy for field `WUF11`" ] pub struct WUF11_W < 'a > { w : & 'a mut W , } impl < 'a > WUF11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P11 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF11_A :: _0 ) } # [ doc = "LLWU_P11 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF11_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P12\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF12_A { # [ doc = "0: LLWU_P12 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P12 input was a wakeup source" ] _1 } impl From < WUF12_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF12_A ) -> Self { match variant { WUF12_A :: _0 => false , WUF12_A :: _1 => true } } } # [ doc = "Reader of field `WUF12`" ] pub type WUF12_R = crate :: R < bool , WUF12_A > ; impl WUF12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF12_A { match self . bits { false => WUF12_A :: _0 , true => WUF12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF12_A :: _1 } } # [ doc = "Write proxy for field `WUF12`" ] pub struct WUF12_W < 'a > { w : & 'a mut W , } impl < 'a > WUF12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P12 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF12_A :: _0 ) } # [ doc = "LLWU_P12 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF12_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P13\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF13_A { # [ doc = "0: LLWU_P13 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P13 input was a wakeup source" ] _1 } impl From < WUF13_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF13_A ) -> Self { match variant { WUF13_A :: _0 => false , WUF13_A :: _1 => true } } } # [ doc = "Reader of field `WUF13`" ] pub type WUF13_R = crate :: R < bool , WUF13_A > ; impl WUF13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF13_A { match self . bits { false => WUF13_A :: _0 , true => WUF13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF13_A :: _1 } } # [ doc = "Write proxy for field `WUF13`" ] pub struct WUF13_W < 'a > { w : & 'a mut W , } impl < 'a > WUF13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P13 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF13_A :: _0 ) } # [ doc = "LLWU_P13 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF13_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P14\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF14_A { # [ doc = "0: LLWU_P14 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P14 input was a wakeup source" ] _1 } impl From < WUF14_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF14_A ) -> Self { match variant { WUF14_A :: _0 => false , WUF14_A :: _1 => true } } } # [ doc = "Reader of field `WUF14`" ] pub type WUF14_R = crate :: R < bool , WUF14_A > ; impl WUF14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF14_A { match self . bits { false => WUF14_A :: _0 , true => WUF14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF14_A :: _1 } } # [ doc = "Write proxy for field `WUF14`" ] pub struct WUF14_W < 'a > { w : & 'a mut W , } impl < 'a > WUF14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P14 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF14_A :: _0 ) } # [ doc = "LLWU_P14 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF14_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P15\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF15_A { # [ doc = "0: LLWU_P15 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P15 input was a wakeup source" ] _1 } impl From < WUF15_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF15_A ) -> Self { match variant { WUF15_A :: _0 => false , WUF15_A :: _1 => true } } } # [ doc = "Reader of field `WUF15`" ] pub type WUF15_R = crate :: R < bool , WUF15_A > ; impl WUF15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF15_A { match self . bits { false => WUF15_A :: _0 , true => WUF15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF15_A :: _1 } } # [ doc = "Write proxy for field `WUF15`" ] pub struct WUF15_W < 'a > { w : & 'a mut W , } impl < 'a > WUF15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P15 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF15_A :: _0 ) } # [ doc = "LLWU_P15 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF15_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Wakeup Flag For LLWU_P8" ] # [ inline ( always ) ] pub fn wuf8 ( & self ) -> WUF8_R { WUF8_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Flag For LLWU_P9" ] # [ inline ( always ) ] pub fn wuf9 ( & self ) -> WUF9_R { WUF9_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Wakeup Flag For LLWU_P10" ] # [ inline ( always ) ] pub fn wuf10 ( & self ) -> WUF10_R { WUF10_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Wakeup Flag For LLWU_P11" ] # [ inline ( always ) ] pub fn wuf11 ( & self ) -> WUF11_R { WUF11_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Wakeup Flag For LLWU_P12" ] # [ inline ( always ) ] pub fn wuf12 ( & self ) -> WUF12_R { WUF12_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Wakeup Flag For LLWU_P13" ] # [ inline ( always ) ] pub fn wuf13 ( & self ) -> WUF13_R { WUF13_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Wakeup Flag For LLWU_P14" ] # [ inline ( always ) ] pub fn wuf14 ( & self ) -> WUF14_R { WUF14_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wakeup Flag For LLWU_P15" ] # [ inline ( always ) ] pub fn wuf15 ( & self ) -> WUF15_R { WUF15_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Wakeup Flag For LLWU_P8" ] # [ inline ( always ) ] pub fn wuf8 ( & mut self ) -> WUF8_W { WUF8_W { w : self } } # [ doc = "Bit 1 - Wakeup Flag For LLWU_P9" ] # [ inline ( always ) ] pub fn wuf9 ( & mut self ) -> WUF9_W { WUF9_W { w : self } } # [ doc = "Bit 2 - Wakeup Flag For LLWU_P10" ] # [ inline ( always ) ] pub fn wuf10 ( & mut self ) -> WUF10_W { WUF10_W { w : self } } # [ doc = "Bit 3 - Wakeup Flag For LLWU_P11" ] # [ inline ( always ) ] pub fn wuf11 ( & mut self ) -> WUF11_W { WUF11_W { w : self } } # [ doc = "Bit 4 - Wakeup Flag For LLWU_P12" ] # [ inline ( always ) ] pub fn wuf12 ( & mut self ) -> WUF12_W { WUF12_W { w : self } } # [ doc = "Bit 5 - Wakeup Flag For LLWU_P13" ] # [ inline ( always ) ] pub fn wuf13 ( & mut self ) -> WUF13_W { WUF13_W { w : self } } # [ doc = "Bit 6 - Wakeup Flag For LLWU_P14" ] # [ inline ( always ) ] pub fn wuf14 ( & mut self ) -> WUF14_W { WUF14_W { w : self } } # [ doc = "Bit 7 - Wakeup Flag For LLWU_P15" ] # [ inline ( always ) ] pub fn wuf15 ( & mut self ) -> WUF15_W { WUF15_W { w : self } } } } # [ doc = "LLWU Pin Flag 3 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pf3](pf3) module" ] pub type PF3 = crate :: Reg < u8 , _PF3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PF3 ; # [ doc = "`read()` method returns [pf3::R](pf3::R) reader structure" ] impl crate :: Readable for PF3 { } # [ doc = "`write(|w| ..)` method takes [pf3::W](pf3::W) writer structure" ] impl crate :: Writable for PF3 { } # [ doc = "LLWU Pin Flag 3 register" ] pub mod pf3 { # [ doc = "Reader of register PF3" ] pub type R = crate :: R < u8 , super :: PF3 > ; # [ doc = "Writer for register PF3" ] pub type W = crate :: W < u8 , super :: PF3 > ; # [ doc = "Register PF3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PF3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Flag For LLWU_P16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF16_A { # [ doc = "0: LLWU_P16 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P16 input was a wakeup source" ] _1 } impl From < WUF16_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF16_A ) -> Self { match variant { WUF16_A :: _0 => false , WUF16_A :: _1 => true } } } # [ doc = "Reader of field `WUF16`" ] pub type WUF16_R = crate :: R < bool , WUF16_A > ; impl WUF16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF16_A { match self . bits { false => WUF16_A :: _0 , true => WUF16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF16_A :: _1 } } # [ doc = "Write proxy for field `WUF16`" ] pub struct WUF16_W < 'a > { w : & 'a mut W , } impl < 'a > WUF16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P16 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF16_A :: _0 ) } # [ doc = "LLWU_P16 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF16_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P17\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF17_A { # [ doc = "0: LLWU_P17 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P17 input was a wakeup source" ] _1 } impl From < WUF17_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF17_A ) -> Self { match variant { WUF17_A :: _0 => false , WUF17_A :: _1 => true } } } # [ doc = "Reader of field `WUF17`" ] pub type WUF17_R = crate :: R < bool , WUF17_A > ; impl WUF17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF17_A { match self . bits { false => WUF17_A :: _0 , true => WUF17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF17_A :: _1 } } # [ doc = "Write proxy for field `WUF17`" ] pub struct WUF17_W < 'a > { w : & 'a mut W , } impl < 'a > WUF17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P17 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF17_A :: _0 ) } # [ doc = "LLWU_P17 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF17_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P18\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF18_A { # [ doc = "0: LLWU_P18 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P18 input was a wakeup source" ] _1 } impl From < WUF18_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF18_A ) -> Self { match variant { WUF18_A :: _0 => false , WUF18_A :: _1 => true } } } # [ doc = "Reader of field `WUF18`" ] pub type WUF18_R = crate :: R < bool , WUF18_A > ; impl WUF18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF18_A { match self . bits { false => WUF18_A :: _0 , true => WUF18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF18_A :: _1 } } # [ doc = "Write proxy for field `WUF18`" ] pub struct WUF18_W < 'a > { w : & 'a mut W , } impl < 'a > WUF18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P18 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF18_A :: _0 ) } # [ doc = "LLWU_P18 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF18_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P19\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF19_A { # [ doc = "0: LLWU_P19 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P19 input was a wakeup source" ] _1 } impl From < WUF19_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF19_A ) -> Self { match variant { WUF19_A :: _0 => false , WUF19_A :: _1 => true } } } # [ doc = "Reader of field `WUF19`" ] pub type WUF19_R = crate :: R < bool , WUF19_A > ; impl WUF19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF19_A { match self . bits { false => WUF19_A :: _0 , true => WUF19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF19_A :: _1 } } # [ doc = "Write proxy for field `WUF19`" ] pub struct WUF19_W < 'a > { w : & 'a mut W , } impl < 'a > WUF19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P19 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF19_A :: _0 ) } # [ doc = "LLWU_P19 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF19_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P20\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF20_A { # [ doc = "0: LLWU_P20 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P20 input was a wakeup source" ] _1 } impl From < WUF20_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF20_A ) -> Self { match variant { WUF20_A :: _0 => false , WUF20_A :: _1 => true } } } # [ doc = "Reader of field `WUF20`" ] pub type WUF20_R = crate :: R < bool , WUF20_A > ; impl WUF20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF20_A { match self . bits { false => WUF20_A :: _0 , true => WUF20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF20_A :: _1 } } # [ doc = "Write proxy for field `WUF20`" ] pub struct WUF20_W < 'a > { w : & 'a mut W , } impl < 'a > WUF20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P20 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF20_A :: _0 ) } # [ doc = "LLWU_P20 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF20_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P21\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF21_A { # [ doc = "0: LLWU_P21 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P21 input was a wakeup source" ] _1 } impl From < WUF21_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF21_A ) -> Self { match variant { WUF21_A :: _0 => false , WUF21_A :: _1 => true } } } # [ doc = "Reader of field `WUF21`" ] pub type WUF21_R = crate :: R < bool , WUF21_A > ; impl WUF21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF21_A { match self . bits { false => WUF21_A :: _0 , true => WUF21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF21_A :: _1 } } # [ doc = "Write proxy for field `WUF21`" ] pub struct WUF21_W < 'a > { w : & 'a mut W , } impl < 'a > WUF21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P21 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF21_A :: _0 ) } # [ doc = "LLWU_P21 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF21_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P22\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF22_A { # [ doc = "0: LLWU_P22 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P22 input was a wakeup source" ] _1 } impl From < WUF22_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF22_A ) -> Self { match variant { WUF22_A :: _0 => false , WUF22_A :: _1 => true } } } # [ doc = "Reader of field `WUF22`" ] pub type WUF22_R = crate :: R < bool , WUF22_A > ; impl WUF22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF22_A { match self . bits { false => WUF22_A :: _0 , true => WUF22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF22_A :: _1 } } # [ doc = "Write proxy for field `WUF22`" ] pub struct WUF22_W < 'a > { w : & 'a mut W , } impl < 'a > WUF22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P22 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF22_A :: _0 ) } # [ doc = "LLWU_P22 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF22_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P23\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF23_A { # [ doc = "0: LLWU_P23 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P23 input was a wakeup source" ] _1 } impl From < WUF23_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF23_A ) -> Self { match variant { WUF23_A :: _0 => false , WUF23_A :: _1 => true } } } # [ doc = "Reader of field `WUF23`" ] pub type WUF23_R = crate :: R < bool , WUF23_A > ; impl WUF23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF23_A { match self . bits { false => WUF23_A :: _0 , true => WUF23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF23_A :: _1 } } # [ doc = "Write proxy for field `WUF23`" ] pub struct WUF23_W < 'a > { w : & 'a mut W , } impl < 'a > WUF23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P23 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF23_A :: _0 ) } # [ doc = "LLWU_P23 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF23_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Wakeup Flag For LLWU_P16" ] # [ inline ( always ) ] pub fn wuf16 ( & self ) -> WUF16_R { WUF16_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Flag For LLWU_P17" ] # [ inline ( always ) ] pub fn wuf17 ( & self ) -> WUF17_R { WUF17_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Wakeup Flag For LLWU_P18" ] # [ inline ( always ) ] pub fn wuf18 ( & self ) -> WUF18_R { WUF18_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Wakeup Flag For LLWU_P19" ] # [ inline ( always ) ] pub fn wuf19 ( & self ) -> WUF19_R { WUF19_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Wakeup Flag For LLWU_P20" ] # [ inline ( always ) ] pub fn wuf20 ( & self ) -> WUF20_R { WUF20_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Wakeup Flag For LLWU_P21" ] # [ inline ( always ) ] pub fn wuf21 ( & self ) -> WUF21_R { WUF21_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Wakeup Flag For LLWU_P22" ] # [ inline ( always ) ] pub fn wuf22 ( & self ) -> WUF22_R { WUF22_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wakeup Flag For LLWU_P23" ] # [ inline ( always ) ] pub fn wuf23 ( & self ) -> WUF23_R { WUF23_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Wakeup Flag For LLWU_P16" ] # [ inline ( always ) ] pub fn wuf16 ( & mut self ) -> WUF16_W { WUF16_W { w : self } } # [ doc = "Bit 1 - Wakeup Flag For LLWU_P17" ] # [ inline ( always ) ] pub fn wuf17 ( & mut self ) -> WUF17_W { WUF17_W { w : self } } # [ doc = "Bit 2 - Wakeup Flag For LLWU_P18" ] # [ inline ( always ) ] pub fn wuf18 ( & mut self ) -> WUF18_W { WUF18_W { w : self } } # [ doc = "Bit 3 - Wakeup Flag For LLWU_P19" ] # [ inline ( always ) ] pub fn wuf19 ( & mut self ) -> WUF19_W { WUF19_W { w : self } } # [ doc = "Bit 4 - Wakeup Flag For LLWU_P20" ] # [ inline ( always ) ] pub fn wuf20 ( & mut self ) -> WUF20_W { WUF20_W { w : self } } # [ doc = "Bit 5 - Wakeup Flag For LLWU_P21" ] # [ inline ( always ) ] pub fn wuf21 ( & mut self ) -> WUF21_W { WUF21_W { w : self } } # [ doc = "Bit 6 - Wakeup Flag For LLWU_P22" ] # [ inline ( always ) ] pub fn wuf22 ( & mut self ) -> WUF22_W { WUF22_W { w : self } } # [ doc = "Bit 7 - Wakeup Flag For LLWU_P23" ] # [ inline ( always ) ] pub fn wuf23 ( & mut self ) -> WUF23_W { WUF23_W { w : self } } } } # [ doc = "LLWU Pin Flag 4 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pf4](pf4) module" ] pub type PF4 = crate :: Reg < u8 , _PF4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PF4 ; # [ doc = "`read()` method returns [pf4::R](pf4::R) reader structure" ] impl crate :: Readable for PF4 { } # [ doc = "`write(|w| ..)` method takes [pf4::W](pf4::W) writer structure" ] impl crate :: Writable for PF4 { } # [ doc = "LLWU Pin Flag 4 register" ] pub mod pf4 { # [ doc = "Reader of register PF4" ] pub type R = crate :: R < u8 , super :: PF4 > ; # [ doc = "Writer for register PF4" ] pub type W = crate :: W < u8 , super :: PF4 > ; # [ doc = "Register PF4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PF4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Flag For LLWU_P24\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF24_A { # [ doc = "0: LLWU_P24 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P24 input was a wakeup source" ] _1 } impl From < WUF24_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF24_A ) -> Self { match variant { WUF24_A :: _0 => false , WUF24_A :: _1 => true } } } # [ doc = "Reader of field `WUF24`" ] pub type WUF24_R = crate :: R < bool , WUF24_A > ; impl WUF24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF24_A { match self . bits { false => WUF24_A :: _0 , true => WUF24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF24_A :: _1 } } # [ doc = "Write proxy for field `WUF24`" ] pub struct WUF24_W < 'a > { w : & 'a mut W , } impl < 'a > WUF24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P24 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF24_A :: _0 ) } # [ doc = "LLWU_P24 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF24_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P25\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF25_A { # [ doc = "0: LLWU_P25 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P25 input was a wakeup source" ] _1 } impl From < WUF25_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF25_A ) -> Self { match variant { WUF25_A :: _0 => false , WUF25_A :: _1 => true } } } # [ doc = "Reader of field `WUF25`" ] pub type WUF25_R = crate :: R < bool , WUF25_A > ; impl WUF25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF25_A { match self . bits { false => WUF25_A :: _0 , true => WUF25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF25_A :: _1 } } # [ doc = "Write proxy for field `WUF25`" ] pub struct WUF25_W < 'a > { w : & 'a mut W , } impl < 'a > WUF25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P25 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF25_A :: _0 ) } # [ doc = "LLWU_P25 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF25_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P26\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF26_A { # [ doc = "0: LLWU_P26 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P26 input was a wakeup source" ] _1 } impl From < WUF26_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF26_A ) -> Self { match variant { WUF26_A :: _0 => false , WUF26_A :: _1 => true } } } # [ doc = "Reader of field `WUF26`" ] pub type WUF26_R = crate :: R < bool , WUF26_A > ; impl WUF26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF26_A { match self . bits { false => WUF26_A :: _0 , true => WUF26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF26_A :: _1 } } # [ doc = "Write proxy for field `WUF26`" ] pub struct WUF26_W < 'a > { w : & 'a mut W , } impl < 'a > WUF26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P26 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF26_A :: _0 ) } # [ doc = "LLWU_P26 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF26_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P27\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF27_A { # [ doc = "0: LLWU_P27 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P27 input was a wakeup source" ] _1 } impl From < WUF27_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF27_A ) -> Self { match variant { WUF27_A :: _0 => false , WUF27_A :: _1 => true } } } # [ doc = "Reader of field `WUF27`" ] pub type WUF27_R = crate :: R < bool , WUF27_A > ; impl WUF27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF27_A { match self . bits { false => WUF27_A :: _0 , true => WUF27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF27_A :: _1 } } # [ doc = "Write proxy for field `WUF27`" ] pub struct WUF27_W < 'a > { w : & 'a mut W , } impl < 'a > WUF27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P27 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF27_A :: _0 ) } # [ doc = "LLWU_P27 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF27_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P28\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF28_A { # [ doc = "0: LLWU_P28 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P28 input was a wakeup source" ] _1 } impl From < WUF28_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF28_A ) -> Self { match variant { WUF28_A :: _0 => false , WUF28_A :: _1 => true } } } # [ doc = "Reader of field `WUF28`" ] pub type WUF28_R = crate :: R < bool , WUF28_A > ; impl WUF28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF28_A { match self . bits { false => WUF28_A :: _0 , true => WUF28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF28_A :: _1 } } # [ doc = "Write proxy for field `WUF28`" ] pub struct WUF28_W < 'a > { w : & 'a mut W , } impl < 'a > WUF28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P28 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF28_A :: _0 ) } # [ doc = "LLWU_P28 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF28_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P29\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF29_A { # [ doc = "0: LLWU_P29 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P29 input was a wakeup source" ] _1 } impl From < WUF29_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF29_A ) -> Self { match variant { WUF29_A :: _0 => false , WUF29_A :: _1 => true } } } # [ doc = "Reader of field `WUF29`" ] pub type WUF29_R = crate :: R < bool , WUF29_A > ; impl WUF29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF29_A { match self . bits { false => WUF29_A :: _0 , true => WUF29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF29_A :: _1 } } # [ doc = "Write proxy for field `WUF29`" ] pub struct WUF29_W < 'a > { w : & 'a mut W , } impl < 'a > WUF29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P29 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF29_A :: _0 ) } # [ doc = "LLWU_P29 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF29_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P30\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF30_A { # [ doc = "0: LLWU_P30 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P30 input was a wakeup source" ] _1 } impl From < WUF30_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF30_A ) -> Self { match variant { WUF30_A :: _0 => false , WUF30_A :: _1 => true } } } # [ doc = "Reader of field `WUF30`" ] pub type WUF30_R = crate :: R < bool , WUF30_A > ; impl WUF30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF30_A { match self . bits { false => WUF30_A :: _0 , true => WUF30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF30_A :: _1 } } # [ doc = "Write proxy for field `WUF30`" ] pub struct WUF30_W < 'a > { w : & 'a mut W , } impl < 'a > WUF30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P30 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF30_A :: _0 ) } # [ doc = "LLWU_P30 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF30_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Wakeup Flag For LLWU_P31\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WUF31_A { # [ doc = "0: LLWU_P31 input was not a wakeup source" ] _0 , # [ doc = "1: LLWU_P31 input was a wakeup source" ] _1 } impl From < WUF31_A > for bool { # [ inline ( always ) ] fn from ( variant : WUF31_A ) -> Self { match variant { WUF31_A :: _0 => false , WUF31_A :: _1 => true } } } # [ doc = "Reader of field `WUF31`" ] pub type WUF31_R = crate :: R < bool , WUF31_A > ; impl WUF31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WUF31_A { match self . bits { false => WUF31_A :: _0 , true => WUF31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WUF31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WUF31_A :: _1 } } # [ doc = "Write proxy for field `WUF31`" ] pub struct WUF31_W < 'a > { w : & 'a mut W , } impl < 'a > WUF31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WUF31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LLWU_P31 input was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WUF31_A :: _0 ) } # [ doc = "LLWU_P31 input was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WUF31_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Wakeup Flag For LLWU_P24" ] # [ inline ( always ) ] pub fn wuf24 ( & self ) -> WUF24_R { WUF24_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup Flag For LLWU_P25" ] # [ inline ( always ) ] pub fn wuf25 ( & self ) -> WUF25_R { WUF25_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Wakeup Flag For LLWU_P26" ] # [ inline ( always ) ] pub fn wuf26 ( & self ) -> WUF26_R { WUF26_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Wakeup Flag For LLWU_P27" ] # [ inline ( always ) ] pub fn wuf27 ( & self ) -> WUF27_R { WUF27_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Wakeup Flag For LLWU_P28" ] # [ inline ( always ) ] pub fn wuf28 ( & self ) -> WUF28_R { WUF28_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Wakeup Flag For LLWU_P29" ] # [ inline ( always ) ] pub fn wuf29 ( & self ) -> WUF29_R { WUF29_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Wakeup Flag For LLWU_P30" ] # [ inline ( always ) ] pub fn wuf30 ( & self ) -> WUF30_R { WUF30_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wakeup Flag For LLWU_P31" ] # [ inline ( always ) ] pub fn wuf31 ( & self ) -> WUF31_R { WUF31_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Wakeup Flag For LLWU_P24" ] # [ inline ( always ) ] pub fn wuf24 ( & mut self ) -> WUF24_W { WUF24_W { w : self } } # [ doc = "Bit 1 - Wakeup Flag For LLWU_P25" ] # [ inline ( always ) ] pub fn wuf25 ( & mut self ) -> WUF25_W { WUF25_W { w : self } } # [ doc = "Bit 2 - Wakeup Flag For LLWU_P26" ] # [ inline ( always ) ] pub fn wuf26 ( & mut self ) -> WUF26_W { WUF26_W { w : self } } # [ doc = "Bit 3 - Wakeup Flag For LLWU_P27" ] # [ inline ( always ) ] pub fn wuf27 ( & mut self ) -> WUF27_W { WUF27_W { w : self } } # [ doc = "Bit 4 - Wakeup Flag For LLWU_P28" ] # [ inline ( always ) ] pub fn wuf28 ( & mut self ) -> WUF28_W { WUF28_W { w : self } } # [ doc = "Bit 5 - Wakeup Flag For LLWU_P29" ] # [ inline ( always ) ] pub fn wuf29 ( & mut self ) -> WUF29_W { WUF29_W { w : self } } # [ doc = "Bit 6 - Wakeup Flag For LLWU_P30" ] # [ inline ( always ) ] pub fn wuf30 ( & mut self ) -> WUF30_W { WUF30_W { w : self } } # [ doc = "Bit 7 - Wakeup Flag For LLWU_P31" ] # [ inline ( always ) ] pub fn wuf31 ( & mut self ) -> WUF31_W { WUF31_W { w : self } } } } # [ doc = "LLWU Module Flag 5 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mf5](mf5) module" ] pub type MF5 = crate :: Reg < u8 , _MF5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MF5 ; # [ doc = "`read()` method returns [mf5::R](mf5::R) reader structure" ] impl crate :: Readable for MF5 { } # [ doc = "LLWU Module Flag 5 register" ] pub mod mf5 { # [ doc = "Reader of register MF5" ] pub type R = crate :: R < u8 , super :: MF5 > ; # [ doc = "Wakeup flag For module 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MWUF0_A { # [ doc = "0: Module 0 input was not a wakeup source" ] _0 , # [ doc = "1: Module 0 input was a wakeup source" ] _1 } impl From < MWUF0_A > for bool { # [ inline ( always ) ] fn from ( variant : MWUF0_A ) -> Self { match variant { MWUF0_A :: _0 => false , MWUF0_A :: _1 => true } } } # [ doc = "Reader of field `MWUF0`" ] pub type MWUF0_R = crate :: R < bool , MWUF0_A > ; impl MWUF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MWUF0_A { match self . bits { false => MWUF0_A :: _0 , true => MWUF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MWUF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MWUF0_A :: _1 } } # [ doc = "Wakeup flag For module 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MWUF1_A { # [ doc = "0: Module 1 input was not a wakeup source" ] _0 , # [ doc = "1: Module 1 input was a wakeup source" ] _1 } impl From < MWUF1_A > for bool { # [ inline ( always ) ] fn from ( variant : MWUF1_A ) -> Self { match variant { MWUF1_A :: _0 => false , MWUF1_A :: _1 => true } } } # [ doc = "Reader of field `MWUF1`" ] pub type MWUF1_R = crate :: R < bool , MWUF1_A > ; impl MWUF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MWUF1_A { match self . bits { false => MWUF1_A :: _0 , true => MWUF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MWUF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MWUF1_A :: _1 } } # [ doc = "Wakeup flag For module 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MWUF2_A { # [ doc = "0: Module 2 input was not a wakeup source" ] _0 , # [ doc = "1: Module 2 input was a wakeup source" ] _1 } impl From < MWUF2_A > for bool { # [ inline ( always ) ] fn from ( variant : MWUF2_A ) -> Self { match variant { MWUF2_A :: _0 => false , MWUF2_A :: _1 => true } } } # [ doc = "Reader of field `MWUF2`" ] pub type MWUF2_R = crate :: R < bool , MWUF2_A > ; impl MWUF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MWUF2_A { match self . bits { false => MWUF2_A :: _0 , true => MWUF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MWUF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MWUF2_A :: _1 } } # [ doc = "Wakeup flag For module 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MWUF3_A { # [ doc = "0: Module 3 input was not a wakeup source" ] _0 , # [ doc = "1: Module 3 input was a wakeup source" ] _1 } impl From < MWUF3_A > for bool { # [ inline ( always ) ] fn from ( variant : MWUF3_A ) -> Self { match variant { MWUF3_A :: _0 => false , MWUF3_A :: _1 => true } } } # [ doc = "Reader of field `MWUF3`" ] pub type MWUF3_R = crate :: R < bool , MWUF3_A > ; impl MWUF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MWUF3_A { match self . bits { false => MWUF3_A :: _0 , true => MWUF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MWUF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MWUF3_A :: _1 } } # [ doc = "Wakeup flag For module 4\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MWUF4_A { # [ doc = "0: Module 4 input was not a wakeup source" ] _0 , # [ doc = "1: Module 4 input was a wakeup source" ] _1 } impl From < MWUF4_A > for bool { # [ inline ( always ) ] fn from ( variant : MWUF4_A ) -> Self { match variant { MWUF4_A :: _0 => false , MWUF4_A :: _1 => true } } } # [ doc = "Reader of field `MWUF4`" ] pub type MWUF4_R = crate :: R < bool , MWUF4_A > ; impl MWUF4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MWUF4_A { match self . bits { false => MWUF4_A :: _0 , true => MWUF4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MWUF4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MWUF4_A :: _1 } } # [ doc = "Wakeup flag For module 5\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MWUF5_A { # [ doc = "0: Module 5 input was not a wakeup source" ] _0 , # [ doc = "1: Module 5 input was a wakeup source" ] _1 } impl From < MWUF5_A > for bool { # [ inline ( always ) ] fn from ( variant : MWUF5_A ) -> Self { match variant { MWUF5_A :: _0 => false , MWUF5_A :: _1 => true } } } # [ doc = "Reader of field `MWUF5`" ] pub type MWUF5_R = crate :: R < bool , MWUF5_A > ; impl MWUF5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MWUF5_A { match self . bits { false => MWUF5_A :: _0 , true => MWUF5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MWUF5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MWUF5_A :: _1 } } # [ doc = "Wakeup flag For module 6\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MWUF6_A { # [ doc = "0: Module 6 input was not a wakeup source" ] _0 , # [ doc = "1: Module 6 input was a wakeup source" ] _1 } impl From < MWUF6_A > for bool { # [ inline ( always ) ] fn from ( variant : MWUF6_A ) -> Self { match variant { MWUF6_A :: _0 => false , MWUF6_A :: _1 => true } } } # [ doc = "Reader of field `MWUF6`" ] pub type MWUF6_R = crate :: R < bool , MWUF6_A > ; impl MWUF6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MWUF6_A { match self . bits { false => MWUF6_A :: _0 , true => MWUF6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MWUF6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MWUF6_A :: _1 } } # [ doc = "Wakeup flag For module 7\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MWUF7_A { # [ doc = "0: Module 7 input was not a wakeup source" ] _0 , # [ doc = "1: Module 7 input was a wakeup source" ] _1 } impl From < MWUF7_A > for bool { # [ inline ( always ) ] fn from ( variant : MWUF7_A ) -> Self { match variant { MWUF7_A :: _0 => false , MWUF7_A :: _1 => true } } } # [ doc = "Reader of field `MWUF7`" ] pub type MWUF7_R = crate :: R < bool , MWUF7_A > ; impl MWUF7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MWUF7_A { match self . bits { false => MWUF7_A :: _0 , true => MWUF7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MWUF7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MWUF7_A :: _1 } } impl R { # [ doc = "Bit 0 - Wakeup flag For module 0" ] # [ inline ( always ) ] pub fn mwuf0 ( & self ) -> MWUF0_R { MWUF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Wakeup flag For module 1" ] # [ inline ( always ) ] pub fn mwuf1 ( & self ) -> MWUF1_R { MWUF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Wakeup flag For module 2" ] # [ inline ( always ) ] pub fn mwuf2 ( & self ) -> MWUF2_R { MWUF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Wakeup flag For module 3" ] # [ inline ( always ) ] pub fn mwuf3 ( & self ) -> MWUF3_R { MWUF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Wakeup flag For module 4" ] # [ inline ( always ) ] pub fn mwuf4 ( & self ) -> MWUF4_R { MWUF4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Wakeup flag For module 5" ] # [ inline ( always ) ] pub fn mwuf5 ( & self ) -> MWUF5_R { MWUF5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Wakeup flag For module 6" ] # [ inline ( always ) ] pub fn mwuf6 ( & self ) -> MWUF6_R { MWUF6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Wakeup flag For module 7" ] # [ inline ( always ) ] pub fn mwuf7 ( & self ) -> MWUF7_R { MWUF7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "LLWU Pin Filter 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filt1](filt1) module" ] pub type FILT1 = crate :: Reg < u8 , _FILT1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILT1 ; # [ doc = "`read()` method returns [filt1::R](filt1::R) reader structure" ] impl crate :: Readable for FILT1 { } # [ doc = "`write(|w| ..)` method takes [filt1::W](filt1::W) writer structure" ] impl crate :: Writable for FILT1 { } # [ doc = "LLWU Pin Filter 1 register" ] pub mod filt1 { # [ doc = "Reader of register FILT1" ] pub type R = crate :: R < u8 , super :: FILT1 > ; # [ doc = "Writer for register FILT1" ] pub type W = crate :: W < u8 , super :: FILT1 > ; # [ doc = "Register FILT1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILT1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Filter Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTSEL_A { # [ doc = "0: Select LLWU_P0 for filter" ] _00000 , # [ doc = "31: Select LLWU_P31 for filter" ] _11111 } impl From < FILTSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTSEL_A ) -> Self { match variant { FILTSEL_A :: _00000 => 0 , FILTSEL_A :: _11111 => 31 } } } # [ doc = "Reader of field `FILTSEL`" ] pub type FILTSEL_R = crate :: R < u8 , FILTSEL_A > ; impl FILTSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FILTSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FILTSEL_A :: _00000 ) , 31 => Val ( FILTSEL_A :: _11111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00000`" ] # [ inline ( always ) ] pub fn is_00000 ( & self ) -> bool { * self == FILTSEL_A :: _00000 } # [ doc = "Checks if the value of the field is `_11111`" ] # [ inline ( always ) ] pub fn is_11111 ( & self ) -> bool { * self == FILTSEL_A :: _11111 } } # [ doc = "Write proxy for field `FILTSEL`" ] pub struct FILTSEL_W < 'a > { w : & 'a mut W , } impl < 'a > FILTSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Select LLWU_P0 for filter" ] # [ inline ( always ) ] pub fn _00000 ( self ) -> & 'a mut W { self . variant ( FILTSEL_A :: _00000 ) } # [ doc = "Select LLWU_P31 for filter" ] # [ inline ( always ) ] pub fn _11111 ( self ) -> & 'a mut W { self . variant ( FILTSEL_A :: _11111 ) } # [ 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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Digital Filter On External Pin\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTE_A { # [ doc = "0: Filter disabled" ] _00 , # [ doc = "1: Filter posedge detect enabled" ] _01 , # [ doc = "2: Filter negedge detect enabled" ] _10 , # [ doc = "3: Filter any edge detect enabled" ] _11 } impl From < FILTE_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTE_A ) -> Self { match variant { FILTE_A :: _00 => 0 , FILTE_A :: _01 => 1 , FILTE_A :: _10 => 2 , FILTE_A :: _11 => 3 } } } # [ doc = "Reader of field `FILTE`" ] pub type FILTE_R = crate :: R < u8 , FILTE_A > ; impl FILTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTE_A { match self . bits { 0 => FILTE_A :: _00 , 1 => FILTE_A :: _01 , 2 => FILTE_A :: _10 , 3 => FILTE_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FILTE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FILTE_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FILTE_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FILTE_A :: _11 } } # [ doc = "Write proxy for field `FILTE`" ] pub struct FILTE_W < 'a > { w : & 'a mut W , } impl < 'a > FILTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Filter disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _00 ) } # [ doc = "Filter posedge detect enabled" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _01 ) } # [ doc = "Filter negedge detect enabled" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _10 ) } # [ doc = "Filter any edge detect enabled" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u8 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Filter Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTF_A { # [ doc = "0: Pin Filter 1 was not a wakeup source" ] _0 , # [ doc = "1: Pin Filter 1 was a wakeup source" ] _1 } impl From < FILTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FILTF_A ) -> Self { match variant { FILTF_A :: _0 => false , FILTF_A :: _1 => true } } } # [ doc = "Reader of field `FILTF`" ] pub type FILTF_R = crate :: R < bool , FILTF_A > ; impl FILTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTF_A { match self . bits { false => FILTF_A :: _0 , true => FILTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FILTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FILTF_A :: _1 } } # [ doc = "Write proxy for field `FILTF`" ] pub struct FILTF_W < 'a > { w : & 'a mut W , } impl < 'a > FILTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Filter 1 was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FILTF_A :: _0 ) } # [ doc = "Pin Filter 1 was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FILTF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Filter Pin Select" ] # [ inline ( always ) ] pub fn filtsel ( & self ) -> FILTSEL_R { FILTSEL_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bits 5:6 - Digital Filter On External Pin" ] # [ inline ( always ) ] pub fn filte ( & self ) -> FILTE_R { FILTE_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Filter Detect Flag" ] # [ inline ( always ) ] pub fn filtf ( & self ) -> FILTF_R { FILTF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Filter Pin Select" ] # [ inline ( always ) ] pub fn filtsel ( & mut self ) -> FILTSEL_W { FILTSEL_W { w : self } } # [ doc = "Bits 5:6 - Digital Filter On External Pin" ] # [ inline ( always ) ] pub fn filte ( & mut self ) -> FILTE_W { FILTE_W { w : self } } # [ doc = "Bit 7 - Filter Detect Flag" ] # [ inline ( always ) ] pub fn filtf ( & mut self ) -> FILTF_W { FILTF_W { w : self } } } } # [ doc = "LLWU Pin Filter 2 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filt2](filt2) module" ] pub type FILT2 = crate :: Reg < u8 , _FILT2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILT2 ; # [ doc = "`read()` method returns [filt2::R](filt2::R) reader structure" ] impl crate :: Readable for FILT2 { } # [ doc = "`write(|w| ..)` method takes [filt2::W](filt2::W) writer structure" ] impl crate :: Writable for FILT2 { } # [ doc = "LLWU Pin Filter 2 register" ] pub mod filt2 { # [ doc = "Reader of register FILT2" ] pub type R = crate :: R < u8 , super :: FILT2 > ; # [ doc = "Writer for register FILT2" ] pub type W = crate :: W < u8 , super :: FILT2 > ; # [ doc = "Register FILT2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILT2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Filter Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTSEL_A { # [ doc = "0: Select LLWU_P0 for filter" ] _00000 , # [ doc = "31: Select LLWU_P31 for filter" ] _11111 } impl From < FILTSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTSEL_A ) -> Self { match variant { FILTSEL_A :: _00000 => 0 , FILTSEL_A :: _11111 => 31 } } } # [ doc = "Reader of field `FILTSEL`" ] pub type FILTSEL_R = crate :: R < u8 , FILTSEL_A > ; impl FILTSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FILTSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FILTSEL_A :: _00000 ) , 31 => Val ( FILTSEL_A :: _11111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00000`" ] # [ inline ( always ) ] pub fn is_00000 ( & self ) -> bool { * self == FILTSEL_A :: _00000 } # [ doc = "Checks if the value of the field is `_11111`" ] # [ inline ( always ) ] pub fn is_11111 ( & self ) -> bool { * self == FILTSEL_A :: _11111 } } # [ doc = "Write proxy for field `FILTSEL`" ] pub struct FILTSEL_W < 'a > { w : & 'a mut W , } impl < 'a > FILTSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Select LLWU_P0 for filter" ] # [ inline ( always ) ] pub fn _00000 ( self ) -> & 'a mut W { self . variant ( FILTSEL_A :: _00000 ) } # [ doc = "Select LLWU_P31 for filter" ] # [ inline ( always ) ] pub fn _11111 ( self ) -> & 'a mut W { self . variant ( FILTSEL_A :: _11111 ) } # [ 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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Digital Filter On External Pin\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTE_A { # [ doc = "0: Filter disabled" ] _00 , # [ doc = "1: Filter posedge detect enabled" ] _01 , # [ doc = "2: Filter negedge detect enabled" ] _10 , # [ doc = "3: Filter any edge detect enabled" ] _11 } impl From < FILTE_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTE_A ) -> Self { match variant { FILTE_A :: _00 => 0 , FILTE_A :: _01 => 1 , FILTE_A :: _10 => 2 , FILTE_A :: _11 => 3 } } } # [ doc = "Reader of field `FILTE`" ] pub type FILTE_R = crate :: R < u8 , FILTE_A > ; impl FILTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTE_A { match self . bits { 0 => FILTE_A :: _00 , 1 => FILTE_A :: _01 , 2 => FILTE_A :: _10 , 3 => FILTE_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FILTE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FILTE_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FILTE_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FILTE_A :: _11 } } # [ doc = "Write proxy for field `FILTE`" ] pub struct FILTE_W < 'a > { w : & 'a mut W , } impl < 'a > FILTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Filter disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _00 ) } # [ doc = "Filter posedge detect enabled" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _01 ) } # [ doc = "Filter negedge detect enabled" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _10 ) } # [ doc = "Filter any edge detect enabled" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u8 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Filter Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTF_A { # [ doc = "0: Pin Filter 2 was not a wakeup source" ] _0 , # [ doc = "1: Pin Filter 2 was a wakeup source" ] _1 } impl From < FILTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FILTF_A ) -> Self { match variant { FILTF_A :: _0 => false , FILTF_A :: _1 => true } } } # [ doc = "Reader of field `FILTF`" ] pub type FILTF_R = crate :: R < bool , FILTF_A > ; impl FILTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTF_A { match self . bits { false => FILTF_A :: _0 , true => FILTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FILTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FILTF_A :: _1 } } # [ doc = "Write proxy for field `FILTF`" ] pub struct FILTF_W < 'a > { w : & 'a mut W , } impl < 'a > FILTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Filter 2 was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FILTF_A :: _0 ) } # [ doc = "Pin Filter 2 was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FILTF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Filter Pin Select" ] # [ inline ( always ) ] pub fn filtsel ( & self ) -> FILTSEL_R { FILTSEL_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bits 5:6 - Digital Filter On External Pin" ] # [ inline ( always ) ] pub fn filte ( & self ) -> FILTE_R { FILTE_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Filter Detect Flag" ] # [ inline ( always ) ] pub fn filtf ( & self ) -> FILTF_R { FILTF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Filter Pin Select" ] # [ inline ( always ) ] pub fn filtsel ( & mut self ) -> FILTSEL_W { FILTSEL_W { w : self } } # [ doc = "Bits 5:6 - Digital Filter On External Pin" ] # [ inline ( always ) ] pub fn filte ( & mut self ) -> FILTE_W { FILTE_W { w : self } } # [ doc = "Bit 7 - Filter Detect Flag" ] # [ inline ( always ) ] pub fn filtf ( & mut self ) -> FILTF_W { FILTF_W { w : self } } } } # [ doc = "LLWU Pin Filter 3 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filt3](filt3) module" ] pub type FILT3 = crate :: Reg < u8 , _FILT3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILT3 ; # [ doc = "`read()` method returns [filt3::R](filt3::R) reader structure" ] impl crate :: Readable for FILT3 { } # [ doc = "`write(|w| ..)` method takes [filt3::W](filt3::W) writer structure" ] impl crate :: Writable for FILT3 { } # [ doc = "LLWU Pin Filter 3 register" ] pub mod filt3 { # [ doc = "Reader of register FILT3" ] pub type R = crate :: R < u8 , super :: FILT3 > ; # [ doc = "Writer for register FILT3" ] pub type W = crate :: W < u8 , super :: FILT3 > ; # [ doc = "Register FILT3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILT3 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Filter Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTSEL_A { # [ doc = "0: Select LLWU_P0 for filter" ] _00000 , # [ doc = "31: Select LLWU_P31 for filter" ] _11111 } impl From < FILTSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTSEL_A ) -> Self { match variant { FILTSEL_A :: _00000 => 0 , FILTSEL_A :: _11111 => 31 } } } # [ doc = "Reader of field `FILTSEL`" ] pub type FILTSEL_R = crate :: R < u8 , FILTSEL_A > ; impl FILTSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FILTSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FILTSEL_A :: _00000 ) , 31 => Val ( FILTSEL_A :: _11111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00000`" ] # [ inline ( always ) ] pub fn is_00000 ( & self ) -> bool { * self == FILTSEL_A :: _00000 } # [ doc = "Checks if the value of the field is `_11111`" ] # [ inline ( always ) ] pub fn is_11111 ( & self ) -> bool { * self == FILTSEL_A :: _11111 } } # [ doc = "Write proxy for field `FILTSEL`" ] pub struct FILTSEL_W < 'a > { w : & 'a mut W , } impl < 'a > FILTSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Select LLWU_P0 for filter" ] # [ inline ( always ) ] pub fn _00000 ( self ) -> & 'a mut W { self . variant ( FILTSEL_A :: _00000 ) } # [ doc = "Select LLWU_P31 for filter" ] # [ inline ( always ) ] pub fn _11111 ( self ) -> & 'a mut W { self . variant ( FILTSEL_A :: _11111 ) } # [ 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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Digital Filter On External Pin\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTE_A { # [ doc = "0: Filter disabled" ] _00 , # [ doc = "1: Filter posedge detect enabled" ] _01 , # [ doc = "2: Filter negedge detect enabled" ] _10 , # [ doc = "3: Filter any edge detect enabled" ] _11 } impl From < FILTE_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTE_A ) -> Self { match variant { FILTE_A :: _00 => 0 , FILTE_A :: _01 => 1 , FILTE_A :: _10 => 2 , FILTE_A :: _11 => 3 } } } # [ doc = "Reader of field `FILTE`" ] pub type FILTE_R = crate :: R < u8 , FILTE_A > ; impl FILTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTE_A { match self . bits { 0 => FILTE_A :: _00 , 1 => FILTE_A :: _01 , 2 => FILTE_A :: _10 , 3 => FILTE_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FILTE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FILTE_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FILTE_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FILTE_A :: _11 } } # [ doc = "Write proxy for field `FILTE`" ] pub struct FILTE_W < 'a > { w : & 'a mut W , } impl < 'a > FILTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Filter disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _00 ) } # [ doc = "Filter posedge detect enabled" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _01 ) } # [ doc = "Filter negedge detect enabled" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _10 ) } # [ doc = "Filter any edge detect enabled" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u8 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Filter Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTF_A { # [ doc = "0: Pin Filter 3 was not a wakeup source" ] _0 , # [ doc = "1: Pin Filter 3 was a wakeup source" ] _1 } impl From < FILTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FILTF_A ) -> Self { match variant { FILTF_A :: _0 => false , FILTF_A :: _1 => true } } } # [ doc = "Reader of field `FILTF`" ] pub type FILTF_R = crate :: R < bool , FILTF_A > ; impl FILTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTF_A { match self . bits { false => FILTF_A :: _0 , true => FILTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FILTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FILTF_A :: _1 } } # [ doc = "Write proxy for field `FILTF`" ] pub struct FILTF_W < 'a > { w : & 'a mut W , } impl < 'a > FILTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Filter 3 was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FILTF_A :: _0 ) } # [ doc = "Pin Filter 3 was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FILTF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Filter Pin Select" ] # [ inline ( always ) ] pub fn filtsel ( & self ) -> FILTSEL_R { FILTSEL_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bits 5:6 - Digital Filter On External Pin" ] # [ inline ( always ) ] pub fn filte ( & self ) -> FILTE_R { FILTE_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Filter Detect Flag" ] # [ inline ( always ) ] pub fn filtf ( & self ) -> FILTF_R { FILTF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Filter Pin Select" ] # [ inline ( always ) ] pub fn filtsel ( & mut self ) -> FILTSEL_W { FILTSEL_W { w : self } } # [ doc = "Bits 5:6 - Digital Filter On External Pin" ] # [ inline ( always ) ] pub fn filte ( & mut self ) -> FILTE_W { FILTE_W { w : self } } # [ doc = "Bit 7 - Filter Detect Flag" ] # [ inline ( always ) ] pub fn filtf ( & mut self ) -> FILTF_W { FILTF_W { w : self } } } } # [ doc = "LLWU Pin Filter 4 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filt4](filt4) module" ] pub type FILT4 = crate :: Reg < u8 , _FILT4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILT4 ; # [ doc = "`read()` method returns [filt4::R](filt4::R) reader structure" ] impl crate :: Readable for FILT4 { } # [ doc = "`write(|w| ..)` method takes [filt4::W](filt4::W) writer structure" ] impl crate :: Writable for FILT4 { } # [ doc = "LLWU Pin Filter 4 register" ] pub mod filt4 { # [ doc = "Reader of register FILT4" ] pub type R = crate :: R < u8 , super :: FILT4 > ; # [ doc = "Writer for register FILT4" ] pub type W = crate :: W < u8 , super :: FILT4 > ; # [ doc = "Register FILT4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILT4 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Filter Pin Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTSEL_A { # [ doc = "0: Select LLWU_P0 for filter" ] _00000 , # [ doc = "31: Select LLWU_P31 for filter" ] _11111 } impl From < FILTSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTSEL_A ) -> Self { match variant { FILTSEL_A :: _00000 => 0 , FILTSEL_A :: _11111 => 31 } } } # [ doc = "Reader of field `FILTSEL`" ] pub type FILTSEL_R = crate :: R < u8 , FILTSEL_A > ; impl FILTSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , FILTSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( FILTSEL_A :: _00000 ) , 31 => Val ( FILTSEL_A :: _11111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00000`" ] # [ inline ( always ) ] pub fn is_00000 ( & self ) -> bool { * self == FILTSEL_A :: _00000 } # [ doc = "Checks if the value of the field is `_11111`" ] # [ inline ( always ) ] pub fn is_11111 ( & self ) -> bool { * self == FILTSEL_A :: _11111 } } # [ doc = "Write proxy for field `FILTSEL`" ] pub struct FILTSEL_W < 'a > { w : & 'a mut W , } impl < 'a > FILTSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Select LLWU_P0 for filter" ] # [ inline ( always ) ] pub fn _00000 ( self ) -> & 'a mut W { self . variant ( FILTSEL_A :: _00000 ) } # [ doc = "Select LLWU_P31 for filter" ] # [ inline ( always ) ] pub fn _11111 ( self ) -> & 'a mut W { self . variant ( FILTSEL_A :: _11111 ) } # [ 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 & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } # [ doc = "Digital Filter On External Pin\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTE_A { # [ doc = "0: Filter disabled" ] _00 , # [ doc = "1: Filter posedge detect enabled" ] _01 , # [ doc = "2: Filter negedge detect enabled" ] _10 , # [ doc = "3: Filter any edge detect enabled" ] _11 } impl From < FILTE_A > for u8 { # [ inline ( always ) ] fn from ( variant : FILTE_A ) -> Self { match variant { FILTE_A :: _00 => 0 , FILTE_A :: _01 => 1 , FILTE_A :: _10 => 2 , FILTE_A :: _11 => 3 } } } # [ doc = "Reader of field `FILTE`" ] pub type FILTE_R = crate :: R < u8 , FILTE_A > ; impl FILTE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTE_A { match self . bits { 0 => FILTE_A :: _00 , 1 => FILTE_A :: _01 , 2 => FILTE_A :: _10 , 3 => FILTE_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FILTE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FILTE_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FILTE_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FILTE_A :: _11 } } # [ doc = "Write proxy for field `FILTE`" ] pub struct FILTE_W < 'a > { w : & 'a mut W , } impl < 'a > FILTE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Filter disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _00 ) } # [ doc = "Filter posedge detect enabled" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _01 ) } # [ doc = "Filter negedge detect enabled" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _10 ) } # [ doc = "Filter any edge detect enabled" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FILTE_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 5 ) ) | ( ( ( value as u8 ) & 0x03 ) << 5 ) ; self . w } } # [ doc = "Filter Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FILTF_A { # [ doc = "0: Pin Filter 4 was not a wakeup source" ] _0 , # [ doc = "1: Pin Filter 4 was a wakeup source" ] _1 } impl From < FILTF_A > for bool { # [ inline ( always ) ] fn from ( variant : FILTF_A ) -> Self { match variant { FILTF_A :: _0 => false , FILTF_A :: _1 => true } } } # [ doc = "Reader of field `FILTF`" ] pub type FILTF_R = crate :: R < bool , FILTF_A > ; impl FILTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FILTF_A { match self . bits { false => FILTF_A :: _0 , true => FILTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FILTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FILTF_A :: _1 } } # [ doc = "Write proxy for field `FILTF`" ] pub struct FILTF_W < 'a > { w : & 'a mut W , } impl < 'a > FILTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FILTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin Filter 4 was not a wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FILTF_A :: _0 ) } # [ doc = "Pin Filter 4 was a wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FILTF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Filter Pin Select" ] # [ inline ( always ) ] pub fn filtsel ( & self ) -> FILTSEL_R { FILTSEL_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bits 5:6 - Digital Filter On External Pin" ] # [ inline ( always ) ] pub fn filte ( & self ) -> FILTE_R { FILTE_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Filter Detect Flag" ] # [ inline ( always ) ] pub fn filtf ( & self ) -> FILTF_R { FILTF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:4 - Filter Pin Select" ] # [ inline ( always ) ] pub fn filtsel ( & mut self ) -> FILTSEL_W { FILTSEL_W { w : self } } # [ doc = "Bits 5:6 - Digital Filter On External Pin" ] # [ inline ( always ) ] pub fn filte ( & mut self ) -> FILTE_W { FILTE_W { w : self } } # [ doc = "Bit 7 - Filter Detect Flag" ] # [ inline ( always ) ] pub fn filtf ( & mut self ) -> FILTF_W { FILTF_W { w : self } } } } } # [ doc = "Power Management Controller" ] pub struct PMC { _marker : PhantomData < * const ( ) > } unsafe impl Send for PMC { } impl PMC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const pmc :: RegisterBlock { 0x4007_d000 as * const _ } } impl Deref for PMC { type Target = pmc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * PMC :: ptr ( ) } } } # [ doc = "Power Management Controller" ] pub mod pmc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Low Voltage Detect Status And Control 1 register" ] pub lvdsc1 : LVDSC1 , # [ doc = "0x01 - Low Voltage Detect Status And Control 2 register" ] pub lvdsc2 : LVDSC2 , # [ doc = "0x02 - Regulator Status And Control register" ] pub regsc : REGSC , } # [ doc = "Low Voltage Detect Status And Control 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [lvdsc1](lvdsc1) module" ] pub type LVDSC1 = crate :: Reg < u8 , _LVDSC1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _LVDSC1 ; # [ doc = "`read()` method returns [lvdsc1::R](lvdsc1::R) reader structure" ] impl crate :: Readable for LVDSC1 { } # [ doc = "`write(|w| ..)` method takes [lvdsc1::W](lvdsc1::W) writer structure" ] impl crate :: Writable for LVDSC1 { } # [ doc = "Low Voltage Detect Status And Control 1 register" ] pub mod lvdsc1 { # [ doc = "Reader of register LVDSC1" ] pub type R = crate :: R < u8 , super :: LVDSC1 > ; # [ doc = "Writer for register LVDSC1" ] pub type W = crate :: W < u8 , super :: LVDSC1 > ; # [ doc = "Register LVDSC1 `reset()`'s with value 0x10" ] impl crate :: ResetValue for super :: LVDSC1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x10 } } # [ doc = "Low-Voltage Detect Voltage Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LVDV_A { # [ doc = "0: Low trip point selected (V LVD = V LVDL )" ] _00 , # [ doc = "1: High trip point selected (V LVD = V LVDH )" ] _01 } impl From < LVDV_A > for u8 { # [ inline ( always ) ] fn from ( variant : LVDV_A ) -> Self { match variant { LVDV_A :: _00 => 0 , LVDV_A :: _01 => 1 } } } # [ doc = "Reader of field `LVDV`" ] pub type LVDV_R = crate :: R < u8 , LVDV_A > ; impl LVDV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , LVDV_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( LVDV_A :: _00 ) , 1 => Val ( LVDV_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LVDV_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LVDV_A :: _01 } } # [ doc = "Write proxy for field `LVDV`" ] pub struct LVDV_W < 'a > { w : & 'a mut W , } impl < 'a > LVDV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LVDV_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Low trip point selected (V LVD = V LVDL )" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( LVDV_A :: _00 ) } # [ doc = "High trip point selected (V LVD = V LVDH )" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( LVDV_A :: _01 ) } # [ 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 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Low-Voltage Detect Reset Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LVDRE_A { # [ doc = "0: LVDF does not generate hardware resets" ] _0 , # [ doc = "1: Force an MCU reset when LVDF = 1" ] _1 } impl From < LVDRE_A > for bool { # [ inline ( always ) ] fn from ( variant : LVDRE_A ) -> Self { match variant { LVDRE_A :: _0 => false , LVDRE_A :: _1 => true } } } # [ doc = "Reader of field `LVDRE`" ] pub type LVDRE_R = crate :: R < bool , LVDRE_A > ; impl LVDRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LVDRE_A { match self . bits { false => LVDRE_A :: _0 , true => LVDRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LVDRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LVDRE_A :: _1 } } # [ doc = "Write proxy for field `LVDRE`" ] pub struct LVDRE_W < 'a > { w : & 'a mut W , } impl < 'a > LVDRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LVDRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LVDF does not generate hardware resets" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LVDRE_A :: _0 ) } # [ doc = "Force an MCU reset when LVDF = 1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LVDRE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Low-Voltage Detect Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LVDIE_A { # [ doc = "0: Hardware interrupt disabled (use polling)" ] _0 , # [ doc = "1: Request a hardware interrupt when LVDF = 1" ] _1 } impl From < LVDIE_A > for bool { # [ inline ( always ) ] fn from ( variant : LVDIE_A ) -> Self { match variant { LVDIE_A :: _0 => false , LVDIE_A :: _1 => true } } } # [ doc = "Reader of field `LVDIE`" ] pub type LVDIE_R = crate :: R < bool , LVDIE_A > ; impl LVDIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LVDIE_A { match self . bits { false => LVDIE_A :: _0 , true => LVDIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LVDIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LVDIE_A :: _1 } } # [ doc = "Write proxy for field `LVDIE`" ] pub struct LVDIE_W < 'a > { w : & 'a mut W , } impl < 'a > LVDIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LVDIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupt disabled (use polling)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LVDIE_A :: _0 ) } # [ doc = "Request a hardware interrupt when LVDF = 1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LVDIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Write proxy for field `LVDACK`" ] pub struct LVDACK_W < 'a > { w : & 'a mut W , } impl < 'a > LVDACK_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Low-Voltage Detect Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LVDF_A { # [ doc = "0: Low-voltage event not detected" ] _0 , # [ doc = "1: Low-voltage event detected" ] _1 } impl From < LVDF_A > for bool { # [ inline ( always ) ] fn from ( variant : LVDF_A ) -> Self { match variant { LVDF_A :: _0 => false , LVDF_A :: _1 => true } } } # [ doc = "Reader of field `LVDF`" ] pub type LVDF_R = crate :: R < bool , LVDF_A > ; impl LVDF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LVDF_A { match self . bits { false => LVDF_A :: _0 , true => LVDF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LVDF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LVDF_A :: _1 } } impl R { # [ doc = "Bits 0:1 - Low-Voltage Detect Voltage Select" ] # [ inline ( always ) ] pub fn lvdv ( & self ) -> LVDV_R { LVDV_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 4 - Low-Voltage Detect Reset Enable" ] # [ inline ( always ) ] pub fn lvdre ( & self ) -> LVDRE_R { LVDRE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Low-Voltage Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lvdie ( & self ) -> LVDIE_R { LVDIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Low-Voltage Detect Flag" ] # [ inline ( always ) ] pub fn lvdf ( & self ) -> LVDF_R { LVDF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Low-Voltage Detect Voltage Select" ] # [ inline ( always ) ] pub fn lvdv ( & mut self ) -> LVDV_W { LVDV_W { w : self } } # [ doc = "Bit 4 - Low-Voltage Detect Reset Enable" ] # [ inline ( always ) ] pub fn lvdre ( & mut self ) -> LVDRE_W { LVDRE_W { w : self } } # [ doc = "Bit 5 - Low-Voltage Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lvdie ( & mut self ) -> LVDIE_W { LVDIE_W { w : self } } # [ doc = "Bit 6 - Low-Voltage Detect Acknowledge" ] # [ inline ( always ) ] pub fn lvdack ( & mut self ) -> LVDACK_W { LVDACK_W { w : self } } } } # [ doc = "Low Voltage Detect Status And Control 2 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [lvdsc2](lvdsc2) module" ] pub type LVDSC2 = crate :: Reg < u8 , _LVDSC2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _LVDSC2 ; # [ doc = "`read()` method returns [lvdsc2::R](lvdsc2::R) reader structure" ] impl crate :: Readable for LVDSC2 { } # [ doc = "`write(|w| ..)` method takes [lvdsc2::W](lvdsc2::W) writer structure" ] impl crate :: Writable for LVDSC2 { } # [ doc = "Low Voltage Detect Status And Control 2 register" ] pub mod lvdsc2 { # [ doc = "Reader of register LVDSC2" ] pub type R = crate :: R < u8 , super :: LVDSC2 > ; # [ doc = "Writer for register LVDSC2" ] pub type W = crate :: W < u8 , super :: LVDSC2 > ; # [ doc = "Register LVDSC2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: LVDSC2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Low-Voltage Warning Voltage Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LVWV_A { # [ doc = "0: Low trip point selected (VLVW = VLVW1)" ] _00 , # [ doc = "1: Mid 1 trip point selected (VLVW = VLVW2)" ] _01 , # [ doc = "2: Mid 2 trip point selected (VLVW = VLVW3)" ] _10 , # [ doc = "3: High trip point selected (VLVW = VLVW4)" ] _11 } impl From < LVWV_A > for u8 { # [ inline ( always ) ] fn from ( variant : LVWV_A ) -> Self { match variant { LVWV_A :: _00 => 0 , LVWV_A :: _01 => 1 , LVWV_A :: _10 => 2 , LVWV_A :: _11 => 3 } } } # [ doc = "Reader of field `LVWV`" ] pub type LVWV_R = crate :: R < u8 , LVWV_A > ; impl LVWV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LVWV_A { match self . bits { 0 => LVWV_A :: _00 , 1 => LVWV_A :: _01 , 2 => LVWV_A :: _10 , 3 => LVWV_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LVWV_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LVWV_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == LVWV_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == LVWV_A :: _11 } } # [ doc = "Write proxy for field `LVWV`" ] pub struct LVWV_W < 'a > { w : & 'a mut W , } impl < 'a > LVWV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LVWV_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Low trip point selected (VLVW = VLVW1)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( LVWV_A :: _00 ) } # [ doc = "Mid 1 trip point selected (VLVW = VLVW2)" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( LVWV_A :: _01 ) } # [ doc = "Mid 2 trip point selected (VLVW = VLVW3)" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( LVWV_A :: _10 ) } # [ doc = "High trip point selected (VLVW = VLVW4)" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( LVWV_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Low-Voltage Warning Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LVWIE_A { # [ doc = "0: Hardware interrupt disabled (use polling)" ] _0 , # [ doc = "1: Request a hardware interrupt when LVWF = 1" ] _1 } impl From < LVWIE_A > for bool { # [ inline ( always ) ] fn from ( variant : LVWIE_A ) -> Self { match variant { LVWIE_A :: _0 => false , LVWIE_A :: _1 => true } } } # [ doc = "Reader of field `LVWIE`" ] pub type LVWIE_R = crate :: R < bool , LVWIE_A > ; impl LVWIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LVWIE_A { match self . bits { false => LVWIE_A :: _0 , true => LVWIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LVWIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LVWIE_A :: _1 } } # [ doc = "Write proxy for field `LVWIE`" ] pub struct LVWIE_W < 'a > { w : & 'a mut W , } impl < 'a > LVWIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LVWIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupt disabled (use polling)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LVWIE_A :: _0 ) } # [ doc = "Request a hardware interrupt when LVWF = 1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LVWIE_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Write proxy for field `LVWACK`" ] pub struct LVWACK_W < 'a > { w : & 'a mut W , } impl < 'a > LVWACK_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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Low-Voltage Warning Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LVWF_A { # [ doc = "0: Low-voltage warning event not detected" ] _0 , # [ doc = "1: Low-voltage warning event detected" ] _1 } impl From < LVWF_A > for bool { # [ inline ( always ) ] fn from ( variant : LVWF_A ) -> Self { match variant { LVWF_A :: _0 => false , LVWF_A :: _1 => true } } } # [ doc = "Reader of field `LVWF`" ] pub type LVWF_R = crate :: R < bool , LVWF_A > ; impl LVWF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LVWF_A { match self . bits { false => LVWF_A :: _0 , true => LVWF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LVWF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LVWF_A :: _1 } } impl R { # [ doc = "Bits 0:1 - Low-Voltage Warning Voltage Select" ] # [ inline ( always ) ] pub fn lvwv ( & self ) -> LVWV_R { LVWV_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Low-Voltage Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn lvwie ( & self ) -> LVWIE_R { LVWIE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Low-Voltage Warning Flag" ] # [ inline ( always ) ] pub fn lvwf ( & self ) -> LVWF_R { LVWF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Low-Voltage Warning Voltage Select" ] # [ inline ( always ) ] pub fn lvwv ( & mut self ) -> LVWV_W { LVWV_W { w : self } } # [ doc = "Bit 5 - Low-Voltage Warning Interrupt Enable" ] # [ inline ( always ) ] pub fn lvwie ( & mut self ) -> LVWIE_W { LVWIE_W { w : self } } # [ doc = "Bit 6 - Low-Voltage Warning Acknowledge" ] # [ inline ( always ) ] pub fn lvwack ( & mut self ) -> LVWACK_W { LVWACK_W { w : self } } } } # [ doc = "Regulator Status And Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [regsc](regsc) module" ] pub type REGSC = crate :: Reg < u8 , _REGSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _REGSC ; # [ doc = "`read()` method returns [regsc::R](regsc::R) reader structure" ] impl crate :: Readable for REGSC { } # [ doc = "`write(|w| ..)` method takes [regsc::W](regsc::W) writer structure" ] impl crate :: Writable for REGSC { } # [ doc = "Regulator Status And Control register" ] pub mod regsc { # [ doc = "Reader of register REGSC" ] pub type R = crate :: R < u8 , super :: REGSC > ; # [ doc = "Writer for register REGSC" ] pub type W = crate :: W < u8 , super :: REGSC > ; # [ doc = "Register REGSC `reset()`'s with value 0x24" ] impl crate :: ResetValue for super :: REGSC { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x24 } } # [ doc = "Bandgap Buffer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BGBE_A { # [ doc = "0: Bandgap buffer not enabled" ] _0 , # [ doc = "1: Bandgap buffer enabled" ] _1 } impl From < BGBE_A > for bool { # [ inline ( always ) ] fn from ( variant : BGBE_A ) -> Self { match variant { BGBE_A :: _0 => false , BGBE_A :: _1 => true } } } # [ doc = "Reader of field `BGBE`" ] pub type BGBE_R = crate :: R < bool , BGBE_A > ; impl BGBE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BGBE_A { match self . bits { false => BGBE_A :: _0 , true => BGBE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BGBE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BGBE_A :: _1 } } # [ doc = "Write proxy for field `BGBE`" ] pub struct BGBE_W < 'a > { w : & 'a mut W , } impl < 'a > BGBE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BGBE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bandgap buffer not enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BGBE_A :: _0 ) } # [ doc = "Bandgap buffer enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BGBE_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Regulator In Run Regulation Status\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGONS_A { # [ doc = "0: Regulator is in stop regulation or in transition to/from it" ] _0 , # [ doc = "1: Regulator is in run regulation" ] _1 } impl From < REGONS_A > for bool { # [ inline ( always ) ] fn from ( variant : REGONS_A ) -> Self { match variant { REGONS_A :: _0 => false , REGONS_A :: _1 => true } } } # [ doc = "Reader of field `REGONS`" ] pub type REGONS_R = crate :: R < bool , REGONS_A > ; impl REGONS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> REGONS_A { match self . bits { false => REGONS_A :: _0 , true => REGONS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == REGONS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == REGONS_A :: _1 } } # [ doc = "Acknowledge Isolation\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACKISO_A { # [ doc = "0: Peripherals and I/O pads are in normal run state." ] _0 , # [ doc = "1: Certain peripherals and I/O pads are in an isolated and latched state." ] _1 } impl From < ACKISO_A > for bool { # [ inline ( always ) ] fn from ( variant : ACKISO_A ) -> Self { match variant { ACKISO_A :: _0 => false , ACKISO_A :: _1 => true } } } # [ doc = "Reader of field `ACKISO`" ] pub type ACKISO_R = crate :: R < bool , ACKISO_A > ; impl ACKISO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACKISO_A { match self . bits { false => ACKISO_A :: _0 , true => ACKISO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACKISO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACKISO_A :: _1 } } # [ doc = "Write proxy for field `ACKISO`" ] pub struct ACKISO_W < 'a > { w : & 'a mut W , } impl < 'a > ACKISO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ACKISO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Peripherals and I/O pads are in normal run state." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ACKISO_A :: _0 ) } # [ doc = "Certain peripherals and I/O pads are in an isolated and latched state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ACKISO_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Bandgap Enable In VLPx Operation\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BGEN_A { # [ doc = "0: Bandgap voltage reference is disabled in VLPx , LLS , and VLLSx modes." ] _0 , # [ doc = "1: Bandgap voltage reference is enabled in VLPx , LLS , and VLLSx modes." ] _1 } impl From < BGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BGEN_A ) -> Self { match variant { BGEN_A :: _0 => false , BGEN_A :: _1 => true } } } # [ doc = "Reader of field `BGEN`" ] pub type BGEN_R = crate :: R < bool , BGEN_A > ; impl BGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BGEN_A { match self . bits { false => BGEN_A :: _0 , true => BGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BGEN_A :: _1 } } # [ doc = "Write proxy for field `BGEN`" ] pub struct BGEN_W < 'a > { w : & 'a mut W , } impl < 'a > BGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bandgap voltage reference is disabled in VLPx , LLS , and VLLSx modes." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BGEN_A :: _0 ) } # [ doc = "Bandgap voltage reference is enabled in VLPx , LLS , and VLLSx modes." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BGEN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 0 - Bandgap Buffer Enable" ] # [ inline ( always ) ] pub fn bgbe ( & self ) -> BGBE_R { BGBE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Regulator In Run Regulation Status" ] # [ inline ( always ) ] pub fn regons ( & self ) -> REGONS_R { REGONS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Acknowledge Isolation" ] # [ inline ( always ) ] pub fn ackiso ( & self ) -> ACKISO_R { ACKISO_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Bandgap Enable In VLPx Operation" ] # [ inline ( always ) ] pub fn bgen ( & self ) -> BGEN_R { BGEN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Bandgap Buffer Enable" ] # [ inline ( always ) ] pub fn bgbe ( & mut self ) -> BGBE_W { BGBE_W { w : self } } # [ doc = "Bit 3 - Acknowledge Isolation" ] # [ inline ( always ) ] pub fn ackiso ( & mut self ) -> ACKISO_W { ACKISO_W { w : self } } # [ doc = "Bit 4 - Bandgap Enable In VLPx Operation" ] # [ inline ( always ) ] pub fn bgen ( & mut self ) -> BGEN_W { BGEN_W { w : self } } } } } # [ doc = "System Mode Controller" ] pub struct SMC { _marker : PhantomData < * const ( ) > } unsafe impl Send for SMC { } impl SMC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const smc :: RegisterBlock { 0x4007_e000 as * const _ } } impl Deref for SMC { type Target = smc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SMC :: ptr ( ) } } } # [ doc = "System Mode Controller" ] pub mod smc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Power Mode Protection register" ] pub pmprot : PMPROT , # [ doc = "0x01 - Power Mode Control register" ] pub pmctrl : PMCTRL , # [ doc = "0x02 - Stop Control Register" ] pub stopctrl : STOPCTRL , # [ doc = "0x03 - Power Mode Status register" ] pub pmstat : PMSTAT , } # [ doc = "Power Mode Protection register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pmprot](pmprot) module" ] pub type PMPROT = crate :: Reg < u8 , _PMPROT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PMPROT ; # [ doc = "`read()` method returns [pmprot::R](pmprot::R) reader structure" ] impl crate :: Readable for PMPROT { } # [ doc = "`write(|w| ..)` method takes [pmprot::W](pmprot::W) writer structure" ] impl crate :: Writable for PMPROT { } # [ doc = "Power Mode Protection register" ] pub mod pmprot { # [ doc = "Reader of register PMPROT" ] pub type R = crate :: R < u8 , super :: PMPROT > ; # [ doc = "Writer for register PMPROT" ] pub type W = crate :: W < u8 , super :: PMPROT > ; # [ doc = "Register PMPROT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PMPROT { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Allow Very-Low-Leakage Stop Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVLLS_A { # [ doc = "0: Any VLLSx mode is not allowed" ] _0 , # [ doc = "1: Any VLLSx mode is allowed" ] _1 } impl From < AVLLS_A > for bool { # [ inline ( always ) ] fn from ( variant : AVLLS_A ) -> Self { match variant { AVLLS_A :: _0 => false , AVLLS_A :: _1 => true } } } # [ doc = "Reader of field `AVLLS`" ] pub type AVLLS_R = crate :: R < bool , AVLLS_A > ; impl AVLLS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVLLS_A { match self . bits { false => AVLLS_A :: _0 , true => AVLLS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVLLS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVLLS_A :: _1 } } # [ doc = "Write proxy for field `AVLLS`" ] pub struct AVLLS_W < 'a > { w : & 'a mut W , } impl < 'a > AVLLS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVLLS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Any VLLSx mode is not allowed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AVLLS_A :: _0 ) } # [ doc = "Any VLLSx mode is allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AVLLS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Allow Low-Leakage Stop Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ALLS_A { # [ doc = "0: Any LLSx mode is not allowed" ] _0 , # [ doc = "1: Any LLSx mode is allowed" ] _1 } impl From < ALLS_A > for bool { # [ inline ( always ) ] fn from ( variant : ALLS_A ) -> Self { match variant { ALLS_A :: _0 => false , ALLS_A :: _1 => true } } } # [ doc = "Reader of field `ALLS`" ] pub type ALLS_R = crate :: R < bool , ALLS_A > ; impl ALLS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ALLS_A { match self . bits { false => ALLS_A :: _0 , true => ALLS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ALLS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ALLS_A :: _1 } } # [ doc = "Write proxy for field `ALLS`" ] pub struct ALLS_W < 'a > { w : & 'a mut W , } impl < 'a > ALLS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ALLS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Any LLSx mode is not allowed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ALLS_A :: _0 ) } # [ doc = "Any LLSx mode is allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ALLS_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Allow Very-Low-Power Modes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVLP_A { # [ doc = "0: VLPR, VLPW, and VLPS are not allowed." ] _0 , # [ doc = "1: VLPR, VLPW, and VLPS are allowed." ] _1 } impl From < AVLP_A > for bool { # [ inline ( always ) ] fn from ( variant : AVLP_A ) -> Self { match variant { AVLP_A :: _0 => false , AVLP_A :: _1 => true } } } # [ doc = "Reader of field `AVLP`" ] pub type AVLP_R = crate :: R < bool , AVLP_A > ; impl AVLP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVLP_A { match self . bits { false => AVLP_A :: _0 , true => AVLP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVLP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVLP_A :: _1 } } # [ doc = "Write proxy for field `AVLP`" ] pub struct AVLP_W < 'a > { w : & 'a mut W , } impl < 'a > AVLP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVLP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "VLPR, VLPW, and VLPS are not allowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AVLP_A :: _0 ) } # [ doc = "VLPR, VLPW, and VLPS are allowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AVLP_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Allow High Speed Run mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AHSRUN_A { # [ doc = "0: HSRUN is not allowed" ] _0 , # [ doc = "1: HSRUN is allowed" ] _1 } impl From < AHSRUN_A > for bool { # [ inline ( always ) ] fn from ( variant : AHSRUN_A ) -> Self { match variant { AHSRUN_A :: _0 => false , AHSRUN_A :: _1 => true } } } # [ doc = "Reader of field `AHSRUN`" ] pub type AHSRUN_R = crate :: R < bool , AHSRUN_A > ; impl AHSRUN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AHSRUN_A { match self . bits { false => AHSRUN_A :: _0 , true => AHSRUN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AHSRUN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AHSRUN_A :: _1 } } # [ doc = "Write proxy for field `AHSRUN`" ] pub struct AHSRUN_W < 'a > { w : & 'a mut W , } impl < 'a > AHSRUN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AHSRUN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "HSRUN is not allowed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AHSRUN_A :: _0 ) } # [ doc = "HSRUN is allowed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AHSRUN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 1 - Allow Very-Low-Leakage Stop Mode" ] # [ inline ( always ) ] pub fn avlls ( & self ) -> AVLLS_R { AVLLS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Allow Low-Leakage Stop Mode" ] # [ inline ( always ) ] pub fn alls ( & self ) -> ALLS_R { ALLS_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Allow Very-Low-Power Modes" ] # [ inline ( always ) ] pub fn avlp ( & self ) -> AVLP_R { AVLP_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Allow High Speed Run mode" ] # [ inline ( always ) ] pub fn ahsrun ( & self ) -> AHSRUN_R { AHSRUN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Allow Very-Low-Leakage Stop Mode" ] # [ inline ( always ) ] pub fn avlls ( & mut self ) -> AVLLS_W { AVLLS_W { w : self } } # [ doc = "Bit 3 - Allow Low-Leakage Stop Mode" ] # [ inline ( always ) ] pub fn alls ( & mut self ) -> ALLS_W { ALLS_W { w : self } } # [ doc = "Bit 5 - Allow Very-Low-Power Modes" ] # [ inline ( always ) ] pub fn avlp ( & mut self ) -> AVLP_W { AVLP_W { w : self } } # [ doc = "Bit 7 - Allow High Speed Run mode" ] # [ inline ( always ) ] pub fn ahsrun ( & mut self ) -> AHSRUN_W { AHSRUN_W { w : self } } } } # [ doc = "Power Mode Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pmctrl](pmctrl) module" ] pub type PMCTRL = crate :: Reg < u8 , _PMCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PMCTRL ; # [ doc = "`read()` method returns [pmctrl::R](pmctrl::R) reader structure" ] impl crate :: Readable for PMCTRL { } # [ doc = "`write(|w| ..)` method takes [pmctrl::W](pmctrl::W) writer structure" ] impl crate :: Writable for PMCTRL { } # [ doc = "Power Mode Control register" ] pub mod pmctrl { # [ doc = "Reader of register PMCTRL" ] pub type R = crate :: R < u8 , super :: PMCTRL > ; # [ doc = "Writer for register PMCTRL" ] pub type W = crate :: W < u8 , super :: PMCTRL > ; # [ doc = "Register PMCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PMCTRL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Stop Mode Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPM_A { # [ doc = "0: Normal Stop (STOP)" ] _000 , # [ doc = "2: Very-Low-Power Stop (VLPS)" ] _010 , # [ doc = "3: Low-Leakage Stop (LLSx)" ] _011 , # [ doc = "4: Very-Low-Leakage Stop (VLLSx)" ] _100 , # [ doc = "6: Reseved" ] _110 } impl From < STOPM_A > for u8 { # [ inline ( always ) ] fn from ( variant : STOPM_A ) -> Self { match variant { STOPM_A :: _000 => 0 , STOPM_A :: _010 => 2 , STOPM_A :: _011 => 3 , STOPM_A :: _100 => 4 , STOPM_A :: _110 => 6 } } } # [ doc = "Reader of field `STOPM`" ] pub type STOPM_R = crate :: R < u8 , STOPM_A > ; impl STOPM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , STOPM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( STOPM_A :: _000 ) , 2 => Val ( STOPM_A :: _010 ) , 3 => Val ( STOPM_A :: _011 ) , 4 => Val ( STOPM_A :: _100 ) , 6 => Val ( STOPM_A :: _110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == STOPM_A :: _000 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == STOPM_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == STOPM_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == STOPM_A :: _100 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == STOPM_A :: _110 } } # [ doc = "Write proxy for field `STOPM`" ] pub struct STOPM_W < 'a > { w : & 'a mut W , } impl < 'a > STOPM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STOPM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Normal Stop (STOP)" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( STOPM_A :: _000 ) } # [ doc = "Very-Low-Power Stop (VLPS)" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( STOPM_A :: _010 ) } # [ doc = "Low-Leakage Stop (LLSx)" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( STOPM_A :: _011 ) } # [ doc = "Very-Low-Leakage Stop (VLLSx)" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( STOPM_A :: _100 ) } # [ doc = "Reseved" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( STOPM_A :: _110 ) } # [ 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 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "Stop Aborted\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPA_A { # [ doc = "0: The previous stop mode entry was successsful." ] _0 , # [ doc = "1: The previous stop mode entry was aborted." ] _1 } impl From < STOPA_A > for bool { # [ inline ( always ) ] fn from ( variant : STOPA_A ) -> Self { match variant { STOPA_A :: _0 => false , STOPA_A :: _1 => true } } } # [ doc = "Reader of field `STOPA`" ] pub type STOPA_R = crate :: R < bool , STOPA_A > ; impl STOPA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STOPA_A { match self . bits { false => STOPA_A :: _0 , true => STOPA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STOPA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STOPA_A :: _1 } } # [ doc = "Run Mode Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RUNM_A { # [ doc = "0: Normal Run mode (RUN)" ] _00 , # [ doc = "2: Very-Low-Power Run mode (VLPR)" ] _10 , # [ doc = "3: High Speed Run mode (HSRUN)" ] _11 } impl From < RUNM_A > for u8 { # [ inline ( always ) ] fn from ( variant : RUNM_A ) -> Self { match variant { RUNM_A :: _00 => 0 , RUNM_A :: _10 => 2 , RUNM_A :: _11 => 3 } } } # [ doc = "Reader of field `RUNM`" ] pub type RUNM_R = crate :: R < u8 , RUNM_A > ; impl RUNM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RUNM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RUNM_A :: _00 ) , 2 => Val ( RUNM_A :: _10 ) , 3 => Val ( RUNM_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RUNM_A :: _00 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == RUNM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == RUNM_A :: _11 } } # [ doc = "Write proxy for field `RUNM`" ] pub struct RUNM_W < 'a > { w : & 'a mut W , } impl < 'a > RUNM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RUNM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Normal Run mode (RUN)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RUNM_A :: _00 ) } # [ doc = "Very-Low-Power Run mode (VLPR)" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( RUNM_A :: _10 ) } # [ doc = "High Speed Run mode (HSRUN)" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( RUNM_A :: _11 ) } # [ 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 << 5 ) ) | ( ( ( value as u8 ) & 0x03 ) << 5 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Stop Mode Control" ] # [ inline ( always ) ] pub fn stopm ( & self ) -> STOPM_R { STOPM_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - Stop Aborted" ] # [ inline ( always ) ] pub fn stopa ( & self ) -> STOPA_R { STOPA_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:6 - Run Mode Control" ] # [ inline ( always ) ] pub fn runm ( & self ) -> RUNM_R { RUNM_R :: new ( ( ( self . bits >> 5 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Stop Mode Control" ] # [ inline ( always ) ] pub fn stopm ( & mut self ) -> STOPM_W { STOPM_W { w : self } } # [ doc = "Bits 5:6 - Run Mode Control" ] # [ inline ( always ) ] pub fn runm ( & mut self ) -> RUNM_W { RUNM_W { w : self } } } } # [ doc = "Stop Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stopctrl](stopctrl) module" ] pub type STOPCTRL = crate :: Reg < u8 , _STOPCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STOPCTRL ; # [ doc = "`read()` method returns [stopctrl::R](stopctrl::R) reader structure" ] impl crate :: Readable for STOPCTRL { } # [ doc = "`write(|w| ..)` method takes [stopctrl::W](stopctrl::W) writer structure" ] impl crate :: Writable for STOPCTRL { } # [ doc = "Stop Control Register" ] pub mod stopctrl { # [ doc = "Reader of register STOPCTRL" ] pub type R = crate :: R < u8 , super :: STOPCTRL > ; # [ doc = "Writer for register STOPCTRL" ] pub type W = crate :: W < u8 , super :: STOPCTRL > ; # [ doc = "Register STOPCTRL `reset()`'s with value 0x03" ] impl crate :: ResetValue for super :: STOPCTRL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x03 } } # [ doc = "LLS or VLLS Mode Control\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LLSM_A { # [ doc = "0: VLLS0 if PMCTRL\\[STOPM\\]=VLLSx, reserved if PMCTRL\\[STOPM\\]=LLSx" ] _000 , # [ doc = "1: VLLS1 if PMCTRL\\[STOPM\\]=VLLSx, reserved if PMCTRL\\[STOPM\\]=LLSx" ] _001 , # [ doc = "2: VLLS2 if PMCTRL\\[STOPM\\]=VLLSx, LLS2 if PMCTRL\\[STOPM\\]=LLSx" ] _010 , # [ doc = "3: VLLS3 if PMCTRL\\[STOPM\\]=VLLSx, LLS3 if PMCTRL\\[STOPM\\]=LLSx" ] _011 } impl From < LLSM_A > for u8 { # [ inline ( always ) ] fn from ( variant : LLSM_A ) -> Self { match variant { LLSM_A :: _000 => 0 , LLSM_A :: _001 => 1 , LLSM_A :: _010 => 2 , LLSM_A :: _011 => 3 } } } # [ doc = "Reader of field `LLSM`" ] pub type LLSM_R = crate :: R < u8 , LLSM_A > ; impl LLSM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , LLSM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( LLSM_A :: _000 ) , 1 => Val ( LLSM_A :: _001 ) , 2 => Val ( LLSM_A :: _010 ) , 3 => Val ( LLSM_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == LLSM_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == LLSM_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == LLSM_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == LLSM_A :: _011 } } # [ doc = "Write proxy for field `LLSM`" ] pub struct LLSM_W < 'a > { w : & 'a mut W , } impl < 'a > LLSM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LLSM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "VLLS0 if PMCTRL\\[STOPM\\]=VLLSx, reserved if PMCTRL\\[STOPM\\]=LLSx" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( LLSM_A :: _000 ) } # [ doc = "VLLS1 if PMCTRL\\[STOPM\\]=VLLSx, reserved if PMCTRL\\[STOPM\\]=LLSx" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( LLSM_A :: _001 ) } # [ doc = "VLLS2 if PMCTRL\\[STOPM\\]=VLLSx, LLS2 if PMCTRL\\[STOPM\\]=LLSx" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( LLSM_A :: _010 ) } # [ doc = "VLLS3 if PMCTRL\\[STOPM\\]=VLLSx, LLS3 if PMCTRL\\[STOPM\\]=LLSx" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( LLSM_A :: _011 ) } # [ 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 ) | ( ( value as u8 ) & 0x07 ) ; self . w } } # [ doc = "RAM2 Power Option\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAM2PO_A { # [ doc = "0: RAM2 not powered in LLS2/VLLS2" ] _0 , # [ doc = "1: RAM2 powered in LLS2/VLLS2" ] _1 } impl From < RAM2PO_A > for bool { # [ inline ( always ) ] fn from ( variant : RAM2PO_A ) -> Self { match variant { RAM2PO_A :: _0 => false , RAM2PO_A :: _1 => true } } } # [ doc = "Reader of field `RAM2PO`" ] pub type RAM2PO_R = crate :: R < bool , RAM2PO_A > ; impl RAM2PO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAM2PO_A { match self . bits { false => RAM2PO_A :: _0 , true => RAM2PO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAM2PO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAM2PO_A :: _1 } } # [ doc = "Write proxy for field `RAM2PO`" ] pub struct RAM2PO_W < 'a > { w : & 'a mut W , } impl < 'a > RAM2PO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RAM2PO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "RAM2 not powered in LLS2/VLLS2" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RAM2PO_A :: _0 ) } # [ doc = "RAM2 powered in LLS2/VLLS2" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RAM2PO_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "POR Power Option\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PORPO_A { # [ doc = "0: POR detect circuit is enabled in VLLS0" ] _0 , # [ doc = "1: POR detect circuit is disabled in VLLS0" ] _1 } impl From < PORPO_A > for bool { # [ inline ( always ) ] fn from ( variant : PORPO_A ) -> Self { match variant { PORPO_A :: _0 => false , PORPO_A :: _1 => true } } } # [ doc = "Reader of field `PORPO`" ] pub type PORPO_R = crate :: R < bool , PORPO_A > ; impl PORPO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PORPO_A { match self . bits { false => PORPO_A :: _0 , true => PORPO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PORPO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PORPO_A :: _1 } } # [ doc = "Write proxy for field `PORPO`" ] pub struct PORPO_W < 'a > { w : & 'a mut W , } impl < 'a > PORPO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PORPO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "POR detect circuit is enabled in VLLS0" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PORPO_A :: _0 ) } # [ doc = "POR detect circuit is disabled in VLLS0" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PORPO_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Partial Stop Option\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSTOPO_A { # [ doc = "0: STOP - Normal Stop mode" ] _00 , # [ doc = "1: PSTOP1 - Partial Stop with both system and bus clocks disabled" ] _01 , # [ doc = "2: PSTOP2 - Partial Stop with system clock disabled and bus clock enabled" ] _10 } impl From < PSTOPO_A > for u8 { # [ inline ( always ) ] fn from ( variant : PSTOPO_A ) -> Self { match variant { PSTOPO_A :: _00 => 0 , PSTOPO_A :: _01 => 1 , PSTOPO_A :: _10 => 2 } } } # [ doc = "Reader of field `PSTOPO`" ] pub type PSTOPO_R = crate :: R < u8 , PSTOPO_A > ; impl PSTOPO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PSTOPO_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PSTOPO_A :: _00 ) , 1 => Val ( PSTOPO_A :: _01 ) , 2 => Val ( PSTOPO_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PSTOPO_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PSTOPO_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PSTOPO_A :: _10 } } # [ doc = "Write proxy for field `PSTOPO`" ] pub struct PSTOPO_W < 'a > { w : & 'a mut W , } impl < 'a > PSTOPO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSTOPO_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "STOP - Normal Stop mode" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PSTOPO_A :: _00 ) } # [ doc = "PSTOP1 - Partial Stop with both system and bus clocks disabled" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PSTOPO_A :: _01 ) } # [ doc = "PSTOP2 - Partial Stop with system clock disabled and bus clock enabled" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PSTOPO_A :: _10 ) } # [ 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 << 6 ) ) | ( ( ( value as u8 ) & 0x03 ) << 6 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - LLS or VLLS Mode Control" ] # [ inline ( always ) ] pub fn llsm ( & self ) -> LLSM_R { LLSM_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 4 - RAM2 Power Option" ] # [ inline ( always ) ] pub fn ram2po ( & self ) -> RAM2PO_R { RAM2PO_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - POR Power Option" ] # [ inline ( always ) ] pub fn porpo ( & self ) -> PORPO_R { PORPO_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bits 6:7 - Partial Stop Option" ] # [ inline ( always ) ] pub fn pstopo ( & self ) -> PSTOPO_R { PSTOPO_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - LLS or VLLS Mode Control" ] # [ inline ( always ) ] pub fn llsm ( & mut self ) -> LLSM_W { LLSM_W { w : self } } # [ doc = "Bit 4 - RAM2 Power Option" ] # [ inline ( always ) ] pub fn ram2po ( & mut self ) -> RAM2PO_W { RAM2PO_W { w : self } } # [ doc = "Bit 5 - POR Power Option" ] # [ inline ( always ) ] pub fn porpo ( & mut self ) -> PORPO_W { PORPO_W { w : self } } # [ doc = "Bits 6:7 - Partial Stop Option" ] # [ inline ( always ) ] pub fn pstopo ( & mut self ) -> PSTOPO_W { PSTOPO_W { w : self } } } } # [ doc = "Power Mode Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pmstat](pmstat) module" ] pub type PMSTAT = crate :: Reg < u8 , _PMSTAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PMSTAT ; # [ doc = "`read()` method returns [pmstat::R](pmstat::R) reader structure" ] impl crate :: Readable for PMSTAT { } # [ doc = "Power Mode Status register" ] pub mod pmstat { # [ doc = "Reader of register PMSTAT" ] pub type R = crate :: R < u8 , super :: PMSTAT > ; # [ doc = "Reader of field `PMSTAT`" ] pub type PMSTAT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Power Mode Status" ] # [ inline ( always ) ] pub fn pmstat ( & self ) -> PMSTAT_R { PMSTAT_R :: new ( ( self . bits & 0xff ) as u8 ) } } } } # [ doc = "Reset Control Module" ] pub struct RCM { _marker : PhantomData < * const ( ) > } unsafe impl Send for RCM { } impl RCM { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const rcm :: RegisterBlock { 0x4007_f000 as * const _ } } impl Deref for RCM { type Target = rcm :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * RCM :: ptr ( ) } } } # [ doc = "Reset Control Module" ] pub mod rcm { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - System Reset Status Register 0" ] pub srs0 : SRS0 , # [ doc = "0x01 - System Reset Status Register 1" ] pub srs1 : SRS1 , _reserved2 : [ u8 ; 2usize ] , # [ doc = "0x04 - Reset Pin Filter Control register" ] pub rpfc : RPFC , # [ doc = "0x05 - Reset Pin Filter Width register" ] pub rpfw : RPFW , _reserved4 : [ u8 ; 1usize ] , # [ doc = "0x07 - Mode Register" ] pub mr : MR , # [ doc = "0x08 - Sticky System Reset Status Register 0" ] pub ssrs0 : SSRS0 , # [ doc = "0x09 - Sticky System Reset Status Register 1" ] pub ssrs1 : SSRS1 , } # [ doc = "System Reset Status Register 0\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [srs0](srs0) module" ] pub type SRS0 = crate :: Reg < u8 , _SRS0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SRS0 ; # [ doc = "`read()` method returns [srs0::R](srs0::R) reader structure" ] impl crate :: Readable for SRS0 { } # [ doc = "System Reset Status Register 0" ] pub mod srs0 { # [ doc = "Reader of register SRS0" ] pub type R = crate :: R < u8 , super :: SRS0 > ; # [ doc = "Low Leakage Wakeup Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKEUP_A { # [ doc = "0: Reset not caused by LLWU module wakeup source" ] _0 , # [ doc = "1: Reset caused by LLWU module wakeup source" ] _1 } impl From < WAKEUP_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKEUP_A ) -> Self { match variant { WAKEUP_A :: _0 => false , WAKEUP_A :: _1 => true } } } # [ doc = "Reader of field `WAKEUP`" ] pub type WAKEUP_R = crate :: R < bool , WAKEUP_A > ; impl WAKEUP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKEUP_A { match self . bits { false => WAKEUP_A :: _0 , true => WAKEUP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKEUP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKEUP_A :: _1 } } # [ doc = "Low-Voltage Detect Reset\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LVD_A { # [ doc = "0: Reset not caused by LVD trip or POR" ] _0 , # [ doc = "1: Reset caused by LVD trip or POR" ] _1 } impl From < LVD_A > for bool { # [ inline ( always ) ] fn from ( variant : LVD_A ) -> Self { match variant { LVD_A :: _0 => false , LVD_A :: _1 => true } } } # [ doc = "Reader of field `LVD`" ] pub type LVD_R = crate :: R < bool , LVD_A > ; impl LVD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LVD_A { match self . bits { false => LVD_A :: _0 , true => LVD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LVD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LVD_A :: _1 } } # [ doc = "Loss-of-Clock Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOC_A { # [ doc = "0: Reset not caused by a loss of external clock." ] _0 , # [ doc = "1: Reset caused by a loss of external clock." ] _1 } impl From < LOC_A > for bool { # [ inline ( always ) ] fn from ( variant : LOC_A ) -> Self { match variant { LOC_A :: _0 => false , LOC_A :: _1 => true } } } # [ doc = "Reader of field `LOC`" ] pub type LOC_R = crate :: R < bool , LOC_A > ; impl LOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOC_A { match self . bits { false => LOC_A :: _0 , true => LOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOC_A :: _1 } } # [ doc = "Loss-of-Lock Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOL_A { # [ doc = "0: Reset not caused by a loss of lock in the PLL" ] _0 , # [ doc = "1: Reset caused by a loss of lock in the PLL" ] _1 } impl From < LOL_A > for bool { # [ inline ( always ) ] fn from ( variant : LOL_A ) -> Self { match variant { LOL_A :: _0 => false , LOL_A :: _1 => true } } } # [ doc = "Reader of field `LOL`" ] pub type LOL_R = crate :: R < bool , LOL_A > ; impl LOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOL_A { match self . bits { false => LOL_A :: _0 , true => LOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOL_A :: _1 } } # [ doc = "Watchdog\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WDOG_A { # [ doc = "0: Reset not caused by watchdog timeout" ] _0 , # [ doc = "1: Reset caused by watchdog timeout" ] _1 } impl From < WDOG_A > for bool { # [ inline ( always ) ] fn from ( variant : WDOG_A ) -> Self { match variant { WDOG_A :: _0 => false , WDOG_A :: _1 => true } } } # [ doc = "Reader of field `WDOG`" ] pub type WDOG_R = crate :: R < bool , WDOG_A > ; impl WDOG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WDOG_A { match self . bits { false => WDOG_A :: _0 , true => WDOG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WDOG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WDOG_A :: _1 } } # [ doc = "External Reset Pin\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN_A { # [ doc = "0: Reset not caused by external reset pin" ] _0 , # [ doc = "1: Reset caused by external reset pin" ] _1 } impl From < PIN_A > for bool { # [ inline ( always ) ] fn from ( variant : PIN_A ) -> Self { match variant { PIN_A :: _0 => false , PIN_A :: _1 => true } } } # [ doc = "Reader of field `PIN`" ] pub type PIN_R = crate :: R < bool , PIN_A > ; impl PIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PIN_A { match self . bits { false => PIN_A :: _0 , true => PIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PIN_A :: _1 } } # [ doc = "Power-On Reset\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POR_A { # [ doc = "0: Reset not caused by POR" ] _0 , # [ doc = "1: Reset caused by POR" ] _1 } impl From < POR_A > for bool { # [ inline ( always ) ] fn from ( variant : POR_A ) -> Self { match variant { POR_A :: _0 => false , POR_A :: _1 => true } } } # [ doc = "Reader of field `POR`" ] pub type POR_R = crate :: R < bool , POR_A > ; impl POR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POR_A { match self . bits { false => POR_A :: _0 , true => POR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POR_A :: _1 } } impl R { # [ doc = "Bit 0 - Low Leakage Wakeup Reset" ] # [ inline ( always ) ] pub fn wakeup ( & self ) -> WAKEUP_R { WAKEUP_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Low-Voltage Detect Reset" ] # [ inline ( always ) ] pub fn lvd ( & self ) -> LVD_R { LVD_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Loss-of-Clock Reset" ] # [ inline ( always ) ] pub fn loc ( & self ) -> LOC_R { LOC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Loss-of-Lock Reset" ] # [ inline ( always ) ] pub fn lol ( & self ) -> LOL_R { LOL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Watchdog" ] # [ inline ( always ) ] pub fn wdog ( & self ) -> WDOG_R { WDOG_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - External Reset Pin" ] # [ inline ( always ) ] pub fn pin ( & self ) -> PIN_R { PIN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Power-On Reset" ] # [ inline ( always ) ] pub fn por ( & self ) -> POR_R { POR_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "System Reset Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [srs1](srs1) module" ] pub type SRS1 = crate :: Reg < u8 , _SRS1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SRS1 ; # [ doc = "`read()` method returns [srs1::R](srs1::R) reader structure" ] impl crate :: Readable for SRS1 { } # [ doc = "System Reset Status Register 1" ] pub mod srs1 { # [ doc = "Reader of register SRS1" ] pub type R = crate :: R < u8 , super :: SRS1 > ; # [ doc = "JTAG Generated Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum JTAG_A { # [ doc = "0: Reset not caused by JTAG" ] _0 , # [ doc = "1: Reset caused by JTAG" ] _1 } impl From < JTAG_A > for bool { # [ inline ( always ) ] fn from ( variant : JTAG_A ) -> Self { match variant { JTAG_A :: _0 => false , JTAG_A :: _1 => true } } } # [ doc = "Reader of field `JTAG`" ] pub type JTAG_R = crate :: R < bool , JTAG_A > ; impl JTAG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> JTAG_A { match self . bits { false => JTAG_A :: _0 , true => JTAG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == JTAG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == JTAG_A :: _1 } } # [ doc = "Core Lockup\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOCKUP_A { # [ doc = "0: Reset not caused by core LOCKUP event" ] _0 , # [ doc = "1: Reset caused by core LOCKUP event" ] _1 } impl From < LOCKUP_A > for bool { # [ inline ( always ) ] fn from ( variant : LOCKUP_A ) -> Self { match variant { LOCKUP_A :: _0 => false , LOCKUP_A :: _1 => true } } } # [ doc = "Reader of field `LOCKUP`" ] pub type LOCKUP_R = crate :: R < bool , LOCKUP_A > ; impl LOCKUP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOCKUP_A { match self . bits { false => LOCKUP_A :: _0 , true => LOCKUP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOCKUP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOCKUP_A :: _1 } } # [ doc = "Software\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SW_A { # [ doc = "0: Reset not caused by software setting of SYSRESETREQ bit" ] _0 , # [ doc = "1: Reset caused by software setting of SYSRESETREQ bit" ] _1 } impl From < SW_A > for bool { # [ inline ( always ) ] fn from ( variant : SW_A ) -> Self { match variant { SW_A :: _0 => false , SW_A :: _1 => true } } } # [ doc = "Reader of field `SW`" ] pub type SW_R = crate :: R < bool , SW_A > ; impl SW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SW_A { match self . bits { false => SW_A :: _0 , true => SW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SW_A :: _1 } } # [ doc = "MDM-AP System Reset Request\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MDM_AP_A { # [ doc = "0: Reset not caused by host debugger system setting of the System Reset Request bit" ] _0 , # [ doc = "1: Reset caused by host debugger system setting of the System Reset Request bit" ] _1 } impl From < MDM_AP_A > for bool { # [ inline ( always ) ] fn from ( variant : MDM_AP_A ) -> Self { match variant { MDM_AP_A :: _0 => false , MDM_AP_A :: _1 => true } } } # [ doc = "Reader of field `MDM_AP`" ] pub type MDM_AP_R = crate :: R < bool , MDM_AP_A > ; impl MDM_AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MDM_AP_A { match self . bits { false => MDM_AP_A :: _0 , true => MDM_AP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MDM_AP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MDM_AP_A :: _1 } } # [ doc = "EzPort Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EZPT_A { # [ doc = "0: Reset not caused by EzPort receiving the RESET command while the device is in EzPort mode" ] _0 , # [ doc = "1: Reset caused by EzPort receiving the RESET command while the device is in EzPort mode" ] _1 } impl From < EZPT_A > for bool { # [ inline ( always ) ] fn from ( variant : EZPT_A ) -> Self { match variant { EZPT_A :: _0 => false , EZPT_A :: _1 => true } } } # [ doc = "Reader of field `EZPT`" ] pub type EZPT_R = crate :: R < bool , EZPT_A > ; impl EZPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EZPT_A { match self . bits { false => EZPT_A :: _0 , true => EZPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EZPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EZPT_A :: _1 } } # [ doc = "Stop Mode Acknowledge Error Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SACKERR_A { # [ doc = "0: Reset not caused by peripheral failure to acknowledge attempt to enter stop mode" ] _0 , # [ doc = "1: Reset caused by peripheral failure to acknowledge attempt to enter stop mode" ] _1 } impl From < SACKERR_A > for bool { # [ inline ( always ) ] fn from ( variant : SACKERR_A ) -> Self { match variant { SACKERR_A :: _0 => false , SACKERR_A :: _1 => true } } } # [ doc = "Reader of field `SACKERR`" ] pub type SACKERR_R = crate :: R < bool , SACKERR_A > ; impl SACKERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SACKERR_A { match self . bits { false => SACKERR_A :: _0 , true => SACKERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SACKERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SACKERR_A :: _1 } } impl R { # [ doc = "Bit 0 - JTAG Generated Reset" ] # [ inline ( always ) ] pub fn jtag ( & self ) -> JTAG_R { JTAG_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Core Lockup" ] # [ inline ( always ) ] pub fn lockup ( & self ) -> LOCKUP_R { LOCKUP_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Software" ] # [ inline ( always ) ] pub fn sw ( & self ) -> SW_R { SW_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - MDM-AP System Reset Request" ] # [ inline ( always ) ] pub fn mdm_ap ( & self ) -> MDM_AP_R { MDM_AP_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - EzPort Reset" ] # [ inline ( always ) ] pub fn ezpt ( & self ) -> EZPT_R { EZPT_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Stop Mode Acknowledge Error Reset" ] # [ inline ( always ) ] pub fn sackerr ( & self ) -> SACKERR_R { SACKERR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } } } # [ doc = "Reset Pin Filter Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rpfc](rpfc) module" ] pub type RPFC = crate :: Reg < u8 , _RPFC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RPFC ; # [ doc = "`read()` method returns [rpfc::R](rpfc::R) reader structure" ] impl crate :: Readable for RPFC { } # [ doc = "`write(|w| ..)` method takes [rpfc::W](rpfc::W) writer structure" ] impl crate :: Writable for RPFC { } # [ doc = "Reset Pin Filter Control register" ] pub mod rpfc { # [ doc = "Reader of register RPFC" ] pub type R = crate :: R < u8 , super :: RPFC > ; # [ doc = "Writer for register RPFC" ] pub type W = crate :: W < u8 , super :: RPFC > ; # [ doc = "Register RPFC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RPFC { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reset Pin Filter Select in Run and Wait Modes\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSTFLTSRW_A { # [ doc = "0: All filtering disabled" ] _00 , # [ doc = "1: Bus clock filter enabled for normal operation" ] _01 , # [ doc = "2: LPO clock filter enabled for normal operation" ] _10 } impl From < RSTFLTSRW_A > for u8 { # [ inline ( always ) ] fn from ( variant : RSTFLTSRW_A ) -> Self { match variant { RSTFLTSRW_A :: _00 => 0 , RSTFLTSRW_A :: _01 => 1 , RSTFLTSRW_A :: _10 => 2 } } } # [ doc = "Reader of field `RSTFLTSRW`" ] pub type RSTFLTSRW_R = crate :: R < u8 , RSTFLTSRW_A > ; impl RSTFLTSRW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RSTFLTSRW_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RSTFLTSRW_A :: _00 ) , 1 => Val ( RSTFLTSRW_A :: _01 ) , 2 => Val ( RSTFLTSRW_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RSTFLTSRW_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == RSTFLTSRW_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == RSTFLTSRW_A :: _10 } } # [ doc = "Write proxy for field `RSTFLTSRW`" ] pub struct RSTFLTSRW_W < 'a > { w : & 'a mut W , } impl < 'a > RSTFLTSRW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSTFLTSRW_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "All filtering disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RSTFLTSRW_A :: _00 ) } # [ doc = "Bus clock filter enabled for normal operation" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( RSTFLTSRW_A :: _01 ) } # [ doc = "LPO clock filter enabled for normal operation" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( RSTFLTSRW_A :: _10 ) } # [ 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 ) | ( ( value as u8 ) & 0x03 ) ; self . w } } # [ doc = "Reset Pin Filter Select in Stop Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSTFLTSS_A { # [ doc = "0: All filtering disabled" ] _0 , # [ doc = "1: LPO clock filter enabled" ] _1 } impl From < RSTFLTSS_A > for bool { # [ inline ( always ) ] fn from ( variant : RSTFLTSS_A ) -> Self { match variant { RSTFLTSS_A :: _0 => false , RSTFLTSS_A :: _1 => true } } } # [ doc = "Reader of field `RSTFLTSS`" ] pub type RSTFLTSS_R = crate :: R < bool , RSTFLTSS_A > ; impl RSTFLTSS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSTFLTSS_A { match self . bits { false => RSTFLTSS_A :: _0 , true => RSTFLTSS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RSTFLTSS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RSTFLTSS_A :: _1 } } # [ doc = "Write proxy for field `RSTFLTSS`" ] pub struct RSTFLTSS_W < 'a > { w : & 'a mut W , } impl < 'a > RSTFLTSS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSTFLTSS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All filtering disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSTFLTSS_A :: _0 ) } # [ doc = "LPO clock filter enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSTFLTSS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Reset Pin Filter Select in Run and Wait Modes" ] # [ inline ( always ) ] pub fn rstfltsrw ( & self ) -> RSTFLTSRW_R { RSTFLTSRW_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Reset Pin Filter Select in Stop Mode" ] # [ inline ( always ) ] pub fn rstfltss ( & self ) -> RSTFLTSS_R { RSTFLTSS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - Reset Pin Filter Select in Run and Wait Modes" ] # [ inline ( always ) ] pub fn rstfltsrw ( & mut self ) -> RSTFLTSRW_W { RSTFLTSRW_W { w : self } } # [ doc = "Bit 2 - Reset Pin Filter Select in Stop Mode" ] # [ inline ( always ) ] pub fn rstfltss ( & mut self ) -> RSTFLTSS_W { RSTFLTSS_W { w : self } } } } # [ doc = "Reset Pin Filter Width register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rpfw](rpfw) module" ] pub type RPFW = crate :: Reg < u8 , _RPFW > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RPFW ; # [ doc = "`read()` method returns [rpfw::R](rpfw::R) reader structure" ] impl crate :: Readable for RPFW { } # [ doc = "`write(|w| ..)` method takes [rpfw::W](rpfw::W) writer structure" ] impl crate :: Writable for RPFW { } # [ doc = "Reset Pin Filter Width register" ] pub mod rpfw { # [ doc = "Reader of register RPFW" ] pub type R = crate :: R < u8 , super :: RPFW > ; # [ doc = "Writer for register RPFW" ] pub type W = crate :: W < u8 , super :: RPFW > ; # [ doc = "Register RPFW `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RPFW { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reset Pin Filter Bus Clock Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSTFLTSEL_A { # [ doc = "0: Bus clock filter count is 1" ] _00000 , # [ doc = "1: Bus clock filter count is 2" ] _00001 , # [ doc = "2: Bus clock filter count is 3" ] _00010 , # [ doc = "3: Bus clock filter count is 4" ] _00011 , # [ doc = "4: Bus clock filter count is 5" ] _00100 , # [ doc = "5: Bus clock filter count is 6" ] _00101 , # [ doc = "6: Bus clock filter count is 7" ] _00110 , # [ doc = "7: Bus clock filter count is 8" ] _00111 , # [ doc = "8: Bus clock filter count is 9" ] _01000 , # [ doc = "9: Bus clock filter count is 10" ] _01001 , # [ doc = "10: Bus clock filter count is 11" ] _01010 , # [ doc = "11: Bus clock filter count is 12" ] _01011 , # [ doc = "12: Bus clock filter count is 13" ] _01100 , # [ doc = "13: Bus clock filter count is 14" ] _01101 , # [ doc = "14: Bus clock filter count is 15" ] _01110 , # [ doc = "15: Bus clock filter count is 16" ] _01111 , # [ doc = "16: Bus clock filter count is 17" ] _10000 , # [ doc = "17: Bus clock filter count is 18" ] _10001 , # [ doc = "18: Bus clock filter count is 19" ] _10010 , # [ doc = "19: Bus clock filter count is 20" ] _10011 , # [ doc = "20: Bus clock filter count is 21" ] _10100 , # [ doc = "21: Bus clock filter count is 22" ] _10101 , # [ doc = "22: Bus clock filter count is 23" ] _10110 , # [ doc = "23: Bus clock filter count is 24" ] _10111 , # [ doc = "24: Bus clock filter count is 25" ] _11000 , # [ doc = "25: Bus clock filter count is 26" ] _11001 , # [ doc = "26: Bus clock filter count is 27" ] _11010 , # [ doc = "27: Bus clock filter count is 28" ] _11011 , # [ doc = "28: Bus clock filter count is 29" ] _11100 , # [ doc = "29: Bus clock filter count is 30" ] _11101 , # [ doc = "30: Bus clock filter count is 31" ] _11110 , # [ doc = "31: Bus clock filter count is 32" ] _11111 } impl From < RSTFLTSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : RSTFLTSEL_A ) -> Self { match variant { RSTFLTSEL_A :: _00000 => 0 , RSTFLTSEL_A :: _00001 => 1 , RSTFLTSEL_A :: _00010 => 2 , RSTFLTSEL_A :: _00011 => 3 , RSTFLTSEL_A :: _00100 => 4 , RSTFLTSEL_A :: _00101 => 5 , RSTFLTSEL_A :: _00110 => 6 , RSTFLTSEL_A :: _00111 => 7 , RSTFLTSEL_A :: _01000 => 8 , RSTFLTSEL_A :: _01001 => 9 , RSTFLTSEL_A :: _01010 => 10 , RSTFLTSEL_A :: _01011 => 11 , RSTFLTSEL_A :: _01100 => 12 , RSTFLTSEL_A :: _01101 => 13 , RSTFLTSEL_A :: _01110 => 14 , RSTFLTSEL_A :: _01111 => 15 , RSTFLTSEL_A :: _10000 => 16 , RSTFLTSEL_A :: _10001 => 17 , RSTFLTSEL_A :: _10010 => 18 , RSTFLTSEL_A :: _10011 => 19 , RSTFLTSEL_A :: _10100 => 20 , RSTFLTSEL_A :: _10101 => 21 , RSTFLTSEL_A :: _10110 => 22 , RSTFLTSEL_A :: _10111 => 23 , RSTFLTSEL_A :: _11000 => 24 , RSTFLTSEL_A :: _11001 => 25 , RSTFLTSEL_A :: _11010 => 26 , RSTFLTSEL_A :: _11011 => 27 , RSTFLTSEL_A :: _11100 => 28 , RSTFLTSEL_A :: _11101 => 29 , RSTFLTSEL_A :: _11110 => 30 , RSTFLTSEL_A :: _11111 => 31 } } } # [ doc = "Reader of field `RSTFLTSEL`" ] pub type RSTFLTSEL_R = crate :: R < u8 , RSTFLTSEL_A > ; impl RSTFLTSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSTFLTSEL_A { match self . bits { 0 => RSTFLTSEL_A :: _00000 , 1 => RSTFLTSEL_A :: _00001 , 2 => RSTFLTSEL_A :: _00010 , 3 => RSTFLTSEL_A :: _00011 , 4 => RSTFLTSEL_A :: _00100 , 5 => RSTFLTSEL_A :: _00101 , 6 => RSTFLTSEL_A :: _00110 , 7 => RSTFLTSEL_A :: _00111 , 8 => RSTFLTSEL_A :: _01000 , 9 => RSTFLTSEL_A :: _01001 , 10 => RSTFLTSEL_A :: _01010 , 11 => RSTFLTSEL_A :: _01011 , 12 => RSTFLTSEL_A :: _01100 , 13 => RSTFLTSEL_A :: _01101 , 14 => RSTFLTSEL_A :: _01110 , 15 => RSTFLTSEL_A :: _01111 , 16 => RSTFLTSEL_A :: _10000 , 17 => RSTFLTSEL_A :: _10001 , 18 => RSTFLTSEL_A :: _10010 , 19 => RSTFLTSEL_A :: _10011 , 20 => RSTFLTSEL_A :: _10100 , 21 => RSTFLTSEL_A :: _10101 , 22 => RSTFLTSEL_A :: _10110 , 23 => RSTFLTSEL_A :: _10111 , 24 => RSTFLTSEL_A :: _11000 , 25 => RSTFLTSEL_A :: _11001 , 26 => RSTFLTSEL_A :: _11010 , 27 => RSTFLTSEL_A :: _11011 , 28 => RSTFLTSEL_A :: _11100 , 29 => RSTFLTSEL_A :: _11101 , 30 => RSTFLTSEL_A :: _11110 , 31 => RSTFLTSEL_A :: _11111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00000`" ] # [ inline ( always ) ] pub fn is_00000 ( & self ) -> bool { * self == RSTFLTSEL_A :: _00000 } # [ doc = "Checks if the value of the field is `_00001`" ] # [ inline ( always ) ] pub fn is_00001 ( & self ) -> bool { * self == RSTFLTSEL_A :: _00001 } # [ doc = "Checks if the value of the field is `_00010`" ] # [ inline ( always ) ] pub fn is_00010 ( & self ) -> bool { * self == RSTFLTSEL_A :: _00010 } # [ doc = "Checks if the value of the field is `_00011`" ] # [ inline ( always ) ] pub fn is_00011 ( & self ) -> bool { * self == RSTFLTSEL_A :: _00011 } # [ doc = "Checks if the value of the field is `_00100`" ] # [ inline ( always ) ] pub fn is_00100 ( & self ) -> bool { * self == RSTFLTSEL_A :: _00100 } # [ doc = "Checks if the value of the field is `_00101`" ] # [ inline ( always ) ] pub fn is_00101 ( & self ) -> bool { * self == RSTFLTSEL_A :: _00101 } # [ doc = "Checks if the value of the field is `_00110`" ] # [ inline ( always ) ] pub fn is_00110 ( & self ) -> bool { * self == RSTFLTSEL_A :: _00110 } # [ doc = "Checks if the value of the field is `_00111`" ] # [ inline ( always ) ] pub fn is_00111 ( & self ) -> bool { * self == RSTFLTSEL_A :: _00111 } # [ doc = "Checks if the value of the field is `_01000`" ] # [ inline ( always ) ] pub fn is_01000 ( & self ) -> bool { * self == RSTFLTSEL_A :: _01000 } # [ doc = "Checks if the value of the field is `_01001`" ] # [ inline ( always ) ] pub fn is_01001 ( & self ) -> bool { * self == RSTFLTSEL_A :: _01001 } # [ doc = "Checks if the value of the field is `_01010`" ] # [ inline ( always ) ] pub fn is_01010 ( & self ) -> bool { * self == RSTFLTSEL_A :: _01010 } # [ doc = "Checks if the value of the field is `_01011`" ] # [ inline ( always ) ] pub fn is_01011 ( & self ) -> bool { * self == RSTFLTSEL_A :: _01011 } # [ doc = "Checks if the value of the field is `_01100`" ] # [ inline ( always ) ] pub fn is_01100 ( & self ) -> bool { * self == RSTFLTSEL_A :: _01100 } # [ doc = "Checks if the value of the field is `_01101`" ] # [ inline ( always ) ] pub fn is_01101 ( & self ) -> bool { * self == RSTFLTSEL_A :: _01101 } # [ doc = "Checks if the value of the field is `_01110`" ] # [ inline ( always ) ] pub fn is_01110 ( & self ) -> bool { * self == RSTFLTSEL_A :: _01110 } # [ doc = "Checks if the value of the field is `_01111`" ] # [ inline ( always ) ] pub fn is_01111 ( & self ) -> bool { * self == RSTFLTSEL_A :: _01111 } # [ doc = "Checks if the value of the field is `_10000`" ] # [ inline ( always ) ] pub fn is_10000 ( & self ) -> bool { * self == RSTFLTSEL_A :: _10000 } # [ doc = "Checks if the value of the field is `_10001`" ] # [ inline ( always ) ] pub fn is_10001 ( & self ) -> bool { * self == RSTFLTSEL_A :: _10001 } # [ doc = "Checks if the value of the field is `_10010`" ] # [ inline ( always ) ] pub fn is_10010 ( & self ) -> bool { * self == RSTFLTSEL_A :: _10010 } # [ doc = "Checks if the value of the field is `_10011`" ] # [ inline ( always ) ] pub fn is_10011 ( & self ) -> bool { * self == RSTFLTSEL_A :: _10011 } # [ doc = "Checks if the value of the field is `_10100`" ] # [ inline ( always ) ] pub fn is_10100 ( & self ) -> bool { * self == RSTFLTSEL_A :: _10100 } # [ doc = "Checks if the value of the field is `_10101`" ] # [ inline ( always ) ] pub fn is_10101 ( & self ) -> bool { * self == RSTFLTSEL_A :: _10101 } # [ doc = "Checks if the value of the field is `_10110`" ] # [ inline ( always ) ] pub fn is_10110 ( & self ) -> bool { * self == RSTFLTSEL_A :: _10110 } # [ doc = "Checks if the value of the field is `_10111`" ] # [ inline ( always ) ] pub fn is_10111 ( & self ) -> bool { * self == RSTFLTSEL_A :: _10111 } # [ doc = "Checks if the value of the field is `_11000`" ] # [ inline ( always ) ] pub fn is_11000 ( & self ) -> bool { * self == RSTFLTSEL_A :: _11000 } # [ doc = "Checks if the value of the field is `_11001`" ] # [ inline ( always ) ] pub fn is_11001 ( & self ) -> bool { * self == RSTFLTSEL_A :: _11001 } # [ doc = "Checks if the value of the field is `_11010`" ] # [ inline ( always ) ] pub fn is_11010 ( & self ) -> bool { * self == RSTFLTSEL_A :: _11010 } # [ doc = "Checks if the value of the field is `_11011`" ] # [ inline ( always ) ] pub fn is_11011 ( & self ) -> bool { * self == RSTFLTSEL_A :: _11011 } # [ doc = "Checks if the value of the field is `_11100`" ] # [ inline ( always ) ] pub fn is_11100 ( & self ) -> bool { * self == RSTFLTSEL_A :: _11100 } # [ doc = "Checks if the value of the field is `_11101`" ] # [ inline ( always ) ] pub fn is_11101 ( & self ) -> bool { * self == RSTFLTSEL_A :: _11101 } # [ doc = "Checks if the value of the field is `_11110`" ] # [ inline ( always ) ] pub fn is_11110 ( & self ) -> bool { * self == RSTFLTSEL_A :: _11110 } # [ doc = "Checks if the value of the field is `_11111`" ] # [ inline ( always ) ] pub fn is_11111 ( & self ) -> bool { * self == RSTFLTSEL_A :: _11111 } } # [ doc = "Write proxy for field `RSTFLTSEL`" ] pub struct RSTFLTSEL_W < 'a > { w : & 'a mut W , } impl < 'a > RSTFLTSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSTFLTSEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Bus clock filter count is 1" ] # [ inline ( always ) ] pub fn _00000 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _00000 ) } # [ doc = "Bus clock filter count is 2" ] # [ inline ( always ) ] pub fn _00001 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _00001 ) } # [ doc = "Bus clock filter count is 3" ] # [ inline ( always ) ] pub fn _00010 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _00010 ) } # [ doc = "Bus clock filter count is 4" ] # [ inline ( always ) ] pub fn _00011 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _00011 ) } # [ doc = "Bus clock filter count is 5" ] # [ inline ( always ) ] pub fn _00100 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _00100 ) } # [ doc = "Bus clock filter count is 6" ] # [ inline ( always ) ] pub fn _00101 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _00101 ) } # [ doc = "Bus clock filter count is 7" ] # [ inline ( always ) ] pub fn _00110 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _00110 ) } # [ doc = "Bus clock filter count is 8" ] # [ inline ( always ) ] pub fn _00111 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _00111 ) } # [ doc = "Bus clock filter count is 9" ] # [ inline ( always ) ] pub fn _01000 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _01000 ) } # [ doc = "Bus clock filter count is 10" ] # [ inline ( always ) ] pub fn _01001 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _01001 ) } # [ doc = "Bus clock filter count is 11" ] # [ inline ( always ) ] pub fn _01010 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _01010 ) } # [ doc = "Bus clock filter count is 12" ] # [ inline ( always ) ] pub fn _01011 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _01011 ) } # [ doc = "Bus clock filter count is 13" ] # [ inline ( always ) ] pub fn _01100 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _01100 ) } # [ doc = "Bus clock filter count is 14" ] # [ inline ( always ) ] pub fn _01101 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _01101 ) } # [ doc = "Bus clock filter count is 15" ] # [ inline ( always ) ] pub fn _01110 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _01110 ) } # [ doc = "Bus clock filter count is 16" ] # [ inline ( always ) ] pub fn _01111 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _01111 ) } # [ doc = "Bus clock filter count is 17" ] # [ inline ( always ) ] pub fn _10000 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _10000 ) } # [ doc = "Bus clock filter count is 18" ] # [ inline ( always ) ] pub fn _10001 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _10001 ) } # [ doc = "Bus clock filter count is 19" ] # [ inline ( always ) ] pub fn _10010 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _10010 ) } # [ doc = "Bus clock filter count is 20" ] # [ inline ( always ) ] pub fn _10011 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _10011 ) } # [ doc = "Bus clock filter count is 21" ] # [ inline ( always ) ] pub fn _10100 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _10100 ) } # [ doc = "Bus clock filter count is 22" ] # [ inline ( always ) ] pub fn _10101 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _10101 ) } # [ doc = "Bus clock filter count is 23" ] # [ inline ( always ) ] pub fn _10110 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _10110 ) } # [ doc = "Bus clock filter count is 24" ] # [ inline ( always ) ] pub fn _10111 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _10111 ) } # [ doc = "Bus clock filter count is 25" ] # [ inline ( always ) ] pub fn _11000 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _11000 ) } # [ doc = "Bus clock filter count is 26" ] # [ inline ( always ) ] pub fn _11001 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _11001 ) } # [ doc = "Bus clock filter count is 27" ] # [ inline ( always ) ] pub fn _11010 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _11010 ) } # [ doc = "Bus clock filter count is 28" ] # [ inline ( always ) ] pub fn _11011 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _11011 ) } # [ doc = "Bus clock filter count is 29" ] # [ inline ( always ) ] pub fn _11100 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _11100 ) } # [ doc = "Bus clock filter count is 30" ] # [ inline ( always ) ] pub fn _11101 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _11101 ) } # [ doc = "Bus clock filter count is 31" ] # [ inline ( always ) ] pub fn _11110 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _11110 ) } # [ doc = "Bus clock filter count is 32" ] # [ inline ( always ) ] pub fn _11111 ( self ) -> & 'a mut W { self . variant ( RSTFLTSEL_A :: _11111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x1f ) | ( ( value as u8 ) & 0x1f ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Reset Pin Filter Bus Clock Select" ] # [ inline ( always ) ] pub fn rstfltsel ( & self ) -> RSTFLTSEL_R { RSTFLTSEL_R :: new ( ( self . bits & 0x1f ) as u8 ) } } impl W { # [ doc = "Bits 0:4 - Reset Pin Filter Bus Clock Select" ] # [ inline ( always ) ] pub fn rstfltsel ( & mut self ) -> RSTFLTSEL_W { RSTFLTSEL_W { w : self } } } } # [ doc = "Mode Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mr](mr) module" ] pub type MR = crate :: Reg < u8 , _MR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MR ; # [ doc = "`read()` method returns [mr::R](mr::R) reader structure" ] impl crate :: Readable for MR { } # [ doc = "Mode Register" ] pub mod mr { # [ doc = "Reader of register MR" ] pub type R = crate :: R < u8 , super :: MR > ; # [ doc = "EZP_MS_B pin state\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EZP_MS_A { # [ doc = "0: Pin deasserted (logic 1)" ] _0 , # [ doc = "1: Pin asserted (logic 0)" ] _1 } impl From < EZP_MS_A > for bool { # [ inline ( always ) ] fn from ( variant : EZP_MS_A ) -> Self { match variant { EZP_MS_A :: _0 => false , EZP_MS_A :: _1 => true } } } # [ doc = "Reader of field `EZP_MS`" ] pub type EZP_MS_R = crate :: R < bool , EZP_MS_A > ; impl EZP_MS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EZP_MS_A { match self . bits { false => EZP_MS_A :: _0 , true => EZP_MS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EZP_MS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EZP_MS_A :: _1 } } impl R { # [ doc = "Bit 1 - EZP_MS_B pin state" ] # [ inline ( always ) ] pub fn ezp_ms ( & self ) -> EZP_MS_R { EZP_MS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } } } # [ doc = "Sticky System Reset Status Register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ssrs0](ssrs0) module" ] pub type SSRS0 = crate :: Reg < u8 , _SSRS0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SSRS0 ; # [ doc = "`read()` method returns [ssrs0::R](ssrs0::R) reader structure" ] impl crate :: Readable for SSRS0 { } # [ doc = "`write(|w| ..)` method takes [ssrs0::W](ssrs0::W) writer structure" ] impl crate :: Writable for SSRS0 { } # [ doc = "Sticky System Reset Status Register 0" ] pub mod ssrs0 { # [ doc = "Reader of register SSRS0" ] pub type R = crate :: R < u8 , super :: SSRS0 > ; # [ doc = "Writer for register SSRS0" ] pub type W = crate :: W < u8 , super :: SSRS0 > ; # [ doc = "Register SSRS0 `reset()`'s with value 0x82" ] impl crate :: ResetValue for super :: SSRS0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x82 } } # [ doc = "Sticky Low Leakage Wakeup Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWAKEUP_A { # [ doc = "0: Reset not caused by LLWU module wakeup source" ] _0 , # [ doc = "1: Reset caused by LLWU module wakeup source" ] _1 } impl From < SWAKEUP_A > for bool { # [ inline ( always ) ] fn from ( variant : SWAKEUP_A ) -> Self { match variant { SWAKEUP_A :: _0 => false , SWAKEUP_A :: _1 => true } } } # [ doc = "Reader of field `SWAKEUP`" ] pub type SWAKEUP_R = crate :: R < bool , SWAKEUP_A > ; impl SWAKEUP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWAKEUP_A { match self . bits { false => SWAKEUP_A :: _0 , true => SWAKEUP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWAKEUP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWAKEUP_A :: _1 } } # [ doc = "Write proxy for field `SWAKEUP`" ] pub struct SWAKEUP_W < 'a > { w : & 'a mut W , } impl < 'a > SWAKEUP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWAKEUP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by LLWU module wakeup source" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWAKEUP_A :: _0 ) } # [ doc = "Reset caused by LLWU module wakeup source" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWAKEUP_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Sticky Low-Voltage Detect Reset\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLVD_A { # [ doc = "0: Reset not caused by LVD trip or POR" ] _0 , # [ doc = "1: Reset caused by LVD trip or POR" ] _1 } impl From < SLVD_A > for bool { # [ inline ( always ) ] fn from ( variant : SLVD_A ) -> Self { match variant { SLVD_A :: _0 => false , SLVD_A :: _1 => true } } } # [ doc = "Reader of field `SLVD`" ] pub type SLVD_R = crate :: R < bool , SLVD_A > ; impl SLVD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLVD_A { match self . bits { false => SLVD_A :: _0 , true => SLVD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLVD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLVD_A :: _1 } } # [ doc = "Write proxy for field `SLVD`" ] pub struct SLVD_W < 'a > { w : & 'a mut W , } impl < 'a > SLVD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLVD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by LVD trip or POR" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLVD_A :: _0 ) } # [ doc = "Reset caused by LVD trip or POR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLVD_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Sticky Loss-of-Clock Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLOC_A { # [ doc = "0: Reset not caused by a loss of external clock." ] _0 , # [ doc = "1: Reset caused by a loss of external clock." ] _1 } impl From < SLOC_A > for bool { # [ inline ( always ) ] fn from ( variant : SLOC_A ) -> Self { match variant { SLOC_A :: _0 => false , SLOC_A :: _1 => true } } } # [ doc = "Reader of field `SLOC`" ] pub type SLOC_R = crate :: R < bool , SLOC_A > ; impl SLOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLOC_A { match self . bits { false => SLOC_A :: _0 , true => SLOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLOC_A :: _1 } } # [ doc = "Write proxy for field `SLOC`" ] pub struct SLOC_W < 'a > { w : & 'a mut W , } impl < 'a > SLOC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLOC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by a loss of external clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLOC_A :: _0 ) } # [ doc = "Reset caused by a loss of external clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLOC_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Sticky Loss-of-Lock Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLOL_A { # [ doc = "0: Reset not caused by a loss of lock in the PLL" ] _0 , # [ doc = "1: Reset caused by a loss of lock in the PLL" ] _1 } impl From < SLOL_A > for bool { # [ inline ( always ) ] fn from ( variant : SLOL_A ) -> Self { match variant { SLOL_A :: _0 => false , SLOL_A :: _1 => true } } } # [ doc = "Reader of field `SLOL`" ] pub type SLOL_R = crate :: R < bool , SLOL_A > ; impl SLOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLOL_A { match self . bits { false => SLOL_A :: _0 , true => SLOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLOL_A :: _1 } } # [ doc = "Write proxy for field `SLOL`" ] pub struct SLOL_W < 'a > { w : & 'a mut W , } impl < 'a > SLOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by a loss of lock in the PLL" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLOL_A :: _0 ) } # [ doc = "Reset caused by a loss of lock in the PLL" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLOL_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Sticky Watchdog\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SWDOG_A { # [ doc = "0: Reset not caused by watchdog timeout" ] _0 , # [ doc = "1: Reset caused by watchdog timeout" ] _1 } impl From < SWDOG_A > for bool { # [ inline ( always ) ] fn from ( variant : SWDOG_A ) -> Self { match variant { SWDOG_A :: _0 => false , SWDOG_A :: _1 => true } } } # [ doc = "Reader of field `SWDOG`" ] pub type SWDOG_R = crate :: R < bool , SWDOG_A > ; impl SWDOG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SWDOG_A { match self . bits { false => SWDOG_A :: _0 , true => SWDOG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SWDOG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SWDOG_A :: _1 } } # [ doc = "Write proxy for field `SWDOG`" ] pub struct SWDOG_W < 'a > { w : & 'a mut W , } impl < 'a > SWDOG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SWDOG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by watchdog timeout" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SWDOG_A :: _0 ) } # [ doc = "Reset caused by watchdog timeout" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SWDOG_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "Sticky External Reset Pin\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SPIN_A { # [ doc = "0: Reset not caused by external reset pin" ] _0 , # [ doc = "1: Reset caused by external reset pin" ] _1 } impl From < SPIN_A > for bool { # [ inline ( always ) ] fn from ( variant : SPIN_A ) -> Self { match variant { SPIN_A :: _0 => false , SPIN_A :: _1 => true } } } # [ doc = "Reader of field `SPIN`" ] pub type SPIN_R = crate :: R < bool , SPIN_A > ; impl SPIN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SPIN_A { match self . bits { false => SPIN_A :: _0 , true => SPIN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SPIN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SPIN_A :: _1 } } # [ doc = "Write proxy for field `SPIN`" ] pub struct SPIN_W < 'a > { w : & 'a mut W , } impl < 'a > SPIN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SPIN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by external reset pin" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SPIN_A :: _0 ) } # [ doc = "Reset caused by external reset pin" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SPIN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "Sticky Power-On Reset\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SPOR_A { # [ doc = "0: Reset not caused by POR" ] _0 , # [ doc = "1: Reset caused by POR" ] _1 } impl From < SPOR_A > for bool { # [ inline ( always ) ] fn from ( variant : SPOR_A ) -> Self { match variant { SPOR_A :: _0 => false , SPOR_A :: _1 => true } } } # [ doc = "Reader of field `SPOR`" ] pub type SPOR_R = crate :: R < bool , SPOR_A > ; impl SPOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SPOR_A { match self . bits { false => SPOR_A :: _0 , true => SPOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SPOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SPOR_A :: _1 } } # [ doc = "Write proxy for field `SPOR`" ] pub struct SPOR_W < 'a > { w : & 'a mut W , } impl < 'a > SPOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SPOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by POR" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SPOR_A :: _0 ) } # [ doc = "Reset caused by POR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SPOR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - Sticky Low Leakage Wakeup Reset" ] # [ inline ( always ) ] pub fn swakeup ( & self ) -> SWAKEUP_R { SWAKEUP_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Sticky Low-Voltage Detect Reset" ] # [ inline ( always ) ] pub fn slvd ( & self ) -> SLVD_R { SLVD_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Sticky Loss-of-Clock Reset" ] # [ inline ( always ) ] pub fn sloc ( & self ) -> SLOC_R { SLOC_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Sticky Loss-of-Lock Reset" ] # [ inline ( always ) ] pub fn slol ( & self ) -> SLOL_R { SLOL_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Sticky Watchdog" ] # [ inline ( always ) ] pub fn swdog ( & self ) -> SWDOG_R { SWDOG_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Sticky External Reset Pin" ] # [ inline ( always ) ] pub fn spin ( & self ) -> SPIN_R { SPIN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Sticky Power-On Reset" ] # [ inline ( always ) ] pub fn spor ( & self ) -> SPOR_R { SPOR_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Sticky Low Leakage Wakeup Reset" ] # [ inline ( always ) ] pub fn swakeup ( & mut self ) -> SWAKEUP_W { SWAKEUP_W { w : self } } # [ doc = "Bit 1 - Sticky Low-Voltage Detect Reset" ] # [ inline ( always ) ] pub fn slvd ( & mut self ) -> SLVD_W { SLVD_W { w : self } } # [ doc = "Bit 2 - Sticky Loss-of-Clock Reset" ] # [ inline ( always ) ] pub fn sloc ( & mut self ) -> SLOC_W { SLOC_W { w : self } } # [ doc = "Bit 3 - Sticky Loss-of-Lock Reset" ] # [ inline ( always ) ] pub fn slol ( & mut self ) -> SLOL_W { SLOL_W { w : self } } # [ doc = "Bit 5 - Sticky Watchdog" ] # [ inline ( always ) ] pub fn swdog ( & mut self ) -> SWDOG_W { SWDOG_W { w : self } } # [ doc = "Bit 6 - Sticky External Reset Pin" ] # [ inline ( always ) ] pub fn spin ( & mut self ) -> SPIN_W { SPIN_W { w : self } } # [ doc = "Bit 7 - Sticky Power-On Reset" ] # [ inline ( always ) ] pub fn spor ( & mut self ) -> SPOR_W { SPOR_W { w : self } } } } # [ doc = "Sticky System Reset Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ssrs1](ssrs1) module" ] pub type SSRS1 = crate :: Reg < u8 , _SSRS1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SSRS1 ; # [ doc = "`read()` method returns [ssrs1::R](ssrs1::R) reader structure" ] impl crate :: Readable for SSRS1 { } # [ doc = "`write(|w| ..)` method takes [ssrs1::W](ssrs1::W) writer structure" ] impl crate :: Writable for SSRS1 { } # [ doc = "Sticky System Reset Status Register 1" ] pub mod ssrs1 { # [ doc = "Reader of register SSRS1" ] pub type R = crate :: R < u8 , super :: SSRS1 > ; # [ doc = "Writer for register SSRS1" ] pub type W = crate :: W < u8 , super :: SSRS1 > ; # [ doc = "Register SSRS1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SSRS1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Sticky JTAG Generated Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SJTAG_A { # [ doc = "0: Reset not caused by JTAG" ] _0 , # [ doc = "1: Reset caused by JTAG" ] _1 } impl From < SJTAG_A > for bool { # [ inline ( always ) ] fn from ( variant : SJTAG_A ) -> Self { match variant { SJTAG_A :: _0 => false , SJTAG_A :: _1 => true } } } # [ doc = "Reader of field `SJTAG`" ] pub type SJTAG_R = crate :: R < bool , SJTAG_A > ; impl SJTAG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SJTAG_A { match self . bits { false => SJTAG_A :: _0 , true => SJTAG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SJTAG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SJTAG_A :: _1 } } # [ doc = "Write proxy for field `SJTAG`" ] pub struct SJTAG_W < 'a > { w : & 'a mut W , } impl < 'a > SJTAG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SJTAG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by JTAG" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SJTAG_A :: _0 ) } # [ doc = "Reset caused by JTAG" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SJTAG_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "Sticky Core Lockup\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLOCKUP_A { # [ doc = "0: Reset not caused by core LOCKUP event" ] _0 , # [ doc = "1: Reset caused by core LOCKUP event" ] _1 } impl From < SLOCKUP_A > for bool { # [ inline ( always ) ] fn from ( variant : SLOCKUP_A ) -> Self { match variant { SLOCKUP_A :: _0 => false , SLOCKUP_A :: _1 => true } } } # [ doc = "Reader of field `SLOCKUP`" ] pub type SLOCKUP_R = crate :: R < bool , SLOCKUP_A > ; impl SLOCKUP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLOCKUP_A { match self . bits { false => SLOCKUP_A :: _0 , true => SLOCKUP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLOCKUP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLOCKUP_A :: _1 } } # [ doc = "Write proxy for field `SLOCKUP`" ] pub struct SLOCKUP_W < 'a > { w : & 'a mut W , } impl < 'a > SLOCKUP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLOCKUP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by core LOCKUP event" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLOCKUP_A :: _0 ) } # [ doc = "Reset caused by core LOCKUP event" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLOCKUP_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "Sticky Software\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SSW_A { # [ doc = "0: Reset not caused by software setting of SYSRESETREQ bit" ] _0 , # [ doc = "1: Reset caused by software setting of SYSRESETREQ bit" ] _1 } impl From < SSW_A > for bool { # [ inline ( always ) ] fn from ( variant : SSW_A ) -> Self { match variant { SSW_A :: _0 => false , SSW_A :: _1 => true } } } # [ doc = "Reader of field `SSW`" ] pub type SSW_R = crate :: R < bool , SSW_A > ; impl SSW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SSW_A { match self . bits { false => SSW_A :: _0 , true => SSW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SSW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SSW_A :: _1 } } # [ doc = "Write proxy for field `SSW`" ] pub struct SSW_W < 'a > { w : & 'a mut W , } impl < 'a > SSW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SSW_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by software setting of SYSRESETREQ bit" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SSW_A :: _0 ) } # [ doc = "Reset caused by software setting of SYSRESETREQ bit" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SSW_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "Sticky MDM-AP System Reset Request\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SMDM_AP_A { # [ doc = "0: Reset not caused by host debugger system setting of the System Reset Request bit" ] _0 , # [ doc = "1: Reset caused by host debugger system setting of the System Reset Request bit" ] _1 } impl From < SMDM_AP_A > for bool { # [ inline ( always ) ] fn from ( variant : SMDM_AP_A ) -> Self { match variant { SMDM_AP_A :: _0 => false , SMDM_AP_A :: _1 => true } } } # [ doc = "Reader of field `SMDM_AP`" ] pub type SMDM_AP_R = crate :: R < bool , SMDM_AP_A > ; impl SMDM_AP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SMDM_AP_A { match self . bits { false => SMDM_AP_A :: _0 , true => SMDM_AP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SMDM_AP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SMDM_AP_A :: _1 } } # [ doc = "Write proxy for field `SMDM_AP`" ] pub struct SMDM_AP_W < 'a > { w : & 'a mut W , } impl < 'a > SMDM_AP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SMDM_AP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by host debugger system setting of the System Reset Request bit" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SMDM_AP_A :: _0 ) } # [ doc = "Reset caused by host debugger system setting of the System Reset Request bit" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SMDM_AP_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Sticky EzPort Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEZPT_A { # [ doc = "0: Reset not caused by EzPort receiving the RESET command while the device is in EzPort mode" ] _0 , # [ doc = "1: Reset caused by EzPort receiving the RESET command while the device is in EzPort mode" ] _1 } impl From < SEZPT_A > for bool { # [ inline ( always ) ] fn from ( variant : SEZPT_A ) -> Self { match variant { SEZPT_A :: _0 => false , SEZPT_A :: _1 => true } } } # [ doc = "Reader of field `SEZPT`" ] pub type SEZPT_R = crate :: R < bool , SEZPT_A > ; impl SEZPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEZPT_A { match self . bits { false => SEZPT_A :: _0 , true => SEZPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SEZPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SEZPT_A :: _1 } } # [ doc = "Write proxy for field `SEZPT`" ] pub struct SEZPT_W < 'a > { w : & 'a mut W , } impl < 'a > SEZPT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SEZPT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by EzPort receiving the RESET command while the device is in EzPort mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SEZPT_A :: _0 ) } # [ doc = "Reset caused by EzPort receiving the RESET command while the device is in EzPort mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SEZPT_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Sticky Stop Mode Acknowledge Error Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SSACKERR_A { # [ doc = "0: Reset not caused by peripheral failure to acknowledge attempt to enter stop mode" ] _0 , # [ doc = "1: Reset caused by peripheral failure to acknowledge attempt to enter stop mode" ] _1 } impl From < SSACKERR_A > for bool { # [ inline ( always ) ] fn from ( variant : SSACKERR_A ) -> Self { match variant { SSACKERR_A :: _0 => false , SSACKERR_A :: _1 => true } } } # [ doc = "Reader of field `SSACKERR`" ] pub type SSACKERR_R = crate :: R < bool , SSACKERR_A > ; impl SSACKERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SSACKERR_A { match self . bits { false => SSACKERR_A :: _0 , true => SSACKERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SSACKERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SSACKERR_A :: _1 } } # [ doc = "Write proxy for field `SSACKERR`" ] pub struct SSACKERR_W < 'a > { w : & 'a mut W , } impl < 'a > SSACKERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SSACKERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset not caused by peripheral failure to acknowledge attempt to enter stop mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SSACKERR_A :: _0 ) } # [ doc = "Reset caused by peripheral failure to acknowledge attempt to enter stop mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SSACKERR_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } impl R { # [ doc = "Bit 0 - Sticky JTAG Generated Reset" ] # [ inline ( always ) ] pub fn sjtag ( & self ) -> SJTAG_R { SJTAG_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Sticky Core Lockup" ] # [ inline ( always ) ] pub fn slockup ( & self ) -> SLOCKUP_R { SLOCKUP_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Sticky Software" ] # [ inline ( always ) ] pub fn ssw ( & self ) -> SSW_R { SSW_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Sticky MDM-AP System Reset Request" ] # [ inline ( always ) ] pub fn smdm_ap ( & self ) -> SMDM_AP_R { SMDM_AP_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Sticky EzPort Reset" ] # [ inline ( always ) ] pub fn sezpt ( & self ) -> SEZPT_R { SEZPT_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Sticky Stop Mode Acknowledge Error Reset" ] # [ inline ( always ) ] pub fn ssackerr ( & self ) -> SSACKERR_R { SSACKERR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Sticky JTAG Generated Reset" ] # [ inline ( always ) ] pub fn sjtag ( & mut self ) -> SJTAG_W { SJTAG_W { w : self } } # [ doc = "Bit 1 - Sticky Core Lockup" ] # [ inline ( always ) ] pub fn slockup ( & mut self ) -> SLOCKUP_W { SLOCKUP_W { w : self } } # [ doc = "Bit 2 - Sticky Software" ] # [ inline ( always ) ] pub fn ssw ( & mut self ) -> SSW_W { SSW_W { w : self } } # [ doc = "Bit 3 - Sticky MDM-AP System Reset Request" ] # [ inline ( always ) ] pub fn smdm_ap ( & mut self ) -> SMDM_AP_W { SMDM_AP_W { w : self } } # [ doc = "Bit 4 - Sticky EzPort Reset" ] # [ inline ( always ) ] pub fn sezpt ( & mut self ) -> SEZPT_W { SEZPT_W { w : self } } # [ doc = "Bit 5 - Sticky Stop Mode Acknowledge Error Reset" ] # [ inline ( always ) ] pub fn ssackerr ( & mut self ) -> SSACKERR_W { SSACKERR_W { w : self } } } } } # [ doc = "Random Number Generator Accelerator" ] pub struct RNG { _marker : PhantomData < * const ( ) > } unsafe impl Send for RNG { } impl RNG { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const rng :: RegisterBlock { 0x400a_0000 as * const _ } } impl Deref for RNG { type Target = rng :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * RNG :: ptr ( ) } } } # [ doc = "Random Number Generator Accelerator" ] pub mod rng { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - RNGA Control Register" ] pub cr : CR , # [ doc = "0x04 - RNGA Status Register" ] pub sr : SR , # [ doc = "0x08 - RNGA Entropy Register" ] pub er : ER , # [ doc = "0x0c - RNGA Output Register" ] pub or : OR , } # [ doc = "RNGA Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr](cr) module" ] pub type CR = crate :: Reg < u32 , _CR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR ; # [ doc = "`read()` method returns [cr::R](cr::R) reader structure" ] impl crate :: Readable for CR { } # [ doc = "`write(|w| ..)` method takes [cr::W](cr::W) writer structure" ] impl crate :: Writable for CR { } # [ doc = "RNGA Control Register" ] pub mod cr { # [ doc = "Reader of register CR" ] pub type R = crate :: R < u32 , super :: CR > ; # [ doc = "Writer for register CR" ] pub type W = crate :: W < u32 , super :: CR > ; # [ doc = "Register CR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Go\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GO_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < GO_A > for bool { # [ inline ( always ) ] fn from ( variant : GO_A ) -> Self { match variant { GO_A :: _0 => false , GO_A :: _1 => true } } } # [ doc = "Reader of field `GO`" ] pub type GO_R = crate :: R < bool , GO_A > ; impl GO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GO_A { match self . bits { false => GO_A :: _0 , true => GO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GO_A :: _1 } } # [ doc = "Write proxy for field `GO`" ] pub struct GO_W < 'a > { w : & 'a mut W , } impl < 'a > GO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GO_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GO_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "High Assurance\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HA_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < HA_A > for bool { # [ inline ( always ) ] fn from ( variant : HA_A ) -> Self { match variant { HA_A :: _0 => false , HA_A :: _1 => true } } } # [ doc = "Reader of field `HA`" ] pub type HA_R = crate :: R < bool , HA_A > ; impl HA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HA_A { match self . bits { false => HA_A :: _0 , true => HA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HA_A :: _1 } } # [ doc = "Write proxy for field `HA`" ] pub struct HA_W < 'a > { w : & 'a mut W , } impl < 'a > HA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HA_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HA_A :: _1 ) } # [ 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 } } # [ doc = "Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INTM_A { # [ doc = "0: Not masked" ] _0 , # [ doc = "1: Masked" ] _1 } impl From < INTM_A > for bool { # [ inline ( always ) ] fn from ( variant : INTM_A ) -> Self { match variant { INTM_A :: _0 => false , INTM_A :: _1 => true } } } # [ doc = "Reader of field `INTM`" ] pub type INTM_R = crate :: R < bool , INTM_A > ; impl INTM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INTM_A { match self . bits { false => INTM_A :: _0 , true => INTM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INTM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INTM_A :: _1 } } # [ doc = "Write proxy for field `INTM`" ] pub struct INTM_W < 'a > { w : & 'a mut W , } impl < 'a > INTM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INTM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INTM_A :: _0 ) } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INTM_A :: _1 ) } # [ 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 = "Clear Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLRI_AW { # [ doc = "0: Do not clear the interrupt." ] _0 , # [ doc = "1: Clear the interrupt. When you write 1 to this field, RNGA then resets the error-interrupt indicator (SR\\[ERRI\\]). This bit always reads as 0." ] _1 } impl From < CLRI_AW > for bool { # [ inline ( always ) ] fn from ( variant : CLRI_AW ) -> Self { match variant { CLRI_AW :: _0 => false , CLRI_AW :: _1 => true } } } # [ doc = "Write proxy for field `CLRI`" ] pub struct CLRI_W < 'a > { w : & 'a mut W , } impl < 'a > CLRI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLRI_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLRI_AW :: _0 ) } # [ doc = "Clear the interrupt. When you write 1 to this field, RNGA then resets the error-interrupt indicator (SR\\[ERRI\\]). This bit always reads as 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLRI_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Sleep\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLP_A { # [ doc = "0: Normal mode" ] _0 , # [ doc = "1: Sleep (low-power) mode" ] _1 } impl From < SLP_A > for bool { # [ inline ( always ) ] fn from ( variant : SLP_A ) -> Self { match variant { SLP_A :: _0 => false , SLP_A :: _1 => true } } } # [ doc = "Reader of field `SLP`" ] pub type SLP_R = crate :: R < bool , SLP_A > ; impl SLP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLP_A { match self . bits { false => SLP_A :: _0 , true => SLP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLP_A :: _1 } } # [ doc = "Write proxy for field `SLP`" ] pub struct SLP_W < 'a > { w : & 'a mut W , } impl < 'a > SLP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLP_A :: _0 ) } # [ doc = "Sleep (low-power) mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLP_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 0 - Go" ] # [ inline ( always ) ] pub fn go ( & self ) -> GO_R { GO_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - High Assurance" ] # [ inline ( always ) ] pub fn ha ( & self ) -> HA_R { HA_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Interrupt Mask" ] # [ inline ( always ) ] pub fn intm ( & self ) -> INTM_R { INTM_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Sleep" ] # [ inline ( always ) ] pub fn slp ( & self ) -> SLP_R { SLP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Go" ] # [ inline ( always ) ] pub fn go ( & mut self ) -> GO_W { GO_W { w : self } } # [ doc = "Bit 1 - High Assurance" ] # [ inline ( always ) ] pub fn ha ( & mut self ) -> HA_W { HA_W { w : self } } # [ doc = "Bit 2 - Interrupt Mask" ] # [ inline ( always ) ] pub fn intm ( & mut self ) -> INTM_W { INTM_W { w : self } } # [ doc = "Bit 3 - Clear Interrupt" ] # [ inline ( always ) ] pub fn clri ( & mut self ) -> CLRI_W { CLRI_W { w : self } } # [ doc = "Bit 4 - Sleep" ] # [ inline ( always ) ] pub fn slp ( & mut self ) -> SLP_W { SLP_W { w : self } } } } # [ doc = "RNGA Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sr](sr) module" ] pub type SR = crate :: Reg < u32 , _SR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SR ; # [ doc = "`read()` method returns [sr::R](sr::R) reader structure" ] impl crate :: Readable for SR { } # [ doc = "RNGA Status Register" ] pub mod sr { # [ doc = "Reader of register SR" ] pub type R = crate :: R < u32 , super :: SR > ; # [ doc = "Security Violation\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SECV_A { # [ doc = "0: No security violation" ] _0 , # [ doc = "1: Security violation" ] _1 } impl From < SECV_A > for bool { # [ inline ( always ) ] fn from ( variant : SECV_A ) -> Self { match variant { SECV_A :: _0 => false , SECV_A :: _1 => true } } } # [ doc = "Reader of field `SECV`" ] pub type SECV_R = crate :: R < bool , SECV_A > ; impl SECV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SECV_A { match self . bits { false => SECV_A :: _0 , true => SECV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SECV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SECV_A :: _1 } } # [ doc = "Last Read Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LRS_A { # [ doc = "0: No underflow" ] _0 , # [ doc = "1: Underflow" ] _1 } impl From < LRS_A > for bool { # [ inline ( always ) ] fn from ( variant : LRS_A ) -> Self { match variant { LRS_A :: _0 => false , LRS_A :: _1 => true } } } # [ doc = "Reader of field `LRS`" ] pub type LRS_R = crate :: R < bool , LRS_A > ; impl LRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LRS_A { match self . bits { false => LRS_A :: _0 , true => LRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LRS_A :: _1 } } # [ doc = "Output Register Underflow\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORU_A { # [ doc = "0: No underflow" ] _0 , # [ doc = "1: Underflow" ] _1 } impl From < ORU_A > for bool { # [ inline ( always ) ] fn from ( variant : ORU_A ) -> Self { match variant { ORU_A :: _0 => false , ORU_A :: _1 => true } } } # [ doc = "Reader of field `ORU`" ] pub type ORU_R = crate :: R < bool , ORU_A > ; impl ORU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ORU_A { match self . bits { false => ORU_A :: _0 , true => ORU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ORU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ORU_A :: _1 } } # [ doc = "Error Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRI_A { # [ doc = "0: No underflow" ] _0 , # [ doc = "1: Underflow" ] _1 } impl From < ERRI_A > for bool { # [ inline ( always ) ] fn from ( variant : ERRI_A ) -> Self { match variant { ERRI_A :: _0 => false , ERRI_A :: _1 => true } } } # [ doc = "Reader of field `ERRI`" ] pub type ERRI_R = crate :: R < bool , ERRI_A > ; impl ERRI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERRI_A { match self . bits { false => ERRI_A :: _0 , true => ERRI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERRI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERRI_A :: _1 } } # [ doc = "Sleep\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLP_A { # [ doc = "0: Normal mode" ] _0 , # [ doc = "1: Sleep (low-power) mode" ] _1 } impl From < SLP_A > for bool { # [ inline ( always ) ] fn from ( variant : SLP_A ) -> Self { match variant { SLP_A :: _0 => false , SLP_A :: _1 => true } } } # [ doc = "Reader of field `SLP`" ] pub type SLP_R = crate :: R < bool , SLP_A > ; impl SLP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLP_A { match self . bits { false => SLP_A :: _0 , true => SLP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLP_A :: _1 } } # [ doc = "Output Register Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OREG_LVL_A { # [ doc = "0: No words (empty)" ] _0 , # [ doc = "1: One word (valid)" ] _1 } impl From < OREG_LVL_A > for u8 { # [ inline ( always ) ] fn from ( variant : OREG_LVL_A ) -> Self { match variant { OREG_LVL_A :: _0 => 0 , OREG_LVL_A :: _1 => 1 } } } # [ doc = "Reader of field `OREG_LVL`" ] pub type OREG_LVL_R = crate :: R < u8 , OREG_LVL_A > ; impl OREG_LVL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , OREG_LVL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( OREG_LVL_A :: _0 ) , 1 => Val ( OREG_LVL_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OREG_LVL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OREG_LVL_A :: _1 } } # [ doc = "Output Register Size\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OREG_SIZE_A { # [ doc = "1: One word (this value is fixed)" ] _1 } impl From < OREG_SIZE_A > for u8 { # [ inline ( always ) ] fn from ( variant : OREG_SIZE_A ) -> Self { match variant { OREG_SIZE_A :: _1 => 1 } } } # [ doc = "Reader of field `OREG_SIZE`" ] pub type OREG_SIZE_R = crate :: R < u8 , OREG_SIZE_A > ; impl OREG_SIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , OREG_SIZE_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( OREG_SIZE_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OREG_SIZE_A :: _1 } } impl R { # [ doc = "Bit 0 - Security Violation" ] # [ inline ( always ) ] pub fn secv ( & self ) -> SECV_R { SECV_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Last Read Status" ] # [ inline ( always ) ] pub fn lrs ( & self ) -> LRS_R { LRS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Output Register Underflow" ] # [ inline ( always ) ] pub fn oru ( & self ) -> ORU_R { ORU_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Error Interrupt" ] # [ inline ( always ) ] pub fn erri ( & self ) -> ERRI_R { ERRI_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Sleep" ] # [ inline ( always ) ] pub fn slp ( & self ) -> SLP_R { SLP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:15 - Output Register Level" ] # [ inline ( always ) ] pub fn oreg_lvl ( & self ) -> OREG_LVL_R { OREG_LVL_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Output Register Size" ] # [ inline ( always ) ] pub fn oreg_size ( & self ) -> OREG_SIZE_R { OREG_SIZE_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } } # [ doc = "RNGA Entropy Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [er](er) module" ] pub type ER = crate :: Reg < u32 , _ER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ER ; # [ doc = "`write(|w| ..)` method takes [er::W](er::W) writer structure" ] impl crate :: Writable for ER { } # [ doc = "RNGA Entropy Register" ] pub mod er { # [ doc = "Writer for register ER" ] pub type W = crate :: W < u32 , super :: ER > ; # [ doc = "Register ER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `EXT_ENT`" ] pub struct EXT_ENT_W < 'a > { w : & 'a mut W , } impl < 'a > EXT_ENT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - External Entropy" ] # [ inline ( always ) ] pub fn ext_ent ( & mut self ) -> EXT_ENT_W { EXT_ENT_W { w : self } } } } # [ doc = "RNGA Output Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [or](or) module" ] pub type OR = crate :: Reg < u32 , _OR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OR ; # [ doc = "`read()` method returns [or::R](or::R) reader structure" ] impl crate :: Readable for OR { } # [ doc = "RNGA Output Register" ] pub mod or { # [ doc = "Reader of register OR" ] pub type R = crate :: R < u32 , super :: OR > ; # [ doc = "Random Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RANDOUT_A { # [ doc = "0: Invalid data (if you read this field when it is 0 and SR\\[OREG_LVL\\] is 0, RNGA then writes 1 to SR\\[ERRI\\], SR\\[ORU\\], and SR\\[LRS\\]; when the error interrupt is not masked (CR\\[INTM\\]=0), RNGA also asserts an error interrupt request to the interrupt controller)." ] _0 } impl From < RANDOUT_A > for u32 { # [ inline ( always ) ] fn from ( variant : RANDOUT_A ) -> Self { match variant { RANDOUT_A :: _0 => 0 } } } # [ doc = "Reader of field `RANDOUT`" ] pub type RANDOUT_R = crate :: R < u32 , RANDOUT_A > ; impl RANDOUT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u32 , RANDOUT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RANDOUT_A :: _0 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RANDOUT_A :: _0 } } impl R { # [ doc = "Bits 0:31 - Random Output" ] # [ inline ( always ) ] pub fn randout ( & self ) -> RANDOUT_R { RANDOUT_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } } # [ doc = "USB HS/FS/LS OTG Controller" ] pub struct USBHS { _marker : PhantomData < * const ( ) > } unsafe impl Send for USBHS { } impl USBHS { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const usbhs :: RegisterBlock { 0x400a_1000 as * const _ } } impl Deref for USBHS { type Target = usbhs :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * USBHS :: ptr ( ) } } } # [ doc = "USB HS/FS/LS OTG Controller" ] pub mod usbhs { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Identification Register" ] pub id : ID , # [ doc = "0x04 - General Hardware Parameters Register" ] pub hwgeneral : HWGENERAL , # [ doc = "0x08 - Host Hardware Parameters Register" ] pub hwhost : HWHOST , # [ doc = "0x0c - Device Hardware Parameters Register" ] pub hwdevice : HWDEVICE , # [ doc = "0x10 - Transmit Buffer Hardware Parameters Register" ] pub hwtxbuf : HWTXBUF , # [ doc = "0x14 - Receive Buffer Hardware Parameters Register" ] pub hwrxbuf : HWRXBUF , _reserved6 : [ u8 ; 104usize ] , # [ doc = "0x80 - General Purpose Timer n Load Register" ] pub gptimer0ld : GPTIMERLD , # [ doc = "0x84 - General Purpose Timer n Control Register" ] pub gptimer0ctl : GPTIMERCTL , # [ doc = "0x88 - General Purpose Timer n Load Register" ] pub gptimer1ld : GPTIMERLD , # [ doc = "0x8c - General Purpose Timer n Control Register" ] pub gptimer1ctl : GPTIMERCTL , # [ doc = "0x90 - System Bus Interface Configuration Register" ] pub usb_sbuscfg : USB_SBUSCFG , _reserved11 : [ u8 ; 108usize ] , # [ doc = "0x100 - Host Controller Interface Version and Capability Registers Length Register" ] pub hciversion : HCIVERSION , # [ doc = "0x104 - Host Controller Structural Parameters Register" ] pub hcsparams : HCSPARAMS , # [ doc = "0x108 - Host Controller Capability Parameters Register" ] pub hccparams : HCCPARAMS , _reserved14 : [ u8 ; 22usize ] , # [ doc = "0x122 - Device Controller Interface Version" ] pub dciversion : DCIVERSION , # [ doc = "0x124 - Device Controller Capability Parameters" ] pub dccparams : DCCPARAMS , _reserved16 : [ u8 ; 24usize ] , # [ doc = "0x140 - USB Command Register" ] pub usbcmd : USBCMD , # [ doc = "0x144 - USB Status Register" ] pub usbsts : USBSTS , # [ doc = "0x148 - USB Interrupt Enable Register" ] pub usbintr : USBINTR , # [ doc = "0x14c - Frame Index Register" ] pub frindex : FRINDEX , _reserved20 : [ u8 ; 4usize ] , _reserved_20_deviceaddr : [ u8 ; 4usize ] , _reserved_21_eplistaddr : [ u8 ; 4usize ] , # [ doc = "0x15c - Host TT Asynchronous Buffer Control" ] pub ttctrl : TTCTRL , # [ doc = "0x160 - Master Interface Data Burst Size Register" ] pub burstsize : BURSTSIZE , # [ doc = "0x164 - Transmit FIFO Tuning Control Register" ] pub txfilltuning : TXFILLTUNING , _reserved25 : [ u8 ; 16usize ] , # [ doc = "0x178 - Endpoint NAK Register" ] pub endptnak : ENDPTNAK , # [ doc = "0x17c - Endpoint NAK Enable Register" ] pub endptnaken : ENDPTNAKEN , # [ doc = "0x180 - Configure Flag Register" ] pub configflag : CONFIGFLAG , # [ doc = "0x184 - Port Status and Control Registers" ] pub portsc1 : PORTSC1 , _reserved29 : [ u8 ; 28usize ] , # [ doc = "0x1a4 - On-the-Go Status and Control Register" ] pub otgsc : OTGSC , # [ doc = "0x1a8 - USB Mode Register" ] pub usbmode : USBMODE , # [ doc = "0x1ac - Endpoint Setup Status Register" ] pub epsetupsr : EPSETUPSR , # [ doc = "0x1b0 - Endpoint Initialization Register" ] pub epprime : EPPRIME , # [ doc = "0x1b4 - Endpoint Flush Register" ] pub epflush : EPFLUSH , # [ doc = "0x1b8 - Endpoint Status Register" ] pub epsr : EPSR , # [ doc = "0x1bc - Endpoint Complete Register" ] pub epcomplete : EPCOMPLETE , # [ doc = "0x1c0 - Endpoint Control Register 0" ] pub epcr0 : EPCR0 , # [ doc = "0x1c4 - Endpoint Control Register n" ] pub epcr1 : EPCR , # [ doc = "0x1c8 - Endpoint Control Register n" ] pub epcr2 : EPCR , # [ doc = "0x1cc - Endpoint Control Register n" ] pub epcr3 : EPCR , # [ doc = "0x1d0 - Endpoint Control Register n" ] pub epcr4 : EPCR , # [ doc = "0x1d4 - Endpoint Control Register n" ] pub epcr5 : EPCR , # [ doc = "0x1d8 - Endpoint Control Register n" ] pub epcr6 : EPCR , # [ doc = "0x1dc - Endpoint Control Register n" ] pub epcr7 : EPCR , _reserved44 : [ u8 ; 32usize ] , # [ doc = "0x200 - USB General Control Register" ] pub usbgenctrl : USBGENCTRL , } impl RegisterBlock { # [ doc = "0x154 - Periodic Frame List Base Address Register" ] # [ inline ( always ) ] pub fn periodiclistbase ( & self ) -> & PERIODICLISTBASE { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 340usize ) as * const PERIODICLISTBASE ) } } # [ doc = "0x154 - Periodic Frame List Base Address Register" ] # [ inline ( always ) ] pub fn periodiclistbase_mut ( & self ) -> & mut PERIODICLISTBASE { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 340usize ) as * mut PERIODICLISTBASE ) } } # [ doc = "0x154 - Device Address Register" ] # [ inline ( always ) ] pub fn deviceaddr ( & self ) -> & DEVICEADDR { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 340usize ) as * const DEVICEADDR ) } } # [ doc = "0x154 - Device Address Register" ] # [ inline ( always ) ] pub fn deviceaddr_mut ( & self ) -> & mut DEVICEADDR { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 340usize ) as * mut DEVICEADDR ) } } # [ doc = "0x158 - Endpoint List Address Register" ] # [ inline ( always ) ] pub fn eplistaddr ( & self ) -> & EPLISTADDR { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 344usize ) as * const EPLISTADDR ) } } # [ doc = "0x158 - Endpoint List Address Register" ] # [ inline ( always ) ] pub fn eplistaddr_mut ( & self ) -> & mut EPLISTADDR { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 344usize ) as * mut EPLISTADDR ) } } # [ doc = "0x158 - Current Asynchronous List Address Register" ] # [ inline ( always ) ] pub fn asynclistaddr ( & self ) -> & ASYNCLISTADDR { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 344usize ) as * const ASYNCLISTADDR ) } } # [ doc = "0x158 - Current Asynchronous List Address Register" ] # [ inline ( always ) ] pub fn asynclistaddr_mut ( & self ) -> & mut ASYNCLISTADDR { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 344usize ) as * mut ASYNCLISTADDR ) } } } # [ doc = "Identification Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id](id) module" ] pub type ID = crate :: Reg < u32 , _ID > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ID ; # [ doc = "`read()` method returns [id::R](id::R) reader structure" ] impl crate :: Readable for ID { } # [ doc = "Identification Register" ] pub mod id { # [ doc = "Reader of register ID" ] pub type R = crate :: R < u32 , super :: ID > ; # [ doc = "Reader of field `ID`" ] pub type ID_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `NID`" ] pub type NID_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TAG`" ] pub type TAG_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `REVISION`" ] pub type REVISION_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `VERSION`" ] pub type VERSION_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `VERSIONID`" ] pub type VERSIONID_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:5 - Configuration number" ] # [ inline ( always ) ] pub fn id ( & self ) -> ID_R { ID_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bits 8:13 - Ones complement version of ID." ] # [ inline ( always ) ] pub fn nid ( & self ) -> NID_R { NID_R :: new ( ( ( self . bits >> 8 ) & 0x3f ) as u8 ) } # [ doc = "Bits 16:20 - Tag" ] # [ inline ( always ) ] pub fn tag ( & self ) -> TAG_R { TAG_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bits 21:24 - Revision" ] # [ inline ( always ) ] pub fn revision ( & self ) -> REVISION_R { REVISION_R :: new ( ( ( self . bits >> 21 ) & 0x0f ) as u8 ) } # [ doc = "Bits 25:28 - Version" ] # [ inline ( always ) ] pub fn version ( & self ) -> VERSION_R { VERSION_R :: new ( ( ( self . bits >> 25 ) & 0x0f ) as u8 ) } # [ doc = "Bits 29:31 - Version ID" ] # [ inline ( always ) ] pub fn versionid ( & self ) -> VERSIONID_R { VERSIONID_R :: new ( ( ( self . bits >> 29 ) & 0x07 ) as u8 ) } } } # [ doc = "General Hardware Parameters Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hwgeneral](hwgeneral) module" ] pub type HWGENERAL = crate :: Reg < u32 , _HWGENERAL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HWGENERAL ; # [ doc = "`read()` method returns [hwgeneral::R](hwgeneral::R) reader structure" ] impl crate :: Readable for HWGENERAL { } # [ doc = "General Hardware Parameters Register" ] pub mod hwgeneral { # [ doc = "Reader of register HWGENERAL" ] pub type R = crate :: R < u32 , super :: HWGENERAL > ; # [ doc = "PHY Width\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHYW_A { # [ doc = "1: 16 bit wide data bus" ] _01 } impl From < PHYW_A > for u8 { # [ inline ( always ) ] fn from ( variant : PHYW_A ) -> Self { match variant { PHYW_A :: _01 => 1 } } } # [ doc = "Reader of field `PHYW`" ] pub type PHYW_R = crate :: R < u8 , PHYW_A > ; impl PHYW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PHYW_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( PHYW_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PHYW_A :: _01 } } # [ doc = "PHY Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PHYM_A { # [ doc = "0: Controller configured for UTMI/UTMI+ interface." ] _000 } impl From < PHYM_A > for u8 { # [ inline ( always ) ] fn from ( variant : PHYM_A ) -> Self { match variant { PHYM_A :: _000 => 0 } } } # [ doc = "Reader of field `PHYM`" ] pub type PHYM_R = crate :: R < u8 , PHYM_A > ; impl PHYM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PHYM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PHYM_A :: _000 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PHYM_A :: _000 } } # [ doc = "Serial mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SM_A { # [ doc = "0: No Serial Engine, always use parallel signaling." ] _00 } impl From < SM_A > for u8 { # [ inline ( always ) ] fn from ( variant : SM_A ) -> Self { match variant { SM_A :: _00 => 0 } } } # [ doc = "Reader of field `SM`" ] pub type SM_R = crate :: R < u8 , SM_A > ; impl SM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( SM_A :: _00 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SM_A :: _00 } } impl R { # [ doc = "Bits 4:5 - PHY Width" ] # [ inline ( always ) ] pub fn phyw ( & self ) -> PHYW_R { PHYW_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:8 - PHY Mode" ] # [ inline ( always ) ] pub fn phym ( & self ) -> PHYM_R { PHYM_R :: new ( ( ( self . bits >> 6 ) & 0x07 ) as u8 ) } # [ doc = "Bits 9:10 - Serial mode" ] # [ inline ( always ) ] pub fn sm ( & self ) -> SM_R { SM_R :: new ( ( ( self . bits >> 9 ) & 0x03 ) as u8 ) } } } # [ doc = "Host Hardware Parameters Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hwhost](hwhost) module" ] pub type HWHOST = crate :: Reg < u32 , _HWHOST > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HWHOST ; # [ doc = "`read()` method returns [hwhost::R](hwhost::R) reader structure" ] impl crate :: Readable for HWHOST { } # [ doc = "Host Hardware Parameters Register" ] pub mod hwhost { # [ doc = "Reader of register HWHOST" ] pub type R = crate :: R < u32 , super :: HWHOST > ; # [ doc = "Reader of field `HC`" ] pub type HC_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `NPORT`" ] pub type NPORT_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TTASY`" ] pub type TTASY_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TTPER`" ] pub type TTPER_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Host Capable" ] # [ inline ( always ) ] pub fn hc ( & self ) -> HC_R { HC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:3 - Number of Ports" ] # [ inline ( always ) ] pub fn nport ( & self ) -> NPORT_R { NPORT_R :: new ( ( ( self . bits >> 1 ) & 0x07 ) as u8 ) } # [ doc = "Bits 16:23 - Transaction translator contexts." ] # [ inline ( always ) ] pub fn ttasy ( & self ) -> TTASY_R { TTASY_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Transaction translator periodic contexts." ] # [ inline ( always ) ] pub fn ttper ( & self ) -> TTPER_R { TTPER_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } } # [ doc = "Device Hardware Parameters Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hwdevice](hwdevice) module" ] pub type HWDEVICE = crate :: Reg < u32 , _HWDEVICE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HWDEVICE ; # [ doc = "`read()` method returns [hwdevice::R](hwdevice::R) reader structure" ] impl crate :: Readable for HWDEVICE { } # [ doc = "Device Hardware Parameters Register" ] pub mod hwdevice { # [ doc = "Reader of register HWDEVICE" ] pub type R = crate :: R < u32 , super :: HWDEVICE > ; # [ doc = "Reader of field `DC`" ] pub type DC_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `DEVEP`" ] pub type DEVEP_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Device Capable" ] # [ inline ( always ) ] pub fn dc ( & self ) -> DC_R { DC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:5 - Device endpoints." ] # [ inline ( always ) ] pub fn devep ( & self ) -> DEVEP_R { DEVEP_R :: new ( ( ( self . bits >> 1 ) & 0x1f ) as u8 ) } } } # [ doc = "Transmit Buffer Hardware Parameters Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hwtxbuf](hwtxbuf) module" ] pub type HWTXBUF = crate :: Reg < u32 , _HWTXBUF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HWTXBUF ; # [ doc = "`read()` method returns [hwtxbuf::R](hwtxbuf::R) reader structure" ] impl crate :: Readable for HWTXBUF { } # [ doc = "Transmit Buffer Hardware Parameters Register" ] pub mod hwtxbuf { # [ doc = "Reader of register HWTXBUF" ] pub type R = crate :: R < u32 , super :: HWTXBUF > ; # [ doc = "Reader of field `TXBURST`" ] pub type TXBURST_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TXADD`" ] pub type TXADD_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TXCHANADD`" ] pub type TXCHANADD_R = crate :: R < u8 , u8 > ; # [ doc = "Transmit local Context Registers\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXLC_A { # [ doc = "0: Store device transmit contexts in the TX FIFO" ] _0 , # [ doc = "1: Store device transmit contexts in a register file" ] _1 } impl From < TXLC_A > for bool { # [ inline ( always ) ] fn from ( variant : TXLC_A ) -> Self { match variant { TXLC_A :: _0 => false , TXLC_A :: _1 => true } } } # [ doc = "Reader of field `TXLC`" ] pub type TXLC_R = crate :: R < bool , TXLC_A > ; impl TXLC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXLC_A { match self . bits { false => TXLC_A :: _0 , true => TXLC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXLC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXLC_A :: _1 } } impl R { # [ doc = "Bits 0:7 - Transmit Burst." ] # [ inline ( always ) ] pub fn txburst ( & self ) -> TXBURST_R { TXBURST_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Transmit Address." ] # [ inline ( always ) ] pub fn txadd ( & self ) -> TXADD_R { TXADD_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Transmit Channel Address" ] # [ inline ( always ) ] pub fn txchanadd ( & self ) -> TXCHANADD_R { TXCHANADD_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bit 31 - Transmit local Context Registers" ] # [ inline ( always ) ] pub fn txlc ( & self ) -> TXLC_R { TXLC_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Receive Buffer Hardware Parameters Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hwrxbuf](hwrxbuf) module" ] pub type HWRXBUF = crate :: Reg < u32 , _HWRXBUF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HWRXBUF ; # [ doc = "`read()` method returns [hwrxbuf::R](hwrxbuf::R) reader structure" ] impl crate :: Readable for HWRXBUF { } # [ doc = "Receive Buffer Hardware Parameters Register" ] pub mod hwrxbuf { # [ doc = "Reader of register HWRXBUF" ] pub type R = crate :: R < u32 , super :: HWRXBUF > ; # [ doc = "Reader of field `RXBURST`" ] pub type RXBURST_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `RXADD`" ] pub type RXADD_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:7 - Receive Burst." ] # [ inline ( always ) ] pub fn rxburst ( & self ) -> RXBURST_R { RXBURST_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Receive Address." ] # [ inline ( always ) ] pub fn rxadd ( & self ) -> RXADD_R { RXADD_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } } } # [ doc = "General Purpose Timer n Load Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gptimerld](gptimerld) module" ] pub type GPTIMERLD = crate :: Reg < u32 , _GPTIMERLD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPTIMERLD ; # [ doc = "`read()` method returns [gptimerld::R](gptimerld::R) reader structure" ] impl crate :: Readable for GPTIMERLD { } # [ doc = "`write(|w| ..)` method takes [gptimerld::W](gptimerld::W) writer structure" ] impl crate :: Writable for GPTIMERLD { } # [ doc = "General Purpose Timer n Load Register" ] pub mod gptimerld { # [ doc = "Reader of register GPTIMER%sLD" ] pub type R = crate :: R < u32 , super :: GPTIMERLD > ; # [ doc = "Writer for register GPTIMER%sLD" ] pub type W = crate :: W < u32 , super :: GPTIMERLD > ; # [ doc = "Register GPTIMER%sLD `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPTIMERLD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `GPTLD`" ] pub type GPTLD_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `GPTLD`" ] pub struct GPTLD_W < 'a > { w : & 'a mut W , } impl < 'a > GPTLD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x00ff_ffff ) | ( ( value as u32 ) & 0x00ff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:23 - Specifies the value to be loaded into the countdown timer on a reset" ] # [ inline ( always ) ] pub fn gptld ( & self ) -> GPTLD_R { GPTLD_R :: new ( ( self . bits & 0x00ff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:23 - Specifies the value to be loaded into the countdown timer on a reset" ] # [ inline ( always ) ] pub fn gptld ( & mut self ) -> GPTLD_W { GPTLD_W { w : self } } } } # [ doc = "General Purpose Timer n Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gptimerctl](gptimerctl) module" ] pub type GPTIMERCTL = crate :: Reg < u32 , _GPTIMERCTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GPTIMERCTL ; # [ doc = "`read()` method returns [gptimerctl::R](gptimerctl::R) reader structure" ] impl crate :: Readable for GPTIMERCTL { } # [ doc = "`write(|w| ..)` method takes [gptimerctl::W](gptimerctl::W) writer structure" ] impl crate :: Writable for GPTIMERCTL { } # [ doc = "General Purpose Timer n Control Register" ] pub mod gptimerctl { # [ doc = "Reader of register GPTIMER%sCTL" ] pub type R = crate :: R < u32 , super :: GPTIMERCTL > ; # [ doc = "Writer for register GPTIMER%sCTL" ] pub type W = crate :: W < u32 , super :: GPTIMERCTL > ; # [ doc = "Register GPTIMER%sCTL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GPTIMERCTL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `GPTCNT`" ] pub type GPTCNT_R = crate :: R < u32 , u32 > ; # [ doc = "Timer Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODE_A { # [ doc = "0: One shot" ] _0 , # [ doc = "1: Repeat" ] _1 } impl From < MODE_A > for bool { # [ inline ( always ) ] fn from ( variant : MODE_A ) -> Self { match variant { MODE_A :: _0 => false , MODE_A :: _1 => true } } } # [ doc = "Reader of field `MODE`" ] pub type MODE_R = crate :: R < bool , MODE_A > ; impl MODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MODE_A { match self . bits { false => MODE_A :: _0 , true => MODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MODE_A :: _1 } } # [ doc = "Write proxy for field `MODE`" ] pub struct MODE_W < 'a > { w : & 'a mut W , } impl < 'a > MODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "One shot" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _0 ) } # [ doc = "Repeat" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MODE_A :: _1 ) } # [ 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 = "Timer Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RST_AW { # [ doc = "0: No action" ] _0 , # [ doc = "1: Load counter value" ] _1 } impl From < RST_AW > for bool { # [ inline ( always ) ] fn from ( variant : RST_AW ) -> Self { match variant { RST_AW :: _0 => false , RST_AW :: _1 => true } } } # [ doc = "Write proxy for field `RST`" ] pub struct RST_W < 'a > { w : & 'a mut W , } impl < 'a > RST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RST_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No action" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RST_AW :: _0 ) } # [ doc = "Load counter value" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RST_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Timer Run\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RUN_A { # [ doc = "0: Timer stop" ] _0 , # [ doc = "1: Timer run" ] _1 } impl From < RUN_A > for bool { # [ inline ( always ) ] fn from ( variant : RUN_A ) -> Self { match variant { RUN_A :: _0 => false , RUN_A :: _1 => true } } } # [ doc = "Reader of field `RUN`" ] pub type RUN_R = crate :: R < bool , RUN_A > ; impl RUN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RUN_A { match self . bits { false => RUN_A :: _0 , true => RUN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RUN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RUN_A :: _1 } } # [ doc = "Write proxy for field `RUN`" ] pub struct RUN_W < 'a > { w : & 'a mut W , } impl < 'a > RUN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RUN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer stop" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RUN_A :: _0 ) } # [ doc = "Timer run" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RUN_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:23 - Timer Count" ] # [ inline ( always ) ] pub fn gptcnt ( & self ) -> GPTCNT_R { GPTCNT_R :: new ( ( self . bits & 0x00ff_ffff ) as u32 ) } # [ doc = "Bit 24 - Timer Mode" ] # [ inline ( always ) ] pub fn mode ( & self ) -> MODE_R { MODE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Timer Run" ] # [ inline ( always ) ] pub fn run ( & self ) -> RUN_R { RUN_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 24 - Timer Mode" ] # [ inline ( always ) ] pub fn mode ( & mut self ) -> MODE_W { MODE_W { w : self } } # [ doc = "Bit 30 - Timer Reset" ] # [ inline ( always ) ] pub fn rst ( & mut self ) -> RST_W { RST_W { w : self } } # [ doc = "Bit 31 - Timer Run" ] # [ inline ( always ) ] pub fn run ( & mut self ) -> RUN_W { RUN_W { w : self } } } } # [ doc = "System Bus Interface Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb_sbuscfg](usb_sbuscfg) module" ] pub type USB_SBUSCFG = crate :: Reg < u32 , _USB_SBUSCFG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB_SBUSCFG ; # [ doc = "`read()` method returns [usb_sbuscfg::R](usb_sbuscfg::R) reader structure" ] impl crate :: Readable for USB_SBUSCFG { } # [ doc = "`write(|w| ..)` method takes [usb_sbuscfg::W](usb_sbuscfg::W) writer structure" ] impl crate :: Writable for USB_SBUSCFG { } # [ doc = "System Bus Interface Configuration Register" ] pub mod usb_sbuscfg { # [ doc = "Reader of register USB_SBUSCFG" ] pub type R = crate :: R < u32 , super :: USB_SBUSCFG > ; # [ doc = "Writer for register USB_SBUSCFG" ] pub type W = crate :: W < u32 , super :: USB_SBUSCFG > ; # [ doc = "Register USB_SBUSCFG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: USB_SBUSCFG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Burst mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BURSTMODE_A { # [ doc = "0: INCR burst of unspecified length" ] _000 , # [ doc = "1: INCR4, non-multiple transfers of INCR4 is decomposed into singles." ] _001 , # [ doc = "2: INCR8, non-multiple transfers of INCR8, is decomposed into INCR4 or singles." ] _010 , # [ doc = "3: INCR16, non-multiple transfers of INCR16, is decomposed into INCR8, INCR4 or singles." ] _011 , # [ doc = "4: Reserved, do not use." ] _100 , # [ doc = "5: INCR4, non-multiple transfers of INCR4 is decomposed into smaller unspecified length bursts." ] _101 , # [ doc = "6: INCR8, non-multiple transfers of INCR8 is decomposed into smaller unspecified length bursts." ] _110 , # [ doc = "7: INCR16, non-multiple transfers of INCR16 is decomposed into smaller unspecified length bursts." ] _111 } impl From < BURSTMODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : BURSTMODE_A ) -> Self { match variant { BURSTMODE_A :: _000 => 0 , BURSTMODE_A :: _001 => 1 , BURSTMODE_A :: _010 => 2 , BURSTMODE_A :: _011 => 3 , BURSTMODE_A :: _100 => 4 , BURSTMODE_A :: _101 => 5 , BURSTMODE_A :: _110 => 6 , BURSTMODE_A :: _111 => 7 } } } # [ doc = "Reader of field `BURSTMODE`" ] pub type BURSTMODE_R = crate :: R < u8 , BURSTMODE_A > ; impl BURSTMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BURSTMODE_A { match self . bits { 0 => BURSTMODE_A :: _000 , 1 => BURSTMODE_A :: _001 , 2 => BURSTMODE_A :: _010 , 3 => BURSTMODE_A :: _011 , 4 => BURSTMODE_A :: _100 , 5 => BURSTMODE_A :: _101 , 6 => BURSTMODE_A :: _110 , 7 => BURSTMODE_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == BURSTMODE_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == BURSTMODE_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == BURSTMODE_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == BURSTMODE_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == BURSTMODE_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == BURSTMODE_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == BURSTMODE_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == BURSTMODE_A :: _111 } } # [ doc = "Write proxy for field `BURSTMODE`" ] pub struct BURSTMODE_W < 'a > { w : & 'a mut W , } impl < 'a > BURSTMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BURSTMODE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "INCR burst of unspecified length" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( BURSTMODE_A :: _000 ) } # [ doc = "INCR4, non-multiple transfers of INCR4 is decomposed into singles." ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( BURSTMODE_A :: _001 ) } # [ doc = "INCR8, non-multiple transfers of INCR8, is decomposed into INCR4 or singles." ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( BURSTMODE_A :: _010 ) } # [ doc = "INCR16, non-multiple transfers of INCR16, is decomposed into INCR8, INCR4 or singles." ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( BURSTMODE_A :: _011 ) } # [ doc = "Reserved, do not use." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( BURSTMODE_A :: _100 ) } # [ doc = "INCR4, non-multiple transfers of INCR4 is decomposed into smaller unspecified length bursts." ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( BURSTMODE_A :: _101 ) } # [ doc = "INCR8, non-multiple transfers of INCR8 is decomposed into smaller unspecified length bursts." ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( BURSTMODE_A :: _110 ) } # [ doc = "INCR16, non-multiple transfers of INCR16 is decomposed into smaller unspecified length bursts." ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( BURSTMODE_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Burst mode" ] # [ inline ( always ) ] pub fn burstmode ( & self ) -> BURSTMODE_R { BURSTMODE_R :: new ( ( self . bits & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:2 - Burst mode" ] # [ inline ( always ) ] pub fn burstmode ( & mut self ) -> BURSTMODE_W { BURSTMODE_W { w : self } } } } # [ doc = "Host Controller Interface Version and Capability Registers Length Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hciversion](hciversion) module" ] pub type HCIVERSION = crate :: Reg < u32 , _HCIVERSION > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HCIVERSION ; # [ doc = "`read()` method returns [hciversion::R](hciversion::R) reader structure" ] impl crate :: Readable for HCIVERSION { } # [ doc = "Host Controller Interface Version and Capability Registers Length Register" ] pub mod hciversion { # [ doc = "Reader of register HCIVERSION" ] pub type R = crate :: R < u32 , super :: HCIVERSION > ; # [ doc = "Reader of field `CAPLENGTH`" ] pub type CAPLENGTH_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `HCIVERSION`" ] pub type HCIVERSION_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:7 - Capability registers length" ] # [ inline ( always ) ] pub fn caplength ( & self ) -> CAPLENGTH_R { CAPLENGTH_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 16:31 - EHCI revision number" ] # [ inline ( always ) ] pub fn hciversion ( & self ) -> HCIVERSION_R { HCIVERSION_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } } # [ doc = "Host Controller Structural Parameters Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hcsparams](hcsparams) module" ] pub type HCSPARAMS = crate :: Reg < u32 , _HCSPARAMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HCSPARAMS ; # [ doc = "`read()` method returns [hcsparams::R](hcsparams::R) reader structure" ] impl crate :: Readable for HCSPARAMS { } # [ doc = "Host Controller Structural Parameters Register" ] pub mod hcsparams { # [ doc = "Reader of register HCSPARAMS" ] pub type R = crate :: R < u32 , super :: HCSPARAMS > ; # [ doc = "Reader of field `N_PORTS`" ] pub type N_PORTS_R = crate :: R < u8 , u8 > ; # [ doc = "Power Port Control\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PPC_A { # [ doc = "1: Ports have power port switches" ] _1 } impl From < PPC_A > for bool { # [ inline ( always ) ] fn from ( variant : PPC_A ) -> Self { match variant { PPC_A :: _1 => true } } } # [ doc = "Reader of field `PPC`" ] pub type PPC_R = crate :: R < bool , PPC_A > ; impl PPC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < bool , PPC_A > { use crate :: Variant :: * ; match self . bits { true => Val ( PPC_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PPC_A :: _1 } } # [ doc = "Reader of field `N_PCC`" ] pub type N_PCC_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `N_CC`" ] pub type N_CC_R = crate :: R < u8 , u8 > ; # [ doc = "Port Indicators\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PI_A { # [ doc = "0: No port indicator fields" ] _0 , # [ doc = "1: The port status and control registers include a R/W field for controlling the state of the port indicator" ] _1 } impl From < PI_A > for bool { # [ inline ( always ) ] fn from ( variant : PI_A ) -> Self { match variant { PI_A :: _0 => false , PI_A :: _1 => true } } } # [ doc = "Reader of field `PI`" ] pub type PI_R = crate :: R < bool , PI_A > ; impl PI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PI_A { match self . bits { false => PI_A :: _0 , true => PI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PI_A :: _1 } } # [ doc = "Reader of field `N_PTT`" ] pub type N_PTT_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `N_TT`" ] pub type N_TT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:3 - Number of Ports" ] # [ inline ( always ) ] pub fn n_ports ( & self ) -> N_PORTS_R { N_PORTS_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bit 4 - Power Port Control" ] # [ inline ( always ) ] pub fn ppc ( & self ) -> PPC_R { PPC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - Number Ports per CC" ] # [ inline ( always ) ] pub fn n_pcc ( & self ) -> N_PCC_R { N_PCC_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 12:15 - Number of Companion Controllers" ] # [ inline ( always ) ] pub fn n_cc ( & self ) -> N_CC_R { N_CC_R :: new ( ( ( self . bits >> 12 ) & 0x0f ) as u8 ) } # [ doc = "Bit 16 - Port Indicators" ] # [ inline ( always ) ] pub fn pi ( & self ) -> PI_R { PI_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bits 20:23 - Ports per Transaction Translator" ] # [ inline ( always ) ] pub fn n_ptt ( & self ) -> N_PTT_R { N_PTT_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - Number of Transaction Translators." ] # [ inline ( always ) ] pub fn n_tt ( & self ) -> N_TT_R { N_TT_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } } # [ doc = "Host Controller Capability Parameters Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hccparams](hccparams) module" ] pub type HCCPARAMS = crate :: Reg < u32 , _HCCPARAMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HCCPARAMS ; # [ doc = "`read()` method returns [hccparams::R](hccparams::R) reader structure" ] impl crate :: Readable for HCCPARAMS { } # [ doc = "Host Controller Capability Parameters Register" ] pub mod hccparams { # [ doc = "Reader of register HCCPARAMS" ] pub type R = crate :: R < u32 , super :: HCCPARAMS > ; # [ doc = "Reader of field `ADC`" ] pub type ADC_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `PFL`" ] pub type PFL_R = crate :: R < bool , bool > ; # [ doc = "Asynchronous Schedule Park capability\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ASP_A { # [ doc = "0: Park not supported." ] _0 , # [ doc = "1: Park supported." ] _1 } impl From < ASP_A > for bool { # [ inline ( always ) ] fn from ( variant : ASP_A ) -> Self { match variant { ASP_A :: _0 => false , ASP_A :: _1 => true } } } # [ doc = "Reader of field `ASP`" ] pub type ASP_R = crate :: R < bool , ASP_A > ; impl ASP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ASP_A { match self . bits { false => ASP_A :: _0 , true => ASP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ASP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ASP_A :: _1 } } # [ doc = "Isochronous Scheduling Threshold\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IST_A { # [ doc = "0: The value of the least significant 3 bits indicates the number of microframes a host controller can hold a set of isochronous data structures (one or more) before flushing the state" ] _0 } impl From < IST_A > for u8 { # [ inline ( always ) ] fn from ( variant : IST_A ) -> Self { match variant { IST_A :: _0 => 0 } } } # [ doc = "Reader of field `IST`" ] pub type IST_R = crate :: R < u8 , IST_A > ; impl IST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , IST_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( IST_A :: _0 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IST_A :: _0 } } # [ doc = "EHCI Extended Capabilities Pointer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EECP_A { # [ doc = "0: No extended capabilities are implemented" ] _0 } impl From < EECP_A > for u8 { # [ inline ( always ) ] fn from ( variant : EECP_A ) -> Self { match variant { EECP_A :: _0 => 0 } } } # [ doc = "Reader of field `EECP`" ] pub type EECP_R = crate :: R < u8 , EECP_A > ; impl EECP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EECP_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EECP_A :: _0 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EECP_A :: _0 } } impl R { # [ doc = "Bit 0 - 64-bit addressing capability." ] # [ inline ( always ) ] pub fn adc ( & self ) -> ADC_R { ADC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Programmable Frame List flag" ] # [ inline ( always ) ] pub fn pfl ( & self ) -> PFL_R { PFL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Asynchronous Schedule Park capability" ] # [ inline ( always ) ] pub fn asp ( & self ) -> ASP_R { ASP_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:7 - Isochronous Scheduling Threshold" ] # [ inline ( always ) ] pub fn ist ( & self ) -> IST_R { IST_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:15 - EHCI Extended Capabilities Pointer" ] # [ inline ( always ) ] pub fn eecp ( & self ) -> EECP_R { EECP_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } } } # [ doc = "Device Controller Interface Version\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dciversion](dciversion) module" ] pub type DCIVERSION = crate :: Reg < u16 , _DCIVERSION > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DCIVERSION ; # [ doc = "`read()` method returns [dciversion::R](dciversion::R) reader structure" ] impl crate :: Readable for DCIVERSION { } # [ doc = "Device Controller Interface Version" ] pub mod dciversion { # [ doc = "Reader of register DCIVERSION" ] pub type R = crate :: R < u16 , super :: DCIVERSION > ; # [ doc = "Reader of field `DCIVERSION`" ] pub type DCIVERSION_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Device interface revision number." ] # [ inline ( always ) ] pub fn dciversion ( & self ) -> DCIVERSION_R { DCIVERSION_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Device Controller Capability Parameters\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dccparams](dccparams) module" ] pub type DCCPARAMS = crate :: Reg < u32 , _DCCPARAMS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DCCPARAMS ; # [ doc = "`read()` method returns [dccparams::R](dccparams::R) reader structure" ] impl crate :: Readable for DCCPARAMS { } # [ doc = "Device Controller Capability Parameters" ] pub mod dccparams { # [ doc = "Reader of register DCCPARAMS" ] pub type R = crate :: R < u32 , super :: DCCPARAMS > ; # [ doc = "Reader of field `DEN`" ] pub type DEN_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `DC`" ] pub type DC_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `HC`" ] pub type HC_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bits 0:4 - Device Endpoint Number" ] # [ inline ( always ) ] pub fn den ( & self ) -> DEN_R { DEN_R :: new ( ( self . bits & 0x1f ) as u8 ) } # [ doc = "Bit 7 - Device Capable" ] # [ inline ( always ) ] pub fn dc ( & self ) -> DC_R { DC_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Host Capable" ] # [ inline ( always ) ] pub fn hc ( & self ) -> HC_R { HC_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } } } # [ doc = "USB Command Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbcmd](usbcmd) module" ] pub type USBCMD = crate :: Reg < u32 , _USBCMD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBCMD ; # [ doc = "`read()` method returns [usbcmd::R](usbcmd::R) reader structure" ] impl crate :: Readable for USBCMD { } # [ doc = "`write(|w| ..)` method takes [usbcmd::W](usbcmd::W) writer structure" ] impl crate :: Writable for USBCMD { } # [ doc = "USB Command Register" ] pub mod usbcmd { # [ doc = "Reader of register USBCMD" ] pub type R = crate :: R < u32 , super :: USBCMD > ; # [ doc = "Writer for register USBCMD" ] pub type W = crate :: W < u32 , super :: USBCMD > ; # [ doc = "Register USBCMD `reset()`'s with value 0x0008_0000" ] impl crate :: ResetValue for super :: USBCMD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0008_0000 } } # [ doc = "Reader of field `RS`" ] pub type RS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RS`" ] pub struct RS_W < 'a > { w : & 'a mut W , } impl < 'a > RS_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `RST`" ] pub type RST_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RST`" ] pub struct RST_W < 'a > { w : & 'a mut W , } impl < 'a > RST_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 } } # [ doc = "Frame list Size\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FS_A { # [ doc = "0: When FS2 = 0, the size is 1024 elements (4096 bytes). When FS2 = 1, the size is 64 elements (256 bytes)." ] _00 , # [ doc = "1: When FS2 = 0, the size is 512 elements (2048 bytes). When FS2 = 1, the size is 32 elements (128 bytes)." ] _01 , # [ doc = "2: When FS2 = 0, the size is 256 elements (1024 bytes). When FS2 = 1, the size is 16 elements (64 bytes)." ] _10 , # [ doc = "3: When FS2 = 0, the size is 128 elements (512 bytes). When FS2 = 1, the size is 8 elements (32 bytes)." ] _11 } impl From < FS_A > for u8 { # [ inline ( always ) ] fn from ( variant : FS_A ) -> Self { match variant { FS_A :: _00 => 0 , FS_A :: _01 => 1 , FS_A :: _10 => 2 , FS_A :: _11 => 3 } } } # [ doc = "Reader of field `FS`" ] pub type FS_R = crate :: R < u8 , FS_A > ; impl FS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FS_A { match self . bits { 0 => FS_A :: _00 , 1 => FS_A :: _01 , 2 => FS_A :: _10 , 3 => FS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == FS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == FS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == FS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == FS_A :: _11 } } # [ doc = "Write proxy for field `FS`" ] pub struct FS_W < 'a > { w : & 'a mut W , } impl < 'a > FS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "When FS2 = 0, the size is 1024 elements (4096 bytes). When FS2 = 1, the size is 64 elements (256 bytes)." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( FS_A :: _00 ) } # [ doc = "When FS2 = 0, the size is 512 elements (2048 bytes). When FS2 = 1, the size is 32 elements (128 bytes)." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( FS_A :: _01 ) } # [ doc = "When FS2 = 0, the size is 256 elements (1024 bytes). When FS2 = 1, the size is 16 elements (64 bytes)." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( FS_A :: _10 ) } # [ doc = "When FS2 = 0, the size is 128 elements (512 bytes). When FS2 = 1, the size is 8 elements (32 bytes)." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( FS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Periodic Schedule Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSE_A { # [ doc = "0: Do not process periodic schedule." ] _0 , # [ doc = "1: Use the PERIODICLISTBASE register to access the periodic schedule." ] _1 } impl From < PSE_A > for bool { # [ inline ( always ) ] fn from ( variant : PSE_A ) -> Self { match variant { PSE_A :: _0 => false , PSE_A :: _1 => true } } } # [ doc = "Reader of field `PSE`" ] pub type PSE_R = crate :: R < bool , PSE_A > ; impl PSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSE_A { match self . bits { false => PSE_A :: _0 , true => PSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PSE_A :: _1 } } # [ doc = "Write proxy for field `PSE`" ] pub struct PSE_W < 'a > { w : & 'a mut W , } impl < 'a > PSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not process periodic schedule." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PSE_A :: _0 ) } # [ doc = "Use the PERIODICLISTBASE register to access the periodic schedule." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PSE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Asynchronous Schedule Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ASE_A { # [ doc = "0: Do not process asynchronous schedule." ] _0 , # [ doc = "1: Use the ASYNCLISTADDR register to access asynchronous schedule." ] _1 } impl From < ASE_A > for bool { # [ inline ( always ) ] fn from ( variant : ASE_A ) -> Self { match variant { ASE_A :: _0 => false , ASE_A :: _1 => true } } } # [ doc = "Reader of field `ASE`" ] pub type ASE_R = crate :: R < bool , ASE_A > ; impl ASE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ASE_A { match self . bits { false => ASE_A :: _0 , true => ASE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ASE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ASE_A :: _1 } } # [ doc = "Write proxy for field `ASE`" ] pub struct ASE_W < 'a > { w : & 'a mut W , } impl < 'a > ASE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ASE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not process asynchronous schedule." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ASE_A :: _0 ) } # [ doc = "Use the ASYNCLISTADDR register to access asynchronous schedule." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ASE_A :: _1 ) } # [ 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 = "Reader of field `IAA`" ] pub type IAA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IAA`" ] pub struct IAA_W < 'a > { w : & 'a mut W , } impl < 'a > IAA_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 = "Reader of field `ASP`" ] pub type ASP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ASP`" ] pub struct ASP_W < 'a > { w : & 'a mut W , } impl < 'a > ASP_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 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "Asynchronous Schedule Park mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ASPE_A { # [ doc = "0: Park mode disabled" ] _0 , # [ doc = "1: Park mode enabled" ] _1 } impl From < ASPE_A > for bool { # [ inline ( always ) ] fn from ( variant : ASPE_A ) -> Self { match variant { ASPE_A :: _0 => false , ASPE_A :: _1 => true } } } # [ doc = "Reader of field `ASPE`" ] pub type ASPE_R = crate :: R < bool , ASPE_A > ; impl ASPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ASPE_A { match self . bits { false => ASPE_A :: _0 , true => ASPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ASPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ASPE_A :: _1 } } # [ doc = "Write proxy for field `ASPE`" ] pub struct ASPE_W < 'a > { w : & 'a mut W , } impl < 'a > ASPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ASPE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Park mode disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ASPE_A :: _0 ) } # [ doc = "Park mode enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ASPE_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Reader of field `SUTW`" ] pub type SUTW_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SUTW`" ] pub struct SUTW_W < 'a > { w : & 'a mut W , } impl < 'a > SUTW_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 = "Reader of field `ATDTW`" ] pub type ATDTW_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ATDTW`" ] pub struct ATDTW_W < 'a > { w : & 'a mut W , } impl < 'a > ATDTW_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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Reader of field `FS2`" ] pub type FS2_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FS2`" ] pub struct FS2_W < 'a > { w : & 'a mut W , } impl < 'a > FS2_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Interrupt Threshold Control\n\nValue on reset: 8" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ITC_A { # [ doc = "0: Immediate (no threshold)" ] _0 , # [ doc = "1: 1 microframe" ] _1 , # [ doc = "2: 2 microframes" ] _10 , # [ doc = "4: 4 microframes" ] _100 , # [ doc = "8: 8 microframes" ] _1000 , # [ doc = "16: 16 microframes" ] _10000 , # [ doc = "32: 32 microframes" ] _100000 , # [ doc = "64: 64 microframes" ] _1000000 } impl From < ITC_A > for u8 { # [ inline ( always ) ] fn from ( variant : ITC_A ) -> Self { match variant { ITC_A :: _0 => 0 , ITC_A :: _1 => 1 , ITC_A :: _10 => 2 , ITC_A :: _100 => 4 , ITC_A :: _1000 => 8 , ITC_A :: _10000 => 16 , ITC_A :: _100000 => 32 , ITC_A :: _1000000 => 64 } } } # [ doc = "Reader of field `ITC`" ] pub type ITC_R = crate :: R < u8 , ITC_A > ; impl ITC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ITC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ITC_A :: _0 ) , 1 => Val ( ITC_A :: _1 ) , 2 => Val ( ITC_A :: _10 ) , 4 => Val ( ITC_A :: _100 ) , 8 => Val ( ITC_A :: _1000 ) , 16 => Val ( ITC_A :: _10000 ) , 32 => Val ( ITC_A :: _100000 ) , 64 => Val ( ITC_A :: _1000000 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ITC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ITC_A :: _1 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ITC_A :: _10 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == ITC_A :: _100 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == ITC_A :: _1000 } # [ doc = "Checks if the value of the field is `_10000`" ] # [ inline ( always ) ] pub fn is_10000 ( & self ) -> bool { * self == ITC_A :: _10000 } # [ doc = "Checks if the value of the field is `_100000`" ] # [ inline ( always ) ] pub fn is_100000 ( & self ) -> bool { * self == ITC_A :: _100000 } # [ doc = "Checks if the value of the field is `_1000000`" ] # [ inline ( always ) ] pub fn is_1000000 ( & self ) -> bool { * self == ITC_A :: _1000000 } } # [ doc = "Write proxy for field `ITC`" ] pub struct ITC_W < 'a > { w : & 'a mut W , } impl < 'a > ITC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ITC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Immediate (no threshold)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ITC_A :: _0 ) } # [ doc = "1 microframe" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ITC_A :: _1 ) } # [ doc = "2 microframes" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ITC_A :: _10 ) } # [ doc = "4 microframes" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( ITC_A :: _100 ) } # [ doc = "8 microframes" ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( ITC_A :: _1000 ) } # [ doc = "16 microframes" ] # [ inline ( always ) ] pub fn _10000 ( self ) -> & 'a mut W { self . variant ( ITC_A :: _10000 ) } # [ doc = "32 microframes" ] # [ inline ( always ) ] pub fn _100000 ( self ) -> & 'a mut W { self . variant ( ITC_A :: _100000 ) } # [ doc = "64 microframes" ] # [ inline ( always ) ] pub fn _1000000 ( self ) -> & 'a mut W { self . variant ( ITC_A :: _1000000 ) } # [ 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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } impl R { # [ doc = "Bit 0 - Run/Stop" ] # [ inline ( always ) ] pub fn rs ( & self ) -> RS_R { RS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Controller Reset" ] # [ inline ( always ) ] pub fn rst ( & self ) -> RST_R { RST_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - Frame list Size" ] # [ inline ( always ) ] pub fn fs ( & self ) -> FS_R { FS_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bit 4 - Periodic Schedule Enable" ] # [ inline ( always ) ] pub fn pse ( & self ) -> PSE_R { PSE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Asynchronous Schedule Enable" ] # [ inline ( always ) ] pub fn ase ( & self ) -> ASE_R { ASE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Interrupt on Async Advance doorbell" ] # [ inline ( always ) ] pub fn iaa ( & self ) -> IAA_R { IAA_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:9 - Asynchronous Schedule Park mode count" ] # [ inline ( always ) ] pub fn asp ( & self ) -> ASP_R { ASP_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 11 - Asynchronous Schedule Park mode Enable" ] # [ inline ( always ) ] pub fn aspe ( & self ) -> ASPE_R { ASPE_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Setup TripWire" ] # [ inline ( always ) ] pub fn sutw ( & self ) -> SUTW_R { SUTW_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Add dTD TripWire" ] # [ inline ( always ) ] pub fn atdtw ( & self ) -> ATDTW_R { ATDTW_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Frame list Size 2" ] # [ inline ( always ) ] pub fn fs2 ( & self ) -> FS2_R { FS2_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:23 - Interrupt Threshold Control" ] # [ inline ( always ) ] pub fn itc ( & self ) -> ITC_R { ITC_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bit 0 - Run/Stop" ] # [ inline ( always ) ] pub fn rs ( & mut self ) -> RS_W { RS_W { w : self } } # [ doc = "Bit 1 - Controller Reset" ] # [ inline ( always ) ] pub fn rst ( & mut self ) -> RST_W { RST_W { w : self } } # [ doc = "Bits 2:3 - Frame list Size" ] # [ inline ( always ) ] pub fn fs ( & mut self ) -> FS_W { FS_W { w : self } } # [ doc = "Bit 4 - Periodic Schedule Enable" ] # [ inline ( always ) ] pub fn pse ( & mut self ) -> PSE_W { PSE_W { w : self } } # [ doc = "Bit 5 - Asynchronous Schedule Enable" ] # [ inline ( always ) ] pub fn ase ( & mut self ) -> ASE_W { ASE_W { w : self } } # [ doc = "Bit 6 - Interrupt on Async Advance doorbell" ] # [ inline ( always ) ] pub fn iaa ( & mut self ) -> IAA_W { IAA_W { w : self } } # [ doc = "Bits 8:9 - Asynchronous Schedule Park mode count" ] # [ inline ( always ) ] pub fn asp ( & mut self ) -> ASP_W { ASP_W { w : self } } # [ doc = "Bit 11 - Asynchronous Schedule Park mode Enable" ] # [ inline ( always ) ] pub fn aspe ( & mut self ) -> ASPE_W { ASPE_W { w : self } } # [ doc = "Bit 13 - Setup TripWire" ] # [ inline ( always ) ] pub fn sutw ( & mut self ) -> SUTW_W { SUTW_W { w : self } } # [ doc = "Bit 14 - Add dTD TripWire" ] # [ inline ( always ) ] pub fn atdtw ( & mut self ) -> ATDTW_W { ATDTW_W { w : self } } # [ doc = "Bit 15 - Frame list Size 2" ] # [ inline ( always ) ] pub fn fs2 ( & mut self ) -> FS2_W { FS2_W { w : self } } # [ doc = "Bits 16:23 - Interrupt Threshold Control" ] # [ inline ( always ) ] pub fn itc ( & mut self ) -> ITC_W { ITC_W { w : self } } } } # [ doc = "USB Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbsts](usbsts) module" ] pub type USBSTS = crate :: Reg < u32 , _USBSTS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBSTS ; # [ doc = "`read()` method returns [usbsts::R](usbsts::R) reader structure" ] impl crate :: Readable for USBSTS { } # [ doc = "`write(|w| ..)` method takes [usbsts::W](usbsts::W) writer structure" ] impl crate :: Writable for USBSTS { } # [ doc = "USB Status Register" ] pub mod usbsts { # [ doc = "Reader of register USBSTS" ] pub type R = crate :: R < u32 , super :: USBSTS > ; # [ doc = "Writer for register USBSTS" ] pub type W = crate :: W < u32 , super :: USBSTS > ; # [ doc = "Register USBSTS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: USBSTS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `UI`" ] pub type UI_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UI`" ] pub struct UI_W < 'a > { w : & 'a mut W , } impl < 'a > UI_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "USB Error Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UEI_A { # [ doc = "0: No error" ] _0 , # [ doc = "1: Error detected" ] _1 } impl From < UEI_A > for bool { # [ inline ( always ) ] fn from ( variant : UEI_A ) -> Self { match variant { UEI_A :: _0 => false , UEI_A :: _1 => true } } } # [ doc = "Reader of field `UEI`" ] pub type UEI_R = crate :: R < bool , UEI_A > ; impl UEI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UEI_A { match self . bits { false => UEI_A :: _0 , true => UEI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UEI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UEI_A :: _1 } } # [ doc = "Write proxy for field `UEI`" ] pub struct UEI_W < 'a > { w : & 'a mut W , } impl < 'a > UEI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UEI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UEI_A :: _0 ) } # [ doc = "Error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UEI_A :: _1 ) } # [ 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 } } # [ doc = "Reader of field `PCI`" ] pub type PCI_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PCI`" ] pub struct PCI_W < 'a > { w : & 'a mut W , } impl < 'a > PCI_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 = "Reader of field `FRI`" ] pub type FRI_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FRI`" ] pub struct FRI_W < 'a > { w : & 'a mut W , } impl < 'a > FRI_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "System Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEI_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Error" ] _1 } impl From < SEI_A > for bool { # [ inline ( always ) ] fn from ( variant : SEI_A ) -> Self { match variant { SEI_A :: _0 => false , SEI_A :: _1 => true } } } # [ doc = "Reader of field `SEI`" ] pub type SEI_R = crate :: R < bool , SEI_A > ; impl SEI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEI_A { match self . bits { false => SEI_A :: _0 , true => SEI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SEI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SEI_A :: _1 } } # [ doc = "Write proxy for field `SEI`" ] pub struct SEI_W < 'a > { w : & 'a mut W , } impl < 'a > SEI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SEI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SEI_A :: _0 ) } # [ doc = "Error" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SEI_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Interrupt on Async Advance\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AAI_A { # [ doc = "0: No async advance interrupt" ] _0 , # [ doc = "1: Async advance interrupt" ] _1 } impl From < AAI_A > for bool { # [ inline ( always ) ] fn from ( variant : AAI_A ) -> Self { match variant { AAI_A :: _0 => false , AAI_A :: _1 => true } } } # [ doc = "Reader of field `AAI`" ] pub type AAI_R = crate :: R < bool , AAI_A > ; impl AAI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AAI_A { match self . bits { false => AAI_A :: _0 , true => AAI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AAI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AAI_A :: _1 } } # [ doc = "Write proxy for field `AAI`" ] pub struct AAI_W < 'a > { w : & 'a mut W , } impl < 'a > AAI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AAI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No async advance interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AAI_A :: _0 ) } # [ doc = "Async advance interrupt" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AAI_A :: _1 ) } # [ 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 = "USB Reset received\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum URI_A { # [ doc = "0: No reset received" ] _0 , # [ doc = "1: Reset received" ] _1 } impl From < URI_A > for bool { # [ inline ( always ) ] fn from ( variant : URI_A ) -> Self { match variant { URI_A :: _0 => false , URI_A :: _1 => true } } } # [ doc = "Reader of field `URI`" ] pub type URI_R = crate :: R < bool , URI_A > ; impl URI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> URI_A { match self . bits { false => URI_A :: _0 , true => URI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == URI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == URI_A :: _1 } } # [ doc = "Write proxy for field `URI`" ] pub struct URI_W < 'a > { w : & 'a mut W , } impl < 'a > URI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : URI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No reset received" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( URI_A :: _0 ) } # [ doc = "Reset received" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( URI_A :: _1 ) } # [ 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 = "Reader of field `SRI`" ] pub type SRI_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRI`" ] pub struct SRI_W < 'a > { w : & 'a mut W , } impl < 'a > SRI_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 = "Device-controller suspend\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLI_A { # [ doc = "0: Active" ] _0 , # [ doc = "1: Suspended" ] _1 } impl From < SLI_A > for bool { # [ inline ( always ) ] fn from ( variant : SLI_A ) -> Self { match variant { SLI_A :: _0 => false , SLI_A :: _1 => true } } } # [ doc = "Reader of field `SLI`" ] pub type SLI_R = crate :: R < bool , SLI_A > ; impl SLI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLI_A { match self . bits { false => SLI_A :: _0 , true => SLI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLI_A :: _1 } } # [ doc = "Write proxy for field `SLI`" ] pub struct SLI_W < 'a > { w : & 'a mut W , } impl < 'a > SLI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLI_A :: _0 ) } # [ doc = "Suspended" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLI_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Host Controller Halted\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HCH_A { # [ doc = "0: Running" ] _0 , # [ doc = "1: Halted" ] _1 } impl From < HCH_A > for bool { # [ inline ( always ) ] fn from ( variant : HCH_A ) -> Self { match variant { HCH_A :: _0 => false , HCH_A :: _1 => true } } } # [ doc = "Reader of field `HCH`" ] pub type HCH_R = crate :: R < bool , HCH_A > ; impl HCH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HCH_A { match self . bits { false => HCH_A :: _0 , true => HCH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HCH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HCH_A :: _1 } } # [ doc = "Reclamation\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RCL_A { # [ doc = "0: Non-empty asynchronous schedule" ] _0 , # [ doc = "1: Empty asynchronous schedule" ] _1 } impl From < RCL_A > for bool { # [ inline ( always ) ] fn from ( variant : RCL_A ) -> Self { match variant { RCL_A :: _0 => false , RCL_A :: _1 => true } } } # [ doc = "Reader of field `RCL`" ] pub type RCL_R = crate :: R < bool , RCL_A > ; impl RCL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RCL_A { match self . bits { false => RCL_A :: _0 , true => RCL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RCL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RCL_A :: _1 } } # [ doc = "Periodic schedule Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < PS_A > for bool { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _0 => false , PS_A :: _1 => true } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < bool , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { false => PS_A :: _0 , true => PS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PS_A :: _1 } } # [ doc = "Asynchronous schedule Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AS_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < AS_A > for bool { # [ inline ( always ) ] fn from ( variant : AS_A ) -> Self { match variant { AS_A :: _0 => false , AS_A :: _1 => true } } } # [ doc = "Reader of field `AS`" ] pub type AS_R = crate :: R < bool , AS_A > ; impl AS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AS_A { match self . bits { false => AS_A :: _0 , true => AS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AS_A :: _1 } } # [ doc = "Reader of field `NAKI`" ] pub type NAKI_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `UAI`" ] pub type UAI_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UAI`" ] pub struct UAI_W < 'a > { w : & 'a mut W , } impl < 'a > UAI_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `UPI`" ] pub type UPI_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UPI`" ] pub struct UPI_W < 'a > { w : & 'a mut W , } impl < 'a > UPI_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "General purpose Timer 0 Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TI0_A { # [ doc = "0: No interrupt" ] _0 , # [ doc = "1: Interrupt occurred" ] _1 } impl From < TI0_A > for bool { # [ inline ( always ) ] fn from ( variant : TI0_A ) -> Self { match variant { TI0_A :: _0 => false , TI0_A :: _1 => true } } } # [ doc = "Reader of field `TI0`" ] pub type TI0_R = crate :: R < bool , TI0_A > ; impl TI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TI0_A { match self . bits { false => TI0_A :: _0 , true => TI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TI0_A :: _1 } } # [ doc = "Write proxy for field `TI0`" ] pub struct TI0_W < 'a > { w : & 'a mut W , } impl < 'a > TI0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TI0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TI0_A :: _0 ) } # [ doc = "Interrupt occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TI0_A :: _1 ) } # [ 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 = "General purpose Timer 1 Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TI1_A { # [ doc = "0: No interrupt" ] _0 , # [ doc = "1: Interrupt occurred" ] _1 } impl From < TI1_A > for bool { # [ inline ( always ) ] fn from ( variant : TI1_A ) -> Self { match variant { TI1_A :: _0 => false , TI1_A :: _1 => true } } } # [ doc = "Reader of field `TI1`" ] pub type TI1_R = crate :: R < bool , TI1_A > ; impl TI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TI1_A { match self . bits { false => TI1_A :: _0 , true => TI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TI1_A :: _1 } } # [ doc = "Write proxy for field `TI1`" ] pub struct TI1_W < 'a > { w : & 'a mut W , } impl < 'a > TI1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TI1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TI1_A :: _0 ) } # [ doc = "Interrupt occurred" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TI1_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - USB Interrupt (USBINT)" ] # [ inline ( always ) ] pub fn ui ( & self ) -> UI_R { UI_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - USB Error Interrupt" ] # [ inline ( always ) ] pub fn uei ( & self ) -> UEI_R { UEI_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Change detect" ] # [ inline ( always ) ] pub fn pci ( & self ) -> PCI_R { PCI_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Frame-list Rollover" ] # [ inline ( always ) ] pub fn fri ( & self ) -> FRI_R { FRI_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - System Error" ] # [ inline ( always ) ] pub fn sei ( & self ) -> SEI_R { SEI_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Interrupt on Async Advance" ] # [ inline ( always ) ] pub fn aai ( & self ) -> AAI_R { AAI_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - USB Reset received" ] # [ inline ( always ) ] pub fn uri ( & self ) -> URI_R { URI_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - SOF Received" ] # [ inline ( always ) ] pub fn sri ( & self ) -> SRI_R { SRI_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Device-controller suspend" ] # [ inline ( always ) ] pub fn sli ( & self ) -> SLI_R { SLI_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Host Controller Halted" ] # [ inline ( always ) ] pub fn hch ( & self ) -> HCH_R { HCH_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Reclamation" ] # [ inline ( always ) ] pub fn rcl ( & self ) -> RCL_R { RCL_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Periodic schedule Status" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Asynchronous schedule Status" ] # [ inline ( always ) ] pub fn as_ ( & self ) -> AS_R { AS_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - NAK Interrupt" ] # [ inline ( always ) ] pub fn naki ( & self ) -> NAKI_R { NAKI_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - USB host Asynchronous Interrupt" ] # [ inline ( always ) ] pub fn uai ( & self ) -> UAI_R { UAI_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - USB host Periodic Interrupt" ] # [ inline ( always ) ] pub fn upi ( & self ) -> UPI_R { UPI_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - General purpose Timer 0 Interrupt" ] # [ inline ( always ) ] pub fn ti0 ( & self ) -> TI0_R { TI0_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - General purpose Timer 1 Interrupt" ] # [ inline ( always ) ] pub fn ti1 ( & self ) -> TI1_R { TI1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - USB Interrupt (USBINT)" ] # [ inline ( always ) ] pub fn ui ( & mut self ) -> UI_W { UI_W { w : self } } # [ doc = "Bit 1 - USB Error Interrupt" ] # [ inline ( always ) ] pub fn uei ( & mut self ) -> UEI_W { UEI_W { w : self } } # [ doc = "Bit 2 - Port Change detect" ] # [ inline ( always ) ] pub fn pci ( & mut self ) -> PCI_W { PCI_W { w : self } } # [ doc = "Bit 3 - Frame-list Rollover" ] # [ inline ( always ) ] pub fn fri ( & mut self ) -> FRI_W { FRI_W { w : self } } # [ doc = "Bit 4 - System Error" ] # [ inline ( always ) ] pub fn sei ( & mut self ) -> SEI_W { SEI_W { w : self } } # [ doc = "Bit 5 - Interrupt on Async Advance" ] # [ inline ( always ) ] pub fn aai ( & mut self ) -> AAI_W { AAI_W { w : self } } # [ doc = "Bit 6 - USB Reset received" ] # [ inline ( always ) ] pub fn uri ( & mut self ) -> URI_W { URI_W { w : self } } # [ doc = "Bit 7 - SOF Received" ] # [ inline ( always ) ] pub fn sri ( & mut self ) -> SRI_W { SRI_W { w : self } } # [ doc = "Bit 8 - Device-controller suspend" ] # [ inline ( always ) ] pub fn sli ( & mut self ) -> SLI_W { SLI_W { w : self } } # [ doc = "Bit 18 - USB host Asynchronous Interrupt" ] # [ inline ( always ) ] pub fn uai ( & mut self ) -> UAI_W { UAI_W { w : self } } # [ doc = "Bit 19 - USB host Periodic Interrupt" ] # [ inline ( always ) ] pub fn upi ( & mut self ) -> UPI_W { UPI_W { w : self } } # [ doc = "Bit 24 - General purpose Timer 0 Interrupt" ] # [ inline ( always ) ] pub fn ti0 ( & mut self ) -> TI0_W { TI0_W { w : self } } # [ doc = "Bit 25 - General purpose Timer 1 Interrupt" ] # [ inline ( always ) ] pub fn ti1 ( & mut self ) -> TI1_W { TI1_W { w : self } } } } # [ doc = "USB Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbintr](usbintr) module" ] pub type USBINTR = crate :: Reg < u32 , _USBINTR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBINTR ; # [ doc = "`read()` method returns [usbintr::R](usbintr::R) reader structure" ] impl crate :: Readable for USBINTR { } # [ doc = "`write(|w| ..)` method takes [usbintr::W](usbintr::W) writer structure" ] impl crate :: Writable for USBINTR { } # [ doc = "USB Interrupt Enable Register" ] pub mod usbintr { # [ doc = "Reader of register USBINTR" ] pub type R = crate :: R < u32 , super :: USBINTR > ; # [ doc = "Writer for register USBINTR" ] pub type W = crate :: W < u32 , super :: USBINTR > ; # [ doc = "Register USBINTR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: USBINTR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "USB interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < UE_A > for bool { # [ inline ( always ) ] fn from ( variant : UE_A ) -> Self { match variant { UE_A :: _0 => false , UE_A :: _1 => true } } } # [ doc = "Reader of field `UE`" ] pub type UE_R = crate :: R < bool , UE_A > ; impl UE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UE_A { match self . bits { false => UE_A :: _0 , true => UE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UE_A :: _1 } } # [ doc = "Write proxy for field `UE`" ] pub struct UE_W < 'a > { w : & 'a mut W , } impl < 'a > UE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "USB Error interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UEE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < UEE_A > for bool { # [ inline ( always ) ] fn from ( variant : UEE_A ) -> Self { match variant { UEE_A :: _0 => false , UEE_A :: _1 => true } } } # [ doc = "Reader of field `UEE`" ] pub type UEE_R = crate :: R < bool , UEE_A > ; impl UEE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UEE_A { match self . bits { false => UEE_A :: _0 , true => UEE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UEE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UEE_A :: _1 } } # [ doc = "Write proxy for field `UEE`" ] pub struct UEE_W < 'a > { w : & 'a mut W , } impl < 'a > UEE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UEE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UEE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UEE_A :: _1 ) } # [ 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 } } # [ doc = "Port Change detect Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PCE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < PCE_A > for bool { # [ inline ( always ) ] fn from ( variant : PCE_A ) -> Self { match variant { PCE_A :: _0 => false , PCE_A :: _1 => true } } } # [ doc = "Reader of field `PCE`" ] pub type PCE_R = crate :: R < bool , PCE_A > ; impl PCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PCE_A { match self . bits { false => PCE_A :: _0 , true => PCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PCE_A :: _1 } } # [ doc = "Write proxy for field `PCE`" ] pub struct PCE_W < 'a > { w : & 'a mut W , } impl < 'a > PCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PCE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PCE_A :: _1 ) } # [ 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 = "Frame list Rollover Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < FRE_A > for bool { # [ inline ( always ) ] fn from ( variant : FRE_A ) -> Self { match variant { FRE_A :: _0 => false , FRE_A :: _1 => true } } } # [ doc = "Reader of field `FRE`" ] pub type FRE_R = crate :: R < bool , FRE_A > ; impl FRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRE_A { match self . bits { false => FRE_A :: _0 , true => FRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRE_A :: _1 } } # [ doc = "Write proxy for field `FRE`" ] pub struct FRE_W < 'a > { w : & 'a mut W , } impl < 'a > FRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "System Error Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < SEE_A > for bool { # [ inline ( always ) ] fn from ( variant : SEE_A ) -> Self { match variant { SEE_A :: _0 => false , SEE_A :: _1 => true } } } # [ doc = "Reader of field `SEE`" ] pub type SEE_R = crate :: R < bool , SEE_A > ; impl SEE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEE_A { match self . bits { false => SEE_A :: _0 , true => SEE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SEE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SEE_A :: _1 } } # [ doc = "Write proxy for field `SEE`" ] pub struct SEE_W < 'a > { w : & 'a mut W , } impl < 'a > SEE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SEE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SEE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SEE_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Interrupt on Async advance Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AAE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < AAE_A > for bool { # [ inline ( always ) ] fn from ( variant : AAE_A ) -> Self { match variant { AAE_A :: _0 => false , AAE_A :: _1 => true } } } # [ doc = "Reader of field `AAE`" ] pub type AAE_R = crate :: R < bool , AAE_A > ; impl AAE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AAE_A { match self . bits { false => AAE_A :: _0 , true => AAE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AAE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AAE_A :: _1 } } # [ doc = "Write proxy for field `AAE`" ] pub struct AAE_W < 'a > { w : & 'a mut W , } impl < 'a > AAE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AAE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AAE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AAE_A :: _1 ) } # [ 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 = "USB-Reset Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum URE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < URE_A > for bool { # [ inline ( always ) ] fn from ( variant : URE_A ) -> Self { match variant { URE_A :: _0 => false , URE_A :: _1 => true } } } # [ doc = "Reader of field `URE`" ] pub type URE_R = crate :: R < bool , URE_A > ; impl URE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> URE_A { match self . bits { false => URE_A :: _0 , true => URE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == URE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == URE_A :: _1 } } # [ doc = "Write proxy for field `URE`" ] pub struct URE_W < 'a > { w : & 'a mut W , } impl < 'a > URE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : URE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( URE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( URE_A :: _1 ) } # [ 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 = "SOF-Received Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < SRE_A > for bool { # [ inline ( always ) ] fn from ( variant : SRE_A ) -> Self { match variant { SRE_A :: _0 => false , SRE_A :: _1 => true } } } # [ doc = "Reader of field `SRE`" ] pub type SRE_R = crate :: R < bool , SRE_A > ; impl SRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRE_A { match self . bits { false => SRE_A :: _0 , true => SRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRE_A :: _1 } } # [ doc = "Write proxy for field `SRE`" ] pub struct SRE_W < 'a > { w : & 'a mut W , } impl < 'a > SRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SRE_A :: _1 ) } # [ 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 = "Sleep (DC suspend) Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < SLE_A > for bool { # [ inline ( always ) ] fn from ( variant : SLE_A ) -> Self { match variant { SLE_A :: _0 => false , SLE_A :: _1 => true } } } # [ doc = "Reader of field `SLE`" ] pub type SLE_R = crate :: R < bool , SLE_A > ; impl SLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLE_A { match self . bits { false => SLE_A :: _0 , true => SLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLE_A :: _1 } } # [ doc = "Write proxy for field `SLE`" ] pub struct SLE_W < 'a > { w : & 'a mut W , } impl < 'a > SLE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLE_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "NAK Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NAKE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < NAKE_A > for bool { # [ inline ( always ) ] fn from ( variant : NAKE_A ) -> Self { match variant { NAKE_A :: _0 => false , NAKE_A :: _1 => true } } } # [ doc = "Reader of field `NAKE`" ] pub type NAKE_R = crate :: R < bool , NAKE_A > ; impl NAKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NAKE_A { match self . bits { false => NAKE_A :: _0 , true => NAKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NAKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NAKE_A :: _1 } } # [ doc = "Write proxy for field `NAKE`" ] pub struct NAKE_W < 'a > { w : & 'a mut W , } impl < 'a > NAKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NAKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NAKE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NAKE_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Reader of field `UAIE`" ] pub type UAIE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UAIE`" ] pub struct UAIE_W < 'a > { w : & 'a mut W , } impl < 'a > UAIE_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `UPIE`" ] pub type UPIE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UPIE`" ] pub struct UPIE_W < 'a > { w : & 'a mut W , } impl < 'a > UPIE_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "General purpose Timer 0 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE0_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < TIE0_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE0_A ) -> Self { match variant { TIE0_A :: _0 => false , TIE0_A :: _1 => true } } } # [ doc = "Reader of field `TIE0`" ] pub type TIE0_R = crate :: R < bool , TIE0_A > ; impl TIE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE0_A { match self . bits { false => TIE0_A :: _0 , true => TIE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE0_A :: _1 } } # [ doc = "Write proxy for field `TIE0`" ] pub struct TIE0_W < 'a > { w : & 'a mut W , } impl < 'a > TIE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE0_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE0_A :: _1 ) } # [ 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 = "General purpose Timer 1 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE1_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < TIE1_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE1_A ) -> Self { match variant { TIE1_A :: _0 => false , TIE1_A :: _1 => true } } } # [ doc = "Reader of field `TIE1`" ] pub type TIE1_R = crate :: R < bool , TIE1_A > ; impl TIE1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE1_A { match self . bits { false => TIE1_A :: _0 , true => TIE1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE1_A :: _1 } } # [ doc = "Write proxy for field `TIE1`" ] pub struct TIE1_W < 'a > { w : & 'a mut W , } impl < 'a > TIE1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE1_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE1_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - USB interrupt Enable" ] # [ inline ( always ) ] pub fn ue ( & self ) -> UE_R { UE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - USB Error interrupt Enable" ] # [ inline ( always ) ] pub fn uee ( & self ) -> UEE_R { UEE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Change detect Enable" ] # [ inline ( always ) ] pub fn pce ( & self ) -> PCE_R { PCE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Frame list Rollover Enable" ] # [ inline ( always ) ] pub fn fre ( & self ) -> FRE_R { FRE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - System Error Enable" ] # [ inline ( always ) ] pub fn see ( & self ) -> SEE_R { SEE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Interrupt on Async advance Enable" ] # [ inline ( always ) ] pub fn aae ( & self ) -> AAE_R { AAE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - USB-Reset Enable" ] # [ inline ( always ) ] pub fn ure ( & self ) -> URE_R { URE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - SOF-Received Enable" ] # [ inline ( always ) ] pub fn sre ( & self ) -> SRE_R { SRE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Sleep (DC suspend) Enable" ] # [ inline ( always ) ] pub fn sle ( & self ) -> SLE_R { SLE_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - NAK Interrupt Enable" ] # [ inline ( always ) ] pub fn nake ( & self ) -> NAKE_R { NAKE_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - USB host Asynchronous Interrupt Enable" ] # [ inline ( always ) ] pub fn uaie ( & self ) -> UAIE_R { UAIE_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - USB host Periodic Interrupt Enable" ] # [ inline ( always ) ] pub fn upie ( & self ) -> UPIE_R { UPIE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - General purpose Timer 0 Interrupt Enable" ] # [ inline ( always ) ] pub fn tie0 ( & self ) -> TIE0_R { TIE0_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - General purpose Timer 1 Interrupt Enable" ] # [ inline ( always ) ] pub fn tie1 ( & self ) -> TIE1_R { TIE1_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - USB interrupt Enable" ] # [ inline ( always ) ] pub fn ue ( & mut self ) -> UE_W { UE_W { w : self } } # [ doc = "Bit 1 - USB Error interrupt Enable" ] # [ inline ( always ) ] pub fn uee ( & mut self ) -> UEE_W { UEE_W { w : self } } # [ doc = "Bit 2 - Port Change detect Enable" ] # [ inline ( always ) ] pub fn pce ( & mut self ) -> PCE_W { PCE_W { w : self } } # [ doc = "Bit 3 - Frame list Rollover Enable" ] # [ inline ( always ) ] pub fn fre ( & mut self ) -> FRE_W { FRE_W { w : self } } # [ doc = "Bit 4 - System Error Enable" ] # [ inline ( always ) ] pub fn see ( & mut self ) -> SEE_W { SEE_W { w : self } } # [ doc = "Bit 5 - Interrupt on Async advance Enable" ] # [ inline ( always ) ] pub fn aae ( & mut self ) -> AAE_W { AAE_W { w : self } } # [ doc = "Bit 6 - USB-Reset Enable" ] # [ inline ( always ) ] pub fn ure ( & mut self ) -> URE_W { URE_W { w : self } } # [ doc = "Bit 7 - SOF-Received Enable" ] # [ inline ( always ) ] pub fn sre ( & mut self ) -> SRE_W { SRE_W { w : self } } # [ doc = "Bit 8 - Sleep (DC suspend) Enable" ] # [ inline ( always ) ] pub fn sle ( & mut self ) -> SLE_W { SLE_W { w : self } } # [ doc = "Bit 16 - NAK Interrupt Enable" ] # [ inline ( always ) ] pub fn nake ( & mut self ) -> NAKE_W { NAKE_W { w : self } } # [ doc = "Bit 18 - USB host Asynchronous Interrupt Enable" ] # [ inline ( always ) ] pub fn uaie ( & mut self ) -> UAIE_W { UAIE_W { w : self } } # [ doc = "Bit 19 - USB host Periodic Interrupt Enable" ] # [ inline ( always ) ] pub fn upie ( & mut self ) -> UPIE_W { UPIE_W { w : self } } # [ doc = "Bit 24 - General purpose Timer 0 Interrupt Enable" ] # [ inline ( always ) ] pub fn tie0 ( & mut self ) -> TIE0_W { TIE0_W { w : self } } # [ doc = "Bit 25 - General purpose Timer 1 Interrupt Enable" ] # [ inline ( always ) ] pub fn tie1 ( & mut self ) -> TIE1_W { TIE1_W { w : self } } } } # [ doc = "Frame Index Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [frindex](frindex) module" ] pub type FRINDEX = crate :: Reg < u32 , _FRINDEX > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FRINDEX ; # [ doc = "`read()` method returns [frindex::R](frindex::R) reader structure" ] impl crate :: Readable for FRINDEX { } # [ doc = "`write(|w| ..)` method takes [frindex::W](frindex::W) writer structure" ] impl crate :: Writable for FRINDEX { } # [ doc = "Frame Index Register" ] pub mod frindex { # [ doc = "Reader of register FRINDEX" ] pub type R = crate :: R < u32 , super :: FRINDEX > ; # [ doc = "Writer for register FRINDEX" ] pub type W = crate :: W < u32 , super :: FRINDEX > ; # [ doc = "Register FRINDEX `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FRINDEX { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FRINDEX`" ] pub type FRINDEX_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `FRINDEX`" ] pub struct FRINDEX_W < 'a > { w : & 'a mut W , } impl < 'a > FRINDEX_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x3fff ) | ( ( value as u32 ) & 0x3fff ) ; self . w } } # [ doc = "Reader of field `Reerved`" ] pub type REERVED_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:13 - Frame Index" ] # [ inline ( always ) ] pub fn frindex ( & self ) -> FRINDEX_R { FRINDEX_R :: new ( ( self . bits & 0x3fff ) as u16 ) } # [ doc = "Bits 14:31 - Reserved" ] # [ inline ( always ) ] pub fn reerved ( & self ) -> REERVED_R { REERVED_R :: new ( ( ( self . bits >> 14 ) & 0x0003_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:13 - Frame Index" ] # [ inline ( always ) ] pub fn frindex ( & mut self ) -> FRINDEX_W { FRINDEX_W { w : self } } } } # [ doc = "Device Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [deviceaddr](deviceaddr) module" ] pub type DEVICEADDR = crate :: Reg < u32 , _DEVICEADDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEVICEADDR ; # [ doc = "`read()` method returns [deviceaddr::R](deviceaddr::R) reader structure" ] impl crate :: Readable for DEVICEADDR { } # [ doc = "`write(|w| ..)` method takes [deviceaddr::W](deviceaddr::W) writer structure" ] impl crate :: Writable for DEVICEADDR { } # [ doc = "Device Address Register" ] pub mod deviceaddr { # [ doc = "Reader of register DEVICEADDR" ] pub type R = crate :: R < u32 , super :: DEVICEADDR > ; # [ doc = "Writer for register DEVICEADDR" ] pub type W = crate :: W < u32 , super :: DEVICEADDR > ; # [ doc = "Register DEVICEADDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DEVICEADDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Device Address Advance\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USBADRA_A { # [ doc = "0: Writes to USBADR are instantaneous." ] _0 , # [ doc = "1: When this bit is written to a 1 at the same time or before USBADR is written, the write to the USBADR field is staged and held in a hidden register. After an IN occurs on endpoint 0 and is ACKed, USBADR is loaded from the holding register." ] _1 } impl From < USBADRA_A > for bool { # [ inline ( always ) ] fn from ( variant : USBADRA_A ) -> Self { match variant { USBADRA_A :: _0 => false , USBADRA_A :: _1 => true } } } # [ doc = "Reader of field `USBADRA`" ] pub type USBADRA_R = crate :: R < bool , USBADRA_A > ; impl USBADRA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USBADRA_A { match self . bits { false => USBADRA_A :: _0 , true => USBADRA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USBADRA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USBADRA_A :: _1 } } # [ doc = "Write proxy for field `USBADRA`" ] pub struct USBADRA_W < 'a > { w : & 'a mut W , } impl < 'a > USBADRA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USBADRA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Writes to USBADR are instantaneous." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USBADRA_A :: _0 ) } # [ doc = "When this bit is written to a 1 at the same time or before USBADR is written, the write to the USBADR field is staged and held in a hidden register. After an IN occurs on endpoint 0 and is ACKed, USBADR is loaded from the holding register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USBADRA_A :: _1 ) } # [ 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 = "Reader of field `USBADR`" ] pub type USBADR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `USBADR`" ] pub struct USBADR_W < 'a > { w : & 'a mut W , } impl < 'a > USBADR_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 & ! ( 0x7f << 25 ) ) | ( ( ( value as u32 ) & 0x7f ) << 25 ) ; self . w } } impl R { # [ doc = "Bit 24 - Device Address Advance" ] # [ inline ( always ) ] pub fn usbadra ( & self ) -> USBADRA_R { USBADRA_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bits 25:31 - Device Address" ] # [ inline ( always ) ] pub fn usbadr ( & self ) -> USBADR_R { USBADR_R :: new ( ( ( self . bits >> 25 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bit 24 - Device Address Advance" ] # [ inline ( always ) ] pub fn usbadra ( & mut self ) -> USBADRA_W { USBADRA_W { w : self } } # [ doc = "Bits 25:31 - Device Address" ] # [ inline ( always ) ] pub fn usbadr ( & mut self ) -> USBADR_W { USBADR_W { w : self } } } } # [ doc = "Periodic Frame List Base Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [periodiclistbase](periodiclistbase) module" ] pub type PERIODICLISTBASE = crate :: Reg < u32 , _PERIODICLISTBASE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PERIODICLISTBASE ; # [ doc = "`read()` method returns [periodiclistbase::R](periodiclistbase::R) reader structure" ] impl crate :: Readable for PERIODICLISTBASE { } # [ doc = "`write(|w| ..)` method takes [periodiclistbase::W](periodiclistbase::W) writer structure" ] impl crate :: Writable for PERIODICLISTBASE { } # [ doc = "Periodic Frame List Base Address Register" ] pub mod periodiclistbase { # [ doc = "Reader of register PERIODICLISTBASE" ] pub type R = crate :: R < u32 , super :: PERIODICLISTBASE > ; # [ doc = "Writer for register PERIODICLISTBASE" ] pub type W = crate :: W < u32 , super :: PERIODICLISTBASE > ; # [ doc = "Register PERIODICLISTBASE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PERIODICLISTBASE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PERBASE`" ] pub type PERBASE_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `PERBASE`" ] pub struct PERBASE_W < 'a > { w : & 'a mut W , } impl < 'a > PERBASE_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x000f_ffff << 12 ) ) | ( ( ( value as u32 ) & 0x000f_ffff ) << 12 ) ; self . w } } impl R { # [ doc = "Bits 12:31 - Base address" ] # [ inline ( always ) ] pub fn perbase ( & self ) -> PERBASE_R { PERBASE_R :: new ( ( ( self . bits >> 12 ) & 0x000f_ffff ) as u32 ) } } impl W { # [ doc = "Bits 12:31 - Base address" ] # [ inline ( always ) ] pub fn perbase ( & mut self ) -> PERBASE_W { PERBASE_W { w : self } } } } # [ doc = "Current Asynchronous List Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [asynclistaddr](asynclistaddr) module" ] pub type ASYNCLISTADDR = crate :: Reg < u32 , _ASYNCLISTADDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ASYNCLISTADDR ; # [ doc = "`read()` method returns [asynclistaddr::R](asynclistaddr::R) reader structure" ] impl crate :: Readable for ASYNCLISTADDR { } # [ doc = "`write(|w| ..)` method takes [asynclistaddr::W](asynclistaddr::W) writer structure" ] impl crate :: Writable for ASYNCLISTADDR { } # [ doc = "Current Asynchronous List Address Register" ] pub mod asynclistaddr { # [ doc = "Reader of register ASYNCLISTADDR" ] pub type R = crate :: R < u32 , super :: ASYNCLISTADDR > ; # [ doc = "Writer for register ASYNCLISTADDR" ] pub type W = crate :: W < u32 , super :: ASYNCLISTADDR > ; # [ doc = "Register ASYNCLISTADDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ASYNCLISTADDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ASYBASE`" ] pub type ASYBASE_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `ASYBASE`" ] pub struct ASYBASE_W < 'a > { w : & 'a mut W , } impl < 'a > ASYBASE_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07ff_ffff << 5 ) ) | ( ( ( value as u32 ) & 0x07ff_ffff ) << 5 ) ; self . w } } impl R { # [ doc = "Bits 5:31 - Link pointer low (LPL)" ] # [ inline ( always ) ] pub fn asybase ( & self ) -> ASYBASE_R { ASYBASE_R :: new ( ( ( self . bits >> 5 ) & 0x07ff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 5:31 - Link pointer low (LPL)" ] # [ inline ( always ) ] pub fn asybase ( & mut self ) -> ASYBASE_W { ASYBASE_W { w : self } } } } # [ doc = "Endpoint List Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [eplistaddr](eplistaddr) module" ] pub type EPLISTADDR = crate :: Reg < u32 , _EPLISTADDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EPLISTADDR ; # [ doc = "`read()` method returns [eplistaddr::R](eplistaddr::R) reader structure" ] impl crate :: Readable for EPLISTADDR { } # [ doc = "`write(|w| ..)` method takes [eplistaddr::W](eplistaddr::W) writer structure" ] impl crate :: Writable for EPLISTADDR { } # [ doc = "Endpoint List Address Register" ] pub mod eplistaddr { # [ doc = "Reader of register EPLISTADDR" ] pub type R = crate :: R < u32 , super :: EPLISTADDR > ; # [ doc = "Writer for register EPLISTADDR" ] pub type W = crate :: W < u32 , super :: EPLISTADDR > ; # [ doc = "Register EPLISTADDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EPLISTADDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EPBASE`" ] pub type EPBASE_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `EPBASE`" ] pub struct EPBASE_W < 'a > { w : & 'a mut W , } impl < 'a > EPBASE_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x001f_ffff << 11 ) ) | ( ( ( value as u32 ) & 0x001f_ffff ) << 11 ) ; self . w } } impl R { # [ doc = "Bits 11:31 - Endpoint list address" ] # [ inline ( always ) ] pub fn epbase ( & self ) -> EPBASE_R { EPBASE_R :: new ( ( ( self . bits >> 11 ) & 0x001f_ffff ) as u32 ) } } impl W { # [ doc = "Bits 11:31 - Endpoint list address" ] # [ inline ( always ) ] pub fn epbase ( & mut self ) -> EPBASE_W { EPBASE_W { w : self } } } } # [ doc = "Host TT Asynchronous Buffer Control\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ttctrl](ttctrl) module" ] pub type TTCTRL = crate :: Reg < u32 , _TTCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TTCTRL ; # [ doc = "`read()` method returns [ttctrl::R](ttctrl::R) reader structure" ] impl crate :: Readable for TTCTRL { } # [ doc = "Host TT Asynchronous Buffer Control" ] pub mod ttctrl { # [ doc = "Reader of register TTCTRL" ] pub type R = crate :: R < u32 , super :: TTCTRL > ; # [ doc = "Reader of field `TTHA`" ] pub type TTHA_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `Reerved`" ] pub type REERVED_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bits 24:30 - TT Hub Address" ] # [ inline ( always ) ] pub fn ttha ( & self ) -> TTHA_R { TTHA_R :: new ( ( ( self . bits >> 24 ) & 0x7f ) as u8 ) } # [ doc = "Bit 31 - Reserved" ] # [ inline ( always ) ] pub fn reerved ( & self ) -> REERVED_R { REERVED_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Master Interface Data Burst Size Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [burstsize](burstsize) module" ] pub type BURSTSIZE = crate :: Reg < u32 , _BURSTSIZE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BURSTSIZE ; # [ doc = "`read()` method returns [burstsize::R](burstsize::R) reader structure" ] impl crate :: Readable for BURSTSIZE { } # [ doc = "`write(|w| ..)` method takes [burstsize::W](burstsize::W) writer structure" ] impl crate :: Writable for BURSTSIZE { } # [ doc = "Master Interface Data Burst Size Register" ] pub mod burstsize { # [ doc = "Reader of register BURSTSIZE" ] pub type R = crate :: R < u32 , super :: BURSTSIZE > ; # [ doc = "Writer for register BURSTSIZE" ] pub type W = crate :: W < u32 , super :: BURSTSIZE > ; # [ doc = "Register BURSTSIZE `reset()`'s with value 0x0808" ] impl crate :: ResetValue for super :: BURSTSIZE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0808 } } # [ doc = "Reader of field `RXPBURST`" ] pub type RXPBURST_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RXPBURST`" ] pub struct RXPBURST_W < 'a > { w : & 'a mut W , } impl < 'a > RXPBURST_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `TXPBURST`" ] pub type TXPBURST_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXPBURST`" ] pub struct TXPBURST_W < 'a > { w : & 'a mut W , } impl < 'a > TXPBURST_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Programable RX Burst length" ] # [ inline ( always ) ] pub fn rxpburst ( & self ) -> RXPBURST_R { RXPBURST_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Programable TX Burst length" ] # [ inline ( always ) ] pub fn txpburst ( & self ) -> TXPBURST_R { TXPBURST_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Programable RX Burst length" ] # [ inline ( always ) ] pub fn rxpburst ( & mut self ) -> RXPBURST_W { RXPBURST_W { w : self } } # [ doc = "Bits 8:15 - Programable TX Burst length" ] # [ inline ( always ) ] pub fn txpburst ( & mut self ) -> TXPBURST_W { TXPBURST_W { w : self } } } } # [ doc = "Transmit FIFO Tuning Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [txfilltuning](txfilltuning) module" ] pub type TXFILLTUNING = crate :: Reg < u32 , _TXFILLTUNING > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TXFILLTUNING ; # [ doc = "`read()` method returns [txfilltuning::R](txfilltuning::R) reader structure" ] impl crate :: Readable for TXFILLTUNING { } # [ doc = "`write(|w| ..)` method takes [txfilltuning::W](txfilltuning::W) writer structure" ] impl crate :: Writable for TXFILLTUNING { } # [ doc = "Transmit FIFO Tuning Control Register" ] pub mod txfilltuning { # [ doc = "Reader of register TXFILLTUNING" ] pub type R = crate :: R < u32 , super :: TXFILLTUNING > ; # [ doc = "Writer for register TXFILLTUNING" ] pub type W = crate :: W < u32 , super :: TXFILLTUNING > ; # [ doc = "Register TXFILLTUNING `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TXFILLTUNING { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TXSCHOH`" ] pub type TXSCHOH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXSCHOH`" ] pub struct TXSCHOH_W < 'a > { w : & 'a mut W , } impl < 'a > TXSCHOH_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 & ! 0x7f ) | ( ( value as u32 ) & 0x7f ) ; self . w } } # [ doc = "Reader of field `TXSCHHEALTH`" ] pub type TXSCHHEALTH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXSCHHEALTH`" ] pub struct TXSCHHEALTH_W < 'a > { w : & 'a mut W , } impl < 'a > TXSCHHEALTH_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 & ! ( 0x1f << 8 ) ) | ( ( ( value as u32 ) & 0x1f ) << 8 ) ; self . w } } # [ doc = "Reader of field `TXFIFOTHRES`" ] pub type TXFIFOTHRES_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXFIFOTHRES`" ] pub struct TXFIFOTHRES_W < 'a > { w : & 'a mut W , } impl < 'a > TXFIFOTHRES_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 & ! ( 0x3f << 16 ) ) | ( ( ( value as u32 ) & 0x3f ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:6 - Scheduler Overhead" ] # [ inline ( always ) ] pub fn txschoh ( & self ) -> TXSCHOH_R { TXSCHOH_R :: new ( ( self . bits & 0x7f ) as u8 ) } # [ doc = "Bits 8:12 - Scheduler Health counter" ] # [ inline ( always ) ] pub fn txschhealth ( & self ) -> TXSCHHEALTH_R { TXSCHHEALTH_R :: new ( ( ( self . bits >> 8 ) & 0x1f ) as u8 ) } # [ doc = "Bits 16:21 - FIFO burst Threshold" ] # [ inline ( always ) ] pub fn txfifothres ( & self ) -> TXFIFOTHRES_R { TXFIFOTHRES_R :: new ( ( ( self . bits >> 16 ) & 0x3f ) as u8 ) } } impl W { # [ doc = "Bits 0:6 - Scheduler Overhead" ] # [ inline ( always ) ] pub fn txschoh ( & mut self ) -> TXSCHOH_W { TXSCHOH_W { w : self } } # [ doc = "Bits 8:12 - Scheduler Health counter" ] # [ inline ( always ) ] pub fn txschhealth ( & mut self ) -> TXSCHHEALTH_W { TXSCHHEALTH_W { w : self } } # [ doc = "Bits 16:21 - FIFO burst Threshold" ] # [ inline ( always ) ] pub fn txfifothres ( & mut self ) -> TXFIFOTHRES_W { TXFIFOTHRES_W { w : self } } } } # [ doc = "Endpoint NAK Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [endptnak](endptnak) module" ] pub type ENDPTNAK = crate :: Reg < u32 , _ENDPTNAK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ENDPTNAK ; # [ doc = "`read()` method returns [endptnak::R](endptnak::R) reader structure" ] impl crate :: Readable for ENDPTNAK { } # [ doc = "`write(|w| ..)` method takes [endptnak::W](endptnak::W) writer structure" ] impl crate :: Writable for ENDPTNAK { } # [ doc = "Endpoint NAK Register" ] pub mod endptnak { # [ doc = "Reader of register ENDPTNAK" ] pub type R = crate :: R < u32 , super :: ENDPTNAK > ; # [ doc = "Writer for register ENDPTNAK" ] pub type W = crate :: W < u32 , super :: ENDPTNAK > ; # [ doc = "Register ENDPTNAK `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ENDPTNAK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EPRN`" ] pub type EPRN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `EPRN`" ] pub struct EPRN_W < 'a > { w : & 'a mut W , } impl < 'a > EPRN_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `EPTN`" ] pub type EPTN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `EPTN`" ] pub struct EPTN_W < 'a > { w : & 'a mut W , } impl < 'a > EPTN_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - RX Endpoint NAK" ] # [ inline ( always ) ] pub fn eprn ( & self ) -> EPRN_R { EPRN_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - TX Endpoint NAK" ] # [ inline ( always ) ] pub fn eptn ( & self ) -> EPTN_R { EPTN_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - RX Endpoint NAK" ] # [ inline ( always ) ] pub fn eprn ( & mut self ) -> EPRN_W { EPRN_W { w : self } } # [ doc = "Bits 16:19 - TX Endpoint NAK" ] # [ inline ( always ) ] pub fn eptn ( & mut self ) -> EPTN_W { EPTN_W { w : self } } } } # [ doc = "Endpoint NAK Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [endptnaken](endptnaken) module" ] pub type ENDPTNAKEN = crate :: Reg < u32 , _ENDPTNAKEN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ENDPTNAKEN ; # [ doc = "`read()` method returns [endptnaken::R](endptnaken::R) reader structure" ] impl crate :: Readable for ENDPTNAKEN { } # [ doc = "`write(|w| ..)` method takes [endptnaken::W](endptnaken::W) writer structure" ] impl crate :: Writable for ENDPTNAKEN { } # [ doc = "Endpoint NAK Enable Register" ] pub mod endptnaken { # [ doc = "Reader of register ENDPTNAKEN" ] pub type R = crate :: R < u32 , super :: ENDPTNAKEN > ; # [ doc = "Writer for register ENDPTNAKEN" ] pub type W = crate :: W < u32 , super :: ENDPTNAKEN > ; # [ doc = "Register ENDPTNAKEN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ENDPTNAKEN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EPRNE`" ] pub type EPRNE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `EPRNE`" ] pub struct EPRNE_W < 'a > { w : & 'a mut W , } impl < 'a > EPRNE_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `EPTNE`" ] pub type EPTNE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `EPTNE`" ] pub struct EPTNE_W < 'a > { w : & 'a mut W , } impl < 'a > EPTNE_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - RX Endpoint NAK" ] # [ inline ( always ) ] pub fn eprne ( & self ) -> EPRNE_R { EPRNE_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - TX Endpoint NAK" ] # [ inline ( always ) ] pub fn eptne ( & self ) -> EPTNE_R { EPTNE_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - RX Endpoint NAK" ] # [ inline ( always ) ] pub fn eprne ( & mut self ) -> EPRNE_W { EPRNE_W { w : self } } # [ doc = "Bits 16:19 - TX Endpoint NAK" ] # [ inline ( always ) ] pub fn eptne ( & mut self ) -> EPTNE_W { EPTNE_W { w : self } } } } # [ doc = "Configure Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [configflag](configflag) module" ] pub type CONFIGFLAG = crate :: Reg < u32 , _CONFIGFLAG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONFIGFLAG ; # [ doc = "`read()` method returns [configflag::R](configflag::R) reader structure" ] impl crate :: Readable for CONFIGFLAG { } # [ doc = "Configure Flag Register" ] pub mod configflag { # [ doc = "Reader of register CONFIGFLAG" ] pub type R = crate :: R < u32 , super :: CONFIGFLAG > ; impl R { } } # [ doc = "Port Status and Control Registers\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [portsc1](portsc1) module" ] pub type PORTSC1 = crate :: Reg < u32 , _PORTSC1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PORTSC1 ; # [ doc = "`read()` method returns [portsc1::R](portsc1::R) reader structure" ] impl crate :: Readable for PORTSC1 { } # [ doc = "`write(|w| ..)` method takes [portsc1::W](portsc1::W) writer structure" ] impl crate :: Writable for PORTSC1 { } # [ doc = "Port Status and Control Registers" ] pub mod portsc1 { # [ doc = "Reader of register PORTSC1" ] pub type R = crate :: R < u32 , super :: PORTSC1 > ; # [ doc = "Writer for register PORTSC1" ] pub type W = crate :: W < u32 , super :: PORTSC1 > ; # [ doc = "Register PORTSC1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PORTSC1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Current Connect Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCS_A { # [ doc = "0: No device present (host mode) or attached (device mode)" ] _0 , # [ doc = "1: Device is present (host mode) or attached (device mode)" ] _1 } impl From < CCS_A > for bool { # [ inline ( always ) ] fn from ( variant : CCS_A ) -> Self { match variant { CCS_A :: _0 => false , CCS_A :: _1 => true } } } # [ doc = "Reader of field `CCS`" ] pub type CCS_R = crate :: R < bool , CCS_A > ; impl CCS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCS_A { match self . bits { false => CCS_A :: _0 , true => CCS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCS_A :: _1 } } # [ doc = "Connect Change Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CSC_A { # [ doc = "0: No change" ] _0 , # [ doc = "1: Connect status has changed" ] _1 } impl From < CSC_A > for bool { # [ inline ( always ) ] fn from ( variant : CSC_A ) -> Self { match variant { CSC_A :: _0 => false , CSC_A :: _1 => true } } } # [ doc = "Reader of field `CSC`" ] pub type CSC_R = crate :: R < bool , CSC_A > ; impl CSC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CSC_A { match self . bits { false => CSC_A :: _0 , true => CSC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CSC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CSC_A :: _1 } } # [ doc = "Write proxy for field `CSC`" ] pub struct CSC_W < 'a > { w : & 'a mut W , } impl < 'a > CSC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CSC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No change" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CSC_A :: _0 ) } # [ doc = "Connect status has changed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CSC_A :: _1 ) } # [ 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 } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_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 = "Port Enable/disable Change\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEC_A { # [ doc = "0: No change" ] _0 , # [ doc = "1: Port disabled" ] _1 } impl From < PEC_A > for bool { # [ inline ( always ) ] fn from ( variant : PEC_A ) -> Self { match variant { PEC_A :: _0 => false , PEC_A :: _1 => true } } } # [ doc = "Reader of field `PEC`" ] pub type PEC_R = crate :: R < bool , PEC_A > ; impl PEC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEC_A { match self . bits { false => PEC_A :: _0 , true => PEC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEC_A :: _1 } } # [ doc = "Write proxy for field `PEC`" ] pub struct PEC_W < 'a > { w : & 'a mut W , } impl < 'a > PEC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No change" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEC_A :: _0 ) } # [ doc = "Port disabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEC_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Over-current active\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OCA_A { # [ doc = "0: Port not in over-current condition" ] _0 , # [ doc = "1: Port currently in over-current condition" ] _1 } impl From < OCA_A > for bool { # [ inline ( always ) ] fn from ( variant : OCA_A ) -> Self { match variant { OCA_A :: _0 => false , OCA_A :: _1 => true } } } # [ doc = "Reader of field `OCA`" ] pub type OCA_R = crate :: R < bool , OCA_A > ; impl OCA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OCA_A { match self . bits { false => OCA_A :: _0 , true => OCA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OCA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OCA_A :: _1 } } # [ doc = "Over-Current Change\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OCC_A { # [ doc = "0: No over-current" ] _0 , # [ doc = "1: Over-current detect" ] _1 } impl From < OCC_A > for bool { # [ inline ( always ) ] fn from ( variant : OCC_A ) -> Self { match variant { OCC_A :: _0 => false , OCC_A :: _1 => true } } } # [ doc = "Reader of field `OCC`" ] pub type OCC_R = crate :: R < bool , OCC_A > ; impl OCC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OCC_A { match self . bits { false => OCC_A :: _0 , true => OCC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OCC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OCC_A :: _1 } } # [ doc = "Write proxy for field `OCC`" ] pub struct OCC_W < 'a > { w : & 'a mut W , } impl < 'a > OCC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OCC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No over-current" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OCC_A :: _0 ) } # [ doc = "Over-current detect" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OCC_A :: _1 ) } # [ 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 = "Force Port Resume\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FPR_A { # [ doc = "0: No resume (K-state) detected/driven on port" ] _0 , # [ doc = "1: Resume detected/driven on port" ] _1 } impl From < FPR_A > for bool { # [ inline ( always ) ] fn from ( variant : FPR_A ) -> Self { match variant { FPR_A :: _0 => false , FPR_A :: _1 => true } } } # [ doc = "Reader of field `FPR`" ] pub type FPR_R = crate :: R < bool , FPR_A > ; impl FPR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FPR_A { match self . bits { false => FPR_A :: _0 , true => FPR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FPR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FPR_A :: _1 } } # [ doc = "Write proxy for field `FPR`" ] pub struct FPR_W < 'a > { w : & 'a mut W , } impl < 'a > FPR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FPR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No resume (K-state) detected/driven on port" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FPR_A :: _0 ) } # [ doc = "Resume detected/driven on port" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FPR_A :: _1 ) } # [ 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 = "Suspend\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUSP_A { # [ doc = "0: Port not in suspend state" ] _0 , # [ doc = "1: Port in suspend state" ] _1 } impl From < SUSP_A > for bool { # [ inline ( always ) ] fn from ( variant : SUSP_A ) -> Self { match variant { SUSP_A :: _0 => false , SUSP_A :: _1 => true } } } # [ doc = "Reader of field `SUSP`" ] pub type SUSP_R = crate :: R < bool , SUSP_A > ; impl SUSP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SUSP_A { match self . bits { false => SUSP_A :: _0 , true => SUSP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SUSP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SUSP_A :: _1 } } # [ doc = "Write proxy for field `SUSP`" ] pub struct SUSP_W < 'a > { w : & 'a mut W , } impl < 'a > SUSP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SUSP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Port not in suspend state" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SUSP_A :: _0 ) } # [ doc = "Port in suspend state" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SUSP_A :: _1 ) } # [ 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 = "Port Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PR_A { # [ doc = "0: Port is not in reset" ] _0 , # [ doc = "1: Port is in reset" ] _1 } impl From < PR_A > for bool { # [ inline ( always ) ] fn from ( variant : PR_A ) -> Self { match variant { PR_A :: _0 => false , PR_A :: _1 => true } } } # [ doc = "Reader of field `PR`" ] pub type PR_R = crate :: R < bool , PR_A > ; impl PR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PR_A { match self . bits { false => PR_A :: _0 , true => PR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PR_A :: _1 } } # [ doc = "Write proxy for field `PR`" ] pub struct PR_W < 'a > { w : & 'a mut W , } impl < 'a > PR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Port is not in reset" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PR_A :: _0 ) } # [ doc = "Port is in reset" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PR_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "High Speed Port.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HSP_A { # [ doc = "0: FS or LS" ] _0 , # [ doc = "1: HS" ] _1 } impl From < HSP_A > for bool { # [ inline ( always ) ] fn from ( variant : HSP_A ) -> Self { match variant { HSP_A :: _0 => false , HSP_A :: _1 => true } } } # [ doc = "Reader of field `HSP`" ] pub type HSP_R = crate :: R < bool , HSP_A > ; impl HSP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HSP_A { match self . bits { false => HSP_A :: _0 , true => HSP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HSP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HSP_A :: _1 } } # [ doc = "Line Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LS_A { # [ doc = "0: SE0" ] _00 , # [ doc = "1: J-state" ] _01 , # [ doc = "2: K-state" ] _10 , # [ doc = "3: Undefined" ] _11 } impl From < LS_A > for u8 { # [ inline ( always ) ] fn from ( variant : LS_A ) -> Self { match variant { LS_A :: _00 => 0 , LS_A :: _01 => 1 , LS_A :: _10 => 2 , LS_A :: _11 => 3 } } } # [ doc = "Reader of field `LS`" ] pub type LS_R = crate :: R < u8 , LS_A > ; impl LS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LS_A { match self . bits { 0 => LS_A :: _00 , 1 => LS_A :: _01 , 2 => LS_A :: _10 , 3 => LS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == LS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == LS_A :: _11 } } # [ doc = "Reader of field `PP`" ] pub type PP_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PP`" ] pub struct PP_W < 'a > { w : & 'a mut W , } impl < 'a > PP_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `PO`" ] pub type PO_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PO`" ] pub struct PO_W < 'a > { w : & 'a mut W , } impl < 'a > PO_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 = "Reader of field `PIC`" ] pub type PIC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PIC`" ] pub struct PIC_W < 'a > { w : & 'a mut W , } impl < 'a > PIC_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 << 14 ) ) | ( ( ( value as u32 ) & 0x03 ) << 14 ) ; self . w } } # [ doc = "Port Test Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTC_A { # [ doc = "0: Not enabled" ] _0000 , # [ doc = "1: J_STATE" ] _0001 , # [ doc = "2: K_STATE" ] _0010 , # [ doc = "3: SE0_NAK" ] _0011 , # [ doc = "4: Packet" ] _0100 , # [ doc = "5: FORCE_ENABLE_HS" ] _0101 , # [ doc = "6: FORCE_ENABLE_FS" ] _0110 , # [ doc = "7: FORCE_ENABLE_LS" ] _0111 } impl From < PTC_A > for u8 { # [ inline ( always ) ] fn from ( variant : PTC_A ) -> Self { match variant { PTC_A :: _0000 => 0 , PTC_A :: _0001 => 1 , PTC_A :: _0010 => 2 , PTC_A :: _0011 => 3 , PTC_A :: _0100 => 4 , PTC_A :: _0101 => 5 , PTC_A :: _0110 => 6 , PTC_A :: _0111 => 7 } } } # [ doc = "Reader of field `PTC`" ] pub type PTC_R = crate :: R < u8 , PTC_A > ; impl PTC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PTC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PTC_A :: _0000 ) , 1 => Val ( PTC_A :: _0001 ) , 2 => Val ( PTC_A :: _0010 ) , 3 => Val ( PTC_A :: _0011 ) , 4 => Val ( PTC_A :: _0100 ) , 5 => Val ( PTC_A :: _0101 ) , 6 => Val ( PTC_A :: _0110 ) , 7 => Val ( PTC_A :: _0111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == PTC_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == PTC_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == PTC_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == PTC_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == PTC_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == PTC_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == PTC_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == PTC_A :: _0111 } } # [ doc = "Write proxy for field `PTC`" ] pub struct PTC_W < 'a > { w : & 'a mut W , } impl < 'a > PTC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTC_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Not enabled" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( PTC_A :: _0000 ) } # [ doc = "J_STATE" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( PTC_A :: _0001 ) } # [ doc = "K_STATE" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( PTC_A :: _0010 ) } # [ doc = "SE0_NAK" ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( PTC_A :: _0011 ) } # [ doc = "Packet" ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( PTC_A :: _0100 ) } # [ doc = "FORCE_ENABLE_HS" ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( PTC_A :: _0101 ) } # [ doc = "FORCE_ENABLE_FS" ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( PTC_A :: _0110 ) } # [ doc = "FORCE_ENABLE_LS" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( PTC_A :: _0111 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `WKCN`" ] pub type WKCN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `WKCN`" ] pub struct WKCN_W < 'a > { w : & 'a mut W , } impl < 'a > WKCN_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 = "Reader of field `WKDS`" ] pub type WKDS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `WKDS`" ] pub struct WKDS_W < 'a > { w : & 'a mut W , } impl < 'a > WKDS_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 = "Reader of field `WKOC`" ] pub type WKOC_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `WKOC`" ] pub struct WKOC_W < 'a > { w : & 'a mut W , } impl < 'a > WKOC_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `PHCD`" ] pub type PHCD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PHCD`" ] pub struct PHCD_W < 'a > { w : & 'a mut W , } impl < 'a > PHCD_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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port force Full-Speed Connect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFSC_A { # [ doc = "0: Allow the port to identify itself as high speed" ] _0 , # [ doc = "1: Force the port to only connect at full speed" ] _1 } impl From < PFSC_A > for bool { # [ inline ( always ) ] fn from ( variant : PFSC_A ) -> Self { match variant { PFSC_A :: _0 => false , PFSC_A :: _1 => true } } } # [ doc = "Reader of field `PFSC`" ] pub type PFSC_R = crate :: R < bool , PFSC_A > ; impl PFSC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFSC_A { match self . bits { false => PFSC_A :: _0 , true => PFSC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFSC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFSC_A :: _1 } } # [ doc = "Write proxy for field `PFSC`" ] pub struct PFSC_W < 'a > { w : & 'a mut W , } impl < 'a > PFSC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFSC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Allow the port to identify itself as high speed" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PFSC_A :: _0 ) } # [ doc = "Force the port to only connect at full speed" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PFSC_A :: _1 ) } # [ 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 = "Reader of field `PTS2`" ] pub type PTS2_R = crate :: R < bool , bool > ; # [ doc = "Port Speed\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSPD_A { # [ doc = "0: Full speed" ] _00 , # [ doc = "1: Low speed" ] _01 , # [ doc = "2: High speed" ] _10 , # [ doc = "3: Undefined" ] _11 } impl From < PSPD_A > for u8 { # [ inline ( always ) ] fn from ( variant : PSPD_A ) -> Self { match variant { PSPD_A :: _00 => 0 , PSPD_A :: _01 => 1 , PSPD_A :: _10 => 2 , PSPD_A :: _11 => 3 } } } # [ doc = "Reader of field `PSPD`" ] pub type PSPD_R = crate :: R < u8 , PSPD_A > ; impl PSPD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PSPD_A { match self . bits { 0 => PSPD_A :: _00 , 1 => PSPD_A :: _01 , 2 => PSPD_A :: _10 , 3 => PSPD_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PSPD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PSPD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PSPD_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PSPD_A :: _11 } } # [ doc = "Port Transceiver Select \\[1:0\\]\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTS_A { # [ doc = "0: Use UTMI transceiver interface." ] _000 } impl From < PTS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PTS_A ) -> Self { match variant { PTS_A :: _000 => 0 } } } # [ doc = "Reader of field `PTS`" ] pub type PTS_R = crate :: R < u8 , PTS_A > ; impl PTS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PTS_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PTS_A :: _000 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PTS_A :: _000 } } impl R { # [ doc = "Bit 0 - Current Connect Status" ] # [ inline ( always ) ] pub fn ccs ( & self ) -> CCS_R { CCS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Connect Change Status" ] # [ inline ( always ) ] pub fn csc ( & self ) -> CSC_R { CSC_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Enabled/disabled" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Enable/disable Change" ] # [ inline ( always ) ] pub fn pec ( & self ) -> PEC_R { PEC_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Over-current active" ] # [ inline ( always ) ] pub fn oca ( & self ) -> OCA_R { OCA_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Over-Current Change" ] # [ inline ( always ) ] pub fn occ ( & self ) -> OCC_R { OCC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Force Port Resume" ] # [ inline ( always ) ] pub fn fpr ( & self ) -> FPR_R { FPR_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Suspend" ] # [ inline ( always ) ] pub fn susp ( & self ) -> SUSP_R { SUSP_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Reset" ] # [ inline ( always ) ] pub fn pr ( & self ) -> PR_R { PR_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - High Speed Port." ] # [ inline ( always ) ] pub fn hsp ( & self ) -> HSP_R { HSP_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bits 10:11 - Line Status" ] # [ inline ( always ) ] pub fn ls ( & self ) -> LS_R { LS_R :: new ( ( ( self . bits >> 10 ) & 0x03 ) as u8 ) } # [ doc = "Bit 12 - Port Power" ] # [ inline ( always ) ] pub fn pp ( & self ) -> PP_R { PP_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Owner" ] # [ inline ( always ) ] pub fn po ( & self ) -> PO_R { PO_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bits 14:15 - Port Indicator Control" ] # [ inline ( always ) ] pub fn pic ( & self ) -> PIC_R { PIC_R :: new ( ( ( self . bits >> 14 ) & 0x03 ) as u8 ) } # [ doc = "Bits 16:19 - Port Test Control" ] # [ inline ( always ) ] pub fn ptc ( & self ) -> PTC_R { PTC_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 20 - Wake on Connect enable" ] # [ inline ( always ) ] pub fn wkcn ( & self ) -> WKCN_R { WKCN_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Wake on Disconnect enable" ] # [ inline ( always ) ] pub fn wkds ( & self ) -> WKDS_R { WKDS_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Wake on Over-Current enable" ] # [ inline ( always ) ] pub fn wkoc ( & self ) -> WKOC_R { WKOC_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - PHY low power suspend" ] # [ inline ( always ) ] pub fn phcd ( & self ) -> PHCD_R { PHCD_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port force Full-Speed Connect" ] # [ inline ( always ) ] pub fn pfsc ( & self ) -> PFSC_R { PFSC_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Transceiver Select \\[2\\]" ] # [ inline ( always ) ] pub fn pts2 ( & self ) -> PTS2_R { PTS2_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bits 26:27 - Port Speed" ] # [ inline ( always ) ] pub fn pspd ( & self ) -> PSPD_R { PSPD_R :: new ( ( ( self . bits >> 26 ) & 0x03 ) as u8 ) } # [ doc = "Bits 30:31 - Port Transceiver Select \\[1:0\\]" ] # [ inline ( always ) ] pub fn pts ( & self ) -> PTS_R { PTS_R :: new ( ( ( self . bits >> 30 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bit 1 - Connect Change Status" ] # [ inline ( always ) ] pub fn csc ( & mut self ) -> CSC_W { CSC_W { w : self } } # [ doc = "Bit 2 - Port Enabled/disabled" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 3 - Port Enable/disable Change" ] # [ inline ( always ) ] pub fn pec ( & mut self ) -> PEC_W { PEC_W { w : self } } # [ doc = "Bit 5 - Over-Current Change" ] # [ inline ( always ) ] pub fn occ ( & mut self ) -> OCC_W { OCC_W { w : self } } # [ doc = "Bit 6 - Force Port Resume" ] # [ inline ( always ) ] pub fn fpr ( & mut self ) -> FPR_W { FPR_W { w : self } } # [ doc = "Bit 7 - Suspend" ] # [ inline ( always ) ] pub fn susp ( & mut self ) -> SUSP_W { SUSP_W { w : self } } # [ doc = "Bit 8 - Port Reset" ] # [ inline ( always ) ] pub fn pr ( & mut self ) -> PR_W { PR_W { w : self } } # [ doc = "Bit 12 - Port Power" ] # [ inline ( always ) ] pub fn pp ( & mut self ) -> PP_W { PP_W { w : self } } # [ doc = "Bit 13 - Port Owner" ] # [ inline ( always ) ] pub fn po ( & mut self ) -> PO_W { PO_W { w : self } } # [ doc = "Bits 14:15 - Port Indicator Control" ] # [ inline ( always ) ] pub fn pic ( & mut self ) -> PIC_W { PIC_W { w : self } } # [ doc = "Bits 16:19 - Port Test Control" ] # [ inline ( always ) ] pub fn ptc ( & mut self ) -> PTC_W { PTC_W { w : self } } # [ doc = "Bit 20 - Wake on Connect enable" ] # [ inline ( always ) ] pub fn wkcn ( & mut self ) -> WKCN_W { WKCN_W { w : self } } # [ doc = "Bit 21 - Wake on Disconnect enable" ] # [ inline ( always ) ] pub fn wkds ( & mut self ) -> WKDS_W { WKDS_W { w : self } } # [ doc = "Bit 22 - Wake on Over-Current enable" ] # [ inline ( always ) ] pub fn wkoc ( & mut self ) -> WKOC_W { WKOC_W { w : self } } # [ doc = "Bit 23 - PHY low power suspend" ] # [ inline ( always ) ] pub fn phcd ( & mut self ) -> PHCD_W { PHCD_W { w : self } } # [ doc = "Bit 24 - Port force Full-Speed Connect" ] # [ inline ( always ) ] pub fn pfsc ( & mut self ) -> PFSC_W { PFSC_W { w : self } } } } # [ doc = "On-the-Go Status and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [otgsc](otgsc) module" ] pub type OTGSC = crate :: Reg < u32 , _OTGSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OTGSC ; # [ doc = "`read()` method returns [otgsc::R](otgsc::R) reader structure" ] impl crate :: Readable for OTGSC { } # [ doc = "`write(|w| ..)` method takes [otgsc::W](otgsc::W) writer structure" ] impl crate :: Writable for OTGSC { } # [ doc = "On-the-Go Status and Control Register" ] pub mod otgsc { # [ doc = "Reader of register OTGSC" ] pub type R = crate :: R < u32 , super :: OTGSC > ; # [ doc = "Writer for register OTGSC" ] pub type W = crate :: W < u32 , super :: OTGSC > ; # [ doc = "Register OTGSC `reset()`'s with value 0x1020" ] impl crate :: ResetValue for super :: OTGSC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1020 } } # [ doc = "Reader of field `VD`" ] pub type VD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `VD`" ] pub struct VD_W < 'a > { w : & 'a mut W , } impl < 'a > VD_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `VC`" ] pub type VC_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `VC`" ] pub struct VC_W < 'a > { w : & 'a mut W , } impl < 'a > VC_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 } } # [ doc = "Hardware Assist Auto-Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HAAR_A { # [ doc = "0: Disabled." ] _0 , # [ doc = "1: Enable automatic reset after connect on host port." ] _1 } impl From < HAAR_A > for bool { # [ inline ( always ) ] fn from ( variant : HAAR_A ) -> Self { match variant { HAAR_A :: _0 => false , HAAR_A :: _1 => true } } } # [ doc = "Reader of field `HAAR`" ] pub type HAAR_R = crate :: R < bool , HAAR_A > ; impl HAAR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HAAR_A { match self . bits { false => HAAR_A :: _0 , true => HAAR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HAAR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HAAR_A :: _1 } } # [ doc = "Write proxy for field `HAAR`" ] pub struct HAAR_W < 'a > { w : & 'a mut W , } impl < 'a > HAAR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HAAR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HAAR_A :: _0 ) } # [ doc = "Enable automatic reset after connect on host port." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HAAR_A :: _1 ) } # [ 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 = "OTG Termination\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OT_A { # [ doc = "0: Disable pull-down on DM" ] _0 , # [ doc = "1: Enable pull-down on DM" ] _1 } impl From < OT_A > for bool { # [ inline ( always ) ] fn from ( variant : OT_A ) -> Self { match variant { OT_A :: _0 => false , OT_A :: _1 => true } } } # [ doc = "Reader of field `OT`" ] pub type OT_R = crate :: R < bool , OT_A > ; impl OT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OT_A { match self . bits { false => OT_A :: _0 , true => OT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OT_A :: _1 } } # [ doc = "Write proxy for field `OT`" ] pub struct OT_W < 'a > { w : & 'a mut W , } impl < 'a > OT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable pull-down on DM" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OT_A :: _0 ) } # [ doc = "Enable pull-down on DM" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OT_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Data Pulsing\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DP_A { # [ doc = "0: The pull-up on DP is not asserted" ] _0 , # [ doc = "1: The pull-up on DP is asserted for data pulsing during SRP" ] _1 } impl From < DP_A > for bool { # [ inline ( always ) ] fn from ( variant : DP_A ) -> Self { match variant { DP_A :: _0 => false , DP_A :: _1 => true } } } # [ doc = "Reader of field `DP`" ] pub type DP_R = crate :: R < bool , DP_A > ; impl DP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DP_A { match self . bits { false => DP_A :: _0 , true => DP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DP_A :: _1 } } # [ doc = "Write proxy for field `DP`" ] pub struct DP_W < 'a > { w : & 'a mut W , } impl < 'a > DP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The pull-up on DP is not asserted" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DP_A :: _0 ) } # [ doc = "The pull-up on DP is asserted for data pulsing during SRP" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DP_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "ID Pull-Up\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDPU_A { # [ doc = "0: Disable pull-up. ID input not sampled." ] _0 , # [ doc = "1: Enable pull-up" ] _1 } impl From < IDPU_A > for bool { # [ inline ( always ) ] fn from ( variant : IDPU_A ) -> Self { match variant { IDPU_A :: _0 => false , IDPU_A :: _1 => true } } } # [ doc = "Reader of field `IDPU`" ] pub type IDPU_R = crate :: R < bool , IDPU_A > ; impl IDPU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDPU_A { match self . bits { false => IDPU_A :: _0 , true => IDPU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDPU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDPU_A :: _1 } } # [ doc = "Write proxy for field `IDPU`" ] pub struct IDPU_W < 'a > { w : & 'a mut W , } impl < 'a > IDPU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IDPU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable pull-up. ID input not sampled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IDPU_A :: _0 ) } # [ doc = "Enable pull-up" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IDPU_A :: _1 ) } # [ 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 = "Hardware Assist B-Disconnect to A-connect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HABA_A { # [ doc = "0: Disabled." ] _0 , # [ doc = "1: Enable automatic B-disconnect to A-connect sequence." ] _1 } impl From < HABA_A > for bool { # [ inline ( always ) ] fn from ( variant : HABA_A ) -> Self { match variant { HABA_A :: _0 => false , HABA_A :: _1 => true } } } # [ doc = "Reader of field `HABA`" ] pub type HABA_R = crate :: R < bool , HABA_A > ; impl HABA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HABA_A { match self . bits { false => HABA_A :: _0 , true => HABA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HABA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HABA_A :: _1 } } # [ doc = "Write proxy for field `HABA`" ] pub struct HABA_W < 'a > { w : & 'a mut W , } impl < 'a > HABA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HABA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HABA_A :: _0 ) } # [ doc = "Enable automatic B-disconnect to A-connect sequence." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HABA_A :: _1 ) } # [ 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 = "USB ID\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ID_A { # [ doc = "0: A device" ] _0 , # [ doc = "1: B device" ] _1 } impl From < ID_A > for bool { # [ inline ( always ) ] fn from ( variant : ID_A ) -> Self { match variant { ID_A :: _0 => false , ID_A :: _1 => true } } } # [ doc = "Reader of field `ID`" ] pub type ID_R = crate :: R < bool , ID_A > ; impl ID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ID_A { match self . bits { false => ID_A :: _0 , true => ID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ID_A :: _1 } } # [ doc = "A VBus Valid\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVV_A { # [ doc = "0: VBus is below A VBus valid threshold" ] _0 , # [ doc = "1: VBus is above A VBus valid threshold" ] _1 } impl From < AVV_A > for bool { # [ inline ( always ) ] fn from ( variant : AVV_A ) -> Self { match variant { AVV_A :: _0 => false , AVV_A :: _1 => true } } } # [ doc = "Reader of field `AVV`" ] pub type AVV_R = crate :: R < bool , AVV_A > ; impl AVV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVV_A { match self . bits { false => AVV_A :: _0 , true => AVV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVV_A :: _1 } } # [ doc = "A Session Valid\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ASV_A { # [ doc = "0: VBus is below A session valid threshold" ] _0 , # [ doc = "1: VBus is above A session valid threshold" ] _1 } impl From < ASV_A > for bool { # [ inline ( always ) ] fn from ( variant : ASV_A ) -> Self { match variant { ASV_A :: _0 => false , ASV_A :: _1 => true } } } # [ doc = "Reader of field `ASV`" ] pub type ASV_R = crate :: R < bool , ASV_A > ; impl ASV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ASV_A { match self . bits { false => ASV_A :: _0 , true => ASV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ASV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ASV_A :: _1 } } # [ doc = "B Session Valid\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BSV_A { # [ doc = "0: VBus is below B session valid threshold" ] _0 , # [ doc = "1: VBus is above B session valid threshold" ] _1 } impl From < BSV_A > for bool { # [ inline ( always ) ] fn from ( variant : BSV_A ) -> Self { match variant { BSV_A :: _0 => false , BSV_A :: _1 => true } } } # [ doc = "Reader of field `BSV`" ] pub type BSV_R = crate :: R < bool , BSV_A > ; impl BSV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BSV_A { match self . bits { false => BSV_A :: _0 , true => BSV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BSV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BSV_A :: _1 } } # [ doc = "B Session End\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BSE_A { # [ doc = "0: VBus is above B session end threshold" ] _0 , # [ doc = "1: VBus is below B session end threshold" ] _1 } impl From < BSE_A > for bool { # [ inline ( always ) ] fn from ( variant : BSE_A ) -> Self { match variant { BSE_A :: _0 => false , BSE_A :: _1 => true } } } # [ doc = "Reader of field `BSE`" ] pub type BSE_R = crate :: R < bool , BSE_A > ; impl BSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BSE_A { match self . bits { false => BSE_A :: _0 , true => BSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BSE_A :: _1 } } # [ doc = "Reader of field `MST`" ] pub type MST_R = crate :: R < bool , bool > ; # [ doc = "Data bus Pulsing Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPS_A { # [ doc = "0: No pulsing on port" ] _0 , # [ doc = "1: Pulsing detected on port" ] _1 } impl From < DPS_A > for bool { # [ inline ( always ) ] fn from ( variant : DPS_A ) -> Self { match variant { DPS_A :: _0 => false , DPS_A :: _1 => true } } } # [ doc = "Reader of field `DPS`" ] pub type DPS_R = crate :: R < bool , DPS_A > ; impl DPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPS_A { match self . bits { false => DPS_A :: _0 , true => DPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPS_A :: _1 } } # [ doc = "Reader of field `IDIS`" ] pub type IDIS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `IDIS`" ] pub struct IDIS_W < 'a > { w : & 'a mut W , } impl < 'a > IDIS_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Reader of field `AVVIS`" ] pub type AVVIS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AVVIS`" ] pub struct AVVIS_W < 'a > { w : & 'a mut W , } impl < 'a > AVVIS_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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Reader of field `ASVIS`" ] pub type ASVIS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ASVIS`" ] pub struct ASVIS_W < 'a > { w : & 'a mut W , } impl < 'a > ASVIS_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `BSVIS`" ] pub type BSVIS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BSVIS`" ] pub struct BSVIS_W < 'a > { w : & 'a mut W , } impl < 'a > BSVIS_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Reader of field `BSEIS`" ] pub type BSEIS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BSEIS`" ] pub struct BSEIS_W < 'a > { w : & 'a mut W , } impl < 'a > BSEIS_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 = "Reader of field `MSS`" ] pub type MSS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSS`" ] pub struct MSS_W < 'a > { w : & 'a mut W , } impl < 'a > MSS_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 = "Reader of field `DPIS`" ] pub type DPIS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DPIS`" ] pub struct DPIS_W < 'a > { w : & 'a mut W , } impl < 'a > DPIS_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "USB ID Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDIE_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < IDIE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDIE_A ) -> Self { match variant { IDIE_A :: _0 => false , IDIE_A :: _1 => true } } } # [ doc = "Reader of field `IDIE`" ] pub type IDIE_R = crate :: R < bool , IDIE_A > ; impl IDIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDIE_A { match self . bits { false => IDIE_A :: _0 , true => IDIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDIE_A :: _1 } } # [ doc = "Write proxy for field `IDIE`" ] pub struct IDIE_W < 'a > { w : & 'a mut W , } impl < 'a > IDIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IDIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IDIE_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IDIE_A :: _1 ) } # [ 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 = "A VBUS Valid Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVVIE_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < AVVIE_A > for bool { # [ inline ( always ) ] fn from ( variant : AVVIE_A ) -> Self { match variant { AVVIE_A :: _0 => false , AVVIE_A :: _1 => true } } } # [ doc = "Reader of field `AVVIE`" ] pub type AVVIE_R = crate :: R < bool , AVVIE_A > ; impl AVVIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVVIE_A { match self . bits { false => AVVIE_A :: _0 , true => AVVIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVVIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVVIE_A :: _1 } } # [ doc = "Write proxy for field `AVVIE`" ] pub struct AVVIE_W < 'a > { w : & 'a mut W , } impl < 'a > AVVIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AVVIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AVVIE_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AVVIE_A :: _1 ) } # [ 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 = "A Session Valid Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ASVIE_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < ASVIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ASVIE_A ) -> Self { match variant { ASVIE_A :: _0 => false , ASVIE_A :: _1 => true } } } # [ doc = "Reader of field `ASVIE`" ] pub type ASVIE_R = crate :: R < bool , ASVIE_A > ; impl ASVIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ASVIE_A { match self . bits { false => ASVIE_A :: _0 , true => ASVIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ASVIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ASVIE_A :: _1 } } # [ doc = "Write proxy for field `ASVIE`" ] pub struct ASVIE_W < 'a > { w : & 'a mut W , } impl < 'a > ASVIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ASVIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ASVIE_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ASVIE_A :: _1 ) } # [ 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 = "B Session Valid Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BSVIE_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < BSVIE_A > for bool { # [ inline ( always ) ] fn from ( variant : BSVIE_A ) -> Self { match variant { BSVIE_A :: _0 => false , BSVIE_A :: _1 => true } } } # [ doc = "Reader of field `BSVIE`" ] pub type BSVIE_R = crate :: R < bool , BSVIE_A > ; impl BSVIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BSVIE_A { match self . bits { false => BSVIE_A :: _0 , true => BSVIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BSVIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BSVIE_A :: _1 } } # [ doc = "Write proxy for field `BSVIE`" ] pub struct BSVIE_W < 'a > { w : & 'a mut W , } impl < 'a > BSVIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BSVIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BSVIE_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BSVIE_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "B Session End Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BSEIE_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < BSEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : BSEIE_A ) -> Self { match variant { BSEIE_A :: _0 => false , BSEIE_A :: _1 => true } } } # [ doc = "Reader of field `BSEIE`" ] pub type BSEIE_R = crate :: R < bool , BSEIE_A > ; impl BSEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BSEIE_A { match self . bits { false => BSEIE_A :: _0 , true => BSEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BSEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BSEIE_A :: _1 } } # [ doc = "Write proxy for field `BSEIE`" ] pub struct BSEIE_W < 'a > { w : & 'a mut W , } impl < 'a > BSEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BSEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BSEIE_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BSEIE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "1 Milli-Second timer interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSE_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < MSE_A > for bool { # [ inline ( always ) ] fn from ( variant : MSE_A ) -> Self { match variant { MSE_A :: _0 => false , MSE_A :: _1 => true } } } # [ doc = "Reader of field `MSE`" ] pub type MSE_R = crate :: R < bool , MSE_A > ; impl MSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSE_A { match self . bits { false => MSE_A :: _0 , true => MSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSE_A :: _1 } } # [ doc = "Write proxy for field `MSE`" ] pub struct MSE_W < 'a > { w : & 'a mut W , } impl < 'a > MSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSE_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSE_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Data Pulse Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPIE_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < DPIE_A > for bool { # [ inline ( always ) ] fn from ( variant : DPIE_A ) -> Self { match variant { DPIE_A :: _0 => false , DPIE_A :: _1 => true } } } # [ doc = "Reader of field `DPIE`" ] pub type DPIE_R = crate :: R < bool , DPIE_A > ; impl DPIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPIE_A { match self . bits { false => DPIE_A :: _0 , true => DPIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPIE_A :: _1 } } # [ doc = "Write proxy for field `DPIE`" ] pub struct DPIE_W < 'a > { w : & 'a mut W , } impl < 'a > DPIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPIE_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPIE_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - VBUS Discharge" ] # [ inline ( always ) ] pub fn vd ( & self ) -> VD_R { VD_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - VBUS Charge" ] # [ inline ( always ) ] pub fn vc ( & self ) -> VC_R { VC_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Hardware Assist Auto-Reset" ] # [ inline ( always ) ] pub fn haar ( & self ) -> HAAR_R { HAAR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - OTG Termination" ] # [ inline ( always ) ] pub fn ot ( & self ) -> OT_R { OT_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Data Pulsing" ] # [ inline ( always ) ] pub fn dp ( & self ) -> DP_R { DP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - ID Pull-Up" ] # [ inline ( always ) ] pub fn idpu ( & self ) -> IDPU_R { IDPU_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Hardware Assist B-Disconnect to A-connect" ] # [ inline ( always ) ] pub fn haba ( & self ) -> HABA_R { HABA_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - USB ID" ] # [ inline ( always ) ] pub fn id ( & self ) -> ID_R { ID_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - A VBus Valid" ] # [ inline ( always ) ] pub fn avv ( & self ) -> AVV_R { AVV_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - A Session Valid" ] # [ inline ( always ) ] pub fn asv ( & self ) -> ASV_R { ASV_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - B Session Valid" ] # [ inline ( always ) ] pub fn bsv ( & self ) -> BSV_R { BSV_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - B Session End" ] # [ inline ( always ) ] pub fn bse ( & self ) -> BSE_R { BSE_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - 1 Milli-Second timer Toggle" ] # [ inline ( always ) ] pub fn mst ( & self ) -> MST_R { MST_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Data bus Pulsing Status" ] # [ inline ( always ) ] pub fn dps ( & self ) -> DPS_R { DPS_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - USB ID Interrupt Status" ] # [ inline ( always ) ] pub fn idis ( & self ) -> IDIS_R { IDIS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - A VBUS Valid Interrupt Status" ] # [ inline ( always ) ] pub fn avvis ( & self ) -> AVVIS_R { AVVIS_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - A Session Valid Interrupt Status" ] # [ inline ( always ) ] pub fn asvis ( & self ) -> ASVIS_R { ASVIS_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - B Session Valid Interrupt Status" ] # [ inline ( always ) ] pub fn bsvis ( & self ) -> BSVIS_R { BSVIS_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - B Session End Interrupt Status" ] # [ inline ( always ) ] pub fn bseis ( & self ) -> BSEIS_R { BSEIS_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - 1 Milli-Second timer interrupt Status" ] # [ inline ( always ) ] pub fn mss ( & self ) -> MSS_R { MSS_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Data Pulse interrupt Status" ] # [ inline ( always ) ] pub fn dpis ( & self ) -> DPIS_R { DPIS_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - USB ID Interrupt Enable" ] # [ inline ( always ) ] pub fn idie ( & self ) -> IDIE_R { IDIE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - A VBUS Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn avvie ( & self ) -> AVVIE_R { AVVIE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - A Session Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn asvie ( & self ) -> ASVIE_R { ASVIE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - B Session Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn bsvie ( & self ) -> BSVIE_R { BSVIE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - B Session End Interrupt Enable" ] # [ inline ( always ) ] pub fn bseie ( & self ) -> BSEIE_R { BSEIE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - 1 Milli-Second timer interrupt Enable" ] # [ inline ( always ) ] pub fn mse ( & self ) -> MSE_R { MSE_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Data Pulse Interrupt Enable" ] # [ inline ( always ) ] pub fn dpie ( & self ) -> DPIE_R { DPIE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - VBUS Discharge" ] # [ inline ( always ) ] pub fn vd ( & mut self ) -> VD_W { VD_W { w : self } } # [ doc = "Bit 1 - VBUS Charge" ] # [ inline ( always ) ] pub fn vc ( & mut self ) -> VC_W { VC_W { w : self } } # [ doc = "Bit 2 - Hardware Assist Auto-Reset" ] # [ inline ( always ) ] pub fn haar ( & mut self ) -> HAAR_W { HAAR_W { w : self } } # [ doc = "Bit 3 - OTG Termination" ] # [ inline ( always ) ] pub fn ot ( & mut self ) -> OT_W { OT_W { w : self } } # [ doc = "Bit 4 - Data Pulsing" ] # [ inline ( always ) ] pub fn dp ( & mut self ) -> DP_W { DP_W { w : self } } # [ doc = "Bit 5 - ID Pull-Up" ] # [ inline ( always ) ] pub fn idpu ( & mut self ) -> IDPU_W { IDPU_W { w : self } } # [ doc = "Bit 7 - Hardware Assist B-Disconnect to A-connect" ] # [ inline ( always ) ] pub fn haba ( & mut self ) -> HABA_W { HABA_W { w : self } } # [ doc = "Bit 16 - USB ID Interrupt Status" ] # [ inline ( always ) ] pub fn idis ( & mut self ) -> IDIS_W { IDIS_W { w : self } } # [ doc = "Bit 17 - A VBUS Valid Interrupt Status" ] # [ inline ( always ) ] pub fn avvis ( & mut self ) -> AVVIS_W { AVVIS_W { w : self } } # [ doc = "Bit 18 - A Session Valid Interrupt Status" ] # [ inline ( always ) ] pub fn asvis ( & mut self ) -> ASVIS_W { ASVIS_W { w : self } } # [ doc = "Bit 19 - B Session Valid Interrupt Status" ] # [ inline ( always ) ] pub fn bsvis ( & mut self ) -> BSVIS_W { BSVIS_W { w : self } } # [ doc = "Bit 20 - B Session End Interrupt Status" ] # [ inline ( always ) ] pub fn bseis ( & mut self ) -> BSEIS_W { BSEIS_W { w : self } } # [ doc = "Bit 21 - 1 Milli-Second timer interrupt Status" ] # [ inline ( always ) ] pub fn mss ( & mut self ) -> MSS_W { MSS_W { w : self } } # [ doc = "Bit 22 - Data Pulse interrupt Status" ] # [ inline ( always ) ] pub fn dpis ( & mut self ) -> DPIS_W { DPIS_W { w : self } } # [ doc = "Bit 24 - USB ID Interrupt Enable" ] # [ inline ( always ) ] pub fn idie ( & mut self ) -> IDIE_W { IDIE_W { w : self } } # [ doc = "Bit 25 - A VBUS Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn avvie ( & mut self ) -> AVVIE_W { AVVIE_W { w : self } } # [ doc = "Bit 26 - A Session Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn asvie ( & mut self ) -> ASVIE_W { ASVIE_W { w : self } } # [ doc = "Bit 27 - B Session Valid Interrupt Enable" ] # [ inline ( always ) ] pub fn bsvie ( & mut self ) -> BSVIE_W { BSVIE_W { w : self } } # [ doc = "Bit 28 - B Session End Interrupt Enable" ] # [ inline ( always ) ] pub fn bseie ( & mut self ) -> BSEIE_W { BSEIE_W { w : self } } # [ doc = "Bit 29 - 1 Milli-Second timer interrupt Enable" ] # [ inline ( always ) ] pub fn mse ( & mut self ) -> MSE_W { MSE_W { w : self } } # [ doc = "Bit 30 - Data Pulse Interrupt Enable" ] # [ inline ( always ) ] pub fn dpie ( & mut self ) -> DPIE_W { DPIE_W { w : self } } } } # [ doc = "USB Mode Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbmode](usbmode) module" ] pub type USBMODE = crate :: Reg < u32 , _USBMODE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBMODE ; # [ doc = "`read()` method returns [usbmode::R](usbmode::R) reader structure" ] impl crate :: Readable for USBMODE { } # [ doc = "`write(|w| ..)` method takes [usbmode::W](usbmode::W) writer structure" ] impl crate :: Writable for USBMODE { } # [ doc = "USB Mode Register" ] pub mod usbmode { # [ doc = "Reader of register USBMODE" ] pub type R = crate :: R < u32 , super :: USBMODE > ; # [ doc = "Writer for register USBMODE" ] pub type W = crate :: W < u32 , super :: USBMODE > ; # [ doc = "Register USBMODE `reset()`'s with value 0x5000" ] impl crate :: ResetValue for super :: USBMODE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x5000 } } # [ doc = "Controller Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CM_A { # [ doc = "0: Idle (default for the USBHS module)" ] _00 , # [ doc = "2: Device controller" ] _10 , # [ doc = "3: Host controller" ] _11 } impl From < CM_A > for u8 { # [ inline ( always ) ] fn from ( variant : CM_A ) -> Self { match variant { CM_A :: _00 => 0 , CM_A :: _10 => 2 , CM_A :: _11 => 3 } } } # [ doc = "Reader of field `CM`" ] pub type CM_R = crate :: R < u8 , CM_A > ; impl CM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CM_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CM_A :: _00 ) , 2 => Val ( CM_A :: _10 ) , 3 => Val ( CM_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CM_A :: _00 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CM_A :: _11 } } # [ doc = "Write proxy for field `CM`" ] pub struct CM_W < 'a > { w : & 'a mut W , } impl < 'a > CM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CM_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Idle (default for the USBHS module)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CM_A :: _00 ) } # [ doc = "Device controller" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CM_A :: _10 ) } # [ doc = "Host controller" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CM_A :: _11 ) } # [ 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 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Endian Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ES_A { # [ doc = "0: Little endian. First byte referenced in least significant byte of 32-bit word." ] _0 , # [ doc = "1: Big endian. First byte referenced in most significant byte of 32-bit word." ] _1 } impl From < ES_A > for bool { # [ inline ( always ) ] fn from ( variant : ES_A ) -> Self { match variant { ES_A :: _0 => false , ES_A :: _1 => true } } } # [ doc = "Reader of field `ES`" ] pub type ES_R = crate :: R < bool , ES_A > ; impl ES_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ES_A { match self . bits { false => ES_A :: _0 , true => ES_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ES_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ES_A :: _1 } } # [ doc = "Write proxy for field `ES`" ] pub struct ES_W < 'a > { w : & 'a mut W , } impl < 'a > ES_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ES_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Little endian. First byte referenced in least significant byte of 32-bit word." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ES_A :: _0 ) } # [ doc = "Big endian. First byte referenced in most significant byte of 32-bit word." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ES_A :: _1 ) } # [ 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 = "Reader of field `SLOM`" ] pub type SLOM_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SLOM`" ] pub struct SLOM_W < 'a > { w : & 'a mut W , } impl < 'a > SLOM_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Stream DISable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SDIS_A { # [ doc = "0: Inactive" ] _0 , # [ doc = "1: Active" ] _1 } impl From < SDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : SDIS_A ) -> Self { match variant { SDIS_A :: _0 => false , SDIS_A :: _1 => true } } } # [ doc = "Reader of field `SDIS`" ] pub type SDIS_R = crate :: R < bool , SDIS_A > ; impl SDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SDIS_A { match self . bits { false => SDIS_A :: _0 , true => SDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SDIS_A :: _1 } } # [ doc = "Write proxy for field `SDIS`" ] pub struct SDIS_W < 'a > { w : & 'a mut W , } impl < 'a > SDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Inactive" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SDIS_A :: _0 ) } # [ doc = "Active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SDIS_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Tx to Tx HS Delay\n\nValue on reset: 5" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXHSD_A { # [ doc = "0: 10" ] _000 , # [ doc = "1: 11" ] _001 , # [ doc = "2: 12" ] _010 , # [ doc = "3: 13" ] _011 , # [ doc = "4: 14" ] _100 , # [ doc = "5: 15" ] _101 , # [ doc = "6: 16" ] _110 , # [ doc = "7: 17" ] _111 } impl From < TXHSD_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXHSD_A ) -> Self { match variant { TXHSD_A :: _000 => 0 , TXHSD_A :: _001 => 1 , TXHSD_A :: _010 => 2 , TXHSD_A :: _011 => 3 , TXHSD_A :: _100 => 4 , TXHSD_A :: _101 => 5 , TXHSD_A :: _110 => 6 , TXHSD_A :: _111 => 7 } } } # [ doc = "Reader of field `TXHSD`" ] pub type TXHSD_R = crate :: R < u8 , TXHSD_A > ; impl TXHSD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXHSD_A { match self . bits { 0 => TXHSD_A :: _000 , 1 => TXHSD_A :: _001 , 2 => TXHSD_A :: _010 , 3 => TXHSD_A :: _011 , 4 => TXHSD_A :: _100 , 5 => TXHSD_A :: _101 , 6 => TXHSD_A :: _110 , 7 => TXHSD_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == TXHSD_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == TXHSD_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == TXHSD_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == TXHSD_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == TXHSD_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == TXHSD_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == TXHSD_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == TXHSD_A :: _111 } } # [ doc = "Write proxy for field `TXHSD`" ] pub struct TXHSD_W < 'a > { w : & 'a mut W , } impl < 'a > TXHSD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXHSD_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "10" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( TXHSD_A :: _000 ) } # [ doc = "11" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( TXHSD_A :: _001 ) } # [ doc = "12" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( TXHSD_A :: _010 ) } # [ doc = "13" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( TXHSD_A :: _011 ) } # [ doc = "14" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( TXHSD_A :: _100 ) } # [ doc = "15" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( TXHSD_A :: _101 ) } # [ doc = "16" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( TXHSD_A :: _110 ) } # [ doc = "17" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( TXHSD_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 12 ) ) | ( ( ( value as u32 ) & 0x07 ) << 12 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Controller Mode" ] # [ inline ( always ) ] pub fn cm ( & self ) -> CM_R { CM_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - Endian Select" ] # [ inline ( always ) ] pub fn es ( & self ) -> ES_R { ES_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Setup Lock-Out Mode" ] # [ inline ( always ) ] pub fn slom ( & self ) -> SLOM_R { SLOM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Stream DISable" ] # [ inline ( always ) ] pub fn sdis ( & self ) -> SDIS_R { SDIS_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 12:14 - Tx to Tx HS Delay" ] # [ inline ( always ) ] pub fn txhsd ( & self ) -> TXHSD_R { TXHSD_R :: new ( ( ( self . bits >> 12 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Controller Mode" ] # [ inline ( always ) ] pub fn cm ( & mut self ) -> CM_W { CM_W { w : self } } # [ doc = "Bit 2 - Endian Select" ] # [ inline ( always ) ] pub fn es ( & mut self ) -> ES_W { ES_W { w : self } } # [ doc = "Bit 3 - Setup Lock-Out Mode" ] # [ inline ( always ) ] pub fn slom ( & mut self ) -> SLOM_W { SLOM_W { w : self } } # [ doc = "Bit 4 - Stream DISable" ] # [ inline ( always ) ] pub fn sdis ( & mut self ) -> SDIS_W { SDIS_W { w : self } } # [ doc = "Bits 12:14 - Tx to Tx HS Delay" ] # [ inline ( always ) ] pub fn txhsd ( & mut self ) -> TXHSD_W { TXHSD_W { w : self } } } } # [ doc = "Endpoint Setup Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [epsetupsr](epsetupsr) module" ] pub type EPSETUPSR = crate :: Reg < u32 , _EPSETUPSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EPSETUPSR ; # [ doc = "`read()` method returns [epsetupsr::R](epsetupsr::R) reader structure" ] impl crate :: Readable for EPSETUPSR { } # [ doc = "`write(|w| ..)` method takes [epsetupsr::W](epsetupsr::W) writer structure" ] impl crate :: Writable for EPSETUPSR { } # [ doc = "Endpoint Setup Status Register" ] pub mod epsetupsr { # [ doc = "Reader of register EPSETUPSR" ] pub type R = crate :: R < u32 , super :: EPSETUPSR > ; # [ doc = "Writer for register EPSETUPSR" ] pub type W = crate :: W < u32 , super :: EPSETUPSR > ; # [ doc = "Register EPSETUPSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EPSETUPSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `EPSETUPSTAT`" ] pub type EPSETUPSTAT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `EPSETUPSTAT`" ] pub struct EPSETUPSTAT_W < 'a > { w : & 'a mut W , } impl < 'a > EPSETUPSTAT_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Setup Endpoint Status" ] # [ inline ( always ) ] pub fn epsetupstat ( & self ) -> EPSETUPSTAT_R { EPSETUPSTAT_R :: new ( ( self . bits & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Setup Endpoint Status" ] # [ inline ( always ) ] pub fn epsetupstat ( & mut self ) -> EPSETUPSTAT_W { EPSETUPSTAT_W { w : self } } } } # [ doc = "Endpoint Initialization Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [epprime](epprime) module" ] pub type EPPRIME = crate :: Reg < u32 , _EPPRIME > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EPPRIME ; # [ doc = "`read()` method returns [epprime::R](epprime::R) reader structure" ] impl crate :: Readable for EPPRIME { } # [ doc = "`write(|w| ..)` method takes [epprime::W](epprime::W) writer structure" ] impl crate :: Writable for EPPRIME { } # [ doc = "Endpoint Initialization Register" ] pub mod epprime { # [ doc = "Reader of register EPPRIME" ] pub type R = crate :: R < u32 , super :: EPPRIME > ; # [ doc = "Writer for register EPPRIME" ] pub type W = crate :: W < u32 , super :: EPPRIME > ; # [ doc = "Register EPPRIME `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EPPRIME { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PERB`" ] pub type PERB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PERB`" ] pub struct PERB_W < 'a > { w : & 'a mut W , } impl < 'a > PERB_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `PETB`" ] pub type PETB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PETB`" ] pub struct PETB_W < 'a > { w : & 'a mut W , } impl < 'a > PETB_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Prime Endpoint Receive Buffer" ] # [ inline ( always ) ] pub fn perb ( & self ) -> PERB_R { PERB_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Prime Endpoint tTansmit Buffer" ] # [ inline ( always ) ] pub fn petb ( & self ) -> PETB_R { PETB_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Prime Endpoint Receive Buffer" ] # [ inline ( always ) ] pub fn perb ( & mut self ) -> PERB_W { PERB_W { w : self } } # [ doc = "Bits 16:19 - Prime Endpoint tTansmit Buffer" ] # [ inline ( always ) ] pub fn petb ( & mut self ) -> PETB_W { PETB_W { w : self } } } } # [ doc = "Endpoint Flush Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [epflush](epflush) module" ] pub type EPFLUSH = crate :: Reg < u32 , _EPFLUSH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EPFLUSH ; # [ doc = "`read()` method returns [epflush::R](epflush::R) reader structure" ] impl crate :: Readable for EPFLUSH { } # [ doc = "`write(|w| ..)` method takes [epflush::W](epflush::W) writer structure" ] impl crate :: Writable for EPFLUSH { } # [ doc = "Endpoint Flush Register" ] pub mod epflush { # [ doc = "Reader of register EPFLUSH" ] pub type R = crate :: R < u32 , super :: EPFLUSH > ; # [ doc = "Writer for register EPFLUSH" ] pub type W = crate :: W < u32 , super :: EPFLUSH > ; # [ doc = "Register EPFLUSH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EPFLUSH { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `FERB`" ] pub type FERB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FERB`" ] pub struct FERB_W < 'a > { w : & 'a mut W , } impl < 'a > FERB_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `FETB`" ] pub type FETB_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `FETB`" ] pub struct FETB_W < 'a > { w : & 'a mut W , } impl < 'a > FETB_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Flush Endpoint Receive Buffer" ] # [ inline ( always ) ] pub fn ferb ( & self ) -> FERB_R { FERB_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Flush Endpoint Transmit Buffer" ] # [ inline ( always ) ] pub fn fetb ( & self ) -> FETB_R { FETB_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Flush Endpoint Receive Buffer" ] # [ inline ( always ) ] pub fn ferb ( & mut self ) -> FERB_W { FERB_W { w : self } } # [ doc = "Bits 16:19 - Flush Endpoint Transmit Buffer" ] # [ inline ( always ) ] pub fn fetb ( & mut self ) -> FETB_W { FETB_W { w : self } } } } # [ doc = "Endpoint Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [epsr](epsr) module" ] pub type EPSR = crate :: Reg < u32 , _EPSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EPSR ; # [ doc = "`read()` method returns [epsr::R](epsr::R) reader structure" ] impl crate :: Readable for EPSR { } # [ doc = "Endpoint Status Register" ] pub mod epsr { # [ doc = "Reader of register EPSR" ] pub type R = crate :: R < u32 , super :: EPSR > ; # [ doc = "Reader of field `ERBR`" ] pub type ERBR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `ETBR`" ] pub type ETBR_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:3 - Endpoint Receive Buffer Ready" ] # [ inline ( always ) ] pub fn erbr ( & self ) -> ERBR_R { ERBR_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Endpoint Transmit Buffer Ready" ] # [ inline ( always ) ] pub fn etbr ( & self ) -> ETBR_R { ETBR_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } } } # [ doc = "Endpoint Complete Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [epcomplete](epcomplete) module" ] pub type EPCOMPLETE = crate :: Reg < u32 , _EPCOMPLETE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EPCOMPLETE ; # [ doc = "`read()` method returns [epcomplete::R](epcomplete::R) reader structure" ] impl crate :: Readable for EPCOMPLETE { } # [ doc = "`write(|w| ..)` method takes [epcomplete::W](epcomplete::W) writer structure" ] impl crate :: Writable for EPCOMPLETE { } # [ doc = "Endpoint Complete Register" ] pub mod epcomplete { # [ doc = "Reader of register EPCOMPLETE" ] pub type R = crate :: R < u32 , super :: EPCOMPLETE > ; # [ doc = "Writer for register EPCOMPLETE" ] pub type W = crate :: W < u32 , super :: EPCOMPLETE > ; # [ doc = "Register EPCOMPLETE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EPCOMPLETE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ERCE`" ] pub type ERCE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ERCE`" ] pub struct ERCE_W < 'a > { w : & 'a mut W , } impl < 'a > ERCE_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `ETCE`" ] pub type ETCE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ETCE`" ] pub struct ETCE_W < 'a > { w : & 'a mut W , } impl < 'a > ETCE_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Endpoint Receive Complete Event" ] # [ inline ( always ) ] pub fn erce ( & self ) -> ERCE_R { ERCE_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Endpoint Transmit Complete Event" ] # [ inline ( always ) ] pub fn etce ( & self ) -> ETCE_R { ETCE_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Endpoint Receive Complete Event" ] # [ inline ( always ) ] pub fn erce ( & mut self ) -> ERCE_W { ERCE_W { w : self } } # [ doc = "Bits 16:19 - Endpoint Transmit Complete Event" ] # [ inline ( always ) ] pub fn etce ( & mut self ) -> ETCE_W { ETCE_W { w : self } } } } # [ doc = "Endpoint Control Register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [epcr0](epcr0) module" ] pub type EPCR0 = crate :: Reg < u32 , _EPCR0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EPCR0 ; # [ doc = "`read()` method returns [epcr0::R](epcr0::R) reader structure" ] impl crate :: Readable for EPCR0 { } # [ doc = "`write(|w| ..)` method takes [epcr0::W](epcr0::W) writer structure" ] impl crate :: Writable for EPCR0 { } # [ doc = "Endpoint Control Register 0" ] pub mod epcr0 { # [ doc = "Reader of register EPCR0" ] pub type R = crate :: R < u32 , super :: EPCR0 > ; # [ doc = "Writer for register EPCR0" ] pub type W = crate :: W < u32 , super :: EPCR0 > ; # [ doc = "Register EPCR0 `reset()`'s with value 0x0080_0080" ] impl crate :: ResetValue for super :: EPCR0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0080_0080 } } # [ doc = "RX endpoint Stall\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXS_A { # [ doc = "0: Endpoint OK" ] _0 , # [ doc = "1: Endpoint stalled" ] _1 } impl From < RXS_A > for bool { # [ inline ( always ) ] fn from ( variant : RXS_A ) -> Self { match variant { RXS_A :: _0 => false , RXS_A :: _1 => true } } } # [ doc = "Reader of field `RXS`" ] pub type RXS_R = crate :: R < bool , RXS_A > ; impl RXS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXS_A { match self . bits { false => RXS_A :: _0 , true => RXS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXS_A :: _1 } } # [ doc = "Write proxy for field `RXS`" ] pub struct RXS_W < 'a > { w : & 'a mut W , } impl < 'a > RXS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Endpoint OK" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXS_A :: _0 ) } # [ doc = "Endpoint stalled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "RX endpoint Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXT_A { # [ doc = "0: Control" ] _00 } impl From < RXT_A > for u8 { # [ inline ( always ) ] fn from ( variant : RXT_A ) -> Self { match variant { RXT_A :: _00 => 0 } } } # [ doc = "Reader of field `RXT`" ] pub type RXT_R = crate :: R < u8 , RXT_A > ; impl RXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , RXT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( RXT_A :: _00 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RXT_A :: _00 } } # [ doc = "RX endpoint Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXE_A { # [ doc = "1: Enabled" ] _1 } impl From < RXE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXE_A ) -> Self { match variant { RXE_A :: _1 => true } } } # [ doc = "Reader of field `RXE`" ] pub type RXE_R = crate :: R < bool , RXE_A > ; impl RXE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < bool , RXE_A > { use crate :: Variant :: * ; match self . bits { true => Val ( RXE_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXE_A :: _1 } } # [ doc = "TX Endpoint Stall\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXS_A { # [ doc = "0: Endpoint OK" ] _0 , # [ doc = "1: Endpoint stalled" ] _1 } impl From < TXS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXS_A ) -> Self { match variant { TXS_A :: _0 => false , TXS_A :: _1 => true } } } # [ doc = "Reader of field `TXS`" ] pub type TXS_R = crate :: R < bool , TXS_A > ; impl TXS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXS_A { match self . bits { false => TXS_A :: _0 , true => TXS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXS_A :: _1 } } # [ doc = "Write proxy for field `TXS`" ] pub struct TXS_W < 'a > { w : & 'a mut W , } impl < 'a > TXS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Endpoint OK" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXS_A :: _0 ) } # [ doc = "Endpoint stalled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXS_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "TX Endpoint Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXT_A { # [ doc = "0: Control" ] _00 } impl From < TXT_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXT_A ) -> Self { match variant { TXT_A :: _00 => 0 } } } # [ doc = "Reader of field `TXT`" ] pub type TXT_R = crate :: R < u8 , TXT_A > ; impl TXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TXT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TXT_A :: _00 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TXT_A :: _00 } } # [ doc = "TX Endpoint Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXE_A { # [ doc = "1: Enable" ] _1 } impl From < TXE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXE_A ) -> Self { match variant { TXE_A :: _1 => true } } } # [ doc = "Reader of field `TXE`" ] pub type TXE_R = crate :: R < bool , TXE_A > ; impl TXE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < bool , TXE_A > { use crate :: Variant :: * ; match self . bits { true => Val ( TXE_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXE_A :: _1 } } impl R { # [ doc = "Bit 0 - RX endpoint Stall" ] # [ inline ( always ) ] pub fn rxs ( & self ) -> RXS_R { RXS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - RX endpoint Type" ] # [ inline ( always ) ] pub fn rxt ( & self ) -> RXT_R { RXT_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - RX endpoint Enable" ] # [ inline ( always ) ] pub fn rxe ( & self ) -> RXE_R { RXE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - TX Endpoint Stall" ] # [ inline ( always ) ] pub fn txs ( & self ) -> TXS_R { TXS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:19 - TX Endpoint Type" ] # [ inline ( always ) ] pub fn txt ( & self ) -> TXT_R { TXT_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bit 23 - TX Endpoint Enable" ] # [ inline ( always ) ] pub fn txe ( & self ) -> TXE_R { TXE_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - RX endpoint Stall" ] # [ inline ( always ) ] pub fn rxs ( & mut self ) -> RXS_W { RXS_W { w : self } } # [ doc = "Bit 16 - TX Endpoint Stall" ] # [ inline ( always ) ] pub fn txs ( & mut self ) -> TXS_W { TXS_W { w : self } } } } # [ doc = "Endpoint Control Register n\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [epcr](epcr) module" ] pub type EPCR = crate :: Reg < u32 , _EPCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EPCR ; # [ doc = "`read()` method returns [epcr::R](epcr::R) reader structure" ] impl crate :: Readable for EPCR { } # [ doc = "`write(|w| ..)` method takes [epcr::W](epcr::W) writer structure" ] impl crate :: Writable for EPCR { } # [ doc = "Endpoint Control Register n" ] pub mod epcr { # [ doc = "Reader of register EPCR%s" ] pub type R = crate :: R < u32 , super :: EPCR > ; # [ doc = "Writer for register EPCR%s" ] pub type W = crate :: W < u32 , super :: EPCR > ; # [ doc = "Register EPCR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EPCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "RX endpoint Stall\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXS_A { # [ doc = "0: Endpoint OK" ] _0 , # [ doc = "1: Endpoint stalled" ] _1 } impl From < RXS_A > for bool { # [ inline ( always ) ] fn from ( variant : RXS_A ) -> Self { match variant { RXS_A :: _0 => false , RXS_A :: _1 => true } } } # [ doc = "Reader of field `RXS`" ] pub type RXS_R = crate :: R < bool , RXS_A > ; impl RXS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXS_A { match self . bits { false => RXS_A :: _0 , true => RXS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXS_A :: _1 } } # [ doc = "Write proxy for field `RXS`" ] pub struct RXS_W < 'a > { w : & 'a mut W , } impl < 'a > RXS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Endpoint OK" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXS_A :: _0 ) } # [ doc = "Endpoint stalled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXS_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `RXD`" ] pub type RXD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RXD`" ] pub struct RXD_W < 'a > { w : & 'a mut W , } impl < 'a > RXD_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 } } # [ doc = "RX endpoint Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXT_A { # [ doc = "0: Control" ] _00 , # [ doc = "1: Isochronous" ] _01 , # [ doc = "2: Bulk" ] _10 , # [ doc = "3: Interrupt" ] _11 } impl From < RXT_A > for u8 { # [ inline ( always ) ] fn from ( variant : RXT_A ) -> Self { match variant { RXT_A :: _00 => 0 , RXT_A :: _01 => 1 , RXT_A :: _10 => 2 , RXT_A :: _11 => 3 } } } # [ doc = "Reader of field `RXT`" ] pub type RXT_R = crate :: R < u8 , RXT_A > ; impl RXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXT_A { match self . bits { 0 => RXT_A :: _00 , 1 => RXT_A :: _01 , 2 => RXT_A :: _10 , 3 => RXT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RXT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == RXT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == RXT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == RXT_A :: _11 } } # [ doc = "Write proxy for field `RXT`" ] pub struct RXT_W < 'a > { w : & 'a mut W , } impl < 'a > RXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Control" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RXT_A :: _00 ) } # [ doc = "Isochronous" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( RXT_A :: _01 ) } # [ doc = "Bulk" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( RXT_A :: _10 ) } # [ doc = "Interrupt" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( RXT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "RX data toggle Inhibit\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXI_A { # [ doc = "0: PID sequencing enabled" ] _0 , # [ doc = "1: PID sequencing disabled" ] _1 } impl From < RXI_A > for bool { # [ inline ( always ) ] fn from ( variant : RXI_A ) -> Self { match variant { RXI_A :: _0 => false , RXI_A :: _1 => true } } } # [ doc = "Reader of field `RXI`" ] pub type RXI_R = crate :: R < bool , RXI_A > ; impl RXI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXI_A { match self . bits { false => RXI_A :: _0 , true => RXI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXI_A :: _1 } } # [ doc = "Write proxy for field `RXI`" ] pub struct RXI_W < 'a > { w : & 'a mut W , } impl < 'a > RXI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PID sequencing enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXI_A :: _0 ) } # [ doc = "PID sequencing disabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXI_A :: _1 ) } # [ 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 = "Write proxy for field `RXR`" ] pub struct RXR_W < 'a > { w : & 'a mut W , } impl < 'a > RXR_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 = "RX endpoint Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < RXE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXE_A ) -> Self { match variant { RXE_A :: _0 => false , RXE_A :: _1 => true } } } # [ doc = "Reader of field `RXE`" ] pub type RXE_R = crate :: R < bool , RXE_A > ; impl RXE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXE_A { match self . bits { false => RXE_A :: _0 , true => RXE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXE_A :: _1 } } # [ doc = "Write proxy for field `RXE`" ] pub struct RXE_W < 'a > { w : & 'a mut W , } impl < 'a > RXE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXE_A :: _1 ) } # [ 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 = "TX endpoint Stall\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXS_A { # [ doc = "0: Endpoint OK" ] _0 , # [ doc = "1: Endpoint stalled" ] _1 } impl From < TXS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXS_A ) -> Self { match variant { TXS_A :: _0 => false , TXS_A :: _1 => true } } } # [ doc = "Reader of field `TXS`" ] pub type TXS_R = crate :: R < bool , TXS_A > ; impl TXS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXS_A { match self . bits { false => TXS_A :: _0 , true => TXS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXS_A :: _1 } } # [ doc = "Write proxy for field `TXS`" ] pub struct TXS_W < 'a > { w : & 'a mut W , } impl < 'a > TXS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Endpoint OK" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXS_A :: _0 ) } # [ doc = "Endpoint stalled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXS_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Reader of field `TXD`" ] pub type TXD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TXD`" ] pub struct TXD_W < 'a > { w : & 'a mut W , } impl < 'a > TXD_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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "TX endpoint Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXT_A { # [ doc = "0: Control" ] _00 , # [ doc = "1: Isochronous" ] _01 , # [ doc = "2: Bulk" ] _10 , # [ doc = "3: Interrupt" ] _11 } impl From < TXT_A > for u8 { # [ inline ( always ) ] fn from ( variant : TXT_A ) -> Self { match variant { TXT_A :: _00 => 0 , TXT_A :: _01 => 1 , TXT_A :: _10 => 2 , TXT_A :: _11 => 3 } } } # [ doc = "Reader of field `TXT`" ] pub type TXT_R = crate :: R < u8 , TXT_A > ; impl TXT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXT_A { match self . bits { 0 => TXT_A :: _00 , 1 => TXT_A :: _01 , 2 => TXT_A :: _10 , 3 => TXT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TXT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TXT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TXT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TXT_A :: _11 } } # [ doc = "Write proxy for field `TXT`" ] pub struct TXT_W < 'a > { w : & 'a mut W , } impl < 'a > TXT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Control" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TXT_A :: _00 ) } # [ doc = "Isochronous" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TXT_A :: _01 ) } # [ doc = "Bulk" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TXT_A :: _10 ) } # [ doc = "Interrupt" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TXT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "TX data toggle Inhibit\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXI_A { # [ doc = "0: PID sequencing enabled" ] _0 , # [ doc = "1: PID sequencing disabled" ] _1 } impl From < TXI_A > for bool { # [ inline ( always ) ] fn from ( variant : TXI_A ) -> Self { match variant { TXI_A :: _0 => false , TXI_A :: _1 => true } } } # [ doc = "Reader of field `TXI`" ] pub type TXI_R = crate :: R < bool , TXI_A > ; impl TXI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXI_A { match self . bits { false => TXI_A :: _0 , true => TXI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXI_A :: _1 } } # [ doc = "Write proxy for field `TXI`" ] pub struct TXI_W < 'a > { w : & 'a mut W , } impl < 'a > TXI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PID sequencing enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXI_A :: _0 ) } # [ doc = "PID sequencing disabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXI_A :: _1 ) } # [ 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 = "Write proxy for field `TXR`" ] pub struct TXR_W < 'a > { w : & 'a mut W , } impl < 'a > TXR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "TX endpoint Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < TXE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXE_A ) -> Self { match variant { TXE_A :: _0 => false , TXE_A :: _1 => true } } } # [ doc = "Reader of field `TXE`" ] pub type TXE_R = crate :: R < bool , TXE_A > ; impl TXE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXE_A { match self . bits { false => TXE_A :: _0 , true => TXE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXE_A :: _1 } } # [ doc = "Write proxy for field `TXE`" ] pub struct TXE_W < 'a > { w : & 'a mut W , } impl < 'a > TXE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXE_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } impl R { # [ doc = "Bit 0 - RX endpoint Stall" ] # [ inline ( always ) ] pub fn rxs ( & self ) -> RXS_R { RXS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - RX endpoint Data sink" ] # [ inline ( always ) ] pub fn rxd ( & self ) -> RXD_R { RXD_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - RX endpoint Type" ] # [ inline ( always ) ] pub fn rxt ( & self ) -> RXT_R { RXT_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - RX data toggle Inhibit" ] # [ inline ( always ) ] pub fn rxi ( & self ) -> RXI_R { RXI_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - RX endpoint Enable" ] # [ inline ( always ) ] pub fn rxe ( & self ) -> RXE_R { RXE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - TX endpoint Stall" ] # [ inline ( always ) ] pub fn txs ( & self ) -> TXS_R { TXS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - TX endpoint Data source" ] # [ inline ( always ) ] pub fn txd ( & self ) -> TXD_R { TXD_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:19 - TX endpoint Type" ] # [ inline ( always ) ] pub fn txt ( & self ) -> TXT_R { TXT_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bit 21 - TX data toggle Inhibit" ] # [ inline ( always ) ] pub fn txi ( & self ) -> TXI_R { TXI_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - TX endpoint Enable" ] # [ inline ( always ) ] pub fn txe ( & self ) -> TXE_R { TXE_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - RX endpoint Stall" ] # [ inline ( always ) ] pub fn rxs ( & mut self ) -> RXS_W { RXS_W { w : self } } # [ doc = "Bit 1 - RX endpoint Data sink" ] # [ inline ( always ) ] pub fn rxd ( & mut self ) -> RXD_W { RXD_W { w : self } } # [ doc = "Bits 2:3 - RX endpoint Type" ] # [ inline ( always ) ] pub fn rxt ( & mut self ) -> RXT_W { RXT_W { w : self } } # [ doc = "Bit 5 - RX data toggle Inhibit" ] # [ inline ( always ) ] pub fn rxi ( & mut self ) -> RXI_W { RXI_W { w : self } } # [ doc = "Bit 6 - RX data toggle Reset" ] # [ inline ( always ) ] pub fn rxr ( & mut self ) -> RXR_W { RXR_W { w : self } } # [ doc = "Bit 7 - RX endpoint Enable" ] # [ inline ( always ) ] pub fn rxe ( & mut self ) -> RXE_W { RXE_W { w : self } } # [ doc = "Bit 16 - TX endpoint Stall" ] # [ inline ( always ) ] pub fn txs ( & mut self ) -> TXS_W { TXS_W { w : self } } # [ doc = "Bit 17 - TX endpoint Data source" ] # [ inline ( always ) ] pub fn txd ( & mut self ) -> TXD_W { TXD_W { w : self } } # [ doc = "Bits 18:19 - TX endpoint Type" ] # [ inline ( always ) ] pub fn txt ( & mut self ) -> TXT_W { TXT_W { w : self } } # [ doc = "Bit 21 - TX data toggle Inhibit" ] # [ inline ( always ) ] pub fn txi ( & mut self ) -> TXI_W { TXI_W { w : self } } # [ doc = "Bit 22 - TX data toggle Reset" ] # [ inline ( always ) ] pub fn txr ( & mut self ) -> TXR_W { TXR_W { w : self } } # [ doc = "Bit 23 - TX endpoint Enable" ] # [ inline ( always ) ] pub fn txe ( & mut self ) -> TXE_W { TXE_W { w : self } } } } # [ doc = "USB General Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usbgenctrl](usbgenctrl) module" ] pub type USBGENCTRL = crate :: Reg < u32 , _USBGENCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USBGENCTRL ; # [ doc = "`read()` method returns [usbgenctrl::R](usbgenctrl::R) reader structure" ] impl crate :: Readable for USBGENCTRL { } # [ doc = "`write(|w| ..)` method takes [usbgenctrl::W](usbgenctrl::W) writer structure" ] impl crate :: Writable for USBGENCTRL { } # [ doc = "USB General Control Register" ] pub mod usbgenctrl { # [ doc = "Reader of register USBGENCTRL" ] pub type R = crate :: R < u32 , super :: USBGENCTRL > ; # [ doc = "Writer for register USBGENCTRL" ] pub type W = crate :: W < u32 , super :: USBGENCTRL > ; # [ doc = "Register USBGENCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: USBGENCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Wakeup Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WU_IE_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < WU_IE_A > for bool { # [ inline ( always ) ] fn from ( variant : WU_IE_A ) -> Self { match variant { WU_IE_A :: _0 => false , WU_IE_A :: _1 => true } } } # [ doc = "Reader of field `WU_IE`" ] pub type WU_IE_R = crate :: R < bool , WU_IE_A > ; impl WU_IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WU_IE_A { match self . bits { false => WU_IE_A :: _0 , true => WU_IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WU_IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WU_IE_A :: _1 } } # [ doc = "Write proxy for field `WU_IE`" ] pub struct WU_IE_W < 'a > { w : & 'a mut W , } impl < 'a > WU_IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WU_IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WU_IE_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WU_IE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Wakeup Interrupt Clear\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WU_INT_CLR_A { # [ doc = "0: Default, no action." ] _0 , # [ doc = "1: Clear the wake-up interrupt." ] _1 } impl From < WU_INT_CLR_A > for bool { # [ inline ( always ) ] fn from ( variant : WU_INT_CLR_A ) -> Self { match variant { WU_INT_CLR_A :: _0 => false , WU_INT_CLR_A :: _1 => true } } } # [ doc = "Reader of field `WU_INT_CLR`" ] pub type WU_INT_CLR_R = crate :: R < bool , WU_INT_CLR_A > ; impl WU_INT_CLR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WU_INT_CLR_A { match self . bits { false => WU_INT_CLR_A :: _0 , true => WU_INT_CLR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WU_INT_CLR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WU_INT_CLR_A :: _1 } } # [ doc = "Write proxy for field `WU_INT_CLR`" ] pub struct WU_INT_CLR_W < 'a > { w : & 'a mut W , } impl < 'a > WU_INT_CLR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WU_INT_CLR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Default, no action." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WU_INT_CLR_A :: _0 ) } # [ doc = "Clear the wake-up interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WU_INT_CLR_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Wakeup Interrupt Enable" ] # [ inline ( always ) ] pub fn wu_ie ( & self ) -> WU_IE_R { WU_IE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Wakeup Interrupt Clear" ] # [ inline ( always ) ] pub fn wu_int_clr ( & self ) -> WU_INT_CLR_R { WU_INT_CLR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Wakeup Interrupt Enable" ] # [ inline ( always ) ] pub fn wu_ie ( & mut self ) -> WU_IE_W { WU_IE_W { w : self } } # [ doc = "Bit 5 - Wakeup Interrupt Clear" ] # [ inline ( always ) ] pub fn wu_int_clr ( & mut self ) -> WU_INT_CLR_W { WU_INT_CLR_W { w : self } } } } } # [ doc = "USBPHY Register Reference Index" ] pub struct USBPHY { _marker : PhantomData < * const ( ) > } unsafe impl Send for USBPHY { } impl USBPHY { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const usbphy :: RegisterBlock { 0x400a_2000 as * const _ } } impl Deref for USBPHY { type Target = usbphy :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * USBPHY :: ptr ( ) } } } # [ doc = "USBPHY Register Reference Index" ] pub mod usbphy { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - USB PHY Power-Down Register" ] pub pwd : PWD , # [ doc = "0x04 - USB PHY Power-Down Register" ] pub pwd_set : PWD_SET , # [ doc = "0x08 - USB PHY Power-Down Register" ] pub pwd_clr : PWD_CLR , # [ doc = "0x0c - USB PHY Power-Down Register" ] pub pwd_tog : PWD_TOG , # [ doc = "0x10 - USB PHY Transmitter Control Register" ] pub tx : TX , # [ doc = "0x14 - USB PHY Transmitter Control Register" ] pub tx_set : TX_SET , # [ doc = "0x18 - USB PHY Transmitter Control Register" ] pub tx_clr : TX_CLR , # [ doc = "0x1c - USB PHY Transmitter Control Register" ] pub tx_tog : TX_TOG , # [ doc = "0x20 - USB PHY Receiver Control Register" ] pub rx : RX , # [ doc = "0x24 - USB PHY Receiver Control Register" ] pub rx_set : RX_SET , # [ doc = "0x28 - USB PHY Receiver Control Register" ] pub rx_clr : RX_CLR , # [ doc = "0x2c - USB PHY Receiver Control Register" ] pub rx_tog : RX_TOG , # [ doc = "0x30 - USB PHY General Control Register" ] pub ctrl : CTRL , # [ doc = "0x34 - USB PHY General Control Register" ] pub ctrl_set : CTRL_SET , # [ doc = "0x38 - USB PHY General Control Register" ] pub ctrl_clr : CTRL_CLR , # [ doc = "0x3c - USB PHY General Control Register" ] pub ctrl_tog : CTRL_TOG , # [ doc = "0x40 - USB PHY Status Register" ] pub status : STATUS , _reserved17 : [ u8 ; 12usize ] , # [ doc = "0x50 - USB PHY Debug Register" ] pub debug : DEBUG , # [ doc = "0x54 - USB PHY Debug Register" ] pub debug_set : DEBUG_SET , # [ doc = "0x58 - USB PHY Debug Register" ] pub debug_clr : DEBUG_CLR , # [ doc = "0x5c - USB PHY Debug Register" ] pub debug_tog : DEBUG_TOG , # [ doc = "0x60 - UTMI Debug Status Register 0" ] pub debug0_status : DEBUG0_STATUS , _reserved22 : [ u8 ; 12usize ] , # [ doc = "0x70 - UTMI Debug Status Register 1" ] pub debug1 : DEBUG1 , # [ doc = "0x74 - UTMI Debug Status Register 1" ] pub debug1_set : DEBUG1_SET , # [ doc = "0x78 - UTMI Debug Status Register 1" ] pub debug1_clr : DEBUG1_CLR , # [ doc = "0x7c - UTMI Debug Status Register 1" ] pub debug1_tog : DEBUG1_TOG , # [ doc = "0x80 - UTMI RTL Version" ] pub version : VERSION , _reserved27 : [ u8 ; 28usize ] , # [ doc = "0xa0 - USB PHY PLL Control/Status Register" ] pub pll_sic : PLL_SIC , # [ doc = "0xa4 - USB PHY PLL Control/Status Register" ] pub pll_sic_set : PLL_SIC_SET , # [ doc = "0xa8 - USB PHY PLL Control/Status Register" ] pub pll_sic_clr : PLL_SIC_CLR , # [ doc = "0xac - USB PHY PLL Control/Status Register" ] pub pll_sic_tog : PLL_SIC_TOG , _reserved31 : [ u8 ; 16usize ] , # [ doc = "0xc0 - USB PHY VBUS Detect Control Register" ] pub usb1_vbus_detect : USB1_VBUS_DETECT , # [ doc = "0xc4 - USB PHY VBUS Detect Control Register" ] pub usb1_vbus_detect_set : USB1_VBUS_DETECT_SET , # [ doc = "0xc8 - USB PHY VBUS Detect Control Register" ] pub usb1_vbus_detect_clr : USB1_VBUS_DETECT_CLR , # [ doc = "0xcc - USB PHY VBUS Detect Control Register" ] pub usb1_vbus_detect_tog : USB1_VBUS_DETECT_TOG , # [ doc = "0xd0 - USB PHY VBUS Detector Status Register" ] pub usb1_vbus_det_stat : USB1_VBUS_DET_STAT , _reserved36 : [ u8 ; 28usize ] , # [ doc = "0xf0 - USB PHY Charger Detect Status Register" ] pub usb1_chrg_det_stat : USB1_CHRG_DET_STAT , _reserved37 : [ u8 ; 12usize ] , # [ doc = "0x100 - USB PHY Analog Control Register" ] pub anactrl : ANACTRL , # [ doc = "0x104 - USB PHY Analog Control Register" ] pub anactrl_set : ANACTRL_SET , # [ doc = "0x108 - USB PHY Analog Control Register" ] pub anactrl_clr : ANACTRL_CLR , # [ doc = "0x10c - USB PHY Analog Control Register" ] pub anactrl_tog : ANACTRL_TOG , # [ doc = "0x110 - USB PHY Loopback Control/Status Register" ] pub usb1_loopback : USB1_LOOPBACK , # [ doc = "0x114 - USB PHY Loopback Control/Status Register" ] pub usb1_loopback_set : USB1_LOOPBACK_SET , # [ doc = "0x118 - USB PHY Loopback Control/Status Register" ] pub usb1_loopback_clr : USB1_LOOPBACK_CLR , # [ doc = "0x11c - USB PHY Loopback Control/Status Register" ] pub usb1_loopback_tog : USB1_LOOPBACK_TOG , # [ doc = "0x120 - USB PHY Loopback Packet Number Select Register" ] pub usb1_loopback_hsfscnt : USB1_LOOPBACK_HSFSCNT , # [ doc = "0x124 - USB PHY Loopback Packet Number Select Register" ] pub usb1_loopback_hsfscnt_set : USB1_LOOPBACK_HSFSCNT_SET , # [ doc = "0x128 - USB PHY Loopback Packet Number Select Register" ] pub usb1_loopback_hsfscnt_clr : USB1_LOOPBACK_HSFSCNT_CLR , # [ doc = "0x12c - USB PHY Loopback Packet Number Select Register" ] pub usb1_loopback_hsfscnt_tog : USB1_LOOPBACK_HSFSCNT_TOG , # [ doc = "0x130 - USB PHY Trim Override Enable Register" ] pub trim_override_en : TRIM_OVERRIDE_EN , # [ doc = "0x134 - USB PHY Trim Override Enable Register" ] pub trim_override_en_set : TRIM_OVERRIDE_EN_SET , # [ doc = "0x138 - USB PHY Trim Override Enable Register" ] pub trim_override_en_clr : TRIM_OVERRIDE_EN_CLR , # [ doc = "0x13c - USB PHY Trim Override Enable Register" ] pub trim_override_en_tog : TRIM_OVERRIDE_EN_TOG , } # [ doc = "USB PHY Power-Down Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwd](pwd) module" ] pub type PWD = crate :: Reg < u32 , _PWD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PWD ; # [ doc = "`read()` method returns [pwd::R](pwd::R) reader structure" ] impl crate :: Readable for PWD { } # [ doc = "`write(|w| ..)` method takes [pwd::W](pwd::W) writer structure" ] impl crate :: Writable for PWD { } # [ doc = "USB PHY Power-Down Register" ] pub mod pwd { # [ doc = "Reader of register PWD" ] pub type R = crate :: R < u32 , super :: PWD > ; # [ doc = "Writer for register PWD" ] pub type W = crate :: W < u32 , super :: PWD > ; # [ doc = "Register PWD `reset()`'s with value 0x001e_1c00" ] impl crate :: ResetValue for super :: PWD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x001e_1c00 } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDFS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the drivers into high-impedance output" ] _1 } impl From < TXPWDFS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDFS_A ) -> Self { match variant { TXPWDFS_A :: _0 => false , TXPWDFS_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDFS`" ] pub type TXPWDFS_R = crate :: R < bool , TXPWDFS_A > ; impl TXPWDFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDFS_A { match self . bits { false => TXPWDFS_A :: _0 , true => TXPWDFS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDFS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDFS_A :: _1 } } # [ doc = "Write proxy for field `TXPWDFS`" ] pub struct TXPWDFS_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDFS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDFS_A :: _0 ) } # [ doc = "Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the drivers into high-impedance output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDFS_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDIBIAS_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the USB is in suspend mode. This effectively powers down the entire USB transmit path" ] _1 } impl From < TXPWDIBIAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDIBIAS_A ) -> Self { match variant { TXPWDIBIAS_A :: _0 => false , TXPWDIBIAS_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDIBIAS`" ] pub type TXPWDIBIAS_R = crate :: R < bool , TXPWDIBIAS_A > ; impl TXPWDIBIAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDIBIAS_A { match self . bits { false => TXPWDIBIAS_A :: _0 , true => TXPWDIBIAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDIBIAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDIBIAS_A :: _1 } } # [ doc = "Write proxy for field `TXPWDIBIAS`" ] pub struct TXPWDIBIAS_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDIBIAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDIBIAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDIBIAS_A :: _0 ) } # [ doc = "Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the USB is in suspend mode. This effectively powers down the entire USB transmit path" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDIBIAS_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDV2I_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB PHY transmit V-to-I converter and the current mirror" ] _1 } impl From < TXPWDV2I_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDV2I_A ) -> Self { match variant { TXPWDV2I_A :: _0 => false , TXPWDV2I_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDV2I`" ] pub type TXPWDV2I_R = crate :: R < bool , TXPWDV2I_A > ; impl TXPWDV2I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDV2I_A { match self . bits { false => TXPWDV2I_A :: _0 , true => TXPWDV2I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDV2I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDV2I_A :: _1 } } # [ doc = "Write proxy for field `TXPWDV2I`" ] pub struct TXPWDV2I_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDV2I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDV2I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDV2I_A :: _0 ) } # [ doc = "Power-down the USB PHY transmit V-to-I converter and the current mirror" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDV2I_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDENV_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB high-speed receiver envelope detector (squelch signal)" ] _1 } impl From < RXPWDENV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDENV_A ) -> Self { match variant { RXPWDENV_A :: _0 => false , RXPWDENV_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDENV`" ] pub type RXPWDENV_R = crate :: R < bool , RXPWDENV_A > ; impl RXPWDENV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDENV_A { match self . bits { false => RXPWDENV_A :: _0 , true => RXPWDENV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDENV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDENV_A :: _1 } } # [ doc = "Write proxy for field `RXPWDENV`" ] pub struct RXPWDENV_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDENV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDENV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDENV_A :: _0 ) } # [ doc = "Power-down the USB high-speed receiver envelope detector (squelch signal)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDENV_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWD1PT1_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the USB full-speed differential receiver." ] _1 } impl From < RXPWD1PT1_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWD1PT1_A ) -> Self { match variant { RXPWD1PT1_A :: _0 => false , RXPWD1PT1_A :: _1 => true } } } # [ doc = "Reader of field `RXPWD1PT1`" ] pub type RXPWD1PT1_R = crate :: R < bool , RXPWD1PT1_A > ; impl RXPWD1PT1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWD1PT1_A { match self . bits { false => RXPWD1PT1_A :: _0 , true => RXPWD1PT1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWD1PT1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWD1PT1_A :: _1 } } # [ doc = "Write proxy for field `RXPWD1PT1`" ] pub struct RXPWD1PT1_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWD1PT1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWD1PT1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWD1PT1_A :: _0 ) } # [ doc = "Power-down the USB full-speed differential receiver." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWD1PT1_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDDIFF_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB high-speed differential receiver" ] _1 } impl From < RXPWDDIFF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDDIFF_A ) -> Self { match variant { RXPWDDIFF_A :: _0 => false , RXPWDDIFF_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDDIFF`" ] pub type RXPWDDIFF_R = crate :: R < bool , RXPWDDIFF_A > ; impl RXPWDDIFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDDIFF_A { match self . bits { false => RXPWDDIFF_A :: _0 , true => RXPWDDIFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDDIFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDDIFF_A :: _1 } } # [ doc = "Write proxy for field `RXPWDDIFF`" ] pub struct RXPWDDIFF_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDDIFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDDIFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDDIFF_A :: _0 ) } # [ doc = "Power-down the USB high-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDDIFF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDRX_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the entire USB PHY receiver block except for the full-speed differential receiver" ] _1 } impl From < RXPWDRX_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDRX_A ) -> Self { match variant { RXPWDRX_A :: _0 => false , RXPWDRX_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDRX`" ] pub type RXPWDRX_R = crate :: R < bool , RXPWDRX_A > ; impl RXPWDRX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDRX_A { match self . bits { false => RXPWDRX_A :: _0 , true => RXPWDRX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDRX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDRX_A :: _1 } } # [ doc = "Write proxy for field `RXPWDRX`" ] pub struct RXPWDRX_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDRX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDRX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDRX_A :: _0 ) } # [ doc = "Power-down the entire USB PHY receiver block except for the full-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDRX_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 10 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdfs ( & self ) -> TXPWDFS_R { TXPWDFS_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdibias ( & self ) -> TXPWDIBIAS_R { TXPWDIBIAS_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdv2i ( & self ) -> TXPWDV2I_R { TXPWDV2I_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdenv ( & self ) -> RXPWDENV_R { RXPWDENV_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwd1pt1 ( & self ) -> RXPWD1PT1_R { RXPWD1PT1_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwddiff ( & self ) -> RXPWDDIFF_R { RXPWDDIFF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdrx ( & self ) -> RXPWDRX_R { RXPWDRX_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 10 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdfs ( & mut self ) -> TXPWDFS_W { TXPWDFS_W { w : self } } # [ doc = "Bit 11 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdibias ( & mut self ) -> TXPWDIBIAS_W { TXPWDIBIAS_W { w : self } } # [ doc = "Bit 12 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdv2i ( & mut self ) -> TXPWDV2I_W { TXPWDV2I_W { w : self } } # [ doc = "Bit 17 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdenv ( & mut self ) -> RXPWDENV_W { RXPWDENV_W { w : self } } # [ doc = "Bit 18 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwd1pt1 ( & mut self ) -> RXPWD1PT1_W { RXPWD1PT1_W { w : self } } # [ doc = "Bit 19 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwddiff ( & mut self ) -> RXPWDDIFF_W { RXPWDDIFF_W { w : self } } # [ doc = "Bit 20 - This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdrx ( & mut self ) -> RXPWDRX_W { RXPWDRX_W { w : self } } } } # [ doc = "USB PHY Power-Down Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwd_set](pwd_set) module" ] pub type PWD_SET = crate :: Reg < u32 , _PWD_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PWD_SET ; # [ doc = "`read()` method returns [pwd_set::R](pwd_set::R) reader structure" ] impl crate :: Readable for PWD_SET { } # [ doc = "`write(|w| ..)` method takes [pwd_set::W](pwd_set::W) writer structure" ] impl crate :: Writable for PWD_SET { } # [ doc = "USB PHY Power-Down Register" ] pub mod pwd_set { # [ doc = "Reader of register PWD_SET" ] pub type R = crate :: R < u32 , super :: PWD_SET > ; # [ doc = "Writer for register PWD_SET" ] pub type W = crate :: W < u32 , super :: PWD_SET > ; # [ doc = "Register PWD_SET `reset()`'s with value 0x001e_1c00" ] impl crate :: ResetValue for super :: PWD_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x001e_1c00 } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDFS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the drivers into high-impedance output" ] _1 } impl From < TXPWDFS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDFS_A ) -> Self { match variant { TXPWDFS_A :: _0 => false , TXPWDFS_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDFS`" ] pub type TXPWDFS_R = crate :: R < bool , TXPWDFS_A > ; impl TXPWDFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDFS_A { match self . bits { false => TXPWDFS_A :: _0 , true => TXPWDFS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDFS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDFS_A :: _1 } } # [ doc = "Write proxy for field `TXPWDFS`" ] pub struct TXPWDFS_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDFS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDFS_A :: _0 ) } # [ doc = "Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the drivers into high-impedance output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDFS_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDIBIAS_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the USB is in suspend mode. This effectively powers down the entire USB transmit path" ] _1 } impl From < TXPWDIBIAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDIBIAS_A ) -> Self { match variant { TXPWDIBIAS_A :: _0 => false , TXPWDIBIAS_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDIBIAS`" ] pub type TXPWDIBIAS_R = crate :: R < bool , TXPWDIBIAS_A > ; impl TXPWDIBIAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDIBIAS_A { match self . bits { false => TXPWDIBIAS_A :: _0 , true => TXPWDIBIAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDIBIAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDIBIAS_A :: _1 } } # [ doc = "Write proxy for field `TXPWDIBIAS`" ] pub struct TXPWDIBIAS_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDIBIAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDIBIAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDIBIAS_A :: _0 ) } # [ doc = "Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the USB is in suspend mode. This effectively powers down the entire USB transmit path" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDIBIAS_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDV2I_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB PHY transmit V-to-I converter and the current mirror" ] _1 } impl From < TXPWDV2I_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDV2I_A ) -> Self { match variant { TXPWDV2I_A :: _0 => false , TXPWDV2I_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDV2I`" ] pub type TXPWDV2I_R = crate :: R < bool , TXPWDV2I_A > ; impl TXPWDV2I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDV2I_A { match self . bits { false => TXPWDV2I_A :: _0 , true => TXPWDV2I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDV2I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDV2I_A :: _1 } } # [ doc = "Write proxy for field `TXPWDV2I`" ] pub struct TXPWDV2I_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDV2I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDV2I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDV2I_A :: _0 ) } # [ doc = "Power-down the USB PHY transmit V-to-I converter and the current mirror" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDV2I_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDENV_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB high-speed receiver envelope detector (squelch signal)" ] _1 } impl From < RXPWDENV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDENV_A ) -> Self { match variant { RXPWDENV_A :: _0 => false , RXPWDENV_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDENV`" ] pub type RXPWDENV_R = crate :: R < bool , RXPWDENV_A > ; impl RXPWDENV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDENV_A { match self . bits { false => RXPWDENV_A :: _0 , true => RXPWDENV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDENV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDENV_A :: _1 } } # [ doc = "Write proxy for field `RXPWDENV`" ] pub struct RXPWDENV_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDENV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDENV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDENV_A :: _0 ) } # [ doc = "Power-down the USB high-speed receiver envelope detector (squelch signal)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDENV_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWD1PT1_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the USB full-speed differential receiver." ] _1 } impl From < RXPWD1PT1_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWD1PT1_A ) -> Self { match variant { RXPWD1PT1_A :: _0 => false , RXPWD1PT1_A :: _1 => true } } } # [ doc = "Reader of field `RXPWD1PT1`" ] pub type RXPWD1PT1_R = crate :: R < bool , RXPWD1PT1_A > ; impl RXPWD1PT1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWD1PT1_A { match self . bits { false => RXPWD1PT1_A :: _0 , true => RXPWD1PT1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWD1PT1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWD1PT1_A :: _1 } } # [ doc = "Write proxy for field `RXPWD1PT1`" ] pub struct RXPWD1PT1_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWD1PT1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWD1PT1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWD1PT1_A :: _0 ) } # [ doc = "Power-down the USB full-speed differential receiver." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWD1PT1_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDDIFF_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB high-speed differential receiver" ] _1 } impl From < RXPWDDIFF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDDIFF_A ) -> Self { match variant { RXPWDDIFF_A :: _0 => false , RXPWDDIFF_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDDIFF`" ] pub type RXPWDDIFF_R = crate :: R < bool , RXPWDDIFF_A > ; impl RXPWDDIFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDDIFF_A { match self . bits { false => RXPWDDIFF_A :: _0 , true => RXPWDDIFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDDIFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDDIFF_A :: _1 } } # [ doc = "Write proxy for field `RXPWDDIFF`" ] pub struct RXPWDDIFF_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDDIFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDDIFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDDIFF_A :: _0 ) } # [ doc = "Power-down the USB high-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDDIFF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDRX_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the entire USB PHY receiver block except for the full-speed differential receiver" ] _1 } impl From < RXPWDRX_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDRX_A ) -> Self { match variant { RXPWDRX_A :: _0 => false , RXPWDRX_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDRX`" ] pub type RXPWDRX_R = crate :: R < bool , RXPWDRX_A > ; impl RXPWDRX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDRX_A { match self . bits { false => RXPWDRX_A :: _0 , true => RXPWDRX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDRX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDRX_A :: _1 } } # [ doc = "Write proxy for field `RXPWDRX`" ] pub struct RXPWDRX_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDRX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDRX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDRX_A :: _0 ) } # [ doc = "Power-down the entire USB PHY receiver block except for the full-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDRX_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 10 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdfs ( & self ) -> TXPWDFS_R { TXPWDFS_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdibias ( & self ) -> TXPWDIBIAS_R { TXPWDIBIAS_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdv2i ( & self ) -> TXPWDV2I_R { TXPWDV2I_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdenv ( & self ) -> RXPWDENV_R { RXPWDENV_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwd1pt1 ( & self ) -> RXPWD1PT1_R { RXPWD1PT1_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwddiff ( & self ) -> RXPWDDIFF_R { RXPWDDIFF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdrx ( & self ) -> RXPWDRX_R { RXPWDRX_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 10 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdfs ( & mut self ) -> TXPWDFS_W { TXPWDFS_W { w : self } } # [ doc = "Bit 11 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdibias ( & mut self ) -> TXPWDIBIAS_W { TXPWDIBIAS_W { w : self } } # [ doc = "Bit 12 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdv2i ( & mut self ) -> TXPWDV2I_W { TXPWDV2I_W { w : self } } # [ doc = "Bit 17 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdenv ( & mut self ) -> RXPWDENV_W { RXPWDENV_W { w : self } } # [ doc = "Bit 18 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwd1pt1 ( & mut self ) -> RXPWD1PT1_W { RXPWD1PT1_W { w : self } } # [ doc = "Bit 19 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwddiff ( & mut self ) -> RXPWDDIFF_W { RXPWDDIFF_W { w : self } } # [ doc = "Bit 20 - This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdrx ( & mut self ) -> RXPWDRX_W { RXPWDRX_W { w : self } } } } # [ doc = "USB PHY Power-Down Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwd_clr](pwd_clr) module" ] pub type PWD_CLR = crate :: Reg < u32 , _PWD_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PWD_CLR ; # [ doc = "`read()` method returns [pwd_clr::R](pwd_clr::R) reader structure" ] impl crate :: Readable for PWD_CLR { } # [ doc = "`write(|w| ..)` method takes [pwd_clr::W](pwd_clr::W) writer structure" ] impl crate :: Writable for PWD_CLR { } # [ doc = "USB PHY Power-Down Register" ] pub mod pwd_clr { # [ doc = "Reader of register PWD_CLR" ] pub type R = crate :: R < u32 , super :: PWD_CLR > ; # [ doc = "Writer for register PWD_CLR" ] pub type W = crate :: W < u32 , super :: PWD_CLR > ; # [ doc = "Register PWD_CLR `reset()`'s with value 0x001e_1c00" ] impl crate :: ResetValue for super :: PWD_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x001e_1c00 } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDFS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the drivers into high-impedance output" ] _1 } impl From < TXPWDFS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDFS_A ) -> Self { match variant { TXPWDFS_A :: _0 => false , TXPWDFS_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDFS`" ] pub type TXPWDFS_R = crate :: R < bool , TXPWDFS_A > ; impl TXPWDFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDFS_A { match self . bits { false => TXPWDFS_A :: _0 , true => TXPWDFS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDFS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDFS_A :: _1 } } # [ doc = "Write proxy for field `TXPWDFS`" ] pub struct TXPWDFS_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDFS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDFS_A :: _0 ) } # [ doc = "Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the drivers into high-impedance output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDFS_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDIBIAS_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the USB is in suspend mode. This effectively powers down the entire USB transmit path" ] _1 } impl From < TXPWDIBIAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDIBIAS_A ) -> Self { match variant { TXPWDIBIAS_A :: _0 => false , TXPWDIBIAS_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDIBIAS`" ] pub type TXPWDIBIAS_R = crate :: R < bool , TXPWDIBIAS_A > ; impl TXPWDIBIAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDIBIAS_A { match self . bits { false => TXPWDIBIAS_A :: _0 , true => TXPWDIBIAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDIBIAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDIBIAS_A :: _1 } } # [ doc = "Write proxy for field `TXPWDIBIAS`" ] pub struct TXPWDIBIAS_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDIBIAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDIBIAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDIBIAS_A :: _0 ) } # [ doc = "Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the USB is in suspend mode. This effectively powers down the entire USB transmit path" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDIBIAS_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDV2I_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB PHY transmit V-to-I converter and the current mirror" ] _1 } impl From < TXPWDV2I_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDV2I_A ) -> Self { match variant { TXPWDV2I_A :: _0 => false , TXPWDV2I_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDV2I`" ] pub type TXPWDV2I_R = crate :: R < bool , TXPWDV2I_A > ; impl TXPWDV2I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDV2I_A { match self . bits { false => TXPWDV2I_A :: _0 , true => TXPWDV2I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDV2I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDV2I_A :: _1 } } # [ doc = "Write proxy for field `TXPWDV2I`" ] pub struct TXPWDV2I_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDV2I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDV2I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDV2I_A :: _0 ) } # [ doc = "Power-down the USB PHY transmit V-to-I converter and the current mirror" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDV2I_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDENV_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB high-speed receiver envelope detector (squelch signal)" ] _1 } impl From < RXPWDENV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDENV_A ) -> Self { match variant { RXPWDENV_A :: _0 => false , RXPWDENV_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDENV`" ] pub type RXPWDENV_R = crate :: R < bool , RXPWDENV_A > ; impl RXPWDENV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDENV_A { match self . bits { false => RXPWDENV_A :: _0 , true => RXPWDENV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDENV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDENV_A :: _1 } } # [ doc = "Write proxy for field `RXPWDENV`" ] pub struct RXPWDENV_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDENV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDENV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDENV_A :: _0 ) } # [ doc = "Power-down the USB high-speed receiver envelope detector (squelch signal)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDENV_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWD1PT1_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the USB full-speed differential receiver." ] _1 } impl From < RXPWD1PT1_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWD1PT1_A ) -> Self { match variant { RXPWD1PT1_A :: _0 => false , RXPWD1PT1_A :: _1 => true } } } # [ doc = "Reader of field `RXPWD1PT1`" ] pub type RXPWD1PT1_R = crate :: R < bool , RXPWD1PT1_A > ; impl RXPWD1PT1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWD1PT1_A { match self . bits { false => RXPWD1PT1_A :: _0 , true => RXPWD1PT1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWD1PT1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWD1PT1_A :: _1 } } # [ doc = "Write proxy for field `RXPWD1PT1`" ] pub struct RXPWD1PT1_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWD1PT1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWD1PT1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWD1PT1_A :: _0 ) } # [ doc = "Power-down the USB full-speed differential receiver." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWD1PT1_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDDIFF_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB high-speed differential receiver" ] _1 } impl From < RXPWDDIFF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDDIFF_A ) -> Self { match variant { RXPWDDIFF_A :: _0 => false , RXPWDDIFF_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDDIFF`" ] pub type RXPWDDIFF_R = crate :: R < bool , RXPWDDIFF_A > ; impl RXPWDDIFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDDIFF_A { match self . bits { false => RXPWDDIFF_A :: _0 , true => RXPWDDIFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDDIFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDDIFF_A :: _1 } } # [ doc = "Write proxy for field `RXPWDDIFF`" ] pub struct RXPWDDIFF_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDDIFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDDIFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDDIFF_A :: _0 ) } # [ doc = "Power-down the USB high-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDDIFF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDRX_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the entire USB PHY receiver block except for the full-speed differential receiver" ] _1 } impl From < RXPWDRX_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDRX_A ) -> Self { match variant { RXPWDRX_A :: _0 => false , RXPWDRX_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDRX`" ] pub type RXPWDRX_R = crate :: R < bool , RXPWDRX_A > ; impl RXPWDRX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDRX_A { match self . bits { false => RXPWDRX_A :: _0 , true => RXPWDRX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDRX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDRX_A :: _1 } } # [ doc = "Write proxy for field `RXPWDRX`" ] pub struct RXPWDRX_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDRX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDRX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDRX_A :: _0 ) } # [ doc = "Power-down the entire USB PHY receiver block except for the full-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDRX_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 10 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdfs ( & self ) -> TXPWDFS_R { TXPWDFS_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdibias ( & self ) -> TXPWDIBIAS_R { TXPWDIBIAS_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdv2i ( & self ) -> TXPWDV2I_R { TXPWDV2I_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdenv ( & self ) -> RXPWDENV_R { RXPWDENV_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwd1pt1 ( & self ) -> RXPWD1PT1_R { RXPWD1PT1_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwddiff ( & self ) -> RXPWDDIFF_R { RXPWDDIFF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdrx ( & self ) -> RXPWDRX_R { RXPWDRX_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 10 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdfs ( & mut self ) -> TXPWDFS_W { TXPWDFS_W { w : self } } # [ doc = "Bit 11 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdibias ( & mut self ) -> TXPWDIBIAS_W { TXPWDIBIAS_W { w : self } } # [ doc = "Bit 12 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdv2i ( & mut self ) -> TXPWDV2I_W { TXPWDV2I_W { w : self } } # [ doc = "Bit 17 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdenv ( & mut self ) -> RXPWDENV_W { RXPWDENV_W { w : self } } # [ doc = "Bit 18 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwd1pt1 ( & mut self ) -> RXPWD1PT1_W { RXPWD1PT1_W { w : self } } # [ doc = "Bit 19 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwddiff ( & mut self ) -> RXPWDDIFF_W { RXPWDDIFF_W { w : self } } # [ doc = "Bit 20 - This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdrx ( & mut self ) -> RXPWDRX_W { RXPWDRX_W { w : self } } } } # [ doc = "USB PHY Power-Down Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwd_tog](pwd_tog) module" ] pub type PWD_TOG = crate :: Reg < u32 , _PWD_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PWD_TOG ; # [ doc = "`read()` method returns [pwd_tog::R](pwd_tog::R) reader structure" ] impl crate :: Readable for PWD_TOG { } # [ doc = "`write(|w| ..)` method takes [pwd_tog::W](pwd_tog::W) writer structure" ] impl crate :: Writable for PWD_TOG { } # [ doc = "USB PHY Power-Down Register" ] pub mod pwd_tog { # [ doc = "Reader of register PWD_TOG" ] pub type R = crate :: R < u32 , super :: PWD_TOG > ; # [ doc = "Writer for register PWD_TOG" ] pub type W = crate :: W < u32 , super :: PWD_TOG > ; # [ doc = "Register PWD_TOG `reset()`'s with value 0x001e_1c00" ] impl crate :: ResetValue for super :: PWD_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x001e_1c00 } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDFS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the drivers into high-impedance output" ] _1 } impl From < TXPWDFS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDFS_A ) -> Self { match variant { TXPWDFS_A :: _0 => false , TXPWDFS_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDFS`" ] pub type TXPWDFS_R = crate :: R < bool , TXPWDFS_A > ; impl TXPWDFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDFS_A { match self . bits { false => TXPWDFS_A :: _0 , true => TXPWDFS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDFS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDFS_A :: _1 } } # [ doc = "Write proxy for field `TXPWDFS`" ] pub struct TXPWDFS_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDFS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDFS_A :: _0 ) } # [ doc = "Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the drivers into high-impedance output" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDFS_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDIBIAS_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the USB is in suspend mode. This effectively powers down the entire USB transmit path" ] _1 } impl From < TXPWDIBIAS_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDIBIAS_A ) -> Self { match variant { TXPWDIBIAS_A :: _0 => false , TXPWDIBIAS_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDIBIAS`" ] pub type TXPWDIBIAS_R = crate :: R < bool , TXPWDIBIAS_A > ; impl TXPWDIBIAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDIBIAS_A { match self . bits { false => TXPWDIBIAS_A :: _0 , true => TXPWDIBIAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDIBIAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDIBIAS_A :: _1 } } # [ doc = "Write proxy for field `TXPWDIBIAS`" ] pub struct TXPWDIBIAS_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDIBIAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDIBIAS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDIBIAS_A :: _0 ) } # [ doc = "Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the USB is in suspend mode. This effectively powers down the entire USB transmit path" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDIBIAS_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPWDV2I_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB PHY transmit V-to-I converter and the current mirror" ] _1 } impl From < TXPWDV2I_A > for bool { # [ inline ( always ) ] fn from ( variant : TXPWDV2I_A ) -> Self { match variant { TXPWDV2I_A :: _0 => false , TXPWDV2I_A :: _1 => true } } } # [ doc = "Reader of field `TXPWDV2I`" ] pub type TXPWDV2I_R = crate :: R < bool , TXPWDV2I_A > ; impl TXPWDV2I_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXPWDV2I_A { match self . bits { false => TXPWDV2I_A :: _0 , true => TXPWDV2I_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXPWDV2I_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXPWDV2I_A :: _1 } } # [ doc = "Write proxy for field `TXPWDV2I`" ] pub struct TXPWDV2I_W < 'a > { w : & 'a mut W , } impl < 'a > TXPWDV2I_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXPWDV2I_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXPWDV2I_A :: _0 ) } # [ doc = "Power-down the USB PHY transmit V-to-I converter and the current mirror" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXPWDV2I_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDENV_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB high-speed receiver envelope detector (squelch signal)" ] _1 } impl From < RXPWDENV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDENV_A ) -> Self { match variant { RXPWDENV_A :: _0 => false , RXPWDENV_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDENV`" ] pub type RXPWDENV_R = crate :: R < bool , RXPWDENV_A > ; impl RXPWDENV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDENV_A { match self . bits { false => RXPWDENV_A :: _0 , true => RXPWDENV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDENV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDENV_A :: _1 } } # [ doc = "Write proxy for field `RXPWDENV`" ] pub struct RXPWDENV_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDENV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDENV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDENV_A :: _0 ) } # [ doc = "Power-down the USB high-speed receiver envelope detector (squelch signal)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDENV_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWD1PT1_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the USB full-speed differential receiver." ] _1 } impl From < RXPWD1PT1_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWD1PT1_A ) -> Self { match variant { RXPWD1PT1_A :: _0 => false , RXPWD1PT1_A :: _1 => true } } } # [ doc = "Reader of field `RXPWD1PT1`" ] pub type RXPWD1PT1_R = crate :: R < bool , RXPWD1PT1_A > ; impl RXPWD1PT1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWD1PT1_A { match self . bits { false => RXPWD1PT1_A :: _0 , true => RXPWD1PT1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWD1PT1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWD1PT1_A :: _1 } } # [ doc = "Write proxy for field `RXPWD1PT1`" ] pub struct RXPWD1PT1_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWD1PT1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWD1PT1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWD1PT1_A :: _0 ) } # [ doc = "Power-down the USB full-speed differential receiver." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWD1PT1_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDDIFF_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Power-down the USB high-speed differential receiver" ] _1 } impl From < RXPWDDIFF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDDIFF_A ) -> Self { match variant { RXPWDDIFF_A :: _0 => false , RXPWDDIFF_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDDIFF`" ] pub type RXPWDDIFF_R = crate :: R < bool , RXPWDDIFF_A > ; impl RXPWDDIFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDDIFF_A { match self . bits { false => RXPWDDIFF_A :: _0 , true => RXPWDDIFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDDIFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDDIFF_A :: _1 } } # [ doc = "Write proxy for field `RXPWDDIFF`" ] pub struct RXPWDDIFF_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDDIFF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDDIFF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDDIFF_A :: _0 ) } # [ doc = "Power-down the USB high-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDDIFF_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPWDRX_A { # [ doc = "0: Normal operation" ] _0 , # [ doc = "1: Power-down the entire USB PHY receiver block except for the full-speed differential receiver" ] _1 } impl From < RXPWDRX_A > for bool { # [ inline ( always ) ] fn from ( variant : RXPWDRX_A ) -> Self { match variant { RXPWDRX_A :: _0 => false , RXPWDRX_A :: _1 => true } } } # [ doc = "Reader of field `RXPWDRX`" ] pub type RXPWDRX_R = crate :: R < bool , RXPWDRX_A > ; impl RXPWDRX_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXPWDRX_A { match self . bits { false => RXPWDRX_A :: _0 , true => RXPWDRX_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXPWDRX_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXPWDRX_A :: _1 } } # [ doc = "Write proxy for field `RXPWDRX`" ] pub struct RXPWDRX_W < 'a > { w : & 'a mut W , } impl < 'a > RXPWDRX_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXPWDRX_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXPWDRX_A :: _0 ) } # [ doc = "Power-down the entire USB PHY receiver block except for the full-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXPWDRX_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 10 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdfs ( & self ) -> TXPWDFS_R { TXPWDFS_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdibias ( & self ) -> TXPWDIBIAS_R { TXPWDIBIAS_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdv2i ( & self ) -> TXPWDV2I_R { TXPWDV2I_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdenv ( & self ) -> RXPWDENV_R { RXPWDENV_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwd1pt1 ( & self ) -> RXPWD1PT1_R { RXPWD1PT1_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwddiff ( & self ) -> RXPWDDIFF_R { RXPWDDIFF_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdrx ( & self ) -> RXPWDRX_R { RXPWDRX_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 10 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdfs ( & mut self ) -> TXPWDFS_W { TXPWDFS_W { w : self } } # [ doc = "Bit 11 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdibias ( & mut self ) -> TXPWDIBIAS_W { TXPWDIBIAS_W { w : self } } # [ doc = "Bit 12 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn txpwdv2i ( & mut self ) -> TXPWDV2I_W { TXPWDV2I_W { w : self } } # [ doc = "Bit 17 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdenv ( & mut self ) -> RXPWDENV_W { RXPWDENV_W { w : self } } # [ doc = "Bit 18 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwd1pt1 ( & mut self ) -> RXPWD1PT1_W { RXPWD1PT1_W { w : self } } # [ doc = "Bit 19 - Note that this bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwddiff ( & mut self ) -> RXPWDDIFF_W { RXPWDDIFF_W { w : self } } # [ doc = "Bit 20 - This bit will be auto cleared if there is USB wakeup event while ENAUTOCLR_PHY_PWD bit of USBPHY_CTRL is enabled" ] # [ inline ( always ) ] pub fn rxpwdrx ( & mut self ) -> RXPWDRX_W { RXPWDRX_W { w : self } } } } # [ doc = "USB PHY Transmitter Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tx](tx) module" ] pub type TX = crate :: Reg < u32 , _TX > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TX ; # [ doc = "`read()` method returns [tx::R](tx::R) reader structure" ] impl crate :: Readable for TX { } # [ doc = "`write(|w| ..)` method takes [tx::W](tx::W) writer structure" ] impl crate :: Writable for TX { } # [ doc = "USB PHY Transmitter Control Register" ] pub mod tx { # [ doc = "Reader of register TX" ] pub type R = crate :: R < u32 , super :: TX > ; # [ doc = "Writer for register TX" ] pub type W = crate :: W < u32 , super :: TX > ; # [ doc = "Register TX `reset()`'s with value 0x1006_0607" ] impl crate :: ResetValue for super :: TX { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1006_0607 } } # [ doc = "Decode to trim the nominal 17\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum D_CAL_A { # [ doc = "0: Maximum current, approximately 19% above nominal." ] _0000 , # [ doc = "7: Nominal" ] _0111 , # [ doc = "15: Minimum current, approximately 19% below nominal." ] _1111 } impl From < D_CAL_A > for u8 { # [ inline ( always ) ] fn from ( variant : D_CAL_A ) -> Self { match variant { D_CAL_A :: _0000 => 0 , D_CAL_A :: _0111 => 7 , D_CAL_A :: _1111 => 15 } } } # [ doc = "Reader of field `D_CAL`" ] pub type D_CAL_R = crate :: R < u8 , D_CAL_A > ; impl D_CAL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , D_CAL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( D_CAL_A :: _0000 ) , 7 => Val ( D_CAL_A :: _0111 ) , 15 => Val ( D_CAL_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == D_CAL_A :: _0000 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == D_CAL_A :: _0111 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == D_CAL_A :: _1111 } } # [ doc = "Write proxy for field `D_CAL`" ] pub struct D_CAL_W < 'a > { w : & 'a mut W , } impl < 'a > D_CAL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : D_CAL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Maximum current, approximately 19% above nominal." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _0000 ) } # [ doc = "Nominal" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _0111 ) } # [ doc = "Minimum current, approximately 19% below nominal." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _1111 ) } # [ 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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `TXCAL45DM`" ] pub type TXCAL45DM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXCAL45DM`" ] pub struct TXCAL45DM_W < 'a > { w : & 'a mut W , } impl < 'a > TXCAL45DM_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `TXCAL45DP`" ] pub type TXCAL45DP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXCAL45DP`" ] pub struct TXCAL45DP_W < 'a > { w : & 'a mut W , } impl < 'a > TXCAL45DP_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `USBPHY_TX_EDGECTRL`" ] pub type USBPHY_TX_EDGECTRL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `USBPHY_TX_EDGECTRL`" ] pub struct USBPHY_TX_EDGECTRL_W < 'a > { w : & 'a mut W , } impl < 'a > USBPHY_TX_EDGECTRL_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 << 26 ) ) | ( ( ( value as u32 ) & 0x07 ) << 26 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Decode to trim the nominal 17" ] # [ inline ( always ) ] pub fn d_cal ( & self ) -> D_CAL_R { D_CAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Decode to trim the nominal 45ohm series termination resistance to the USB_DM output pin" ] # [ inline ( always ) ] pub fn txcal45dm ( & self ) -> TXCAL45DM_R { TXCAL45DM_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Decode to trim the nominal 45ohm series termination resistance to the USB_DP output pin" ] # [ inline ( always ) ] pub fn txcal45dp ( & self ) -> TXCAL45DP_R { TXCAL45DP_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bits 26:28 - Controls the edge-rate of the current sensing transistors used in HS transmit" ] # [ inline ( always ) ] pub fn usbphy_tx_edgectrl ( & self ) -> USBPHY_TX_EDGECTRL_R { USBPHY_TX_EDGECTRL_R :: new ( ( ( self . bits >> 26 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Decode to trim the nominal 17" ] # [ inline ( always ) ] pub fn d_cal ( & mut self ) -> D_CAL_W { D_CAL_W { w : self } } # [ doc = "Bits 8:11 - Decode to trim the nominal 45ohm series termination resistance to the USB_DM output pin" ] # [ inline ( always ) ] pub fn txcal45dm ( & mut self ) -> TXCAL45DM_W { TXCAL45DM_W { w : self } } # [ doc = "Bits 16:19 - Decode to trim the nominal 45ohm series termination resistance to the USB_DP output pin" ] # [ inline ( always ) ] pub fn txcal45dp ( & mut self ) -> TXCAL45DP_W { TXCAL45DP_W { w : self } } # [ doc = "Bits 26:28 - Controls the edge-rate of the current sensing transistors used in HS transmit" ] # [ inline ( always ) ] pub fn usbphy_tx_edgectrl ( & mut self ) -> USBPHY_TX_EDGECTRL_W { USBPHY_TX_EDGECTRL_W { w : self } } } } # [ doc = "USB PHY Transmitter Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tx_set](tx_set) module" ] pub type TX_SET = crate :: Reg < u32 , _TX_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TX_SET ; # [ doc = "`read()` method returns [tx_set::R](tx_set::R) reader structure" ] impl crate :: Readable for TX_SET { } # [ doc = "`write(|w| ..)` method takes [tx_set::W](tx_set::W) writer structure" ] impl crate :: Writable for TX_SET { } # [ doc = "USB PHY Transmitter Control Register" ] pub mod tx_set { # [ doc = "Reader of register TX_SET" ] pub type R = crate :: R < u32 , super :: TX_SET > ; # [ doc = "Writer for register TX_SET" ] pub type W = crate :: W < u32 , super :: TX_SET > ; # [ doc = "Register TX_SET `reset()`'s with value 0x1006_0607" ] impl crate :: ResetValue for super :: TX_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1006_0607 } } # [ doc = "Decode to trim the nominal 17\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum D_CAL_A { # [ doc = "0: Maximum current, approximately 19% above nominal." ] _0000 , # [ doc = "7: Nominal" ] _0111 , # [ doc = "15: Minimum current, approximately 19% below nominal." ] _1111 } impl From < D_CAL_A > for u8 { # [ inline ( always ) ] fn from ( variant : D_CAL_A ) -> Self { match variant { D_CAL_A :: _0000 => 0 , D_CAL_A :: _0111 => 7 , D_CAL_A :: _1111 => 15 } } } # [ doc = "Reader of field `D_CAL`" ] pub type D_CAL_R = crate :: R < u8 , D_CAL_A > ; impl D_CAL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , D_CAL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( D_CAL_A :: _0000 ) , 7 => Val ( D_CAL_A :: _0111 ) , 15 => Val ( D_CAL_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == D_CAL_A :: _0000 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == D_CAL_A :: _0111 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == D_CAL_A :: _1111 } } # [ doc = "Write proxy for field `D_CAL`" ] pub struct D_CAL_W < 'a > { w : & 'a mut W , } impl < 'a > D_CAL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : D_CAL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Maximum current, approximately 19% above nominal." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _0000 ) } # [ doc = "Nominal" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _0111 ) } # [ doc = "Minimum current, approximately 19% below nominal." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _1111 ) } # [ 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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `TXCAL45DM`" ] pub type TXCAL45DM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXCAL45DM`" ] pub struct TXCAL45DM_W < 'a > { w : & 'a mut W , } impl < 'a > TXCAL45DM_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `TXCAL45DP`" ] pub type TXCAL45DP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXCAL45DP`" ] pub struct TXCAL45DP_W < 'a > { w : & 'a mut W , } impl < 'a > TXCAL45DP_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `USBPHY_TX_EDGECTRL`" ] pub type USBPHY_TX_EDGECTRL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `USBPHY_TX_EDGECTRL`" ] pub struct USBPHY_TX_EDGECTRL_W < 'a > { w : & 'a mut W , } impl < 'a > USBPHY_TX_EDGECTRL_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 << 26 ) ) | ( ( ( value as u32 ) & 0x07 ) << 26 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Decode to trim the nominal 17" ] # [ inline ( always ) ] pub fn d_cal ( & self ) -> D_CAL_R { D_CAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Decode to trim the nominal 45ohm series termination resistance to the USB_DM output pin" ] # [ inline ( always ) ] pub fn txcal45dm ( & self ) -> TXCAL45DM_R { TXCAL45DM_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Decode to trim the nominal 45ohm series termination resistance to the USB_DP output pin" ] # [ inline ( always ) ] pub fn txcal45dp ( & self ) -> TXCAL45DP_R { TXCAL45DP_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bits 26:28 - Controls the edge-rate of the current sensing transistors used in HS transmit" ] # [ inline ( always ) ] pub fn usbphy_tx_edgectrl ( & self ) -> USBPHY_TX_EDGECTRL_R { USBPHY_TX_EDGECTRL_R :: new ( ( ( self . bits >> 26 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Decode to trim the nominal 17" ] # [ inline ( always ) ] pub fn d_cal ( & mut self ) -> D_CAL_W { D_CAL_W { w : self } } # [ doc = "Bits 8:11 - Decode to trim the nominal 45ohm series termination resistance to the USB_DM output pin" ] # [ inline ( always ) ] pub fn txcal45dm ( & mut self ) -> TXCAL45DM_W { TXCAL45DM_W { w : self } } # [ doc = "Bits 16:19 - Decode to trim the nominal 45ohm series termination resistance to the USB_DP output pin" ] # [ inline ( always ) ] pub fn txcal45dp ( & mut self ) -> TXCAL45DP_W { TXCAL45DP_W { w : self } } # [ doc = "Bits 26:28 - Controls the edge-rate of the current sensing transistors used in HS transmit" ] # [ inline ( always ) ] pub fn usbphy_tx_edgectrl ( & mut self ) -> USBPHY_TX_EDGECTRL_W { USBPHY_TX_EDGECTRL_W { w : self } } } } # [ doc = "USB PHY Transmitter Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tx_clr](tx_clr) module" ] pub type TX_CLR = crate :: Reg < u32 , _TX_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TX_CLR ; # [ doc = "`read()` method returns [tx_clr::R](tx_clr::R) reader structure" ] impl crate :: Readable for TX_CLR { } # [ doc = "`write(|w| ..)` method takes [tx_clr::W](tx_clr::W) writer structure" ] impl crate :: Writable for TX_CLR { } # [ doc = "USB PHY Transmitter Control Register" ] pub mod tx_clr { # [ doc = "Reader of register TX_CLR" ] pub type R = crate :: R < u32 , super :: TX_CLR > ; # [ doc = "Writer for register TX_CLR" ] pub type W = crate :: W < u32 , super :: TX_CLR > ; # [ doc = "Register TX_CLR `reset()`'s with value 0x1006_0607" ] impl crate :: ResetValue for super :: TX_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1006_0607 } } # [ doc = "Decode to trim the nominal 17\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum D_CAL_A { # [ doc = "0: Maximum current, approximately 19% above nominal." ] _0000 , # [ doc = "7: Nominal" ] _0111 , # [ doc = "15: Minimum current, approximately 19% below nominal." ] _1111 } impl From < D_CAL_A > for u8 { # [ inline ( always ) ] fn from ( variant : D_CAL_A ) -> Self { match variant { D_CAL_A :: _0000 => 0 , D_CAL_A :: _0111 => 7 , D_CAL_A :: _1111 => 15 } } } # [ doc = "Reader of field `D_CAL`" ] pub type D_CAL_R = crate :: R < u8 , D_CAL_A > ; impl D_CAL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , D_CAL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( D_CAL_A :: _0000 ) , 7 => Val ( D_CAL_A :: _0111 ) , 15 => Val ( D_CAL_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == D_CAL_A :: _0000 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == D_CAL_A :: _0111 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == D_CAL_A :: _1111 } } # [ doc = "Write proxy for field `D_CAL`" ] pub struct D_CAL_W < 'a > { w : & 'a mut W , } impl < 'a > D_CAL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : D_CAL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Maximum current, approximately 19% above nominal." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _0000 ) } # [ doc = "Nominal" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _0111 ) } # [ doc = "Minimum current, approximately 19% below nominal." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _1111 ) } # [ 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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `TXCAL45DM`" ] pub type TXCAL45DM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXCAL45DM`" ] pub struct TXCAL45DM_W < 'a > { w : & 'a mut W , } impl < 'a > TXCAL45DM_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `TXCAL45DP`" ] pub type TXCAL45DP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXCAL45DP`" ] pub struct TXCAL45DP_W < 'a > { w : & 'a mut W , } impl < 'a > TXCAL45DP_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `USBPHY_TX_EDGECTRL`" ] pub type USBPHY_TX_EDGECTRL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `USBPHY_TX_EDGECTRL`" ] pub struct USBPHY_TX_EDGECTRL_W < 'a > { w : & 'a mut W , } impl < 'a > USBPHY_TX_EDGECTRL_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 << 26 ) ) | ( ( ( value as u32 ) & 0x07 ) << 26 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Decode to trim the nominal 17" ] # [ inline ( always ) ] pub fn d_cal ( & self ) -> D_CAL_R { D_CAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Decode to trim the nominal 45ohm series termination resistance to the USB_DM output pin" ] # [ inline ( always ) ] pub fn txcal45dm ( & self ) -> TXCAL45DM_R { TXCAL45DM_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Decode to trim the nominal 45ohm series termination resistance to the USB_DP output pin" ] # [ inline ( always ) ] pub fn txcal45dp ( & self ) -> TXCAL45DP_R { TXCAL45DP_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bits 26:28 - Controls the edge-rate of the current sensing transistors used in HS transmit" ] # [ inline ( always ) ] pub fn usbphy_tx_edgectrl ( & self ) -> USBPHY_TX_EDGECTRL_R { USBPHY_TX_EDGECTRL_R :: new ( ( ( self . bits >> 26 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Decode to trim the nominal 17" ] # [ inline ( always ) ] pub fn d_cal ( & mut self ) -> D_CAL_W { D_CAL_W { w : self } } # [ doc = "Bits 8:11 - Decode to trim the nominal 45ohm series termination resistance to the USB_DM output pin" ] # [ inline ( always ) ] pub fn txcal45dm ( & mut self ) -> TXCAL45DM_W { TXCAL45DM_W { w : self } } # [ doc = "Bits 16:19 - Decode to trim the nominal 45ohm series termination resistance to the USB_DP output pin" ] # [ inline ( always ) ] pub fn txcal45dp ( & mut self ) -> TXCAL45DP_W { TXCAL45DP_W { w : self } } # [ doc = "Bits 26:28 - Controls the edge-rate of the current sensing transistors used in HS transmit" ] # [ inline ( always ) ] pub fn usbphy_tx_edgectrl ( & mut self ) -> USBPHY_TX_EDGECTRL_W { USBPHY_TX_EDGECTRL_W { w : self } } } } # [ doc = "USB PHY Transmitter Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tx_tog](tx_tog) module" ] pub type TX_TOG = crate :: Reg < u32 , _TX_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TX_TOG ; # [ doc = "`read()` method returns [tx_tog::R](tx_tog::R) reader structure" ] impl crate :: Readable for TX_TOG { } # [ doc = "`write(|w| ..)` method takes [tx_tog::W](tx_tog::W) writer structure" ] impl crate :: Writable for TX_TOG { } # [ doc = "USB PHY Transmitter Control Register" ] pub mod tx_tog { # [ doc = "Reader of register TX_TOG" ] pub type R = crate :: R < u32 , super :: TX_TOG > ; # [ doc = "Writer for register TX_TOG" ] pub type W = crate :: W < u32 , super :: TX_TOG > ; # [ doc = "Register TX_TOG `reset()`'s with value 0x1006_0607" ] impl crate :: ResetValue for super :: TX_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1006_0607 } } # [ doc = "Decode to trim the nominal 17\n\nValue on reset: 7" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum D_CAL_A { # [ doc = "0: Maximum current, approximately 19% above nominal." ] _0000 , # [ doc = "7: Nominal" ] _0111 , # [ doc = "15: Minimum current, approximately 19% below nominal." ] _1111 } impl From < D_CAL_A > for u8 { # [ inline ( always ) ] fn from ( variant : D_CAL_A ) -> Self { match variant { D_CAL_A :: _0000 => 0 , D_CAL_A :: _0111 => 7 , D_CAL_A :: _1111 => 15 } } } # [ doc = "Reader of field `D_CAL`" ] pub type D_CAL_R = crate :: R < u8 , D_CAL_A > ; impl D_CAL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , D_CAL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( D_CAL_A :: _0000 ) , 7 => Val ( D_CAL_A :: _0111 ) , 15 => Val ( D_CAL_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == D_CAL_A :: _0000 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == D_CAL_A :: _0111 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == D_CAL_A :: _1111 } } # [ doc = "Write proxy for field `D_CAL`" ] pub struct D_CAL_W < 'a > { w : & 'a mut W , } impl < 'a > D_CAL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : D_CAL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Maximum current, approximately 19% above nominal." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _0000 ) } # [ doc = "Nominal" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _0111 ) } # [ doc = "Minimum current, approximately 19% below nominal." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( D_CAL_A :: _1111 ) } # [ 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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `TXCAL45DM`" ] pub type TXCAL45DM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXCAL45DM`" ] pub struct TXCAL45DM_W < 'a > { w : & 'a mut W , } impl < 'a > TXCAL45DM_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `TXCAL45DP`" ] pub type TXCAL45DP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TXCAL45DP`" ] pub struct TXCAL45DP_W < 'a > { w : & 'a mut W , } impl < 'a > TXCAL45DP_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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Reader of field `USBPHY_TX_EDGECTRL`" ] pub type USBPHY_TX_EDGECTRL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `USBPHY_TX_EDGECTRL`" ] pub struct USBPHY_TX_EDGECTRL_W < 'a > { w : & 'a mut W , } impl < 'a > USBPHY_TX_EDGECTRL_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 << 26 ) ) | ( ( ( value as u32 ) & 0x07 ) << 26 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Decode to trim the nominal 17" ] # [ inline ( always ) ] pub fn d_cal ( & self ) -> D_CAL_R { D_CAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 8:11 - Decode to trim the nominal 45ohm series termination resistance to the USB_DM output pin" ] # [ inline ( always ) ] pub fn txcal45dm ( & self ) -> TXCAL45DM_R { TXCAL45DM_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bits 16:19 - Decode to trim the nominal 45ohm series termination resistance to the USB_DP output pin" ] # [ inline ( always ) ] pub fn txcal45dp ( & self ) -> TXCAL45DP_R { TXCAL45DP_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bits 26:28 - Controls the edge-rate of the current sensing transistors used in HS transmit" ] # [ inline ( always ) ] pub fn usbphy_tx_edgectrl ( & self ) -> USBPHY_TX_EDGECTRL_R { USBPHY_TX_EDGECTRL_R :: new ( ( ( self . bits >> 26 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Decode to trim the nominal 17" ] # [ inline ( always ) ] pub fn d_cal ( & mut self ) -> D_CAL_W { D_CAL_W { w : self } } # [ doc = "Bits 8:11 - Decode to trim the nominal 45ohm series termination resistance to the USB_DM output pin" ] # [ inline ( always ) ] pub fn txcal45dm ( & mut self ) -> TXCAL45DM_W { TXCAL45DM_W { w : self } } # [ doc = "Bits 16:19 - Decode to trim the nominal 45ohm series termination resistance to the USB_DP output pin" ] # [ inline ( always ) ] pub fn txcal45dp ( & mut self ) -> TXCAL45DP_W { TXCAL45DP_W { w : self } } # [ doc = "Bits 26:28 - Controls the edge-rate of the current sensing transistors used in HS transmit" ] # [ inline ( always ) ] pub fn usbphy_tx_edgectrl ( & mut self ) -> USBPHY_TX_EDGECTRL_W { USBPHY_TX_EDGECTRL_W { w : self } } } } # [ doc = "USB PHY Receiver Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rx](rx) module" ] pub type RX = crate :: Reg < u32 , _RX > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RX ; # [ doc = "`read()` method returns [rx::R](rx::R) reader structure" ] impl crate :: Readable for RX { } # [ doc = "`write(|w| ..)` method takes [rx::W](rx::W) writer structure" ] impl crate :: Writable for RX { } # [ doc = "USB PHY Receiver Control Register" ] pub mod rx { # [ doc = "Reader of register RX" ] pub type R = crate :: R < u32 , super :: RX > ; # [ doc = "Writer for register RX" ] pub type W = crate :: W < u32 , super :: RX > ; # [ doc = "Register RX `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RX { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "The ENVADJ field adjusts the trip point for the envelope detector\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENVADJ_A { # [ doc = "0: Trip-Level Voltage is 0.1000 V" ] _000 , # [ doc = "1: Trip-Level Voltage is 0.1125 V" ] _001 , # [ doc = "2: Trip-Level Voltage is 0.1250 V" ] _010 , # [ doc = "3: Trip-Level Voltage is 0.0875 V" ] _011 } impl From < ENVADJ_A > for u8 { # [ inline ( always ) ] fn from ( variant : ENVADJ_A ) -> Self { match variant { ENVADJ_A :: _000 => 0 , ENVADJ_A :: _001 => 1 , ENVADJ_A :: _010 => 2 , ENVADJ_A :: _011 => 3 } } } # [ doc = "Reader of field `ENVADJ`" ] pub type ENVADJ_R = crate :: R < u8 , ENVADJ_A > ; impl ENVADJ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ENVADJ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ENVADJ_A :: _000 ) , 1 => Val ( ENVADJ_A :: _001 ) , 2 => Val ( ENVADJ_A :: _010 ) , 3 => Val ( ENVADJ_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == ENVADJ_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == ENVADJ_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == ENVADJ_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == ENVADJ_A :: _011 } } # [ doc = "Write proxy for field `ENVADJ`" ] pub struct ENVADJ_W < 'a > { w : & 'a mut W , } impl < 'a > ENVADJ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENVADJ_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Trip-Level Voltage is 0.1000 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _000 ) } # [ doc = "Trip-Level Voltage is 0.1125 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _001 ) } # [ doc = "Trip-Level Voltage is 0.1250 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _010 ) } # [ doc = "Trip-Level Voltage is 0.0875 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _011 ) } # [ 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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "The DISCONADJ field adjusts the trip point for the disconnect detector.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISCONADJ_A { # [ doc = "0: Trip-Level Voltage is 0.56875 V" ] _000 , # [ doc = "1: Trip-Level Voltage is 0.55000 V" ] _001 , # [ doc = "2: Trip-Level Voltage is 0.58125 V" ] _010 , # [ doc = "3: Trip-Level Voltage is 0.60000 V" ] _011 } impl From < DISCONADJ_A > for u8 { # [ inline ( always ) ] fn from ( variant : DISCONADJ_A ) -> Self { match variant { DISCONADJ_A :: _000 => 0 , DISCONADJ_A :: _001 => 1 , DISCONADJ_A :: _010 => 2 , DISCONADJ_A :: _011 => 3 } } } # [ doc = "Reader of field `DISCONADJ`" ] pub type DISCONADJ_R = crate :: R < u8 , DISCONADJ_A > ; impl DISCONADJ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DISCONADJ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DISCONADJ_A :: _000 ) , 1 => Val ( DISCONADJ_A :: _001 ) , 2 => Val ( DISCONADJ_A :: _010 ) , 3 => Val ( DISCONADJ_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == DISCONADJ_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == DISCONADJ_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == DISCONADJ_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == DISCONADJ_A :: _011 } } # [ doc = "Write proxy for field `DISCONADJ`" ] pub struct DISCONADJ_W < 'a > { w : & 'a mut W , } impl < 'a > DISCONADJ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISCONADJ_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Trip-Level Voltage is 0.56875 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _000 ) } # [ doc = "Trip-Level Voltage is 0.55000 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _001 ) } # [ doc = "Trip-Level Voltage is 0.58125 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _010 ) } # [ doc = "Trip-Level Voltage is 0.60000 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _011 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x07 ) << 4 ) ; self . w } } # [ doc = "This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDBYPASS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver" ] _1 } impl From < RXDBYPASS_A > for bool { # [ inline ( always ) ] fn from ( variant : RXDBYPASS_A ) -> Self { match variant { RXDBYPASS_A :: _0 => false , RXDBYPASS_A :: _1 => true } } } # [ doc = "Reader of field `RXDBYPASS`" ] pub type RXDBYPASS_R = crate :: R < bool , RXDBYPASS_A > ; impl RXDBYPASS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXDBYPASS_A { match self . bits { false => RXDBYPASS_A :: _0 , true => RXDBYPASS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXDBYPASS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXDBYPASS_A :: _1 } } # [ doc = "Write proxy for field `RXDBYPASS`" ] pub struct RXDBYPASS_W < 'a > { w : & 'a mut W , } impl < 'a > RXDBYPASS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXDBYPASS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXDBYPASS_A :: _0 ) } # [ doc = "Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXDBYPASS_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - The ENVADJ field adjusts the trip point for the envelope detector" ] # [ inline ( always ) ] pub fn envadj ( & self ) -> ENVADJ_R { ENVADJ_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 4:6 - The DISCONADJ field adjusts the trip point for the disconnect detector." ] # [ inline ( always ) ] pub fn disconadj ( & self ) -> DISCONADJ_R { DISCONADJ_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 22 - This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver" ] # [ inline ( always ) ] pub fn rxdbypass ( & self ) -> RXDBYPASS_R { RXDBYPASS_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - The ENVADJ field adjusts the trip point for the envelope detector" ] # [ inline ( always ) ] pub fn envadj ( & mut self ) -> ENVADJ_W { ENVADJ_W { w : self } } # [ doc = "Bits 4:6 - The DISCONADJ field adjusts the trip point for the disconnect detector." ] # [ inline ( always ) ] pub fn disconadj ( & mut self ) -> DISCONADJ_W { DISCONADJ_W { w : self } } # [ doc = "Bit 22 - This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver" ] # [ inline ( always ) ] pub fn rxdbypass ( & mut self ) -> RXDBYPASS_W { RXDBYPASS_W { w : self } } } } # [ doc = "USB PHY Receiver Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rx_set](rx_set) module" ] pub type RX_SET = crate :: Reg < u32 , _RX_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RX_SET ; # [ doc = "`read()` method returns [rx_set::R](rx_set::R) reader structure" ] impl crate :: Readable for RX_SET { } # [ doc = "`write(|w| ..)` method takes [rx_set::W](rx_set::W) writer structure" ] impl crate :: Writable for RX_SET { } # [ doc = "USB PHY Receiver Control Register" ] pub mod rx_set { # [ doc = "Reader of register RX_SET" ] pub type R = crate :: R < u32 , super :: RX_SET > ; # [ doc = "Writer for register RX_SET" ] pub type W = crate :: W < u32 , super :: RX_SET > ; # [ doc = "Register RX_SET `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RX_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "The ENVADJ field adjusts the trip point for the envelope detector\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENVADJ_A { # [ doc = "0: Trip-Level Voltage is 0.1000 V" ] _000 , # [ doc = "1: Trip-Level Voltage is 0.1125 V" ] _001 , # [ doc = "2: Trip-Level Voltage is 0.1250 V" ] _010 , # [ doc = "3: Trip-Level Voltage is 0.0875 V" ] _011 } impl From < ENVADJ_A > for u8 { # [ inline ( always ) ] fn from ( variant : ENVADJ_A ) -> Self { match variant { ENVADJ_A :: _000 => 0 , ENVADJ_A :: _001 => 1 , ENVADJ_A :: _010 => 2 , ENVADJ_A :: _011 => 3 } } } # [ doc = "Reader of field `ENVADJ`" ] pub type ENVADJ_R = crate :: R < u8 , ENVADJ_A > ; impl ENVADJ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ENVADJ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ENVADJ_A :: _000 ) , 1 => Val ( ENVADJ_A :: _001 ) , 2 => Val ( ENVADJ_A :: _010 ) , 3 => Val ( ENVADJ_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == ENVADJ_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == ENVADJ_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == ENVADJ_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == ENVADJ_A :: _011 } } # [ doc = "Write proxy for field `ENVADJ`" ] pub struct ENVADJ_W < 'a > { w : & 'a mut W , } impl < 'a > ENVADJ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENVADJ_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Trip-Level Voltage is 0.1000 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _000 ) } # [ doc = "Trip-Level Voltage is 0.1125 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _001 ) } # [ doc = "Trip-Level Voltage is 0.1250 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _010 ) } # [ doc = "Trip-Level Voltage is 0.0875 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _011 ) } # [ 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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "The DISCONADJ field adjusts the trip point for the disconnect detector.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISCONADJ_A { # [ doc = "0: Trip-Level Voltage is 0.56875 V" ] _000 , # [ doc = "1: Trip-Level Voltage is 0.55000 V" ] _001 , # [ doc = "2: Trip-Level Voltage is 0.58125 V" ] _010 , # [ doc = "3: Trip-Level Voltage is 0.60000 V" ] _011 } impl From < DISCONADJ_A > for u8 { # [ inline ( always ) ] fn from ( variant : DISCONADJ_A ) -> Self { match variant { DISCONADJ_A :: _000 => 0 , DISCONADJ_A :: _001 => 1 , DISCONADJ_A :: _010 => 2 , DISCONADJ_A :: _011 => 3 } } } # [ doc = "Reader of field `DISCONADJ`" ] pub type DISCONADJ_R = crate :: R < u8 , DISCONADJ_A > ; impl DISCONADJ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DISCONADJ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DISCONADJ_A :: _000 ) , 1 => Val ( DISCONADJ_A :: _001 ) , 2 => Val ( DISCONADJ_A :: _010 ) , 3 => Val ( DISCONADJ_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == DISCONADJ_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == DISCONADJ_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == DISCONADJ_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == DISCONADJ_A :: _011 } } # [ doc = "Write proxy for field `DISCONADJ`" ] pub struct DISCONADJ_W < 'a > { w : & 'a mut W , } impl < 'a > DISCONADJ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISCONADJ_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Trip-Level Voltage is 0.56875 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _000 ) } # [ doc = "Trip-Level Voltage is 0.55000 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _001 ) } # [ doc = "Trip-Level Voltage is 0.58125 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _010 ) } # [ doc = "Trip-Level Voltage is 0.60000 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _011 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x07 ) << 4 ) ; self . w } } # [ doc = "This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDBYPASS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver" ] _1 } impl From < RXDBYPASS_A > for bool { # [ inline ( always ) ] fn from ( variant : RXDBYPASS_A ) -> Self { match variant { RXDBYPASS_A :: _0 => false , RXDBYPASS_A :: _1 => true } } } # [ doc = "Reader of field `RXDBYPASS`" ] pub type RXDBYPASS_R = crate :: R < bool , RXDBYPASS_A > ; impl RXDBYPASS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXDBYPASS_A { match self . bits { false => RXDBYPASS_A :: _0 , true => RXDBYPASS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXDBYPASS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXDBYPASS_A :: _1 } } # [ doc = "Write proxy for field `RXDBYPASS`" ] pub struct RXDBYPASS_W < 'a > { w : & 'a mut W , } impl < 'a > RXDBYPASS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXDBYPASS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXDBYPASS_A :: _0 ) } # [ doc = "Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXDBYPASS_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - The ENVADJ field adjusts the trip point for the envelope detector" ] # [ inline ( always ) ] pub fn envadj ( & self ) -> ENVADJ_R { ENVADJ_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 4:6 - The DISCONADJ field adjusts the trip point for the disconnect detector." ] # [ inline ( always ) ] pub fn disconadj ( & self ) -> DISCONADJ_R { DISCONADJ_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 22 - This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver" ] # [ inline ( always ) ] pub fn rxdbypass ( & self ) -> RXDBYPASS_R { RXDBYPASS_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - The ENVADJ field adjusts the trip point for the envelope detector" ] # [ inline ( always ) ] pub fn envadj ( & mut self ) -> ENVADJ_W { ENVADJ_W { w : self } } # [ doc = "Bits 4:6 - The DISCONADJ field adjusts the trip point for the disconnect detector." ] # [ inline ( always ) ] pub fn disconadj ( & mut self ) -> DISCONADJ_W { DISCONADJ_W { w : self } } # [ doc = "Bit 22 - This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver" ] # [ inline ( always ) ] pub fn rxdbypass ( & mut self ) -> RXDBYPASS_W { RXDBYPASS_W { w : self } } } } # [ doc = "USB PHY Receiver Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rx_clr](rx_clr) module" ] pub type RX_CLR = crate :: Reg < u32 , _RX_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RX_CLR ; # [ doc = "`read()` method returns [rx_clr::R](rx_clr::R) reader structure" ] impl crate :: Readable for RX_CLR { } # [ doc = "`write(|w| ..)` method takes [rx_clr::W](rx_clr::W) writer structure" ] impl crate :: Writable for RX_CLR { } # [ doc = "USB PHY Receiver Control Register" ] pub mod rx_clr { # [ doc = "Reader of register RX_CLR" ] pub type R = crate :: R < u32 , super :: RX_CLR > ; # [ doc = "Writer for register RX_CLR" ] pub type W = crate :: W < u32 , super :: RX_CLR > ; # [ doc = "Register RX_CLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RX_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "The ENVADJ field adjusts the trip point for the envelope detector\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENVADJ_A { # [ doc = "0: Trip-Level Voltage is 0.1000 V" ] _000 , # [ doc = "1: Trip-Level Voltage is 0.1125 V" ] _001 , # [ doc = "2: Trip-Level Voltage is 0.1250 V" ] _010 , # [ doc = "3: Trip-Level Voltage is 0.0875 V" ] _011 } impl From < ENVADJ_A > for u8 { # [ inline ( always ) ] fn from ( variant : ENVADJ_A ) -> Self { match variant { ENVADJ_A :: _000 => 0 , ENVADJ_A :: _001 => 1 , ENVADJ_A :: _010 => 2 , ENVADJ_A :: _011 => 3 } } } # [ doc = "Reader of field `ENVADJ`" ] pub type ENVADJ_R = crate :: R < u8 , ENVADJ_A > ; impl ENVADJ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ENVADJ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ENVADJ_A :: _000 ) , 1 => Val ( ENVADJ_A :: _001 ) , 2 => Val ( ENVADJ_A :: _010 ) , 3 => Val ( ENVADJ_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == ENVADJ_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == ENVADJ_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == ENVADJ_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == ENVADJ_A :: _011 } } # [ doc = "Write proxy for field `ENVADJ`" ] pub struct ENVADJ_W < 'a > { w : & 'a mut W , } impl < 'a > ENVADJ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENVADJ_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Trip-Level Voltage is 0.1000 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _000 ) } # [ doc = "Trip-Level Voltage is 0.1125 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _001 ) } # [ doc = "Trip-Level Voltage is 0.1250 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _010 ) } # [ doc = "Trip-Level Voltage is 0.0875 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _011 ) } # [ 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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "The DISCONADJ field adjusts the trip point for the disconnect detector.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISCONADJ_A { # [ doc = "0: Trip-Level Voltage is 0.56875 V" ] _000 , # [ doc = "1: Trip-Level Voltage is 0.55000 V" ] _001 , # [ doc = "2: Trip-Level Voltage is 0.58125 V" ] _010 , # [ doc = "3: Trip-Level Voltage is 0.60000 V" ] _011 } impl From < DISCONADJ_A > for u8 { # [ inline ( always ) ] fn from ( variant : DISCONADJ_A ) -> Self { match variant { DISCONADJ_A :: _000 => 0 , DISCONADJ_A :: _001 => 1 , DISCONADJ_A :: _010 => 2 , DISCONADJ_A :: _011 => 3 } } } # [ doc = "Reader of field `DISCONADJ`" ] pub type DISCONADJ_R = crate :: R < u8 , DISCONADJ_A > ; impl DISCONADJ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DISCONADJ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DISCONADJ_A :: _000 ) , 1 => Val ( DISCONADJ_A :: _001 ) , 2 => Val ( DISCONADJ_A :: _010 ) , 3 => Val ( DISCONADJ_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == DISCONADJ_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == DISCONADJ_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == DISCONADJ_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == DISCONADJ_A :: _011 } } # [ doc = "Write proxy for field `DISCONADJ`" ] pub struct DISCONADJ_W < 'a > { w : & 'a mut W , } impl < 'a > DISCONADJ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISCONADJ_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Trip-Level Voltage is 0.56875 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _000 ) } # [ doc = "Trip-Level Voltage is 0.55000 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _001 ) } # [ doc = "Trip-Level Voltage is 0.58125 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _010 ) } # [ doc = "Trip-Level Voltage is 0.60000 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _011 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x07 ) << 4 ) ; self . w } } # [ doc = "This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDBYPASS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver" ] _1 } impl From < RXDBYPASS_A > for bool { # [ inline ( always ) ] fn from ( variant : RXDBYPASS_A ) -> Self { match variant { RXDBYPASS_A :: _0 => false , RXDBYPASS_A :: _1 => true } } } # [ doc = "Reader of field `RXDBYPASS`" ] pub type RXDBYPASS_R = crate :: R < bool , RXDBYPASS_A > ; impl RXDBYPASS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXDBYPASS_A { match self . bits { false => RXDBYPASS_A :: _0 , true => RXDBYPASS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXDBYPASS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXDBYPASS_A :: _1 } } # [ doc = "Write proxy for field `RXDBYPASS`" ] pub struct RXDBYPASS_W < 'a > { w : & 'a mut W , } impl < 'a > RXDBYPASS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXDBYPASS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXDBYPASS_A :: _0 ) } # [ doc = "Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXDBYPASS_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - The ENVADJ field adjusts the trip point for the envelope detector" ] # [ inline ( always ) ] pub fn envadj ( & self ) -> ENVADJ_R { ENVADJ_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 4:6 - The DISCONADJ field adjusts the trip point for the disconnect detector." ] # [ inline ( always ) ] pub fn disconadj ( & self ) -> DISCONADJ_R { DISCONADJ_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 22 - This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver" ] # [ inline ( always ) ] pub fn rxdbypass ( & self ) -> RXDBYPASS_R { RXDBYPASS_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - The ENVADJ field adjusts the trip point for the envelope detector" ] # [ inline ( always ) ] pub fn envadj ( & mut self ) -> ENVADJ_W { ENVADJ_W { w : self } } # [ doc = "Bits 4:6 - The DISCONADJ field adjusts the trip point for the disconnect detector." ] # [ inline ( always ) ] pub fn disconadj ( & mut self ) -> DISCONADJ_W { DISCONADJ_W { w : self } } # [ doc = "Bit 22 - This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver" ] # [ inline ( always ) ] pub fn rxdbypass ( & mut self ) -> RXDBYPASS_W { RXDBYPASS_W { w : self } } } } # [ doc = "USB PHY Receiver Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rx_tog](rx_tog) module" ] pub type RX_TOG = crate :: Reg < u32 , _RX_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RX_TOG ; # [ doc = "`read()` method returns [rx_tog::R](rx_tog::R) reader structure" ] impl crate :: Readable for RX_TOG { } # [ doc = "`write(|w| ..)` method takes [rx_tog::W](rx_tog::W) writer structure" ] impl crate :: Writable for RX_TOG { } # [ doc = "USB PHY Receiver Control Register" ] pub mod rx_tog { # [ doc = "Reader of register RX_TOG" ] pub type R = crate :: R < u32 , super :: RX_TOG > ; # [ doc = "Writer for register RX_TOG" ] pub type W = crate :: W < u32 , super :: RX_TOG > ; # [ doc = "Register RX_TOG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RX_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "The ENVADJ field adjusts the trip point for the envelope detector\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENVADJ_A { # [ doc = "0: Trip-Level Voltage is 0.1000 V" ] _000 , # [ doc = "1: Trip-Level Voltage is 0.1125 V" ] _001 , # [ doc = "2: Trip-Level Voltage is 0.1250 V" ] _010 , # [ doc = "3: Trip-Level Voltage is 0.0875 V" ] _011 } impl From < ENVADJ_A > for u8 { # [ inline ( always ) ] fn from ( variant : ENVADJ_A ) -> Self { match variant { ENVADJ_A :: _000 => 0 , ENVADJ_A :: _001 => 1 , ENVADJ_A :: _010 => 2 , ENVADJ_A :: _011 => 3 } } } # [ doc = "Reader of field `ENVADJ`" ] pub type ENVADJ_R = crate :: R < u8 , ENVADJ_A > ; impl ENVADJ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ENVADJ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ENVADJ_A :: _000 ) , 1 => Val ( ENVADJ_A :: _001 ) , 2 => Val ( ENVADJ_A :: _010 ) , 3 => Val ( ENVADJ_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == ENVADJ_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == ENVADJ_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == ENVADJ_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == ENVADJ_A :: _011 } } # [ doc = "Write proxy for field `ENVADJ`" ] pub struct ENVADJ_W < 'a > { w : & 'a mut W , } impl < 'a > ENVADJ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENVADJ_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Trip-Level Voltage is 0.1000 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _000 ) } # [ doc = "Trip-Level Voltage is 0.1125 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _001 ) } # [ doc = "Trip-Level Voltage is 0.1250 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _010 ) } # [ doc = "Trip-Level Voltage is 0.0875 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( ENVADJ_A :: _011 ) } # [ 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 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "The DISCONADJ field adjusts the trip point for the disconnect detector.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISCONADJ_A { # [ doc = "0: Trip-Level Voltage is 0.56875 V" ] _000 , # [ doc = "1: Trip-Level Voltage is 0.55000 V" ] _001 , # [ doc = "2: Trip-Level Voltage is 0.58125 V" ] _010 , # [ doc = "3: Trip-Level Voltage is 0.60000 V" ] _011 } impl From < DISCONADJ_A > for u8 { # [ inline ( always ) ] fn from ( variant : DISCONADJ_A ) -> Self { match variant { DISCONADJ_A :: _000 => 0 , DISCONADJ_A :: _001 => 1 , DISCONADJ_A :: _010 => 2 , DISCONADJ_A :: _011 => 3 } } } # [ doc = "Reader of field `DISCONADJ`" ] pub type DISCONADJ_R = crate :: R < u8 , DISCONADJ_A > ; impl DISCONADJ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DISCONADJ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DISCONADJ_A :: _000 ) , 1 => Val ( DISCONADJ_A :: _001 ) , 2 => Val ( DISCONADJ_A :: _010 ) , 3 => Val ( DISCONADJ_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == DISCONADJ_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == DISCONADJ_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == DISCONADJ_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == DISCONADJ_A :: _011 } } # [ doc = "Write proxy for field `DISCONADJ`" ] pub struct DISCONADJ_W < 'a > { w : & 'a mut W , } impl < 'a > DISCONADJ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISCONADJ_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Trip-Level Voltage is 0.56875 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _000 ) } # [ doc = "Trip-Level Voltage is 0.55000 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _001 ) } # [ doc = "Trip-Level Voltage is 0.58125 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _010 ) } # [ doc = "Trip-Level Voltage is 0.60000 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( DISCONADJ_A :: _011 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x07 ) << 4 ) ; self . w } } # [ doc = "This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDBYPASS_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver" ] _1 } impl From < RXDBYPASS_A > for bool { # [ inline ( always ) ] fn from ( variant : RXDBYPASS_A ) -> Self { match variant { RXDBYPASS_A :: _0 => false , RXDBYPASS_A :: _1 => true } } } # [ doc = "Reader of field `RXDBYPASS`" ] pub type RXDBYPASS_R = crate :: R < bool , RXDBYPASS_A > ; impl RXDBYPASS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXDBYPASS_A { match self . bits { false => RXDBYPASS_A :: _0 , true => RXDBYPASS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXDBYPASS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXDBYPASS_A :: _1 } } # [ doc = "Write proxy for field `RXDBYPASS`" ] pub struct RXDBYPASS_W < 'a > { w : & 'a mut W , } impl < 'a > RXDBYPASS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXDBYPASS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXDBYPASS_A :: _0 ) } # [ doc = "Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXDBYPASS_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - The ENVADJ field adjusts the trip point for the envelope detector" ] # [ inline ( always ) ] pub fn envadj ( & self ) -> ENVADJ_R { ENVADJ_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 4:6 - The DISCONADJ field adjusts the trip point for the disconnect detector." ] # [ inline ( always ) ] pub fn disconadj ( & self ) -> DISCONADJ_R { DISCONADJ_R :: new ( ( ( self . bits >> 4 ) & 0x07 ) as u8 ) } # [ doc = "Bit 22 - This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver" ] # [ inline ( always ) ] pub fn rxdbypass ( & self ) -> RXDBYPASS_R { RXDBYPASS_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - The ENVADJ field adjusts the trip point for the envelope detector" ] # [ inline ( always ) ] pub fn envadj ( & mut self ) -> ENVADJ_W { ENVADJ_W { w : self } } # [ doc = "Bits 4:6 - The DISCONADJ field adjusts the trip point for the disconnect detector." ] # [ inline ( always ) ] pub fn disconadj ( & mut self ) -> DISCONADJ_W { DISCONADJ_W { w : self } } # [ doc = "Bit 22 - This test mode is intended for lab use only, replace FS differential receiver with DP single ended receiver" ] # [ inline ( always ) ] pub fn rxdbypass ( & mut self ) -> RXDBYPASS_W { RXDBYPASS_W { w : self } } } } # [ doc = "USB PHY General Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl](ctrl) module" ] pub type CTRL = crate :: Reg < u32 , _CTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL ; # [ doc = "`read()` method returns [ctrl::R](ctrl::R) reader structure" ] impl crate :: Readable for CTRL { } # [ doc = "`write(|w| ..)` method takes [ctrl::W](ctrl::W) writer structure" ] impl crate :: Writable for CTRL { } # [ doc = "USB PHY General Control Register" ] pub mod ctrl { # [ doc = "Reader of register CTRL" ] pub type R = crate :: R < u32 , super :: CTRL > ; # [ doc = "Writer for register CTRL" ] pub type W = crate :: W < u32 , super :: CTRL > ; # [ doc = "Register CTRL `reset()`'s with value 0xc000_0000" ] impl crate :: ResetValue for super :: CTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc000_0000 } } # [ doc = "Reader of field `ENHOSTDISCONDETECT`" ] pub type ENHOSTDISCONDETECT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENHOSTDISCONDETECT`" ] pub struct ENHOSTDISCONDETECT_W < 'a > { w : & 'a mut W , } impl < 'a > ENHOSTDISCONDETECT_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 } } # [ doc = "Reader of field `HOSTDISCONDETECT_IRQ`" ] pub type HOSTDISCONDETECT_IRQ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOSTDISCONDETECT_IRQ`" ] pub struct HOSTDISCONDETECT_IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > HOSTDISCONDETECT_IRQ_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enables non-standard resistive plugged-in detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDEVPLUGINDET_A { # [ doc = "0: Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)" ] _0 , # [ doc = "1: Enables 200kohm pullup resistors on USB_DP and USB_DM pins" ] _1 } impl From < ENDEVPLUGINDET_A > for bool { # [ inline ( always ) ] fn from ( variant : ENDEVPLUGINDET_A ) -> Self { match variant { ENDEVPLUGINDET_A :: _0 => false , ENDEVPLUGINDET_A :: _1 => true } } } # [ doc = "Reader of field `ENDEVPLUGINDET`" ] pub type ENDEVPLUGINDET_R = crate :: R < bool , ENDEVPLUGINDET_A > ; impl ENDEVPLUGINDET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENDEVPLUGINDET_A { match self . bits { false => ENDEVPLUGINDET_A :: _0 , true => ENDEVPLUGINDET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENDEVPLUGINDET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENDEVPLUGINDET_A :: _1 } } # [ doc = "Write proxy for field `ENDEVPLUGINDET`" ] pub struct ENDEVPLUGINDET_W < 'a > { w : & 'a mut W , } impl < 'a > ENDEVPLUGINDET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENDEVPLUGINDET_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENDEVPLUGINDET_A :: _0 ) } # [ doc = "Enables 200kohm pullup resistors on USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENDEVPLUGINDET_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `DEVPLUGIN_IRQ`" ] pub type DEVPLUGIN_IRQ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEVPLUGIN_IRQ`" ] pub struct DEVPLUGIN_IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > DEVPLUGIN_IRQ_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `ENUTMILEVEL2`" ] pub type ENUTMILEVEL2_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENUTMILEVEL2`" ] pub struct ENUTMILEVEL2_W < 'a > { w : & 'a mut W , } impl < 'a > ENUTMILEVEL2_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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Reader of field `ENUTMILEVEL3`" ] pub type ENUTMILEVEL3_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENUTMILEVEL3`" ] pub struct ENUTMILEVEL3_W < 'a > { w : & 'a mut W , } impl < 'a > ENUTMILEVEL3_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `AUTORESUME_EN`" ] pub type AUTORESUME_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AUTORESUME_EN`" ] pub struct AUTORESUME_EN_W < 'a > { w : & 'a mut W , } impl < 'a > AUTORESUME_EN_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `ENAUTOCLR_CLKGATE`" ] pub type ENAUTOCLR_CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENAUTOCLR_CLKGATE`" ] pub struct ENAUTOCLR_CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > ENAUTOCLR_CLKGATE_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Reader of field `ENAUTOCLR_PHY_PWD`" ] pub type ENAUTOCLR_PHY_PWD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENAUTOCLR_PHY_PWD`" ] pub struct ENAUTOCLR_PHY_PWD_W < 'a > { w : & 'a mut W , } impl < 'a > ENAUTOCLR_PHY_PWD_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 = "Reader of field `FSDLL_RST_EN`" ] pub type FSDLL_RST_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FSDLL_RST_EN`" ] pub struct FSDLL_RST_EN_W < 'a > { w : & 'a mut W , } impl < 'a > FSDLL_RST_EN_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 = "Reader of field `OTG_ID_VALUE`" ] pub type OTG_ID_VALUE_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `HOST_FORCE_LS_SE0`" ] pub type HOST_FORCE_LS_SE0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOST_FORCE_LS_SE0`" ] pub struct HOST_FORCE_LS_SE0_W < 'a > { w : & 'a mut W , } impl < 'a > HOST_FORCE_LS_SE0_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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Reader of field `UTMI_SUSPENDM`" ] pub type UTMI_SUSPENDM_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `CLKGATE`" ] pub type CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CLKGATE`" ] pub struct CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKGATE_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Reader of field `SFTRST`" ] pub type SFTRST_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SFTRST`" ] pub struct SFTRST_W < 'a > { w : & 'a mut W , } impl < 'a > SFTRST_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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 1 - For host mode, enables high-speed disconnect detector" ] # [ inline ( always ) ] pub fn enhostdiscondetect ( & self ) -> ENHOSTDISCONDETECT_R { ENHOSTDISCONDETECT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Indicates that the device has disconnected in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_irq ( & self ) -> HOSTDISCONDETECT_IRQ_R { HOSTDISCONDETECT_IRQ_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enables non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn endevplugindet ( & self ) -> ENDEVPLUGINDET_R { ENDEVPLUGINDET_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Indicates that the device is connected" ] # [ inline ( always ) ] pub fn devplugin_irq ( & self ) -> DEVPLUGIN_IRQ_R { DEVPLUGIN_IRQ_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Enables UTMI+ Level 2 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel2 ( & self ) -> ENUTMILEVEL2_R { ENUTMILEVEL2_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Enables UTMI+ Level 3 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel3 ( & self ) -> ENUTMILEVEL3_R { ENUTMILEVEL3_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Enable the auto resume feature, when set, HW will use 32KHz clock to send Resume to respond to the device remote wakeup(for host mode only)" ] # [ inline ( always ) ] pub fn autoresume_en ( & self ) -> AUTORESUME_EN_R { AUTORESUME_EN_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Enables the feature to auto-clear the CLKGATE bit if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_clkgate ( & self ) -> ENAUTOCLR_CLKGATE_R { ENAUTOCLR_CLKGATE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enables the feature to auto-clear the PWD register bits in USBPHY_PWD if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_phy_pwd ( & self ) -> ENAUTOCLR_PHY_PWD_R { ENAUTOCLR_PHY_PWD_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Enables the feature to reset the FSDLL lock detection logic at the end of each TX packet." ] # [ inline ( always ) ] pub fn fsdll_rst_en ( & self ) -> FSDLL_RST_EN_R { FSDLL_RST_EN_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Indicates the results of USB_ID pin while monitoring the cable plugged into the Micro- or Mini-AB receptacle" ] # [ inline ( always ) ] pub fn otg_id_value ( & self ) -> OTG_ID_VALUE_R { OTG_ID_VALUE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Forces the next FS packet that is transmitted to have a EOP with low-speed timing" ] # [ inline ( always ) ] pub fn host_force_ls_se0 ( & self ) -> HOST_FORCE_LS_SE0_R { HOST_FORCE_LS_SE0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Used by the PHY to indicate a powered-down state" ] # [ inline ( always ) ] pub fn utmi_suspendm ( & self ) -> UTMI_SUSPENDM_R { UTMI_SUSPENDM_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Gate UTMI Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & self ) -> CLKGATE_R { CLKGATE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Writing a 1 to this bit will soft-reset the USBPHY_PWD, USBPHY_TX, USBPHY_RX, and USBPHY_CTRL registers" ] # [ inline ( always ) ] pub fn sftrst ( & self ) -> SFTRST_R { SFTRST_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - For host mode, enables high-speed disconnect detector" ] # [ inline ( always ) ] pub fn enhostdiscondetect ( & mut self ) -> ENHOSTDISCONDETECT_W { ENHOSTDISCONDETECT_W { w : self } } # [ doc = "Bit 3 - Indicates that the device has disconnected in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_irq ( & mut self ) -> HOSTDISCONDETECT_IRQ_W { HOSTDISCONDETECT_IRQ_W { w : self } } # [ doc = "Bit 4 - Enables non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn endevplugindet ( & mut self ) -> ENDEVPLUGINDET_W { ENDEVPLUGINDET_W { w : self } } # [ doc = "Bit 12 - Indicates that the device is connected" ] # [ inline ( always ) ] pub fn devplugin_irq ( & mut self ) -> DEVPLUGIN_IRQ_W { DEVPLUGIN_IRQ_W { w : self } } # [ doc = "Bit 14 - Enables UTMI+ Level 2 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel2 ( & mut self ) -> ENUTMILEVEL2_W { ENUTMILEVEL2_W { w : self } } # [ doc = "Bit 15 - Enables UTMI+ Level 3 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel3 ( & mut self ) -> ENUTMILEVEL3_W { ENUTMILEVEL3_W { w : self } } # [ doc = "Bit 18 - Enable the auto resume feature, when set, HW will use 32KHz clock to send Resume to respond to the device remote wakeup(for host mode only)" ] # [ inline ( always ) ] pub fn autoresume_en ( & mut self ) -> AUTORESUME_EN_W { AUTORESUME_EN_W { w : self } } # [ doc = "Bit 19 - Enables the feature to auto-clear the CLKGATE bit if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_clkgate ( & mut self ) -> ENAUTOCLR_CLKGATE_W { ENAUTOCLR_CLKGATE_W { w : self } } # [ doc = "Bit 20 - Enables the feature to auto-clear the PWD register bits in USBPHY_PWD if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_phy_pwd ( & mut self ) -> ENAUTOCLR_PHY_PWD_W { ENAUTOCLR_PHY_PWD_W { w : self } } # [ doc = "Bit 24 - Enables the feature to reset the FSDLL lock detection logic at the end of each TX packet." ] # [ inline ( always ) ] pub fn fsdll_rst_en ( & mut self ) -> FSDLL_RST_EN_W { FSDLL_RST_EN_W { w : self } } # [ doc = "Bit 28 - Forces the next FS packet that is transmitted to have a EOP with low-speed timing" ] # [ inline ( always ) ] pub fn host_force_ls_se0 ( & mut self ) -> HOST_FORCE_LS_SE0_W { HOST_FORCE_LS_SE0_W { w : self } } # [ doc = "Bit 30 - Gate UTMI Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & mut self ) -> CLKGATE_W { CLKGATE_W { w : self } } # [ doc = "Bit 31 - Writing a 1 to this bit will soft-reset the USBPHY_PWD, USBPHY_TX, USBPHY_RX, and USBPHY_CTRL registers" ] # [ inline ( always ) ] pub fn sftrst ( & mut self ) -> SFTRST_W { SFTRST_W { w : self } } } } # [ doc = "USB PHY General Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl_set](ctrl_set) module" ] pub type CTRL_SET = crate :: Reg < u32 , _CTRL_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL_SET ; # [ doc = "`read()` method returns [ctrl_set::R](ctrl_set::R) reader structure" ] impl crate :: Readable for CTRL_SET { } # [ doc = "`write(|w| ..)` method takes [ctrl_set::W](ctrl_set::W) writer structure" ] impl crate :: Writable for CTRL_SET { } # [ doc = "USB PHY General Control Register" ] pub mod ctrl_set { # [ doc = "Reader of register CTRL_SET" ] pub type R = crate :: R < u32 , super :: CTRL_SET > ; # [ doc = "Writer for register CTRL_SET" ] pub type W = crate :: W < u32 , super :: CTRL_SET > ; # [ doc = "Register CTRL_SET `reset()`'s with value 0xc000_0000" ] impl crate :: ResetValue for super :: CTRL_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc000_0000 } } # [ doc = "Reader of field `ENHOSTDISCONDETECT`" ] pub type ENHOSTDISCONDETECT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENHOSTDISCONDETECT`" ] pub struct ENHOSTDISCONDETECT_W < 'a > { w : & 'a mut W , } impl < 'a > ENHOSTDISCONDETECT_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 } } # [ doc = "Reader of field `HOSTDISCONDETECT_IRQ`" ] pub type HOSTDISCONDETECT_IRQ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOSTDISCONDETECT_IRQ`" ] pub struct HOSTDISCONDETECT_IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > HOSTDISCONDETECT_IRQ_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enables non-standard resistive plugged-in detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDEVPLUGINDET_A { # [ doc = "0: Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)" ] _0 , # [ doc = "1: Enables 200kohm pullup resistors on USB_DP and USB_DM pins" ] _1 } impl From < ENDEVPLUGINDET_A > for bool { # [ inline ( always ) ] fn from ( variant : ENDEVPLUGINDET_A ) -> Self { match variant { ENDEVPLUGINDET_A :: _0 => false , ENDEVPLUGINDET_A :: _1 => true } } } # [ doc = "Reader of field `ENDEVPLUGINDET`" ] pub type ENDEVPLUGINDET_R = crate :: R < bool , ENDEVPLUGINDET_A > ; impl ENDEVPLUGINDET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENDEVPLUGINDET_A { match self . bits { false => ENDEVPLUGINDET_A :: _0 , true => ENDEVPLUGINDET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENDEVPLUGINDET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENDEVPLUGINDET_A :: _1 } } # [ doc = "Write proxy for field `ENDEVPLUGINDET`" ] pub struct ENDEVPLUGINDET_W < 'a > { w : & 'a mut W , } impl < 'a > ENDEVPLUGINDET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENDEVPLUGINDET_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENDEVPLUGINDET_A :: _0 ) } # [ doc = "Enables 200kohm pullup resistors on USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENDEVPLUGINDET_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `DEVPLUGIN_IRQ`" ] pub type DEVPLUGIN_IRQ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEVPLUGIN_IRQ`" ] pub struct DEVPLUGIN_IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > DEVPLUGIN_IRQ_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `ENUTMILEVEL2`" ] pub type ENUTMILEVEL2_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENUTMILEVEL2`" ] pub struct ENUTMILEVEL2_W < 'a > { w : & 'a mut W , } impl < 'a > ENUTMILEVEL2_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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Reader of field `ENUTMILEVEL3`" ] pub type ENUTMILEVEL3_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENUTMILEVEL3`" ] pub struct ENUTMILEVEL3_W < 'a > { w : & 'a mut W , } impl < 'a > ENUTMILEVEL3_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `AUTORESUME_EN`" ] pub type AUTORESUME_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AUTORESUME_EN`" ] pub struct AUTORESUME_EN_W < 'a > { w : & 'a mut W , } impl < 'a > AUTORESUME_EN_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `ENAUTOCLR_CLKGATE`" ] pub type ENAUTOCLR_CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENAUTOCLR_CLKGATE`" ] pub struct ENAUTOCLR_CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > ENAUTOCLR_CLKGATE_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Reader of field `ENAUTOCLR_PHY_PWD`" ] pub type ENAUTOCLR_PHY_PWD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENAUTOCLR_PHY_PWD`" ] pub struct ENAUTOCLR_PHY_PWD_W < 'a > { w : & 'a mut W , } impl < 'a > ENAUTOCLR_PHY_PWD_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 = "Reader of field `FSDLL_RST_EN`" ] pub type FSDLL_RST_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FSDLL_RST_EN`" ] pub struct FSDLL_RST_EN_W < 'a > { w : & 'a mut W , } impl < 'a > FSDLL_RST_EN_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 = "Reader of field `OTG_ID_VALUE`" ] pub type OTG_ID_VALUE_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `HOST_FORCE_LS_SE0`" ] pub type HOST_FORCE_LS_SE0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOST_FORCE_LS_SE0`" ] pub struct HOST_FORCE_LS_SE0_W < 'a > { w : & 'a mut W , } impl < 'a > HOST_FORCE_LS_SE0_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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Reader of field `UTMI_SUSPENDM`" ] pub type UTMI_SUSPENDM_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `CLKGATE`" ] pub type CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CLKGATE`" ] pub struct CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKGATE_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Reader of field `SFTRST`" ] pub type SFTRST_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SFTRST`" ] pub struct SFTRST_W < 'a > { w : & 'a mut W , } impl < 'a > SFTRST_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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 1 - For host mode, enables high-speed disconnect detector" ] # [ inline ( always ) ] pub fn enhostdiscondetect ( & self ) -> ENHOSTDISCONDETECT_R { ENHOSTDISCONDETECT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Indicates that the device has disconnected in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_irq ( & self ) -> HOSTDISCONDETECT_IRQ_R { HOSTDISCONDETECT_IRQ_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enables non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn endevplugindet ( & self ) -> ENDEVPLUGINDET_R { ENDEVPLUGINDET_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Indicates that the device is connected" ] # [ inline ( always ) ] pub fn devplugin_irq ( & self ) -> DEVPLUGIN_IRQ_R { DEVPLUGIN_IRQ_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Enables UTMI+ Level 2 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel2 ( & self ) -> ENUTMILEVEL2_R { ENUTMILEVEL2_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Enables UTMI+ Level 3 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel3 ( & self ) -> ENUTMILEVEL3_R { ENUTMILEVEL3_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Enable the auto resume feature, when set, HW will use 32KHz clock to send Resume to respond to the device remote wakeup(for host mode only)" ] # [ inline ( always ) ] pub fn autoresume_en ( & self ) -> AUTORESUME_EN_R { AUTORESUME_EN_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Enables the feature to auto-clear the CLKGATE bit if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_clkgate ( & self ) -> ENAUTOCLR_CLKGATE_R { ENAUTOCLR_CLKGATE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enables the feature to auto-clear the PWD register bits in USBPHY_PWD if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_phy_pwd ( & self ) -> ENAUTOCLR_PHY_PWD_R { ENAUTOCLR_PHY_PWD_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Enables the feature to reset the FSDLL lock detection logic at the end of each TX packet." ] # [ inline ( always ) ] pub fn fsdll_rst_en ( & self ) -> FSDLL_RST_EN_R { FSDLL_RST_EN_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Indicates the results of USB_ID pin while monitoring the cable plugged into the Micro- or Mini-AB receptacle" ] # [ inline ( always ) ] pub fn otg_id_value ( & self ) -> OTG_ID_VALUE_R { OTG_ID_VALUE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Forces the next FS packet that is transmitted to have a EOP with low-speed timing" ] # [ inline ( always ) ] pub fn host_force_ls_se0 ( & self ) -> HOST_FORCE_LS_SE0_R { HOST_FORCE_LS_SE0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Used by the PHY to indicate a powered-down state" ] # [ inline ( always ) ] pub fn utmi_suspendm ( & self ) -> UTMI_SUSPENDM_R { UTMI_SUSPENDM_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Gate UTMI Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & self ) -> CLKGATE_R { CLKGATE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Writing a 1 to this bit will soft-reset the USBPHY_PWD, USBPHY_TX, USBPHY_RX, and USBPHY_CTRL registers" ] # [ inline ( always ) ] pub fn sftrst ( & self ) -> SFTRST_R { SFTRST_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - For host mode, enables high-speed disconnect detector" ] # [ inline ( always ) ] pub fn enhostdiscondetect ( & mut self ) -> ENHOSTDISCONDETECT_W { ENHOSTDISCONDETECT_W { w : self } } # [ doc = "Bit 3 - Indicates that the device has disconnected in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_irq ( & mut self ) -> HOSTDISCONDETECT_IRQ_W { HOSTDISCONDETECT_IRQ_W { w : self } } # [ doc = "Bit 4 - Enables non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn endevplugindet ( & mut self ) -> ENDEVPLUGINDET_W { ENDEVPLUGINDET_W { w : self } } # [ doc = "Bit 12 - Indicates that the device is connected" ] # [ inline ( always ) ] pub fn devplugin_irq ( & mut self ) -> DEVPLUGIN_IRQ_W { DEVPLUGIN_IRQ_W { w : self } } # [ doc = "Bit 14 - Enables UTMI+ Level 2 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel2 ( & mut self ) -> ENUTMILEVEL2_W { ENUTMILEVEL2_W { w : self } } # [ doc = "Bit 15 - Enables UTMI+ Level 3 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel3 ( & mut self ) -> ENUTMILEVEL3_W { ENUTMILEVEL3_W { w : self } } # [ doc = "Bit 18 - Enable the auto resume feature, when set, HW will use 32KHz clock to send Resume to respond to the device remote wakeup(for host mode only)" ] # [ inline ( always ) ] pub fn autoresume_en ( & mut self ) -> AUTORESUME_EN_W { AUTORESUME_EN_W { w : self } } # [ doc = "Bit 19 - Enables the feature to auto-clear the CLKGATE bit if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_clkgate ( & mut self ) -> ENAUTOCLR_CLKGATE_W { ENAUTOCLR_CLKGATE_W { w : self } } # [ doc = "Bit 20 - Enables the feature to auto-clear the PWD register bits in USBPHY_PWD if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_phy_pwd ( & mut self ) -> ENAUTOCLR_PHY_PWD_W { ENAUTOCLR_PHY_PWD_W { w : self } } # [ doc = "Bit 24 - Enables the feature to reset the FSDLL lock detection logic at the end of each TX packet." ] # [ inline ( always ) ] pub fn fsdll_rst_en ( & mut self ) -> FSDLL_RST_EN_W { FSDLL_RST_EN_W { w : self } } # [ doc = "Bit 28 - Forces the next FS packet that is transmitted to have a EOP with low-speed timing" ] # [ inline ( always ) ] pub fn host_force_ls_se0 ( & mut self ) -> HOST_FORCE_LS_SE0_W { HOST_FORCE_LS_SE0_W { w : self } } # [ doc = "Bit 30 - Gate UTMI Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & mut self ) -> CLKGATE_W { CLKGATE_W { w : self } } # [ doc = "Bit 31 - Writing a 1 to this bit will soft-reset the USBPHY_PWD, USBPHY_TX, USBPHY_RX, and USBPHY_CTRL registers" ] # [ inline ( always ) ] pub fn sftrst ( & mut self ) -> SFTRST_W { SFTRST_W { w : self } } } } # [ doc = "USB PHY General Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl_clr](ctrl_clr) module" ] pub type CTRL_CLR = crate :: Reg < u32 , _CTRL_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL_CLR ; # [ doc = "`read()` method returns [ctrl_clr::R](ctrl_clr::R) reader structure" ] impl crate :: Readable for CTRL_CLR { } # [ doc = "`write(|w| ..)` method takes [ctrl_clr::W](ctrl_clr::W) writer structure" ] impl crate :: Writable for CTRL_CLR { } # [ doc = "USB PHY General Control Register" ] pub mod ctrl_clr { # [ doc = "Reader of register CTRL_CLR" ] pub type R = crate :: R < u32 , super :: CTRL_CLR > ; # [ doc = "Writer for register CTRL_CLR" ] pub type W = crate :: W < u32 , super :: CTRL_CLR > ; # [ doc = "Register CTRL_CLR `reset()`'s with value 0xc000_0000" ] impl crate :: ResetValue for super :: CTRL_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc000_0000 } } # [ doc = "Reader of field `ENHOSTDISCONDETECT`" ] pub type ENHOSTDISCONDETECT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENHOSTDISCONDETECT`" ] pub struct ENHOSTDISCONDETECT_W < 'a > { w : & 'a mut W , } impl < 'a > ENHOSTDISCONDETECT_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 } } # [ doc = "Reader of field `HOSTDISCONDETECT_IRQ`" ] pub type HOSTDISCONDETECT_IRQ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOSTDISCONDETECT_IRQ`" ] pub struct HOSTDISCONDETECT_IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > HOSTDISCONDETECT_IRQ_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enables non-standard resistive plugged-in detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDEVPLUGINDET_A { # [ doc = "0: Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)" ] _0 , # [ doc = "1: Enables 200kohm pullup resistors on USB_DP and USB_DM pins" ] _1 } impl From < ENDEVPLUGINDET_A > for bool { # [ inline ( always ) ] fn from ( variant : ENDEVPLUGINDET_A ) -> Self { match variant { ENDEVPLUGINDET_A :: _0 => false , ENDEVPLUGINDET_A :: _1 => true } } } # [ doc = "Reader of field `ENDEVPLUGINDET`" ] pub type ENDEVPLUGINDET_R = crate :: R < bool , ENDEVPLUGINDET_A > ; impl ENDEVPLUGINDET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENDEVPLUGINDET_A { match self . bits { false => ENDEVPLUGINDET_A :: _0 , true => ENDEVPLUGINDET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENDEVPLUGINDET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENDEVPLUGINDET_A :: _1 } } # [ doc = "Write proxy for field `ENDEVPLUGINDET`" ] pub struct ENDEVPLUGINDET_W < 'a > { w : & 'a mut W , } impl < 'a > ENDEVPLUGINDET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENDEVPLUGINDET_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENDEVPLUGINDET_A :: _0 ) } # [ doc = "Enables 200kohm pullup resistors on USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENDEVPLUGINDET_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `DEVPLUGIN_IRQ`" ] pub type DEVPLUGIN_IRQ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEVPLUGIN_IRQ`" ] pub struct DEVPLUGIN_IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > DEVPLUGIN_IRQ_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `ENUTMILEVEL2`" ] pub type ENUTMILEVEL2_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENUTMILEVEL2`" ] pub struct ENUTMILEVEL2_W < 'a > { w : & 'a mut W , } impl < 'a > ENUTMILEVEL2_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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Reader of field `ENUTMILEVEL3`" ] pub type ENUTMILEVEL3_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENUTMILEVEL3`" ] pub struct ENUTMILEVEL3_W < 'a > { w : & 'a mut W , } impl < 'a > ENUTMILEVEL3_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `AUTORESUME_EN`" ] pub type AUTORESUME_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AUTORESUME_EN`" ] pub struct AUTORESUME_EN_W < 'a > { w : & 'a mut W , } impl < 'a > AUTORESUME_EN_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `ENAUTOCLR_CLKGATE`" ] pub type ENAUTOCLR_CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENAUTOCLR_CLKGATE`" ] pub struct ENAUTOCLR_CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > ENAUTOCLR_CLKGATE_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Reader of field `ENAUTOCLR_PHY_PWD`" ] pub type ENAUTOCLR_PHY_PWD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENAUTOCLR_PHY_PWD`" ] pub struct ENAUTOCLR_PHY_PWD_W < 'a > { w : & 'a mut W , } impl < 'a > ENAUTOCLR_PHY_PWD_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 = "Reader of field `FSDLL_RST_EN`" ] pub type FSDLL_RST_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FSDLL_RST_EN`" ] pub struct FSDLL_RST_EN_W < 'a > { w : & 'a mut W , } impl < 'a > FSDLL_RST_EN_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 = "Reader of field `OTG_ID_VALUE`" ] pub type OTG_ID_VALUE_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `HOST_FORCE_LS_SE0`" ] pub type HOST_FORCE_LS_SE0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOST_FORCE_LS_SE0`" ] pub struct HOST_FORCE_LS_SE0_W < 'a > { w : & 'a mut W , } impl < 'a > HOST_FORCE_LS_SE0_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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Reader of field `UTMI_SUSPENDM`" ] pub type UTMI_SUSPENDM_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `CLKGATE`" ] pub type CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CLKGATE`" ] pub struct CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKGATE_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Reader of field `SFTRST`" ] pub type SFTRST_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SFTRST`" ] pub struct SFTRST_W < 'a > { w : & 'a mut W , } impl < 'a > SFTRST_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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 1 - For host mode, enables high-speed disconnect detector" ] # [ inline ( always ) ] pub fn enhostdiscondetect ( & self ) -> ENHOSTDISCONDETECT_R { ENHOSTDISCONDETECT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Indicates that the device has disconnected in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_irq ( & self ) -> HOSTDISCONDETECT_IRQ_R { HOSTDISCONDETECT_IRQ_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enables non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn endevplugindet ( & self ) -> ENDEVPLUGINDET_R { ENDEVPLUGINDET_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Indicates that the device is connected" ] # [ inline ( always ) ] pub fn devplugin_irq ( & self ) -> DEVPLUGIN_IRQ_R { DEVPLUGIN_IRQ_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Enables UTMI+ Level 2 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel2 ( & self ) -> ENUTMILEVEL2_R { ENUTMILEVEL2_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Enables UTMI+ Level 3 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel3 ( & self ) -> ENUTMILEVEL3_R { ENUTMILEVEL3_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Enable the auto resume feature, when set, HW will use 32KHz clock to send Resume to respond to the device remote wakeup(for host mode only)" ] # [ inline ( always ) ] pub fn autoresume_en ( & self ) -> AUTORESUME_EN_R { AUTORESUME_EN_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Enables the feature to auto-clear the CLKGATE bit if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_clkgate ( & self ) -> ENAUTOCLR_CLKGATE_R { ENAUTOCLR_CLKGATE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enables the feature to auto-clear the PWD register bits in USBPHY_PWD if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_phy_pwd ( & self ) -> ENAUTOCLR_PHY_PWD_R { ENAUTOCLR_PHY_PWD_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Enables the feature to reset the FSDLL lock detection logic at the end of each TX packet." ] # [ inline ( always ) ] pub fn fsdll_rst_en ( & self ) -> FSDLL_RST_EN_R { FSDLL_RST_EN_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Indicates the results of USB_ID pin while monitoring the cable plugged into the Micro- or Mini-AB receptacle" ] # [ inline ( always ) ] pub fn otg_id_value ( & self ) -> OTG_ID_VALUE_R { OTG_ID_VALUE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Forces the next FS packet that is transmitted to have a EOP with low-speed timing" ] # [ inline ( always ) ] pub fn host_force_ls_se0 ( & self ) -> HOST_FORCE_LS_SE0_R { HOST_FORCE_LS_SE0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Used by the PHY to indicate a powered-down state" ] # [ inline ( always ) ] pub fn utmi_suspendm ( & self ) -> UTMI_SUSPENDM_R { UTMI_SUSPENDM_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Gate UTMI Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & self ) -> CLKGATE_R { CLKGATE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Writing a 1 to this bit will soft-reset the USBPHY_PWD, USBPHY_TX, USBPHY_RX, and USBPHY_CTRL registers" ] # [ inline ( always ) ] pub fn sftrst ( & self ) -> SFTRST_R { SFTRST_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - For host mode, enables high-speed disconnect detector" ] # [ inline ( always ) ] pub fn enhostdiscondetect ( & mut self ) -> ENHOSTDISCONDETECT_W { ENHOSTDISCONDETECT_W { w : self } } # [ doc = "Bit 3 - Indicates that the device has disconnected in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_irq ( & mut self ) -> HOSTDISCONDETECT_IRQ_W { HOSTDISCONDETECT_IRQ_W { w : self } } # [ doc = "Bit 4 - Enables non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn endevplugindet ( & mut self ) -> ENDEVPLUGINDET_W { ENDEVPLUGINDET_W { w : self } } # [ doc = "Bit 12 - Indicates that the device is connected" ] # [ inline ( always ) ] pub fn devplugin_irq ( & mut self ) -> DEVPLUGIN_IRQ_W { DEVPLUGIN_IRQ_W { w : self } } # [ doc = "Bit 14 - Enables UTMI+ Level 2 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel2 ( & mut self ) -> ENUTMILEVEL2_W { ENUTMILEVEL2_W { w : self } } # [ doc = "Bit 15 - Enables UTMI+ Level 3 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel3 ( & mut self ) -> ENUTMILEVEL3_W { ENUTMILEVEL3_W { w : self } } # [ doc = "Bit 18 - Enable the auto resume feature, when set, HW will use 32KHz clock to send Resume to respond to the device remote wakeup(for host mode only)" ] # [ inline ( always ) ] pub fn autoresume_en ( & mut self ) -> AUTORESUME_EN_W { AUTORESUME_EN_W { w : self } } # [ doc = "Bit 19 - Enables the feature to auto-clear the CLKGATE bit if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_clkgate ( & mut self ) -> ENAUTOCLR_CLKGATE_W { ENAUTOCLR_CLKGATE_W { w : self } } # [ doc = "Bit 20 - Enables the feature to auto-clear the PWD register bits in USBPHY_PWD if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_phy_pwd ( & mut self ) -> ENAUTOCLR_PHY_PWD_W { ENAUTOCLR_PHY_PWD_W { w : self } } # [ doc = "Bit 24 - Enables the feature to reset the FSDLL lock detection logic at the end of each TX packet." ] # [ inline ( always ) ] pub fn fsdll_rst_en ( & mut self ) -> FSDLL_RST_EN_W { FSDLL_RST_EN_W { w : self } } # [ doc = "Bit 28 - Forces the next FS packet that is transmitted to have a EOP with low-speed timing" ] # [ inline ( always ) ] pub fn host_force_ls_se0 ( & mut self ) -> HOST_FORCE_LS_SE0_W { HOST_FORCE_LS_SE0_W { w : self } } # [ doc = "Bit 30 - Gate UTMI Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & mut self ) -> CLKGATE_W { CLKGATE_W { w : self } } # [ doc = "Bit 31 - Writing a 1 to this bit will soft-reset the USBPHY_PWD, USBPHY_TX, USBPHY_RX, and USBPHY_CTRL registers" ] # [ inline ( always ) ] pub fn sftrst ( & mut self ) -> SFTRST_W { SFTRST_W { w : self } } } } # [ doc = "USB PHY General Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl_tog](ctrl_tog) module" ] pub type CTRL_TOG = crate :: Reg < u32 , _CTRL_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL_TOG ; # [ doc = "`read()` method returns [ctrl_tog::R](ctrl_tog::R) reader structure" ] impl crate :: Readable for CTRL_TOG { } # [ doc = "`write(|w| ..)` method takes [ctrl_tog::W](ctrl_tog::W) writer structure" ] impl crate :: Writable for CTRL_TOG { } # [ doc = "USB PHY General Control Register" ] pub mod ctrl_tog { # [ doc = "Reader of register CTRL_TOG" ] pub type R = crate :: R < u32 , super :: CTRL_TOG > ; # [ doc = "Writer for register CTRL_TOG" ] pub type W = crate :: W < u32 , super :: CTRL_TOG > ; # [ doc = "Register CTRL_TOG `reset()`'s with value 0xc000_0000" ] impl crate :: ResetValue for super :: CTRL_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc000_0000 } } # [ doc = "Reader of field `ENHOSTDISCONDETECT`" ] pub type ENHOSTDISCONDETECT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENHOSTDISCONDETECT`" ] pub struct ENHOSTDISCONDETECT_W < 'a > { w : & 'a mut W , } impl < 'a > ENHOSTDISCONDETECT_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 } } # [ doc = "Reader of field `HOSTDISCONDETECT_IRQ`" ] pub type HOSTDISCONDETECT_IRQ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOSTDISCONDETECT_IRQ`" ] pub struct HOSTDISCONDETECT_IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > HOSTDISCONDETECT_IRQ_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enables non-standard resistive plugged-in detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDEVPLUGINDET_A { # [ doc = "0: Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)" ] _0 , # [ doc = "1: Enables 200kohm pullup resistors on USB_DP and USB_DM pins" ] _1 } impl From < ENDEVPLUGINDET_A > for bool { # [ inline ( always ) ] fn from ( variant : ENDEVPLUGINDET_A ) -> Self { match variant { ENDEVPLUGINDET_A :: _0 => false , ENDEVPLUGINDET_A :: _1 => true } } } # [ doc = "Reader of field `ENDEVPLUGINDET`" ] pub type ENDEVPLUGINDET_R = crate :: R < bool , ENDEVPLUGINDET_A > ; impl ENDEVPLUGINDET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENDEVPLUGINDET_A { match self . bits { false => ENDEVPLUGINDET_A :: _0 , true => ENDEVPLUGINDET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENDEVPLUGINDET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENDEVPLUGINDET_A :: _1 } } # [ doc = "Write proxy for field `ENDEVPLUGINDET`" ] pub struct ENDEVPLUGINDET_W < 'a > { w : & 'a mut W , } impl < 'a > ENDEVPLUGINDET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENDEVPLUGINDET_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENDEVPLUGINDET_A :: _0 ) } # [ doc = "Enables 200kohm pullup resistors on USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENDEVPLUGINDET_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `DEVPLUGIN_IRQ`" ] pub type DEVPLUGIN_IRQ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEVPLUGIN_IRQ`" ] pub struct DEVPLUGIN_IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > DEVPLUGIN_IRQ_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `ENUTMILEVEL2`" ] pub type ENUTMILEVEL2_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENUTMILEVEL2`" ] pub struct ENUTMILEVEL2_W < 'a > { w : & 'a mut W , } impl < 'a > ENUTMILEVEL2_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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Reader of field `ENUTMILEVEL3`" ] pub type ENUTMILEVEL3_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENUTMILEVEL3`" ] pub struct ENUTMILEVEL3_W < 'a > { w : & 'a mut W , } impl < 'a > ENUTMILEVEL3_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `AUTORESUME_EN`" ] pub type AUTORESUME_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AUTORESUME_EN`" ] pub struct AUTORESUME_EN_W < 'a > { w : & 'a mut W , } impl < 'a > AUTORESUME_EN_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `ENAUTOCLR_CLKGATE`" ] pub type ENAUTOCLR_CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENAUTOCLR_CLKGATE`" ] pub struct ENAUTOCLR_CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > ENAUTOCLR_CLKGATE_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Reader of field `ENAUTOCLR_PHY_PWD`" ] pub type ENAUTOCLR_PHY_PWD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENAUTOCLR_PHY_PWD`" ] pub struct ENAUTOCLR_PHY_PWD_W < 'a > { w : & 'a mut W , } impl < 'a > ENAUTOCLR_PHY_PWD_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 = "Reader of field `FSDLL_RST_EN`" ] pub type FSDLL_RST_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FSDLL_RST_EN`" ] pub struct FSDLL_RST_EN_W < 'a > { w : & 'a mut W , } impl < 'a > FSDLL_RST_EN_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 = "Reader of field `OTG_ID_VALUE`" ] pub type OTG_ID_VALUE_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `HOST_FORCE_LS_SE0`" ] pub type HOST_FORCE_LS_SE0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOST_FORCE_LS_SE0`" ] pub struct HOST_FORCE_LS_SE0_W < 'a > { w : & 'a mut W , } impl < 'a > HOST_FORCE_LS_SE0_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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Reader of field `UTMI_SUSPENDM`" ] pub type UTMI_SUSPENDM_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `CLKGATE`" ] pub type CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CLKGATE`" ] pub struct CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKGATE_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Reader of field `SFTRST`" ] pub type SFTRST_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SFTRST`" ] pub struct SFTRST_W < 'a > { w : & 'a mut W , } impl < 'a > SFTRST_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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 1 - For host mode, enables high-speed disconnect detector" ] # [ inline ( always ) ] pub fn enhostdiscondetect ( & self ) -> ENHOSTDISCONDETECT_R { ENHOSTDISCONDETECT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Indicates that the device has disconnected in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_irq ( & self ) -> HOSTDISCONDETECT_IRQ_R { HOSTDISCONDETECT_IRQ_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enables non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn endevplugindet ( & self ) -> ENDEVPLUGINDET_R { ENDEVPLUGINDET_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Indicates that the device is connected" ] # [ inline ( always ) ] pub fn devplugin_irq ( & self ) -> DEVPLUGIN_IRQ_R { DEVPLUGIN_IRQ_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Enables UTMI+ Level 2 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel2 ( & self ) -> ENUTMILEVEL2_R { ENUTMILEVEL2_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Enables UTMI+ Level 3 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel3 ( & self ) -> ENUTMILEVEL3_R { ENUTMILEVEL3_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Enable the auto resume feature, when set, HW will use 32KHz clock to send Resume to respond to the device remote wakeup(for host mode only)" ] # [ inline ( always ) ] pub fn autoresume_en ( & self ) -> AUTORESUME_EN_R { AUTORESUME_EN_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Enables the feature to auto-clear the CLKGATE bit if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_clkgate ( & self ) -> ENAUTOCLR_CLKGATE_R { ENAUTOCLR_CLKGATE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enables the feature to auto-clear the PWD register bits in USBPHY_PWD if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_phy_pwd ( & self ) -> ENAUTOCLR_PHY_PWD_R { ENAUTOCLR_PHY_PWD_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Enables the feature to reset the FSDLL lock detection logic at the end of each TX packet." ] # [ inline ( always ) ] pub fn fsdll_rst_en ( & self ) -> FSDLL_RST_EN_R { FSDLL_RST_EN_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Indicates the results of USB_ID pin while monitoring the cable plugged into the Micro- or Mini-AB receptacle" ] # [ inline ( always ) ] pub fn otg_id_value ( & self ) -> OTG_ID_VALUE_R { OTG_ID_VALUE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Forces the next FS packet that is transmitted to have a EOP with low-speed timing" ] # [ inline ( always ) ] pub fn host_force_ls_se0 ( & self ) -> HOST_FORCE_LS_SE0_R { HOST_FORCE_LS_SE0_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Used by the PHY to indicate a powered-down state" ] # [ inline ( always ) ] pub fn utmi_suspendm ( & self ) -> UTMI_SUSPENDM_R { UTMI_SUSPENDM_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Gate UTMI Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & self ) -> CLKGATE_R { CLKGATE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Writing a 1 to this bit will soft-reset the USBPHY_PWD, USBPHY_TX, USBPHY_RX, and USBPHY_CTRL registers" ] # [ inline ( always ) ] pub fn sftrst ( & self ) -> SFTRST_R { SFTRST_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - For host mode, enables high-speed disconnect detector" ] # [ inline ( always ) ] pub fn enhostdiscondetect ( & mut self ) -> ENHOSTDISCONDETECT_W { ENHOSTDISCONDETECT_W { w : self } } # [ doc = "Bit 3 - Indicates that the device has disconnected in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_irq ( & mut self ) -> HOSTDISCONDETECT_IRQ_W { HOSTDISCONDETECT_IRQ_W { w : self } } # [ doc = "Bit 4 - Enables non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn endevplugindet ( & mut self ) -> ENDEVPLUGINDET_W { ENDEVPLUGINDET_W { w : self } } # [ doc = "Bit 12 - Indicates that the device is connected" ] # [ inline ( always ) ] pub fn devplugin_irq ( & mut self ) -> DEVPLUGIN_IRQ_W { DEVPLUGIN_IRQ_W { w : self } } # [ doc = "Bit 14 - Enables UTMI+ Level 2 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel2 ( & mut self ) -> ENUTMILEVEL2_W { ENUTMILEVEL2_W { w : self } } # [ doc = "Bit 15 - Enables UTMI+ Level 3 operation for the USB HS PHY" ] # [ inline ( always ) ] pub fn enutmilevel3 ( & mut self ) -> ENUTMILEVEL3_W { ENUTMILEVEL3_W { w : self } } # [ doc = "Bit 18 - Enable the auto resume feature, when set, HW will use 32KHz clock to send Resume to respond to the device remote wakeup(for host mode only)" ] # [ inline ( always ) ] pub fn autoresume_en ( & mut self ) -> AUTORESUME_EN_W { AUTORESUME_EN_W { w : self } } # [ doc = "Bit 19 - Enables the feature to auto-clear the CLKGATE bit if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_clkgate ( & mut self ) -> ENAUTOCLR_CLKGATE_W { ENAUTOCLR_CLKGATE_W { w : self } } # [ doc = "Bit 20 - Enables the feature to auto-clear the PWD register bits in USBPHY_PWD if there is wakeup event while USB is suspended" ] # [ inline ( always ) ] pub fn enautoclr_phy_pwd ( & mut self ) -> ENAUTOCLR_PHY_PWD_W { ENAUTOCLR_PHY_PWD_W { w : self } } # [ doc = "Bit 24 - Enables the feature to reset the FSDLL lock detection logic at the end of each TX packet." ] # [ inline ( always ) ] pub fn fsdll_rst_en ( & mut self ) -> FSDLL_RST_EN_W { FSDLL_RST_EN_W { w : self } } # [ doc = "Bit 28 - Forces the next FS packet that is transmitted to have a EOP with low-speed timing" ] # [ inline ( always ) ] pub fn host_force_ls_se0 ( & mut self ) -> HOST_FORCE_LS_SE0_W { HOST_FORCE_LS_SE0_W { w : self } } # [ doc = "Bit 30 - Gate UTMI Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & mut self ) -> CLKGATE_W { CLKGATE_W { w : self } } # [ doc = "Bit 31 - Writing a 1 to this bit will soft-reset the USBPHY_PWD, USBPHY_TX, USBPHY_RX, and USBPHY_CTRL registers" ] # [ inline ( always ) ] pub fn sftrst ( & mut self ) -> SFTRST_W { SFTRST_W { w : self } } } } # [ doc = "USB PHY Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "`write(|w| ..)` method takes [status::W](status::W) writer structure" ] impl crate :: Writable for STATUS { } # [ doc = "USB PHY Status Register" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Writer for register STATUS" ] pub type W = crate :: W < u32 , super :: STATUS > ; # [ doc = "Register STATUS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: STATUS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Indicates at the local host (downstream) port that the remote device has disconnected while in High-Speed mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HOSTDISCONDETECT_STATUS_A { # [ doc = "0: USB cable disconnect has not been detected at the local host" ] _0 , # [ doc = "1: USB cable disconnect has been detected at the local host" ] _1 } impl From < HOSTDISCONDETECT_STATUS_A > for bool { # [ inline ( always ) ] fn from ( variant : HOSTDISCONDETECT_STATUS_A ) -> Self { match variant { HOSTDISCONDETECT_STATUS_A :: _0 => false , HOSTDISCONDETECT_STATUS_A :: _1 => true } } } # [ doc = "Reader of field `HOSTDISCONDETECT_STATUS`" ] pub type HOSTDISCONDETECT_STATUS_R = crate :: R < bool , HOSTDISCONDETECT_STATUS_A > ; impl HOSTDISCONDETECT_STATUS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HOSTDISCONDETECT_STATUS_A { match self . bits { false => HOSTDISCONDETECT_STATUS_A :: _0 , true => HOSTDISCONDETECT_STATUS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HOSTDISCONDETECT_STATUS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HOSTDISCONDETECT_STATUS_A :: _1 } } # [ doc = "Status indicator for non-standard resistive plugged-in detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEVPLUGIN_STATUS_A { # [ doc = "0: No attachment to a USB host is detected" ] _0 , # [ doc = "1: Cable attachment to a USB host is detected" ] _1 } impl From < DEVPLUGIN_STATUS_A > for bool { # [ inline ( always ) ] fn from ( variant : DEVPLUGIN_STATUS_A ) -> Self { match variant { DEVPLUGIN_STATUS_A :: _0 => false , DEVPLUGIN_STATUS_A :: _1 => true } } } # [ doc = "Reader of field `DEVPLUGIN_STATUS`" ] pub type DEVPLUGIN_STATUS_R = crate :: R < bool , DEVPLUGIN_STATUS_A > ; impl DEVPLUGIN_STATUS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DEVPLUGIN_STATUS_A { match self . bits { false => DEVPLUGIN_STATUS_A :: _0 , true => DEVPLUGIN_STATUS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DEVPLUGIN_STATUS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DEVPLUGIN_STATUS_A :: _1 } } # [ doc = "Reader of field `OTGID_STATUS`" ] pub type OTGID_STATUS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `OTGID_STATUS`" ] pub struct OTGID_STATUS_W < 'a > { w : & 'a mut W , } impl < 'a > OTGID_STATUS_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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Reader of field `RESUME_STATUS`" ] pub type RESUME_STATUS_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 3 - Indicates at the local host (downstream) port that the remote device has disconnected while in High-Speed mode" ] # [ inline ( always ) ] pub fn hostdiscondetect_status ( & self ) -> HOSTDISCONDETECT_STATUS_R { HOSTDISCONDETECT_STATUS_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Status indicator for non-standard resistive plugged-in detection" ] # [ inline ( always ) ] pub fn devplugin_status ( & self ) -> DEVPLUGIN_STATUS_R { DEVPLUGIN_STATUS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Indicates the results of USB_ID pin on the USB cable plugged into the local Micro- or Mini-AB receptacle" ] # [ inline ( always ) ] pub fn otgid_status ( & self ) -> OTGID_STATUS_R { OTGID_STATUS_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Indicates that the host is sending a wake-up after Suspend and has triggered an interrupt." ] # [ inline ( always ) ] pub fn resume_status ( & self ) -> RESUME_STATUS_R { RESUME_STATUS_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 8 - Indicates the results of USB_ID pin on the USB cable plugged into the local Micro- or Mini-AB receptacle" ] # [ inline ( always ) ] pub fn otgid_status ( & mut self ) -> OTGID_STATUS_W { OTGID_STATUS_W { w : self } } } } # [ doc = "USB PHY Debug Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug](debug) module" ] pub type DEBUG = crate :: Reg < u32 , _DEBUG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG ; # [ doc = "`read()` method returns [debug::R](debug::R) reader structure" ] impl crate :: Readable for DEBUG { } # [ doc = "`write(|w| ..)` method takes [debug::W](debug::W) writer structure" ] impl crate :: Writable for DEBUG { } # [ doc = "USB PHY Debug Register" ] pub mod debug { # [ doc = "Reader of register DEBUG" ] pub type R = crate :: R < u32 , super :: DEBUG > ; # [ doc = "Writer for register DEBUG" ] pub type W = crate :: W < u32 , super :: DEBUG > ; # [ doc = "Register DEBUG `reset()`'s with value 0x7f18_0000" ] impl crate :: ResetValue for super :: DEBUG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7f18_0000 } } # [ doc = "Reader of field `OTGIDPIOLOCK`" ] pub type OTGIDPIOLOCK_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `OTGIDPIOLOCK`" ] pub struct OTGIDPIOLOCK_W < 'a > { w : & 'a mut W , } impl < 'a > OTGIDPIOLOCK_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `DEBUG_INTERFACE_HOLD`" ] pub type DEBUG_INTERFACE_HOLD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEBUG_INTERFACE_HOLD`" ] pub struct DEBUG_INTERFACE_HOLD_W < 'a > { w : & 'a mut W , } impl < 'a > DEBUG_INTERFACE_HOLD_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 } } # [ doc = "Reader of field `HSTPULLDOWN`" ] pub type HSTPULLDOWN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HSTPULLDOWN`" ] pub struct HSTPULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > HSTPULLDOWN_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 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Reader of field `ENHSTPULLDOWN`" ] pub type ENHSTPULLDOWN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ENHSTPULLDOWN`" ] pub struct ENHSTPULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > ENHSTPULLDOWN_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 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TX2RXCOUNT`" ] pub type TX2RXCOUNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TX2RXCOUNT`" ] pub struct TX2RXCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > TX2RXCOUNT_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `ENTX2RXCOUNT`" ] pub type ENTX2RXCOUNT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENTX2RXCOUNT`" ] pub struct ENTX2RXCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > ENTX2RXCOUNT_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `SQUELCHRESETCOUNT`" ] pub type SQUELCHRESETCOUNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SQUELCHRESETCOUNT`" ] pub struct SQUELCHRESETCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > SQUELCHRESETCOUNT_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } # [ doc = "Reader of field `ENSQUELCHRESET`" ] pub type ENSQUELCHRESET_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENSQUELCHRESET`" ] pub struct ENSQUELCHRESET_W < 'a > { w : & 'a mut W , } impl < 'a > ENSQUELCHRESET_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 = "Reader of field `SQUELCHRESETLENGTH`" ] pub type SQUELCHRESETLENGTH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SQUELCHRESETLENGTH`" ] pub struct SQUELCHRESETLENGTH_W < 'a > { w : & 'a mut W , } impl < 'a > SQUELCHRESETLENGTH_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 & ! ( 0x0f << 25 ) ) | ( ( ( value as u32 ) & 0x0f ) << 25 ) ; self . w } } # [ doc = "Reader of field `HOST_RESUME_DEBUG`" ] pub type HOST_RESUME_DEBUG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOST_RESUME_DEBUG`" ] pub struct HOST_RESUME_DEBUG_W < 'a > { w : & 'a mut W , } impl < 'a > HOST_RESUME_DEBUG_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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Reader of field `CLKGATE`" ] pub type CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CLKGATE`" ] pub struct CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKGATE_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Once OTG ID from USBPHY_STATUS_OTGID_STATUS is sampled, use this to hold the value" ] # [ inline ( always ) ] pub fn otgidpiolock ( & self ) -> OTGIDPIOLOCK_R { OTGIDPIOLOCK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Use holding registers to assist in timing for external UTMI interface." ] # [ inline ( always ) ] pub fn debug_interface_hold ( & self ) -> DEBUG_INTERFACE_HOLD_R { DEBUG_INTERFACE_HOLD_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - This bit field selects whether to connect pulldown resistors on the USB_DP/USB_DM pins if the corresponding pulldown overdrive mode is enabled through USBPHY_DEBUG\\[5:4} Set bit 3 to value 1'b1 to connect the 15ohm pulldown on USB_DP line" ] # [ inline ( always ) ] pub fn hstpulldown ( & self ) -> HSTPULLDOWN_R { HSTPULLDOWN_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - This bit field selects host pulldown overdrive mode" ] # [ inline ( always ) ] pub fn enhstpulldown ( & self ) -> ENHSTPULLDOWN_R { ENHSTPULLDOWN_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 8:11 - Delay in between the end of transmit to the beginning of receive" ] # [ inline ( always ) ] pub fn tx2rxcount ( & self ) -> TX2RXCOUNT_R { TX2RXCOUNT_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bit 12 - Set this bit to allow a countdown to transition in between TX and RX." ] # [ inline ( always ) ] pub fn entx2rxcount ( & self ) -> ENTX2RXCOUNT_R { ENTX2RXCOUNT_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:20 - Delay in between the detection of squelch to the reset of high-speed RX." ] # [ inline ( always ) ] pub fn squelchresetcount ( & self ) -> SQUELCHRESETCOUNT_R { SQUELCHRESETCOUNT_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bit 24 - Set bit to allow squelch to reset high-speed receive." ] # [ inline ( always ) ] pub fn ensquelchreset ( & self ) -> ENSQUELCHRESET_R { ENSQUELCHRESET_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bits 25:28 - Duration of RESET in terms of the number of 480-MHz cycles." ] # [ inline ( always ) ] pub fn squelchresetlength ( & self ) -> SQUELCHRESETLENGTH_R { SQUELCHRESETLENGTH_R :: new ( ( ( self . bits >> 25 ) & 0x0f ) as u8 ) } # [ doc = "Bit 29 - Choose to trigger the host resume SE0 with HOST_FORCE_LS_SE0 = 0 or UTMI_SUSPEND = 1." ] # [ inline ( always ) ] pub fn host_resume_debug ( & self ) -> HOST_RESUME_DEBUG_R { HOST_RESUME_DEBUG_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Gate Test Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & self ) -> CLKGATE_R { CLKGATE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Once OTG ID from USBPHY_STATUS_OTGID_STATUS is sampled, use this to hold the value" ] # [ inline ( always ) ] pub fn otgidpiolock ( & mut self ) -> OTGIDPIOLOCK_W { OTGIDPIOLOCK_W { w : self } } # [ doc = "Bit 1 - Use holding registers to assist in timing for external UTMI interface." ] # [ inline ( always ) ] pub fn debug_interface_hold ( & mut self ) -> DEBUG_INTERFACE_HOLD_W { DEBUG_INTERFACE_HOLD_W { w : self } } # [ doc = "Bits 2:3 - This bit field selects whether to connect pulldown resistors on the USB_DP/USB_DM pins if the corresponding pulldown overdrive mode is enabled through USBPHY_DEBUG\\[5:4} Set bit 3 to value 1'b1 to connect the 15ohm pulldown on USB_DP line" ] # [ inline ( always ) ] pub fn hstpulldown ( & mut self ) -> HSTPULLDOWN_W { HSTPULLDOWN_W { w : self } } # [ doc = "Bits 4:5 - This bit field selects host pulldown overdrive mode" ] # [ inline ( always ) ] pub fn enhstpulldown ( & mut self ) -> ENHSTPULLDOWN_W { ENHSTPULLDOWN_W { w : self } } # [ doc = "Bits 8:11 - Delay in between the end of transmit to the beginning of receive" ] # [ inline ( always ) ] pub fn tx2rxcount ( & mut self ) -> TX2RXCOUNT_W { TX2RXCOUNT_W { w : self } } # [ doc = "Bit 12 - Set this bit to allow a countdown to transition in between TX and RX." ] # [ inline ( always ) ] pub fn entx2rxcount ( & mut self ) -> ENTX2RXCOUNT_W { ENTX2RXCOUNT_W { w : self } } # [ doc = "Bits 16:20 - Delay in between the detection of squelch to the reset of high-speed RX." ] # [ inline ( always ) ] pub fn squelchresetcount ( & mut self ) -> SQUELCHRESETCOUNT_W { SQUELCHRESETCOUNT_W { w : self } } # [ doc = "Bit 24 - Set bit to allow squelch to reset high-speed receive." ] # [ inline ( always ) ] pub fn ensquelchreset ( & mut self ) -> ENSQUELCHRESET_W { ENSQUELCHRESET_W { w : self } } # [ doc = "Bits 25:28 - Duration of RESET in terms of the number of 480-MHz cycles." ] # [ inline ( always ) ] pub fn squelchresetlength ( & mut self ) -> SQUELCHRESETLENGTH_W { SQUELCHRESETLENGTH_W { w : self } } # [ doc = "Bit 29 - Choose to trigger the host resume SE0 with HOST_FORCE_LS_SE0 = 0 or UTMI_SUSPEND = 1." ] # [ inline ( always ) ] pub fn host_resume_debug ( & mut self ) -> HOST_RESUME_DEBUG_W { HOST_RESUME_DEBUG_W { w : self } } # [ doc = "Bit 30 - Gate Test Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & mut self ) -> CLKGATE_W { CLKGATE_W { w : self } } } } # [ doc = "USB PHY Debug Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug_set](debug_set) module" ] pub type DEBUG_SET = crate :: Reg < u32 , _DEBUG_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG_SET ; # [ doc = "`read()` method returns [debug_set::R](debug_set::R) reader structure" ] impl crate :: Readable for DEBUG_SET { } # [ doc = "`write(|w| ..)` method takes [debug_set::W](debug_set::W) writer structure" ] impl crate :: Writable for DEBUG_SET { } # [ doc = "USB PHY Debug Register" ] pub mod debug_set { # [ doc = "Reader of register DEBUG_SET" ] pub type R = crate :: R < u32 , super :: DEBUG_SET > ; # [ doc = "Writer for register DEBUG_SET" ] pub type W = crate :: W < u32 , super :: DEBUG_SET > ; # [ doc = "Register DEBUG_SET `reset()`'s with value 0x7f18_0000" ] impl crate :: ResetValue for super :: DEBUG_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7f18_0000 } } # [ doc = "Reader of field `OTGIDPIOLOCK`" ] pub type OTGIDPIOLOCK_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `OTGIDPIOLOCK`" ] pub struct OTGIDPIOLOCK_W < 'a > { w : & 'a mut W , } impl < 'a > OTGIDPIOLOCK_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `DEBUG_INTERFACE_HOLD`" ] pub type DEBUG_INTERFACE_HOLD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEBUG_INTERFACE_HOLD`" ] pub struct DEBUG_INTERFACE_HOLD_W < 'a > { w : & 'a mut W , } impl < 'a > DEBUG_INTERFACE_HOLD_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 } } # [ doc = "Reader of field `HSTPULLDOWN`" ] pub type HSTPULLDOWN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HSTPULLDOWN`" ] pub struct HSTPULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > HSTPULLDOWN_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 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Reader of field `ENHSTPULLDOWN`" ] pub type ENHSTPULLDOWN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ENHSTPULLDOWN`" ] pub struct ENHSTPULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > ENHSTPULLDOWN_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 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TX2RXCOUNT`" ] pub type TX2RXCOUNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TX2RXCOUNT`" ] pub struct TX2RXCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > TX2RXCOUNT_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `ENTX2RXCOUNT`" ] pub type ENTX2RXCOUNT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENTX2RXCOUNT`" ] pub struct ENTX2RXCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > ENTX2RXCOUNT_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `SQUELCHRESETCOUNT`" ] pub type SQUELCHRESETCOUNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SQUELCHRESETCOUNT`" ] pub struct SQUELCHRESETCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > SQUELCHRESETCOUNT_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } # [ doc = "Reader of field `ENSQUELCHRESET`" ] pub type ENSQUELCHRESET_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENSQUELCHRESET`" ] pub struct ENSQUELCHRESET_W < 'a > { w : & 'a mut W , } impl < 'a > ENSQUELCHRESET_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 = "Reader of field `SQUELCHRESETLENGTH`" ] pub type SQUELCHRESETLENGTH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SQUELCHRESETLENGTH`" ] pub struct SQUELCHRESETLENGTH_W < 'a > { w : & 'a mut W , } impl < 'a > SQUELCHRESETLENGTH_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 & ! ( 0x0f << 25 ) ) | ( ( ( value as u32 ) & 0x0f ) << 25 ) ; self . w } } # [ doc = "Reader of field `HOST_RESUME_DEBUG`" ] pub type HOST_RESUME_DEBUG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOST_RESUME_DEBUG`" ] pub struct HOST_RESUME_DEBUG_W < 'a > { w : & 'a mut W , } impl < 'a > HOST_RESUME_DEBUG_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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Reader of field `CLKGATE`" ] pub type CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CLKGATE`" ] pub struct CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKGATE_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Once OTG ID from USBPHY_STATUS_OTGID_STATUS is sampled, use this to hold the value" ] # [ inline ( always ) ] pub fn otgidpiolock ( & self ) -> OTGIDPIOLOCK_R { OTGIDPIOLOCK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Use holding registers to assist in timing for external UTMI interface." ] # [ inline ( always ) ] pub fn debug_interface_hold ( & self ) -> DEBUG_INTERFACE_HOLD_R { DEBUG_INTERFACE_HOLD_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - This bit field selects whether to connect pulldown resistors on the USB_DP/USB_DM pins if the corresponding pulldown overdrive mode is enabled through USBPHY_DEBUG\\[5:4} Set bit 3 to value 1'b1 to connect the 15ohm pulldown on USB_DP line" ] # [ inline ( always ) ] pub fn hstpulldown ( & self ) -> HSTPULLDOWN_R { HSTPULLDOWN_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - This bit field selects host pulldown overdrive mode" ] # [ inline ( always ) ] pub fn enhstpulldown ( & self ) -> ENHSTPULLDOWN_R { ENHSTPULLDOWN_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 8:11 - Delay in between the end of transmit to the beginning of receive" ] # [ inline ( always ) ] pub fn tx2rxcount ( & self ) -> TX2RXCOUNT_R { TX2RXCOUNT_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bit 12 - Set this bit to allow a countdown to transition in between TX and RX." ] # [ inline ( always ) ] pub fn entx2rxcount ( & self ) -> ENTX2RXCOUNT_R { ENTX2RXCOUNT_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:20 - Delay in between the detection of squelch to the reset of high-speed RX." ] # [ inline ( always ) ] pub fn squelchresetcount ( & self ) -> SQUELCHRESETCOUNT_R { SQUELCHRESETCOUNT_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bit 24 - Set bit to allow squelch to reset high-speed receive." ] # [ inline ( always ) ] pub fn ensquelchreset ( & self ) -> ENSQUELCHRESET_R { ENSQUELCHRESET_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bits 25:28 - Duration of RESET in terms of the number of 480-MHz cycles." ] # [ inline ( always ) ] pub fn squelchresetlength ( & self ) -> SQUELCHRESETLENGTH_R { SQUELCHRESETLENGTH_R :: new ( ( ( self . bits >> 25 ) & 0x0f ) as u8 ) } # [ doc = "Bit 29 - Choose to trigger the host resume SE0 with HOST_FORCE_LS_SE0 = 0 or UTMI_SUSPEND = 1." ] # [ inline ( always ) ] pub fn host_resume_debug ( & self ) -> HOST_RESUME_DEBUG_R { HOST_RESUME_DEBUG_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Gate Test Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & self ) -> CLKGATE_R { CLKGATE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Once OTG ID from USBPHY_STATUS_OTGID_STATUS is sampled, use this to hold the value" ] # [ inline ( always ) ] pub fn otgidpiolock ( & mut self ) -> OTGIDPIOLOCK_W { OTGIDPIOLOCK_W { w : self } } # [ doc = "Bit 1 - Use holding registers to assist in timing for external UTMI interface." ] # [ inline ( always ) ] pub fn debug_interface_hold ( & mut self ) -> DEBUG_INTERFACE_HOLD_W { DEBUG_INTERFACE_HOLD_W { w : self } } # [ doc = "Bits 2:3 - This bit field selects whether to connect pulldown resistors on the USB_DP/USB_DM pins if the corresponding pulldown overdrive mode is enabled through USBPHY_DEBUG\\[5:4} Set bit 3 to value 1'b1 to connect the 15ohm pulldown on USB_DP line" ] # [ inline ( always ) ] pub fn hstpulldown ( & mut self ) -> HSTPULLDOWN_W { HSTPULLDOWN_W { w : self } } # [ doc = "Bits 4:5 - This bit field selects host pulldown overdrive mode" ] # [ inline ( always ) ] pub fn enhstpulldown ( & mut self ) -> ENHSTPULLDOWN_W { ENHSTPULLDOWN_W { w : self } } # [ doc = "Bits 8:11 - Delay in between the end of transmit to the beginning of receive" ] # [ inline ( always ) ] pub fn tx2rxcount ( & mut self ) -> TX2RXCOUNT_W { TX2RXCOUNT_W { w : self } } # [ doc = "Bit 12 - Set this bit to allow a countdown to transition in between TX and RX." ] # [ inline ( always ) ] pub fn entx2rxcount ( & mut self ) -> ENTX2RXCOUNT_W { ENTX2RXCOUNT_W { w : self } } # [ doc = "Bits 16:20 - Delay in between the detection of squelch to the reset of high-speed RX." ] # [ inline ( always ) ] pub fn squelchresetcount ( & mut self ) -> SQUELCHRESETCOUNT_W { SQUELCHRESETCOUNT_W { w : self } } # [ doc = "Bit 24 - Set bit to allow squelch to reset high-speed receive." ] # [ inline ( always ) ] pub fn ensquelchreset ( & mut self ) -> ENSQUELCHRESET_W { ENSQUELCHRESET_W { w : self } } # [ doc = "Bits 25:28 - Duration of RESET in terms of the number of 480-MHz cycles." ] # [ inline ( always ) ] pub fn squelchresetlength ( & mut self ) -> SQUELCHRESETLENGTH_W { SQUELCHRESETLENGTH_W { w : self } } # [ doc = "Bit 29 - Choose to trigger the host resume SE0 with HOST_FORCE_LS_SE0 = 0 or UTMI_SUSPEND = 1." ] # [ inline ( always ) ] pub fn host_resume_debug ( & mut self ) -> HOST_RESUME_DEBUG_W { HOST_RESUME_DEBUG_W { w : self } } # [ doc = "Bit 30 - Gate Test Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & mut self ) -> CLKGATE_W { CLKGATE_W { w : self } } } } # [ doc = "USB PHY Debug Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug_clr](debug_clr) module" ] pub type DEBUG_CLR = crate :: Reg < u32 , _DEBUG_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG_CLR ; # [ doc = "`read()` method returns [debug_clr::R](debug_clr::R) reader structure" ] impl crate :: Readable for DEBUG_CLR { } # [ doc = "`write(|w| ..)` method takes [debug_clr::W](debug_clr::W) writer structure" ] impl crate :: Writable for DEBUG_CLR { } # [ doc = "USB PHY Debug Register" ] pub mod debug_clr { # [ doc = "Reader of register DEBUG_CLR" ] pub type R = crate :: R < u32 , super :: DEBUG_CLR > ; # [ doc = "Writer for register DEBUG_CLR" ] pub type W = crate :: W < u32 , super :: DEBUG_CLR > ; # [ doc = "Register DEBUG_CLR `reset()`'s with value 0x7f18_0000" ] impl crate :: ResetValue for super :: DEBUG_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7f18_0000 } } # [ doc = "Reader of field `OTGIDPIOLOCK`" ] pub type OTGIDPIOLOCK_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `OTGIDPIOLOCK`" ] pub struct OTGIDPIOLOCK_W < 'a > { w : & 'a mut W , } impl < 'a > OTGIDPIOLOCK_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `DEBUG_INTERFACE_HOLD`" ] pub type DEBUG_INTERFACE_HOLD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEBUG_INTERFACE_HOLD`" ] pub struct DEBUG_INTERFACE_HOLD_W < 'a > { w : & 'a mut W , } impl < 'a > DEBUG_INTERFACE_HOLD_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 } } # [ doc = "Reader of field `HSTPULLDOWN`" ] pub type HSTPULLDOWN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HSTPULLDOWN`" ] pub struct HSTPULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > HSTPULLDOWN_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 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Reader of field `ENHSTPULLDOWN`" ] pub type ENHSTPULLDOWN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ENHSTPULLDOWN`" ] pub struct ENHSTPULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > ENHSTPULLDOWN_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 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TX2RXCOUNT`" ] pub type TX2RXCOUNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TX2RXCOUNT`" ] pub struct TX2RXCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > TX2RXCOUNT_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `ENTX2RXCOUNT`" ] pub type ENTX2RXCOUNT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENTX2RXCOUNT`" ] pub struct ENTX2RXCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > ENTX2RXCOUNT_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `SQUELCHRESETCOUNT`" ] pub type SQUELCHRESETCOUNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SQUELCHRESETCOUNT`" ] pub struct SQUELCHRESETCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > SQUELCHRESETCOUNT_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } # [ doc = "Reader of field `ENSQUELCHRESET`" ] pub type ENSQUELCHRESET_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENSQUELCHRESET`" ] pub struct ENSQUELCHRESET_W < 'a > { w : & 'a mut W , } impl < 'a > ENSQUELCHRESET_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 = "Reader of field `SQUELCHRESETLENGTH`" ] pub type SQUELCHRESETLENGTH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SQUELCHRESETLENGTH`" ] pub struct SQUELCHRESETLENGTH_W < 'a > { w : & 'a mut W , } impl < 'a > SQUELCHRESETLENGTH_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 & ! ( 0x0f << 25 ) ) | ( ( ( value as u32 ) & 0x0f ) << 25 ) ; self . w } } # [ doc = "Reader of field `HOST_RESUME_DEBUG`" ] pub type HOST_RESUME_DEBUG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOST_RESUME_DEBUG`" ] pub struct HOST_RESUME_DEBUG_W < 'a > { w : & 'a mut W , } impl < 'a > HOST_RESUME_DEBUG_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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Reader of field `CLKGATE`" ] pub type CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CLKGATE`" ] pub struct CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKGATE_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Once OTG ID from USBPHY_STATUS_OTGID_STATUS is sampled, use this to hold the value" ] # [ inline ( always ) ] pub fn otgidpiolock ( & self ) -> OTGIDPIOLOCK_R { OTGIDPIOLOCK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Use holding registers to assist in timing for external UTMI interface." ] # [ inline ( always ) ] pub fn debug_interface_hold ( & self ) -> DEBUG_INTERFACE_HOLD_R { DEBUG_INTERFACE_HOLD_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - This bit field selects whether to connect pulldown resistors on the USB_DP/USB_DM pins if the corresponding pulldown overdrive mode is enabled through USBPHY_DEBUG\\[5:4} Set bit 3 to value 1'b1 to connect the 15ohm pulldown on USB_DP line" ] # [ inline ( always ) ] pub fn hstpulldown ( & self ) -> HSTPULLDOWN_R { HSTPULLDOWN_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - This bit field selects host pulldown overdrive mode" ] # [ inline ( always ) ] pub fn enhstpulldown ( & self ) -> ENHSTPULLDOWN_R { ENHSTPULLDOWN_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 8:11 - Delay in between the end of transmit to the beginning of receive" ] # [ inline ( always ) ] pub fn tx2rxcount ( & self ) -> TX2RXCOUNT_R { TX2RXCOUNT_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bit 12 - Set this bit to allow a countdown to transition in between TX and RX." ] # [ inline ( always ) ] pub fn entx2rxcount ( & self ) -> ENTX2RXCOUNT_R { ENTX2RXCOUNT_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:20 - Delay in between the detection of squelch to the reset of high-speed RX." ] # [ inline ( always ) ] pub fn squelchresetcount ( & self ) -> SQUELCHRESETCOUNT_R { SQUELCHRESETCOUNT_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bit 24 - Set bit to allow squelch to reset high-speed receive." ] # [ inline ( always ) ] pub fn ensquelchreset ( & self ) -> ENSQUELCHRESET_R { ENSQUELCHRESET_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bits 25:28 - Duration of RESET in terms of the number of 480-MHz cycles." ] # [ inline ( always ) ] pub fn squelchresetlength ( & self ) -> SQUELCHRESETLENGTH_R { SQUELCHRESETLENGTH_R :: new ( ( ( self . bits >> 25 ) & 0x0f ) as u8 ) } # [ doc = "Bit 29 - Choose to trigger the host resume SE0 with HOST_FORCE_LS_SE0 = 0 or UTMI_SUSPEND = 1." ] # [ inline ( always ) ] pub fn host_resume_debug ( & self ) -> HOST_RESUME_DEBUG_R { HOST_RESUME_DEBUG_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Gate Test Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & self ) -> CLKGATE_R { CLKGATE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Once OTG ID from USBPHY_STATUS_OTGID_STATUS is sampled, use this to hold the value" ] # [ inline ( always ) ] pub fn otgidpiolock ( & mut self ) -> OTGIDPIOLOCK_W { OTGIDPIOLOCK_W { w : self } } # [ doc = "Bit 1 - Use holding registers to assist in timing for external UTMI interface." ] # [ inline ( always ) ] pub fn debug_interface_hold ( & mut self ) -> DEBUG_INTERFACE_HOLD_W { DEBUG_INTERFACE_HOLD_W { w : self } } # [ doc = "Bits 2:3 - This bit field selects whether to connect pulldown resistors on the USB_DP/USB_DM pins if the corresponding pulldown overdrive mode is enabled through USBPHY_DEBUG\\[5:4} Set bit 3 to value 1'b1 to connect the 15ohm pulldown on USB_DP line" ] # [ inline ( always ) ] pub fn hstpulldown ( & mut self ) -> HSTPULLDOWN_W { HSTPULLDOWN_W { w : self } } # [ doc = "Bits 4:5 - This bit field selects host pulldown overdrive mode" ] # [ inline ( always ) ] pub fn enhstpulldown ( & mut self ) -> ENHSTPULLDOWN_W { ENHSTPULLDOWN_W { w : self } } # [ doc = "Bits 8:11 - Delay in between the end of transmit to the beginning of receive" ] # [ inline ( always ) ] pub fn tx2rxcount ( & mut self ) -> TX2RXCOUNT_W { TX2RXCOUNT_W { w : self } } # [ doc = "Bit 12 - Set this bit to allow a countdown to transition in between TX and RX." ] # [ inline ( always ) ] pub fn entx2rxcount ( & mut self ) -> ENTX2RXCOUNT_W { ENTX2RXCOUNT_W { w : self } } # [ doc = "Bits 16:20 - Delay in between the detection of squelch to the reset of high-speed RX." ] # [ inline ( always ) ] pub fn squelchresetcount ( & mut self ) -> SQUELCHRESETCOUNT_W { SQUELCHRESETCOUNT_W { w : self } } # [ doc = "Bit 24 - Set bit to allow squelch to reset high-speed receive." ] # [ inline ( always ) ] pub fn ensquelchreset ( & mut self ) -> ENSQUELCHRESET_W { ENSQUELCHRESET_W { w : self } } # [ doc = "Bits 25:28 - Duration of RESET in terms of the number of 480-MHz cycles." ] # [ inline ( always ) ] pub fn squelchresetlength ( & mut self ) -> SQUELCHRESETLENGTH_W { SQUELCHRESETLENGTH_W { w : self } } # [ doc = "Bit 29 - Choose to trigger the host resume SE0 with HOST_FORCE_LS_SE0 = 0 or UTMI_SUSPEND = 1." ] # [ inline ( always ) ] pub fn host_resume_debug ( & mut self ) -> HOST_RESUME_DEBUG_W { HOST_RESUME_DEBUG_W { w : self } } # [ doc = "Bit 30 - Gate Test Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & mut self ) -> CLKGATE_W { CLKGATE_W { w : self } } } } # [ doc = "USB PHY Debug Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug_tog](debug_tog) module" ] pub type DEBUG_TOG = crate :: Reg < u32 , _DEBUG_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG_TOG ; # [ doc = "`read()` method returns [debug_tog::R](debug_tog::R) reader structure" ] impl crate :: Readable for DEBUG_TOG { } # [ doc = "`write(|w| ..)` method takes [debug_tog::W](debug_tog::W) writer structure" ] impl crate :: Writable for DEBUG_TOG { } # [ doc = "USB PHY Debug Register" ] pub mod debug_tog { # [ doc = "Reader of register DEBUG_TOG" ] pub type R = crate :: R < u32 , super :: DEBUG_TOG > ; # [ doc = "Writer for register DEBUG_TOG" ] pub type W = crate :: W < u32 , super :: DEBUG_TOG > ; # [ doc = "Register DEBUG_TOG `reset()`'s with value 0x7f18_0000" ] impl crate :: ResetValue for super :: DEBUG_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x7f18_0000 } } # [ doc = "Reader of field `OTGIDPIOLOCK`" ] pub type OTGIDPIOLOCK_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `OTGIDPIOLOCK`" ] pub struct OTGIDPIOLOCK_W < 'a > { w : & 'a mut W , } impl < 'a > OTGIDPIOLOCK_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `DEBUG_INTERFACE_HOLD`" ] pub type DEBUG_INTERFACE_HOLD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEBUG_INTERFACE_HOLD`" ] pub struct DEBUG_INTERFACE_HOLD_W < 'a > { w : & 'a mut W , } impl < 'a > DEBUG_INTERFACE_HOLD_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 } } # [ doc = "Reader of field `HSTPULLDOWN`" ] pub type HSTPULLDOWN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `HSTPULLDOWN`" ] pub struct HSTPULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > HSTPULLDOWN_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 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Reader of field `ENHSTPULLDOWN`" ] pub type ENHSTPULLDOWN_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ENHSTPULLDOWN`" ] pub struct ENHSTPULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > ENHSTPULLDOWN_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 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TX2RXCOUNT`" ] pub type TX2RXCOUNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TX2RXCOUNT`" ] pub struct TX2RXCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > TX2RXCOUNT_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 & ! ( 0x0f << 8 ) ) | ( ( ( value as u32 ) & 0x0f ) << 8 ) ; self . w } } # [ doc = "Reader of field `ENTX2RXCOUNT`" ] pub type ENTX2RXCOUNT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENTX2RXCOUNT`" ] pub struct ENTX2RXCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > ENTX2RXCOUNT_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `SQUELCHRESETCOUNT`" ] pub type SQUELCHRESETCOUNT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SQUELCHRESETCOUNT`" ] pub struct SQUELCHRESETCOUNT_W < 'a > { w : & 'a mut W , } impl < 'a > SQUELCHRESETCOUNT_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } # [ doc = "Reader of field `ENSQUELCHRESET`" ] pub type ENSQUELCHRESET_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ENSQUELCHRESET`" ] pub struct ENSQUELCHRESET_W < 'a > { w : & 'a mut W , } impl < 'a > ENSQUELCHRESET_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 = "Reader of field `SQUELCHRESETLENGTH`" ] pub type SQUELCHRESETLENGTH_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `SQUELCHRESETLENGTH`" ] pub struct SQUELCHRESETLENGTH_W < 'a > { w : & 'a mut W , } impl < 'a > SQUELCHRESETLENGTH_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 & ! ( 0x0f << 25 ) ) | ( ( ( value as u32 ) & 0x0f ) << 25 ) ; self . w } } # [ doc = "Reader of field `HOST_RESUME_DEBUG`" ] pub type HOST_RESUME_DEBUG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `HOST_RESUME_DEBUG`" ] pub struct HOST_RESUME_DEBUG_W < 'a > { w : & 'a mut W , } impl < 'a > HOST_RESUME_DEBUG_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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Reader of field `CLKGATE`" ] pub type CLKGATE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CLKGATE`" ] pub struct CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKGATE_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 0 - Once OTG ID from USBPHY_STATUS_OTGID_STATUS is sampled, use this to hold the value" ] # [ inline ( always ) ] pub fn otgidpiolock ( & self ) -> OTGIDPIOLOCK_R { OTGIDPIOLOCK_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Use holding registers to assist in timing for external UTMI interface." ] # [ inline ( always ) ] pub fn debug_interface_hold ( & self ) -> DEBUG_INTERFACE_HOLD_R { DEBUG_INTERFACE_HOLD_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - This bit field selects whether to connect pulldown resistors on the USB_DP/USB_DM pins if the corresponding pulldown overdrive mode is enabled through USBPHY_DEBUG\\[5:4} Set bit 3 to value 1'b1 to connect the 15ohm pulldown on USB_DP line" ] # [ inline ( always ) ] pub fn hstpulldown ( & self ) -> HSTPULLDOWN_R { HSTPULLDOWN_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - This bit field selects host pulldown overdrive mode" ] # [ inline ( always ) ] pub fn enhstpulldown ( & self ) -> ENHSTPULLDOWN_R { ENHSTPULLDOWN_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 8:11 - Delay in between the end of transmit to the beginning of receive" ] # [ inline ( always ) ] pub fn tx2rxcount ( & self ) -> TX2RXCOUNT_R { TX2RXCOUNT_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bit 12 - Set this bit to allow a countdown to transition in between TX and RX." ] # [ inline ( always ) ] pub fn entx2rxcount ( & self ) -> ENTX2RXCOUNT_R { ENTX2RXCOUNT_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:20 - Delay in between the detection of squelch to the reset of high-speed RX." ] # [ inline ( always ) ] pub fn squelchresetcount ( & self ) -> SQUELCHRESETCOUNT_R { SQUELCHRESETCOUNT_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } # [ doc = "Bit 24 - Set bit to allow squelch to reset high-speed receive." ] # [ inline ( always ) ] pub fn ensquelchreset ( & self ) -> ENSQUELCHRESET_R { ENSQUELCHRESET_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bits 25:28 - Duration of RESET in terms of the number of 480-MHz cycles." ] # [ inline ( always ) ] pub fn squelchresetlength ( & self ) -> SQUELCHRESETLENGTH_R { SQUELCHRESETLENGTH_R :: new ( ( ( self . bits >> 25 ) & 0x0f ) as u8 ) } # [ doc = "Bit 29 - Choose to trigger the host resume SE0 with HOST_FORCE_LS_SE0 = 0 or UTMI_SUSPEND = 1." ] # [ inline ( always ) ] pub fn host_resume_debug ( & self ) -> HOST_RESUME_DEBUG_R { HOST_RESUME_DEBUG_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Gate Test Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & self ) -> CLKGATE_R { CLKGATE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Once OTG ID from USBPHY_STATUS_OTGID_STATUS is sampled, use this to hold the value" ] # [ inline ( always ) ] pub fn otgidpiolock ( & mut self ) -> OTGIDPIOLOCK_W { OTGIDPIOLOCK_W { w : self } } # [ doc = "Bit 1 - Use holding registers to assist in timing for external UTMI interface." ] # [ inline ( always ) ] pub fn debug_interface_hold ( & mut self ) -> DEBUG_INTERFACE_HOLD_W { DEBUG_INTERFACE_HOLD_W { w : self } } # [ doc = "Bits 2:3 - This bit field selects whether to connect pulldown resistors on the USB_DP/USB_DM pins if the corresponding pulldown overdrive mode is enabled through USBPHY_DEBUG\\[5:4} Set bit 3 to value 1'b1 to connect the 15ohm pulldown on USB_DP line" ] # [ inline ( always ) ] pub fn hstpulldown ( & mut self ) -> HSTPULLDOWN_W { HSTPULLDOWN_W { w : self } } # [ doc = "Bits 4:5 - This bit field selects host pulldown overdrive mode" ] # [ inline ( always ) ] pub fn enhstpulldown ( & mut self ) -> ENHSTPULLDOWN_W { ENHSTPULLDOWN_W { w : self } } # [ doc = "Bits 8:11 - Delay in between the end of transmit to the beginning of receive" ] # [ inline ( always ) ] pub fn tx2rxcount ( & mut self ) -> TX2RXCOUNT_W { TX2RXCOUNT_W { w : self } } # [ doc = "Bit 12 - Set this bit to allow a countdown to transition in between TX and RX." ] # [ inline ( always ) ] pub fn entx2rxcount ( & mut self ) -> ENTX2RXCOUNT_W { ENTX2RXCOUNT_W { w : self } } # [ doc = "Bits 16:20 - Delay in between the detection of squelch to the reset of high-speed RX." ] # [ inline ( always ) ] pub fn squelchresetcount ( & mut self ) -> SQUELCHRESETCOUNT_W { SQUELCHRESETCOUNT_W { w : self } } # [ doc = "Bit 24 - Set bit to allow squelch to reset high-speed receive." ] # [ inline ( always ) ] pub fn ensquelchreset ( & mut self ) -> ENSQUELCHRESET_W { ENSQUELCHRESET_W { w : self } } # [ doc = "Bits 25:28 - Duration of RESET in terms of the number of 480-MHz cycles." ] # [ inline ( always ) ] pub fn squelchresetlength ( & mut self ) -> SQUELCHRESETLENGTH_W { SQUELCHRESETLENGTH_W { w : self } } # [ doc = "Bit 29 - Choose to trigger the host resume SE0 with HOST_FORCE_LS_SE0 = 0 or UTMI_SUSPEND = 1." ] # [ inline ( always ) ] pub fn host_resume_debug ( & mut self ) -> HOST_RESUME_DEBUG_W { HOST_RESUME_DEBUG_W { w : self } } # [ doc = "Bit 30 - Gate Test Clocks" ] # [ inline ( always ) ] pub fn clkgate ( & mut self ) -> CLKGATE_W { CLKGATE_W { w : self } } } } # [ doc = "UTMI Debug Status Register 0\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug0_status](debug0_status) module" ] pub type DEBUG0_STATUS = crate :: Reg < u32 , _DEBUG0_STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG0_STATUS ; # [ doc = "`read()` method returns [debug0_status::R](debug0_status::R) reader structure" ] impl crate :: Readable for DEBUG0_STATUS { } # [ doc = "UTMI Debug Status Register 0" ] pub mod debug0_status { # [ doc = "Reader of register DEBUG0_STATUS" ] pub type R = crate :: R < u32 , super :: DEBUG0_STATUS > ; # [ doc = "Reader of field `LOOP_BACK_FAIL_COUNT`" ] pub type LOOP_BACK_FAIL_COUNT_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `UTMI_RXERROR_FAIL_COUNT`" ] pub type UTMI_RXERROR_FAIL_COUNT_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `SQUELCH_COUNT`" ] pub type SQUELCH_COUNT_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:15 - Running count of the failed pseudo-random generator loopback" ] # [ inline ( always ) ] pub fn loop_back_fail_count ( & self ) -> LOOP_BACK_FAIL_COUNT_R { LOOP_BACK_FAIL_COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:25 - Running count of the UTMI_RXERROR." ] # [ inline ( always ) ] pub fn utmi_rxerror_fail_count ( & self ) -> UTMI_RXERROR_FAIL_COUNT_R { UTMI_RXERROR_FAIL_COUNT_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } # [ doc = "Bits 26:31 - Running count of the squelch reset instead of normal end for HS RX." ] # [ inline ( always ) ] pub fn squelch_count ( & self ) -> SQUELCH_COUNT_R { SQUELCH_COUNT_R :: new ( ( ( self . bits >> 26 ) & 0x3f ) as u8 ) } } } # [ doc = "UTMI Debug Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug1](debug1) module" ] pub type DEBUG1 = crate :: Reg < u32 , _DEBUG1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG1 ; # [ doc = "`read()` method returns [debug1::R](debug1::R) reader structure" ] impl crate :: Readable for DEBUG1 { } # [ doc = "`write(|w| ..)` method takes [debug1::W](debug1::W) writer structure" ] impl crate :: Writable for DEBUG1 { } # [ doc = "UTMI Debug Status Register 1" ] pub mod debug1 { # [ doc = "Reader of register DEBUG1" ] pub type R = crate :: R < u32 , super :: DEBUG1 > ; # [ doc = "Writer for register DEBUG1" ] pub type W = crate :: W < u32 , super :: DEBUG1 > ; # [ doc = "Register DEBUG1 `reset()`'s with value 0x1000" ] impl crate :: ResetValue for super :: DEBUG1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1000 } } # [ doc = "Delay increment of the rise of squelch:\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENTAILADJVD_A { # [ doc = "0: Delay is nominal" ] _00 , # [ doc = "1: Delay is +20%" ] _01 , # [ doc = "2: Delay is -20%" ] _10 , # [ doc = "3: Delay is -40%" ] _11 } impl From < ENTAILADJVD_A > for u8 { # [ inline ( always ) ] fn from ( variant : ENTAILADJVD_A ) -> Self { match variant { ENTAILADJVD_A :: _00 => 0 , ENTAILADJVD_A :: _01 => 1 , ENTAILADJVD_A :: _10 => 2 , ENTAILADJVD_A :: _11 => 3 } } } # [ doc = "Reader of field `ENTAILADJVD`" ] pub type ENTAILADJVD_R = crate :: R < u8 , ENTAILADJVD_A > ; impl ENTAILADJVD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENTAILADJVD_A { match self . bits { 0 => ENTAILADJVD_A :: _00 , 1 => ENTAILADJVD_A :: _01 , 2 => ENTAILADJVD_A :: _10 , 3 => ENTAILADJVD_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ENTAILADJVD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ENTAILADJVD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ENTAILADJVD_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ENTAILADJVD_A :: _11 } } # [ doc = "Write proxy for field `ENTAILADJVD`" ] pub struct ENTAILADJVD_W < 'a > { w : & 'a mut W , } impl < 'a > ENTAILADJVD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENTAILADJVD_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay is nominal" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _00 ) } # [ doc = "Delay is +20%" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _01 ) } # [ doc = "Delay is -20%" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _10 ) } # [ doc = "Delay is -40%" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 13 ) ) | ( ( ( value as u32 ) & 0x03 ) << 13 ) ; self . w } } impl R { # [ doc = "Bits 13:14 - Delay increment of the rise of squelch:" ] # [ inline ( always ) ] pub fn entailadjvd ( & self ) -> ENTAILADJVD_R { ENTAILADJVD_R :: new ( ( ( self . bits >> 13 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 13:14 - Delay increment of the rise of squelch:" ] # [ inline ( always ) ] pub fn entailadjvd ( & mut self ) -> ENTAILADJVD_W { ENTAILADJVD_W { w : self } } } } # [ doc = "UTMI Debug Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug1_set](debug1_set) module" ] pub type DEBUG1_SET = crate :: Reg < u32 , _DEBUG1_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG1_SET ; # [ doc = "`read()` method returns [debug1_set::R](debug1_set::R) reader structure" ] impl crate :: Readable for DEBUG1_SET { } # [ doc = "`write(|w| ..)` method takes [debug1_set::W](debug1_set::W) writer structure" ] impl crate :: Writable for DEBUG1_SET { } # [ doc = "UTMI Debug Status Register 1" ] pub mod debug1_set { # [ doc = "Reader of register DEBUG1_SET" ] pub type R = crate :: R < u32 , super :: DEBUG1_SET > ; # [ doc = "Writer for register DEBUG1_SET" ] pub type W = crate :: W < u32 , super :: DEBUG1_SET > ; # [ doc = "Register DEBUG1_SET `reset()`'s with value 0x1000" ] impl crate :: ResetValue for super :: DEBUG1_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1000 } } # [ doc = "Delay increment of the rise of squelch:\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENTAILADJVD_A { # [ doc = "0: Delay is nominal" ] _00 , # [ doc = "1: Delay is +20%" ] _01 , # [ doc = "2: Delay is -20%" ] _10 , # [ doc = "3: Delay is -40%" ] _11 } impl From < ENTAILADJVD_A > for u8 { # [ inline ( always ) ] fn from ( variant : ENTAILADJVD_A ) -> Self { match variant { ENTAILADJVD_A :: _00 => 0 , ENTAILADJVD_A :: _01 => 1 , ENTAILADJVD_A :: _10 => 2 , ENTAILADJVD_A :: _11 => 3 } } } # [ doc = "Reader of field `ENTAILADJVD`" ] pub type ENTAILADJVD_R = crate :: R < u8 , ENTAILADJVD_A > ; impl ENTAILADJVD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENTAILADJVD_A { match self . bits { 0 => ENTAILADJVD_A :: _00 , 1 => ENTAILADJVD_A :: _01 , 2 => ENTAILADJVD_A :: _10 , 3 => ENTAILADJVD_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ENTAILADJVD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ENTAILADJVD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ENTAILADJVD_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ENTAILADJVD_A :: _11 } } # [ doc = "Write proxy for field `ENTAILADJVD`" ] pub struct ENTAILADJVD_W < 'a > { w : & 'a mut W , } impl < 'a > ENTAILADJVD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENTAILADJVD_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay is nominal" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _00 ) } # [ doc = "Delay is +20%" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _01 ) } # [ doc = "Delay is -20%" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _10 ) } # [ doc = "Delay is -40%" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 13 ) ) | ( ( ( value as u32 ) & 0x03 ) << 13 ) ; self . w } } impl R { # [ doc = "Bits 13:14 - Delay increment of the rise of squelch:" ] # [ inline ( always ) ] pub fn entailadjvd ( & self ) -> ENTAILADJVD_R { ENTAILADJVD_R :: new ( ( ( self . bits >> 13 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 13:14 - Delay increment of the rise of squelch:" ] # [ inline ( always ) ] pub fn entailadjvd ( & mut self ) -> ENTAILADJVD_W { ENTAILADJVD_W { w : self } } } } # [ doc = "UTMI Debug Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug1_clr](debug1_clr) module" ] pub type DEBUG1_CLR = crate :: Reg < u32 , _DEBUG1_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG1_CLR ; # [ doc = "`read()` method returns [debug1_clr::R](debug1_clr::R) reader structure" ] impl crate :: Readable for DEBUG1_CLR { } # [ doc = "`write(|w| ..)` method takes [debug1_clr::W](debug1_clr::W) writer structure" ] impl crate :: Writable for DEBUG1_CLR { } # [ doc = "UTMI Debug Status Register 1" ] pub mod debug1_clr { # [ doc = "Reader of register DEBUG1_CLR" ] pub type R = crate :: R < u32 , super :: DEBUG1_CLR > ; # [ doc = "Writer for register DEBUG1_CLR" ] pub type W = crate :: W < u32 , super :: DEBUG1_CLR > ; # [ doc = "Register DEBUG1_CLR `reset()`'s with value 0x1000" ] impl crate :: ResetValue for super :: DEBUG1_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1000 } } # [ doc = "Delay increment of the rise of squelch:\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENTAILADJVD_A { # [ doc = "0: Delay is nominal" ] _00 , # [ doc = "1: Delay is +20%" ] _01 , # [ doc = "2: Delay is -20%" ] _10 , # [ doc = "3: Delay is -40%" ] _11 } impl From < ENTAILADJVD_A > for u8 { # [ inline ( always ) ] fn from ( variant : ENTAILADJVD_A ) -> Self { match variant { ENTAILADJVD_A :: _00 => 0 , ENTAILADJVD_A :: _01 => 1 , ENTAILADJVD_A :: _10 => 2 , ENTAILADJVD_A :: _11 => 3 } } } # [ doc = "Reader of field `ENTAILADJVD`" ] pub type ENTAILADJVD_R = crate :: R < u8 , ENTAILADJVD_A > ; impl ENTAILADJVD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENTAILADJVD_A { match self . bits { 0 => ENTAILADJVD_A :: _00 , 1 => ENTAILADJVD_A :: _01 , 2 => ENTAILADJVD_A :: _10 , 3 => ENTAILADJVD_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ENTAILADJVD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ENTAILADJVD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ENTAILADJVD_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ENTAILADJVD_A :: _11 } } # [ doc = "Write proxy for field `ENTAILADJVD`" ] pub struct ENTAILADJVD_W < 'a > { w : & 'a mut W , } impl < 'a > ENTAILADJVD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENTAILADJVD_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay is nominal" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _00 ) } # [ doc = "Delay is +20%" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _01 ) } # [ doc = "Delay is -20%" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _10 ) } # [ doc = "Delay is -40%" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 13 ) ) | ( ( ( value as u32 ) & 0x03 ) << 13 ) ; self . w } } impl R { # [ doc = "Bits 13:14 - Delay increment of the rise of squelch:" ] # [ inline ( always ) ] pub fn entailadjvd ( & self ) -> ENTAILADJVD_R { ENTAILADJVD_R :: new ( ( ( self . bits >> 13 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 13:14 - Delay increment of the rise of squelch:" ] # [ inline ( always ) ] pub fn entailadjvd ( & mut self ) -> ENTAILADJVD_W { ENTAILADJVD_W { w : self } } } } # [ doc = "UTMI Debug Status Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [debug1_tog](debug1_tog) module" ] pub type DEBUG1_TOG = crate :: Reg < u32 , _DEBUG1_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DEBUG1_TOG ; # [ doc = "`read()` method returns [debug1_tog::R](debug1_tog::R) reader structure" ] impl crate :: Readable for DEBUG1_TOG { } # [ doc = "`write(|w| ..)` method takes [debug1_tog::W](debug1_tog::W) writer structure" ] impl crate :: Writable for DEBUG1_TOG { } # [ doc = "UTMI Debug Status Register 1" ] pub mod debug1_tog { # [ doc = "Reader of register DEBUG1_TOG" ] pub type R = crate :: R < u32 , super :: DEBUG1_TOG > ; # [ doc = "Writer for register DEBUG1_TOG" ] pub type W = crate :: W < u32 , super :: DEBUG1_TOG > ; # [ doc = "Register DEBUG1_TOG `reset()`'s with value 0x1000" ] impl crate :: ResetValue for super :: DEBUG1_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1000 } } # [ doc = "Delay increment of the rise of squelch:\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENTAILADJVD_A { # [ doc = "0: Delay is nominal" ] _00 , # [ doc = "1: Delay is +20%" ] _01 , # [ doc = "2: Delay is -20%" ] _10 , # [ doc = "3: Delay is -40%" ] _11 } impl From < ENTAILADJVD_A > for u8 { # [ inline ( always ) ] fn from ( variant : ENTAILADJVD_A ) -> Self { match variant { ENTAILADJVD_A :: _00 => 0 , ENTAILADJVD_A :: _01 => 1 , ENTAILADJVD_A :: _10 => 2 , ENTAILADJVD_A :: _11 => 3 } } } # [ doc = "Reader of field `ENTAILADJVD`" ] pub type ENTAILADJVD_R = crate :: R < u8 , ENTAILADJVD_A > ; impl ENTAILADJVD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENTAILADJVD_A { match self . bits { 0 => ENTAILADJVD_A :: _00 , 1 => ENTAILADJVD_A :: _01 , 2 => ENTAILADJVD_A :: _10 , 3 => ENTAILADJVD_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == ENTAILADJVD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == ENTAILADJVD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == ENTAILADJVD_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == ENTAILADJVD_A :: _11 } } # [ doc = "Write proxy for field `ENTAILADJVD`" ] pub struct ENTAILADJVD_W < 'a > { w : & 'a mut W , } impl < 'a > ENTAILADJVD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENTAILADJVD_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Delay is nominal" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _00 ) } # [ doc = "Delay is +20%" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _01 ) } # [ doc = "Delay is -20%" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _10 ) } # [ doc = "Delay is -40%" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( ENTAILADJVD_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 13 ) ) | ( ( ( value as u32 ) & 0x03 ) << 13 ) ; self . w } } impl R { # [ doc = "Bits 13:14 - Delay increment of the rise of squelch:" ] # [ inline ( always ) ] pub fn entailadjvd ( & self ) -> ENTAILADJVD_R { ENTAILADJVD_R :: new ( ( ( self . bits >> 13 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 13:14 - Delay increment of the rise of squelch:" ] # [ inline ( always ) ] pub fn entailadjvd ( & mut self ) -> ENTAILADJVD_W { ENTAILADJVD_W { w : self } } } } # [ doc = "UTMI RTL Version\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [version](version) module" ] pub type VERSION = crate :: Reg < u32 , _VERSION > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _VERSION ; # [ doc = "`read()` method returns [version::R](version::R) reader structure" ] impl crate :: Readable for VERSION { } # [ doc = "UTMI RTL Version" ] pub mod version { # [ doc = "Reader of register VERSION" ] pub type R = crate :: R < u32 , super :: VERSION > ; # [ doc = "Reader of field `STEP`" ] pub type STEP_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `MINOR`" ] pub type MINOR_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `MAJOR`" ] pub type MAJOR_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:15 - Fixed read-only value reflecting the stepping of the RTL version." ] # [ inline ( always ) ] pub fn step ( & self ) -> STEP_R { STEP_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:23 - Fixed read-only value reflecting the MINOR field of the RTL version." ] # [ inline ( always ) ] pub fn minor ( & self ) -> MINOR_R { MINOR_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Fixed read-only value reflecting the MAJOR field of the RTL version." ] # [ inline ( always ) ] pub fn major ( & self ) -> MAJOR_R { MAJOR_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } } # [ doc = "USB PHY PLL Control/Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pll_sic](pll_sic) module" ] pub type PLL_SIC = crate :: Reg < u32 , _PLL_SIC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PLL_SIC ; # [ doc = "`read()` method returns [pll_sic::R](pll_sic::R) reader structure" ] impl crate :: Readable for PLL_SIC { } # [ doc = "`write(|w| ..)` method takes [pll_sic::W](pll_sic::W) writer structure" ] impl crate :: Writable for PLL_SIC { } # [ doc = "USB PHY PLL Control/Status Register" ] pub mod pll_sic { # [ doc = "Reader of register PLL_SIC" ] pub type R = crate :: R < u32 , super :: PLL_SIC > ; # [ doc = "Writer for register PLL_SIC" ] pub type W = crate :: W < u32 , super :: PLL_SIC > ; # [ doc = "Register PLL_SIC `reset()`'s with value 0x0001_2000" ] impl crate :: ResetValue for super :: PLL_SIC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_2000 } } # [ doc = "This field controls the USB PLL feedback loop divider\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_DIV_SEL_A { # [ doc = "0: PLL reference frequency = 24MHz" ] _00 , # [ doc = "1: PLL reference frequency = 16MHz" ] _01 } impl From < PLL_DIV_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PLL_DIV_SEL_A ) -> Self { match variant { PLL_DIV_SEL_A :: _00 => 0 , PLL_DIV_SEL_A :: _01 => 1 } } } # [ doc = "Reader of field `PLL_DIV_SEL`" ] pub type PLL_DIV_SEL_R = crate :: R < u8 , PLL_DIV_SEL_A > ; impl PLL_DIV_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PLL_DIV_SEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PLL_DIV_SEL_A :: _00 ) , 1 => Val ( PLL_DIV_SEL_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PLL_DIV_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PLL_DIV_SEL_A :: _01 } } # [ doc = "Write proxy for field `PLL_DIV_SEL`" ] pub struct PLL_DIV_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_DIV_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLL_DIV_SEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "PLL reference frequency = 24MHz" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PLL_DIV_SEL_A :: _00 ) } # [ doc = "PLL reference frequency = 16MHz" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PLL_DIV_SEL_A :: _01 ) } # [ 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 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Reader of field `PLL_EN_USB_CLKS`" ] pub type PLL_EN_USB_CLKS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_EN_USB_CLKS`" ] pub struct PLL_EN_USB_CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_EN_USB_CLKS_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 = "Reader of field `PLL_HOLD_RING_OFF`" ] pub type PLL_HOLD_RING_OFF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_HOLD_RING_OFF`" ] pub struct PLL_HOLD_RING_OFF_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_HOLD_RING_OFF_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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Reader of field `PLL_POWER`" ] pub type PLL_POWER_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_POWER`" ] pub struct PLL_POWER_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_POWER_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `PLL_ENABLE`" ] pub type PLL_ENABLE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_ENABLE`" ] pub struct PLL_ENABLE_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_ENABLE_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 = "Reader of field `PLL_BYPASS`" ] pub type PLL_BYPASS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_BYPASS`" ] pub struct PLL_BYPASS_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_BYPASS_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "USB PLL lock status indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_LOCK_A { # [ doc = "0: PLL is not currently locked" ] _0 , # [ doc = "1: PLL is currently locked" ] _1 } impl From < PLL_LOCK_A > for bool { # [ inline ( always ) ] fn from ( variant : PLL_LOCK_A ) -> Self { match variant { PLL_LOCK_A :: _0 => false , PLL_LOCK_A :: _1 => true } } } # [ doc = "Reader of field `PLL_LOCK`" ] pub type PLL_LOCK_R = crate :: R < bool , PLL_LOCK_A > ; impl PLL_LOCK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLL_LOCK_A { match self . bits { false => PLL_LOCK_A :: _0 , true => PLL_LOCK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLL_LOCK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLL_LOCK_A :: _1 } } impl R { # [ doc = "Bits 0:1 - This field controls the USB PLL feedback loop divider" ] # [ inline ( always ) ] pub fn pll_div_sel ( & self ) -> PLL_DIV_SEL_R { PLL_DIV_SEL_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Enable the USB clock output from the USB PHY PLL." ] # [ inline ( always ) ] pub fn pll_en_usb_clks ( & self ) -> PLL_EN_USB_CLKS_R { PLL_EN_USB_CLKS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Analog debug bit" ] # [ inline ( always ) ] pub fn pll_hold_ring_off ( & self ) -> PLL_HOLD_RING_OFF_R { PLL_HOLD_RING_OFF_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Power up the USB PLL." ] # [ inline ( always ) ] pub fn pll_power ( & self ) -> PLL_POWER_R { PLL_POWER_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Enable the clock output from the USB PLL." ] # [ inline ( always ) ] pub fn pll_enable ( & self ) -> PLL_ENABLE_R { PLL_ENABLE_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Bypass the USB PLL." ] # [ inline ( always ) ] pub fn pll_bypass ( & self ) -> PLL_BYPASS_R { PLL_BYPASS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - USB PLL lock status indicator" ] # [ inline ( always ) ] pub fn pll_lock ( & self ) -> PLL_LOCK_R { PLL_LOCK_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - This field controls the USB PLL feedback loop divider" ] # [ inline ( always ) ] pub fn pll_div_sel ( & mut self ) -> PLL_DIV_SEL_W { PLL_DIV_SEL_W { w : self } } # [ doc = "Bit 6 - Enable the USB clock output from the USB PHY PLL." ] # [ inline ( always ) ] pub fn pll_en_usb_clks ( & mut self ) -> PLL_EN_USB_CLKS_W { PLL_EN_USB_CLKS_W { w : self } } # [ doc = "Bit 11 - Analog debug bit" ] # [ inline ( always ) ] pub fn pll_hold_ring_off ( & mut self ) -> PLL_HOLD_RING_OFF_W { PLL_HOLD_RING_OFF_W { w : self } } # [ doc = "Bit 12 - Power up the USB PLL." ] # [ inline ( always ) ] pub fn pll_power ( & mut self ) -> PLL_POWER_W { PLL_POWER_W { w : self } } # [ doc = "Bit 13 - Enable the clock output from the USB PLL." ] # [ inline ( always ) ] pub fn pll_enable ( & mut self ) -> PLL_ENABLE_W { PLL_ENABLE_W { w : self } } # [ doc = "Bit 16 - Bypass the USB PLL." ] # [ inline ( always ) ] pub fn pll_bypass ( & mut self ) -> PLL_BYPASS_W { PLL_BYPASS_W { w : self } } } } # [ doc = "USB PHY PLL Control/Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pll_sic_set](pll_sic_set) module" ] pub type PLL_SIC_SET = crate :: Reg < u32 , _PLL_SIC_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PLL_SIC_SET ; # [ doc = "`read()` method returns [pll_sic_set::R](pll_sic_set::R) reader structure" ] impl crate :: Readable for PLL_SIC_SET { } # [ doc = "`write(|w| ..)` method takes [pll_sic_set::W](pll_sic_set::W) writer structure" ] impl crate :: Writable for PLL_SIC_SET { } # [ doc = "USB PHY PLL Control/Status Register" ] pub mod pll_sic_set { # [ doc = "Reader of register PLL_SIC_SET" ] pub type R = crate :: R < u32 , super :: PLL_SIC_SET > ; # [ doc = "Writer for register PLL_SIC_SET" ] pub type W = crate :: W < u32 , super :: PLL_SIC_SET > ; # [ doc = "Register PLL_SIC_SET `reset()`'s with value 0x0001_2000" ] impl crate :: ResetValue for super :: PLL_SIC_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_2000 } } # [ doc = "This field controls the USB PLL feedback loop divider\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_DIV_SEL_A { # [ doc = "0: PLL reference frequency = 24MHz" ] _00 , # [ doc = "1: PLL reference frequency = 16MHz" ] _01 } impl From < PLL_DIV_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PLL_DIV_SEL_A ) -> Self { match variant { PLL_DIV_SEL_A :: _00 => 0 , PLL_DIV_SEL_A :: _01 => 1 } } } # [ doc = "Reader of field `PLL_DIV_SEL`" ] pub type PLL_DIV_SEL_R = crate :: R < u8 , PLL_DIV_SEL_A > ; impl PLL_DIV_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PLL_DIV_SEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PLL_DIV_SEL_A :: _00 ) , 1 => Val ( PLL_DIV_SEL_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PLL_DIV_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PLL_DIV_SEL_A :: _01 } } # [ doc = "Write proxy for field `PLL_DIV_SEL`" ] pub struct PLL_DIV_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_DIV_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLL_DIV_SEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "PLL reference frequency = 24MHz" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PLL_DIV_SEL_A :: _00 ) } # [ doc = "PLL reference frequency = 16MHz" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PLL_DIV_SEL_A :: _01 ) } # [ 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 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Reader of field `PLL_EN_USB_CLKS`" ] pub type PLL_EN_USB_CLKS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_EN_USB_CLKS`" ] pub struct PLL_EN_USB_CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_EN_USB_CLKS_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 = "Reader of field `PLL_HOLD_RING_OFF`" ] pub type PLL_HOLD_RING_OFF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_HOLD_RING_OFF`" ] pub struct PLL_HOLD_RING_OFF_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_HOLD_RING_OFF_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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Reader of field `PLL_POWER`" ] pub type PLL_POWER_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_POWER`" ] pub struct PLL_POWER_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_POWER_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `PLL_ENABLE`" ] pub type PLL_ENABLE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_ENABLE`" ] pub struct PLL_ENABLE_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_ENABLE_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 = "Reader of field `PLL_BYPASS`" ] pub type PLL_BYPASS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_BYPASS`" ] pub struct PLL_BYPASS_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_BYPASS_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "USB PLL lock status indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_LOCK_A { # [ doc = "0: PLL is not currently locked" ] _0 , # [ doc = "1: PLL is currently locked" ] _1 } impl From < PLL_LOCK_A > for bool { # [ inline ( always ) ] fn from ( variant : PLL_LOCK_A ) -> Self { match variant { PLL_LOCK_A :: _0 => false , PLL_LOCK_A :: _1 => true } } } # [ doc = "Reader of field `PLL_LOCK`" ] pub type PLL_LOCK_R = crate :: R < bool , PLL_LOCK_A > ; impl PLL_LOCK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLL_LOCK_A { match self . bits { false => PLL_LOCK_A :: _0 , true => PLL_LOCK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLL_LOCK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLL_LOCK_A :: _1 } } impl R { # [ doc = "Bits 0:1 - This field controls the USB PLL feedback loop divider" ] # [ inline ( always ) ] pub fn pll_div_sel ( & self ) -> PLL_DIV_SEL_R { PLL_DIV_SEL_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Enable the USB clock output from the USB PHY PLL." ] # [ inline ( always ) ] pub fn pll_en_usb_clks ( & self ) -> PLL_EN_USB_CLKS_R { PLL_EN_USB_CLKS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Analog debug bit" ] # [ inline ( always ) ] pub fn pll_hold_ring_off ( & self ) -> PLL_HOLD_RING_OFF_R { PLL_HOLD_RING_OFF_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Power up the USB PLL." ] # [ inline ( always ) ] pub fn pll_power ( & self ) -> PLL_POWER_R { PLL_POWER_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Enable the clock output from the USB PLL." ] # [ inline ( always ) ] pub fn pll_enable ( & self ) -> PLL_ENABLE_R { PLL_ENABLE_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Bypass the USB PLL." ] # [ inline ( always ) ] pub fn pll_bypass ( & self ) -> PLL_BYPASS_R { PLL_BYPASS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - USB PLL lock status indicator" ] # [ inline ( always ) ] pub fn pll_lock ( & self ) -> PLL_LOCK_R { PLL_LOCK_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - This field controls the USB PLL feedback loop divider" ] # [ inline ( always ) ] pub fn pll_div_sel ( & mut self ) -> PLL_DIV_SEL_W { PLL_DIV_SEL_W { w : self } } # [ doc = "Bit 6 - Enable the USB clock output from the USB PHY PLL." ] # [ inline ( always ) ] pub fn pll_en_usb_clks ( & mut self ) -> PLL_EN_USB_CLKS_W { PLL_EN_USB_CLKS_W { w : self } } # [ doc = "Bit 11 - Analog debug bit" ] # [ inline ( always ) ] pub fn pll_hold_ring_off ( & mut self ) -> PLL_HOLD_RING_OFF_W { PLL_HOLD_RING_OFF_W { w : self } } # [ doc = "Bit 12 - Power up the USB PLL." ] # [ inline ( always ) ] pub fn pll_power ( & mut self ) -> PLL_POWER_W { PLL_POWER_W { w : self } } # [ doc = "Bit 13 - Enable the clock output from the USB PLL." ] # [ inline ( always ) ] pub fn pll_enable ( & mut self ) -> PLL_ENABLE_W { PLL_ENABLE_W { w : self } } # [ doc = "Bit 16 - Bypass the USB PLL." ] # [ inline ( always ) ] pub fn pll_bypass ( & mut self ) -> PLL_BYPASS_W { PLL_BYPASS_W { w : self } } } } # [ doc = "USB PHY PLL Control/Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pll_sic_clr](pll_sic_clr) module" ] pub type PLL_SIC_CLR = crate :: Reg < u32 , _PLL_SIC_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PLL_SIC_CLR ; # [ doc = "`read()` method returns [pll_sic_clr::R](pll_sic_clr::R) reader structure" ] impl crate :: Readable for PLL_SIC_CLR { } # [ doc = "`write(|w| ..)` method takes [pll_sic_clr::W](pll_sic_clr::W) writer structure" ] impl crate :: Writable for PLL_SIC_CLR { } # [ doc = "USB PHY PLL Control/Status Register" ] pub mod pll_sic_clr { # [ doc = "Reader of register PLL_SIC_CLR" ] pub type R = crate :: R < u32 , super :: PLL_SIC_CLR > ; # [ doc = "Writer for register PLL_SIC_CLR" ] pub type W = crate :: W < u32 , super :: PLL_SIC_CLR > ; # [ doc = "Register PLL_SIC_CLR `reset()`'s with value 0x0001_2000" ] impl crate :: ResetValue for super :: PLL_SIC_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_2000 } } # [ doc = "This field controls the USB PLL feedback loop divider\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_DIV_SEL_A { # [ doc = "0: PLL reference frequency = 24MHz" ] _00 , # [ doc = "1: PLL reference frequency = 16MHz" ] _01 } impl From < PLL_DIV_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PLL_DIV_SEL_A ) -> Self { match variant { PLL_DIV_SEL_A :: _00 => 0 , PLL_DIV_SEL_A :: _01 => 1 } } } # [ doc = "Reader of field `PLL_DIV_SEL`" ] pub type PLL_DIV_SEL_R = crate :: R < u8 , PLL_DIV_SEL_A > ; impl PLL_DIV_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PLL_DIV_SEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PLL_DIV_SEL_A :: _00 ) , 1 => Val ( PLL_DIV_SEL_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PLL_DIV_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PLL_DIV_SEL_A :: _01 } } # [ doc = "Write proxy for field `PLL_DIV_SEL`" ] pub struct PLL_DIV_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_DIV_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLL_DIV_SEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "PLL reference frequency = 24MHz" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PLL_DIV_SEL_A :: _00 ) } # [ doc = "PLL reference frequency = 16MHz" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PLL_DIV_SEL_A :: _01 ) } # [ 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 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Reader of field `PLL_EN_USB_CLKS`" ] pub type PLL_EN_USB_CLKS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_EN_USB_CLKS`" ] pub struct PLL_EN_USB_CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_EN_USB_CLKS_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 = "Reader of field `PLL_HOLD_RING_OFF`" ] pub type PLL_HOLD_RING_OFF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_HOLD_RING_OFF`" ] pub struct PLL_HOLD_RING_OFF_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_HOLD_RING_OFF_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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Reader of field `PLL_POWER`" ] pub type PLL_POWER_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_POWER`" ] pub struct PLL_POWER_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_POWER_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `PLL_ENABLE`" ] pub type PLL_ENABLE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_ENABLE`" ] pub struct PLL_ENABLE_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_ENABLE_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 = "Reader of field `PLL_BYPASS`" ] pub type PLL_BYPASS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_BYPASS`" ] pub struct PLL_BYPASS_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_BYPASS_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "USB PLL lock status indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_LOCK_A { # [ doc = "0: PLL is not currently locked" ] _0 , # [ doc = "1: PLL is currently locked" ] _1 } impl From < PLL_LOCK_A > for bool { # [ inline ( always ) ] fn from ( variant : PLL_LOCK_A ) -> Self { match variant { PLL_LOCK_A :: _0 => false , PLL_LOCK_A :: _1 => true } } } # [ doc = "Reader of field `PLL_LOCK`" ] pub type PLL_LOCK_R = crate :: R < bool , PLL_LOCK_A > ; impl PLL_LOCK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLL_LOCK_A { match self . bits { false => PLL_LOCK_A :: _0 , true => PLL_LOCK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLL_LOCK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLL_LOCK_A :: _1 } } impl R { # [ doc = "Bits 0:1 - This field controls the USB PLL feedback loop divider" ] # [ inline ( always ) ] pub fn pll_div_sel ( & self ) -> PLL_DIV_SEL_R { PLL_DIV_SEL_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Enable the USB clock output from the USB PHY PLL." ] # [ inline ( always ) ] pub fn pll_en_usb_clks ( & self ) -> PLL_EN_USB_CLKS_R { PLL_EN_USB_CLKS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Analog debug bit" ] # [ inline ( always ) ] pub fn pll_hold_ring_off ( & self ) -> PLL_HOLD_RING_OFF_R { PLL_HOLD_RING_OFF_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Power up the USB PLL." ] # [ inline ( always ) ] pub fn pll_power ( & self ) -> PLL_POWER_R { PLL_POWER_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Enable the clock output from the USB PLL." ] # [ inline ( always ) ] pub fn pll_enable ( & self ) -> PLL_ENABLE_R { PLL_ENABLE_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Bypass the USB PLL." ] # [ inline ( always ) ] pub fn pll_bypass ( & self ) -> PLL_BYPASS_R { PLL_BYPASS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - USB PLL lock status indicator" ] # [ inline ( always ) ] pub fn pll_lock ( & self ) -> PLL_LOCK_R { PLL_LOCK_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - This field controls the USB PLL feedback loop divider" ] # [ inline ( always ) ] pub fn pll_div_sel ( & mut self ) -> PLL_DIV_SEL_W { PLL_DIV_SEL_W { w : self } } # [ doc = "Bit 6 - Enable the USB clock output from the USB PHY PLL." ] # [ inline ( always ) ] pub fn pll_en_usb_clks ( & mut self ) -> PLL_EN_USB_CLKS_W { PLL_EN_USB_CLKS_W { w : self } } # [ doc = "Bit 11 - Analog debug bit" ] # [ inline ( always ) ] pub fn pll_hold_ring_off ( & mut self ) -> PLL_HOLD_RING_OFF_W { PLL_HOLD_RING_OFF_W { w : self } } # [ doc = "Bit 12 - Power up the USB PLL." ] # [ inline ( always ) ] pub fn pll_power ( & mut self ) -> PLL_POWER_W { PLL_POWER_W { w : self } } # [ doc = "Bit 13 - Enable the clock output from the USB PLL." ] # [ inline ( always ) ] pub fn pll_enable ( & mut self ) -> PLL_ENABLE_W { PLL_ENABLE_W { w : self } } # [ doc = "Bit 16 - Bypass the USB PLL." ] # [ inline ( always ) ] pub fn pll_bypass ( & mut self ) -> PLL_BYPASS_W { PLL_BYPASS_W { w : self } } } } # [ doc = "USB PHY PLL Control/Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pll_sic_tog](pll_sic_tog) module" ] pub type PLL_SIC_TOG = crate :: Reg < u32 , _PLL_SIC_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PLL_SIC_TOG ; # [ doc = "`read()` method returns [pll_sic_tog::R](pll_sic_tog::R) reader structure" ] impl crate :: Readable for PLL_SIC_TOG { } # [ doc = "`write(|w| ..)` method takes [pll_sic_tog::W](pll_sic_tog::W) writer structure" ] impl crate :: Writable for PLL_SIC_TOG { } # [ doc = "USB PHY PLL Control/Status Register" ] pub mod pll_sic_tog { # [ doc = "Reader of register PLL_SIC_TOG" ] pub type R = crate :: R < u32 , super :: PLL_SIC_TOG > ; # [ doc = "Writer for register PLL_SIC_TOG" ] pub type W = crate :: W < u32 , super :: PLL_SIC_TOG > ; # [ doc = "Register PLL_SIC_TOG `reset()`'s with value 0x0001_2000" ] impl crate :: ResetValue for super :: PLL_SIC_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_2000 } } # [ doc = "This field controls the USB PLL feedback loop divider\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_DIV_SEL_A { # [ doc = "0: PLL reference frequency = 24MHz" ] _00 , # [ doc = "1: PLL reference frequency = 16MHz" ] _01 } impl From < PLL_DIV_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PLL_DIV_SEL_A ) -> Self { match variant { PLL_DIV_SEL_A :: _00 => 0 , PLL_DIV_SEL_A :: _01 => 1 } } } # [ doc = "Reader of field `PLL_DIV_SEL`" ] pub type PLL_DIV_SEL_R = crate :: R < u8 , PLL_DIV_SEL_A > ; impl PLL_DIV_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , PLL_DIV_SEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( PLL_DIV_SEL_A :: _00 ) , 1 => Val ( PLL_DIV_SEL_A :: _01 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PLL_DIV_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PLL_DIV_SEL_A :: _01 } } # [ doc = "Write proxy for field `PLL_DIV_SEL`" ] pub struct PLL_DIV_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_DIV_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PLL_DIV_SEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "PLL reference frequency = 24MHz" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PLL_DIV_SEL_A :: _00 ) } # [ doc = "PLL reference frequency = 16MHz" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PLL_DIV_SEL_A :: _01 ) } # [ 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 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Reader of field `PLL_EN_USB_CLKS`" ] pub type PLL_EN_USB_CLKS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_EN_USB_CLKS`" ] pub struct PLL_EN_USB_CLKS_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_EN_USB_CLKS_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 = "Reader of field `PLL_HOLD_RING_OFF`" ] pub type PLL_HOLD_RING_OFF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_HOLD_RING_OFF`" ] pub struct PLL_HOLD_RING_OFF_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_HOLD_RING_OFF_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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Reader of field `PLL_POWER`" ] pub type PLL_POWER_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_POWER`" ] pub struct PLL_POWER_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_POWER_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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Reader of field `PLL_ENABLE`" ] pub type PLL_ENABLE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_ENABLE`" ] pub struct PLL_ENABLE_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_ENABLE_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 = "Reader of field `PLL_BYPASS`" ] pub type PLL_BYPASS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLL_BYPASS`" ] pub struct PLL_BYPASS_W < 'a > { w : & 'a mut W , } impl < 'a > PLL_BYPASS_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "USB PLL lock status indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLL_LOCK_A { # [ doc = "0: PLL is not currently locked" ] _0 , # [ doc = "1: PLL is currently locked" ] _1 } impl From < PLL_LOCK_A > for bool { # [ inline ( always ) ] fn from ( variant : PLL_LOCK_A ) -> Self { match variant { PLL_LOCK_A :: _0 => false , PLL_LOCK_A :: _1 => true } } } # [ doc = "Reader of field `PLL_LOCK`" ] pub type PLL_LOCK_R = crate :: R < bool , PLL_LOCK_A > ; impl PLL_LOCK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLL_LOCK_A { match self . bits { false => PLL_LOCK_A :: _0 , true => PLL_LOCK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLL_LOCK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLL_LOCK_A :: _1 } } impl R { # [ doc = "Bits 0:1 - This field controls the USB PLL feedback loop divider" ] # [ inline ( always ) ] pub fn pll_div_sel ( & self ) -> PLL_DIV_SEL_R { PLL_DIV_SEL_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Enable the USB clock output from the USB PHY PLL." ] # [ inline ( always ) ] pub fn pll_en_usb_clks ( & self ) -> PLL_EN_USB_CLKS_R { PLL_EN_USB_CLKS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Analog debug bit" ] # [ inline ( always ) ] pub fn pll_hold_ring_off ( & self ) -> PLL_HOLD_RING_OFF_R { PLL_HOLD_RING_OFF_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Power up the USB PLL." ] # [ inline ( always ) ] pub fn pll_power ( & self ) -> PLL_POWER_R { PLL_POWER_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Enable the clock output from the USB PLL." ] # [ inline ( always ) ] pub fn pll_enable ( & self ) -> PLL_ENABLE_R { PLL_ENABLE_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Bypass the USB PLL." ] # [ inline ( always ) ] pub fn pll_bypass ( & self ) -> PLL_BYPASS_R { PLL_BYPASS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - USB PLL lock status indicator" ] # [ inline ( always ) ] pub fn pll_lock ( & self ) -> PLL_LOCK_R { PLL_LOCK_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:1 - This field controls the USB PLL feedback loop divider" ] # [ inline ( always ) ] pub fn pll_div_sel ( & mut self ) -> PLL_DIV_SEL_W { PLL_DIV_SEL_W { w : self } } # [ doc = "Bit 6 - Enable the USB clock output from the USB PHY PLL." ] # [ inline ( always ) ] pub fn pll_en_usb_clks ( & mut self ) -> PLL_EN_USB_CLKS_W { PLL_EN_USB_CLKS_W { w : self } } # [ doc = "Bit 11 - Analog debug bit" ] # [ inline ( always ) ] pub fn pll_hold_ring_off ( & mut self ) -> PLL_HOLD_RING_OFF_W { PLL_HOLD_RING_OFF_W { w : self } } # [ doc = "Bit 12 - Power up the USB PLL." ] # [ inline ( always ) ] pub fn pll_power ( & mut self ) -> PLL_POWER_W { PLL_POWER_W { w : self } } # [ doc = "Bit 13 - Enable the clock output from the USB PLL." ] # [ inline ( always ) ] pub fn pll_enable ( & mut self ) -> PLL_ENABLE_W { PLL_ENABLE_W { w : self } } # [ doc = "Bit 16 - Bypass the USB PLL." ] # [ inline ( always ) ] pub fn pll_bypass ( & mut self ) -> PLL_BYPASS_W { PLL_BYPASS_W { w : self } } } } # [ doc = "USB PHY VBUS Detect Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_vbus_detect](usb1_vbus_detect) module" ] pub type USB1_VBUS_DETECT = crate :: Reg < u32 , _USB1_VBUS_DETECT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_VBUS_DETECT ; # [ doc = "`read()` method returns [usb1_vbus_detect::R](usb1_vbus_detect::R) reader structure" ] impl crate :: Readable for USB1_VBUS_DETECT { } # [ doc = "`write(|w| ..)` method takes [usb1_vbus_detect::W](usb1_vbus_detect::W) writer structure" ] impl crate :: Writable for USB1_VBUS_DETECT { } # [ doc = "USB PHY VBUS Detect Control Register" ] pub mod usb1_vbus_detect { # [ doc = "Reader of register USB1_VBUS_DETECT" ] pub type R = crate :: R < u32 , super :: USB1_VBUS_DETECT > ; # [ doc = "Writer for register USB1_VBUS_DETECT" ] pub type W = crate :: W < u32 , super :: USB1_VBUS_DETECT > ; # [ doc = "Register USB1_VBUS_DETECT `reset()`'s with value 0x0070_0004" ] impl crate :: ResetValue for super :: USB1_VBUS_DETECT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0070_0004 } } # [ doc = "Sets the threshold for the VBUSVALID comparator\n\nValue on reset: 4" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_THRESH_A { # [ doc = "0: 4.0 V" ] _000 , # [ doc = "1: 4.1 V" ] _001 , # [ doc = "2: 4.2 V" ] _010 , # [ doc = "3: 4.3 V" ] _011 , # [ doc = "4: 4.4 V (Default)" ] _100 , # [ doc = "5: 4.5 V" ] _101 , # [ doc = "6: 4.6 V" ] _110 , # [ doc = "7: 4.7 V" ] _111 } impl From < VBUSVALID_THRESH_A > for u8 { # [ inline ( always ) ] fn from ( variant : VBUSVALID_THRESH_A ) -> Self { match variant { VBUSVALID_THRESH_A :: _000 => 0 , VBUSVALID_THRESH_A :: _001 => 1 , VBUSVALID_THRESH_A :: _010 => 2 , VBUSVALID_THRESH_A :: _011 => 3 , VBUSVALID_THRESH_A :: _100 => 4 , VBUSVALID_THRESH_A :: _101 => 5 , VBUSVALID_THRESH_A :: _110 => 6 , VBUSVALID_THRESH_A :: _111 => 7 } } } # [ doc = "Reader of field `VBUSVALID_THRESH`" ] pub type VBUSVALID_THRESH_R = crate :: R < u8 , VBUSVALID_THRESH_A > ; impl VBUSVALID_THRESH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_THRESH_A { match self . bits { 0 => VBUSVALID_THRESH_A :: _000 , 1 => VBUSVALID_THRESH_A :: _001 , 2 => VBUSVALID_THRESH_A :: _010 , 3 => VBUSVALID_THRESH_A :: _011 , 4 => VBUSVALID_THRESH_A :: _100 , 5 => VBUSVALID_THRESH_A :: _101 , 6 => VBUSVALID_THRESH_A :: _110 , 7 => VBUSVALID_THRESH_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _111 } } # [ doc = "Write proxy for field `VBUSVALID_THRESH`" ] pub struct VBUSVALID_THRESH_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_THRESH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_THRESH_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "4.0 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _000 ) } # [ doc = "4.1 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _001 ) } # [ doc = "4.2 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _010 ) } # [ doc = "4.3 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _011 ) } # [ doc = "4.4 V (Default)" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _100 ) } # [ doc = "4.5 V" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _101 ) } # [ doc = "4.6 V" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _110 ) } # [ doc = "4.7 V" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "VBUS detect signal override enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_OVERRIDE_EN_A { # [ doc = "0: Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)" ] _0 , # [ doc = "1: Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND" ] _1 } impl From < VBUS_OVERRIDE_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUS_OVERRIDE_EN_A ) -> Self { match variant { VBUS_OVERRIDE_EN_A :: _0 => false , VBUS_OVERRIDE_EN_A :: _1 => true } } } # [ doc = "Reader of field `VBUS_OVERRIDE_EN`" ] pub type VBUS_OVERRIDE_EN_R = crate :: R < bool , VBUS_OVERRIDE_EN_A > ; impl VBUS_OVERRIDE_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_OVERRIDE_EN_A { match self . bits { false => VBUS_OVERRIDE_EN_A :: _0 , true => VBUS_OVERRIDE_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUS_OVERRIDE_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUS_OVERRIDE_EN_A :: _1 } } # [ doc = "Write proxy for field `VBUS_OVERRIDE_EN`" ] pub struct VBUS_OVERRIDE_EN_W < 'a > { w : & 'a mut W , } impl < 'a > VBUS_OVERRIDE_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUS_OVERRIDE_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUS_OVERRIDE_EN_A :: _0 ) } # [ doc = "Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUS_OVERRIDE_EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `SESSEND_OVERRIDE`" ] pub type SESSEND_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SESSEND_OVERRIDE`" ] pub struct SESSEND_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > SESSEND_OVERRIDE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `BVALID_OVERRIDE`" ] pub type BVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BVALID_OVERRIDE`" ] pub struct BVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > BVALID_OVERRIDE_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 = "Reader of field `AVALID_OVERRIDE`" ] pub type AVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AVALID_OVERRIDE`" ] pub struct AVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > AVALID_OVERRIDE_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 = "Reader of field `VBUSVALID_OVERRIDE`" ] pub type VBUSVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `VBUSVALID_OVERRIDE`" ] pub struct VBUSVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_OVERRIDE_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 = "Selects the source of the VBUS_VALID signal reported to the USB controller\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_SEL_A { # [ doc = "0: Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] _0 , # [ doc = "1: Use the VBUS_VALID_3V detector results for signal reported to the USB controller" ] _1 } impl From < VBUSVALID_SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUSVALID_SEL_A ) -> Self { match variant { VBUSVALID_SEL_A :: _0 => false , VBUSVALID_SEL_A :: _1 => true } } } # [ doc = "Reader of field `VBUSVALID_SEL`" ] pub type VBUSVALID_SEL_R = crate :: R < bool , VBUSVALID_SEL_A > ; impl VBUSVALID_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_SEL_A { match self . bits { false => VBUSVALID_SEL_A :: _0 , true => VBUSVALID_SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUSVALID_SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUSVALID_SEL_A :: _1 } } # [ doc = "Write proxy for field `VBUSVALID_SEL`" ] pub struct VBUSVALID_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_SEL_A :: _0 ) } # [ doc = "Use the VBUS_VALID_3V detector results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_SEL_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Selects the source of the VBUS_VALID signal reported to the USB controller\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_SOURCE_SEL_A { # [ doc = "0: Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] _00 , # [ doc = "1: Use the Session Valid comparator results for signal reported to the USB controller" ] _01 , # [ doc = "2: Use the Session Valid comparator results for signal reported to the USB controller" ] _10 , # [ doc = "3: Reserved, do not use" ] _11 } impl From < VBUS_SOURCE_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : VBUS_SOURCE_SEL_A ) -> Self { match variant { VBUS_SOURCE_SEL_A :: _00 => 0 , VBUS_SOURCE_SEL_A :: _01 => 1 , VBUS_SOURCE_SEL_A :: _10 => 2 , VBUS_SOURCE_SEL_A :: _11 => 3 } } } # [ doc = "Reader of field `VBUS_SOURCE_SEL`" ] pub type VBUS_SOURCE_SEL_R = crate :: R < u8 , VBUS_SOURCE_SEL_A > ; impl VBUS_SOURCE_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_SOURCE_SEL_A { match self . bits { 0 => VBUS_SOURCE_SEL_A :: _00 , 1 => VBUS_SOURCE_SEL_A :: _01 , 2 => VBUS_SOURCE_SEL_A :: _10 , 3 => VBUS_SOURCE_SEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _11 } } # [ doc = "Write proxy for field `VBUS_SOURCE_SEL`" ] pub struct VBUS_SOURCE_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > VBUS_SOURCE_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUS_SOURCE_SEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _00 ) } # [ doc = "Use the Session Valid comparator results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _01 ) } # [ doc = "Use the Session Valid comparator results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _10 ) } # [ doc = "Reserved, do not use" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 9 ) ) | ( ( ( value as u32 ) & 0x03 ) << 9 ) ; self . w } } # [ doc = "Selects the comparator used for VBUS_VALID\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_TO_SESSVALID_A { # [ doc = "0: Use the VBUS_VALID comparator for VBUS_VALID results" ] _0 , # [ doc = "1: Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V." ] _1 } impl From < VBUSVALID_TO_SESSVALID_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUSVALID_TO_SESSVALID_A ) -> Self { match variant { VBUSVALID_TO_SESSVALID_A :: _0 => false , VBUSVALID_TO_SESSVALID_A :: _1 => true } } } # [ doc = "Reader of field `VBUSVALID_TO_SESSVALID`" ] pub type VBUSVALID_TO_SESSVALID_R = crate :: R < bool , VBUSVALID_TO_SESSVALID_A > ; impl VBUSVALID_TO_SESSVALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_TO_SESSVALID_A { match self . bits { false => VBUSVALID_TO_SESSVALID_A :: _0 , true => VBUSVALID_TO_SESSVALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUSVALID_TO_SESSVALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUSVALID_TO_SESSVALID_A :: _1 } } # [ doc = "Write proxy for field `VBUSVALID_TO_SESSVALID`" ] pub struct VBUSVALID_TO_SESSVALID_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_TO_SESSVALID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_TO_SESSVALID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator for VBUS_VALID results" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_TO_SESSVALID_A :: _0 ) } # [ doc = "Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_TO_SESSVALID_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Enables the VBUS_VALID comparator\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWRUP_CMPS_A { # [ doc = "0: Powers down the VBUS_VALID comparator" ] _0 , # [ doc = "1: Enables the VBUS_VALID comparator (default)" ] _1 } impl From < PWRUP_CMPS_A > for bool { # [ inline ( always ) ] fn from ( variant : PWRUP_CMPS_A ) -> Self { match variant { PWRUP_CMPS_A :: _0 => false , PWRUP_CMPS_A :: _1 => true } } } # [ doc = "Reader of field `PWRUP_CMPS`" ] pub type PWRUP_CMPS_R = crate :: R < bool , PWRUP_CMPS_A > ; impl PWRUP_CMPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PWRUP_CMPS_A { match self . bits { false => PWRUP_CMPS_A :: _0 , true => PWRUP_CMPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PWRUP_CMPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PWRUP_CMPS_A :: _1 } } # [ doc = "Write proxy for field `PWRUP_CMPS`" ] pub struct PWRUP_CMPS_W < 'a > { w : & 'a mut W , } impl < 'a > PWRUP_CMPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PWRUP_CMPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Powers down the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PWRUP_CMPS_A :: _0 ) } # [ doc = "Enables the VBUS_VALID comparator (default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PWRUP_CMPS_A :: _1 ) } # [ 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 = "Controls VBUS discharge resistor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISCHARGE_VBUS_A { # [ doc = "0: VBUS discharge resistor is disabled (Default)" ] _0 , # [ doc = "1: VBUS discharge resistor is enabled" ] _1 } impl From < DISCHARGE_VBUS_A > for bool { # [ inline ( always ) ] fn from ( variant : DISCHARGE_VBUS_A ) -> Self { match variant { DISCHARGE_VBUS_A :: _0 => false , DISCHARGE_VBUS_A :: _1 => true } } } # [ doc = "Reader of field `DISCHARGE_VBUS`" ] pub type DISCHARGE_VBUS_R = crate :: R < bool , DISCHARGE_VBUS_A > ; impl DISCHARGE_VBUS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DISCHARGE_VBUS_A { match self . bits { false => DISCHARGE_VBUS_A :: _0 , true => DISCHARGE_VBUS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DISCHARGE_VBUS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DISCHARGE_VBUS_A :: _1 } } # [ doc = "Write proxy for field `DISCHARGE_VBUS`" ] pub struct DISCHARGE_VBUS_W < 'a > { w : & 'a mut W , } impl < 'a > DISCHARGE_VBUS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISCHARGE_VBUS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "VBUS discharge resistor is disabled (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DISCHARGE_VBUS_A :: _0 ) } # [ doc = "VBUS discharge resistor is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DISCHARGE_VBUS_A :: _1 ) } # [ 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 = "Enables resistors used for an older method of resistive battery charger detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_CHARGER_RESISTOR_A { # [ doc = "0: Disable resistive charger detection resistors on USB_DP and USB_DP" ] _0 , # [ doc = "1: Enable resistive charger detection resistors on USB_DP and USB_DP" ] _1 } impl From < EN_CHARGER_RESISTOR_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_CHARGER_RESISTOR_A ) -> Self { match variant { EN_CHARGER_RESISTOR_A :: _0 => false , EN_CHARGER_RESISTOR_A :: _1 => true } } } # [ doc = "Reader of field `EN_CHARGER_RESISTOR`" ] pub type EN_CHARGER_RESISTOR_R = crate :: R < bool , EN_CHARGER_RESISTOR_A > ; impl EN_CHARGER_RESISTOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_CHARGER_RESISTOR_A { match self . bits { false => EN_CHARGER_RESISTOR_A :: _0 , true => EN_CHARGER_RESISTOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_CHARGER_RESISTOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_CHARGER_RESISTOR_A :: _1 } } # [ doc = "Write proxy for field `EN_CHARGER_RESISTOR`" ] pub struct EN_CHARGER_RESISTOR_W < 'a > { w : & 'a mut W , } impl < 'a > EN_CHARGER_RESISTOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_CHARGER_RESISTOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable resistive charger detection resistors on USB_DP and USB_DP" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_CHARGER_RESISTOR_A :: _0 ) } # [ doc = "Enable resistive charger detection resistors on USB_DP and USB_DP" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_CHARGER_RESISTOR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Sets the threshold for the VBUSVALID comparator" ] # [ inline ( always ) ] pub fn vbusvalid_thresh ( & self ) -> VBUSVALID_THRESH_R { VBUSVALID_THRESH_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - VBUS detect signal override enable" ] # [ inline ( always ) ] pub fn vbus_override_en ( & self ) -> VBUS_OVERRIDE_EN_R { VBUS_OVERRIDE_EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Override value for SESSEND" ] # [ inline ( always ) ] pub fn sessend_override ( & self ) -> SESSEND_OVERRIDE_R { SESSEND_OVERRIDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Override value for B-Device Session Valid" ] # [ inline ( always ) ] pub fn bvalid_override ( & self ) -> BVALID_OVERRIDE_R { BVALID_OVERRIDE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Override value for A-Device Session Valid" ] # [ inline ( always ) ] pub fn avalid_override ( & self ) -> AVALID_OVERRIDE_R { AVALID_OVERRIDE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Override value for VBUS_VALID signal sent to USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_override ( & self ) -> VBUSVALID_OVERRIDE_R { VBUSVALID_OVERRIDE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_sel ( & self ) -> VBUSVALID_SEL_R { VBUSVALID_SEL_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bits 9:10 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbus_source_sel ( & self ) -> VBUS_SOURCE_SEL_R { VBUS_SOURCE_SEL_R :: new ( ( ( self . bits >> 9 ) & 0x03 ) as u8 ) } # [ doc = "Bit 18 - Selects the comparator used for VBUS_VALID" ] # [ inline ( always ) ] pub fn vbusvalid_to_sessvalid ( & self ) -> VBUSVALID_TO_SESSVALID_R { VBUSVALID_TO_SESSVALID_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enables the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn pwrup_cmps ( & self ) -> PWRUP_CMPS_R { PWRUP_CMPS_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Controls VBUS discharge resistor" ] # [ inline ( always ) ] pub fn discharge_vbus ( & self ) -> DISCHARGE_VBUS_R { DISCHARGE_VBUS_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Enables resistors used for an older method of resistive battery charger detection" ] # [ inline ( always ) ] pub fn en_charger_resistor ( & self ) -> EN_CHARGER_RESISTOR_R { EN_CHARGER_RESISTOR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Sets the threshold for the VBUSVALID comparator" ] # [ inline ( always ) ] pub fn vbusvalid_thresh ( & mut self ) -> VBUSVALID_THRESH_W { VBUSVALID_THRESH_W { w : self } } # [ doc = "Bit 3 - VBUS detect signal override enable" ] # [ inline ( always ) ] pub fn vbus_override_en ( & mut self ) -> VBUS_OVERRIDE_EN_W { VBUS_OVERRIDE_EN_W { w : self } } # [ doc = "Bit 4 - Override value for SESSEND" ] # [ inline ( always ) ] pub fn sessend_override ( & mut self ) -> SESSEND_OVERRIDE_W { SESSEND_OVERRIDE_W { w : self } } # [ doc = "Bit 5 - Override value for B-Device Session Valid" ] # [ inline ( always ) ] pub fn bvalid_override ( & mut self ) -> BVALID_OVERRIDE_W { BVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 6 - Override value for A-Device Session Valid" ] # [ inline ( always ) ] pub fn avalid_override ( & mut self ) -> AVALID_OVERRIDE_W { AVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 7 - Override value for VBUS_VALID signal sent to USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_override ( & mut self ) -> VBUSVALID_OVERRIDE_W { VBUSVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 8 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_sel ( & mut self ) -> VBUSVALID_SEL_W { VBUSVALID_SEL_W { w : self } } # [ doc = "Bits 9:10 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbus_source_sel ( & mut self ) -> VBUS_SOURCE_SEL_W { VBUS_SOURCE_SEL_W { w : self } } # [ doc = "Bit 18 - Selects the comparator used for VBUS_VALID" ] # [ inline ( always ) ] pub fn vbusvalid_to_sessvalid ( & mut self ) -> VBUSVALID_TO_SESSVALID_W { VBUSVALID_TO_SESSVALID_W { w : self } } # [ doc = "Bit 20 - Enables the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn pwrup_cmps ( & mut self ) -> PWRUP_CMPS_W { PWRUP_CMPS_W { w : self } } # [ doc = "Bit 26 - Controls VBUS discharge resistor" ] # [ inline ( always ) ] pub fn discharge_vbus ( & mut self ) -> DISCHARGE_VBUS_W { DISCHARGE_VBUS_W { w : self } } # [ doc = "Bit 31 - Enables resistors used for an older method of resistive battery charger detection" ] # [ inline ( always ) ] pub fn en_charger_resistor ( & mut self ) -> EN_CHARGER_RESISTOR_W { EN_CHARGER_RESISTOR_W { w : self } } } } # [ doc = "USB PHY VBUS Detect Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_vbus_detect_set](usb1_vbus_detect_set) module" ] pub type USB1_VBUS_DETECT_SET = crate :: Reg < u32 , _USB1_VBUS_DETECT_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_VBUS_DETECT_SET ; # [ doc = "`read()` method returns [usb1_vbus_detect_set::R](usb1_vbus_detect_set::R) reader structure" ] impl crate :: Readable for USB1_VBUS_DETECT_SET { } # [ doc = "`write(|w| ..)` method takes [usb1_vbus_detect_set::W](usb1_vbus_detect_set::W) writer structure" ] impl crate :: Writable for USB1_VBUS_DETECT_SET { } # [ doc = "USB PHY VBUS Detect Control Register" ] pub mod usb1_vbus_detect_set { # [ doc = "Reader of register USB1_VBUS_DETECT_SET" ] pub type R = crate :: R < u32 , super :: USB1_VBUS_DETECT_SET > ; # [ doc = "Writer for register USB1_VBUS_DETECT_SET" ] pub type W = crate :: W < u32 , super :: USB1_VBUS_DETECT_SET > ; # [ doc = "Register USB1_VBUS_DETECT_SET `reset()`'s with value 0x0070_0004" ] impl crate :: ResetValue for super :: USB1_VBUS_DETECT_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0070_0004 } } # [ doc = "Sets the threshold for the VBUSVALID comparator\n\nValue on reset: 4" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_THRESH_A { # [ doc = "0: 4.0 V" ] _000 , # [ doc = "1: 4.1 V" ] _001 , # [ doc = "2: 4.2 V" ] _010 , # [ doc = "3: 4.3 V" ] _011 , # [ doc = "4: 4.4 V (Default)" ] _100 , # [ doc = "5: 4.5 V" ] _101 , # [ doc = "6: 4.6 V" ] _110 , # [ doc = "7: 4.7 V" ] _111 } impl From < VBUSVALID_THRESH_A > for u8 { # [ inline ( always ) ] fn from ( variant : VBUSVALID_THRESH_A ) -> Self { match variant { VBUSVALID_THRESH_A :: _000 => 0 , VBUSVALID_THRESH_A :: _001 => 1 , VBUSVALID_THRESH_A :: _010 => 2 , VBUSVALID_THRESH_A :: _011 => 3 , VBUSVALID_THRESH_A :: _100 => 4 , VBUSVALID_THRESH_A :: _101 => 5 , VBUSVALID_THRESH_A :: _110 => 6 , VBUSVALID_THRESH_A :: _111 => 7 } } } # [ doc = "Reader of field `VBUSVALID_THRESH`" ] pub type VBUSVALID_THRESH_R = crate :: R < u8 , VBUSVALID_THRESH_A > ; impl VBUSVALID_THRESH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_THRESH_A { match self . bits { 0 => VBUSVALID_THRESH_A :: _000 , 1 => VBUSVALID_THRESH_A :: _001 , 2 => VBUSVALID_THRESH_A :: _010 , 3 => VBUSVALID_THRESH_A :: _011 , 4 => VBUSVALID_THRESH_A :: _100 , 5 => VBUSVALID_THRESH_A :: _101 , 6 => VBUSVALID_THRESH_A :: _110 , 7 => VBUSVALID_THRESH_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _111 } } # [ doc = "Write proxy for field `VBUSVALID_THRESH`" ] pub struct VBUSVALID_THRESH_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_THRESH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_THRESH_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "4.0 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _000 ) } # [ doc = "4.1 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _001 ) } # [ doc = "4.2 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _010 ) } # [ doc = "4.3 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _011 ) } # [ doc = "4.4 V (Default)" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _100 ) } # [ doc = "4.5 V" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _101 ) } # [ doc = "4.6 V" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _110 ) } # [ doc = "4.7 V" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "VBUS detect signal override enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_OVERRIDE_EN_A { # [ doc = "0: Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)" ] _0 , # [ doc = "1: Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND" ] _1 } impl From < VBUS_OVERRIDE_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUS_OVERRIDE_EN_A ) -> Self { match variant { VBUS_OVERRIDE_EN_A :: _0 => false , VBUS_OVERRIDE_EN_A :: _1 => true } } } # [ doc = "Reader of field `VBUS_OVERRIDE_EN`" ] pub type VBUS_OVERRIDE_EN_R = crate :: R < bool , VBUS_OVERRIDE_EN_A > ; impl VBUS_OVERRIDE_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_OVERRIDE_EN_A { match self . bits { false => VBUS_OVERRIDE_EN_A :: _0 , true => VBUS_OVERRIDE_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUS_OVERRIDE_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUS_OVERRIDE_EN_A :: _1 } } # [ doc = "Write proxy for field `VBUS_OVERRIDE_EN`" ] pub struct VBUS_OVERRIDE_EN_W < 'a > { w : & 'a mut W , } impl < 'a > VBUS_OVERRIDE_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUS_OVERRIDE_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUS_OVERRIDE_EN_A :: _0 ) } # [ doc = "Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUS_OVERRIDE_EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `SESSEND_OVERRIDE`" ] pub type SESSEND_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SESSEND_OVERRIDE`" ] pub struct SESSEND_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > SESSEND_OVERRIDE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `BVALID_OVERRIDE`" ] pub type BVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BVALID_OVERRIDE`" ] pub struct BVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > BVALID_OVERRIDE_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 = "Reader of field `AVALID_OVERRIDE`" ] pub type AVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AVALID_OVERRIDE`" ] pub struct AVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > AVALID_OVERRIDE_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 = "Reader of field `VBUSVALID_OVERRIDE`" ] pub type VBUSVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `VBUSVALID_OVERRIDE`" ] pub struct VBUSVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_OVERRIDE_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 = "Selects the source of the VBUS_VALID signal reported to the USB controller\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_SEL_A { # [ doc = "0: Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] _0 , # [ doc = "1: Use the VBUS_VALID_3V detector results for signal reported to the USB controller" ] _1 } impl From < VBUSVALID_SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUSVALID_SEL_A ) -> Self { match variant { VBUSVALID_SEL_A :: _0 => false , VBUSVALID_SEL_A :: _1 => true } } } # [ doc = "Reader of field `VBUSVALID_SEL`" ] pub type VBUSVALID_SEL_R = crate :: R < bool , VBUSVALID_SEL_A > ; impl VBUSVALID_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_SEL_A { match self . bits { false => VBUSVALID_SEL_A :: _0 , true => VBUSVALID_SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUSVALID_SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUSVALID_SEL_A :: _1 } } # [ doc = "Write proxy for field `VBUSVALID_SEL`" ] pub struct VBUSVALID_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_SEL_A :: _0 ) } # [ doc = "Use the VBUS_VALID_3V detector results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_SEL_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Selects the source of the VBUS_VALID signal reported to the USB controller\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_SOURCE_SEL_A { # [ doc = "0: Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] _00 , # [ doc = "1: Use the Session Valid comparator results for signal reported to the USB controller" ] _01 , # [ doc = "2: Use the Session Valid comparator results for signal reported to the USB controller" ] _10 , # [ doc = "3: Reserved, do not use" ] _11 } impl From < VBUS_SOURCE_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : VBUS_SOURCE_SEL_A ) -> Self { match variant { VBUS_SOURCE_SEL_A :: _00 => 0 , VBUS_SOURCE_SEL_A :: _01 => 1 , VBUS_SOURCE_SEL_A :: _10 => 2 , VBUS_SOURCE_SEL_A :: _11 => 3 } } } # [ doc = "Reader of field `VBUS_SOURCE_SEL`" ] pub type VBUS_SOURCE_SEL_R = crate :: R < u8 , VBUS_SOURCE_SEL_A > ; impl VBUS_SOURCE_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_SOURCE_SEL_A { match self . bits { 0 => VBUS_SOURCE_SEL_A :: _00 , 1 => VBUS_SOURCE_SEL_A :: _01 , 2 => VBUS_SOURCE_SEL_A :: _10 , 3 => VBUS_SOURCE_SEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _11 } } # [ doc = "Write proxy for field `VBUS_SOURCE_SEL`" ] pub struct VBUS_SOURCE_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > VBUS_SOURCE_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUS_SOURCE_SEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _00 ) } # [ doc = "Use the Session Valid comparator results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _01 ) } # [ doc = "Use the Session Valid comparator results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _10 ) } # [ doc = "Reserved, do not use" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 9 ) ) | ( ( ( value as u32 ) & 0x03 ) << 9 ) ; self . w } } # [ doc = "Selects the comparator used for VBUS_VALID\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_TO_SESSVALID_A { # [ doc = "0: Use the VBUS_VALID comparator for VBUS_VALID results" ] _0 , # [ doc = "1: Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V." ] _1 } impl From < VBUSVALID_TO_SESSVALID_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUSVALID_TO_SESSVALID_A ) -> Self { match variant { VBUSVALID_TO_SESSVALID_A :: _0 => false , VBUSVALID_TO_SESSVALID_A :: _1 => true } } } # [ doc = "Reader of field `VBUSVALID_TO_SESSVALID`" ] pub type VBUSVALID_TO_SESSVALID_R = crate :: R < bool , VBUSVALID_TO_SESSVALID_A > ; impl VBUSVALID_TO_SESSVALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_TO_SESSVALID_A { match self . bits { false => VBUSVALID_TO_SESSVALID_A :: _0 , true => VBUSVALID_TO_SESSVALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUSVALID_TO_SESSVALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUSVALID_TO_SESSVALID_A :: _1 } } # [ doc = "Write proxy for field `VBUSVALID_TO_SESSVALID`" ] pub struct VBUSVALID_TO_SESSVALID_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_TO_SESSVALID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_TO_SESSVALID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator for VBUS_VALID results" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_TO_SESSVALID_A :: _0 ) } # [ doc = "Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_TO_SESSVALID_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Enables the VBUS_VALID comparator\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWRUP_CMPS_A { # [ doc = "0: Powers down the VBUS_VALID comparator" ] _0 , # [ doc = "1: Enables the VBUS_VALID comparator (default)" ] _1 } impl From < PWRUP_CMPS_A > for bool { # [ inline ( always ) ] fn from ( variant : PWRUP_CMPS_A ) -> Self { match variant { PWRUP_CMPS_A :: _0 => false , PWRUP_CMPS_A :: _1 => true } } } # [ doc = "Reader of field `PWRUP_CMPS`" ] pub type PWRUP_CMPS_R = crate :: R < bool , PWRUP_CMPS_A > ; impl PWRUP_CMPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PWRUP_CMPS_A { match self . bits { false => PWRUP_CMPS_A :: _0 , true => PWRUP_CMPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PWRUP_CMPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PWRUP_CMPS_A :: _1 } } # [ doc = "Write proxy for field `PWRUP_CMPS`" ] pub struct PWRUP_CMPS_W < 'a > { w : & 'a mut W , } impl < 'a > PWRUP_CMPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PWRUP_CMPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Powers down the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PWRUP_CMPS_A :: _0 ) } # [ doc = "Enables the VBUS_VALID comparator (default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PWRUP_CMPS_A :: _1 ) } # [ 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 = "Controls VBUS discharge resistor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISCHARGE_VBUS_A { # [ doc = "0: VBUS discharge resistor is disabled (Default)" ] _0 , # [ doc = "1: VBUS discharge resistor is enabled" ] _1 } impl From < DISCHARGE_VBUS_A > for bool { # [ inline ( always ) ] fn from ( variant : DISCHARGE_VBUS_A ) -> Self { match variant { DISCHARGE_VBUS_A :: _0 => false , DISCHARGE_VBUS_A :: _1 => true } } } # [ doc = "Reader of field `DISCHARGE_VBUS`" ] pub type DISCHARGE_VBUS_R = crate :: R < bool , DISCHARGE_VBUS_A > ; impl DISCHARGE_VBUS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DISCHARGE_VBUS_A { match self . bits { false => DISCHARGE_VBUS_A :: _0 , true => DISCHARGE_VBUS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DISCHARGE_VBUS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DISCHARGE_VBUS_A :: _1 } } # [ doc = "Write proxy for field `DISCHARGE_VBUS`" ] pub struct DISCHARGE_VBUS_W < 'a > { w : & 'a mut W , } impl < 'a > DISCHARGE_VBUS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISCHARGE_VBUS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "VBUS discharge resistor is disabled (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DISCHARGE_VBUS_A :: _0 ) } # [ doc = "VBUS discharge resistor is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DISCHARGE_VBUS_A :: _1 ) } # [ 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 = "Enables resistors used for an older method of resistive battery charger detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_CHARGER_RESISTOR_A { # [ doc = "0: Disable resistive charger detection resistors on USB_DP and USB_DP" ] _0 , # [ doc = "1: Enable resistive charger detection resistors on USB_DP and USB_DP" ] _1 } impl From < EN_CHARGER_RESISTOR_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_CHARGER_RESISTOR_A ) -> Self { match variant { EN_CHARGER_RESISTOR_A :: _0 => false , EN_CHARGER_RESISTOR_A :: _1 => true } } } # [ doc = "Reader of field `EN_CHARGER_RESISTOR`" ] pub type EN_CHARGER_RESISTOR_R = crate :: R < bool , EN_CHARGER_RESISTOR_A > ; impl EN_CHARGER_RESISTOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_CHARGER_RESISTOR_A { match self . bits { false => EN_CHARGER_RESISTOR_A :: _0 , true => EN_CHARGER_RESISTOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_CHARGER_RESISTOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_CHARGER_RESISTOR_A :: _1 } } # [ doc = "Write proxy for field `EN_CHARGER_RESISTOR`" ] pub struct EN_CHARGER_RESISTOR_W < 'a > { w : & 'a mut W , } impl < 'a > EN_CHARGER_RESISTOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_CHARGER_RESISTOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable resistive charger detection resistors on USB_DP and USB_DP" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_CHARGER_RESISTOR_A :: _0 ) } # [ doc = "Enable resistive charger detection resistors on USB_DP and USB_DP" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_CHARGER_RESISTOR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Sets the threshold for the VBUSVALID comparator" ] # [ inline ( always ) ] pub fn vbusvalid_thresh ( & self ) -> VBUSVALID_THRESH_R { VBUSVALID_THRESH_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - VBUS detect signal override enable" ] # [ inline ( always ) ] pub fn vbus_override_en ( & self ) -> VBUS_OVERRIDE_EN_R { VBUS_OVERRIDE_EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Override value for SESSEND" ] # [ inline ( always ) ] pub fn sessend_override ( & self ) -> SESSEND_OVERRIDE_R { SESSEND_OVERRIDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Override value for B-Device Session Valid" ] # [ inline ( always ) ] pub fn bvalid_override ( & self ) -> BVALID_OVERRIDE_R { BVALID_OVERRIDE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Override value for A-Device Session Valid" ] # [ inline ( always ) ] pub fn avalid_override ( & self ) -> AVALID_OVERRIDE_R { AVALID_OVERRIDE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Override value for VBUS_VALID signal sent to USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_override ( & self ) -> VBUSVALID_OVERRIDE_R { VBUSVALID_OVERRIDE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_sel ( & self ) -> VBUSVALID_SEL_R { VBUSVALID_SEL_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bits 9:10 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbus_source_sel ( & self ) -> VBUS_SOURCE_SEL_R { VBUS_SOURCE_SEL_R :: new ( ( ( self . bits >> 9 ) & 0x03 ) as u8 ) } # [ doc = "Bit 18 - Selects the comparator used for VBUS_VALID" ] # [ inline ( always ) ] pub fn vbusvalid_to_sessvalid ( & self ) -> VBUSVALID_TO_SESSVALID_R { VBUSVALID_TO_SESSVALID_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enables the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn pwrup_cmps ( & self ) -> PWRUP_CMPS_R { PWRUP_CMPS_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Controls VBUS discharge resistor" ] # [ inline ( always ) ] pub fn discharge_vbus ( & self ) -> DISCHARGE_VBUS_R { DISCHARGE_VBUS_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Enables resistors used for an older method of resistive battery charger detection" ] # [ inline ( always ) ] pub fn en_charger_resistor ( & self ) -> EN_CHARGER_RESISTOR_R { EN_CHARGER_RESISTOR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Sets the threshold for the VBUSVALID comparator" ] # [ inline ( always ) ] pub fn vbusvalid_thresh ( & mut self ) -> VBUSVALID_THRESH_W { VBUSVALID_THRESH_W { w : self } } # [ doc = "Bit 3 - VBUS detect signal override enable" ] # [ inline ( always ) ] pub fn vbus_override_en ( & mut self ) -> VBUS_OVERRIDE_EN_W { VBUS_OVERRIDE_EN_W { w : self } } # [ doc = "Bit 4 - Override value for SESSEND" ] # [ inline ( always ) ] pub fn sessend_override ( & mut self ) -> SESSEND_OVERRIDE_W { SESSEND_OVERRIDE_W { w : self } } # [ doc = "Bit 5 - Override value for B-Device Session Valid" ] # [ inline ( always ) ] pub fn bvalid_override ( & mut self ) -> BVALID_OVERRIDE_W { BVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 6 - Override value for A-Device Session Valid" ] # [ inline ( always ) ] pub fn avalid_override ( & mut self ) -> AVALID_OVERRIDE_W { AVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 7 - Override value for VBUS_VALID signal sent to USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_override ( & mut self ) -> VBUSVALID_OVERRIDE_W { VBUSVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 8 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_sel ( & mut self ) -> VBUSVALID_SEL_W { VBUSVALID_SEL_W { w : self } } # [ doc = "Bits 9:10 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbus_source_sel ( & mut self ) -> VBUS_SOURCE_SEL_W { VBUS_SOURCE_SEL_W { w : self } } # [ doc = "Bit 18 - Selects the comparator used for VBUS_VALID" ] # [ inline ( always ) ] pub fn vbusvalid_to_sessvalid ( & mut self ) -> VBUSVALID_TO_SESSVALID_W { VBUSVALID_TO_SESSVALID_W { w : self } } # [ doc = "Bit 20 - Enables the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn pwrup_cmps ( & mut self ) -> PWRUP_CMPS_W { PWRUP_CMPS_W { w : self } } # [ doc = "Bit 26 - Controls VBUS discharge resistor" ] # [ inline ( always ) ] pub fn discharge_vbus ( & mut self ) -> DISCHARGE_VBUS_W { DISCHARGE_VBUS_W { w : self } } # [ doc = "Bit 31 - Enables resistors used for an older method of resistive battery charger detection" ] # [ inline ( always ) ] pub fn en_charger_resistor ( & mut self ) -> EN_CHARGER_RESISTOR_W { EN_CHARGER_RESISTOR_W { w : self } } } } # [ doc = "USB PHY VBUS Detect Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_vbus_detect_clr](usb1_vbus_detect_clr) module" ] pub type USB1_VBUS_DETECT_CLR = crate :: Reg < u32 , _USB1_VBUS_DETECT_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_VBUS_DETECT_CLR ; # [ doc = "`read()` method returns [usb1_vbus_detect_clr::R](usb1_vbus_detect_clr::R) reader structure" ] impl crate :: Readable for USB1_VBUS_DETECT_CLR { } # [ doc = "`write(|w| ..)` method takes [usb1_vbus_detect_clr::W](usb1_vbus_detect_clr::W) writer structure" ] impl crate :: Writable for USB1_VBUS_DETECT_CLR { } # [ doc = "USB PHY VBUS Detect Control Register" ] pub mod usb1_vbus_detect_clr { # [ doc = "Reader of register USB1_VBUS_DETECT_CLR" ] pub type R = crate :: R < u32 , super :: USB1_VBUS_DETECT_CLR > ; # [ doc = "Writer for register USB1_VBUS_DETECT_CLR" ] pub type W = crate :: W < u32 , super :: USB1_VBUS_DETECT_CLR > ; # [ doc = "Register USB1_VBUS_DETECT_CLR `reset()`'s with value 0x0070_0004" ] impl crate :: ResetValue for super :: USB1_VBUS_DETECT_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0070_0004 } } # [ doc = "Sets the threshold for the VBUSVALID comparator\n\nValue on reset: 4" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_THRESH_A { # [ doc = "0: 4.0 V" ] _000 , # [ doc = "1: 4.1 V" ] _001 , # [ doc = "2: 4.2 V" ] _010 , # [ doc = "3: 4.3 V" ] _011 , # [ doc = "4: 4.4 V (Default)" ] _100 , # [ doc = "5: 4.5 V" ] _101 , # [ doc = "6: 4.6 V" ] _110 , # [ doc = "7: 4.7 V" ] _111 } impl From < VBUSVALID_THRESH_A > for u8 { # [ inline ( always ) ] fn from ( variant : VBUSVALID_THRESH_A ) -> Self { match variant { VBUSVALID_THRESH_A :: _000 => 0 , VBUSVALID_THRESH_A :: _001 => 1 , VBUSVALID_THRESH_A :: _010 => 2 , VBUSVALID_THRESH_A :: _011 => 3 , VBUSVALID_THRESH_A :: _100 => 4 , VBUSVALID_THRESH_A :: _101 => 5 , VBUSVALID_THRESH_A :: _110 => 6 , VBUSVALID_THRESH_A :: _111 => 7 } } } # [ doc = "Reader of field `VBUSVALID_THRESH`" ] pub type VBUSVALID_THRESH_R = crate :: R < u8 , VBUSVALID_THRESH_A > ; impl VBUSVALID_THRESH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_THRESH_A { match self . bits { 0 => VBUSVALID_THRESH_A :: _000 , 1 => VBUSVALID_THRESH_A :: _001 , 2 => VBUSVALID_THRESH_A :: _010 , 3 => VBUSVALID_THRESH_A :: _011 , 4 => VBUSVALID_THRESH_A :: _100 , 5 => VBUSVALID_THRESH_A :: _101 , 6 => VBUSVALID_THRESH_A :: _110 , 7 => VBUSVALID_THRESH_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _111 } } # [ doc = "Write proxy for field `VBUSVALID_THRESH`" ] pub struct VBUSVALID_THRESH_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_THRESH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_THRESH_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "4.0 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _000 ) } # [ doc = "4.1 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _001 ) } # [ doc = "4.2 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _010 ) } # [ doc = "4.3 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _011 ) } # [ doc = "4.4 V (Default)" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _100 ) } # [ doc = "4.5 V" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _101 ) } # [ doc = "4.6 V" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _110 ) } # [ doc = "4.7 V" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "VBUS detect signal override enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_OVERRIDE_EN_A { # [ doc = "0: Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)" ] _0 , # [ doc = "1: Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND" ] _1 } impl From < VBUS_OVERRIDE_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUS_OVERRIDE_EN_A ) -> Self { match variant { VBUS_OVERRIDE_EN_A :: _0 => false , VBUS_OVERRIDE_EN_A :: _1 => true } } } # [ doc = "Reader of field `VBUS_OVERRIDE_EN`" ] pub type VBUS_OVERRIDE_EN_R = crate :: R < bool , VBUS_OVERRIDE_EN_A > ; impl VBUS_OVERRIDE_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_OVERRIDE_EN_A { match self . bits { false => VBUS_OVERRIDE_EN_A :: _0 , true => VBUS_OVERRIDE_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUS_OVERRIDE_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUS_OVERRIDE_EN_A :: _1 } } # [ doc = "Write proxy for field `VBUS_OVERRIDE_EN`" ] pub struct VBUS_OVERRIDE_EN_W < 'a > { w : & 'a mut W , } impl < 'a > VBUS_OVERRIDE_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUS_OVERRIDE_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUS_OVERRIDE_EN_A :: _0 ) } # [ doc = "Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUS_OVERRIDE_EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `SESSEND_OVERRIDE`" ] pub type SESSEND_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SESSEND_OVERRIDE`" ] pub struct SESSEND_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > SESSEND_OVERRIDE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `BVALID_OVERRIDE`" ] pub type BVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BVALID_OVERRIDE`" ] pub struct BVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > BVALID_OVERRIDE_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 = "Reader of field `AVALID_OVERRIDE`" ] pub type AVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AVALID_OVERRIDE`" ] pub struct AVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > AVALID_OVERRIDE_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 = "Reader of field `VBUSVALID_OVERRIDE`" ] pub type VBUSVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `VBUSVALID_OVERRIDE`" ] pub struct VBUSVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_OVERRIDE_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 = "Selects the source of the VBUS_VALID signal reported to the USB controller\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_SEL_A { # [ doc = "0: Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] _0 , # [ doc = "1: Use the VBUS_VALID_3V detector results for signal reported to the USB controller" ] _1 } impl From < VBUSVALID_SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUSVALID_SEL_A ) -> Self { match variant { VBUSVALID_SEL_A :: _0 => false , VBUSVALID_SEL_A :: _1 => true } } } # [ doc = "Reader of field `VBUSVALID_SEL`" ] pub type VBUSVALID_SEL_R = crate :: R < bool , VBUSVALID_SEL_A > ; impl VBUSVALID_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_SEL_A { match self . bits { false => VBUSVALID_SEL_A :: _0 , true => VBUSVALID_SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUSVALID_SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUSVALID_SEL_A :: _1 } } # [ doc = "Write proxy for field `VBUSVALID_SEL`" ] pub struct VBUSVALID_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_SEL_A :: _0 ) } # [ doc = "Use the VBUS_VALID_3V detector results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_SEL_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Selects the source of the VBUS_VALID signal reported to the USB controller\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_SOURCE_SEL_A { # [ doc = "0: Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] _00 , # [ doc = "1: Use the Session Valid comparator results for signal reported to the USB controller" ] _01 , # [ doc = "2: Use the Session Valid comparator results for signal reported to the USB controller" ] _10 , # [ doc = "3: Reserved, do not use" ] _11 } impl From < VBUS_SOURCE_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : VBUS_SOURCE_SEL_A ) -> Self { match variant { VBUS_SOURCE_SEL_A :: _00 => 0 , VBUS_SOURCE_SEL_A :: _01 => 1 , VBUS_SOURCE_SEL_A :: _10 => 2 , VBUS_SOURCE_SEL_A :: _11 => 3 } } } # [ doc = "Reader of field `VBUS_SOURCE_SEL`" ] pub type VBUS_SOURCE_SEL_R = crate :: R < u8 , VBUS_SOURCE_SEL_A > ; impl VBUS_SOURCE_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_SOURCE_SEL_A { match self . bits { 0 => VBUS_SOURCE_SEL_A :: _00 , 1 => VBUS_SOURCE_SEL_A :: _01 , 2 => VBUS_SOURCE_SEL_A :: _10 , 3 => VBUS_SOURCE_SEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _11 } } # [ doc = "Write proxy for field `VBUS_SOURCE_SEL`" ] pub struct VBUS_SOURCE_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > VBUS_SOURCE_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUS_SOURCE_SEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _00 ) } # [ doc = "Use the Session Valid comparator results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _01 ) } # [ doc = "Use the Session Valid comparator results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _10 ) } # [ doc = "Reserved, do not use" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 9 ) ) | ( ( ( value as u32 ) & 0x03 ) << 9 ) ; self . w } } # [ doc = "Selects the comparator used for VBUS_VALID\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_TO_SESSVALID_A { # [ doc = "0: Use the VBUS_VALID comparator for VBUS_VALID results" ] _0 , # [ doc = "1: Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V." ] _1 } impl From < VBUSVALID_TO_SESSVALID_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUSVALID_TO_SESSVALID_A ) -> Self { match variant { VBUSVALID_TO_SESSVALID_A :: _0 => false , VBUSVALID_TO_SESSVALID_A :: _1 => true } } } # [ doc = "Reader of field `VBUSVALID_TO_SESSVALID`" ] pub type VBUSVALID_TO_SESSVALID_R = crate :: R < bool , VBUSVALID_TO_SESSVALID_A > ; impl VBUSVALID_TO_SESSVALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_TO_SESSVALID_A { match self . bits { false => VBUSVALID_TO_SESSVALID_A :: _0 , true => VBUSVALID_TO_SESSVALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUSVALID_TO_SESSVALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUSVALID_TO_SESSVALID_A :: _1 } } # [ doc = "Write proxy for field `VBUSVALID_TO_SESSVALID`" ] pub struct VBUSVALID_TO_SESSVALID_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_TO_SESSVALID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_TO_SESSVALID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator for VBUS_VALID results" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_TO_SESSVALID_A :: _0 ) } # [ doc = "Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_TO_SESSVALID_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Enables the VBUS_VALID comparator\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWRUP_CMPS_A { # [ doc = "0: Powers down the VBUS_VALID comparator" ] _0 , # [ doc = "1: Enables the VBUS_VALID comparator (default)" ] _1 } impl From < PWRUP_CMPS_A > for bool { # [ inline ( always ) ] fn from ( variant : PWRUP_CMPS_A ) -> Self { match variant { PWRUP_CMPS_A :: _0 => false , PWRUP_CMPS_A :: _1 => true } } } # [ doc = "Reader of field `PWRUP_CMPS`" ] pub type PWRUP_CMPS_R = crate :: R < bool , PWRUP_CMPS_A > ; impl PWRUP_CMPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PWRUP_CMPS_A { match self . bits { false => PWRUP_CMPS_A :: _0 , true => PWRUP_CMPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PWRUP_CMPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PWRUP_CMPS_A :: _1 } } # [ doc = "Write proxy for field `PWRUP_CMPS`" ] pub struct PWRUP_CMPS_W < 'a > { w : & 'a mut W , } impl < 'a > PWRUP_CMPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PWRUP_CMPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Powers down the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PWRUP_CMPS_A :: _0 ) } # [ doc = "Enables the VBUS_VALID comparator (default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PWRUP_CMPS_A :: _1 ) } # [ 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 = "Controls VBUS discharge resistor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISCHARGE_VBUS_A { # [ doc = "0: VBUS discharge resistor is disabled (Default)" ] _0 , # [ doc = "1: VBUS discharge resistor is enabled" ] _1 } impl From < DISCHARGE_VBUS_A > for bool { # [ inline ( always ) ] fn from ( variant : DISCHARGE_VBUS_A ) -> Self { match variant { DISCHARGE_VBUS_A :: _0 => false , DISCHARGE_VBUS_A :: _1 => true } } } # [ doc = "Reader of field `DISCHARGE_VBUS`" ] pub type DISCHARGE_VBUS_R = crate :: R < bool , DISCHARGE_VBUS_A > ; impl DISCHARGE_VBUS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DISCHARGE_VBUS_A { match self . bits { false => DISCHARGE_VBUS_A :: _0 , true => DISCHARGE_VBUS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DISCHARGE_VBUS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DISCHARGE_VBUS_A :: _1 } } # [ doc = "Write proxy for field `DISCHARGE_VBUS`" ] pub struct DISCHARGE_VBUS_W < 'a > { w : & 'a mut W , } impl < 'a > DISCHARGE_VBUS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISCHARGE_VBUS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "VBUS discharge resistor is disabled (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DISCHARGE_VBUS_A :: _0 ) } # [ doc = "VBUS discharge resistor is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DISCHARGE_VBUS_A :: _1 ) } # [ 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 = "Enables resistors used for an older method of resistive battery charger detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_CHARGER_RESISTOR_A { # [ doc = "0: Disable resistive charger detection resistors on USB_DP and USB_DP" ] _0 , # [ doc = "1: Enable resistive charger detection resistors on USB_DP and USB_DP" ] _1 } impl From < EN_CHARGER_RESISTOR_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_CHARGER_RESISTOR_A ) -> Self { match variant { EN_CHARGER_RESISTOR_A :: _0 => false , EN_CHARGER_RESISTOR_A :: _1 => true } } } # [ doc = "Reader of field `EN_CHARGER_RESISTOR`" ] pub type EN_CHARGER_RESISTOR_R = crate :: R < bool , EN_CHARGER_RESISTOR_A > ; impl EN_CHARGER_RESISTOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_CHARGER_RESISTOR_A { match self . bits { false => EN_CHARGER_RESISTOR_A :: _0 , true => EN_CHARGER_RESISTOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_CHARGER_RESISTOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_CHARGER_RESISTOR_A :: _1 } } # [ doc = "Write proxy for field `EN_CHARGER_RESISTOR`" ] pub struct EN_CHARGER_RESISTOR_W < 'a > { w : & 'a mut W , } impl < 'a > EN_CHARGER_RESISTOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_CHARGER_RESISTOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable resistive charger detection resistors on USB_DP and USB_DP" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_CHARGER_RESISTOR_A :: _0 ) } # [ doc = "Enable resistive charger detection resistors on USB_DP and USB_DP" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_CHARGER_RESISTOR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Sets the threshold for the VBUSVALID comparator" ] # [ inline ( always ) ] pub fn vbusvalid_thresh ( & self ) -> VBUSVALID_THRESH_R { VBUSVALID_THRESH_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - VBUS detect signal override enable" ] # [ inline ( always ) ] pub fn vbus_override_en ( & self ) -> VBUS_OVERRIDE_EN_R { VBUS_OVERRIDE_EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Override value for SESSEND" ] # [ inline ( always ) ] pub fn sessend_override ( & self ) -> SESSEND_OVERRIDE_R { SESSEND_OVERRIDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Override value for B-Device Session Valid" ] # [ inline ( always ) ] pub fn bvalid_override ( & self ) -> BVALID_OVERRIDE_R { BVALID_OVERRIDE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Override value for A-Device Session Valid" ] # [ inline ( always ) ] pub fn avalid_override ( & self ) -> AVALID_OVERRIDE_R { AVALID_OVERRIDE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Override value for VBUS_VALID signal sent to USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_override ( & self ) -> VBUSVALID_OVERRIDE_R { VBUSVALID_OVERRIDE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_sel ( & self ) -> VBUSVALID_SEL_R { VBUSVALID_SEL_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bits 9:10 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbus_source_sel ( & self ) -> VBUS_SOURCE_SEL_R { VBUS_SOURCE_SEL_R :: new ( ( ( self . bits >> 9 ) & 0x03 ) as u8 ) } # [ doc = "Bit 18 - Selects the comparator used for VBUS_VALID" ] # [ inline ( always ) ] pub fn vbusvalid_to_sessvalid ( & self ) -> VBUSVALID_TO_SESSVALID_R { VBUSVALID_TO_SESSVALID_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enables the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn pwrup_cmps ( & self ) -> PWRUP_CMPS_R { PWRUP_CMPS_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Controls VBUS discharge resistor" ] # [ inline ( always ) ] pub fn discharge_vbus ( & self ) -> DISCHARGE_VBUS_R { DISCHARGE_VBUS_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Enables resistors used for an older method of resistive battery charger detection" ] # [ inline ( always ) ] pub fn en_charger_resistor ( & self ) -> EN_CHARGER_RESISTOR_R { EN_CHARGER_RESISTOR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Sets the threshold for the VBUSVALID comparator" ] # [ inline ( always ) ] pub fn vbusvalid_thresh ( & mut self ) -> VBUSVALID_THRESH_W { VBUSVALID_THRESH_W { w : self } } # [ doc = "Bit 3 - VBUS detect signal override enable" ] # [ inline ( always ) ] pub fn vbus_override_en ( & mut self ) -> VBUS_OVERRIDE_EN_W { VBUS_OVERRIDE_EN_W { w : self } } # [ doc = "Bit 4 - Override value for SESSEND" ] # [ inline ( always ) ] pub fn sessend_override ( & mut self ) -> SESSEND_OVERRIDE_W { SESSEND_OVERRIDE_W { w : self } } # [ doc = "Bit 5 - Override value for B-Device Session Valid" ] # [ inline ( always ) ] pub fn bvalid_override ( & mut self ) -> BVALID_OVERRIDE_W { BVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 6 - Override value for A-Device Session Valid" ] # [ inline ( always ) ] pub fn avalid_override ( & mut self ) -> AVALID_OVERRIDE_W { AVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 7 - Override value for VBUS_VALID signal sent to USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_override ( & mut self ) -> VBUSVALID_OVERRIDE_W { VBUSVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 8 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_sel ( & mut self ) -> VBUSVALID_SEL_W { VBUSVALID_SEL_W { w : self } } # [ doc = "Bits 9:10 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbus_source_sel ( & mut self ) -> VBUS_SOURCE_SEL_W { VBUS_SOURCE_SEL_W { w : self } } # [ doc = "Bit 18 - Selects the comparator used for VBUS_VALID" ] # [ inline ( always ) ] pub fn vbusvalid_to_sessvalid ( & mut self ) -> VBUSVALID_TO_SESSVALID_W { VBUSVALID_TO_SESSVALID_W { w : self } } # [ doc = "Bit 20 - Enables the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn pwrup_cmps ( & mut self ) -> PWRUP_CMPS_W { PWRUP_CMPS_W { w : self } } # [ doc = "Bit 26 - Controls VBUS discharge resistor" ] # [ inline ( always ) ] pub fn discharge_vbus ( & mut self ) -> DISCHARGE_VBUS_W { DISCHARGE_VBUS_W { w : self } } # [ doc = "Bit 31 - Enables resistors used for an older method of resistive battery charger detection" ] # [ inline ( always ) ] pub fn en_charger_resistor ( & mut self ) -> EN_CHARGER_RESISTOR_W { EN_CHARGER_RESISTOR_W { w : self } } } } # [ doc = "USB PHY VBUS Detect Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_vbus_detect_tog](usb1_vbus_detect_tog) module" ] pub type USB1_VBUS_DETECT_TOG = crate :: Reg < u32 , _USB1_VBUS_DETECT_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_VBUS_DETECT_TOG ; # [ doc = "`read()` method returns [usb1_vbus_detect_tog::R](usb1_vbus_detect_tog::R) reader structure" ] impl crate :: Readable for USB1_VBUS_DETECT_TOG { } # [ doc = "`write(|w| ..)` method takes [usb1_vbus_detect_tog::W](usb1_vbus_detect_tog::W) writer structure" ] impl crate :: Writable for USB1_VBUS_DETECT_TOG { } # [ doc = "USB PHY VBUS Detect Control Register" ] pub mod usb1_vbus_detect_tog { # [ doc = "Reader of register USB1_VBUS_DETECT_TOG" ] pub type R = crate :: R < u32 , super :: USB1_VBUS_DETECT_TOG > ; # [ doc = "Writer for register USB1_VBUS_DETECT_TOG" ] pub type W = crate :: W < u32 , super :: USB1_VBUS_DETECT_TOG > ; # [ doc = "Register USB1_VBUS_DETECT_TOG `reset()`'s with value 0x0070_0004" ] impl crate :: ResetValue for super :: USB1_VBUS_DETECT_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0070_0004 } } # [ doc = "Sets the threshold for the VBUSVALID comparator\n\nValue on reset: 4" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_THRESH_A { # [ doc = "0: 4.0 V" ] _000 , # [ doc = "1: 4.1 V" ] _001 , # [ doc = "2: 4.2 V" ] _010 , # [ doc = "3: 4.3 V" ] _011 , # [ doc = "4: 4.4 V (Default)" ] _100 , # [ doc = "5: 4.5 V" ] _101 , # [ doc = "6: 4.6 V" ] _110 , # [ doc = "7: 4.7 V" ] _111 } impl From < VBUSVALID_THRESH_A > for u8 { # [ inline ( always ) ] fn from ( variant : VBUSVALID_THRESH_A ) -> Self { match variant { VBUSVALID_THRESH_A :: _000 => 0 , VBUSVALID_THRESH_A :: _001 => 1 , VBUSVALID_THRESH_A :: _010 => 2 , VBUSVALID_THRESH_A :: _011 => 3 , VBUSVALID_THRESH_A :: _100 => 4 , VBUSVALID_THRESH_A :: _101 => 5 , VBUSVALID_THRESH_A :: _110 => 6 , VBUSVALID_THRESH_A :: _111 => 7 } } } # [ doc = "Reader of field `VBUSVALID_THRESH`" ] pub type VBUSVALID_THRESH_R = crate :: R < u8 , VBUSVALID_THRESH_A > ; impl VBUSVALID_THRESH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_THRESH_A { match self . bits { 0 => VBUSVALID_THRESH_A :: _000 , 1 => VBUSVALID_THRESH_A :: _001 , 2 => VBUSVALID_THRESH_A :: _010 , 3 => VBUSVALID_THRESH_A :: _011 , 4 => VBUSVALID_THRESH_A :: _100 , 5 => VBUSVALID_THRESH_A :: _101 , 6 => VBUSVALID_THRESH_A :: _110 , 7 => VBUSVALID_THRESH_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == VBUSVALID_THRESH_A :: _111 } } # [ doc = "Write proxy for field `VBUSVALID_THRESH`" ] pub struct VBUSVALID_THRESH_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_THRESH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_THRESH_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "4.0 V" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _000 ) } # [ doc = "4.1 V" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _001 ) } # [ doc = "4.2 V" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _010 ) } # [ doc = "4.3 V" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _011 ) } # [ doc = "4.4 V (Default)" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _100 ) } # [ doc = "4.5 V" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _101 ) } # [ doc = "4.6 V" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _110 ) } # [ doc = "4.7 V" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_THRESH_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "VBUS detect signal override enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_OVERRIDE_EN_A { # [ doc = "0: Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)" ] _0 , # [ doc = "1: Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND" ] _1 } impl From < VBUS_OVERRIDE_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUS_OVERRIDE_EN_A ) -> Self { match variant { VBUS_OVERRIDE_EN_A :: _0 => false , VBUS_OVERRIDE_EN_A :: _1 => true } } } # [ doc = "Reader of field `VBUS_OVERRIDE_EN`" ] pub type VBUS_OVERRIDE_EN_R = crate :: R < bool , VBUS_OVERRIDE_EN_A > ; impl VBUS_OVERRIDE_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_OVERRIDE_EN_A { match self . bits { false => VBUS_OVERRIDE_EN_A :: _0 , true => VBUS_OVERRIDE_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUS_OVERRIDE_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUS_OVERRIDE_EN_A :: _1 } } # [ doc = "Write proxy for field `VBUS_OVERRIDE_EN`" ] pub struct VBUS_OVERRIDE_EN_W < 'a > { w : & 'a mut W , } impl < 'a > VBUS_OVERRIDE_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUS_OVERRIDE_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUS_OVERRIDE_EN_A :: _0 ) } # [ doc = "Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUS_OVERRIDE_EN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `SESSEND_OVERRIDE`" ] pub type SESSEND_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SESSEND_OVERRIDE`" ] pub struct SESSEND_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > SESSEND_OVERRIDE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `BVALID_OVERRIDE`" ] pub type BVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BVALID_OVERRIDE`" ] pub struct BVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > BVALID_OVERRIDE_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 = "Reader of field `AVALID_OVERRIDE`" ] pub type AVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AVALID_OVERRIDE`" ] pub struct AVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > AVALID_OVERRIDE_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 = "Reader of field `VBUSVALID_OVERRIDE`" ] pub type VBUSVALID_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `VBUSVALID_OVERRIDE`" ] pub struct VBUSVALID_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_OVERRIDE_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 = "Selects the source of the VBUS_VALID signal reported to the USB controller\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_SEL_A { # [ doc = "0: Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] _0 , # [ doc = "1: Use the VBUS_VALID_3V detector results for signal reported to the USB controller" ] _1 } impl From < VBUSVALID_SEL_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUSVALID_SEL_A ) -> Self { match variant { VBUSVALID_SEL_A :: _0 => false , VBUSVALID_SEL_A :: _1 => true } } } # [ doc = "Reader of field `VBUSVALID_SEL`" ] pub type VBUSVALID_SEL_R = crate :: R < bool , VBUSVALID_SEL_A > ; impl VBUSVALID_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_SEL_A { match self . bits { false => VBUSVALID_SEL_A :: _0 , true => VBUSVALID_SEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUSVALID_SEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUSVALID_SEL_A :: _1 } } # [ doc = "Write proxy for field `VBUSVALID_SEL`" ] pub struct VBUSVALID_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_SEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_SEL_A :: _0 ) } # [ doc = "Use the VBUS_VALID_3V detector results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_SEL_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Selects the source of the VBUS_VALID signal reported to the USB controller\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_SOURCE_SEL_A { # [ doc = "0: Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] _00 , # [ doc = "1: Use the Session Valid comparator results for signal reported to the USB controller" ] _01 , # [ doc = "2: Use the Session Valid comparator results for signal reported to the USB controller" ] _10 , # [ doc = "3: Reserved, do not use" ] _11 } impl From < VBUS_SOURCE_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : VBUS_SOURCE_SEL_A ) -> Self { match variant { VBUS_SOURCE_SEL_A :: _00 => 0 , VBUS_SOURCE_SEL_A :: _01 => 1 , VBUS_SOURCE_SEL_A :: _10 => 2 , VBUS_SOURCE_SEL_A :: _11 => 3 } } } # [ doc = "Reader of field `VBUS_SOURCE_SEL`" ] pub type VBUS_SOURCE_SEL_R = crate :: R < u8 , VBUS_SOURCE_SEL_A > ; impl VBUS_SOURCE_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_SOURCE_SEL_A { match self . bits { 0 => VBUS_SOURCE_SEL_A :: _00 , 1 => VBUS_SOURCE_SEL_A :: _01 , 2 => VBUS_SOURCE_SEL_A :: _10 , 3 => VBUS_SOURCE_SEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == VBUS_SOURCE_SEL_A :: _11 } } # [ doc = "Write proxy for field `VBUS_SOURCE_SEL`" ] pub struct VBUS_SOURCE_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > VBUS_SOURCE_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUS_SOURCE_SEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _00 ) } # [ doc = "Use the Session Valid comparator results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _01 ) } # [ doc = "Use the Session Valid comparator results for signal reported to the USB controller" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _10 ) } # [ doc = "Reserved, do not use" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( VBUS_SOURCE_SEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 9 ) ) | ( ( ( value as u32 ) & 0x03 ) << 9 ) ; self . w } } # [ doc = "Selects the comparator used for VBUS_VALID\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUSVALID_TO_SESSVALID_A { # [ doc = "0: Use the VBUS_VALID comparator for VBUS_VALID results" ] _0 , # [ doc = "1: Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V." ] _1 } impl From < VBUSVALID_TO_SESSVALID_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUSVALID_TO_SESSVALID_A ) -> Self { match variant { VBUSVALID_TO_SESSVALID_A :: _0 => false , VBUSVALID_TO_SESSVALID_A :: _1 => true } } } # [ doc = "Reader of field `VBUSVALID_TO_SESSVALID`" ] pub type VBUSVALID_TO_SESSVALID_R = crate :: R < bool , VBUSVALID_TO_SESSVALID_A > ; impl VBUSVALID_TO_SESSVALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUSVALID_TO_SESSVALID_A { match self . bits { false => VBUSVALID_TO_SESSVALID_A :: _0 , true => VBUSVALID_TO_SESSVALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUSVALID_TO_SESSVALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUSVALID_TO_SESSVALID_A :: _1 } } # [ doc = "Write proxy for field `VBUSVALID_TO_SESSVALID`" ] pub struct VBUSVALID_TO_SESSVALID_W < 'a > { w : & 'a mut W , } impl < 'a > VBUSVALID_TO_SESSVALID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VBUSVALID_TO_SESSVALID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Use the VBUS_VALID comparator for VBUS_VALID results" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_TO_SESSVALID_A :: _0 ) } # [ doc = "Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VBUSVALID_TO_SESSVALID_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Enables the VBUS_VALID comparator\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWRUP_CMPS_A { # [ doc = "0: Powers down the VBUS_VALID comparator" ] _0 , # [ doc = "1: Enables the VBUS_VALID comparator (default)" ] _1 } impl From < PWRUP_CMPS_A > for bool { # [ inline ( always ) ] fn from ( variant : PWRUP_CMPS_A ) -> Self { match variant { PWRUP_CMPS_A :: _0 => false , PWRUP_CMPS_A :: _1 => true } } } # [ doc = "Reader of field `PWRUP_CMPS`" ] pub type PWRUP_CMPS_R = crate :: R < bool , PWRUP_CMPS_A > ; impl PWRUP_CMPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PWRUP_CMPS_A { match self . bits { false => PWRUP_CMPS_A :: _0 , true => PWRUP_CMPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PWRUP_CMPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PWRUP_CMPS_A :: _1 } } # [ doc = "Write proxy for field `PWRUP_CMPS`" ] pub struct PWRUP_CMPS_W < 'a > { w : & 'a mut W , } impl < 'a > PWRUP_CMPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PWRUP_CMPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Powers down the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PWRUP_CMPS_A :: _0 ) } # [ doc = "Enables the VBUS_VALID comparator (default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PWRUP_CMPS_A :: _1 ) } # [ 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 = "Controls VBUS discharge resistor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISCHARGE_VBUS_A { # [ doc = "0: VBUS discharge resistor is disabled (Default)" ] _0 , # [ doc = "1: VBUS discharge resistor is enabled" ] _1 } impl From < DISCHARGE_VBUS_A > for bool { # [ inline ( always ) ] fn from ( variant : DISCHARGE_VBUS_A ) -> Self { match variant { DISCHARGE_VBUS_A :: _0 => false , DISCHARGE_VBUS_A :: _1 => true } } } # [ doc = "Reader of field `DISCHARGE_VBUS`" ] pub type DISCHARGE_VBUS_R = crate :: R < bool , DISCHARGE_VBUS_A > ; impl DISCHARGE_VBUS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DISCHARGE_VBUS_A { match self . bits { false => DISCHARGE_VBUS_A :: _0 , true => DISCHARGE_VBUS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DISCHARGE_VBUS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DISCHARGE_VBUS_A :: _1 } } # [ doc = "Write proxy for field `DISCHARGE_VBUS`" ] pub struct DISCHARGE_VBUS_W < 'a > { w : & 'a mut W , } impl < 'a > DISCHARGE_VBUS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DISCHARGE_VBUS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "VBUS discharge resistor is disabled (Default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DISCHARGE_VBUS_A :: _0 ) } # [ doc = "VBUS discharge resistor is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DISCHARGE_VBUS_A :: _1 ) } # [ 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 = "Enables resistors used for an older method of resistive battery charger detection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_CHARGER_RESISTOR_A { # [ doc = "0: Disable resistive charger detection resistors on USB_DP and USB_DP" ] _0 , # [ doc = "1: Enable resistive charger detection resistors on USB_DP and USB_DP" ] _1 } impl From < EN_CHARGER_RESISTOR_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_CHARGER_RESISTOR_A ) -> Self { match variant { EN_CHARGER_RESISTOR_A :: _0 => false , EN_CHARGER_RESISTOR_A :: _1 => true } } } # [ doc = "Reader of field `EN_CHARGER_RESISTOR`" ] pub type EN_CHARGER_RESISTOR_R = crate :: R < bool , EN_CHARGER_RESISTOR_A > ; impl EN_CHARGER_RESISTOR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_CHARGER_RESISTOR_A { match self . bits { false => EN_CHARGER_RESISTOR_A :: _0 , true => EN_CHARGER_RESISTOR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_CHARGER_RESISTOR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_CHARGER_RESISTOR_A :: _1 } } # [ doc = "Write proxy for field `EN_CHARGER_RESISTOR`" ] pub struct EN_CHARGER_RESISTOR_W < 'a > { w : & 'a mut W , } impl < 'a > EN_CHARGER_RESISTOR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_CHARGER_RESISTOR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable resistive charger detection resistors on USB_DP and USB_DP" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_CHARGER_RESISTOR_A :: _0 ) } # [ doc = "Enable resistive charger detection resistors on USB_DP and USB_DP" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_CHARGER_RESISTOR_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Sets the threshold for the VBUSVALID comparator" ] # [ inline ( always ) ] pub fn vbusvalid_thresh ( & self ) -> VBUSVALID_THRESH_R { VBUSVALID_THRESH_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bit 3 - VBUS detect signal override enable" ] # [ inline ( always ) ] pub fn vbus_override_en ( & self ) -> VBUS_OVERRIDE_EN_R { VBUS_OVERRIDE_EN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Override value for SESSEND" ] # [ inline ( always ) ] pub fn sessend_override ( & self ) -> SESSEND_OVERRIDE_R { SESSEND_OVERRIDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Override value for B-Device Session Valid" ] # [ inline ( always ) ] pub fn bvalid_override ( & self ) -> BVALID_OVERRIDE_R { BVALID_OVERRIDE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Override value for A-Device Session Valid" ] # [ inline ( always ) ] pub fn avalid_override ( & self ) -> AVALID_OVERRIDE_R { AVALID_OVERRIDE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Override value for VBUS_VALID signal sent to USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_override ( & self ) -> VBUSVALID_OVERRIDE_R { VBUSVALID_OVERRIDE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_sel ( & self ) -> VBUSVALID_SEL_R { VBUSVALID_SEL_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bits 9:10 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbus_source_sel ( & self ) -> VBUS_SOURCE_SEL_R { VBUS_SOURCE_SEL_R :: new ( ( ( self . bits >> 9 ) & 0x03 ) as u8 ) } # [ doc = "Bit 18 - Selects the comparator used for VBUS_VALID" ] # [ inline ( always ) ] pub fn vbusvalid_to_sessvalid ( & self ) -> VBUSVALID_TO_SESSVALID_R { VBUSVALID_TO_SESSVALID_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Enables the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn pwrup_cmps ( & self ) -> PWRUP_CMPS_R { PWRUP_CMPS_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Controls VBUS discharge resistor" ] # [ inline ( always ) ] pub fn discharge_vbus ( & self ) -> DISCHARGE_VBUS_R { DISCHARGE_VBUS_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Enables resistors used for an older method of resistive battery charger detection" ] # [ inline ( always ) ] pub fn en_charger_resistor ( & self ) -> EN_CHARGER_RESISTOR_R { EN_CHARGER_RESISTOR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Sets the threshold for the VBUSVALID comparator" ] # [ inline ( always ) ] pub fn vbusvalid_thresh ( & mut self ) -> VBUSVALID_THRESH_W { VBUSVALID_THRESH_W { w : self } } # [ doc = "Bit 3 - VBUS detect signal override enable" ] # [ inline ( always ) ] pub fn vbus_override_en ( & mut self ) -> VBUS_OVERRIDE_EN_W { VBUS_OVERRIDE_EN_W { w : self } } # [ doc = "Bit 4 - Override value for SESSEND" ] # [ inline ( always ) ] pub fn sessend_override ( & mut self ) -> SESSEND_OVERRIDE_W { SESSEND_OVERRIDE_W { w : self } } # [ doc = "Bit 5 - Override value for B-Device Session Valid" ] # [ inline ( always ) ] pub fn bvalid_override ( & mut self ) -> BVALID_OVERRIDE_W { BVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 6 - Override value for A-Device Session Valid" ] # [ inline ( always ) ] pub fn avalid_override ( & mut self ) -> AVALID_OVERRIDE_W { AVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 7 - Override value for VBUS_VALID signal sent to USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_override ( & mut self ) -> VBUSVALID_OVERRIDE_W { VBUSVALID_OVERRIDE_W { w : self } } # [ doc = "Bit 8 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbusvalid_sel ( & mut self ) -> VBUSVALID_SEL_W { VBUSVALID_SEL_W { w : self } } # [ doc = "Bits 9:10 - Selects the source of the VBUS_VALID signal reported to the USB controller" ] # [ inline ( always ) ] pub fn vbus_source_sel ( & mut self ) -> VBUS_SOURCE_SEL_W { VBUS_SOURCE_SEL_W { w : self } } # [ doc = "Bit 18 - Selects the comparator used for VBUS_VALID" ] # [ inline ( always ) ] pub fn vbusvalid_to_sessvalid ( & mut self ) -> VBUSVALID_TO_SESSVALID_W { VBUSVALID_TO_SESSVALID_W { w : self } } # [ doc = "Bit 20 - Enables the VBUS_VALID comparator" ] # [ inline ( always ) ] pub fn pwrup_cmps ( & mut self ) -> PWRUP_CMPS_W { PWRUP_CMPS_W { w : self } } # [ doc = "Bit 26 - Controls VBUS discharge resistor" ] # [ inline ( always ) ] pub fn discharge_vbus ( & mut self ) -> DISCHARGE_VBUS_W { DISCHARGE_VBUS_W { w : self } } # [ doc = "Bit 31 - Enables resistors used for an older method of resistive battery charger detection" ] # [ inline ( always ) ] pub fn en_charger_resistor ( & mut self ) -> EN_CHARGER_RESISTOR_W { EN_CHARGER_RESISTOR_W { w : self } } } } # [ doc = "USB PHY VBUS Detector Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_vbus_det_stat](usb1_vbus_det_stat) module" ] pub type USB1_VBUS_DET_STAT = crate :: Reg < u32 , _USB1_VBUS_DET_STAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_VBUS_DET_STAT ; # [ doc = "`read()` method returns [usb1_vbus_det_stat::R](usb1_vbus_det_stat::R) reader structure" ] impl crate :: Readable for USB1_VBUS_DET_STAT { } # [ doc = "USB PHY VBUS Detector Status Register" ] pub mod usb1_vbus_det_stat { # [ doc = "Reader of register USB1_VBUS_DET_STAT" ] pub type R = crate :: R < u32 , super :: USB1_VBUS_DET_STAT > ; # [ doc = "Session End indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SESSEND_A { # [ doc = "0: The VBUS voltage is above the Session Valid threshold" ] _0 , # [ doc = "1: The VBUS voltage is below the Session Valid threshold" ] _1 } impl From < SESSEND_A > for bool { # [ inline ( always ) ] fn from ( variant : SESSEND_A ) -> Self { match variant { SESSEND_A :: _0 => false , SESSEND_A :: _1 => true } } } # [ doc = "Reader of field `SESSEND`" ] pub type SESSEND_R = crate :: R < bool , SESSEND_A > ; impl SESSEND_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SESSEND_A { match self . bits { false => SESSEND_A :: _0 , true => SESSEND_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SESSEND_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SESSEND_A :: _1 } } # [ doc = "B-Device Session Valid status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BVALID_A { # [ doc = "0: The VBUS voltage is below the Session Valid threshold" ] _0 , # [ doc = "1: The VBUS voltage is above the Session Valid threshold" ] _1 } impl From < BVALID_A > for bool { # [ inline ( always ) ] fn from ( variant : BVALID_A ) -> Self { match variant { BVALID_A :: _0 => false , BVALID_A :: _1 => true } } } # [ doc = "Reader of field `BVALID`" ] pub type BVALID_R = crate :: R < bool , BVALID_A > ; impl BVALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BVALID_A { match self . bits { false => BVALID_A :: _0 , true => BVALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BVALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BVALID_A :: _1 } } # [ doc = "A-Device Session Valid status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AVALID_A { # [ doc = "0: The VBUS voltage is below the Session Valid threshold" ] _0 , # [ doc = "1: The VBUS voltage is above the Session Valid threshold" ] _1 } impl From < AVALID_A > for bool { # [ inline ( always ) ] fn from ( variant : AVALID_A ) -> Self { match variant { AVALID_A :: _0 => false , AVALID_A :: _1 => true } } } # [ doc = "Reader of field `AVALID`" ] pub type AVALID_R = crate :: R < bool , AVALID_A > ; impl AVALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AVALID_A { match self . bits { false => AVALID_A :: _0 , true => AVALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AVALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AVALID_A :: _1 } } # [ doc = "VBUS voltage status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_VALID_A { # [ doc = "0: VBUS is below the comparator threshold" ] _0 , # [ doc = "1: VBUS is above the comparator threshold" ] _1 } impl From < VBUS_VALID_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUS_VALID_A ) -> Self { match variant { VBUS_VALID_A :: _0 => false , VBUS_VALID_A :: _1 => true } } } # [ doc = "Reader of field `VBUS_VALID`" ] pub type VBUS_VALID_R = crate :: R < bool , VBUS_VALID_A > ; impl VBUS_VALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_VALID_A { match self . bits { false => VBUS_VALID_A :: _0 , true => VBUS_VALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUS_VALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUS_VALID_A :: _1 } } # [ doc = "VBUS_VALID_3V detector status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VBUS_VALID_3V_A { # [ doc = "0: VBUS voltage is below VBUS_VALID_3V threshold" ] _0 , # [ doc = "1: VBUS voltage is above VBUS_VALID_3V threshold" ] _1 } impl From < VBUS_VALID_3V_A > for bool { # [ inline ( always ) ] fn from ( variant : VBUS_VALID_3V_A ) -> Self { match variant { VBUS_VALID_3V_A :: _0 => false , VBUS_VALID_3V_A :: _1 => true } } } # [ doc = "Reader of field `VBUS_VALID_3V`" ] pub type VBUS_VALID_3V_R = crate :: R < bool , VBUS_VALID_3V_A > ; impl VBUS_VALID_3V_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VBUS_VALID_3V_A { match self . bits { false => VBUS_VALID_3V_A :: _0 , true => VBUS_VALID_3V_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VBUS_VALID_3V_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VBUS_VALID_3V_A :: _1 } } impl R { # [ doc = "Bit 0 - Session End indicator" ] # [ inline ( always ) ] pub fn sessend ( & self ) -> SESSEND_R { SESSEND_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - B-Device Session Valid status" ] # [ inline ( always ) ] pub fn bvalid ( & self ) -> BVALID_R { BVALID_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - A-Device Session Valid status" ] # [ inline ( always ) ] pub fn avalid ( & self ) -> AVALID_R { AVALID_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - VBUS voltage status" ] # [ inline ( always ) ] pub fn vbus_valid ( & self ) -> VBUS_VALID_R { VBUS_VALID_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - VBUS_VALID_3V detector status" ] # [ inline ( always ) ] pub fn vbus_valid_3v ( & self ) -> VBUS_VALID_3V_R { VBUS_VALID_3V_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } } # [ doc = "USB PHY Charger Detect Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_chrg_det_stat](usb1_chrg_det_stat) module" ] pub type USB1_CHRG_DET_STAT = crate :: Reg < u32 , _USB1_CHRG_DET_STAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_CHRG_DET_STAT ; # [ doc = "`read()` method returns [usb1_chrg_det_stat::R](usb1_chrg_det_stat::R) reader structure" ] impl crate :: Readable for USB1_CHRG_DET_STAT { } # [ doc = "USB PHY Charger Detect Status Register" ] pub mod usb1_chrg_det_stat { # [ doc = "Reader of register USB1_CHRG_DET_STAT" ] pub type R = crate :: R < u32 , super :: USB1_CHRG_DET_STAT > ; # [ doc = "Battery Charging Data Contact Detection phase output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLUG_CONTACT_A { # [ doc = "0: No USB cable attachment has been detected" ] _0 , # [ doc = "1: A USB cable attachment between the device and host has been detected" ] _1 } impl From < PLUG_CONTACT_A > for bool { # [ inline ( always ) ] fn from ( variant : PLUG_CONTACT_A ) -> Self { match variant { PLUG_CONTACT_A :: _0 => false , PLUG_CONTACT_A :: _1 => true } } } # [ doc = "Reader of field `PLUG_CONTACT`" ] pub type PLUG_CONTACT_R = crate :: R < bool , PLUG_CONTACT_A > ; impl PLUG_CONTACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PLUG_CONTACT_A { match self . bits { false => PLUG_CONTACT_A :: _0 , true => PLUG_CONTACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PLUG_CONTACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PLUG_CONTACT_A :: _1 } } # [ doc = "Battery Charging Primary Detection phase output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHRG_DETECTED_A { # [ doc = "0: Standard Downstream Port (SDP) has been detected" ] _0 , # [ doc = "1: Charging Port has been detected" ] _1 } impl From < CHRG_DETECTED_A > for bool { # [ inline ( always ) ] fn from ( variant : CHRG_DETECTED_A ) -> Self { match variant { CHRG_DETECTED_A :: _0 => false , CHRG_DETECTED_A :: _1 => true } } } # [ doc = "Reader of field `CHRG_DETECTED`" ] pub type CHRG_DETECTED_R = crate :: R < bool , CHRG_DETECTED_A > ; impl CHRG_DETECTED_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHRG_DETECTED_A { match self . bits { false => CHRG_DETECTED_A :: _0 , true => CHRG_DETECTED_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHRG_DETECTED_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHRG_DETECTED_A :: _1 } } # [ doc = "Single ended receiver output for the USB_DM pin, from charger detection circuits.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DM_STATE_A { # [ doc = "0: USB_DM pin voltage is < 0.8V" ] _0 , # [ doc = "1: USB_DM pin voltage is > 2.0V" ] _1 } impl From < DM_STATE_A > for bool { # [ inline ( always ) ] fn from ( variant : DM_STATE_A ) -> Self { match variant { DM_STATE_A :: _0 => false , DM_STATE_A :: _1 => true } } } # [ doc = "Reader of field `DM_STATE`" ] pub type DM_STATE_R = crate :: R < bool , DM_STATE_A > ; impl DM_STATE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DM_STATE_A { match self . bits { false => DM_STATE_A :: _0 , true => DM_STATE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DM_STATE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DM_STATE_A :: _1 } } # [ doc = "Single ended receiver output for the USB_DP pin, from charger detection circuits.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DP_STATE_A { # [ doc = "0: USB_DP pin voltage is < 0.8V" ] _0 , # [ doc = "1: USB_DP pin voltage is > 2.0V" ] _1 } impl From < DP_STATE_A > for bool { # [ inline ( always ) ] fn from ( variant : DP_STATE_A ) -> Self { match variant { DP_STATE_A :: _0 => false , DP_STATE_A :: _1 => true } } } # [ doc = "Reader of field `DP_STATE`" ] pub type DP_STATE_R = crate :: R < bool , DP_STATE_A > ; impl DP_STATE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DP_STATE_A { match self . bits { false => DP_STATE_A :: _0 , true => DP_STATE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DP_STATE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DP_STATE_A :: _1 } } # [ doc = "Battery Charging Secondary Detection phase output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SECDET_DCP_A { # [ doc = "0: Charging Downstream Port (CDP) has been detected" ] _0 , # [ doc = "1: Downstream Charging Port (DCP) has been detected" ] _1 } impl From < SECDET_DCP_A > for bool { # [ inline ( always ) ] fn from ( variant : SECDET_DCP_A ) -> Self { match variant { SECDET_DCP_A :: _0 => false , SECDET_DCP_A :: _1 => true } } } # [ doc = "Reader of field `SECDET_DCP`" ] pub type SECDET_DCP_R = crate :: R < bool , SECDET_DCP_A > ; impl SECDET_DCP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SECDET_DCP_A { match self . bits { false => SECDET_DCP_A :: _0 , true => SECDET_DCP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SECDET_DCP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SECDET_DCP_A :: _1 } } impl R { # [ doc = "Bit 0 - Battery Charging Data Contact Detection phase output" ] # [ inline ( always ) ] pub fn plug_contact ( & self ) -> PLUG_CONTACT_R { PLUG_CONTACT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Battery Charging Primary Detection phase output" ] # [ inline ( always ) ] pub fn chrg_detected ( & self ) -> CHRG_DETECTED_R { CHRG_DETECTED_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Single ended receiver output for the USB_DM pin, from charger detection circuits." ] # [ inline ( always ) ] pub fn dm_state ( & self ) -> DM_STATE_R { DM_STATE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Single ended receiver output for the USB_DP pin, from charger detection circuits." ] # [ inline ( always ) ] pub fn dp_state ( & self ) -> DP_STATE_R { DP_STATE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Battery Charging Secondary Detection phase output" ] # [ inline ( always ) ] pub fn secdet_dcp ( & self ) -> SECDET_DCP_R { SECDET_DCP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } } # [ doc = "USB PHY Analog Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [anactrl](anactrl) module" ] pub type ANACTRL = crate :: Reg < u32 , _ANACTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ANACTRL ; # [ doc = "`read()` method returns [anactrl::R](anactrl::R) reader structure" ] impl crate :: Readable for ANACTRL { } # [ doc = "`write(|w| ..)` method takes [anactrl::W](anactrl::W) writer structure" ] impl crate :: Writable for ANACTRL { } # [ doc = "USB PHY Analog Control Register" ] pub mod anactrl { # [ doc = "Reader of register ANACTRL" ] pub type R = crate :: R < u32 , super :: ANACTRL > ; # [ doc = "Writer for register ANACTRL" ] pub type W = crate :: W < u32 , super :: ANACTRL > ; # [ doc = "Register ANACTRL `reset()`'s with value 0x0402" ] impl crate :: ResetValue for super :: ANACTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0402 } } # [ doc = "Reader of field `TESTCLK_SEL`" ] pub type TESTCLK_SEL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TESTCLK_SEL`" ] pub struct TESTCLK_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > TESTCLK_SEL_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFD_CLKGATE_A { # [ doc = "0: PFD clock output is enabled" ] _0 , # [ doc = "1: PFD clock output is gated (Default)" ] _1 } impl From < PFD_CLKGATE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFD_CLKGATE_A ) -> Self { match variant { PFD_CLKGATE_A :: _0 => false , PFD_CLKGATE_A :: _1 => true } } } # [ doc = "Reader of field `PFD_CLKGATE`" ] pub type PFD_CLKGATE_R = crate :: R < bool , PFD_CLKGATE_A > ; impl PFD_CLKGATE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFD_CLKGATE_A { match self . bits { false => PFD_CLKGATE_A :: _0 , true => PFD_CLKGATE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFD_CLKGATE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFD_CLKGATE_A :: _1 } } # [ doc = "Write proxy for field `PFD_CLKGATE`" ] pub struct PFD_CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_CLKGATE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFD_CLKGATE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PFD clock output is enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PFD_CLKGATE_A :: _0 ) } # [ doc = "PFD clock output is gated (Default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PFD_CLKGATE_A :: _1 ) } # [ 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 } } # [ doc = "This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFD_CLK_SEL_A { # [ doc = "0: USB1PFDCLK is the same frequency as the xtal clock (Default)" ] _00 , # [ doc = "1: USB1PFDCLK frequency is pfd_clk divided by 4" ] _01 , # [ doc = "2: USB1PFDCLK frequency is pfd_clk divided by 2" ] _10 , # [ doc = "3: USB1PFDCLK frequency is the same as pfd_clk frequency" ] _11 } impl From < PFD_CLK_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PFD_CLK_SEL_A ) -> Self { match variant { PFD_CLK_SEL_A :: _00 => 0 , PFD_CLK_SEL_A :: _01 => 1 , PFD_CLK_SEL_A :: _10 => 2 , PFD_CLK_SEL_A :: _11 => 3 } } } # [ doc = "Reader of field `PFD_CLK_SEL`" ] pub type PFD_CLK_SEL_R = crate :: R < u8 , PFD_CLK_SEL_A > ; impl PFD_CLK_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFD_CLK_SEL_A { match self . bits { 0 => PFD_CLK_SEL_A :: _00 , 1 => PFD_CLK_SEL_A :: _01 , 2 => PFD_CLK_SEL_A :: _10 , 3 => PFD_CLK_SEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _11 } } # [ doc = "Write proxy for field `PFD_CLK_SEL`" ] pub struct PFD_CLK_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_CLK_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFD_CLK_SEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "USB1PFDCLK is the same frequency as the xtal clock (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _00 ) } # [ doc = "USB1PFDCLK frequency is pfd_clk divided by 4" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _01 ) } # [ doc = "USB1PFDCLK frequency is pfd_clk divided by 2" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _10 ) } # [ doc = "USB1PFDCLK frequency is the same as pfd_clk frequency" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Reader of field `PFD_FRAC`" ] pub type PFD_FRAC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PFD_FRAC`" ] pub struct PFD_FRAC_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_FRAC_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 & ! ( 0x3f << 4 ) ) | ( ( ( value as u32 ) & 0x3f ) << 4 ) ; self . w } } # [ doc = "Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEV_PULLDOWN_A { # [ doc = "0: The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode." ] _0 , # [ doc = "1: The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode." ] _1 } impl From < DEV_PULLDOWN_A > for bool { # [ inline ( always ) ] fn from ( variant : DEV_PULLDOWN_A ) -> Self { match variant { DEV_PULLDOWN_A :: _0 => false , DEV_PULLDOWN_A :: _1 => true } } } # [ doc = "Reader of field `DEV_PULLDOWN`" ] pub type DEV_PULLDOWN_R = crate :: R < bool , DEV_PULLDOWN_A > ; impl DEV_PULLDOWN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DEV_PULLDOWN_A { match self . bits { false => DEV_PULLDOWN_A :: _0 , true => DEV_PULLDOWN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DEV_PULLDOWN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DEV_PULLDOWN_A :: _1 } } # [ doc = "Write proxy for field `DEV_PULLDOWN`" ] pub struct DEV_PULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > DEV_PULLDOWN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DEV_PULLDOWN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DEV_PULLDOWN_A :: _0 ) } # [ doc = "The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DEV_PULLDOWN_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_PULSE_CTRL_A { # [ doc = "0: Minimum duration of pre-emphasis current after each data transition" ] _00 , # [ doc = "3: Maximum duration of pre-emphasis current after each data transition" ] _11 } impl From < EMPH_PULSE_CTRL_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMPH_PULSE_CTRL_A ) -> Self { match variant { EMPH_PULSE_CTRL_A :: _00 => 0 , EMPH_PULSE_CTRL_A :: _11 => 3 } } } # [ doc = "Reader of field `EMPH_PULSE_CTRL`" ] pub type EMPH_PULSE_CTRL_R = crate :: R < u8 , EMPH_PULSE_CTRL_A > ; impl EMPH_PULSE_CTRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EMPH_PULSE_CTRL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EMPH_PULSE_CTRL_A :: _00 ) , 3 => Val ( EMPH_PULSE_CTRL_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMPH_PULSE_CTRL_A :: _00 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == EMPH_PULSE_CTRL_A :: _11 } } # [ doc = "Write proxy for field `EMPH_PULSE_CTRL`" ] pub struct EMPH_PULSE_CTRL_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_PULSE_CTRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_PULSE_CTRL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Minimum duration of pre-emphasis current after each data transition" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMPH_PULSE_CTRL_A :: _00 ) } # [ doc = "Maximum duration of pre-emphasis current after each data transition" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( EMPH_PULSE_CTRL_A :: _11 ) } # [ 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 = "Enables pre-emphasis for the High-Speed TX drivers\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_EN_A { # [ doc = "0: No pre-emphasis is used on HS TX output drivers" ] _0 , # [ doc = "1: Enables pre-emphasis for HS TX output drivers" ] _1 } impl From < EMPH_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EMPH_EN_A ) -> Self { match variant { EMPH_EN_A :: _0 => false , EMPH_EN_A :: _1 => true } } } # [ doc = "Reader of field `EMPH_EN`" ] pub type EMPH_EN_R = crate :: R < bool , EMPH_EN_A > ; impl EMPH_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMPH_EN_A { match self . bits { false => EMPH_EN_A :: _0 , true => EMPH_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EMPH_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EMPH_EN_A :: _1 } } # [ doc = "Write proxy for field `EMPH_EN`" ] pub struct EMPH_EN_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No pre-emphasis is used on HS TX output drivers" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EMPH_EN_A :: _0 ) } # [ doc = "Enables pre-emphasis for HS TX output drivers" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EMPH_EN_A :: _1 ) } # [ 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 = "Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_CUR_CTRL_A { # [ doc = "0: No pre-emphasis current is enabled for the HS TX drivers" ] _00 , # [ doc = "1: One unit of pre-emphasis current is enabled for the HS TX drivers" ] _01 , # [ doc = "2: Two units of pre-emphasis current are enabled for the HS TX drivers" ] _10 , # [ doc = "3: Three units of pre-emphasis current are enabled for the HS TX drivers" ] _11 } impl From < EMPH_CUR_CTRL_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMPH_CUR_CTRL_A ) -> Self { match variant { EMPH_CUR_CTRL_A :: _00 => 0 , EMPH_CUR_CTRL_A :: _01 => 1 , EMPH_CUR_CTRL_A :: _10 => 2 , EMPH_CUR_CTRL_A :: _11 => 3 } } } # [ doc = "Reader of field `EMPH_CUR_CTRL`" ] pub type EMPH_CUR_CTRL_R = crate :: R < u8 , EMPH_CUR_CTRL_A > ; impl EMPH_CUR_CTRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMPH_CUR_CTRL_A { match self . bits { 0 => EMPH_CUR_CTRL_A :: _00 , 1 => EMPH_CUR_CTRL_A :: _01 , 2 => EMPH_CUR_CTRL_A :: _10 , 3 => EMPH_CUR_CTRL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _11 } } # [ doc = "Write proxy for field `EMPH_CUR_CTRL`" ] pub struct EMPH_CUR_CTRL_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_CUR_CTRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_CUR_CTRL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No pre-emphasis current is enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _00 ) } # [ doc = "One unit of pre-emphasis current is enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _01 ) } # [ doc = "Two units of pre-emphasis current are enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _10 ) } # [ doc = "Three units of pre-emphasis current are enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 14 ) ) | ( ( ( value as u32 ) & 0x03 ) << 14 ) ; self . w } } # [ doc = "Reader of field `PFD_STABLE`" ] pub type PFD_STABLE_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Test clock selection to analog test" ] # [ inline ( always ) ] pub fn testclk_sel ( & self ) -> TESTCLK_SEL_R { TESTCLK_SEL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used" ] # [ inline ( always ) ] pub fn pfd_clkgate ( & self ) -> PFD_CLKGATE_R { PFD_CLKGATE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK" ] # [ inline ( always ) ] pub fn pfd_clk_sel ( & self ) -> PFD_CLK_SEL_R { PFD_CLK_SEL_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:9 - PFD fractional divider setting used to select the pfd_clk output frequency" ] # [ inline ( always ) ] pub fn pfd_frac ( & self ) -> PFD_FRAC_R { PFD_FRAC_R :: new ( ( ( self . bits >> 4 ) & 0x3f ) as u8 ) } # [ doc = "Bit 10 - Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn dev_pulldown ( & self ) -> DEV_PULLDOWN_R { DEV_PULLDOWN_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bits 11:12 - Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_pulse_ctrl ( & self ) -> EMPH_PULSE_CTRL_R { EMPH_PULSE_CTRL_R :: new ( ( ( self . bits >> 11 ) & 0x03 ) as u8 ) } # [ doc = "Bit 13 - Enables pre-emphasis for the High-Speed TX drivers" ] # [ inline ( always ) ] pub fn emph_en ( & self ) -> EMPH_EN_R { EMPH_EN_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bits 14:15 - Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_cur_ctrl ( & self ) -> EMPH_CUR_CTRL_R { EMPH_CUR_CTRL_R :: new ( ( ( self . bits >> 14 ) & 0x03 ) as u8 ) } # [ doc = "Bit 31 - PFD stable signal from the Phase Fractional Divider." ] # [ inline ( always ) ] pub fn pfd_stable ( & self ) -> PFD_STABLE_R { PFD_STABLE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Test clock selection to analog test" ] # [ inline ( always ) ] pub fn testclk_sel ( & mut self ) -> TESTCLK_SEL_W { TESTCLK_SEL_W { w : self } } # [ doc = "Bit 1 - This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used" ] # [ inline ( always ) ] pub fn pfd_clkgate ( & mut self ) -> PFD_CLKGATE_W { PFD_CLKGATE_W { w : self } } # [ doc = "Bits 2:3 - This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK" ] # [ inline ( always ) ] pub fn pfd_clk_sel ( & mut self ) -> PFD_CLK_SEL_W { PFD_CLK_SEL_W { w : self } } # [ doc = "Bits 4:9 - PFD fractional divider setting used to select the pfd_clk output frequency" ] # [ inline ( always ) ] pub fn pfd_frac ( & mut self ) -> PFD_FRAC_W { PFD_FRAC_W { w : self } } # [ doc = "Bit 10 - Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn dev_pulldown ( & mut self ) -> DEV_PULLDOWN_W { DEV_PULLDOWN_W { w : self } } # [ doc = "Bits 11:12 - Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_pulse_ctrl ( & mut self ) -> EMPH_PULSE_CTRL_W { EMPH_PULSE_CTRL_W { w : self } } # [ doc = "Bit 13 - Enables pre-emphasis for the High-Speed TX drivers" ] # [ inline ( always ) ] pub fn emph_en ( & mut self ) -> EMPH_EN_W { EMPH_EN_W { w : self } } # [ doc = "Bits 14:15 - Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_cur_ctrl ( & mut self ) -> EMPH_CUR_CTRL_W { EMPH_CUR_CTRL_W { w : self } } } } # [ doc = "USB PHY Analog Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [anactrl_set](anactrl_set) module" ] pub type ANACTRL_SET = crate :: Reg < u32 , _ANACTRL_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ANACTRL_SET ; # [ doc = "`read()` method returns [anactrl_set::R](anactrl_set::R) reader structure" ] impl crate :: Readable for ANACTRL_SET { } # [ doc = "`write(|w| ..)` method takes [anactrl_set::W](anactrl_set::W) writer structure" ] impl crate :: Writable for ANACTRL_SET { } # [ doc = "USB PHY Analog Control Register" ] pub mod anactrl_set { # [ doc = "Reader of register ANACTRL_SET" ] pub type R = crate :: R < u32 , super :: ANACTRL_SET > ; # [ doc = "Writer for register ANACTRL_SET" ] pub type W = crate :: W < u32 , super :: ANACTRL_SET > ; # [ doc = "Register ANACTRL_SET `reset()`'s with value 0x0402" ] impl crate :: ResetValue for super :: ANACTRL_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0402 } } # [ doc = "Reader of field `TESTCLK_SEL`" ] pub type TESTCLK_SEL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TESTCLK_SEL`" ] pub struct TESTCLK_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > TESTCLK_SEL_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFD_CLKGATE_A { # [ doc = "0: PFD clock output is enabled" ] _0 , # [ doc = "1: PFD clock output is gated (Default)" ] _1 } impl From < PFD_CLKGATE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFD_CLKGATE_A ) -> Self { match variant { PFD_CLKGATE_A :: _0 => false , PFD_CLKGATE_A :: _1 => true } } } # [ doc = "Reader of field `PFD_CLKGATE`" ] pub type PFD_CLKGATE_R = crate :: R < bool , PFD_CLKGATE_A > ; impl PFD_CLKGATE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFD_CLKGATE_A { match self . bits { false => PFD_CLKGATE_A :: _0 , true => PFD_CLKGATE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFD_CLKGATE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFD_CLKGATE_A :: _1 } } # [ doc = "Write proxy for field `PFD_CLKGATE`" ] pub struct PFD_CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_CLKGATE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFD_CLKGATE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PFD clock output is enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PFD_CLKGATE_A :: _0 ) } # [ doc = "PFD clock output is gated (Default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PFD_CLKGATE_A :: _1 ) } # [ 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 } } # [ doc = "This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFD_CLK_SEL_A { # [ doc = "0: USB1PFDCLK is the same frequency as the xtal clock (Default)" ] _00 , # [ doc = "1: USB1PFDCLK frequency is pfd_clk divided by 4" ] _01 , # [ doc = "2: USB1PFDCLK frequency is pfd_clk divided by 2" ] _10 , # [ doc = "3: USB1PFDCLK frequency is the same as pfd_clk frequency" ] _11 } impl From < PFD_CLK_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PFD_CLK_SEL_A ) -> Self { match variant { PFD_CLK_SEL_A :: _00 => 0 , PFD_CLK_SEL_A :: _01 => 1 , PFD_CLK_SEL_A :: _10 => 2 , PFD_CLK_SEL_A :: _11 => 3 } } } # [ doc = "Reader of field `PFD_CLK_SEL`" ] pub type PFD_CLK_SEL_R = crate :: R < u8 , PFD_CLK_SEL_A > ; impl PFD_CLK_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFD_CLK_SEL_A { match self . bits { 0 => PFD_CLK_SEL_A :: _00 , 1 => PFD_CLK_SEL_A :: _01 , 2 => PFD_CLK_SEL_A :: _10 , 3 => PFD_CLK_SEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _11 } } # [ doc = "Write proxy for field `PFD_CLK_SEL`" ] pub struct PFD_CLK_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_CLK_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFD_CLK_SEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "USB1PFDCLK is the same frequency as the xtal clock (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _00 ) } # [ doc = "USB1PFDCLK frequency is pfd_clk divided by 4" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _01 ) } # [ doc = "USB1PFDCLK frequency is pfd_clk divided by 2" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _10 ) } # [ doc = "USB1PFDCLK frequency is the same as pfd_clk frequency" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Reader of field `PFD_FRAC`" ] pub type PFD_FRAC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PFD_FRAC`" ] pub struct PFD_FRAC_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_FRAC_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 & ! ( 0x3f << 4 ) ) | ( ( ( value as u32 ) & 0x3f ) << 4 ) ; self . w } } # [ doc = "Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEV_PULLDOWN_A { # [ doc = "0: The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode." ] _0 , # [ doc = "1: The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode." ] _1 } impl From < DEV_PULLDOWN_A > for bool { # [ inline ( always ) ] fn from ( variant : DEV_PULLDOWN_A ) -> Self { match variant { DEV_PULLDOWN_A :: _0 => false , DEV_PULLDOWN_A :: _1 => true } } } # [ doc = "Reader of field `DEV_PULLDOWN`" ] pub type DEV_PULLDOWN_R = crate :: R < bool , DEV_PULLDOWN_A > ; impl DEV_PULLDOWN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DEV_PULLDOWN_A { match self . bits { false => DEV_PULLDOWN_A :: _0 , true => DEV_PULLDOWN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DEV_PULLDOWN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DEV_PULLDOWN_A :: _1 } } # [ doc = "Write proxy for field `DEV_PULLDOWN`" ] pub struct DEV_PULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > DEV_PULLDOWN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DEV_PULLDOWN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DEV_PULLDOWN_A :: _0 ) } # [ doc = "The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DEV_PULLDOWN_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_PULSE_CTRL_A { # [ doc = "0: Minimum duration of pre-emphasis current after each data transition" ] _00 , # [ doc = "3: Maximum duration of pre-emphasis current after each data transition" ] _11 } impl From < EMPH_PULSE_CTRL_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMPH_PULSE_CTRL_A ) -> Self { match variant { EMPH_PULSE_CTRL_A :: _00 => 0 , EMPH_PULSE_CTRL_A :: _11 => 3 } } } # [ doc = "Reader of field `EMPH_PULSE_CTRL`" ] pub type EMPH_PULSE_CTRL_R = crate :: R < u8 , EMPH_PULSE_CTRL_A > ; impl EMPH_PULSE_CTRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EMPH_PULSE_CTRL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EMPH_PULSE_CTRL_A :: _00 ) , 3 => Val ( EMPH_PULSE_CTRL_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMPH_PULSE_CTRL_A :: _00 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == EMPH_PULSE_CTRL_A :: _11 } } # [ doc = "Write proxy for field `EMPH_PULSE_CTRL`" ] pub struct EMPH_PULSE_CTRL_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_PULSE_CTRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_PULSE_CTRL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Minimum duration of pre-emphasis current after each data transition" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMPH_PULSE_CTRL_A :: _00 ) } # [ doc = "Maximum duration of pre-emphasis current after each data transition" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( EMPH_PULSE_CTRL_A :: _11 ) } # [ 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 = "Enables pre-emphasis for the High-Speed TX drivers\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_EN_A { # [ doc = "0: No pre-emphasis is used on HS TX output drivers" ] _0 , # [ doc = "1: Enables pre-emphasis for HS TX output drivers" ] _1 } impl From < EMPH_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EMPH_EN_A ) -> Self { match variant { EMPH_EN_A :: _0 => false , EMPH_EN_A :: _1 => true } } } # [ doc = "Reader of field `EMPH_EN`" ] pub type EMPH_EN_R = crate :: R < bool , EMPH_EN_A > ; impl EMPH_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMPH_EN_A { match self . bits { false => EMPH_EN_A :: _0 , true => EMPH_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EMPH_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EMPH_EN_A :: _1 } } # [ doc = "Write proxy for field `EMPH_EN`" ] pub struct EMPH_EN_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No pre-emphasis is used on HS TX output drivers" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EMPH_EN_A :: _0 ) } # [ doc = "Enables pre-emphasis for HS TX output drivers" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EMPH_EN_A :: _1 ) } # [ 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 = "Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_CUR_CTRL_A { # [ doc = "0: No pre-emphasis current is enabled for the HS TX drivers" ] _00 , # [ doc = "1: One unit of pre-emphasis current is enabled for the HS TX drivers" ] _01 , # [ doc = "2: Two units of pre-emphasis current are enabled for the HS TX drivers" ] _10 , # [ doc = "3: Three units of pre-emphasis current are enabled for the HS TX drivers" ] _11 } impl From < EMPH_CUR_CTRL_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMPH_CUR_CTRL_A ) -> Self { match variant { EMPH_CUR_CTRL_A :: _00 => 0 , EMPH_CUR_CTRL_A :: _01 => 1 , EMPH_CUR_CTRL_A :: _10 => 2 , EMPH_CUR_CTRL_A :: _11 => 3 } } } # [ doc = "Reader of field `EMPH_CUR_CTRL`" ] pub type EMPH_CUR_CTRL_R = crate :: R < u8 , EMPH_CUR_CTRL_A > ; impl EMPH_CUR_CTRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMPH_CUR_CTRL_A { match self . bits { 0 => EMPH_CUR_CTRL_A :: _00 , 1 => EMPH_CUR_CTRL_A :: _01 , 2 => EMPH_CUR_CTRL_A :: _10 , 3 => EMPH_CUR_CTRL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _11 } } # [ doc = "Write proxy for field `EMPH_CUR_CTRL`" ] pub struct EMPH_CUR_CTRL_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_CUR_CTRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_CUR_CTRL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No pre-emphasis current is enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _00 ) } # [ doc = "One unit of pre-emphasis current is enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _01 ) } # [ doc = "Two units of pre-emphasis current are enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _10 ) } # [ doc = "Three units of pre-emphasis current are enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 14 ) ) | ( ( ( value as u32 ) & 0x03 ) << 14 ) ; self . w } } # [ doc = "Reader of field `PFD_STABLE`" ] pub type PFD_STABLE_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Test clock selection to analog test" ] # [ inline ( always ) ] pub fn testclk_sel ( & self ) -> TESTCLK_SEL_R { TESTCLK_SEL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used" ] # [ inline ( always ) ] pub fn pfd_clkgate ( & self ) -> PFD_CLKGATE_R { PFD_CLKGATE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK" ] # [ inline ( always ) ] pub fn pfd_clk_sel ( & self ) -> PFD_CLK_SEL_R { PFD_CLK_SEL_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:9 - PFD fractional divider setting used to select the pfd_clk output frequency" ] # [ inline ( always ) ] pub fn pfd_frac ( & self ) -> PFD_FRAC_R { PFD_FRAC_R :: new ( ( ( self . bits >> 4 ) & 0x3f ) as u8 ) } # [ doc = "Bit 10 - Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn dev_pulldown ( & self ) -> DEV_PULLDOWN_R { DEV_PULLDOWN_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bits 11:12 - Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_pulse_ctrl ( & self ) -> EMPH_PULSE_CTRL_R { EMPH_PULSE_CTRL_R :: new ( ( ( self . bits >> 11 ) & 0x03 ) as u8 ) } # [ doc = "Bit 13 - Enables pre-emphasis for the High-Speed TX drivers" ] # [ inline ( always ) ] pub fn emph_en ( & self ) -> EMPH_EN_R { EMPH_EN_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bits 14:15 - Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_cur_ctrl ( & self ) -> EMPH_CUR_CTRL_R { EMPH_CUR_CTRL_R :: new ( ( ( self . bits >> 14 ) & 0x03 ) as u8 ) } # [ doc = "Bit 31 - PFD stable signal from the Phase Fractional Divider." ] # [ inline ( always ) ] pub fn pfd_stable ( & self ) -> PFD_STABLE_R { PFD_STABLE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Test clock selection to analog test" ] # [ inline ( always ) ] pub fn testclk_sel ( & mut self ) -> TESTCLK_SEL_W { TESTCLK_SEL_W { w : self } } # [ doc = "Bit 1 - This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used" ] # [ inline ( always ) ] pub fn pfd_clkgate ( & mut self ) -> PFD_CLKGATE_W { PFD_CLKGATE_W { w : self } } # [ doc = "Bits 2:3 - This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK" ] # [ inline ( always ) ] pub fn pfd_clk_sel ( & mut self ) -> PFD_CLK_SEL_W { PFD_CLK_SEL_W { w : self } } # [ doc = "Bits 4:9 - PFD fractional divider setting used to select the pfd_clk output frequency" ] # [ inline ( always ) ] pub fn pfd_frac ( & mut self ) -> PFD_FRAC_W { PFD_FRAC_W { w : self } } # [ doc = "Bit 10 - Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn dev_pulldown ( & mut self ) -> DEV_PULLDOWN_W { DEV_PULLDOWN_W { w : self } } # [ doc = "Bits 11:12 - Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_pulse_ctrl ( & mut self ) -> EMPH_PULSE_CTRL_W { EMPH_PULSE_CTRL_W { w : self } } # [ doc = "Bit 13 - Enables pre-emphasis for the High-Speed TX drivers" ] # [ inline ( always ) ] pub fn emph_en ( & mut self ) -> EMPH_EN_W { EMPH_EN_W { w : self } } # [ doc = "Bits 14:15 - Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_cur_ctrl ( & mut self ) -> EMPH_CUR_CTRL_W { EMPH_CUR_CTRL_W { w : self } } } } # [ doc = "USB PHY Analog Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [anactrl_clr](anactrl_clr) module" ] pub type ANACTRL_CLR = crate :: Reg < u32 , _ANACTRL_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ANACTRL_CLR ; # [ doc = "`read()` method returns [anactrl_clr::R](anactrl_clr::R) reader structure" ] impl crate :: Readable for ANACTRL_CLR { } # [ doc = "`write(|w| ..)` method takes [anactrl_clr::W](anactrl_clr::W) writer structure" ] impl crate :: Writable for ANACTRL_CLR { } # [ doc = "USB PHY Analog Control Register" ] pub mod anactrl_clr { # [ doc = "Reader of register ANACTRL_CLR" ] pub type R = crate :: R < u32 , super :: ANACTRL_CLR > ; # [ doc = "Writer for register ANACTRL_CLR" ] pub type W = crate :: W < u32 , super :: ANACTRL_CLR > ; # [ doc = "Register ANACTRL_CLR `reset()`'s with value 0x0402" ] impl crate :: ResetValue for super :: ANACTRL_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0402 } } # [ doc = "Reader of field `TESTCLK_SEL`" ] pub type TESTCLK_SEL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TESTCLK_SEL`" ] pub struct TESTCLK_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > TESTCLK_SEL_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFD_CLKGATE_A { # [ doc = "0: PFD clock output is enabled" ] _0 , # [ doc = "1: PFD clock output is gated (Default)" ] _1 } impl From < PFD_CLKGATE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFD_CLKGATE_A ) -> Self { match variant { PFD_CLKGATE_A :: _0 => false , PFD_CLKGATE_A :: _1 => true } } } # [ doc = "Reader of field `PFD_CLKGATE`" ] pub type PFD_CLKGATE_R = crate :: R < bool , PFD_CLKGATE_A > ; impl PFD_CLKGATE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFD_CLKGATE_A { match self . bits { false => PFD_CLKGATE_A :: _0 , true => PFD_CLKGATE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFD_CLKGATE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFD_CLKGATE_A :: _1 } } # [ doc = "Write proxy for field `PFD_CLKGATE`" ] pub struct PFD_CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_CLKGATE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFD_CLKGATE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PFD clock output is enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PFD_CLKGATE_A :: _0 ) } # [ doc = "PFD clock output is gated (Default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PFD_CLKGATE_A :: _1 ) } # [ 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 } } # [ doc = "This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFD_CLK_SEL_A { # [ doc = "0: USB1PFDCLK is the same frequency as the xtal clock (Default)" ] _00 , # [ doc = "1: USB1PFDCLK frequency is pfd_clk divided by 4" ] _01 , # [ doc = "2: USB1PFDCLK frequency is pfd_clk divided by 2" ] _10 , # [ doc = "3: USB1PFDCLK frequency is the same as pfd_clk frequency" ] _11 } impl From < PFD_CLK_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PFD_CLK_SEL_A ) -> Self { match variant { PFD_CLK_SEL_A :: _00 => 0 , PFD_CLK_SEL_A :: _01 => 1 , PFD_CLK_SEL_A :: _10 => 2 , PFD_CLK_SEL_A :: _11 => 3 } } } # [ doc = "Reader of field `PFD_CLK_SEL`" ] pub type PFD_CLK_SEL_R = crate :: R < u8 , PFD_CLK_SEL_A > ; impl PFD_CLK_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFD_CLK_SEL_A { match self . bits { 0 => PFD_CLK_SEL_A :: _00 , 1 => PFD_CLK_SEL_A :: _01 , 2 => PFD_CLK_SEL_A :: _10 , 3 => PFD_CLK_SEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _11 } } # [ doc = "Write proxy for field `PFD_CLK_SEL`" ] pub struct PFD_CLK_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_CLK_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFD_CLK_SEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "USB1PFDCLK is the same frequency as the xtal clock (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _00 ) } # [ doc = "USB1PFDCLK frequency is pfd_clk divided by 4" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _01 ) } # [ doc = "USB1PFDCLK frequency is pfd_clk divided by 2" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _10 ) } # [ doc = "USB1PFDCLK frequency is the same as pfd_clk frequency" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Reader of field `PFD_FRAC`" ] pub type PFD_FRAC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PFD_FRAC`" ] pub struct PFD_FRAC_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_FRAC_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 & ! ( 0x3f << 4 ) ) | ( ( ( value as u32 ) & 0x3f ) << 4 ) ; self . w } } # [ doc = "Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEV_PULLDOWN_A { # [ doc = "0: The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode." ] _0 , # [ doc = "1: The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode." ] _1 } impl From < DEV_PULLDOWN_A > for bool { # [ inline ( always ) ] fn from ( variant : DEV_PULLDOWN_A ) -> Self { match variant { DEV_PULLDOWN_A :: _0 => false , DEV_PULLDOWN_A :: _1 => true } } } # [ doc = "Reader of field `DEV_PULLDOWN`" ] pub type DEV_PULLDOWN_R = crate :: R < bool , DEV_PULLDOWN_A > ; impl DEV_PULLDOWN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DEV_PULLDOWN_A { match self . bits { false => DEV_PULLDOWN_A :: _0 , true => DEV_PULLDOWN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DEV_PULLDOWN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DEV_PULLDOWN_A :: _1 } } # [ doc = "Write proxy for field `DEV_PULLDOWN`" ] pub struct DEV_PULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > DEV_PULLDOWN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DEV_PULLDOWN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DEV_PULLDOWN_A :: _0 ) } # [ doc = "The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DEV_PULLDOWN_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_PULSE_CTRL_A { # [ doc = "0: Minimum duration of pre-emphasis current after each data transition" ] _00 , # [ doc = "3: Maximum duration of pre-emphasis current after each data transition" ] _11 } impl From < EMPH_PULSE_CTRL_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMPH_PULSE_CTRL_A ) -> Self { match variant { EMPH_PULSE_CTRL_A :: _00 => 0 , EMPH_PULSE_CTRL_A :: _11 => 3 } } } # [ doc = "Reader of field `EMPH_PULSE_CTRL`" ] pub type EMPH_PULSE_CTRL_R = crate :: R < u8 , EMPH_PULSE_CTRL_A > ; impl EMPH_PULSE_CTRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EMPH_PULSE_CTRL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EMPH_PULSE_CTRL_A :: _00 ) , 3 => Val ( EMPH_PULSE_CTRL_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMPH_PULSE_CTRL_A :: _00 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == EMPH_PULSE_CTRL_A :: _11 } } # [ doc = "Write proxy for field `EMPH_PULSE_CTRL`" ] pub struct EMPH_PULSE_CTRL_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_PULSE_CTRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_PULSE_CTRL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Minimum duration of pre-emphasis current after each data transition" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMPH_PULSE_CTRL_A :: _00 ) } # [ doc = "Maximum duration of pre-emphasis current after each data transition" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( EMPH_PULSE_CTRL_A :: _11 ) } # [ 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 = "Enables pre-emphasis for the High-Speed TX drivers\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_EN_A { # [ doc = "0: No pre-emphasis is used on HS TX output drivers" ] _0 , # [ doc = "1: Enables pre-emphasis for HS TX output drivers" ] _1 } impl From < EMPH_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EMPH_EN_A ) -> Self { match variant { EMPH_EN_A :: _0 => false , EMPH_EN_A :: _1 => true } } } # [ doc = "Reader of field `EMPH_EN`" ] pub type EMPH_EN_R = crate :: R < bool , EMPH_EN_A > ; impl EMPH_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMPH_EN_A { match self . bits { false => EMPH_EN_A :: _0 , true => EMPH_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EMPH_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EMPH_EN_A :: _1 } } # [ doc = "Write proxy for field `EMPH_EN`" ] pub struct EMPH_EN_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No pre-emphasis is used on HS TX output drivers" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EMPH_EN_A :: _0 ) } # [ doc = "Enables pre-emphasis for HS TX output drivers" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EMPH_EN_A :: _1 ) } # [ 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 = "Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_CUR_CTRL_A { # [ doc = "0: No pre-emphasis current is enabled for the HS TX drivers" ] _00 , # [ doc = "1: One unit of pre-emphasis current is enabled for the HS TX drivers" ] _01 , # [ doc = "2: Two units of pre-emphasis current are enabled for the HS TX drivers" ] _10 , # [ doc = "3: Three units of pre-emphasis current are enabled for the HS TX drivers" ] _11 } impl From < EMPH_CUR_CTRL_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMPH_CUR_CTRL_A ) -> Self { match variant { EMPH_CUR_CTRL_A :: _00 => 0 , EMPH_CUR_CTRL_A :: _01 => 1 , EMPH_CUR_CTRL_A :: _10 => 2 , EMPH_CUR_CTRL_A :: _11 => 3 } } } # [ doc = "Reader of field `EMPH_CUR_CTRL`" ] pub type EMPH_CUR_CTRL_R = crate :: R < u8 , EMPH_CUR_CTRL_A > ; impl EMPH_CUR_CTRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMPH_CUR_CTRL_A { match self . bits { 0 => EMPH_CUR_CTRL_A :: _00 , 1 => EMPH_CUR_CTRL_A :: _01 , 2 => EMPH_CUR_CTRL_A :: _10 , 3 => EMPH_CUR_CTRL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _11 } } # [ doc = "Write proxy for field `EMPH_CUR_CTRL`" ] pub struct EMPH_CUR_CTRL_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_CUR_CTRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_CUR_CTRL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No pre-emphasis current is enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _00 ) } # [ doc = "One unit of pre-emphasis current is enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _01 ) } # [ doc = "Two units of pre-emphasis current are enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _10 ) } # [ doc = "Three units of pre-emphasis current are enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 14 ) ) | ( ( ( value as u32 ) & 0x03 ) << 14 ) ; self . w } } # [ doc = "Reader of field `PFD_STABLE`" ] pub type PFD_STABLE_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Test clock selection to analog test" ] # [ inline ( always ) ] pub fn testclk_sel ( & self ) -> TESTCLK_SEL_R { TESTCLK_SEL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used" ] # [ inline ( always ) ] pub fn pfd_clkgate ( & self ) -> PFD_CLKGATE_R { PFD_CLKGATE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK" ] # [ inline ( always ) ] pub fn pfd_clk_sel ( & self ) -> PFD_CLK_SEL_R { PFD_CLK_SEL_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:9 - PFD fractional divider setting used to select the pfd_clk output frequency" ] # [ inline ( always ) ] pub fn pfd_frac ( & self ) -> PFD_FRAC_R { PFD_FRAC_R :: new ( ( ( self . bits >> 4 ) & 0x3f ) as u8 ) } # [ doc = "Bit 10 - Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn dev_pulldown ( & self ) -> DEV_PULLDOWN_R { DEV_PULLDOWN_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bits 11:12 - Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_pulse_ctrl ( & self ) -> EMPH_PULSE_CTRL_R { EMPH_PULSE_CTRL_R :: new ( ( ( self . bits >> 11 ) & 0x03 ) as u8 ) } # [ doc = "Bit 13 - Enables pre-emphasis for the High-Speed TX drivers" ] # [ inline ( always ) ] pub fn emph_en ( & self ) -> EMPH_EN_R { EMPH_EN_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bits 14:15 - Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_cur_ctrl ( & self ) -> EMPH_CUR_CTRL_R { EMPH_CUR_CTRL_R :: new ( ( ( self . bits >> 14 ) & 0x03 ) as u8 ) } # [ doc = "Bit 31 - PFD stable signal from the Phase Fractional Divider." ] # [ inline ( always ) ] pub fn pfd_stable ( & self ) -> PFD_STABLE_R { PFD_STABLE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Test clock selection to analog test" ] # [ inline ( always ) ] pub fn testclk_sel ( & mut self ) -> TESTCLK_SEL_W { TESTCLK_SEL_W { w : self } } # [ doc = "Bit 1 - This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used" ] # [ inline ( always ) ] pub fn pfd_clkgate ( & mut self ) -> PFD_CLKGATE_W { PFD_CLKGATE_W { w : self } } # [ doc = "Bits 2:3 - This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK" ] # [ inline ( always ) ] pub fn pfd_clk_sel ( & mut self ) -> PFD_CLK_SEL_W { PFD_CLK_SEL_W { w : self } } # [ doc = "Bits 4:9 - PFD fractional divider setting used to select the pfd_clk output frequency" ] # [ inline ( always ) ] pub fn pfd_frac ( & mut self ) -> PFD_FRAC_W { PFD_FRAC_W { w : self } } # [ doc = "Bit 10 - Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn dev_pulldown ( & mut self ) -> DEV_PULLDOWN_W { DEV_PULLDOWN_W { w : self } } # [ doc = "Bits 11:12 - Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_pulse_ctrl ( & mut self ) -> EMPH_PULSE_CTRL_W { EMPH_PULSE_CTRL_W { w : self } } # [ doc = "Bit 13 - Enables pre-emphasis for the High-Speed TX drivers" ] # [ inline ( always ) ] pub fn emph_en ( & mut self ) -> EMPH_EN_W { EMPH_EN_W { w : self } } # [ doc = "Bits 14:15 - Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_cur_ctrl ( & mut self ) -> EMPH_CUR_CTRL_W { EMPH_CUR_CTRL_W { w : self } } } } # [ doc = "USB PHY Analog Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [anactrl_tog](anactrl_tog) module" ] pub type ANACTRL_TOG = crate :: Reg < u32 , _ANACTRL_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ANACTRL_TOG ; # [ doc = "`read()` method returns [anactrl_tog::R](anactrl_tog::R) reader structure" ] impl crate :: Readable for ANACTRL_TOG { } # [ doc = "`write(|w| ..)` method takes [anactrl_tog::W](anactrl_tog::W) writer structure" ] impl crate :: Writable for ANACTRL_TOG { } # [ doc = "USB PHY Analog Control Register" ] pub mod anactrl_tog { # [ doc = "Reader of register ANACTRL_TOG" ] pub type R = crate :: R < u32 , super :: ANACTRL_TOG > ; # [ doc = "Writer for register ANACTRL_TOG" ] pub type W = crate :: W < u32 , super :: ANACTRL_TOG > ; # [ doc = "Register ANACTRL_TOG `reset()`'s with value 0x0402" ] impl crate :: ResetValue for super :: ANACTRL_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0402 } } # [ doc = "Reader of field `TESTCLK_SEL`" ] pub type TESTCLK_SEL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TESTCLK_SEL`" ] pub struct TESTCLK_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > TESTCLK_SEL_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFD_CLKGATE_A { # [ doc = "0: PFD clock output is enabled" ] _0 , # [ doc = "1: PFD clock output is gated (Default)" ] _1 } impl From < PFD_CLKGATE_A > for bool { # [ inline ( always ) ] fn from ( variant : PFD_CLKGATE_A ) -> Self { match variant { PFD_CLKGATE_A :: _0 => false , PFD_CLKGATE_A :: _1 => true } } } # [ doc = "Reader of field `PFD_CLKGATE`" ] pub type PFD_CLKGATE_R = crate :: R < bool , PFD_CLKGATE_A > ; impl PFD_CLKGATE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFD_CLKGATE_A { match self . bits { false => PFD_CLKGATE_A :: _0 , true => PFD_CLKGATE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PFD_CLKGATE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PFD_CLKGATE_A :: _1 } } # [ doc = "Write proxy for field `PFD_CLKGATE`" ] pub struct PFD_CLKGATE_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_CLKGATE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFD_CLKGATE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PFD clock output is enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PFD_CLKGATE_A :: _0 ) } # [ doc = "PFD clock output is gated (Default)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PFD_CLKGATE_A :: _1 ) } # [ 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 } } # [ doc = "This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PFD_CLK_SEL_A { # [ doc = "0: USB1PFDCLK is the same frequency as the xtal clock (Default)" ] _00 , # [ doc = "1: USB1PFDCLK frequency is pfd_clk divided by 4" ] _01 , # [ doc = "2: USB1PFDCLK frequency is pfd_clk divided by 2" ] _10 , # [ doc = "3: USB1PFDCLK frequency is the same as pfd_clk frequency" ] _11 } impl From < PFD_CLK_SEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : PFD_CLK_SEL_A ) -> Self { match variant { PFD_CLK_SEL_A :: _00 => 0 , PFD_CLK_SEL_A :: _01 => 1 , PFD_CLK_SEL_A :: _10 => 2 , PFD_CLK_SEL_A :: _11 => 3 } } } # [ doc = "Reader of field `PFD_CLK_SEL`" ] pub type PFD_CLK_SEL_R = crate :: R < u8 , PFD_CLK_SEL_A > ; impl PFD_CLK_SEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PFD_CLK_SEL_A { match self . bits { 0 => PFD_CLK_SEL_A :: _00 , 1 => PFD_CLK_SEL_A :: _01 , 2 => PFD_CLK_SEL_A :: _10 , 3 => PFD_CLK_SEL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PFD_CLK_SEL_A :: _11 } } # [ doc = "Write proxy for field `PFD_CLK_SEL`" ] pub struct PFD_CLK_SEL_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_CLK_SEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PFD_CLK_SEL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "USB1PFDCLK is the same frequency as the xtal clock (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _00 ) } # [ doc = "USB1PFDCLK frequency is pfd_clk divided by 4" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _01 ) } # [ doc = "USB1PFDCLK frequency is pfd_clk divided by 2" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _10 ) } # [ doc = "USB1PFDCLK frequency is the same as pfd_clk frequency" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PFD_CLK_SEL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Reader of field `PFD_FRAC`" ] pub type PFD_FRAC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PFD_FRAC`" ] pub struct PFD_FRAC_W < 'a > { w : & 'a mut W , } impl < 'a > PFD_FRAC_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 & ! ( 0x3f << 4 ) ) | ( ( ( value as u32 ) & 0x3f ) << 4 ) ; self . w } } # [ doc = "Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEV_PULLDOWN_A { # [ doc = "0: The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode." ] _0 , # [ doc = "1: The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode." ] _1 } impl From < DEV_PULLDOWN_A > for bool { # [ inline ( always ) ] fn from ( variant : DEV_PULLDOWN_A ) -> Self { match variant { DEV_PULLDOWN_A :: _0 => false , DEV_PULLDOWN_A :: _1 => true } } } # [ doc = "Reader of field `DEV_PULLDOWN`" ] pub type DEV_PULLDOWN_R = crate :: R < bool , DEV_PULLDOWN_A > ; impl DEV_PULLDOWN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DEV_PULLDOWN_A { match self . bits { false => DEV_PULLDOWN_A :: _0 , true => DEV_PULLDOWN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DEV_PULLDOWN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DEV_PULLDOWN_A :: _1 } } # [ doc = "Write proxy for field `DEV_PULLDOWN`" ] pub struct DEV_PULLDOWN_W < 'a > { w : & 'a mut W , } impl < 'a > DEV_PULLDOWN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DEV_PULLDOWN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DEV_PULLDOWN_A :: _0 ) } # [ doc = "The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DEV_PULLDOWN_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_PULSE_CTRL_A { # [ doc = "0: Minimum duration of pre-emphasis current after each data transition" ] _00 , # [ doc = "3: Maximum duration of pre-emphasis current after each data transition" ] _11 } impl From < EMPH_PULSE_CTRL_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMPH_PULSE_CTRL_A ) -> Self { match variant { EMPH_PULSE_CTRL_A :: _00 => 0 , EMPH_PULSE_CTRL_A :: _11 => 3 } } } # [ doc = "Reader of field `EMPH_PULSE_CTRL`" ] pub type EMPH_PULSE_CTRL_R = crate :: R < u8 , EMPH_PULSE_CTRL_A > ; impl EMPH_PULSE_CTRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EMPH_PULSE_CTRL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EMPH_PULSE_CTRL_A :: _00 ) , 3 => Val ( EMPH_PULSE_CTRL_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMPH_PULSE_CTRL_A :: _00 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == EMPH_PULSE_CTRL_A :: _11 } } # [ doc = "Write proxy for field `EMPH_PULSE_CTRL`" ] pub struct EMPH_PULSE_CTRL_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_PULSE_CTRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_PULSE_CTRL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Minimum duration of pre-emphasis current after each data transition" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMPH_PULSE_CTRL_A :: _00 ) } # [ doc = "Maximum duration of pre-emphasis current after each data transition" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( EMPH_PULSE_CTRL_A :: _11 ) } # [ 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 = "Enables pre-emphasis for the High-Speed TX drivers\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_EN_A { # [ doc = "0: No pre-emphasis is used on HS TX output drivers" ] _0 , # [ doc = "1: Enables pre-emphasis for HS TX output drivers" ] _1 } impl From < EMPH_EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EMPH_EN_A ) -> Self { match variant { EMPH_EN_A :: _0 => false , EMPH_EN_A :: _1 => true } } } # [ doc = "Reader of field `EMPH_EN`" ] pub type EMPH_EN_R = crate :: R < bool , EMPH_EN_A > ; impl EMPH_EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMPH_EN_A { match self . bits { false => EMPH_EN_A :: _0 , true => EMPH_EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EMPH_EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EMPH_EN_A :: _1 } } # [ doc = "Write proxy for field `EMPH_EN`" ] pub struct EMPH_EN_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No pre-emphasis is used on HS TX output drivers" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EMPH_EN_A :: _0 ) } # [ doc = "Enables pre-emphasis for HS TX output drivers" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EMPH_EN_A :: _1 ) } # [ 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 = "Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMPH_CUR_CTRL_A { # [ doc = "0: No pre-emphasis current is enabled for the HS TX drivers" ] _00 , # [ doc = "1: One unit of pre-emphasis current is enabled for the HS TX drivers" ] _01 , # [ doc = "2: Two units of pre-emphasis current are enabled for the HS TX drivers" ] _10 , # [ doc = "3: Three units of pre-emphasis current are enabled for the HS TX drivers" ] _11 } impl From < EMPH_CUR_CTRL_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMPH_CUR_CTRL_A ) -> Self { match variant { EMPH_CUR_CTRL_A :: _00 => 0 , EMPH_CUR_CTRL_A :: _01 => 1 , EMPH_CUR_CTRL_A :: _10 => 2 , EMPH_CUR_CTRL_A :: _11 => 3 } } } # [ doc = "Reader of field `EMPH_CUR_CTRL`" ] pub type EMPH_CUR_CTRL_R = crate :: R < u8 , EMPH_CUR_CTRL_A > ; impl EMPH_CUR_CTRL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EMPH_CUR_CTRL_A { match self . bits { 0 => EMPH_CUR_CTRL_A :: _00 , 1 => EMPH_CUR_CTRL_A :: _01 , 2 => EMPH_CUR_CTRL_A :: _10 , 3 => EMPH_CUR_CTRL_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == EMPH_CUR_CTRL_A :: _11 } } # [ doc = "Write proxy for field `EMPH_CUR_CTRL`" ] pub struct EMPH_CUR_CTRL_W < 'a > { w : & 'a mut W , } impl < 'a > EMPH_CUR_CTRL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMPH_CUR_CTRL_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No pre-emphasis current is enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _00 ) } # [ doc = "One unit of pre-emphasis current is enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _01 ) } # [ doc = "Two units of pre-emphasis current are enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _10 ) } # [ doc = "Three units of pre-emphasis current are enabled for the HS TX drivers" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( EMPH_CUR_CTRL_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 14 ) ) | ( ( ( value as u32 ) & 0x03 ) << 14 ) ; self . w } } # [ doc = "Reader of field `PFD_STABLE`" ] pub type PFD_STABLE_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Test clock selection to analog test" ] # [ inline ( always ) ] pub fn testclk_sel ( & self ) -> TESTCLK_SEL_R { TESTCLK_SEL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used" ] # [ inline ( always ) ] pub fn pfd_clkgate ( & self ) -> PFD_CLKGATE_R { PFD_CLKGATE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 2:3 - This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK" ] # [ inline ( always ) ] pub fn pfd_clk_sel ( & self ) -> PFD_CLK_SEL_R { PFD_CLK_SEL_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:9 - PFD fractional divider setting used to select the pfd_clk output frequency" ] # [ inline ( always ) ] pub fn pfd_frac ( & self ) -> PFD_FRAC_R { PFD_FRAC_R :: new ( ( ( self . bits >> 4 ) & 0x3f ) as u8 ) } # [ doc = "Bit 10 - Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn dev_pulldown ( & self ) -> DEV_PULLDOWN_R { DEV_PULLDOWN_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bits 11:12 - Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_pulse_ctrl ( & self ) -> EMPH_PULSE_CTRL_R { EMPH_PULSE_CTRL_R :: new ( ( ( self . bits >> 11 ) & 0x03 ) as u8 ) } # [ doc = "Bit 13 - Enables pre-emphasis for the High-Speed TX drivers" ] # [ inline ( always ) ] pub fn emph_en ( & self ) -> EMPH_EN_R { EMPH_EN_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bits 14:15 - Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_cur_ctrl ( & self ) -> EMPH_CUR_CTRL_R { EMPH_CUR_CTRL_R :: new ( ( ( self . bits >> 14 ) & 0x03 ) as u8 ) } # [ doc = "Bit 31 - PFD stable signal from the Phase Fractional Divider." ] # [ inline ( always ) ] pub fn pfd_stable ( & self ) -> PFD_STABLE_R { PFD_STABLE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Test clock selection to analog test" ] # [ inline ( always ) ] pub fn testclk_sel ( & mut self ) -> TESTCLK_SEL_W { TESTCLK_SEL_W { w : self } } # [ doc = "Bit 1 - This bit field controls clock gating (disabling) for the PFD pfd_clk output for power savings when the PFD is not used" ] # [ inline ( always ) ] pub fn pfd_clkgate ( & mut self ) -> PFD_CLKGATE_W { PFD_CLKGATE_W { w : self } } # [ doc = "Bits 2:3 - This bit field for the PFD selects the frequency relationship between the local pfd_clk output and the exported USB1PFDCLK" ] # [ inline ( always ) ] pub fn pfd_clk_sel ( & mut self ) -> PFD_CLK_SEL_W { PFD_CLK_SEL_W { w : self } } # [ doc = "Bits 4:9 - PFD fractional divider setting used to select the pfd_clk output frequency" ] # [ inline ( always ) ] pub fn pfd_frac ( & mut self ) -> PFD_FRAC_W { PFD_FRAC_W { w : self } } # [ doc = "Bit 10 - Setting this field to 1'b1 will enable the 15kohm pulldown resistors on both USB_DP and USB_DM pins" ] # [ inline ( always ) ] pub fn dev_pulldown ( & mut self ) -> DEV_PULLDOWN_W { DEV_PULLDOWN_W { w : self } } # [ doc = "Bits 11:12 - Controls pre-emphasis time duration for the High Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_pulse_ctrl ( & mut self ) -> EMPH_PULSE_CTRL_W { EMPH_PULSE_CTRL_W { w : self } } # [ doc = "Bit 13 - Enables pre-emphasis for the High-Speed TX drivers" ] # [ inline ( always ) ] pub fn emph_en ( & mut self ) -> EMPH_EN_W { EMPH_EN_W { w : self } } # [ doc = "Bits 14:15 - Controls the amount of pre-emphasis current added for the High-Speed TX drivers after each data transition when the USBPHY_ANACTRL\\[EMPH_EN\\] bit is set high to 1'b1" ] # [ inline ( always ) ] pub fn emph_cur_ctrl ( & mut self ) -> EMPH_CUR_CTRL_W { EMPH_CUR_CTRL_W { w : self } } } } # [ doc = "USB PHY Loopback Control/Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_loopback](usb1_loopback) module" ] pub type USB1_LOOPBACK = crate :: Reg < u32 , _USB1_LOOPBACK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_LOOPBACK ; # [ doc = "`read()` method returns [usb1_loopback::R](usb1_loopback::R) reader structure" ] impl crate :: Readable for USB1_LOOPBACK { } # [ doc = "`write(|w| ..)` method takes [usb1_loopback::W](usb1_loopback::W) writer structure" ] impl crate :: Writable for USB1_LOOPBACK { } # [ doc = "USB PHY Loopback Control/Status Register" ] pub mod usb1_loopback { # [ doc = "Reader of register USB1_LOOPBACK" ] pub type R = crate :: R < u32 , super :: USB1_LOOPBACK > ; # [ doc = "Writer for register USB1_LOOPBACK" ] pub type W = crate :: W < u32 , super :: USB1_LOOPBACK > ; # [ doc = "Register USB1_LOOPBACK `reset()`'s with value 0x0055_0000" ] impl crate :: ResetValue for super :: USB1_LOOPBACK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0055_0000 } } # [ doc = "Reader of field `UTMI_TESTSTART`" ] pub type UTMI_TESTSTART_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_TESTSTART`" ] pub struct UTMI_TESTSTART_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_TESTSTART_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `UTMI_DIG_TST0`" ] pub type UTMI_DIG_TST0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_DIG_TST0`" ] pub struct UTMI_DIG_TST0_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_DIG_TST0_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 } } # [ doc = "Reader of field `UTMI_DIG_TST1`" ] pub type UTMI_DIG_TST1_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_DIG_TST1`" ] pub struct UTMI_DIG_TST1_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_DIG_TST1_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 = "Reader of field `TSTI_TX_HS_MODE`" ] pub type TSTI_TX_HS_MODE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_HS_MODE`" ] pub struct TSTI_TX_HS_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_HS_MODE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `TSTI_TX_LS_MODE`" ] pub type TSTI_TX_LS_MODE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_LS_MODE`" ] pub struct TSTI_TX_LS_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_LS_MODE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TSTI_TX_EN`" ] pub type TSTI_TX_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_EN`" ] pub struct TSTI_TX_EN_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_EN_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 = "Reader of field `TSTI_TX_HIZ`" ] pub type TSTI_TX_HIZ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_HIZ`" ] pub struct TSTI_TX_HIZ_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_HIZ_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 = "Reader of field `UTMO_DIG_TST0`" ] pub type UTMO_DIG_TST0_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `UTMO_DIG_TST1`" ] pub type UTMO_DIG_TST1_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `TSTI_HSFS_MODE_EN`" ] pub type TSTI_HSFS_MODE_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_HSFS_MODE_EN`" ] pub struct TSTI_HSFS_MODE_EN_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_HSFS_MODE_EN_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `TSTPKT`" ] pub type TSTPKT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TSTPKT`" ] pub struct TSTPKT_W < 'a > { w : & 'a mut W , } impl < 'a > TSTPKT_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } impl R { # [ doc = "Bit 0 - This bit enables the USB loopback test." ] # [ inline ( always ) ] pub fn utmi_teststart ( & self ) -> UTMI_TESTSTART_R { UTMI_TESTSTART_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst0 ( & self ) -> UTMI_DIG_TST0_R { UTMI_DIG_TST0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst1 ( & self ) -> UTMI_DIG_TST1_R { UTMI_DIG_TST1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Select HS or FS mode for USB loopback testing" ] # [ inline ( always ) ] pub fn tsti_tx_hs_mode ( & self ) -> TSTI_TX_HS_MODE_R { TSTI_TX_HS_MODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Set to value 1'b1 to choose LS for USB loopback testing, set to value 1'b0 to choose HS or FS mode which is defined by TSTI1_TX_HS" ] # [ inline ( always ) ] pub fn tsti_tx_ls_mode ( & self ) -> TSTI_TX_LS_MODE_R { TSTI_TX_LS_MODE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enable TX for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_en ( & self ) -> TSTI_TX_EN_R { TSTI_TX_EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Sets TX Hi-Z for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_hiz ( & self ) -> TSTI_TX_HIZ_R { TSTI_TX_HIZ_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - This read-only bit is a status bit for USB loopback test results" ] # [ inline ( always ) ] pub fn utmo_dig_tst0 ( & self ) -> UTMO_DIG_TST0_R { UTMO_DIG_TST0_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - This read-only bit is a status bit for USB loopback test" ] # [ inline ( always ) ] pub fn utmo_dig_tst1 ( & self ) -> UTMO_DIG_TST1_R { UTMO_DIG_TST1_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Setting this bit field to value 1'b1 will enable the loopback test to dynamically change the packet speed" ] # [ inline ( always ) ] pub fn tsti_hsfs_mode_en ( & self ) -> TSTI_HSFS_MODE_EN_R { TSTI_HSFS_MODE_EN_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:23 - Selects the packet data byte used for USB loopback testing in Pulse mode" ] # [ inline ( always ) ] pub fn tstpkt ( & self ) -> TSTPKT_R { TSTPKT_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bit 0 - This bit enables the USB loopback test." ] # [ inline ( always ) ] pub fn utmi_teststart ( & mut self ) -> UTMI_TESTSTART_W { UTMI_TESTSTART_W { w : self } } # [ doc = "Bit 1 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst0 ( & mut self ) -> UTMI_DIG_TST0_W { UTMI_DIG_TST0_W { w : self } } # [ doc = "Bit 2 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst1 ( & mut self ) -> UTMI_DIG_TST1_W { UTMI_DIG_TST1_W { w : self } } # [ doc = "Bit 3 - Select HS or FS mode for USB loopback testing" ] # [ inline ( always ) ] pub fn tsti_tx_hs_mode ( & mut self ) -> TSTI_TX_HS_MODE_W { TSTI_TX_HS_MODE_W { w : self } } # [ doc = "Bit 4 - Set to value 1'b1 to choose LS for USB loopback testing, set to value 1'b0 to choose HS or FS mode which is defined by TSTI1_TX_HS" ] # [ inline ( always ) ] pub fn tsti_tx_ls_mode ( & mut self ) -> TSTI_TX_LS_MODE_W { TSTI_TX_LS_MODE_W { w : self } } # [ doc = "Bit 5 - Enable TX for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_en ( & mut self ) -> TSTI_TX_EN_W { TSTI_TX_EN_W { w : self } } # [ doc = "Bit 6 - Sets TX Hi-Z for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_hiz ( & mut self ) -> TSTI_TX_HIZ_W { TSTI_TX_HIZ_W { w : self } } # [ doc = "Bit 15 - Setting this bit field to value 1'b1 will enable the loopback test to dynamically change the packet speed" ] # [ inline ( always ) ] pub fn tsti_hsfs_mode_en ( & mut self ) -> TSTI_HSFS_MODE_EN_W { TSTI_HSFS_MODE_EN_W { w : self } } # [ doc = "Bits 16:23 - Selects the packet data byte used for USB loopback testing in Pulse mode" ] # [ inline ( always ) ] pub fn tstpkt ( & mut self ) -> TSTPKT_W { TSTPKT_W { w : self } } } } # [ doc = "USB PHY Loopback Control/Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_loopback_set](usb1_loopback_set) module" ] pub type USB1_LOOPBACK_SET = crate :: Reg < u32 , _USB1_LOOPBACK_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_LOOPBACK_SET ; # [ doc = "`read()` method returns [usb1_loopback_set::R](usb1_loopback_set::R) reader structure" ] impl crate :: Readable for USB1_LOOPBACK_SET { } # [ doc = "`write(|w| ..)` method takes [usb1_loopback_set::W](usb1_loopback_set::W) writer structure" ] impl crate :: Writable for USB1_LOOPBACK_SET { } # [ doc = "USB PHY Loopback Control/Status Register" ] pub mod usb1_loopback_set { # [ doc = "Reader of register USB1_LOOPBACK_SET" ] pub type R = crate :: R < u32 , super :: USB1_LOOPBACK_SET > ; # [ doc = "Writer for register USB1_LOOPBACK_SET" ] pub type W = crate :: W < u32 , super :: USB1_LOOPBACK_SET > ; # [ doc = "Register USB1_LOOPBACK_SET `reset()`'s with value 0x0055_0000" ] impl crate :: ResetValue for super :: USB1_LOOPBACK_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0055_0000 } } # [ doc = "Reader of field `UTMI_TESTSTART`" ] pub type UTMI_TESTSTART_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_TESTSTART`" ] pub struct UTMI_TESTSTART_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_TESTSTART_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `UTMI_DIG_TST0`" ] pub type UTMI_DIG_TST0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_DIG_TST0`" ] pub struct UTMI_DIG_TST0_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_DIG_TST0_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 } } # [ doc = "Reader of field `UTMI_DIG_TST1`" ] pub type UTMI_DIG_TST1_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_DIG_TST1`" ] pub struct UTMI_DIG_TST1_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_DIG_TST1_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 = "Reader of field `TSTI_TX_HS_MODE`" ] pub type TSTI_TX_HS_MODE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_HS_MODE`" ] pub struct TSTI_TX_HS_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_HS_MODE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `TSTI_TX_LS_MODE`" ] pub type TSTI_TX_LS_MODE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_LS_MODE`" ] pub struct TSTI_TX_LS_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_LS_MODE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TSTI_TX_EN`" ] pub type TSTI_TX_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_EN`" ] pub struct TSTI_TX_EN_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_EN_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 = "Reader of field `TSTI_TX_HIZ`" ] pub type TSTI_TX_HIZ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_HIZ`" ] pub struct TSTI_TX_HIZ_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_HIZ_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 = "Reader of field `UTMO_DIG_TST0`" ] pub type UTMO_DIG_TST0_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `UTMO_DIG_TST1`" ] pub type UTMO_DIG_TST1_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `TSTI_HSFS_MODE_EN`" ] pub type TSTI_HSFS_MODE_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_HSFS_MODE_EN`" ] pub struct TSTI_HSFS_MODE_EN_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_HSFS_MODE_EN_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `TSTPKT`" ] pub type TSTPKT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TSTPKT`" ] pub struct TSTPKT_W < 'a > { w : & 'a mut W , } impl < 'a > TSTPKT_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } impl R { # [ doc = "Bit 0 - This bit enables the USB loopback test." ] # [ inline ( always ) ] pub fn utmi_teststart ( & self ) -> UTMI_TESTSTART_R { UTMI_TESTSTART_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst0 ( & self ) -> UTMI_DIG_TST0_R { UTMI_DIG_TST0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst1 ( & self ) -> UTMI_DIG_TST1_R { UTMI_DIG_TST1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Select HS or FS mode for USB loopback testing" ] # [ inline ( always ) ] pub fn tsti_tx_hs_mode ( & self ) -> TSTI_TX_HS_MODE_R { TSTI_TX_HS_MODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Set to value 1'b1 to choose LS for USB loopback testing, set to value 1'b0 to choose HS or FS mode which is defined by TSTI1_TX_HS" ] # [ inline ( always ) ] pub fn tsti_tx_ls_mode ( & self ) -> TSTI_TX_LS_MODE_R { TSTI_TX_LS_MODE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enable TX for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_en ( & self ) -> TSTI_TX_EN_R { TSTI_TX_EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Sets TX Hi-Z for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_hiz ( & self ) -> TSTI_TX_HIZ_R { TSTI_TX_HIZ_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - This read-only bit is a status bit for USB loopback test results" ] # [ inline ( always ) ] pub fn utmo_dig_tst0 ( & self ) -> UTMO_DIG_TST0_R { UTMO_DIG_TST0_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - This read-only bit is a status bit for USB loopback test" ] # [ inline ( always ) ] pub fn utmo_dig_tst1 ( & self ) -> UTMO_DIG_TST1_R { UTMO_DIG_TST1_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Setting this bit field to value 1'b1 will enable the loopback test to dynamically change the packet speed" ] # [ inline ( always ) ] pub fn tsti_hsfs_mode_en ( & self ) -> TSTI_HSFS_MODE_EN_R { TSTI_HSFS_MODE_EN_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:23 - Selects the packet data byte used for USB loopback testing in Pulse mode" ] # [ inline ( always ) ] pub fn tstpkt ( & self ) -> TSTPKT_R { TSTPKT_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bit 0 - This bit enables the USB loopback test." ] # [ inline ( always ) ] pub fn utmi_teststart ( & mut self ) -> UTMI_TESTSTART_W { UTMI_TESTSTART_W { w : self } } # [ doc = "Bit 1 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst0 ( & mut self ) -> UTMI_DIG_TST0_W { UTMI_DIG_TST0_W { w : self } } # [ doc = "Bit 2 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst1 ( & mut self ) -> UTMI_DIG_TST1_W { UTMI_DIG_TST1_W { w : self } } # [ doc = "Bit 3 - Select HS or FS mode for USB loopback testing" ] # [ inline ( always ) ] pub fn tsti_tx_hs_mode ( & mut self ) -> TSTI_TX_HS_MODE_W { TSTI_TX_HS_MODE_W { w : self } } # [ doc = "Bit 4 - Set to value 1'b1 to choose LS for USB loopback testing, set to value 1'b0 to choose HS or FS mode which is defined by TSTI1_TX_HS" ] # [ inline ( always ) ] pub fn tsti_tx_ls_mode ( & mut self ) -> TSTI_TX_LS_MODE_W { TSTI_TX_LS_MODE_W { w : self } } # [ doc = "Bit 5 - Enable TX for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_en ( & mut self ) -> TSTI_TX_EN_W { TSTI_TX_EN_W { w : self } } # [ doc = "Bit 6 - Sets TX Hi-Z for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_hiz ( & mut self ) -> TSTI_TX_HIZ_W { TSTI_TX_HIZ_W { w : self } } # [ doc = "Bit 15 - Setting this bit field to value 1'b1 will enable the loopback test to dynamically change the packet speed" ] # [ inline ( always ) ] pub fn tsti_hsfs_mode_en ( & mut self ) -> TSTI_HSFS_MODE_EN_W { TSTI_HSFS_MODE_EN_W { w : self } } # [ doc = "Bits 16:23 - Selects the packet data byte used for USB loopback testing in Pulse mode" ] # [ inline ( always ) ] pub fn tstpkt ( & mut self ) -> TSTPKT_W { TSTPKT_W { w : self } } } } # [ doc = "USB PHY Loopback Control/Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_loopback_clr](usb1_loopback_clr) module" ] pub type USB1_LOOPBACK_CLR = crate :: Reg < u32 , _USB1_LOOPBACK_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_LOOPBACK_CLR ; # [ doc = "`read()` method returns [usb1_loopback_clr::R](usb1_loopback_clr::R) reader structure" ] impl crate :: Readable for USB1_LOOPBACK_CLR { } # [ doc = "`write(|w| ..)` method takes [usb1_loopback_clr::W](usb1_loopback_clr::W) writer structure" ] impl crate :: Writable for USB1_LOOPBACK_CLR { } # [ doc = "USB PHY Loopback Control/Status Register" ] pub mod usb1_loopback_clr { # [ doc = "Reader of register USB1_LOOPBACK_CLR" ] pub type R = crate :: R < u32 , super :: USB1_LOOPBACK_CLR > ; # [ doc = "Writer for register USB1_LOOPBACK_CLR" ] pub type W = crate :: W < u32 , super :: USB1_LOOPBACK_CLR > ; # [ doc = "Register USB1_LOOPBACK_CLR `reset()`'s with value 0x0055_0000" ] impl crate :: ResetValue for super :: USB1_LOOPBACK_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0055_0000 } } # [ doc = "Reader of field `UTMI_TESTSTART`" ] pub type UTMI_TESTSTART_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_TESTSTART`" ] pub struct UTMI_TESTSTART_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_TESTSTART_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `UTMI_DIG_TST0`" ] pub type UTMI_DIG_TST0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_DIG_TST0`" ] pub struct UTMI_DIG_TST0_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_DIG_TST0_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 } } # [ doc = "Reader of field `UTMI_DIG_TST1`" ] pub type UTMI_DIG_TST1_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_DIG_TST1`" ] pub struct UTMI_DIG_TST1_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_DIG_TST1_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 = "Reader of field `TSTI_TX_HS_MODE`" ] pub type TSTI_TX_HS_MODE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_HS_MODE`" ] pub struct TSTI_TX_HS_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_HS_MODE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `TSTI_TX_LS_MODE`" ] pub type TSTI_TX_LS_MODE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_LS_MODE`" ] pub struct TSTI_TX_LS_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_LS_MODE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TSTI_TX_EN`" ] pub type TSTI_TX_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_EN`" ] pub struct TSTI_TX_EN_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_EN_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 = "Reader of field `TSTI_TX_HIZ`" ] pub type TSTI_TX_HIZ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_HIZ`" ] pub struct TSTI_TX_HIZ_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_HIZ_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 = "Reader of field `UTMO_DIG_TST0`" ] pub type UTMO_DIG_TST0_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `UTMO_DIG_TST1`" ] pub type UTMO_DIG_TST1_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `TSTI_HSFS_MODE_EN`" ] pub type TSTI_HSFS_MODE_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_HSFS_MODE_EN`" ] pub struct TSTI_HSFS_MODE_EN_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_HSFS_MODE_EN_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `TSTPKT`" ] pub type TSTPKT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TSTPKT`" ] pub struct TSTPKT_W < 'a > { w : & 'a mut W , } impl < 'a > TSTPKT_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } impl R { # [ doc = "Bit 0 - This bit enables the USB loopback test." ] # [ inline ( always ) ] pub fn utmi_teststart ( & self ) -> UTMI_TESTSTART_R { UTMI_TESTSTART_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst0 ( & self ) -> UTMI_DIG_TST0_R { UTMI_DIG_TST0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst1 ( & self ) -> UTMI_DIG_TST1_R { UTMI_DIG_TST1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Select HS or FS mode for USB loopback testing" ] # [ inline ( always ) ] pub fn tsti_tx_hs_mode ( & self ) -> TSTI_TX_HS_MODE_R { TSTI_TX_HS_MODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Set to value 1'b1 to choose LS for USB loopback testing, set to value 1'b0 to choose HS or FS mode which is defined by TSTI1_TX_HS" ] # [ inline ( always ) ] pub fn tsti_tx_ls_mode ( & self ) -> TSTI_TX_LS_MODE_R { TSTI_TX_LS_MODE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enable TX for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_en ( & self ) -> TSTI_TX_EN_R { TSTI_TX_EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Sets TX Hi-Z for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_hiz ( & self ) -> TSTI_TX_HIZ_R { TSTI_TX_HIZ_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - This read-only bit is a status bit for USB loopback test results" ] # [ inline ( always ) ] pub fn utmo_dig_tst0 ( & self ) -> UTMO_DIG_TST0_R { UTMO_DIG_TST0_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - This read-only bit is a status bit for USB loopback test" ] # [ inline ( always ) ] pub fn utmo_dig_tst1 ( & self ) -> UTMO_DIG_TST1_R { UTMO_DIG_TST1_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Setting this bit field to value 1'b1 will enable the loopback test to dynamically change the packet speed" ] # [ inline ( always ) ] pub fn tsti_hsfs_mode_en ( & self ) -> TSTI_HSFS_MODE_EN_R { TSTI_HSFS_MODE_EN_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:23 - Selects the packet data byte used for USB loopback testing in Pulse mode" ] # [ inline ( always ) ] pub fn tstpkt ( & self ) -> TSTPKT_R { TSTPKT_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bit 0 - This bit enables the USB loopback test." ] # [ inline ( always ) ] pub fn utmi_teststart ( & mut self ) -> UTMI_TESTSTART_W { UTMI_TESTSTART_W { w : self } } # [ doc = "Bit 1 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst0 ( & mut self ) -> UTMI_DIG_TST0_W { UTMI_DIG_TST0_W { w : self } } # [ doc = "Bit 2 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst1 ( & mut self ) -> UTMI_DIG_TST1_W { UTMI_DIG_TST1_W { w : self } } # [ doc = "Bit 3 - Select HS or FS mode for USB loopback testing" ] # [ inline ( always ) ] pub fn tsti_tx_hs_mode ( & mut self ) -> TSTI_TX_HS_MODE_W { TSTI_TX_HS_MODE_W { w : self } } # [ doc = "Bit 4 - Set to value 1'b1 to choose LS for USB loopback testing, set to value 1'b0 to choose HS or FS mode which is defined by TSTI1_TX_HS" ] # [ inline ( always ) ] pub fn tsti_tx_ls_mode ( & mut self ) -> TSTI_TX_LS_MODE_W { TSTI_TX_LS_MODE_W { w : self } } # [ doc = "Bit 5 - Enable TX for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_en ( & mut self ) -> TSTI_TX_EN_W { TSTI_TX_EN_W { w : self } } # [ doc = "Bit 6 - Sets TX Hi-Z for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_hiz ( & mut self ) -> TSTI_TX_HIZ_W { TSTI_TX_HIZ_W { w : self } } # [ doc = "Bit 15 - Setting this bit field to value 1'b1 will enable the loopback test to dynamically change the packet speed" ] # [ inline ( always ) ] pub fn tsti_hsfs_mode_en ( & mut self ) -> TSTI_HSFS_MODE_EN_W { TSTI_HSFS_MODE_EN_W { w : self } } # [ doc = "Bits 16:23 - Selects the packet data byte used for USB loopback testing in Pulse mode" ] # [ inline ( always ) ] pub fn tstpkt ( & mut self ) -> TSTPKT_W { TSTPKT_W { w : self } } } } # [ doc = "USB PHY Loopback Control/Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_loopback_tog](usb1_loopback_tog) module" ] pub type USB1_LOOPBACK_TOG = crate :: Reg < u32 , _USB1_LOOPBACK_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_LOOPBACK_TOG ; # [ doc = "`read()` method returns [usb1_loopback_tog::R](usb1_loopback_tog::R) reader structure" ] impl crate :: Readable for USB1_LOOPBACK_TOG { } # [ doc = "`write(|w| ..)` method takes [usb1_loopback_tog::W](usb1_loopback_tog::W) writer structure" ] impl crate :: Writable for USB1_LOOPBACK_TOG { } # [ doc = "USB PHY Loopback Control/Status Register" ] pub mod usb1_loopback_tog { # [ doc = "Reader of register USB1_LOOPBACK_TOG" ] pub type R = crate :: R < u32 , super :: USB1_LOOPBACK_TOG > ; # [ doc = "Writer for register USB1_LOOPBACK_TOG" ] pub type W = crate :: W < u32 , super :: USB1_LOOPBACK_TOG > ; # [ doc = "Register USB1_LOOPBACK_TOG `reset()`'s with value 0x0055_0000" ] impl crate :: ResetValue for super :: USB1_LOOPBACK_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0055_0000 } } # [ doc = "Reader of field `UTMI_TESTSTART`" ] pub type UTMI_TESTSTART_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_TESTSTART`" ] pub struct UTMI_TESTSTART_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_TESTSTART_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `UTMI_DIG_TST0`" ] pub type UTMI_DIG_TST0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_DIG_TST0`" ] pub struct UTMI_DIG_TST0_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_DIG_TST0_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 } } # [ doc = "Reader of field `UTMI_DIG_TST1`" ] pub type UTMI_DIG_TST1_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UTMI_DIG_TST1`" ] pub struct UTMI_DIG_TST1_W < 'a > { w : & 'a mut W , } impl < 'a > UTMI_DIG_TST1_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 = "Reader of field `TSTI_TX_HS_MODE`" ] pub type TSTI_TX_HS_MODE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_HS_MODE`" ] pub struct TSTI_TX_HS_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_HS_MODE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `TSTI_TX_LS_MODE`" ] pub type TSTI_TX_LS_MODE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_LS_MODE`" ] pub struct TSTI_TX_LS_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_LS_MODE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TSTI_TX_EN`" ] pub type TSTI_TX_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_EN`" ] pub struct TSTI_TX_EN_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_EN_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 = "Reader of field `TSTI_TX_HIZ`" ] pub type TSTI_TX_HIZ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_TX_HIZ`" ] pub struct TSTI_TX_HIZ_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_TX_HIZ_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 = "Reader of field `UTMO_DIG_TST0`" ] pub type UTMO_DIG_TST0_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `UTMO_DIG_TST1`" ] pub type UTMO_DIG_TST1_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `TSTI_HSFS_MODE_EN`" ] pub type TSTI_HSFS_MODE_EN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TSTI_HSFS_MODE_EN`" ] pub struct TSTI_HSFS_MODE_EN_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_HSFS_MODE_EN_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `TSTPKT`" ] pub type TSTPKT_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TSTPKT`" ] pub struct TSTPKT_W < 'a > { w : & 'a mut W , } impl < 'a > TSTPKT_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } impl R { # [ doc = "Bit 0 - This bit enables the USB loopback test." ] # [ inline ( always ) ] pub fn utmi_teststart ( & self ) -> UTMI_TESTSTART_R { UTMI_TESTSTART_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst0 ( & self ) -> UTMI_DIG_TST0_R { UTMI_DIG_TST0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst1 ( & self ) -> UTMI_DIG_TST1_R { UTMI_DIG_TST1_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Select HS or FS mode for USB loopback testing" ] # [ inline ( always ) ] pub fn tsti_tx_hs_mode ( & self ) -> TSTI_TX_HS_MODE_R { TSTI_TX_HS_MODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Set to value 1'b1 to choose LS for USB loopback testing, set to value 1'b0 to choose HS or FS mode which is defined by TSTI1_TX_HS" ] # [ inline ( always ) ] pub fn tsti_tx_ls_mode ( & self ) -> TSTI_TX_LS_MODE_R { TSTI_TX_LS_MODE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Enable TX for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_en ( & self ) -> TSTI_TX_EN_R { TSTI_TX_EN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Sets TX Hi-Z for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_hiz ( & self ) -> TSTI_TX_HIZ_R { TSTI_TX_HIZ_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - This read-only bit is a status bit for USB loopback test results" ] # [ inline ( always ) ] pub fn utmo_dig_tst0 ( & self ) -> UTMO_DIG_TST0_R { UTMO_DIG_TST0_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - This read-only bit is a status bit for USB loopback test" ] # [ inline ( always ) ] pub fn utmo_dig_tst1 ( & self ) -> UTMO_DIG_TST1_R { UTMO_DIG_TST1_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Setting this bit field to value 1'b1 will enable the loopback test to dynamically change the packet speed" ] # [ inline ( always ) ] pub fn tsti_hsfs_mode_en ( & self ) -> TSTI_HSFS_MODE_EN_R { TSTI_HSFS_MODE_EN_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:23 - Selects the packet data byte used for USB loopback testing in Pulse mode" ] # [ inline ( always ) ] pub fn tstpkt ( & self ) -> TSTPKT_R { TSTPKT_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bit 0 - This bit enables the USB loopback test." ] # [ inline ( always ) ] pub fn utmi_teststart ( & mut self ) -> UTMI_TESTSTART_W { UTMI_TESTSTART_W { w : self } } # [ doc = "Bit 1 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst0 ( & mut self ) -> UTMI_DIG_TST0_W { UTMI_DIG_TST0_W { w : self } } # [ doc = "Bit 2 - Mode control for USB loopback test" ] # [ inline ( always ) ] pub fn utmi_dig_tst1 ( & mut self ) -> UTMI_DIG_TST1_W { UTMI_DIG_TST1_W { w : self } } # [ doc = "Bit 3 - Select HS or FS mode for USB loopback testing" ] # [ inline ( always ) ] pub fn tsti_tx_hs_mode ( & mut self ) -> TSTI_TX_HS_MODE_W { TSTI_TX_HS_MODE_W { w : self } } # [ doc = "Bit 4 - Set to value 1'b1 to choose LS for USB loopback testing, set to value 1'b0 to choose HS or FS mode which is defined by TSTI1_TX_HS" ] # [ inline ( always ) ] pub fn tsti_tx_ls_mode ( & mut self ) -> TSTI_TX_LS_MODE_W { TSTI_TX_LS_MODE_W { w : self } } # [ doc = "Bit 5 - Enable TX for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_en ( & mut self ) -> TSTI_TX_EN_W { TSTI_TX_EN_W { w : self } } # [ doc = "Bit 6 - Sets TX Hi-Z for USB loopback test." ] # [ inline ( always ) ] pub fn tsti_tx_hiz ( & mut self ) -> TSTI_TX_HIZ_W { TSTI_TX_HIZ_W { w : self } } # [ doc = "Bit 15 - Setting this bit field to value 1'b1 will enable the loopback test to dynamically change the packet speed" ] # [ inline ( always ) ] pub fn tsti_hsfs_mode_en ( & mut self ) -> TSTI_HSFS_MODE_EN_W { TSTI_HSFS_MODE_EN_W { w : self } } # [ doc = "Bits 16:23 - Selects the packet data byte used for USB loopback testing in Pulse mode" ] # [ inline ( always ) ] pub fn tstpkt ( & mut self ) -> TSTPKT_W { TSTPKT_W { w : self } } } } # [ doc = "USB PHY Loopback Packet Number Select Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_loopback_hsfscnt](usb1_loopback_hsfscnt) module" ] pub type USB1_LOOPBACK_HSFSCNT = crate :: Reg < u32 , _USB1_LOOPBACK_HSFSCNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_LOOPBACK_HSFSCNT ; # [ doc = "`read()` method returns [usb1_loopback_hsfscnt::R](usb1_loopback_hsfscnt::R) reader structure" ] impl crate :: Readable for USB1_LOOPBACK_HSFSCNT { } # [ doc = "`write(|w| ..)` method takes [usb1_loopback_hsfscnt::W](usb1_loopback_hsfscnt::W) writer structure" ] impl crate :: Writable for USB1_LOOPBACK_HSFSCNT { } # [ doc = "USB PHY Loopback Packet Number Select Register" ] pub mod usb1_loopback_hsfscnt { # [ doc = "Reader of register USB1_LOOPBACK_HSFSCNT" ] pub type R = crate :: R < u32 , super :: USB1_LOOPBACK_HSFSCNT > ; # [ doc = "Writer for register USB1_LOOPBACK_HSFSCNT" ] pub type W = crate :: W < u32 , super :: USB1_LOOPBACK_HSFSCNT > ; # [ doc = "Register USB1_LOOPBACK_HSFSCNT `reset()`'s with value 0x0004_0010" ] impl crate :: ResetValue for super :: USB1_LOOPBACK_HSFSCNT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0004_0010 } } # [ doc = "Reader of field `TSTI_HS_NUMBER`" ] pub type TSTI_HS_NUMBER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSTI_HS_NUMBER`" ] pub struct TSTI_HS_NUMBER_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_HS_NUMBER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `TSTI_FS_NUMBER`" ] pub type TSTI_FS_NUMBER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSTI_FS_NUMBER`" ] pub struct TSTI_FS_NUMBER_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_FS_NUMBER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - High speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_hs_number ( & self ) -> TSTI_HS_NUMBER_R { TSTI_HS_NUMBER_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Full speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_fs_number ( & self ) -> TSTI_FS_NUMBER_R { TSTI_FS_NUMBER_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - High speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_hs_number ( & mut self ) -> TSTI_HS_NUMBER_W { TSTI_HS_NUMBER_W { w : self } } # [ doc = "Bits 16:31 - Full speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_fs_number ( & mut self ) -> TSTI_FS_NUMBER_W { TSTI_FS_NUMBER_W { w : self } } } } # [ doc = "USB PHY Loopback Packet Number Select Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_loopback_hsfscnt_set](usb1_loopback_hsfscnt_set) module" ] pub type USB1_LOOPBACK_HSFSCNT_SET = crate :: Reg < u32 , _USB1_LOOPBACK_HSFSCNT_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_LOOPBACK_HSFSCNT_SET ; # [ doc = "`read()` method returns [usb1_loopback_hsfscnt_set::R](usb1_loopback_hsfscnt_set::R) reader structure" ] impl crate :: Readable for USB1_LOOPBACK_HSFSCNT_SET { } # [ doc = "`write(|w| ..)` method takes [usb1_loopback_hsfscnt_set::W](usb1_loopback_hsfscnt_set::W) writer structure" ] impl crate :: Writable for USB1_LOOPBACK_HSFSCNT_SET { } # [ doc = "USB PHY Loopback Packet Number Select Register" ] pub mod usb1_loopback_hsfscnt_set { # [ doc = "Reader of register USB1_LOOPBACK_HSFSCNT_SET" ] pub type R = crate :: R < u32 , super :: USB1_LOOPBACK_HSFSCNT_SET > ; # [ doc = "Writer for register USB1_LOOPBACK_HSFSCNT_SET" ] pub type W = crate :: W < u32 , super :: USB1_LOOPBACK_HSFSCNT_SET > ; # [ doc = "Register USB1_LOOPBACK_HSFSCNT_SET `reset()`'s with value 0x0004_0010" ] impl crate :: ResetValue for super :: USB1_LOOPBACK_HSFSCNT_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0004_0010 } } # [ doc = "Reader of field `TSTI_HS_NUMBER`" ] pub type TSTI_HS_NUMBER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSTI_HS_NUMBER`" ] pub struct TSTI_HS_NUMBER_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_HS_NUMBER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `TSTI_FS_NUMBER`" ] pub type TSTI_FS_NUMBER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSTI_FS_NUMBER`" ] pub struct TSTI_FS_NUMBER_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_FS_NUMBER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - High speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_hs_number ( & self ) -> TSTI_HS_NUMBER_R { TSTI_HS_NUMBER_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Full speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_fs_number ( & self ) -> TSTI_FS_NUMBER_R { TSTI_FS_NUMBER_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - High speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_hs_number ( & mut self ) -> TSTI_HS_NUMBER_W { TSTI_HS_NUMBER_W { w : self } } # [ doc = "Bits 16:31 - Full speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_fs_number ( & mut self ) -> TSTI_FS_NUMBER_W { TSTI_FS_NUMBER_W { w : self } } } } # [ doc = "USB PHY Loopback Packet Number Select Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_loopback_hsfscnt_clr](usb1_loopback_hsfscnt_clr) module" ] pub type USB1_LOOPBACK_HSFSCNT_CLR = crate :: Reg < u32 , _USB1_LOOPBACK_HSFSCNT_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_LOOPBACK_HSFSCNT_CLR ; # [ doc = "`read()` method returns [usb1_loopback_hsfscnt_clr::R](usb1_loopback_hsfscnt_clr::R) reader structure" ] impl crate :: Readable for USB1_LOOPBACK_HSFSCNT_CLR { } # [ doc = "`write(|w| ..)` method takes [usb1_loopback_hsfscnt_clr::W](usb1_loopback_hsfscnt_clr::W) writer structure" ] impl crate :: Writable for USB1_LOOPBACK_HSFSCNT_CLR { } # [ doc = "USB PHY Loopback Packet Number Select Register" ] pub mod usb1_loopback_hsfscnt_clr { # [ doc = "Reader of register USB1_LOOPBACK_HSFSCNT_CLR" ] pub type R = crate :: R < u32 , super :: USB1_LOOPBACK_HSFSCNT_CLR > ; # [ doc = "Writer for register USB1_LOOPBACK_HSFSCNT_CLR" ] pub type W = crate :: W < u32 , super :: USB1_LOOPBACK_HSFSCNT_CLR > ; # [ doc = "Register USB1_LOOPBACK_HSFSCNT_CLR `reset()`'s with value 0x0004_0010" ] impl crate :: ResetValue for super :: USB1_LOOPBACK_HSFSCNT_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0004_0010 } } # [ doc = "Reader of field `TSTI_HS_NUMBER`" ] pub type TSTI_HS_NUMBER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSTI_HS_NUMBER`" ] pub struct TSTI_HS_NUMBER_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_HS_NUMBER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `TSTI_FS_NUMBER`" ] pub type TSTI_FS_NUMBER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSTI_FS_NUMBER`" ] pub struct TSTI_FS_NUMBER_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_FS_NUMBER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - High speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_hs_number ( & self ) -> TSTI_HS_NUMBER_R { TSTI_HS_NUMBER_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Full speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_fs_number ( & self ) -> TSTI_FS_NUMBER_R { TSTI_FS_NUMBER_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - High speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_hs_number ( & mut self ) -> TSTI_HS_NUMBER_W { TSTI_HS_NUMBER_W { w : self } } # [ doc = "Bits 16:31 - Full speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_fs_number ( & mut self ) -> TSTI_FS_NUMBER_W { TSTI_FS_NUMBER_W { w : self } } } } # [ doc = "USB PHY Loopback Packet Number Select Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [usb1_loopback_hsfscnt_tog](usb1_loopback_hsfscnt_tog) module" ] pub type USB1_LOOPBACK_HSFSCNT_TOG = crate :: Reg < u32 , _USB1_LOOPBACK_HSFSCNT_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _USB1_LOOPBACK_HSFSCNT_TOG ; # [ doc = "`read()` method returns [usb1_loopback_hsfscnt_tog::R](usb1_loopback_hsfscnt_tog::R) reader structure" ] impl crate :: Readable for USB1_LOOPBACK_HSFSCNT_TOG { } # [ doc = "`write(|w| ..)` method takes [usb1_loopback_hsfscnt_tog::W](usb1_loopback_hsfscnt_tog::W) writer structure" ] impl crate :: Writable for USB1_LOOPBACK_HSFSCNT_TOG { } # [ doc = "USB PHY Loopback Packet Number Select Register" ] pub mod usb1_loopback_hsfscnt_tog { # [ doc = "Reader of register USB1_LOOPBACK_HSFSCNT_TOG" ] pub type R = crate :: R < u32 , super :: USB1_LOOPBACK_HSFSCNT_TOG > ; # [ doc = "Writer for register USB1_LOOPBACK_HSFSCNT_TOG" ] pub type W = crate :: W < u32 , super :: USB1_LOOPBACK_HSFSCNT_TOG > ; # [ doc = "Register USB1_LOOPBACK_HSFSCNT_TOG `reset()`'s with value 0x0004_0010" ] impl crate :: ResetValue for super :: USB1_LOOPBACK_HSFSCNT_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0004_0010 } } # [ doc = "Reader of field `TSTI_HS_NUMBER`" ] pub type TSTI_HS_NUMBER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSTI_HS_NUMBER`" ] pub struct TSTI_HS_NUMBER_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_HS_NUMBER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `TSTI_FS_NUMBER`" ] pub type TSTI_FS_NUMBER_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSTI_FS_NUMBER`" ] pub struct TSTI_FS_NUMBER_W < 'a > { w : & 'a mut W , } impl < 'a > TSTI_FS_NUMBER_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - High speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_hs_number ( & self ) -> TSTI_HS_NUMBER_R { TSTI_HS_NUMBER_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Full speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_fs_number ( & self ) -> TSTI_FS_NUMBER_R { TSTI_FS_NUMBER_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - High speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_hs_number ( & mut self ) -> TSTI_HS_NUMBER_W { TSTI_HS_NUMBER_W { w : self } } # [ doc = "Bits 16:31 - Full speed packet number, used when USBPHY_USB1_LOOPBACK\\[TSTI_HSFS_MODE_EN\\] is set to value 1'b1." ] # [ inline ( always ) ] pub fn tsti_fs_number ( & mut self ) -> TSTI_FS_NUMBER_W { TSTI_FS_NUMBER_W { w : self } } } } # [ doc = "USB PHY Trim Override Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [trim_override_en](trim_override_en) module" ] pub type TRIM_OVERRIDE_EN = crate :: Reg < u32 , _TRIM_OVERRIDE_EN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TRIM_OVERRIDE_EN ; # [ doc = "`read()` method returns [trim_override_en::R](trim_override_en::R) reader structure" ] impl crate :: Readable for TRIM_OVERRIDE_EN { } # [ doc = "`write(|w| ..)` method takes [trim_override_en::W](trim_override_en::W) writer structure" ] impl crate :: Writable for TRIM_OVERRIDE_EN { } # [ doc = "USB PHY Trim Override Enable Register" ] pub mod trim_override_en { # [ doc = "Reader of register TRIM_OVERRIDE_EN" ] pub type R = crate :: R < u32 , super :: TRIM_OVERRIDE_EN > ; # [ doc = "Writer for register TRIM_OVERRIDE_EN" ] pub type W = crate :: W < u32 , super :: TRIM_OVERRIDE_EN > ; # [ doc = "Register TRIM_OVERRIDE_EN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TRIM_OVERRIDE_EN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TRIM_DIV_SEL_OVERRIDE`" ] pub type TRIM_DIV_SEL_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_DIV_SEL_OVERRIDE`" ] pub struct TRIM_DIV_SEL_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_DIV_SEL_OVERRIDE_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `TRIM_ENV_TAIL_ADJ_VD_OVERRIDE`" ] pub type TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_ENV_TAIL_ADJ_VD_OVERRIDE`" ] pub struct TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_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 } } # [ doc = "Reader of field `TRIM_TX_D_CAL_OVERRIDE`" ] pub type TRIM_TX_D_CAL_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_D_CAL_OVERRIDE`" ] pub struct TRIM_TX_D_CAL_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_D_CAL_OVERRIDE_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 = "Reader of field `TRIM_TX_CAL45DP_OVERRIDE`" ] pub type TRIM_TX_CAL45DP_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_CAL45DP_OVERRIDE`" ] pub struct TRIM_TX_CAL45DP_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_CAL45DP_OVERRIDE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `TRIM_TX_CAL45DM_OVERRIDE`" ] pub type TRIM_TX_CAL45DM_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_CAL45DM_OVERRIDE`" ] pub struct TRIM_TX_CAL45DM_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_CAL45DM_OVERRIDE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TRIM_PLL_CTRL0_DIV_SEL`" ] pub type TRIM_PLL_CTRL0_DIV_SEL_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USB_REG_ENV_TAIL_ADJ_VD`" ] pub type TRIM_USB_REG_ENV_TAIL_ADJ_VD_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_D_CAL`" ] pub type TRIM_USBPHY_TX_D_CAL_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_CAL45DP`" ] pub type TRIM_USBPHY_TX_CAL45DP_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_CAL45DM`" ] pub type TRIM_USBPHY_TX_CAL45DM_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Override enable for PLL_DIV_SEL, when set, the register value in USBPHY_PLL_SIC\\[1:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_div_sel_override ( & self ) -> TRIM_DIV_SEL_OVERRIDE_R { TRIM_DIV_SEL_OVERRIDE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Override enable for ENV_TAIL_ADJ, when set, the register value in USBPHY_DEBUG1\\[14:13\\] will be used" ] # [ inline ( always ) ] pub fn trim_env_tail_adj_vd_override ( & self ) -> TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R { TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Override enable for TX_D_CAL, when set, the register value in USBPHY_TX\\[3:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_d_cal_override ( & self ) -> TRIM_TX_D_CAL_OVERRIDE_R { TRIM_TX_D_CAL_OVERRIDE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Override enable for TX_CAL45DP, when set, the register value in USBPHY_TX\\[19:16\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dp_override ( & self ) -> TRIM_TX_CAL45DP_OVERRIDE_R { TRIM_TX_CAL45DP_OVERRIDE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Override enable for TX_CAL45DM, when set, the register value in USBPHY_TX\\[11:8\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dm_override ( & self ) -> TRIM_TX_CAL45DM_OVERRIDE_R { TRIM_TX_CAL45DM_OVERRIDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:17 - IFR value of PLL_DIV_SEL." ] # [ inline ( always ) ] pub fn trim_pll_ctrl0_div_sel ( & self ) -> TRIM_PLL_CTRL0_DIV_SEL_R { TRIM_PLL_CTRL0_DIV_SEL_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - IFR value of ENV_TAIL_ADJ." ] # [ inline ( always ) ] pub fn trim_usb_reg_env_tail_adj_vd ( & self ) -> TRIM_USB_REG_ENV_TAIL_ADJ_VD_R { TRIM_USB_REG_ENV_TAIL_ADJ_VD_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:23 - IFR value of TX_D_CAL." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_d_cal ( & self ) -> TRIM_USBPHY_TX_D_CAL_R { TRIM_USBPHY_TX_D_CAL_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - IFR value of TX_CAL45DP." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_cal45dp ( & self ) -> TRIM_USBPHY_TX_CAL45DP_R { TRIM_USBPHY_TX_CAL45DP_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - IFR value of TX_CAL45DM." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_cal45dm ( & self ) -> TRIM_USBPHY_TX_CAL45DM_R { TRIM_USBPHY_TX_CAL45DM_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Override enable for PLL_DIV_SEL, when set, the register value in USBPHY_PLL_SIC\\[1:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_div_sel_override ( & mut self ) -> TRIM_DIV_SEL_OVERRIDE_W { TRIM_DIV_SEL_OVERRIDE_W { w : self } } # [ doc = "Bit 1 - Override enable for ENV_TAIL_ADJ, when set, the register value in USBPHY_DEBUG1\\[14:13\\] will be used" ] # [ inline ( always ) ] pub fn trim_env_tail_adj_vd_override ( & mut self ) -> TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W { TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W { w : self } } # [ doc = "Bit 2 - Override enable for TX_D_CAL, when set, the register value in USBPHY_TX\\[3:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_d_cal_override ( & mut self ) -> TRIM_TX_D_CAL_OVERRIDE_W { TRIM_TX_D_CAL_OVERRIDE_W { w : self } } # [ doc = "Bit 3 - Override enable for TX_CAL45DP, when set, the register value in USBPHY_TX\\[19:16\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dp_override ( & mut self ) -> TRIM_TX_CAL45DP_OVERRIDE_W { TRIM_TX_CAL45DP_OVERRIDE_W { w : self } } # [ doc = "Bit 4 - Override enable for TX_CAL45DM, when set, the register value in USBPHY_TX\\[11:8\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dm_override ( & mut self ) -> TRIM_TX_CAL45DM_OVERRIDE_W { TRIM_TX_CAL45DM_OVERRIDE_W { w : self } } } } # [ doc = "USB PHY Trim Override Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [trim_override_en_set](trim_override_en_set) module" ] pub type TRIM_OVERRIDE_EN_SET = crate :: Reg < u32 , _TRIM_OVERRIDE_EN_SET > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TRIM_OVERRIDE_EN_SET ; # [ doc = "`read()` method returns [trim_override_en_set::R](trim_override_en_set::R) reader structure" ] impl crate :: Readable for TRIM_OVERRIDE_EN_SET { } # [ doc = "`write(|w| ..)` method takes [trim_override_en_set::W](trim_override_en_set::W) writer structure" ] impl crate :: Writable for TRIM_OVERRIDE_EN_SET { } # [ doc = "USB PHY Trim Override Enable Register" ] pub mod trim_override_en_set { # [ doc = "Reader of register TRIM_OVERRIDE_EN_SET" ] pub type R = crate :: R < u32 , super :: TRIM_OVERRIDE_EN_SET > ; # [ doc = "Writer for register TRIM_OVERRIDE_EN_SET" ] pub type W = crate :: W < u32 , super :: TRIM_OVERRIDE_EN_SET > ; # [ doc = "Register TRIM_OVERRIDE_EN_SET `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TRIM_OVERRIDE_EN_SET { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TRIM_DIV_SEL_OVERRIDE`" ] pub type TRIM_DIV_SEL_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_DIV_SEL_OVERRIDE`" ] pub struct TRIM_DIV_SEL_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_DIV_SEL_OVERRIDE_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `TRIM_ENV_TAIL_ADJ_VD_OVERRIDE`" ] pub type TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_ENV_TAIL_ADJ_VD_OVERRIDE`" ] pub struct TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_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 } } # [ doc = "Reader of field `TRIM_TX_D_CAL_OVERRIDE`" ] pub type TRIM_TX_D_CAL_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_D_CAL_OVERRIDE`" ] pub struct TRIM_TX_D_CAL_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_D_CAL_OVERRIDE_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 = "Reader of field `TRIM_TX_CAL45DP_OVERRIDE`" ] pub type TRIM_TX_CAL45DP_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_CAL45DP_OVERRIDE`" ] pub struct TRIM_TX_CAL45DP_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_CAL45DP_OVERRIDE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `TRIM_TX_CAL45DM_OVERRIDE`" ] pub type TRIM_TX_CAL45DM_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_CAL45DM_OVERRIDE`" ] pub struct TRIM_TX_CAL45DM_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_CAL45DM_OVERRIDE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TRIM_PLL_CTRL0_DIV_SEL`" ] pub type TRIM_PLL_CTRL0_DIV_SEL_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USB_REG_ENV_TAIL_ADJ_VD`" ] pub type TRIM_USB_REG_ENV_TAIL_ADJ_VD_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_D_CAL`" ] pub type TRIM_USBPHY_TX_D_CAL_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_CAL45DP`" ] pub type TRIM_USBPHY_TX_CAL45DP_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_CAL45DM`" ] pub type TRIM_USBPHY_TX_CAL45DM_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Override enable for PLL_DIV_SEL, when set, the register value in USBPHY_PLL_SIC\\[1:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_div_sel_override ( & self ) -> TRIM_DIV_SEL_OVERRIDE_R { TRIM_DIV_SEL_OVERRIDE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Override enable for ENV_TAIL_ADJ, when set, the register value in USBPHY_DEBUG1\\[14:13\\] will be used" ] # [ inline ( always ) ] pub fn trim_env_tail_adj_vd_override ( & self ) -> TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R { TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Override enable for TX_D_CAL, when set, the register value in USBPHY_TX\\[3:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_d_cal_override ( & self ) -> TRIM_TX_D_CAL_OVERRIDE_R { TRIM_TX_D_CAL_OVERRIDE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Override enable for TX_CAL45DP, when set, the register value in USBPHY_TX\\[19:16\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dp_override ( & self ) -> TRIM_TX_CAL45DP_OVERRIDE_R { TRIM_TX_CAL45DP_OVERRIDE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Override enable for TX_CAL45DM, when set, the register value in USBPHY_TX\\[11:8\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dm_override ( & self ) -> TRIM_TX_CAL45DM_OVERRIDE_R { TRIM_TX_CAL45DM_OVERRIDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:17 - IFR value of PLL_DIV_SEL." ] # [ inline ( always ) ] pub fn trim_pll_ctrl0_div_sel ( & self ) -> TRIM_PLL_CTRL0_DIV_SEL_R { TRIM_PLL_CTRL0_DIV_SEL_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - IFR value of ENV_TAIL_ADJ." ] # [ inline ( always ) ] pub fn trim_usb_reg_env_tail_adj_vd ( & self ) -> TRIM_USB_REG_ENV_TAIL_ADJ_VD_R { TRIM_USB_REG_ENV_TAIL_ADJ_VD_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:23 - IFR value of TX_D_CAL." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_d_cal ( & self ) -> TRIM_USBPHY_TX_D_CAL_R { TRIM_USBPHY_TX_D_CAL_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - IFR value of TX_CAL45DP." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_cal45dp ( & self ) -> TRIM_USBPHY_TX_CAL45DP_R { TRIM_USBPHY_TX_CAL45DP_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - IFR value of TX_CAL45DM." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_cal45dm ( & self ) -> TRIM_USBPHY_TX_CAL45DM_R { TRIM_USBPHY_TX_CAL45DM_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Override enable for PLL_DIV_SEL, when set, the register value in USBPHY_PLL_SIC\\[1:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_div_sel_override ( & mut self ) -> TRIM_DIV_SEL_OVERRIDE_W { TRIM_DIV_SEL_OVERRIDE_W { w : self } } # [ doc = "Bit 1 - Override enable for ENV_TAIL_ADJ, when set, the register value in USBPHY_DEBUG1\\[14:13\\] will be used" ] # [ inline ( always ) ] pub fn trim_env_tail_adj_vd_override ( & mut self ) -> TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W { TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W { w : self } } # [ doc = "Bit 2 - Override enable for TX_D_CAL, when set, the register value in USBPHY_TX\\[3:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_d_cal_override ( & mut self ) -> TRIM_TX_D_CAL_OVERRIDE_W { TRIM_TX_D_CAL_OVERRIDE_W { w : self } } # [ doc = "Bit 3 - Override enable for TX_CAL45DP, when set, the register value in USBPHY_TX\\[19:16\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dp_override ( & mut self ) -> TRIM_TX_CAL45DP_OVERRIDE_W { TRIM_TX_CAL45DP_OVERRIDE_W { w : self } } # [ doc = "Bit 4 - Override enable for TX_CAL45DM, when set, the register value in USBPHY_TX\\[11:8\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dm_override ( & mut self ) -> TRIM_TX_CAL45DM_OVERRIDE_W { TRIM_TX_CAL45DM_OVERRIDE_W { w : self } } } } # [ doc = "USB PHY Trim Override Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [trim_override_en_clr](trim_override_en_clr) module" ] pub type TRIM_OVERRIDE_EN_CLR = crate :: Reg < u32 , _TRIM_OVERRIDE_EN_CLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TRIM_OVERRIDE_EN_CLR ; # [ doc = "`read()` method returns [trim_override_en_clr::R](trim_override_en_clr::R) reader structure" ] impl crate :: Readable for TRIM_OVERRIDE_EN_CLR { } # [ doc = "`write(|w| ..)` method takes [trim_override_en_clr::W](trim_override_en_clr::W) writer structure" ] impl crate :: Writable for TRIM_OVERRIDE_EN_CLR { } # [ doc = "USB PHY Trim Override Enable Register" ] pub mod trim_override_en_clr { # [ doc = "Reader of register TRIM_OVERRIDE_EN_CLR" ] pub type R = crate :: R < u32 , super :: TRIM_OVERRIDE_EN_CLR > ; # [ doc = "Writer for register TRIM_OVERRIDE_EN_CLR" ] pub type W = crate :: W < u32 , super :: TRIM_OVERRIDE_EN_CLR > ; # [ doc = "Register TRIM_OVERRIDE_EN_CLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TRIM_OVERRIDE_EN_CLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TRIM_DIV_SEL_OVERRIDE`" ] pub type TRIM_DIV_SEL_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_DIV_SEL_OVERRIDE`" ] pub struct TRIM_DIV_SEL_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_DIV_SEL_OVERRIDE_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `TRIM_ENV_TAIL_ADJ_VD_OVERRIDE`" ] pub type TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_ENV_TAIL_ADJ_VD_OVERRIDE`" ] pub struct TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_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 } } # [ doc = "Reader of field `TRIM_TX_D_CAL_OVERRIDE`" ] pub type TRIM_TX_D_CAL_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_D_CAL_OVERRIDE`" ] pub struct TRIM_TX_D_CAL_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_D_CAL_OVERRIDE_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 = "Reader of field `TRIM_TX_CAL45DP_OVERRIDE`" ] pub type TRIM_TX_CAL45DP_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_CAL45DP_OVERRIDE`" ] pub struct TRIM_TX_CAL45DP_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_CAL45DP_OVERRIDE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `TRIM_TX_CAL45DM_OVERRIDE`" ] pub type TRIM_TX_CAL45DM_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_CAL45DM_OVERRIDE`" ] pub struct TRIM_TX_CAL45DM_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_CAL45DM_OVERRIDE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TRIM_PLL_CTRL0_DIV_SEL`" ] pub type TRIM_PLL_CTRL0_DIV_SEL_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USB_REG_ENV_TAIL_ADJ_VD`" ] pub type TRIM_USB_REG_ENV_TAIL_ADJ_VD_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_D_CAL`" ] pub type TRIM_USBPHY_TX_D_CAL_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_CAL45DP`" ] pub type TRIM_USBPHY_TX_CAL45DP_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_CAL45DM`" ] pub type TRIM_USBPHY_TX_CAL45DM_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Override enable for PLL_DIV_SEL, when set, the register value in USBPHY_PLL_SIC\\[1:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_div_sel_override ( & self ) -> TRIM_DIV_SEL_OVERRIDE_R { TRIM_DIV_SEL_OVERRIDE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Override enable for ENV_TAIL_ADJ, when set, the register value in USBPHY_DEBUG1\\[14:13\\] will be used" ] # [ inline ( always ) ] pub fn trim_env_tail_adj_vd_override ( & self ) -> TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R { TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Override enable for TX_D_CAL, when set, the register value in USBPHY_TX\\[3:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_d_cal_override ( & self ) -> TRIM_TX_D_CAL_OVERRIDE_R { TRIM_TX_D_CAL_OVERRIDE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Override enable for TX_CAL45DP, when set, the register value in USBPHY_TX\\[19:16\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dp_override ( & self ) -> TRIM_TX_CAL45DP_OVERRIDE_R { TRIM_TX_CAL45DP_OVERRIDE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Override enable for TX_CAL45DM, when set, the register value in USBPHY_TX\\[11:8\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dm_override ( & self ) -> TRIM_TX_CAL45DM_OVERRIDE_R { TRIM_TX_CAL45DM_OVERRIDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:17 - IFR value of PLL_DIV_SEL." ] # [ inline ( always ) ] pub fn trim_pll_ctrl0_div_sel ( & self ) -> TRIM_PLL_CTRL0_DIV_SEL_R { TRIM_PLL_CTRL0_DIV_SEL_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - IFR value of ENV_TAIL_ADJ." ] # [ inline ( always ) ] pub fn trim_usb_reg_env_tail_adj_vd ( & self ) -> TRIM_USB_REG_ENV_TAIL_ADJ_VD_R { TRIM_USB_REG_ENV_TAIL_ADJ_VD_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:23 - IFR value of TX_D_CAL." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_d_cal ( & self ) -> TRIM_USBPHY_TX_D_CAL_R { TRIM_USBPHY_TX_D_CAL_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - IFR value of TX_CAL45DP." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_cal45dp ( & self ) -> TRIM_USBPHY_TX_CAL45DP_R { TRIM_USBPHY_TX_CAL45DP_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - IFR value of TX_CAL45DM." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_cal45dm ( & self ) -> TRIM_USBPHY_TX_CAL45DM_R { TRIM_USBPHY_TX_CAL45DM_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Override enable for PLL_DIV_SEL, when set, the register value in USBPHY_PLL_SIC\\[1:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_div_sel_override ( & mut self ) -> TRIM_DIV_SEL_OVERRIDE_W { TRIM_DIV_SEL_OVERRIDE_W { w : self } } # [ doc = "Bit 1 - Override enable for ENV_TAIL_ADJ, when set, the register value in USBPHY_DEBUG1\\[14:13\\] will be used" ] # [ inline ( always ) ] pub fn trim_env_tail_adj_vd_override ( & mut self ) -> TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W { TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W { w : self } } # [ doc = "Bit 2 - Override enable for TX_D_CAL, when set, the register value in USBPHY_TX\\[3:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_d_cal_override ( & mut self ) -> TRIM_TX_D_CAL_OVERRIDE_W { TRIM_TX_D_CAL_OVERRIDE_W { w : self } } # [ doc = "Bit 3 - Override enable for TX_CAL45DP, when set, the register value in USBPHY_TX\\[19:16\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dp_override ( & mut self ) -> TRIM_TX_CAL45DP_OVERRIDE_W { TRIM_TX_CAL45DP_OVERRIDE_W { w : self } } # [ doc = "Bit 4 - Override enable for TX_CAL45DM, when set, the register value in USBPHY_TX\\[11:8\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dm_override ( & mut self ) -> TRIM_TX_CAL45DM_OVERRIDE_W { TRIM_TX_CAL45DM_OVERRIDE_W { w : self } } } } # [ doc = "USB PHY Trim Override Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [trim_override_en_tog](trim_override_en_tog) module" ] pub type TRIM_OVERRIDE_EN_TOG = crate :: Reg < u32 , _TRIM_OVERRIDE_EN_TOG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TRIM_OVERRIDE_EN_TOG ; # [ doc = "`read()` method returns [trim_override_en_tog::R](trim_override_en_tog::R) reader structure" ] impl crate :: Readable for TRIM_OVERRIDE_EN_TOG { } # [ doc = "`write(|w| ..)` method takes [trim_override_en_tog::W](trim_override_en_tog::W) writer structure" ] impl crate :: Writable for TRIM_OVERRIDE_EN_TOG { } # [ doc = "USB PHY Trim Override Enable Register" ] pub mod trim_override_en_tog { # [ doc = "Reader of register TRIM_OVERRIDE_EN_TOG" ] pub type R = crate :: R < u32 , super :: TRIM_OVERRIDE_EN_TOG > ; # [ doc = "Writer for register TRIM_OVERRIDE_EN_TOG" ] pub type W = crate :: W < u32 , super :: TRIM_OVERRIDE_EN_TOG > ; # [ doc = "Register TRIM_OVERRIDE_EN_TOG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TRIM_OVERRIDE_EN_TOG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TRIM_DIV_SEL_OVERRIDE`" ] pub type TRIM_DIV_SEL_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_DIV_SEL_OVERRIDE`" ] pub struct TRIM_DIV_SEL_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_DIV_SEL_OVERRIDE_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `TRIM_ENV_TAIL_ADJ_VD_OVERRIDE`" ] pub type TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_ENV_TAIL_ADJ_VD_OVERRIDE`" ] pub struct TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_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 } } # [ doc = "Reader of field `TRIM_TX_D_CAL_OVERRIDE`" ] pub type TRIM_TX_D_CAL_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_D_CAL_OVERRIDE`" ] pub struct TRIM_TX_D_CAL_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_D_CAL_OVERRIDE_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 = "Reader of field `TRIM_TX_CAL45DP_OVERRIDE`" ] pub type TRIM_TX_CAL45DP_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_CAL45DP_OVERRIDE`" ] pub struct TRIM_TX_CAL45DP_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_CAL45DP_OVERRIDE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `TRIM_TX_CAL45DM_OVERRIDE`" ] pub type TRIM_TX_CAL45DM_OVERRIDE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TRIM_TX_CAL45DM_OVERRIDE`" ] pub struct TRIM_TX_CAL45DM_OVERRIDE_W < 'a > { w : & 'a mut W , } impl < 'a > TRIM_TX_CAL45DM_OVERRIDE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `TRIM_PLL_CTRL0_DIV_SEL`" ] pub type TRIM_PLL_CTRL0_DIV_SEL_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USB_REG_ENV_TAIL_ADJ_VD`" ] pub type TRIM_USB_REG_ENV_TAIL_ADJ_VD_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_D_CAL`" ] pub type TRIM_USBPHY_TX_D_CAL_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_CAL45DP`" ] pub type TRIM_USBPHY_TX_CAL45DP_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `TRIM_USBPHY_TX_CAL45DM`" ] pub type TRIM_USBPHY_TX_CAL45DM_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Override enable for PLL_DIV_SEL, when set, the register value in USBPHY_PLL_SIC\\[1:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_div_sel_override ( & self ) -> TRIM_DIV_SEL_OVERRIDE_R { TRIM_DIV_SEL_OVERRIDE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Override enable for ENV_TAIL_ADJ, when set, the register value in USBPHY_DEBUG1\\[14:13\\] will be used" ] # [ inline ( always ) ] pub fn trim_env_tail_adj_vd_override ( & self ) -> TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R { TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Override enable for TX_D_CAL, when set, the register value in USBPHY_TX\\[3:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_d_cal_override ( & self ) -> TRIM_TX_D_CAL_OVERRIDE_R { TRIM_TX_D_CAL_OVERRIDE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Override enable for TX_CAL45DP, when set, the register value in USBPHY_TX\\[19:16\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dp_override ( & self ) -> TRIM_TX_CAL45DP_OVERRIDE_R { TRIM_TX_CAL45DP_OVERRIDE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Override enable for TX_CAL45DM, when set, the register value in USBPHY_TX\\[11:8\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dm_override ( & self ) -> TRIM_TX_CAL45DM_OVERRIDE_R { TRIM_TX_CAL45DM_OVERRIDE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:17 - IFR value of PLL_DIV_SEL." ] # [ inline ( always ) ] pub fn trim_pll_ctrl0_div_sel ( & self ) -> TRIM_PLL_CTRL0_DIV_SEL_R { TRIM_PLL_CTRL0_DIV_SEL_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - IFR value of ENV_TAIL_ADJ." ] # [ inline ( always ) ] pub fn trim_usb_reg_env_tail_adj_vd ( & self ) -> TRIM_USB_REG_ENV_TAIL_ADJ_VD_R { TRIM_USB_REG_ENV_TAIL_ADJ_VD_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:23 - IFR value of TX_D_CAL." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_d_cal ( & self ) -> TRIM_USBPHY_TX_D_CAL_R { TRIM_USBPHY_TX_D_CAL_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:27 - IFR value of TX_CAL45DP." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_cal45dp ( & self ) -> TRIM_USBPHY_TX_CAL45DP_R { TRIM_USBPHY_TX_CAL45DP_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } # [ doc = "Bits 28:31 - IFR value of TX_CAL45DM." ] # [ inline ( always ) ] pub fn trim_usbphy_tx_cal45dm ( & self ) -> TRIM_USBPHY_TX_CAL45DM_R { TRIM_USBPHY_TX_CAL45DM_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 0 - Override enable for PLL_DIV_SEL, when set, the register value in USBPHY_PLL_SIC\\[1:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_div_sel_override ( & mut self ) -> TRIM_DIV_SEL_OVERRIDE_W { TRIM_DIV_SEL_OVERRIDE_W { w : self } } # [ doc = "Bit 1 - Override enable for ENV_TAIL_ADJ, when set, the register value in USBPHY_DEBUG1\\[14:13\\] will be used" ] # [ inline ( always ) ] pub fn trim_env_tail_adj_vd_override ( & mut self ) -> TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W { TRIM_ENV_TAIL_ADJ_VD_OVERRIDE_W { w : self } } # [ doc = "Bit 2 - Override enable for TX_D_CAL, when set, the register value in USBPHY_TX\\[3:0\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_d_cal_override ( & mut self ) -> TRIM_TX_D_CAL_OVERRIDE_W { TRIM_TX_D_CAL_OVERRIDE_W { w : self } } # [ doc = "Bit 3 - Override enable for TX_CAL45DP, when set, the register value in USBPHY_TX\\[19:16\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dp_override ( & mut self ) -> TRIM_TX_CAL45DP_OVERRIDE_W { TRIM_TX_CAL45DP_OVERRIDE_W { w : self } } # [ doc = "Bit 4 - Override enable for TX_CAL45DM, when set, the register value in USBPHY_TX\\[11:8\\] will be used." ] # [ inline ( always ) ] pub fn trim_tx_cal45dm_override ( & mut self ) -> TRIM_TX_CAL45DM_OVERRIDE_W { TRIM_TX_CAL45DM_OVERRIDE_W { w : self } } } } } # [ doc = "USB Device Charger Detection module" ] pub struct USBHSDCD { _marker : PhantomData < * const ( ) > } unsafe impl Send for USBHSDCD { } impl USBHSDCD { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const usbhsdcd :: RegisterBlock { 0x400a_3000 as * const _ } } impl Deref for USBHSDCD { type Target = usbhsdcd :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * USBHSDCD :: ptr ( ) } } } # [ doc = "USB Device Charger Detection module" ] pub mod usbhsdcd { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Control register" ] pub control : CONTROL , # [ doc = "0x04 - Clock register" ] pub clock : CLOCK , # [ doc = "0x08 - Status register" ] pub status : STATUS , # [ doc = "0x0c - Signal Override Register" ] pub signal_override : SIGNAL_OVERRIDE , # [ doc = "0x10 - TIMER0 register" ] pub timer0 : TIMER0 , # [ doc = "0x14 - TIMER1 register" ] pub timer1 : TIMER1 , _reserved_6_timer2_bc1 : [ u8 ; 4usize ] , } impl RegisterBlock { # [ doc = "0x18 - TIMER2_BC12 register" ] # [ inline ( always ) ] pub fn timer2_bc12 ( & self ) -> & TIMER2_BC12 { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 24usize ) as * const TIMER2_BC12 ) } } # [ doc = "0x18 - TIMER2_BC12 register" ] # [ inline ( always ) ] pub fn timer2_bc12_mut ( & self ) -> & mut TIMER2_BC12 { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 24usize ) as * mut TIMER2_BC12 ) } } # [ doc = "0x18 - TIMER2_BC11 register" ] # [ inline ( always ) ] pub fn timer2_bc11 ( & self ) -> & TIMER2_BC11 { unsafe { & * ( ( ( self as * const Self ) as * const u8 ) . add ( 24usize ) as * const TIMER2_BC11 ) } } # [ doc = "0x18 - TIMER2_BC11 register" ] # [ inline ( always ) ] pub fn timer2_bc11_mut ( & self ) -> & mut TIMER2_BC11 { unsafe { & mut * ( ( ( self as * const Self ) as * mut u8 ) . add ( 24usize ) as * mut TIMER2_BC11 ) } } } # [ doc = "Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [control](control) module" ] pub type CONTROL = crate :: Reg < u32 , _CONTROL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONTROL ; # [ doc = "`read()` method returns [control::R](control::R) reader structure" ] impl crate :: Readable for CONTROL { } # [ doc = "`write(|w| ..)` method takes [control::W](control::W) writer structure" ] impl crate :: Writable for CONTROL { } # [ doc = "Control register" ] pub mod control { # [ doc = "Reader of register CONTROL" ] pub type R = crate :: R < u32 , super :: CONTROL > ; # [ doc = "Writer for register CONTROL" ] pub type W = crate :: W < u32 , super :: CONTROL > ; # [ doc = "Register CONTROL `reset()`'s with value 0x0001_0000" ] impl crate :: ResetValue for super :: CONTROL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_0000 } } # [ doc = "Interrupt Acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IACK_AW { # [ doc = "0: Do not clear the interrupt." ] _0 , # [ doc = "1: Clear the IF bit (interrupt flag)." ] _1 } impl From < IACK_AW > for bool { # [ inline ( always ) ] fn from ( variant : IACK_AW ) -> Self { match variant { IACK_AW :: _0 => false , IACK_AW :: _1 => true } } } # [ doc = "Write proxy for field `IACK`" ] pub struct IACK_W < 'a > { w : & 'a mut W , } impl < 'a > IACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IACK_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not clear the interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IACK_AW :: _0 ) } # [ doc = "Clear the IF bit (interrupt flag)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IACK_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IF_A { # [ doc = "0: No interrupt is pending." ] _0 , # [ doc = "1: An interrupt is pending." ] _1 } impl From < IF_A > for bool { # [ inline ( always ) ] fn from ( variant : IF_A ) -> Self { match variant { IF_A :: _0 => false , IF_A :: _1 => true } } } # [ doc = "Reader of field `IF`" ] pub type IF_R = crate :: R < bool , IF_A > ; impl IF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IF_A { match self . bits { false => IF_A :: _0 , true => IF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IF_A :: _1 } } # [ doc = "Interrupt Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IE_A { # [ doc = "0: Disable interrupts to the system." ] _0 , # [ doc = "1: Enable interrupts to the system." ] _1 } impl From < IE_A > for bool { # [ inline ( always ) ] fn from ( variant : IE_A ) -> Self { match variant { IE_A :: _0 => false , IE_A :: _1 => true } } } # [ doc = "Reader of field `IE`" ] pub type IE_R = crate :: R < bool , IE_A > ; impl IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IE_A { match self . bits { false => IE_A :: _0 , true => IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IE_A :: _1 } } # [ doc = "Write proxy for field `IE`" ] pub struct IE_W < 'a > { w : & 'a mut W , } impl < 'a > IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable interrupts to the system." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IE_A :: _0 ) } # [ doc = "Enable interrupts to the system." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IE_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "BC1.2 compatibility. This bit cannot be changed after start detection.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BC12_A { # [ doc = "0: Compatible with BC1.1 (default)" ] _0 , # [ doc = "1: Compatible with BC1.2" ] _1 } impl From < BC12_A > for bool { # [ inline ( always ) ] fn from ( variant : BC12_A ) -> Self { match variant { BC12_A :: _0 => false , BC12_A :: _1 => true } } } # [ doc = "Reader of field `BC12`" ] pub type BC12_R = crate :: R < bool , BC12_A > ; impl BC12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BC12_A { match self . bits { false => BC12_A :: _0 , true => BC12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BC12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BC12_A :: _1 } } # [ doc = "Write proxy for field `BC12`" ] pub struct BC12_W < 'a > { w : & 'a mut W , } impl < 'a > BC12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BC12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Compatible with BC1.1 (default)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BC12_A :: _0 ) } # [ doc = "Compatible with BC1.2" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BC12_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Start Change Detection Sequence\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum START_AW { # [ doc = "0: Do not start the sequence. Writes of this value have no effect." ] _0 , # [ doc = "1: Initiate the charger detection sequence. If the sequence is already running, writes of this value have no effect." ] _1 } impl From < START_AW > for bool { # [ inline ( always ) ] fn from ( variant : START_AW ) -> Self { match variant { START_AW :: _0 => false , START_AW :: _1 => true } } } # [ doc = "Write proxy for field `START`" ] pub struct START_W < 'a > { w : & 'a mut W , } impl < 'a > START_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : START_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not start the sequence. Writes of this value have no effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( START_AW :: _0 ) } # [ doc = "Initiate the charger detection sequence. If the sequence is already running, writes of this value have no effect." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( START_AW :: _1 ) } # [ 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 = "Software Reset\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SR_AW { # [ doc = "0: Do not perform a software reset." ] _0 , # [ doc = "1: Perform a software reset." ] _1 } impl From < SR_AW > for bool { # [ inline ( always ) ] fn from ( variant : SR_AW ) -> Self { match variant { SR_AW :: _0 => false , SR_AW :: _1 => true } } } # [ doc = "Write proxy for field `SR`" ] pub struct SR_W < 'a > { w : & 'a mut W , } impl < 'a > SR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SR_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Do not perform a software reset." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SR_AW :: _0 ) } # [ doc = "Perform a software reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SR_AW :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 8 - Interrupt Flag" ] # [ inline ( always ) ] pub fn if_ ( & self ) -> IF_R { IF_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Interrupt Enable" ] # [ inline ( always ) ] pub fn ie ( & self ) -> IE_R { IE_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - BC1.2 compatibility. This bit cannot be changed after start detection." ] # [ inline ( always ) ] pub fn bc12 ( & self ) -> BC12_R { BC12_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Interrupt Acknowledge" ] # [ inline ( always ) ] pub fn iack ( & mut self ) -> IACK_W { IACK_W { w : self } } # [ doc = "Bit 16 - Interrupt Enable" ] # [ inline ( always ) ] pub fn ie ( & mut self ) -> IE_W { IE_W { w : self } } # [ doc = "Bit 17 - BC1.2 compatibility. This bit cannot be changed after start detection." ] # [ inline ( always ) ] pub fn bc12 ( & mut self ) -> BC12_W { BC12_W { w : self } } # [ doc = "Bit 24 - Start Change Detection Sequence" ] # [ inline ( always ) ] pub fn start ( & mut self ) -> START_W { START_W { w : self } } # [ doc = "Bit 25 - Software Reset" ] # [ inline ( always ) ] pub fn sr ( & mut self ) -> SR_W { SR_W { w : self } } } } # [ doc = "Clock register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clock](clock) module" ] pub type CLOCK = crate :: Reg < u32 , _CLOCK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CLOCK ; # [ doc = "`read()` method returns [clock::R](clock::R) reader structure" ] impl crate :: Readable for CLOCK { } # [ doc = "`write(|w| ..)` method takes [clock::W](clock::W) writer structure" ] impl crate :: Writable for CLOCK { } # [ doc = "Clock register" ] pub mod clock { # [ doc = "Reader of register CLOCK" ] pub type R = crate :: R < u32 , super :: CLOCK > ; # [ doc = "Writer for register CLOCK" ] pub type W = crate :: W < u32 , super :: CLOCK > ; # [ doc = "Register CLOCK `reset()`'s with value 0xc1" ] impl crate :: ResetValue for super :: CLOCK { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc1 } } # [ doc = "Unit of Measurement Encoding for Clock Speed\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLOCK_UNIT_A { # [ doc = "0: kHz Speed (between 1 kHz and 1023 kHz)" ] _0 , # [ doc = "1: MHz Speed (between 1 MHz and 1023 MHz)" ] _1 } impl From < CLOCK_UNIT_A > for bool { # [ inline ( always ) ] fn from ( variant : CLOCK_UNIT_A ) -> Self { match variant { CLOCK_UNIT_A :: _0 => false , CLOCK_UNIT_A :: _1 => true } } } # [ doc = "Reader of field `CLOCK_UNIT`" ] pub type CLOCK_UNIT_R = crate :: R < bool , CLOCK_UNIT_A > ; impl CLOCK_UNIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLOCK_UNIT_A { match self . bits { false => CLOCK_UNIT_A :: _0 , true => CLOCK_UNIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLOCK_UNIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLOCK_UNIT_A :: _1 } } # [ doc = "Write proxy for field `CLOCK_UNIT`" ] pub struct CLOCK_UNIT_W < 'a > { w : & 'a mut W , } impl < 'a > CLOCK_UNIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLOCK_UNIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "kHz Speed (between 1 kHz and 1023 kHz)" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLOCK_UNIT_A :: _0 ) } # [ doc = "MHz Speed (between 1 MHz and 1023 MHz)" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLOCK_UNIT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `CLOCK_SPEED`" ] pub type CLOCK_SPEED_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CLOCK_SPEED`" ] pub struct CLOCK_SPEED_W < 'a > { w : & 'a mut W , } impl < 'a > CLOCK_SPEED_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 2 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 2 ) ; self . w } } impl R { # [ doc = "Bit 0 - Unit of Measurement Encoding for Clock Speed" ] # [ inline ( always ) ] pub fn clock_unit ( & self ) -> CLOCK_UNIT_R { CLOCK_UNIT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 2:11 - Numerical Value of Clock Speed in Binary" ] # [ inline ( always ) ] pub fn clock_speed ( & self ) -> CLOCK_SPEED_R { CLOCK_SPEED_R :: new ( ( ( self . bits >> 2 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bit 0 - Unit of Measurement Encoding for Clock Speed" ] # [ inline ( always ) ] pub fn clock_unit ( & mut self ) -> CLOCK_UNIT_W { CLOCK_UNIT_W { w : self } } # [ doc = "Bits 2:11 - Numerical Value of Clock Speed in Binary" ] # [ inline ( always ) ] pub fn clock_speed ( & mut self ) -> CLOCK_SPEED_W { CLOCK_SPEED_W { w : self } } } } # [ doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "Status register" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Charger Detection Sequence Results\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQ_RES_A { # [ doc = "0: No results to report." ] _00 , # [ doc = "1: Attached to an SDP. Must comply with USB 2.0 by drawing only 2.5 mA (max) until connected." ] _01 , # [ doc = "2: Attached to a charging port. The exact meaning depends on bit 18: 0: Attached to either a CDP or a DCP. The charger type detection has not completed. 1: Attached to a CDP. The charger type detection has completed." ] _10 , # [ doc = "3: Attached to a DCP." ] _11 } impl From < SEQ_RES_A > for u8 { # [ inline ( always ) ] fn from ( variant : SEQ_RES_A ) -> Self { match variant { SEQ_RES_A :: _00 => 0 , SEQ_RES_A :: _01 => 1 , SEQ_RES_A :: _10 => 2 , SEQ_RES_A :: _11 => 3 } } } # [ doc = "Reader of field `SEQ_RES`" ] pub type SEQ_RES_R = crate :: R < u8 , SEQ_RES_A > ; impl SEQ_RES_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEQ_RES_A { match self . bits { 0 => SEQ_RES_A :: _00 , 1 => SEQ_RES_A :: _01 , 2 => SEQ_RES_A :: _10 , 3 => SEQ_RES_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SEQ_RES_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SEQ_RES_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SEQ_RES_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SEQ_RES_A :: _11 } } # [ doc = "Charger Detection Sequence Status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQ_STAT_A { # [ doc = "0: The module is either not enabled, or the module is enabled but the data pins have not yet been detected." ] _00 , # [ doc = "1: Data pin contact detection is complete." ] _01 , # [ doc = "2: Charging port detection is complete." ] _10 , # [ doc = "3: Charger type detection is complete." ] _11 } impl From < SEQ_STAT_A > for u8 { # [ inline ( always ) ] fn from ( variant : SEQ_STAT_A ) -> Self { match variant { SEQ_STAT_A :: _00 => 0 , SEQ_STAT_A :: _01 => 1 , SEQ_STAT_A :: _10 => 2 , SEQ_STAT_A :: _11 => 3 } } } # [ doc = "Reader of field `SEQ_STAT`" ] pub type SEQ_STAT_R = crate :: R < u8 , SEQ_STAT_A > ; impl SEQ_STAT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEQ_STAT_A { match self . bits { 0 => SEQ_STAT_A :: _00 , 1 => SEQ_STAT_A :: _01 , 2 => SEQ_STAT_A :: _10 , 3 => SEQ_STAT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SEQ_STAT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SEQ_STAT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SEQ_STAT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SEQ_STAT_A :: _11 } } # [ doc = "Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERR_A { # [ doc = "0: No sequence errors." ] _0 , # [ doc = "1: Error in the detection sequence. See the SEQ_STAT field to determine the phase in which the error occurred." ] _1 } impl From < ERR_A > for bool { # [ inline ( always ) ] fn from ( variant : ERR_A ) -> Self { match variant { ERR_A :: _0 => false , ERR_A :: _1 => true } } } # [ doc = "Reader of field `ERR`" ] pub type ERR_R = crate :: R < bool , ERR_A > ; impl ERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ERR_A { match self . bits { false => ERR_A :: _0 , true => ERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ERR_A :: _1 } } # [ doc = "Timeout Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TO_A { # [ doc = "0: The detection sequence has not been running for over 1 s." ] _0 , # [ doc = "1: It has been over 1 s since the data pin contact was detected and debounced." ] _1 } impl From < TO_A > for bool { # [ inline ( always ) ] fn from ( variant : TO_A ) -> Self { match variant { TO_A :: _0 => false , TO_A :: _1 => true } } } # [ doc = "Reader of field `TO`" ] pub type TO_R = crate :: R < bool , TO_A > ; impl TO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TO_A { match self . bits { false => TO_A :: _0 , true => TO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TO_A :: _1 } } # [ doc = "Active Status Indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACTIVE_A { # [ doc = "0: The sequence is not running." ] _0 , # [ doc = "1: The sequence is running." ] _1 } impl From < ACTIVE_A > for bool { # [ inline ( always ) ] fn from ( variant : ACTIVE_A ) -> Self { match variant { ACTIVE_A :: _0 => false , ACTIVE_A :: _1 => true } } } # [ doc = "Reader of field `ACTIVE`" ] pub type ACTIVE_R = crate :: R < bool , ACTIVE_A > ; impl ACTIVE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ACTIVE_A { match self . bits { false => ACTIVE_A :: _0 , true => ACTIVE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ACTIVE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ACTIVE_A :: _1 } } impl R { # [ doc = "Bits 16:17 - Charger Detection Sequence Results" ] # [ inline ( always ) ] pub fn seq_res ( & self ) -> SEQ_RES_R { SEQ_RES_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - Charger Detection Sequence Status" ] # [ inline ( always ) ] pub fn seq_stat ( & self ) -> SEQ_STAT_R { SEQ_STAT_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bit 20 - Error Flag" ] # [ inline ( always ) ] pub fn err ( & self ) -> ERR_R { ERR_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Timeout Flag" ] # [ inline ( always ) ] pub fn to ( & self ) -> TO_R { TO_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Active Status Indicator" ] # [ inline ( always ) ] pub fn active ( & self ) -> ACTIVE_R { ACTIVE_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } } } # [ doc = "Signal Override Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [signal_override](signal_override) module" ] pub type SIGNAL_OVERRIDE = crate :: Reg < u32 , _SIGNAL_OVERRIDE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SIGNAL_OVERRIDE ; # [ doc = "`read()` method returns [signal_override::R](signal_override::R) reader structure" ] impl crate :: Readable for SIGNAL_OVERRIDE { } # [ doc = "`write(|w| ..)` method takes [signal_override::W](signal_override::W) writer structure" ] impl crate :: Writable for SIGNAL_OVERRIDE { } # [ doc = "Signal Override Register" ] pub mod signal_override { # [ doc = "Reader of register SIGNAL_OVERRIDE" ] pub type R = crate :: R < u32 , super :: SIGNAL_OVERRIDE > ; # [ doc = "Writer for register SIGNAL_OVERRIDE" ] pub type W = crate :: W < u32 , super :: SIGNAL_OVERRIDE > ; # [ doc = "Register SIGNAL_OVERRIDE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SIGNAL_OVERRIDE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Phase Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: No overrides. Bit field must remain at this value during normal USB data communication to prevent unexpected conditions on USB_DP and USB_DM pins. (Default)" ] _00 , # [ doc = "1: Reserved, not for customer use." ] _01 , # [ doc = "2: Enables VDP_SRC voltage source for the USB_DP pin and IDM_SINK current source for the USB_DM pin." ] _10 , # [ doc = "3: Reserved, not for customer use." ] _11 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _00 => 0 , PS_A :: _01 => 1 , PS_A :: _10 => 2 , PS_A :: _11 => 3 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _00 , 1 => PS_A :: _01 , 2 => PS_A :: _10 , 3 => PS_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == PS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == PS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == PS_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == PS_A :: _11 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No overrides. Bit field must remain at this value during normal USB data communication to prevent unexpected conditions on USB_DP and USB_DM pins. (Default)" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( PS_A :: _00 ) } # [ doc = "Reserved, not for customer use." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( PS_A :: _01 ) } # [ doc = "Enables VDP_SRC voltage source for the USB_DP pin and IDM_SINK current source for the USB_DM pin." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( PS_A :: _10 ) } # [ doc = "Reserved, not for customer use." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( PS_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Phase Selection" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Phase Selection" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } } } # [ doc = "TIMER0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer0](timer0) module" ] pub type TIMER0 = crate :: Reg < u32 , _TIMER0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER0 ; # [ doc = "`read()` method returns [timer0::R](timer0::R) reader structure" ] impl crate :: Readable for TIMER0 { } # [ doc = "`write(|w| ..)` method takes [timer0::W](timer0::W) writer structure" ] impl crate :: Writable for TIMER0 { } # [ doc = "TIMER0 register" ] pub mod timer0 { # [ doc = "Reader of register TIMER0" ] pub type R = crate :: R < u32 , super :: TIMER0 > ; # [ doc = "Writer for register TIMER0" ] pub type W = crate :: W < u32 , super :: TIMER0 > ; # [ doc = "Register TIMER0 `reset()`'s with value 0x0010_0000" ] impl crate :: ResetValue for super :: TIMER0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0010_0000 } } # [ doc = "Reader of field `TUNITCON`" ] pub type TUNITCON_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `TSEQ_INIT`" ] pub type TSEQ_INIT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TSEQ_INIT`" ] pub struct TSEQ_INIT_W < 'a > { w : & 'a mut W , } impl < 'a > TSEQ_INIT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:11 - Unit Connection Timer Elapse (in ms)" ] # [ inline ( always ) ] pub fn tunitcon ( & self ) -> TUNITCON_R { TUNITCON_R :: new ( ( self . bits & 0x0fff ) as u16 ) } # [ doc = "Bits 16:25 - Sequence Initiation Time" ] # [ inline ( always ) ] pub fn tseq_init ( & self ) -> TSEQ_INIT_R { TSEQ_INIT_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 16:25 - Sequence Initiation Time" ] # [ inline ( always ) ] pub fn tseq_init ( & mut self ) -> TSEQ_INIT_W { TSEQ_INIT_W { w : self } } } } # [ doc = "TIMER1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer1](timer1) module" ] pub type TIMER1 = crate :: Reg < u32 , _TIMER1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER1 ; # [ doc = "`read()` method returns [timer1::R](timer1::R) reader structure" ] impl crate :: Readable for TIMER1 { } # [ doc = "`write(|w| ..)` method takes [timer1::W](timer1::W) writer structure" ] impl crate :: Writable for TIMER1 { } # [ doc = "TIMER1 register" ] pub mod timer1 { # [ doc = "Reader of register TIMER1" ] pub type R = crate :: R < u32 , super :: TIMER1 > ; # [ doc = "Writer for register TIMER1" ] pub type W = crate :: W < u32 , super :: TIMER1 > ; # [ doc = "Register TIMER1 `reset()`'s with value 0x000a_0028" ] impl crate :: ResetValue for super :: TIMER1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x000a_0028 } } # [ doc = "Reader of field `TVDPSRC_ON`" ] pub type TVDPSRC_ON_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TVDPSRC_ON`" ] pub struct TVDPSRC_ON_W < 'a > { w : & 'a mut W , } impl < 'a > TVDPSRC_ON_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } # [ doc = "Reader of field `TDCD_DBNC`" ] pub type TDCD_DBNC_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TDCD_DBNC`" ] pub struct TDCD_DBNC_W < 'a > { w : & 'a mut W , } impl < 'a > TDCD_DBNC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Time Period Comparator Enabled" ] # [ inline ( always ) ] pub fn tvdpsrc_on ( & self ) -> TVDPSRC_ON_R { TVDPSRC_ON_R :: new ( ( self . bits & 0x03ff ) as u16 ) } # [ doc = "Bits 16:25 - Time Period to Debounce D+ Signal" ] # [ inline ( always ) ] pub fn tdcd_dbnc ( & self ) -> TDCD_DBNC_R { TDCD_DBNC_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Time Period Comparator Enabled" ] # [ inline ( always ) ] pub fn tvdpsrc_on ( & mut self ) -> TVDPSRC_ON_W { TVDPSRC_ON_W { w : self } } # [ doc = "Bits 16:25 - Time Period to Debounce D+ Signal" ] # [ inline ( always ) ] pub fn tdcd_dbnc ( & mut self ) -> TDCD_DBNC_W { TDCD_DBNC_W { w : self } } } } # [ doc = "TIMER2_BC11 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer2_bc11](timer2_bc11) module" ] pub type TIMER2_BC11 = crate :: Reg < u32 , _TIMER2_BC11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER2_BC11 ; # [ doc = "`read()` method returns [timer2_bc11::R](timer2_bc11::R) reader structure" ] impl crate :: Readable for TIMER2_BC11 { } # [ doc = "`write(|w| ..)` method takes [timer2_bc11::W](timer2_bc11::W) writer structure" ] impl crate :: Writable for TIMER2_BC11 { } # [ doc = "TIMER2_BC11 register" ] pub mod timer2_bc11 { # [ doc = "Reader of register TIMER2_BC11" ] pub type R = crate :: R < u32 , super :: TIMER2_BC11 > ; # [ doc = "Writer for register TIMER2_BC11" ] pub type W = crate :: W < u32 , super :: TIMER2_BC11 > ; # [ doc = "Register TIMER2_BC11 `reset()`'s with value 0x0028_0001" ] impl crate :: ResetValue for super :: TIMER2_BC11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0028_0001 } } # [ doc = "Reader of field `CHECK_DM`" ] pub type CHECK_DM_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CHECK_DM`" ] pub struct CHECK_DM_W < 'a > { w : & 'a mut W , } impl < 'a > CHECK_DM_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `TVDPSRC_CON`" ] pub type TVDPSRC_CON_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TVDPSRC_CON`" ] pub struct TVDPSRC_CON_W < 'a > { w : & 'a mut W , } impl < 'a > TVDPSRC_CON_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Time Before Check of D- Line" ] # [ inline ( always ) ] pub fn check_dm ( & self ) -> CHECK_DM_R { CHECK_DM_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 16:25 - Time Period Before Enabling D+ Pullup" ] # [ inline ( always ) ] pub fn tvdpsrc_con ( & self ) -> TVDPSRC_CON_R { TVDPSRC_CON_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:3 - Time Before Check of D- Line" ] # [ inline ( always ) ] pub fn check_dm ( & mut self ) -> CHECK_DM_W { CHECK_DM_W { w : self } } # [ doc = "Bits 16:25 - Time Period Before Enabling D+ Pullup" ] # [ inline ( always ) ] pub fn tvdpsrc_con ( & mut self ) -> TVDPSRC_CON_W { TVDPSRC_CON_W { w : self } } } } # [ doc = "TIMER2_BC12 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [timer2_bc12](timer2_bc12) module" ] pub type TIMER2_BC12 = crate :: Reg < u32 , _TIMER2_BC12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIMER2_BC12 ; # [ doc = "`read()` method returns [timer2_bc12::R](timer2_bc12::R) reader structure" ] impl crate :: Readable for TIMER2_BC12 { } # [ doc = "`write(|w| ..)` method takes [timer2_bc12::W](timer2_bc12::W) writer structure" ] impl crate :: Writable for TIMER2_BC12 { } # [ doc = "TIMER2_BC12 register" ] pub mod timer2_bc12 { # [ doc = "Reader of register TIMER2_BC12" ] pub type R = crate :: R < u32 , super :: TIMER2_BC12 > ; # [ doc = "Writer for register TIMER2_BC12" ] pub type W = crate :: W < u32 , super :: TIMER2_BC12 > ; # [ doc = "Register TIMER2_BC12 `reset()`'s with value 0x0001_0028" ] impl crate :: ResetValue for super :: TIMER2_BC12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_0028 } } # [ doc = "Reader of field `TVDMSRC_ON`" ] pub type TVDMSRC_ON_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TVDMSRC_ON`" ] pub struct TVDMSRC_ON_W < 'a > { w : & 'a mut W , } impl < 'a > TVDMSRC_ON_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } # [ doc = "Reader of field `TWAIT_AFTER_PRD`" ] pub type TWAIT_AFTER_PRD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TWAIT_AFTER_PRD`" ] pub struct TWAIT_AFTER_PRD_W < 'a > { w : & 'a mut W , } impl < 'a > TWAIT_AFTER_PRD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Sets the amount of time (in ms) that the module enables the VDM_SRC. Valid values are 0-40ms." ] # [ inline ( always ) ] pub fn tvdmsrc_on ( & self ) -> TVDMSRC_ON_R { TVDMSRC_ON_R :: new ( ( self . bits & 0x03ff ) as u16 ) } # [ doc = "Bits 16:25 - Sets the amount of time (in ms) that the module waits after primary detection before start to secondary detection" ] # [ inline ( always ) ] pub fn twait_after_prd ( & self ) -> TWAIT_AFTER_PRD_R { TWAIT_AFTER_PRD_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Sets the amount of time (in ms) that the module enables the VDM_SRC. Valid values are 0-40ms." ] # [ inline ( always ) ] pub fn tvdmsrc_on ( & mut self ) -> TVDMSRC_ON_W { TVDMSRC_ON_W { w : self } } # [ doc = "Bits 16:25 - Sets the amount of time (in ms) that the module waits after primary detection before start to secondary detection" ] # [ inline ( always ) ] pub fn twait_after_prd ( & mut self ) -> TWAIT_AFTER_PRD_W { TWAIT_AFTER_PRD_W { w : self } } } } } # [ doc = "Secured Digital Host Controller" ] pub struct SDHC { _marker : PhantomData < * const ( ) > } unsafe impl Send for SDHC { } impl SDHC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const sdhc :: RegisterBlock { 0x400b_1000 as * const _ } } impl Deref for SDHC { type Target = sdhc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SDHC :: ptr ( ) } } } # [ doc = "Secured Digital Host Controller" ] pub mod sdhc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - DMA System Address register" ] pub dsaddr : DSADDR , # [ doc = "0x04 - Block Attributes register" ] pub blkattr : BLKATTR , # [ doc = "0x08 - Command Argument register" ] pub cmdarg : CMDARG , # [ doc = "0x0c - Transfer Type register" ] pub xfertyp : XFERTYP , # [ doc = "0x10 - Command Response 0" ] pub cmdrsp0 : CMDRSP0 , # [ doc = "0x14 - Command Response 1" ] pub cmdrsp1 : CMDRSP1 , # [ doc = "0x18 - Command Response 2" ] pub cmdrsp2 : CMDRSP2 , # [ doc = "0x1c - Command Response 3" ] pub cmdrsp3 : CMDRSP3 , # [ doc = "0x20 - Buffer Data Port register" ] pub datport : DATPORT , # [ doc = "0x24 - Present State register" ] pub prsstat : PRSSTAT , # [ doc = "0x28 - Protocol Control register" ] pub proctl : PROCTL , # [ doc = "0x2c - System Control register" ] pub sysctl : SYSCTL , # [ doc = "0x30 - Interrupt Status register" ] pub irqstat : IRQSTAT , # [ doc = "0x34 - Interrupt Status Enable register" ] pub irqstaten : IRQSTATEN , # [ doc = "0x38 - Interrupt Signal Enable register" ] pub irqsigen : IRQSIGEN , # [ doc = "0x3c - Auto CMD12 Error Status Register" ] pub ac12err : AC12ERR , # [ doc = "0x40 - Host Controller Capabilities" ] pub htcapblt : HTCAPBLT , # [ doc = "0x44 - Watermark Level Register" ] pub wml : WML , _reserved18 : [ u8 ; 8usize ] , # [ doc = "0x50 - Force Event register" ] pub fevt : FEVT , # [ doc = "0x54 - ADMA Error Status register" ] pub admaes : ADMAES , # [ doc = "0x58 - ADMA System Addressregister" ] pub adsaddr : ADSADDR , _reserved21 : [ u8 ; 100usize ] , # [ doc = "0xc0 - Vendor Specific register" ] pub vendor : VENDOR , # [ doc = "0xc4 - MMC Boot register" ] pub mmcboot : MMCBOOT , _reserved23 : [ u8 ; 52usize ] , # [ doc = "0xfc - Host Controller Version" ] pub hostver : HOSTVER , } # [ doc = "DMA System Address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dsaddr](dsaddr) module" ] pub type DSADDR = crate :: Reg < u32 , _DSADDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DSADDR ; # [ doc = "`read()` method returns [dsaddr::R](dsaddr::R) reader structure" ] impl crate :: Readable for DSADDR { } # [ doc = "`write(|w| ..)` method takes [dsaddr::W](dsaddr::W) writer structure" ] impl crate :: Writable for DSADDR { } # [ doc = "DMA System Address register" ] pub mod dsaddr { # [ doc = "Reader of register DSADDR" ] pub type R = crate :: R < u32 , super :: DSADDR > ; # [ doc = "Writer for register DSADDR" ] pub type W = crate :: W < u32 , super :: DSADDR > ; # [ doc = "Register DSADDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DSADDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DSADDR`" ] pub type DSADDR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `DSADDR`" ] pub struct DSADDR_W < 'a > { w : & 'a mut W , } impl < 'a > DSADDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x3fff_ffff << 2 ) ) | ( ( ( value as u32 ) & 0x3fff_ffff ) << 2 ) ; self . w } } impl R { # [ doc = "Bits 2:31 - DMA System Address" ] # [ inline ( always ) ] pub fn dsaddr ( & self ) -> DSADDR_R { DSADDR_R :: new ( ( ( self . bits >> 2 ) & 0x3fff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 2:31 - DMA System Address" ] # [ inline ( always ) ] pub fn dsaddr ( & mut self ) -> DSADDR_W { DSADDR_W { w : self } } } } # [ doc = "Block Attributes register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [blkattr](blkattr) module" ] pub type BLKATTR = crate :: Reg < u32 , _BLKATTR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BLKATTR ; # [ doc = "`read()` method returns [blkattr::R](blkattr::R) reader structure" ] impl crate :: Readable for BLKATTR { } # [ doc = "`write(|w| ..)` method takes [blkattr::W](blkattr::W) writer structure" ] impl crate :: Writable for BLKATTR { } # [ doc = "Block Attributes register" ] pub mod blkattr { # [ doc = "Reader of register BLKATTR" ] pub type R = crate :: R < u32 , super :: BLKATTR > ; # [ doc = "Writer for register BLKATTR" ] pub type W = crate :: W < u32 , super :: BLKATTR > ; # [ doc = "Register BLKATTR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BLKATTR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transfer Block Size\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BLKSIZE_A { # [ doc = "0: No data transfer." ] _0 , # [ doc = "1: 1 Byte" ] _1 , # [ doc = "2: 2 Bytes" ] _10 , # [ doc = "3: 3 Bytes" ] _11 , # [ doc = "4: 4 Bytes" ] _100 , # [ doc = "511: 511 Bytes" ] _111111111 , # [ doc = "512: 512 Bytes" ] _1000000000 , # [ doc = "2048: 2048 Bytes" ] _100000000000 , # [ doc = "4096: 4096 Bytes" ] _1000000000000 } impl From < BLKSIZE_A > for u16 { # [ inline ( always ) ] fn from ( variant : BLKSIZE_A ) -> Self { match variant { BLKSIZE_A :: _0 => 0 , BLKSIZE_A :: _1 => 1 , BLKSIZE_A :: _10 => 2 , BLKSIZE_A :: _11 => 3 , BLKSIZE_A :: _100 => 4 , BLKSIZE_A :: _111111111 => 511 , BLKSIZE_A :: _1000000000 => 512 , BLKSIZE_A :: _100000000000 => 2048 , BLKSIZE_A :: _1000000000000 => 4096 } } } # [ doc = "Reader of field `BLKSIZE`" ] pub type BLKSIZE_R = crate :: R < u16 , BLKSIZE_A > ; impl BLKSIZE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u16 , BLKSIZE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( BLKSIZE_A :: _0 ) , 1 => Val ( BLKSIZE_A :: _1 ) , 2 => Val ( BLKSIZE_A :: _10 ) , 3 => Val ( BLKSIZE_A :: _11 ) , 4 => Val ( BLKSIZE_A :: _100 ) , 511 => Val ( BLKSIZE_A :: _111111111 ) , 512 => Val ( BLKSIZE_A :: _1000000000 ) , 2048 => Val ( BLKSIZE_A :: _100000000000 ) , 4096 => Val ( BLKSIZE_A :: _1000000000000 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BLKSIZE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BLKSIZE_A :: _1 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == BLKSIZE_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == BLKSIZE_A :: _11 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == BLKSIZE_A :: _100 } # [ doc = "Checks if the value of the field is `_111111111`" ] # [ inline ( always ) ] pub fn is_111111111 ( & self ) -> bool { * self == BLKSIZE_A :: _111111111 } # [ doc = "Checks if the value of the field is `_1000000000`" ] # [ inline ( always ) ] pub fn is_1000000000 ( & self ) -> bool { * self == BLKSIZE_A :: _1000000000 } # [ doc = "Checks if the value of the field is `_100000000000`" ] # [ inline ( always ) ] pub fn is_100000000000 ( & self ) -> bool { * self == BLKSIZE_A :: _100000000000 } # [ doc = "Checks if the value of the field is `_1000000000000`" ] # [ inline ( always ) ] pub fn is_1000000000000 ( & self ) -> bool { * self == BLKSIZE_A :: _1000000000000 } } # [ doc = "Write proxy for field `BLKSIZE`" ] pub struct BLKSIZE_W < 'a > { w : & 'a mut W , } impl < 'a > BLKSIZE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BLKSIZE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No data transfer." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _0 ) } # [ doc = "1 Byte" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _1 ) } # [ doc = "2 Bytes" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _10 ) } # [ doc = "3 Bytes" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _11 ) } # [ doc = "4 Bytes" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _100 ) } # [ doc = "511 Bytes" ] # [ inline ( always ) ] pub fn _111111111 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _111111111 ) } # [ doc = "512 Bytes" ] # [ inline ( always ) ] pub fn _1000000000 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _1000000000 ) } # [ doc = "2048 Bytes" ] # [ inline ( always ) ] pub fn _100000000000 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _100000000000 ) } # [ doc = "4096 Bytes" ] # [ inline ( always ) ] pub fn _1000000000000 ( self ) -> & 'a mut W { self . variant ( BLKSIZE_A :: _1000000000000 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x1fff ) | ( ( value as u32 ) & 0x1fff ) ; self . w } } # [ doc = "Blocks Count For Current Transfer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BLKCNT_A { # [ doc = "0: Stop count." ] _0 , # [ doc = "1: 1 block" ] _1 , # [ doc = "2: 2 blocks" ] _10 , # [ doc = "65535: 65535 blocks" ] _1111111111111111 } impl From < BLKCNT_A > for u16 { # [ inline ( always ) ] fn from ( variant : BLKCNT_A ) -> Self { match variant { BLKCNT_A :: _0 => 0 , BLKCNT_A :: _1 => 1 , BLKCNT_A :: _10 => 2 , BLKCNT_A :: _1111111111111111 => 65535 } } } # [ doc = "Reader of field `BLKCNT`" ] pub type BLKCNT_R = crate :: R < u16 , BLKCNT_A > ; impl BLKCNT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u16 , BLKCNT_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( BLKCNT_A :: _0 ) , 1 => Val ( BLKCNT_A :: _1 ) , 2 => Val ( BLKCNT_A :: _10 ) , 65535 => Val ( BLKCNT_A :: _1111111111111111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BLKCNT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BLKCNT_A :: _1 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == BLKCNT_A :: _10 } # [ doc = "Checks if the value of the field is `_1111111111111111`" ] # [ inline ( always ) ] pub fn is_1111111111111111 ( & self ) -> bool { * self == BLKCNT_A :: _1111111111111111 } } # [ doc = "Write proxy for field `BLKCNT`" ] pub struct BLKCNT_W < 'a > { w : & 'a mut W , } impl < 'a > BLKCNT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BLKCNT_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Stop count." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BLKCNT_A :: _0 ) } # [ doc = "1 block" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BLKCNT_A :: _1 ) } # [ doc = "2 blocks" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( BLKCNT_A :: _10 ) } # [ doc = "65535 blocks" ] # [ inline ( always ) ] pub fn _1111111111111111 ( self ) -> & 'a mut W { self . variant ( BLKCNT_A :: _1111111111111111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:12 - Transfer Block Size" ] # [ inline ( always ) ] pub fn blksize ( & self ) -> BLKSIZE_R { BLKSIZE_R :: new ( ( self . bits & 0x1fff ) as u16 ) } # [ doc = "Bits 16:31 - Blocks Count For Current Transfer" ] # [ inline ( always ) ] pub fn blkcnt ( & self ) -> BLKCNT_R { BLKCNT_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:12 - Transfer Block Size" ] # [ inline ( always ) ] pub fn blksize ( & mut self ) -> BLKSIZE_W { BLKSIZE_W { w : self } } # [ doc = "Bits 16:31 - Blocks Count For Current Transfer" ] # [ inline ( always ) ] pub fn blkcnt ( & mut self ) -> BLKCNT_W { BLKCNT_W { w : self } } } } # [ doc = "Command Argument register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmdarg](cmdarg) module" ] pub type CMDARG = crate :: Reg < u32 , _CMDARG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMDARG ; # [ doc = "`read()` method returns [cmdarg::R](cmdarg::R) reader structure" ] impl crate :: Readable for CMDARG { } # [ doc = "`write(|w| ..)` method takes [cmdarg::W](cmdarg::W) writer structure" ] impl crate :: Writable for CMDARG { } # [ doc = "Command Argument register" ] pub mod cmdarg { # [ doc = "Reader of register CMDARG" ] pub type R = crate :: R < u32 , super :: CMDARG > ; # [ doc = "Writer for register CMDARG" ] pub type W = crate :: W < u32 , super :: CMDARG > ; # [ doc = "Register CMDARG `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CMDARG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CMDARG`" ] pub type CMDARG_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `CMDARG`" ] pub struct CMDARG_W < 'a > { w : & 'a mut W , } impl < 'a > CMDARG_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Command Argument" ] # [ inline ( always ) ] pub fn cmdarg ( & self ) -> CMDARG_R { CMDARG_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Command Argument" ] # [ inline ( always ) ] pub fn cmdarg ( & mut self ) -> CMDARG_W { CMDARG_W { w : self } } } } # [ doc = "Transfer Type register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [xfertyp](xfertyp) module" ] pub type XFERTYP = crate :: Reg < u32 , _XFERTYP > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _XFERTYP ; # [ doc = "`read()` method returns [xfertyp::R](xfertyp::R) reader structure" ] impl crate :: Readable for XFERTYP { } # [ doc = "`write(|w| ..)` method takes [xfertyp::W](xfertyp::W) writer structure" ] impl crate :: Writable for XFERTYP { } # [ doc = "Transfer Type register" ] pub mod xfertyp { # [ doc = "Reader of register XFERTYP" ] pub type R = crate :: R < u32 , super :: XFERTYP > ; # [ doc = "Writer for register XFERTYP" ] pub type W = crate :: W < u32 , super :: XFERTYP > ; # [ doc = "Register XFERTYP `reset()`'s with value 0" ] impl crate :: ResetValue for super :: XFERTYP { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Block Count Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCEN_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < BCEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BCEN_A ) -> Self { match variant { BCEN_A :: _0 => false , BCEN_A :: _1 => true } } } # [ doc = "Reader of field `BCEN`" ] pub type BCEN_R = crate :: R < bool , BCEN_A > ; impl BCEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BCEN_A { match self . bits { false => BCEN_A :: _0 , true => BCEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BCEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BCEN_A :: _1 } } # [ doc = "Write proxy for field `BCEN`" ] pub struct BCEN_W < 'a > { w : & 'a mut W , } impl < 'a > BCEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BCEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BCEN_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BCEN_A :: _1 ) } # [ 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 } } # [ doc = "Auto CMD12 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12EN_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < AC12EN_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12EN_A ) -> Self { match variant { AC12EN_A :: _0 => false , AC12EN_A :: _1 => true } } } # [ doc = "Reader of field `AC12EN`" ] pub type AC12EN_R = crate :: R < bool , AC12EN_A > ; impl AC12EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12EN_A { match self . bits { false => AC12EN_A :: _0 , true => AC12EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12EN_A :: _1 } } # [ doc = "Write proxy for field `AC12EN`" ] pub struct AC12EN_W < 'a > { w : & 'a mut W , } impl < 'a > AC12EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AC12EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AC12EN_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AC12EN_A :: _1 ) } # [ 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 = "Data Transfer Direction Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTDSEL_A { # [ doc = "0: Write host to card." ] _0 , # [ doc = "1: Read card to host." ] _1 } impl From < DTDSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : DTDSEL_A ) -> Self { match variant { DTDSEL_A :: _0 => false , DTDSEL_A :: _1 => true } } } # [ doc = "Reader of field `DTDSEL`" ] pub type DTDSEL_R = crate :: R < bool , DTDSEL_A > ; impl DTDSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTDSEL_A { match self . bits { false => DTDSEL_A :: _0 , true => DTDSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTDSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTDSEL_A :: _1 } } # [ doc = "Write proxy for field `DTDSEL`" ] pub struct DTDSEL_W < 'a > { w : & 'a mut W , } impl < 'a > DTDSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTDSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write host to card." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTDSEL_A :: _0 ) } # [ doc = "Read card to host." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTDSEL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Multi/Single Block Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSBSEL_A { # [ doc = "0: Single block." ] _0 , # [ doc = "1: Multiple blocks." ] _1 } impl From < MSBSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : MSBSEL_A ) -> Self { match variant { MSBSEL_A :: _0 => false , MSBSEL_A :: _1 => true } } } # [ doc = "Reader of field `MSBSEL`" ] pub type MSBSEL_R = crate :: R < bool , MSBSEL_A > ; impl MSBSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSBSEL_A { match self . bits { false => MSBSEL_A :: _0 , true => MSBSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSBSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSBSEL_A :: _1 } } # [ doc = "Write proxy for field `MSBSEL`" ] pub struct MSBSEL_W < 'a > { w : & 'a mut W , } impl < 'a > MSBSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSBSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Single block." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSBSEL_A :: _0 ) } # [ doc = "Multiple blocks." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSBSEL_A :: _1 ) } # [ 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 = "Response Type Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSPTYP_A { # [ doc = "0: No response." ] _00 , # [ doc = "1: Response length 136." ] _01 , # [ doc = "2: Response length 48." ] _10 , # [ doc = "3: Response length 48, check busy after response." ] _11 } impl From < RSPTYP_A > for u8 { # [ inline ( always ) ] fn from ( variant : RSPTYP_A ) -> Self { match variant { RSPTYP_A :: _00 => 0 , RSPTYP_A :: _01 => 1 , RSPTYP_A :: _10 => 2 , RSPTYP_A :: _11 => 3 } } } # [ doc = "Reader of field `RSPTYP`" ] pub type RSPTYP_R = crate :: R < u8 , RSPTYP_A > ; impl RSPTYP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSPTYP_A { match self . bits { 0 => RSPTYP_A :: _00 , 1 => RSPTYP_A :: _01 , 2 => RSPTYP_A :: _10 , 3 => RSPTYP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RSPTYP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == RSPTYP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == RSPTYP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == RSPTYP_A :: _11 } } # [ doc = "Write proxy for field `RSPTYP`" ] pub struct RSPTYP_W < 'a > { w : & 'a mut W , } impl < 'a > RSPTYP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSPTYP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No response." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RSPTYP_A :: _00 ) } # [ doc = "Response length 136." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( RSPTYP_A :: _01 ) } # [ doc = "Response length 48." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( RSPTYP_A :: _10 ) } # [ doc = "Response length 48, check busy after response." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( RSPTYP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "Command CRC Check Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCCEN_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < CCCEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CCCEN_A ) -> Self { match variant { CCCEN_A :: _0 => false , CCCEN_A :: _1 => true } } } # [ doc = "Reader of field `CCCEN`" ] pub type CCCEN_R = crate :: R < bool , CCCEN_A > ; impl CCCEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCCEN_A { match self . bits { false => CCCEN_A :: _0 , true => CCCEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCCEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCCEN_A :: _1 } } # [ doc = "Write proxy for field `CCCEN`" ] pub struct CCCEN_W < 'a > { w : & 'a mut W , } impl < 'a > CCCEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CCCEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CCCEN_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CCCEN_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Command Index Check Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CICEN_A { # [ doc = "0: Disable" ] _0 , # [ doc = "1: Enable" ] _1 } impl From < CICEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CICEN_A ) -> Self { match variant { CICEN_A :: _0 => false , CICEN_A :: _1 => true } } } # [ doc = "Reader of field `CICEN`" ] pub type CICEN_R = crate :: R < bool , CICEN_A > ; impl CICEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CICEN_A { match self . bits { false => CICEN_A :: _0 , true => CICEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CICEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CICEN_A :: _1 } } # [ doc = "Write proxy for field `CICEN`" ] pub struct CICEN_W < 'a > { w : & 'a mut W , } impl < 'a > CICEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CICEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CICEN_A :: _0 ) } # [ doc = "Enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CICEN_A :: _1 ) } # [ 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 = "Data Present Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPSEL_A { # [ doc = "0: No data present." ] _0 , # [ doc = "1: Data present." ] _1 } impl From < DPSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : DPSEL_A ) -> Self { match variant { DPSEL_A :: _0 => false , DPSEL_A :: _1 => true } } } # [ doc = "Reader of field `DPSEL`" ] pub type DPSEL_R = crate :: R < bool , DPSEL_A > ; impl DPSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPSEL_A { match self . bits { false => DPSEL_A :: _0 , true => DPSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPSEL_A :: _1 } } # [ doc = "Write proxy for field `DPSEL`" ] pub struct DPSEL_W < 'a > { w : & 'a mut W , } impl < 'a > DPSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No data present." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPSEL_A :: _0 ) } # [ doc = "Data present." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPSEL_A :: _1 ) } # [ 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 = "Command Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CMDTYP_A { # [ doc = "0: Normal other commands." ] _00 , # [ doc = "1: Suspend CMD52 for writing bus suspend in CCCR." ] _01 , # [ doc = "2: Resume CMD52 for writing function select in CCCR." ] _10 , # [ doc = "3: Abort CMD12, CMD52 for writing I/O abort in CCCR." ] _11 } impl From < CMDTYP_A > for u8 { # [ inline ( always ) ] fn from ( variant : CMDTYP_A ) -> Self { match variant { CMDTYP_A :: _00 => 0 , CMDTYP_A :: _01 => 1 , CMDTYP_A :: _10 => 2 , CMDTYP_A :: _11 => 3 } } } # [ doc = "Reader of field `CMDTYP`" ] pub type CMDTYP_R = crate :: R < u8 , CMDTYP_A > ; impl CMDTYP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CMDTYP_A { match self . bits { 0 => CMDTYP_A :: _00 , 1 => CMDTYP_A :: _01 , 2 => CMDTYP_A :: _10 , 3 => CMDTYP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CMDTYP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CMDTYP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CMDTYP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CMDTYP_A :: _11 } } # [ doc = "Write proxy for field `CMDTYP`" ] pub struct CMDTYP_W < 'a > { w : & 'a mut W , } impl < 'a > CMDTYP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CMDTYP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Normal other commands." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CMDTYP_A :: _00 ) } # [ doc = "Suspend CMD52 for writing bus suspend in CCCR." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CMDTYP_A :: _01 ) } # [ doc = "Resume CMD52 for writing function select in CCCR." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CMDTYP_A :: _10 ) } # [ doc = "Abort CMD12, CMD52 for writing I/O abort in CCCR." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CMDTYP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } # [ doc = "Reader of field `CMDINX`" ] pub type CMDINX_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CMDINX`" ] pub struct CMDINX_W < 'a > { w : & 'a mut W , } impl < 'a > CMDINX_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 & ! ( 0x3f << 24 ) ) | ( ( ( value as u32 ) & 0x3f ) << 24 ) ; self . w } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Block Count Enable" ] # [ inline ( always ) ] pub fn bcen ( & self ) -> BCEN_R { BCEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Auto CMD12 Enable" ] # [ inline ( always ) ] pub fn ac12en ( & self ) -> AC12EN_R { AC12EN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Data Transfer Direction Select" ] # [ inline ( always ) ] pub fn dtdsel ( & self ) -> DTDSEL_R { DTDSEL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Multi/Single Block Select" ] # [ inline ( always ) ] pub fn msbsel ( & self ) -> MSBSEL_R { MSBSEL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:17 - Response Type Select" ] # [ inline ( always ) ] pub fn rsptyp ( & self ) -> RSPTYP_R { RSPTYP_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bit 19 - Command CRC Check Enable" ] # [ inline ( always ) ] pub fn cccen ( & self ) -> CCCEN_R { CCCEN_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Command Index Check Enable" ] # [ inline ( always ) ] pub fn cicen ( & self ) -> CICEN_R { CICEN_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Data Present Select" ] # [ inline ( always ) ] pub fn dpsel ( & self ) -> DPSEL_R { DPSEL_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bits 22:23 - Command Type" ] # [ inline ( always ) ] pub fn cmdtyp ( & self ) -> CMDTYP_R { CMDTYP_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } # [ doc = "Bits 24:29 - Command Index" ] # [ inline ( always ) ] pub fn cmdinx ( & self ) -> CMDINX_R { CMDINX_R :: new ( ( ( self . bits >> 24 ) & 0x3f ) as u8 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } # [ doc = "Bit 1 - Block Count Enable" ] # [ inline ( always ) ] pub fn bcen ( & mut self ) -> BCEN_W { BCEN_W { w : self } } # [ doc = "Bit 2 - Auto CMD12 Enable" ] # [ inline ( always ) ] pub fn ac12en ( & mut self ) -> AC12EN_W { AC12EN_W { w : self } } # [ doc = "Bit 4 - Data Transfer Direction Select" ] # [ inline ( always ) ] pub fn dtdsel ( & mut self ) -> DTDSEL_W { DTDSEL_W { w : self } } # [ doc = "Bit 5 - Multi/Single Block Select" ] # [ inline ( always ) ] pub fn msbsel ( & mut self ) -> MSBSEL_W { MSBSEL_W { w : self } } # [ doc = "Bits 16:17 - Response Type Select" ] # [ inline ( always ) ] pub fn rsptyp ( & mut self ) -> RSPTYP_W { RSPTYP_W { w : self } } # [ doc = "Bit 19 - Command CRC Check Enable" ] # [ inline ( always ) ] pub fn cccen ( & mut self ) -> CCCEN_W { CCCEN_W { w : self } } # [ doc = "Bit 20 - Command Index Check Enable" ] # [ inline ( always ) ] pub fn cicen ( & mut self ) -> CICEN_W { CICEN_W { w : self } } # [ doc = "Bit 21 - Data Present Select" ] # [ inline ( always ) ] pub fn dpsel ( & mut self ) -> DPSEL_W { DPSEL_W { w : self } } # [ doc = "Bits 22:23 - Command Type" ] # [ inline ( always ) ] pub fn cmdtyp ( & mut self ) -> CMDTYP_W { CMDTYP_W { w : self } } # [ doc = "Bits 24:29 - Command Index" ] # [ inline ( always ) ] pub fn cmdinx ( & mut self ) -> CMDINX_W { CMDINX_W { w : self } } } } # [ doc = "Command Response 0\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmdrsp0](cmdrsp0) module" ] pub type CMDRSP0 = crate :: Reg < u32 , _CMDRSP0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMDRSP0 ; # [ doc = "`read()` method returns [cmdrsp0::R](cmdrsp0::R) reader structure" ] impl crate :: Readable for CMDRSP0 { } # [ doc = "Command Response 0" ] pub mod cmdrsp0 { # [ doc = "Reader of register CMDRSP0" ] pub type R = crate :: R < u32 , super :: CMDRSP0 > ; # [ doc = "Reader of field `CMDRSP0`" ] pub type CMDRSP0_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Command Response 0" ] # [ inline ( always ) ] pub fn cmdrsp0 ( & self ) -> CMDRSP0_R { CMDRSP0_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Command Response 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmdrsp1](cmdrsp1) module" ] pub type CMDRSP1 = crate :: Reg < u32 , _CMDRSP1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMDRSP1 ; # [ doc = "`read()` method returns [cmdrsp1::R](cmdrsp1::R) reader structure" ] impl crate :: Readable for CMDRSP1 { } # [ doc = "Command Response 1" ] pub mod cmdrsp1 { # [ doc = "Reader of register CMDRSP1" ] pub type R = crate :: R < u32 , super :: CMDRSP1 > ; # [ doc = "Reader of field `CMDRSP1`" ] pub type CMDRSP1_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Command Response 1" ] # [ inline ( always ) ] pub fn cmdrsp1 ( & self ) -> CMDRSP1_R { CMDRSP1_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Command Response 2\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmdrsp2](cmdrsp2) module" ] pub type CMDRSP2 = crate :: Reg < u32 , _CMDRSP2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMDRSP2 ; # [ doc = "`read()` method returns [cmdrsp2::R](cmdrsp2::R) reader structure" ] impl crate :: Readable for CMDRSP2 { } # [ doc = "Command Response 2" ] pub mod cmdrsp2 { # [ doc = "Reader of register CMDRSP2" ] pub type R = crate :: R < u32 , super :: CMDRSP2 > ; # [ doc = "Reader of field `CMDRSP2`" ] pub type CMDRSP2_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Command Response 2" ] # [ inline ( always ) ] pub fn cmdrsp2 ( & self ) -> CMDRSP2_R { CMDRSP2_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Command Response 3\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cmdrsp3](cmdrsp3) module" ] pub type CMDRSP3 = crate :: Reg < u32 , _CMDRSP3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CMDRSP3 ; # [ doc = "`read()` method returns [cmdrsp3::R](cmdrsp3::R) reader structure" ] impl crate :: Readable for CMDRSP3 { } # [ doc = "Command Response 3" ] pub mod cmdrsp3 { # [ doc = "Reader of register CMDRSP3" ] pub type R = crate :: R < u32 , super :: CMDRSP3 > ; # [ doc = "Reader of field `CMDRSP3`" ] pub type CMDRSP3_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Command Response 3" ] # [ inline ( always ) ] pub fn cmdrsp3 ( & self ) -> CMDRSP3_R { CMDRSP3_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Buffer Data Port register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datport](datport) module" ] pub type DATPORT = crate :: Reg < u32 , _DATPORT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATPORT ; # [ doc = "`read()` method returns [datport::R](datport::R) reader structure" ] impl crate :: Readable for DATPORT { } # [ doc = "`write(|w| ..)` method takes [datport::W](datport::W) writer structure" ] impl crate :: Writable for DATPORT { } # [ doc = "Buffer Data Port register" ] pub mod datport { # [ doc = "Reader of register DATPORT" ] pub type R = crate :: R < u32 , super :: DATPORT > ; # [ doc = "Writer for register DATPORT" ] pub type W = crate :: W < u32 , super :: DATPORT > ; # [ doc = "Register DATPORT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATPORT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATCONT`" ] pub type DATCONT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `DATCONT`" ] pub struct DATCONT_W < 'a > { w : & 'a mut W , } impl < 'a > DATCONT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Data Content" ] # [ inline ( always ) ] pub fn datcont ( & self ) -> DATCONT_R { DATCONT_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Data Content" ] # [ inline ( always ) ] pub fn datcont ( & mut self ) -> DATCONT_W { DATCONT_W { w : self } } } } # [ doc = "Present State register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [prsstat](prsstat) module" ] pub type PRSSTAT = crate :: Reg < u32 , _PRSSTAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PRSSTAT ; # [ doc = "`read()` method returns [prsstat::R](prsstat::R) reader structure" ] impl crate :: Readable for PRSSTAT { } # [ doc = "Present State register" ] pub mod prsstat { # [ doc = "Reader of register PRSSTAT" ] pub type R = crate :: R < u32 , super :: PRSSTAT > ; # [ doc = "Command Inhibit (CMD)\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CIHB_A { # [ doc = "0: Can issue command using only CMD line." ] _0 , # [ doc = "1: Cannot issue command." ] _1 } impl From < CIHB_A > for bool { # [ inline ( always ) ] fn from ( variant : CIHB_A ) -> Self { match variant { CIHB_A :: _0 => false , CIHB_A :: _1 => true } } } # [ doc = "Reader of field `CIHB`" ] pub type CIHB_R = crate :: R < bool , CIHB_A > ; impl CIHB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CIHB_A { match self . bits { false => CIHB_A :: _0 , true => CIHB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CIHB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CIHB_A :: _1 } } # [ doc = "Command Inhibit (DAT)\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CDIHB_A { # [ doc = "0: Can issue command which uses the DAT line." ] _0 , # [ doc = "1: Cannot issue command which uses the DAT line." ] _1 } impl From < CDIHB_A > for bool { # [ inline ( always ) ] fn from ( variant : CDIHB_A ) -> Self { match variant { CDIHB_A :: _0 => false , CDIHB_A :: _1 => true } } } # [ doc = "Reader of field `CDIHB`" ] pub type CDIHB_R = crate :: R < bool , CDIHB_A > ; impl CDIHB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CDIHB_A { match self . bits { false => CDIHB_A :: _0 , true => CDIHB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CDIHB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CDIHB_A :: _1 } } # [ doc = "Data Line Active\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DLA_A { # [ doc = "0: DAT line inactive." ] _0 , # [ doc = "1: DAT line active." ] _1 } impl From < DLA_A > for bool { # [ inline ( always ) ] fn from ( variant : DLA_A ) -> Self { match variant { DLA_A :: _0 => false , DLA_A :: _1 => true } } } # [ doc = "Reader of field `DLA`" ] pub type DLA_R = crate :: R < bool , DLA_A > ; impl DLA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DLA_A { match self . bits { false => DLA_A :: _0 , true => DLA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DLA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DLA_A :: _1 } } # [ doc = "SD Clock Stable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SDSTB_A { # [ doc = "0: Clock is changing frequency and not stable." ] _0 , # [ doc = "1: Clock is stable." ] _1 } impl From < SDSTB_A > for bool { # [ inline ( always ) ] fn from ( variant : SDSTB_A ) -> Self { match variant { SDSTB_A :: _0 => false , SDSTB_A :: _1 => true } } } # [ doc = "Reader of field `SDSTB`" ] pub type SDSTB_R = crate :: R < bool , SDSTB_A > ; impl SDSTB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SDSTB_A { match self . bits { false => SDSTB_A :: _0 , true => SDSTB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SDSTB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SDSTB_A :: _1 } } # [ doc = "Bus Clock Gated Off Internally\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IPGOFF_A { # [ doc = "0: Bus clock is active." ] _0 , # [ doc = "1: Bus clock is gated off." ] _1 } impl From < IPGOFF_A > for bool { # [ inline ( always ) ] fn from ( variant : IPGOFF_A ) -> Self { match variant { IPGOFF_A :: _0 => false , IPGOFF_A :: _1 => true } } } # [ doc = "Reader of field `IPGOFF`" ] pub type IPGOFF_R = crate :: R < bool , IPGOFF_A > ; impl IPGOFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IPGOFF_A { match self . bits { false => IPGOFF_A :: _0 , true => IPGOFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IPGOFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IPGOFF_A :: _1 } } # [ doc = "System Clock Gated Off Internally\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HCKOFF_A { # [ doc = "0: System clock is active." ] _0 , # [ doc = "1: System clock is gated off." ] _1 } impl From < HCKOFF_A > for bool { # [ inline ( always ) ] fn from ( variant : HCKOFF_A ) -> Self { match variant { HCKOFF_A :: _0 => false , HCKOFF_A :: _1 => true } } } # [ doc = "Reader of field `HCKOFF`" ] pub type HCKOFF_R = crate :: R < bool , HCKOFF_A > ; impl HCKOFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HCKOFF_A { match self . bits { false => HCKOFF_A :: _0 , true => HCKOFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HCKOFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HCKOFF_A :: _1 } } # [ doc = "SDHC clock Gated Off Internally\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEROFF_A { # [ doc = "0: SDHC clock is active." ] _0 , # [ doc = "1: SDHC clock is gated off." ] _1 } impl From < PEROFF_A > for bool { # [ inline ( always ) ] fn from ( variant : PEROFF_A ) -> Self { match variant { PEROFF_A :: _0 => false , PEROFF_A :: _1 => true } } } # [ doc = "Reader of field `PEROFF`" ] pub type PEROFF_R = crate :: R < bool , PEROFF_A > ; impl PEROFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEROFF_A { match self . bits { false => PEROFF_A :: _0 , true => PEROFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEROFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEROFF_A :: _1 } } # [ doc = "SD Clock Gated Off Internally\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SDOFF_A { # [ doc = "0: SD clock is active." ] _0 , # [ doc = "1: SD clock is gated off." ] _1 } impl From < SDOFF_A > for bool { # [ inline ( always ) ] fn from ( variant : SDOFF_A ) -> Self { match variant { SDOFF_A :: _0 => false , SDOFF_A :: _1 => true } } } # [ doc = "Reader of field `SDOFF`" ] pub type SDOFF_R = crate :: R < bool , SDOFF_A > ; impl SDOFF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SDOFF_A { match self . bits { false => SDOFF_A :: _0 , true => SDOFF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SDOFF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SDOFF_A :: _1 } } # [ doc = "Write Transfer Active\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WTA_A { # [ doc = "0: No valid data." ] _0 , # [ doc = "1: Transferring data." ] _1 } impl From < WTA_A > for bool { # [ inline ( always ) ] fn from ( variant : WTA_A ) -> Self { match variant { WTA_A :: _0 => false , WTA_A :: _1 => true } } } # [ doc = "Reader of field `WTA`" ] pub type WTA_R = crate :: R < bool , WTA_A > ; impl WTA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WTA_A { match self . bits { false => WTA_A :: _0 , true => WTA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WTA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WTA_A :: _1 } } # [ doc = "Read Transfer Active\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RTA_A { # [ doc = "0: No valid data." ] _0 , # [ doc = "1: Transferring data." ] _1 } impl From < RTA_A > for bool { # [ inline ( always ) ] fn from ( variant : RTA_A ) -> Self { match variant { RTA_A :: _0 => false , RTA_A :: _1 => true } } } # [ doc = "Reader of field `RTA`" ] pub type RTA_R = crate :: R < bool , RTA_A > ; impl RTA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RTA_A { match self . bits { false => RTA_A :: _0 , true => RTA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RTA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RTA_A :: _1 } } # [ doc = "Buffer Write Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BWEN_A { # [ doc = "0: Write disable, the buffer can hold valid data less than the write watermark level." ] _0 , # [ doc = "1: Write enable, the buffer can hold valid data greater than the write watermark level." ] _1 } impl From < BWEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BWEN_A ) -> Self { match variant { BWEN_A :: _0 => false , BWEN_A :: _1 => true } } } # [ doc = "Reader of field `BWEN`" ] pub type BWEN_R = crate :: R < bool , BWEN_A > ; impl BWEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BWEN_A { match self . bits { false => BWEN_A :: _0 , true => BWEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BWEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BWEN_A :: _1 } } # [ doc = "Buffer Read Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BREN_A { # [ doc = "0: Read disable, valid data less than the watermark level exist in the buffer." ] _0 , # [ doc = "1: Read enable, valid data greater than the watermark level exist in the buffer." ] _1 } impl From < BREN_A > for bool { # [ inline ( always ) ] fn from ( variant : BREN_A ) -> Self { match variant { BREN_A :: _0 => false , BREN_A :: _1 => true } } } # [ doc = "Reader of field `BREN`" ] pub type BREN_R = crate :: R < bool , BREN_A > ; impl BREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BREN_A { match self . bits { false => BREN_A :: _0 , true => BREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BREN_A :: _1 } } # [ doc = "Card Inserted\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CINS_A { # [ doc = "0: Power on reset or no card." ] _0 , # [ doc = "1: Card inserted." ] _1 } impl From < CINS_A > for bool { # [ inline ( always ) ] fn from ( variant : CINS_A ) -> Self { match variant { CINS_A :: _0 => false , CINS_A :: _1 => true } } } # [ doc = "Reader of field `CINS`" ] pub type CINS_R = crate :: R < bool , CINS_A > ; impl CINS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CINS_A { match self . bits { false => CINS_A :: _0 , true => CINS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CINS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CINS_A :: _1 } } # [ doc = "Reader of field `CLSL`" ] pub type CLSL_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `DLSL`" ] pub type DLSL_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 0 - Command Inhibit (CMD)" ] # [ inline ( always ) ] pub fn cihb ( & self ) -> CIHB_R { CIHB_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Command Inhibit (DAT)" ] # [ inline ( always ) ] pub fn cdihb ( & self ) -> CDIHB_R { CDIHB_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Data Line Active" ] # [ inline ( always ) ] pub fn dla ( & self ) -> DLA_R { DLA_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - SD Clock Stable" ] # [ inline ( always ) ] pub fn sdstb ( & self ) -> SDSTB_R { SDSTB_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Bus Clock Gated Off Internally" ] # [ inline ( always ) ] pub fn ipgoff ( & self ) -> IPGOFF_R { IPGOFF_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - System Clock Gated Off Internally" ] # [ inline ( always ) ] pub fn hckoff ( & self ) -> HCKOFF_R { HCKOFF_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - SDHC clock Gated Off Internally" ] # [ inline ( always ) ] pub fn peroff ( & self ) -> PEROFF_R { PEROFF_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - SD Clock Gated Off Internally" ] # [ inline ( always ) ] pub fn sdoff ( & self ) -> SDOFF_R { SDOFF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Write Transfer Active" ] # [ inline ( always ) ] pub fn wta ( & self ) -> WTA_R { WTA_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Read Transfer Active" ] # [ inline ( always ) ] pub fn rta ( & self ) -> RTA_R { RTA_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Buffer Write Enable" ] # [ inline ( always ) ] pub fn bwen ( & self ) -> BWEN_R { BWEN_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Buffer Read Enable" ] # [ inline ( always ) ] pub fn bren ( & self ) -> BREN_R { BREN_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Card Inserted" ] # [ inline ( always ) ] pub fn cins ( & self ) -> CINS_R { CINS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - CMD Line Signal Level" ] # [ inline ( always ) ] pub fn clsl ( & self ) -> CLSL_R { CLSL_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:31 - DAT Line Signal Level" ] # [ inline ( always ) ] pub fn dlsl ( & self ) -> DLSL_R { DLSL_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } } # [ doc = "Protocol Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [proctl](proctl) module" ] pub type PROCTL = crate :: Reg < u32 , _PROCTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PROCTL ; # [ doc = "`read()` method returns [proctl::R](proctl::R) reader structure" ] impl crate :: Readable for PROCTL { } # [ doc = "`write(|w| ..)` method takes [proctl::W](proctl::W) writer structure" ] impl crate :: Writable for PROCTL { } # [ doc = "Protocol Control register" ] pub mod proctl { # [ doc = "Reader of register PROCTL" ] pub type R = crate :: R < u32 , super :: PROCTL > ; # [ doc = "Writer for register PROCTL" ] pub type W = crate :: W < u32 , super :: PROCTL > ; # [ doc = "Register PROCTL `reset()`'s with value 0x20" ] impl crate :: ResetValue for super :: PROCTL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x20 } } # [ doc = "LED Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LCTL_A { # [ doc = "0: LED off." ] _0 , # [ doc = "1: LED on." ] _1 } impl From < LCTL_A > for bool { # [ inline ( always ) ] fn from ( variant : LCTL_A ) -> Self { match variant { LCTL_A :: _0 => false , LCTL_A :: _1 => true } } } # [ doc = "Reader of field `LCTL`" ] pub type LCTL_R = crate :: R < bool , LCTL_A > ; impl LCTL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LCTL_A { match self . bits { false => LCTL_A :: _0 , true => LCTL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LCTL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LCTL_A :: _1 } } # [ doc = "Write proxy for field `LCTL`" ] pub struct LCTL_W < 'a > { w : & 'a mut W , } impl < 'a > LCTL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LCTL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LED off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LCTL_A :: _0 ) } # [ doc = "LED on." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LCTL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Data Transfer Width\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTW_A { # [ doc = "0: 1-bit mode" ] _00 , # [ doc = "1: 4-bit mode" ] _01 , # [ doc = "2: 8-bit mode" ] _10 } impl From < DTW_A > for u8 { # [ inline ( always ) ] fn from ( variant : DTW_A ) -> Self { match variant { DTW_A :: _00 => 0 , DTW_A :: _01 => 1 , DTW_A :: _10 => 2 } } } # [ doc = "Reader of field `DTW`" ] pub type DTW_R = crate :: R < u8 , DTW_A > ; impl DTW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DTW_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DTW_A :: _00 ) , 1 => Val ( DTW_A :: _01 ) , 2 => Val ( DTW_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DTW_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == DTW_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DTW_A :: _10 } } # [ doc = "Write proxy for field `DTW`" ] pub struct DTW_W < 'a > { w : & 'a mut W , } impl < 'a > DTW_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTW_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "1-bit mode" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DTW_A :: _00 ) } # [ doc = "4-bit mode" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( DTW_A :: _01 ) } # [ doc = "8-bit mode" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DTW_A :: _10 ) } # [ 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 << 1 ) ) | ( ( ( value as u32 ) & 0x03 ) << 1 ) ; self . w } } # [ doc = "DAT3 As Card Detection Pin\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum D3CD_A { # [ doc = "0: DAT3 does not monitor card Insertion." ] _0 , # [ doc = "1: DAT3 as card detection pin." ] _1 } impl From < D3CD_A > for bool { # [ inline ( always ) ] fn from ( variant : D3CD_A ) -> Self { match variant { D3CD_A :: _0 => false , D3CD_A :: _1 => true } } } # [ doc = "Reader of field `D3CD`" ] pub type D3CD_R = crate :: R < bool , D3CD_A > ; impl D3CD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> D3CD_A { match self . bits { false => D3CD_A :: _0 , true => D3CD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == D3CD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == D3CD_A :: _1 } } # [ doc = "Write proxy for field `D3CD`" ] pub struct D3CD_W < 'a > { w : & 'a mut W , } impl < 'a > D3CD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : D3CD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DAT3 does not monitor card Insertion." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( D3CD_A :: _0 ) } # [ doc = "DAT3 as card detection pin." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( D3CD_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Endian Mode\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EMODE_A { # [ doc = "0: Big endian mode" ] _00 , # [ doc = "1: Half word big endian mode" ] _01 , # [ doc = "2: Little endian mode" ] _10 } impl From < EMODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : EMODE_A ) -> Self { match variant { EMODE_A :: _00 => 0 , EMODE_A :: _01 => 1 , EMODE_A :: _10 => 2 } } } # [ doc = "Reader of field `EMODE`" ] pub type EMODE_R = crate :: R < u8 , EMODE_A > ; impl EMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , EMODE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( EMODE_A :: _00 ) , 1 => Val ( EMODE_A :: _01 ) , 2 => Val ( EMODE_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == EMODE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == EMODE_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == EMODE_A :: _10 } } # [ doc = "Write proxy for field `EMODE`" ] pub struct EMODE_W < 'a > { w : & 'a mut W , } impl < 'a > EMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EMODE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Big endian mode" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( EMODE_A :: _00 ) } # [ doc = "Half word big endian mode" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( EMODE_A :: _01 ) } # [ doc = "Little endian mode" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( EMODE_A :: _10 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Card Detect Test Level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CDTL_A { # [ doc = "0: Card detect test level is 0, no card inserted." ] _0 , # [ doc = "1: Card detect test level is 1, card inserted." ] _1 } impl From < CDTL_A > for bool { # [ inline ( always ) ] fn from ( variant : CDTL_A ) -> Self { match variant { CDTL_A :: _0 => false , CDTL_A :: _1 => true } } } # [ doc = "Reader of field `CDTL`" ] pub type CDTL_R = crate :: R < bool , CDTL_A > ; impl CDTL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CDTL_A { match self . bits { false => CDTL_A :: _0 , true => CDTL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CDTL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CDTL_A :: _1 } } # [ doc = "Write proxy for field `CDTL`" ] pub struct CDTL_W < 'a > { w : & 'a mut W , } impl < 'a > CDTL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CDTL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Card detect test level is 0, no card inserted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CDTL_A :: _0 ) } # [ doc = "Card detect test level is 1, card inserted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CDTL_A :: _1 ) } # [ 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 = "Card Detect Signal Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CDSS_A { # [ doc = "0: Card detection level is selected for normal purpose." ] _0 , # [ doc = "1: Card detection test level is selected for test purpose." ] _1 } impl From < CDSS_A > for bool { # [ inline ( always ) ] fn from ( variant : CDSS_A ) -> Self { match variant { CDSS_A :: _0 => false , CDSS_A :: _1 => true } } } # [ doc = "Reader of field `CDSS`" ] pub type CDSS_R = crate :: R < bool , CDSS_A > ; impl CDSS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CDSS_A { match self . bits { false => CDSS_A :: _0 , true => CDSS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CDSS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CDSS_A :: _1 } } # [ doc = "Write proxy for field `CDSS`" ] pub struct CDSS_W < 'a > { w : & 'a mut W , } impl < 'a > CDSS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CDSS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Card detection level is selected for normal purpose." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CDSS_A :: _0 ) } # [ doc = "Card detection test level is selected for test purpose." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CDSS_A :: _1 ) } # [ 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 = "DMA Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAS_A { # [ doc = "0: No DMA or simple DMA is selected." ] _00 , # [ doc = "1: ADMA1 is selected." ] _01 , # [ doc = "2: ADMA2 is selected." ] _10 } impl From < DMAS_A > for u8 { # [ inline ( always ) ] fn from ( variant : DMAS_A ) -> Self { match variant { DMAS_A :: _00 => 0 , DMAS_A :: _01 => 1 , DMAS_A :: _10 => 2 } } } # [ doc = "Reader of field `DMAS`" ] pub type DMAS_R = crate :: R < u8 , DMAS_A > ; impl DMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DMAS_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DMAS_A :: _00 ) , 1 => Val ( DMAS_A :: _01 ) , 2 => Val ( DMAS_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DMAS_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == DMAS_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DMAS_A :: _10 } } # [ doc = "Write proxy for field `DMAS`" ] pub struct DMAS_W < 'a > { w : & 'a mut W , } impl < 'a > DMAS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "No DMA or simple DMA is selected." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DMAS_A :: _00 ) } # [ doc = "ADMA1 is selected." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( DMAS_A :: _01 ) } # [ doc = "ADMA2 is selected." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DMAS_A :: _10 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "Stop At Block Gap Request\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SABGREQ_A { # [ doc = "0: Transfer" ] _0 , # [ doc = "1: Stop" ] _1 } impl From < SABGREQ_A > for bool { # [ inline ( always ) ] fn from ( variant : SABGREQ_A ) -> Self { match variant { SABGREQ_A :: _0 => false , SABGREQ_A :: _1 => true } } } # [ doc = "Reader of field `SABGREQ`" ] pub type SABGREQ_R = crate :: R < bool , SABGREQ_A > ; impl SABGREQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SABGREQ_A { match self . bits { false => SABGREQ_A :: _0 , true => SABGREQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SABGREQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SABGREQ_A :: _1 } } # [ doc = "Write proxy for field `SABGREQ`" ] pub struct SABGREQ_W < 'a > { w : & 'a mut W , } impl < 'a > SABGREQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SABGREQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transfer" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SABGREQ_A :: _0 ) } # [ doc = "Stop" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SABGREQ_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Continue Request\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CREQ_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: Restart" ] _1 } impl From < CREQ_A > for bool { # [ inline ( always ) ] fn from ( variant : CREQ_A ) -> Self { match variant { CREQ_A :: _0 => false , CREQ_A :: _1 => true } } } # [ doc = "Reader of field `CREQ`" ] pub type CREQ_R = crate :: R < bool , CREQ_A > ; impl CREQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CREQ_A { match self . bits { false => CREQ_A :: _0 , true => CREQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CREQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CREQ_A :: _1 } } # [ doc = "Write proxy for field `CREQ`" ] pub struct CREQ_W < 'a > { w : & 'a mut W , } impl < 'a > CREQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CREQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CREQ_A :: _0 ) } # [ doc = "Restart" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CREQ_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Read Wait Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWCTL_A { # [ doc = "0: Disable read wait control, and stop SD clock at block gap when SABGREQ is set." ] _0 , # [ doc = "1: Enable read wait control, and assert read wait without stopping SD clock at block gap when SABGREQ bit is set." ] _1 } impl From < RWCTL_A > for bool { # [ inline ( always ) ] fn from ( variant : RWCTL_A ) -> Self { match variant { RWCTL_A :: _0 => false , RWCTL_A :: _1 => true } } } # [ doc = "Reader of field `RWCTL`" ] pub type RWCTL_R = crate :: R < bool , RWCTL_A > ; impl RWCTL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWCTL_A { match self . bits { false => RWCTL_A :: _0 , true => RWCTL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWCTL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWCTL_A :: _1 } } # [ doc = "Write proxy for field `RWCTL`" ] pub struct RWCTL_W < 'a > { w : & 'a mut W , } impl < 'a > RWCTL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWCTL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable read wait control, and stop SD clock at block gap when SABGREQ is set." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWCTL_A :: _0 ) } # [ doc = "Enable read wait control, and assert read wait without stopping SD clock at block gap when SABGREQ bit is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWCTL_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Interrupt At Block Gap\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IABG_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < IABG_A > for bool { # [ inline ( always ) ] fn from ( variant : IABG_A ) -> Self { match variant { IABG_A :: _0 => false , IABG_A :: _1 => true } } } # [ doc = "Reader of field `IABG`" ] pub type IABG_R = crate :: R < bool , IABG_A > ; impl IABG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IABG_A { match self . bits { false => IABG_A :: _0 , true => IABG_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IABG_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IABG_A :: _1 } } # [ doc = "Write proxy for field `IABG`" ] pub struct IABG_W < 'a > { w : & 'a mut W , } impl < 'a > IABG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IABG_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IABG_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IABG_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Wakeup Event Enable On Card Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WECINT_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < WECINT_A > for bool { # [ inline ( always ) ] fn from ( variant : WECINT_A ) -> Self { match variant { WECINT_A :: _0 => false , WECINT_A :: _1 => true } } } # [ doc = "Reader of field `WECINT`" ] pub type WECINT_R = crate :: R < bool , WECINT_A > ; impl WECINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WECINT_A { match self . bits { false => WECINT_A :: _0 , true => WECINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WECINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WECINT_A :: _1 } } # [ doc = "Write proxy for field `WECINT`" ] pub struct WECINT_W < 'a > { w : & 'a mut W , } impl < 'a > WECINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WECINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WECINT_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WECINT_A :: _1 ) } # [ 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 = "Wakeup Event Enable On SD Card Insertion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WECINS_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < WECINS_A > for bool { # [ inline ( always ) ] fn from ( variant : WECINS_A ) -> Self { match variant { WECINS_A :: _0 => false , WECINS_A :: _1 => true } } } # [ doc = "Reader of field `WECINS`" ] pub type WECINS_R = crate :: R < bool , WECINS_A > ; impl WECINS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WECINS_A { match self . bits { false => WECINS_A :: _0 , true => WECINS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WECINS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WECINS_A :: _1 } } # [ doc = "Write proxy for field `WECINS`" ] pub struct WECINS_W < 'a > { w : & 'a mut W , } impl < 'a > WECINS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WECINS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WECINS_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WECINS_A :: _1 ) } # [ 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 = "Wakeup Event Enable On SD Card Removal\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WECRM_A { # [ doc = "0: Disabled" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < WECRM_A > for bool { # [ inline ( always ) ] fn from ( variant : WECRM_A ) -> Self { match variant { WECRM_A :: _0 => false , WECRM_A :: _1 => true } } } # [ doc = "Reader of field `WECRM`" ] pub type WECRM_R = crate :: R < bool , WECRM_A > ; impl WECRM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WECRM_A { match self . bits { false => WECRM_A :: _0 , true => WECRM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WECRM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WECRM_A :: _1 } } # [ doc = "Write proxy for field `WECRM`" ] pub struct WECRM_W < 'a > { w : & 'a mut W , } impl < 'a > WECRM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WECRM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WECRM_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WECRM_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - LED Control" ] # [ inline ( always ) ] pub fn lctl ( & self ) -> LCTL_R { LCTL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:2 - Data Transfer Width" ] # [ inline ( always ) ] pub fn dtw ( & self ) -> DTW_R { DTW_R :: new ( ( ( self . bits >> 1 ) & 0x03 ) as u8 ) } # [ doc = "Bit 3 - DAT3 As Card Detection Pin" ] # [ inline ( always ) ] pub fn d3cd ( & self ) -> D3CD_R { D3CD_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:5 - Endian Mode" ] # [ inline ( always ) ] pub fn emode ( & self ) -> EMODE_R { EMODE_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bit 6 - Card Detect Test Level" ] # [ inline ( always ) ] pub fn cdtl ( & self ) -> CDTL_R { CDTL_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Card Detect Signal Selection" ] # [ inline ( always ) ] pub fn cdss ( & self ) -> CDSS_R { CDSS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:9 - DMA Select" ] # [ inline ( always ) ] pub fn dmas ( & self ) -> DMAS_R { DMAS_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bit 16 - Stop At Block Gap Request" ] # [ inline ( always ) ] pub fn sabgreq ( & self ) -> SABGREQ_R { SABGREQ_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Continue Request" ] # [ inline ( always ) ] pub fn creq ( & self ) -> CREQ_R { CREQ_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Read Wait Control" ] # [ inline ( always ) ] pub fn rwctl ( & self ) -> RWCTL_R { RWCTL_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Interrupt At Block Gap" ] # [ inline ( always ) ] pub fn iabg ( & self ) -> IABG_R { IABG_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Wakeup Event Enable On Card Interrupt" ] # [ inline ( always ) ] pub fn wecint ( & self ) -> WECINT_R { WECINT_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Wakeup Event Enable On SD Card Insertion" ] # [ inline ( always ) ] pub fn wecins ( & self ) -> WECINS_R { WECINS_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Wakeup Event Enable On SD Card Removal" ] # [ inline ( always ) ] pub fn wecrm ( & self ) -> WECRM_R { WECRM_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - LED Control" ] # [ inline ( always ) ] pub fn lctl ( & mut self ) -> LCTL_W { LCTL_W { w : self } } # [ doc = "Bits 1:2 - Data Transfer Width" ] # [ inline ( always ) ] pub fn dtw ( & mut self ) -> DTW_W { DTW_W { w : self } } # [ doc = "Bit 3 - DAT3 As Card Detection Pin" ] # [ inline ( always ) ] pub fn d3cd ( & mut self ) -> D3CD_W { D3CD_W { w : self } } # [ doc = "Bits 4:5 - Endian Mode" ] # [ inline ( always ) ] pub fn emode ( & mut self ) -> EMODE_W { EMODE_W { w : self } } # [ doc = "Bit 6 - Card Detect Test Level" ] # [ inline ( always ) ] pub fn cdtl ( & mut self ) -> CDTL_W { CDTL_W { w : self } } # [ doc = "Bit 7 - Card Detect Signal Selection" ] # [ inline ( always ) ] pub fn cdss ( & mut self ) -> CDSS_W { CDSS_W { w : self } } # [ doc = "Bits 8:9 - DMA Select" ] # [ inline ( always ) ] pub fn dmas ( & mut self ) -> DMAS_W { DMAS_W { w : self } } # [ doc = "Bit 16 - Stop At Block Gap Request" ] # [ inline ( always ) ] pub fn sabgreq ( & mut self ) -> SABGREQ_W { SABGREQ_W { w : self } } # [ doc = "Bit 17 - Continue Request" ] # [ inline ( always ) ] pub fn creq ( & mut self ) -> CREQ_W { CREQ_W { w : self } } # [ doc = "Bit 18 - Read Wait Control" ] # [ inline ( always ) ] pub fn rwctl ( & mut self ) -> RWCTL_W { RWCTL_W { w : self } } # [ doc = "Bit 19 - Interrupt At Block Gap" ] # [ inline ( always ) ] pub fn iabg ( & mut self ) -> IABG_W { IABG_W { w : self } } # [ doc = "Bit 24 - Wakeup Event Enable On Card Interrupt" ] # [ inline ( always ) ] pub fn wecint ( & mut self ) -> WECINT_W { WECINT_W { w : self } } # [ doc = "Bit 25 - Wakeup Event Enable On SD Card Insertion" ] # [ inline ( always ) ] pub fn wecins ( & mut self ) -> WECINS_W { WECINS_W { w : self } } # [ doc = "Bit 26 - Wakeup Event Enable On SD Card Removal" ] # [ inline ( always ) ] pub fn wecrm ( & mut self ) -> WECRM_W { WECRM_W { w : self } } } } # [ doc = "System Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sysctl](sysctl) module" ] pub type SYSCTL = crate :: Reg < u32 , _SYSCTL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SYSCTL ; # [ doc = "`read()` method returns [sysctl::R](sysctl::R) reader structure" ] impl crate :: Readable for SYSCTL { } # [ doc = "`write(|w| ..)` method takes [sysctl::W](sysctl::W) writer structure" ] impl crate :: Writable for SYSCTL { } # [ doc = "System Control register" ] pub mod sysctl { # [ doc = "Reader of register SYSCTL" ] pub type R = crate :: R < u32 , super :: SYSCTL > ; # [ doc = "Writer for register SYSCTL" ] pub type W = crate :: W < u32 , super :: SYSCTL > ; # [ doc = "Register SYSCTL `reset()`'s with value 0x8008" ] impl crate :: ResetValue for super :: SYSCTL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x8008 } } # [ doc = "IPG Clock Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IPGEN_A { # [ doc = "0: Bus clock will be internally gated off." ] _0 , # [ doc = "1: Bus clock will not be automatically gated off." ] _1 } impl From < IPGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : IPGEN_A ) -> Self { match variant { IPGEN_A :: _0 => false , IPGEN_A :: _1 => true } } } # [ doc = "Reader of field `IPGEN`" ] pub type IPGEN_R = crate :: R < bool , IPGEN_A > ; impl IPGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IPGEN_A { match self . bits { false => IPGEN_A :: _0 , true => IPGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IPGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IPGEN_A :: _1 } } # [ doc = "Write proxy for field `IPGEN`" ] pub struct IPGEN_W < 'a > { w : & 'a mut W , } impl < 'a > IPGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IPGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Bus clock will be internally gated off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IPGEN_A :: _0 ) } # [ doc = "Bus clock will not be automatically gated off." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IPGEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "System Clock Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HCKEN_A { # [ doc = "0: System clock will be internally gated off." ] _0 , # [ doc = "1: System clock will not be automatically gated off." ] _1 } impl From < HCKEN_A > for bool { # [ inline ( always ) ] fn from ( variant : HCKEN_A ) -> Self { match variant { HCKEN_A :: _0 => false , HCKEN_A :: _1 => true } } } # [ doc = "Reader of field `HCKEN`" ] pub type HCKEN_R = crate :: R < bool , HCKEN_A > ; impl HCKEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HCKEN_A { match self . bits { false => HCKEN_A :: _0 , true => HCKEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HCKEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HCKEN_A :: _1 } } # [ doc = "Write proxy for field `HCKEN`" ] pub struct HCKEN_W < 'a > { w : & 'a mut W , } impl < 'a > HCKEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HCKEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "System clock will be internally gated off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HCKEN_A :: _0 ) } # [ doc = "System clock will not be automatically gated off." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HCKEN_A :: _1 ) } # [ 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 } } # [ doc = "Peripheral Clock Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEREN_A { # [ doc = "0: SDHC clock will be internally gated off." ] _0 , # [ doc = "1: SDHC clock will not be automatically gated off." ] _1 } impl From < PEREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PEREN_A ) -> Self { match variant { PEREN_A :: _0 => false , PEREN_A :: _1 => true } } } # [ doc = "Reader of field `PEREN`" ] pub type PEREN_R = crate :: R < bool , PEREN_A > ; impl PEREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEREN_A { match self . bits { false => PEREN_A :: _0 , true => PEREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEREN_A :: _1 } } # [ doc = "Write proxy for field `PEREN`" ] pub struct PEREN_W < 'a > { w : & 'a mut W , } impl < 'a > PEREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "SDHC clock will be internally gated off." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEREN_A :: _0 ) } # [ doc = "SDHC clock will not be automatically gated off." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEREN_A :: _1 ) } # [ 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 = "Reader of field `SDCLKEN`" ] pub type SDCLKEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SDCLKEN`" ] pub struct SDCLKEN_W < 'a > { w : & 'a mut W , } impl < 'a > SDCLKEN_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Divisor\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DVS_A { # [ doc = "0: Divisor by 1." ] _0 , # [ doc = "1: Divisor by 2." ] _1 , # [ doc = "14: Divisor by 15." ] _1110 , # [ doc = "15: Divisor by 16." ] _1111 } impl From < DVS_A > for u8 { # [ inline ( always ) ] fn from ( variant : DVS_A ) -> Self { match variant { DVS_A :: _0 => 0 , DVS_A :: _1 => 1 , DVS_A :: _1110 => 14 , DVS_A :: _1111 => 15 } } } # [ doc = "Reader of field `DVS`" ] pub type DVS_R = crate :: R < u8 , DVS_A > ; impl DVS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DVS_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DVS_A :: _0 ) , 1 => Val ( DVS_A :: _1 ) , 14 => Val ( DVS_A :: _1110 ) , 15 => Val ( DVS_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DVS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DVS_A :: _1 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == DVS_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == DVS_A :: _1111 } } # [ doc = "Write proxy for field `DVS`" ] pub struct DVS_W < 'a > { w : & 'a mut W , } impl < 'a > DVS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DVS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Divisor by 1." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DVS_A :: _0 ) } # [ doc = "Divisor by 2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DVS_A :: _1 ) } # [ doc = "Divisor by 15." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( DVS_A :: _1110 ) } # [ doc = "Divisor by 16." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( DVS_A :: _1111 ) } # [ 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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } # [ doc = "SDCLK Frequency Select\n\nValue on reset: 128" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SDCLKFS_A { # [ doc = "1: Base clock divided by 2." ] _1 , # [ doc = "2: Base clock divided by 4." ] _10 , # [ doc = "4: Base clock divided by 8." ] _100 , # [ doc = "8: Base clock divided by 16." ] _1000 , # [ doc = "16: Base clock divided by 32." ] _10000 , # [ doc = "32: Base clock divided by 64." ] _100000 , # [ doc = "64: Base clock divided by 128." ] _1000000 , # [ doc = "128: Base clock divided by 256." ] _10000000 } impl From < SDCLKFS_A > for u8 { # [ inline ( always ) ] fn from ( variant : SDCLKFS_A ) -> Self { match variant { SDCLKFS_A :: _1 => 1 , SDCLKFS_A :: _10 => 2 , SDCLKFS_A :: _100 => 4 , SDCLKFS_A :: _1000 => 8 , SDCLKFS_A :: _10000 => 16 , SDCLKFS_A :: _100000 => 32 , SDCLKFS_A :: _1000000 => 64 , SDCLKFS_A :: _10000000 => 128 } } } # [ doc = "Reader of field `SDCLKFS`" ] pub type SDCLKFS_R = crate :: R < u8 , SDCLKFS_A > ; impl SDCLKFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SDCLKFS_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( SDCLKFS_A :: _1 ) , 2 => Val ( SDCLKFS_A :: _10 ) , 4 => Val ( SDCLKFS_A :: _100 ) , 8 => Val ( SDCLKFS_A :: _1000 ) , 16 => Val ( SDCLKFS_A :: _10000 ) , 32 => Val ( SDCLKFS_A :: _100000 ) , 64 => Val ( SDCLKFS_A :: _1000000 ) , 128 => Val ( SDCLKFS_A :: _10000000 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SDCLKFS_A :: _1 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SDCLKFS_A :: _10 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == SDCLKFS_A :: _100 } # [ doc = "Checks if the value of the field is `_1000`" ] # [ inline ( always ) ] pub fn is_1000 ( & self ) -> bool { * self == SDCLKFS_A :: _1000 } # [ doc = "Checks if the value of the field is `_10000`" ] # [ inline ( always ) ] pub fn is_10000 ( & self ) -> bool { * self == SDCLKFS_A :: _10000 } # [ doc = "Checks if the value of the field is `_100000`" ] # [ inline ( always ) ] pub fn is_100000 ( & self ) -> bool { * self == SDCLKFS_A :: _100000 } # [ doc = "Checks if the value of the field is `_1000000`" ] # [ inline ( always ) ] pub fn is_1000000 ( & self ) -> bool { * self == SDCLKFS_A :: _1000000 } # [ doc = "Checks if the value of the field is `_10000000`" ] # [ inline ( always ) ] pub fn is_10000000 ( & self ) -> bool { * self == SDCLKFS_A :: _10000000 } } # [ doc = "Write proxy for field `SDCLKFS`" ] pub struct SDCLKFS_W < 'a > { w : & 'a mut W , } impl < 'a > SDCLKFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SDCLKFS_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Base clock divided by 2." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SDCLKFS_A :: _1 ) } # [ doc = "Base clock divided by 4." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SDCLKFS_A :: _10 ) } # [ doc = "Base clock divided by 8." ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( SDCLKFS_A :: _100 ) } # [ doc = "Base clock divided by 16." ] # [ inline ( always ) ] pub fn _1000 ( self ) -> & 'a mut W { self . variant ( SDCLKFS_A :: _1000 ) } # [ doc = "Base clock divided by 32." ] # [ inline ( always ) ] pub fn _10000 ( self ) -> & 'a mut W { self . variant ( SDCLKFS_A :: _10000 ) } # [ doc = "Base clock divided by 64." ] # [ inline ( always ) ] pub fn _100000 ( self ) -> & 'a mut W { self . variant ( SDCLKFS_A :: _100000 ) } # [ doc = "Base clock divided by 128." ] # [ inline ( always ) ] pub fn _1000000 ( self ) -> & 'a mut W { self . variant ( SDCLKFS_A :: _1000000 ) } # [ doc = "Base clock divided by 256." ] # [ inline ( always ) ] pub fn _10000000 ( self ) -> & 'a mut W { self . variant ( SDCLKFS_A :: _10000000 ) } # [ 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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Data Timeout Counter Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTOCV_A { # [ doc = "0: SDCLK x 2 13" ] _0000 , # [ doc = "1: SDCLK x 2 14" ] _0001 , # [ doc = "14: SDCLK x 2 27" ] _1110 } impl From < DTOCV_A > for u8 { # [ inline ( always ) ] fn from ( variant : DTOCV_A ) -> Self { match variant { DTOCV_A :: _0000 => 0 , DTOCV_A :: _0001 => 1 , DTOCV_A :: _1110 => 14 } } } # [ doc = "Reader of field `DTOCV`" ] pub type DTOCV_R = crate :: R < u8 , DTOCV_A > ; impl DTOCV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DTOCV_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DTOCV_A :: _0000 ) , 1 => Val ( DTOCV_A :: _0001 ) , 14 => Val ( DTOCV_A :: _1110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == DTOCV_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == DTOCV_A :: _0001 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == DTOCV_A :: _1110 } } # [ doc = "Write proxy for field `DTOCV`" ] pub struct DTOCV_W < 'a > { w : & 'a mut W , } impl < 'a > DTOCV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTOCV_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "SDCLK x 2 13" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( DTOCV_A :: _0000 ) } # [ doc = "SDCLK x 2 14" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( DTOCV_A :: _0001 ) } # [ doc = "SDCLK x 2 27" ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( DTOCV_A :: _1110 ) } # [ 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 & ! ( 0x0f << 16 ) ) | ( ( ( value as u32 ) & 0x0f ) << 16 ) ; self . w } } # [ doc = "Software Reset For ALL\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSTA_AW { # [ doc = "0: No reset." ] _0 , # [ doc = "1: Reset." ] _1 } impl From < RSTA_AW > for bool { # [ inline ( always ) ] fn from ( variant : RSTA_AW ) -> Self { match variant { RSTA_AW :: _0 => false , RSTA_AW :: _1 => true } } } # [ doc = "Write proxy for field `RSTA`" ] pub struct RSTA_W < 'a > { w : & 'a mut W , } impl < 'a > RSTA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSTA_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No reset." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSTA_AW :: _0 ) } # [ doc = "Reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSTA_AW :: _1 ) } # [ 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 = "Software Reset For CMD Line\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSTC_AW { # [ doc = "0: No reset." ] _0 , # [ doc = "1: Reset." ] _1 } impl From < RSTC_AW > for bool { # [ inline ( always ) ] fn from ( variant : RSTC_AW ) -> Self { match variant { RSTC_AW :: _0 => false , RSTC_AW :: _1 => true } } } # [ doc = "Write proxy for field `RSTC`" ] pub struct RSTC_W < 'a > { w : & 'a mut W , } impl < 'a > RSTC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSTC_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No reset." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSTC_AW :: _0 ) } # [ doc = "Reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSTC_AW :: _1 ) } # [ 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 = "Software Reset For DAT Line\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSTD_AW { # [ doc = "0: No reset." ] _0 , # [ doc = "1: Reset." ] _1 } impl From < RSTD_AW > for bool { # [ inline ( always ) ] fn from ( variant : RSTD_AW ) -> Self { match variant { RSTD_AW :: _0 => false , RSTD_AW :: _1 => true } } } # [ doc = "Write proxy for field `RSTD`" ] pub struct RSTD_W < 'a > { w : & 'a mut W , } impl < 'a > RSTD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSTD_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No reset." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSTD_AW :: _0 ) } # [ doc = "Reset." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSTD_AW :: _1 ) } # [ 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 = "Reader of field `INITA`" ] pub type INITA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `INITA`" ] pub struct INITA_W < 'a > { w : & 'a mut W , } impl < 'a > INITA_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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } impl R { # [ doc = "Bit 0 - IPG Clock Enable" ] # [ inline ( always ) ] pub fn ipgen ( & self ) -> IPGEN_R { IPGEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - System Clock Enable" ] # [ inline ( always ) ] pub fn hcken ( & self ) -> HCKEN_R { HCKEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Peripheral Clock Enable" ] # [ inline ( always ) ] pub fn peren ( & self ) -> PEREN_R { PEREN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - SD Clock Enable" ] # [ inline ( always ) ] pub fn sdclken ( & self ) -> SDCLKEN_R { SDCLKEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:7 - Divisor" ] # [ inline ( always ) ] pub fn dvs ( & self ) -> DVS_R { DVS_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } # [ doc = "Bits 8:15 - SDCLK Frequency Select" ] # [ inline ( always ) ] pub fn sdclkfs ( & self ) -> SDCLKFS_R { SDCLKFS_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:19 - Data Timeout Counter Value" ] # [ inline ( always ) ] pub fn dtocv ( & self ) -> DTOCV_R { DTOCV_R :: new ( ( ( self . bits >> 16 ) & 0x0f ) as u8 ) } # [ doc = "Bit 27 - Initialization Active" ] # [ inline ( always ) ] pub fn inita ( & self ) -> INITA_R { INITA_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - IPG Clock Enable" ] # [ inline ( always ) ] pub fn ipgen ( & mut self ) -> IPGEN_W { IPGEN_W { w : self } } # [ doc = "Bit 1 - System Clock Enable" ] # [ inline ( always ) ] pub fn hcken ( & mut self ) -> HCKEN_W { HCKEN_W { w : self } } # [ doc = "Bit 2 - Peripheral Clock Enable" ] # [ inline ( always ) ] pub fn peren ( & mut self ) -> PEREN_W { PEREN_W { w : self } } # [ doc = "Bit 3 - SD Clock Enable" ] # [ inline ( always ) ] pub fn sdclken ( & mut self ) -> SDCLKEN_W { SDCLKEN_W { w : self } } # [ doc = "Bits 4:7 - Divisor" ] # [ inline ( always ) ] pub fn dvs ( & mut self ) -> DVS_W { DVS_W { w : self } } # [ doc = "Bits 8:15 - SDCLK Frequency Select" ] # [ inline ( always ) ] pub fn sdclkfs ( & mut self ) -> SDCLKFS_W { SDCLKFS_W { w : self } } # [ doc = "Bits 16:19 - Data Timeout Counter Value" ] # [ inline ( always ) ] pub fn dtocv ( & mut self ) -> DTOCV_W { DTOCV_W { w : self } } # [ doc = "Bit 24 - Software Reset For ALL" ] # [ inline ( always ) ] pub fn rsta ( & mut self ) -> RSTA_W { RSTA_W { w : self } } # [ doc = "Bit 25 - Software Reset For CMD Line" ] # [ inline ( always ) ] pub fn rstc ( & mut self ) -> RSTC_W { RSTC_W { w : self } } # [ doc = "Bit 26 - Software Reset For DAT Line" ] # [ inline ( always ) ] pub fn rstd ( & mut self ) -> RSTD_W { RSTD_W { w : self } } # [ doc = "Bit 27 - Initialization Active" ] # [ inline ( always ) ] pub fn inita ( & mut self ) -> INITA_W { INITA_W { w : self } } } } # [ doc = "Interrupt Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [irqstat](irqstat) module" ] pub type IRQSTAT = crate :: Reg < u32 , _IRQSTAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IRQSTAT ; # [ doc = "`read()` method returns [irqstat::R](irqstat::R) reader structure" ] impl crate :: Readable for IRQSTAT { } # [ doc = "`write(|w| ..)` method takes [irqstat::W](irqstat::W) writer structure" ] impl crate :: Writable for IRQSTAT { } # [ doc = "Interrupt Status register" ] pub mod irqstat { # [ doc = "Reader of register IRQSTAT" ] pub type R = crate :: R < u32 , super :: IRQSTAT > ; # [ doc = "Writer for register IRQSTAT" ] pub type W = crate :: W < u32 , super :: IRQSTAT > ; # [ doc = "Register IRQSTAT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IRQSTAT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Command Complete\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CC_A { # [ doc = "0: Command not complete." ] _0 , # [ doc = "1: Command complete." ] _1 } impl From < CC_A > for bool { # [ inline ( always ) ] fn from ( variant : CC_A ) -> Self { match variant { CC_A :: _0 => false , CC_A :: _1 => true } } } # [ doc = "Reader of field `CC`" ] pub type CC_R = crate :: R < bool , CC_A > ; impl CC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CC_A { match self . bits { false => CC_A :: _0 , true => CC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CC_A :: _1 } } # [ doc = "Write proxy for field `CC`" ] pub struct CC_W < 'a > { w : & 'a mut W , } impl < 'a > CC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Command not complete." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CC_A :: _0 ) } # [ doc = "Command complete." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CC_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Transfer Complete\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TC_A { # [ doc = "0: Transfer not complete." ] _0 , # [ doc = "1: Transfer complete." ] _1 } impl From < TC_A > for bool { # [ inline ( always ) ] fn from ( variant : TC_A ) -> Self { match variant { TC_A :: _0 => false , TC_A :: _1 => true } } } # [ doc = "Reader of field `TC`" ] pub type TC_R = crate :: R < bool , TC_A > ; impl TC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TC_A { match self . bits { false => TC_A :: _0 , true => TC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TC_A :: _1 } } # [ doc = "Write proxy for field `TC`" ] pub struct TC_W < 'a > { w : & 'a mut W , } impl < 'a > TC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transfer not complete." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TC_A :: _0 ) } # [ doc = "Transfer complete." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TC_A :: _1 ) } # [ 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 } } # [ doc = "Block Gap Event\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BGE_A { # [ doc = "0: No block gap event." ] _0 , # [ doc = "1: Transaction stopped at block gap." ] _1 } impl From < BGE_A > for bool { # [ inline ( always ) ] fn from ( variant : BGE_A ) -> Self { match variant { BGE_A :: _0 => false , BGE_A :: _1 => true } } } # [ doc = "Reader of field `BGE`" ] pub type BGE_R = crate :: R < bool , BGE_A > ; impl BGE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BGE_A { match self . bits { false => BGE_A :: _0 , true => BGE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BGE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BGE_A :: _1 } } # [ doc = "Write proxy for field `BGE`" ] pub struct BGE_W < 'a > { w : & 'a mut W , } impl < 'a > BGE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BGE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No block gap event." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BGE_A :: _0 ) } # [ doc = "Transaction stopped at block gap." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BGE_A :: _1 ) } # [ 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 = "DMA Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DINT_A { # [ doc = "0: No DMA Interrupt." ] _0 , # [ doc = "1: DMA Interrupt is generated." ] _1 } impl From < DINT_A > for bool { # [ inline ( always ) ] fn from ( variant : DINT_A ) -> Self { match variant { DINT_A :: _0 => false , DINT_A :: _1 => true } } } # [ doc = "Reader of field `DINT`" ] pub type DINT_R = crate :: R < bool , DINT_A > ; impl DINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DINT_A { match self . bits { false => DINT_A :: _0 , true => DINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DINT_A :: _1 } } # [ doc = "Write proxy for field `DINT`" ] pub struct DINT_W < 'a > { w : & 'a mut W , } impl < 'a > DINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No DMA Interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DINT_A :: _0 ) } # [ doc = "DMA Interrupt is generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DINT_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Buffer Write Ready\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BWR_A { # [ doc = "0: Not ready to write buffer." ] _0 , # [ doc = "1: Ready to write buffer." ] _1 } impl From < BWR_A > for bool { # [ inline ( always ) ] fn from ( variant : BWR_A ) -> Self { match variant { BWR_A :: _0 => false , BWR_A :: _1 => true } } } # [ doc = "Reader of field `BWR`" ] pub type BWR_R = crate :: R < bool , BWR_A > ; impl BWR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BWR_A { match self . bits { false => BWR_A :: _0 , true => BWR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BWR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BWR_A :: _1 } } # [ doc = "Write proxy for field `BWR`" ] pub struct BWR_W < 'a > { w : & 'a mut W , } impl < 'a > BWR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BWR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not ready to write buffer." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BWR_A :: _0 ) } # [ doc = "Ready to write buffer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BWR_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Buffer Read Ready\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRR_A { # [ doc = "0: Not ready to read buffer." ] _0 , # [ doc = "1: Ready to read buffer." ] _1 } impl From < BRR_A > for bool { # [ inline ( always ) ] fn from ( variant : BRR_A ) -> Self { match variant { BRR_A :: _0 => false , BRR_A :: _1 => true } } } # [ doc = "Reader of field `BRR`" ] pub type BRR_R = crate :: R < bool , BRR_A > ; impl BRR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRR_A { match self . bits { false => BRR_A :: _0 , true => BRR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRR_A :: _1 } } # [ doc = "Write proxy for field `BRR`" ] pub struct BRR_W < 'a > { w : & 'a mut W , } impl < 'a > BRR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Not ready to read buffer." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRR_A :: _0 ) } # [ doc = "Ready to read buffer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRR_A :: _1 ) } # [ 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 = "Card Insertion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CINS_A { # [ doc = "0: Card state unstable or removed." ] _0 , # [ doc = "1: Card inserted." ] _1 } impl From < CINS_A > for bool { # [ inline ( always ) ] fn from ( variant : CINS_A ) -> Self { match variant { CINS_A :: _0 => false , CINS_A :: _1 => true } } } # [ doc = "Reader of field `CINS`" ] pub type CINS_R = crate :: R < bool , CINS_A > ; impl CINS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CINS_A { match self . bits { false => CINS_A :: _0 , true => CINS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CINS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CINS_A :: _1 } } # [ doc = "Write proxy for field `CINS`" ] pub struct CINS_W < 'a > { w : & 'a mut W , } impl < 'a > CINS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CINS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Card state unstable or removed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CINS_A :: _0 ) } # [ doc = "Card inserted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CINS_A :: _1 ) } # [ 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 = "Card Removal\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRM_A { # [ doc = "0: Card state unstable or inserted." ] _0 , # [ doc = "1: Card removed." ] _1 } impl From < CRM_A > for bool { # [ inline ( always ) ] fn from ( variant : CRM_A ) -> Self { match variant { CRM_A :: _0 => false , CRM_A :: _1 => true } } } # [ doc = "Reader of field `CRM`" ] pub type CRM_R = crate :: R < bool , CRM_A > ; impl CRM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRM_A { match self . bits { false => CRM_A :: _0 , true => CRM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRM_A :: _1 } } # [ doc = "Write proxy for field `CRM`" ] pub struct CRM_W < 'a > { w : & 'a mut W , } impl < 'a > CRM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Card state unstable or inserted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRM_A :: _0 ) } # [ doc = "Card removed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRM_A :: _1 ) } # [ 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 = "Card Interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CINT_A { # [ doc = "0: No Card Interrupt." ] _0 , # [ doc = "1: Generate Card Interrupt." ] _1 } impl From < CINT_A > for bool { # [ inline ( always ) ] fn from ( variant : CINT_A ) -> Self { match variant { CINT_A :: _0 => false , CINT_A :: _1 => true } } } # [ doc = "Reader of field `CINT`" ] pub type CINT_R = crate :: R < bool , CINT_A > ; impl CINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CINT_A { match self . bits { false => CINT_A :: _0 , true => CINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CINT_A :: _1 } } # [ doc = "Write proxy for field `CINT`" ] pub struct CINT_W < 'a > { w : & 'a mut W , } impl < 'a > CINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No Card Interrupt." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CINT_A :: _0 ) } # [ doc = "Generate Card Interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CINT_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Command Timeout Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTOE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Time out." ] _1 } impl From < CTOE_A > for bool { # [ inline ( always ) ] fn from ( variant : CTOE_A ) -> Self { match variant { CTOE_A :: _0 => false , CTOE_A :: _1 => true } } } # [ doc = "Reader of field `CTOE`" ] pub type CTOE_R = crate :: R < bool , CTOE_A > ; impl CTOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CTOE_A { match self . bits { false => CTOE_A :: _0 , true => CTOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CTOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CTOE_A :: _1 } } # [ doc = "Write proxy for field `CTOE`" ] pub struct CTOE_W < 'a > { w : & 'a mut W , } impl < 'a > CTOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CTOE_A :: _0 ) } # [ doc = "Time out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CTOE_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Command CRC Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: CRC Error generated." ] _1 } impl From < CCE_A > for bool { # [ inline ( always ) ] fn from ( variant : CCE_A ) -> Self { match variant { CCE_A :: _0 => false , CCE_A :: _1 => true } } } # [ doc = "Reader of field `CCE`" ] pub type CCE_R = crate :: R < bool , CCE_A > ; impl CCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCE_A { match self . bits { false => CCE_A :: _0 , true => CCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCE_A :: _1 } } # [ doc = "Write proxy for field `CCE`" ] pub struct CCE_W < 'a > { w : & 'a mut W , } impl < 'a > CCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CCE_A :: _0 ) } # [ doc = "CRC Error generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CCE_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Command End Bit Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CEBE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: End Bit Error generated." ] _1 } impl From < CEBE_A > for bool { # [ inline ( always ) ] fn from ( variant : CEBE_A ) -> Self { match variant { CEBE_A :: _0 => false , CEBE_A :: _1 => true } } } # [ doc = "Reader of field `CEBE`" ] pub type CEBE_R = crate :: R < bool , CEBE_A > ; impl CEBE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CEBE_A { match self . bits { false => CEBE_A :: _0 , true => CEBE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CEBE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CEBE_A :: _1 } } # [ doc = "Write proxy for field `CEBE`" ] pub struct CEBE_W < 'a > { w : & 'a mut W , } impl < 'a > CEBE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CEBE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CEBE_A :: _0 ) } # [ doc = "End Bit Error generated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CEBE_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Command Index Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CIE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Error." ] _1 } impl From < CIE_A > for bool { # [ inline ( always ) ] fn from ( variant : CIE_A ) -> Self { match variant { CIE_A :: _0 => false , CIE_A :: _1 => true } } } # [ doc = "Reader of field `CIE`" ] pub type CIE_R = crate :: R < bool , CIE_A > ; impl CIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CIE_A { match self . bits { false => CIE_A :: _0 , true => CIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CIE_A :: _1 } } # [ doc = "Write proxy for field `CIE`" ] pub struct CIE_W < 'a > { w : & 'a mut W , } impl < 'a > CIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CIE_A :: _0 ) } # [ doc = "Error." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CIE_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Data Timeout Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTOE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Time out." ] _1 } impl From < DTOE_A > for bool { # [ inline ( always ) ] fn from ( variant : DTOE_A ) -> Self { match variant { DTOE_A :: _0 => false , DTOE_A :: _1 => true } } } # [ doc = "Reader of field `DTOE`" ] pub type DTOE_R = crate :: R < bool , DTOE_A > ; impl DTOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTOE_A { match self . bits { false => DTOE_A :: _0 , true => DTOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTOE_A :: _1 } } # [ doc = "Write proxy for field `DTOE`" ] pub struct DTOE_W < 'a > { w : & 'a mut W , } impl < 'a > DTOE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTOE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTOE_A :: _0 ) } # [ doc = "Time out." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTOE_A :: _1 ) } # [ 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 = "Data CRC Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DCE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Error." ] _1 } impl From < DCE_A > for bool { # [ inline ( always ) ] fn from ( variant : DCE_A ) -> Self { match variant { DCE_A :: _0 => false , DCE_A :: _1 => true } } } # [ doc = "Reader of field `DCE`" ] pub type DCE_R = crate :: R < bool , DCE_A > ; impl DCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DCE_A { match self . bits { false => DCE_A :: _0 , true => DCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DCE_A :: _1 } } # [ doc = "Write proxy for field `DCE`" ] pub struct DCE_W < 'a > { w : & 'a mut W , } impl < 'a > DCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DCE_A :: _0 ) } # [ doc = "Error." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DCE_A :: _1 ) } # [ 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 = "Data End Bit Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEBE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Error." ] _1 } impl From < DEBE_A > for bool { # [ inline ( always ) ] fn from ( variant : DEBE_A ) -> Self { match variant { DEBE_A :: _0 => false , DEBE_A :: _1 => true } } } # [ doc = "Reader of field `DEBE`" ] pub type DEBE_R = crate :: R < bool , DEBE_A > ; impl DEBE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DEBE_A { match self . bits { false => DEBE_A :: _0 , true => DEBE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DEBE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DEBE_A :: _1 } } # [ doc = "Write proxy for field `DEBE`" ] pub struct DEBE_W < 'a > { w : & 'a mut W , } impl < 'a > DEBE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DEBE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DEBE_A :: _0 ) } # [ doc = "Error." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DEBE_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Auto CMD12 Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12E_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Error." ] _1 } impl From < AC12E_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12E_A ) -> Self { match variant { AC12E_A :: _0 => false , AC12E_A :: _1 => true } } } # [ doc = "Reader of field `AC12E`" ] pub type AC12E_R = crate :: R < bool , AC12E_A > ; impl AC12E_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12E_A { match self . bits { false => AC12E_A :: _0 , true => AC12E_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12E_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12E_A :: _1 } } # [ doc = "Write proxy for field `AC12E`" ] pub struct AC12E_W < 'a > { w : & 'a mut W , } impl < 'a > AC12E_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AC12E_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AC12E_A :: _0 ) } # [ doc = "Error." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AC12E_A :: _1 ) } # [ 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 = "DMA Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Error." ] _1 } impl From < DMAE_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAE_A ) -> Self { match variant { DMAE_A :: _0 => false , DMAE_A :: _1 => true } } } # [ doc = "Reader of field `DMAE`" ] pub type DMAE_R = crate :: R < bool , DMAE_A > ; impl DMAE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAE_A { match self . bits { false => DMAE_A :: _0 , true => DMAE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAE_A :: _1 } } # [ doc = "Write proxy for field `DMAE`" ] pub struct DMAE_W < 'a > { w : & 'a mut W , } impl < 'a > DMAE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAE_A :: _0 ) } # [ doc = "Error." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } impl R { # [ doc = "Bit 0 - Command Complete" ] # [ inline ( always ) ] pub fn cc ( & self ) -> CC_R { CC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transfer Complete" ] # [ inline ( always ) ] pub fn tc ( & self ) -> TC_R { TC_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Block Gap Event" ] # [ inline ( always ) ] pub fn bge ( & self ) -> BGE_R { BGE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - DMA Interrupt" ] # [ inline ( always ) ] pub fn dint ( & self ) -> DINT_R { DINT_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Buffer Write Ready" ] # [ inline ( always ) ] pub fn bwr ( & self ) -> BWR_R { BWR_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Buffer Read Ready" ] # [ inline ( always ) ] pub fn brr ( & self ) -> BRR_R { BRR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Card Insertion" ] # [ inline ( always ) ] pub fn cins ( & self ) -> CINS_R { CINS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Card Removal" ] # [ inline ( always ) ] pub fn crm ( & self ) -> CRM_R { CRM_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Card Interrupt" ] # [ inline ( always ) ] pub fn cint ( & self ) -> CINT_R { CINT_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Command Timeout Error" ] # [ inline ( always ) ] pub fn ctoe ( & self ) -> CTOE_R { CTOE_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Command CRC Error" ] # [ inline ( always ) ] pub fn cce ( & self ) -> CCE_R { CCE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Command End Bit Error" ] # [ inline ( always ) ] pub fn cebe ( & self ) -> CEBE_R { CEBE_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Command Index Error" ] # [ inline ( always ) ] pub fn cie ( & self ) -> CIE_R { CIE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Data Timeout Error" ] # [ inline ( always ) ] pub fn dtoe ( & self ) -> DTOE_R { DTOE_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Data CRC Error" ] # [ inline ( always ) ] pub fn dce ( & self ) -> DCE_R { DCE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Data End Bit Error" ] # [ inline ( always ) ] pub fn debe ( & self ) -> DEBE_R { DEBE_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Auto CMD12 Error" ] # [ inline ( always ) ] pub fn ac12e ( & self ) -> AC12E_R { AC12E_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - DMA Error" ] # [ inline ( always ) ] pub fn dmae ( & self ) -> DMAE_R { DMAE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Command Complete" ] # [ inline ( always ) ] pub fn cc ( & mut self ) -> CC_W { CC_W { w : self } } # [ doc = "Bit 1 - Transfer Complete" ] # [ inline ( always ) ] pub fn tc ( & mut self ) -> TC_W { TC_W { w : self } } # [ doc = "Bit 2 - Block Gap Event" ] # [ inline ( always ) ] pub fn bge ( & mut self ) -> BGE_W { BGE_W { w : self } } # [ doc = "Bit 3 - DMA Interrupt" ] # [ inline ( always ) ] pub fn dint ( & mut self ) -> DINT_W { DINT_W { w : self } } # [ doc = "Bit 4 - Buffer Write Ready" ] # [ inline ( always ) ] pub fn bwr ( & mut self ) -> BWR_W { BWR_W { w : self } } # [ doc = "Bit 5 - Buffer Read Ready" ] # [ inline ( always ) ] pub fn brr ( & mut self ) -> BRR_W { BRR_W { w : self } } # [ doc = "Bit 6 - Card Insertion" ] # [ inline ( always ) ] pub fn cins ( & mut self ) -> CINS_W { CINS_W { w : self } } # [ doc = "Bit 7 - Card Removal" ] # [ inline ( always ) ] pub fn crm ( & mut self ) -> CRM_W { CRM_W { w : self } } # [ doc = "Bit 8 - Card Interrupt" ] # [ inline ( always ) ] pub fn cint ( & mut self ) -> CINT_W { CINT_W { w : self } } # [ doc = "Bit 16 - Command Timeout Error" ] # [ inline ( always ) ] pub fn ctoe ( & mut self ) -> CTOE_W { CTOE_W { w : self } } # [ doc = "Bit 17 - Command CRC Error" ] # [ inline ( always ) ] pub fn cce ( & mut self ) -> CCE_W { CCE_W { w : self } } # [ doc = "Bit 18 - Command End Bit Error" ] # [ inline ( always ) ] pub fn cebe ( & mut self ) -> CEBE_W { CEBE_W { w : self } } # [ doc = "Bit 19 - Command Index Error" ] # [ inline ( always ) ] pub fn cie ( & mut self ) -> CIE_W { CIE_W { w : self } } # [ doc = "Bit 20 - Data Timeout Error" ] # [ inline ( always ) ] pub fn dtoe ( & mut self ) -> DTOE_W { DTOE_W { w : self } } # [ doc = "Bit 21 - Data CRC Error" ] # [ inline ( always ) ] pub fn dce ( & mut self ) -> DCE_W { DCE_W { w : self } } # [ doc = "Bit 22 - Data End Bit Error" ] # [ inline ( always ) ] pub fn debe ( & mut self ) -> DEBE_W { DEBE_W { w : self } } # [ doc = "Bit 24 - Auto CMD12 Error" ] # [ inline ( always ) ] pub fn ac12e ( & mut self ) -> AC12E_W { AC12E_W { w : self } } # [ doc = "Bit 28 - DMA Error" ] # [ inline ( always ) ] pub fn dmae ( & mut self ) -> DMAE_W { DMAE_W { w : self } } } } # [ doc = "Interrupt Status Enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [irqstaten](irqstaten) module" ] pub type IRQSTATEN = crate :: Reg < u32 , _IRQSTATEN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IRQSTATEN ; # [ doc = "`read()` method returns [irqstaten::R](irqstaten::R) reader structure" ] impl crate :: Readable for IRQSTATEN { } # [ doc = "`write(|w| ..)` method takes [irqstaten::W](irqstaten::W) writer structure" ] impl crate :: Writable for IRQSTATEN { } # [ doc = "Interrupt Status Enable register" ] pub mod irqstaten { # [ doc = "Reader of register IRQSTATEN" ] pub type R = crate :: R < u32 , super :: IRQSTATEN > ; # [ doc = "Writer for register IRQSTATEN" ] pub type W = crate :: W < u32 , super :: IRQSTATEN > ; # [ doc = "Register IRQSTATEN `reset()`'s with value 0x117f_013f" ] impl crate :: ResetValue for super :: IRQSTATEN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x117f_013f } } # [ doc = "Command Complete Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCSEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CCSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CCSEN_A ) -> Self { match variant { CCSEN_A :: _0 => false , CCSEN_A :: _1 => true } } } # [ doc = "Reader of field `CCSEN`" ] pub type CCSEN_R = crate :: R < bool , CCSEN_A > ; impl CCSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCSEN_A { match self . bits { false => CCSEN_A :: _0 , true => CCSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCSEN_A :: _1 } } # [ doc = "Write proxy for field `CCSEN`" ] pub struct CCSEN_W < 'a > { w : & 'a mut W , } impl < 'a > CCSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CCSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CCSEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CCSEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Transfer Complete Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCSEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < TCSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : TCSEN_A ) -> Self { match variant { TCSEN_A :: _0 => false , TCSEN_A :: _1 => true } } } # [ doc = "Reader of field `TCSEN`" ] pub type TCSEN_R = crate :: R < bool , TCSEN_A > ; impl TCSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCSEN_A { match self . bits { false => TCSEN_A :: _0 , true => TCSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCSEN_A :: _1 } } # [ doc = "Write proxy for field `TCSEN`" ] pub struct TCSEN_W < 'a > { w : & 'a mut W , } impl < 'a > TCSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCSEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCSEN_A :: _1 ) } # [ 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 } } # [ doc = "Block Gap Event Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BGESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < BGESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BGESEN_A ) -> Self { match variant { BGESEN_A :: _0 => false , BGESEN_A :: _1 => true } } } # [ doc = "Reader of field `BGESEN`" ] pub type BGESEN_R = crate :: R < bool , BGESEN_A > ; impl BGESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BGESEN_A { match self . bits { false => BGESEN_A :: _0 , true => BGESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BGESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BGESEN_A :: _1 } } # [ doc = "Write proxy for field `BGESEN`" ] pub struct BGESEN_W < 'a > { w : & 'a mut W , } impl < 'a > BGESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BGESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BGESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BGESEN_A :: _1 ) } # [ 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 = "DMA Interrupt Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DINTSEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DINTSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DINTSEN_A ) -> Self { match variant { DINTSEN_A :: _0 => false , DINTSEN_A :: _1 => true } } } # [ doc = "Reader of field `DINTSEN`" ] pub type DINTSEN_R = crate :: R < bool , DINTSEN_A > ; impl DINTSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DINTSEN_A { match self . bits { false => DINTSEN_A :: _0 , true => DINTSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DINTSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DINTSEN_A :: _1 } } # [ doc = "Write proxy for field `DINTSEN`" ] pub struct DINTSEN_W < 'a > { w : & 'a mut W , } impl < 'a > DINTSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DINTSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DINTSEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DINTSEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Buffer Write Ready Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BWRSEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < BWRSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BWRSEN_A ) -> Self { match variant { BWRSEN_A :: _0 => false , BWRSEN_A :: _1 => true } } } # [ doc = "Reader of field `BWRSEN`" ] pub type BWRSEN_R = crate :: R < bool , BWRSEN_A > ; impl BWRSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BWRSEN_A { match self . bits { false => BWRSEN_A :: _0 , true => BWRSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BWRSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BWRSEN_A :: _1 } } # [ doc = "Write proxy for field `BWRSEN`" ] pub struct BWRSEN_W < 'a > { w : & 'a mut W , } impl < 'a > BWRSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BWRSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BWRSEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BWRSEN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Buffer Read Ready Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRRSEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < BRRSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BRRSEN_A ) -> Self { match variant { BRRSEN_A :: _0 => false , BRRSEN_A :: _1 => true } } } # [ doc = "Reader of field `BRRSEN`" ] pub type BRRSEN_R = crate :: R < bool , BRRSEN_A > ; impl BRRSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRRSEN_A { match self . bits { false => BRRSEN_A :: _0 , true => BRRSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRRSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRRSEN_A :: _1 } } # [ doc = "Write proxy for field `BRRSEN`" ] pub struct BRRSEN_W < 'a > { w : & 'a mut W , } impl < 'a > BRRSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRRSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRRSEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRRSEN_A :: _1 ) } # [ 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 = "Card Insertion Status Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CINSEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CINSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CINSEN_A ) -> Self { match variant { CINSEN_A :: _0 => false , CINSEN_A :: _1 => true } } } # [ doc = "Reader of field `CINSEN`" ] pub type CINSEN_R = crate :: R < bool , CINSEN_A > ; impl CINSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CINSEN_A { match self . bits { false => CINSEN_A :: _0 , true => CINSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CINSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CINSEN_A :: _1 } } # [ doc = "Write proxy for field `CINSEN`" ] pub struct CINSEN_W < 'a > { w : & 'a mut W , } impl < 'a > CINSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CINSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CINSEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CINSEN_A :: _1 ) } # [ 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 = "Card Removal Status Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRMSEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CRMSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CRMSEN_A ) -> Self { match variant { CRMSEN_A :: _0 => false , CRMSEN_A :: _1 => true } } } # [ doc = "Reader of field `CRMSEN`" ] pub type CRMSEN_R = crate :: R < bool , CRMSEN_A > ; impl CRMSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRMSEN_A { match self . bits { false => CRMSEN_A :: _0 , true => CRMSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRMSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRMSEN_A :: _1 } } # [ doc = "Write proxy for field `CRMSEN`" ] pub struct CRMSEN_W < 'a > { w : & 'a mut W , } impl < 'a > CRMSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRMSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRMSEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRMSEN_A :: _1 ) } # [ 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 = "Card Interrupt Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CINTSEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CINTSEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CINTSEN_A ) -> Self { match variant { CINTSEN_A :: _0 => false , CINTSEN_A :: _1 => true } } } # [ doc = "Reader of field `CINTSEN`" ] pub type CINTSEN_R = crate :: R < bool , CINTSEN_A > ; impl CINTSEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CINTSEN_A { match self . bits { false => CINTSEN_A :: _0 , true => CINTSEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CINTSEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CINTSEN_A :: _1 } } # [ doc = "Write proxy for field `CINTSEN`" ] pub struct CINTSEN_W < 'a > { w : & 'a mut W , } impl < 'a > CINTSEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CINTSEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CINTSEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CINTSEN_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Command Timeout Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTOESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CTOESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CTOESEN_A ) -> Self { match variant { CTOESEN_A :: _0 => false , CTOESEN_A :: _1 => true } } } # [ doc = "Reader of field `CTOESEN`" ] pub type CTOESEN_R = crate :: R < bool , CTOESEN_A > ; impl CTOESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CTOESEN_A { match self . bits { false => CTOESEN_A :: _0 , true => CTOESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CTOESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CTOESEN_A :: _1 } } # [ doc = "Write proxy for field `CTOESEN`" ] pub struct CTOESEN_W < 'a > { w : & 'a mut W , } impl < 'a > CTOESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTOESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CTOESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CTOESEN_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Command CRC Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CCESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CCESEN_A ) -> Self { match variant { CCESEN_A :: _0 => false , CCESEN_A :: _1 => true } } } # [ doc = "Reader of field `CCESEN`" ] pub type CCESEN_R = crate :: R < bool , CCESEN_A > ; impl CCESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCESEN_A { match self . bits { false => CCESEN_A :: _0 , true => CCESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCESEN_A :: _1 } } # [ doc = "Write proxy for field `CCESEN`" ] pub struct CCESEN_W < 'a > { w : & 'a mut W , } impl < 'a > CCESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CCESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CCESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CCESEN_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Command End Bit Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CEBESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CEBESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CEBESEN_A ) -> Self { match variant { CEBESEN_A :: _0 => false , CEBESEN_A :: _1 => true } } } # [ doc = "Reader of field `CEBESEN`" ] pub type CEBESEN_R = crate :: R < bool , CEBESEN_A > ; impl CEBESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CEBESEN_A { match self . bits { false => CEBESEN_A :: _0 , true => CEBESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CEBESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CEBESEN_A :: _1 } } # [ doc = "Write proxy for field `CEBESEN`" ] pub struct CEBESEN_W < 'a > { w : & 'a mut W , } impl < 'a > CEBESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CEBESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CEBESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CEBESEN_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Command Index Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CIESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CIESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CIESEN_A ) -> Self { match variant { CIESEN_A :: _0 => false , CIESEN_A :: _1 => true } } } # [ doc = "Reader of field `CIESEN`" ] pub type CIESEN_R = crate :: R < bool , CIESEN_A > ; impl CIESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CIESEN_A { match self . bits { false => CIESEN_A :: _0 , true => CIESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CIESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CIESEN_A :: _1 } } # [ doc = "Write proxy for field `CIESEN`" ] pub struct CIESEN_W < 'a > { w : & 'a mut W , } impl < 'a > CIESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CIESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CIESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CIESEN_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Data Timeout Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTOESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DTOESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DTOESEN_A ) -> Self { match variant { DTOESEN_A :: _0 => false , DTOESEN_A :: _1 => true } } } # [ doc = "Reader of field `DTOESEN`" ] pub type DTOESEN_R = crate :: R < bool , DTOESEN_A > ; impl DTOESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTOESEN_A { match self . bits { false => DTOESEN_A :: _0 , true => DTOESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTOESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTOESEN_A :: _1 } } # [ doc = "Write proxy for field `DTOESEN`" ] pub struct DTOESEN_W < 'a > { w : & 'a mut W , } impl < 'a > DTOESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTOESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTOESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTOESEN_A :: _1 ) } # [ 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 = "Data CRC Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DCESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DCESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DCESEN_A ) -> Self { match variant { DCESEN_A :: _0 => false , DCESEN_A :: _1 => true } } } # [ doc = "Reader of field `DCESEN`" ] pub type DCESEN_R = crate :: R < bool , DCESEN_A > ; impl DCESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DCESEN_A { match self . bits { false => DCESEN_A :: _0 , true => DCESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DCESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DCESEN_A :: _1 } } # [ doc = "Write proxy for field `DCESEN`" ] pub struct DCESEN_W < 'a > { w : & 'a mut W , } impl < 'a > DCESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DCESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DCESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DCESEN_A :: _1 ) } # [ 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 = "Data End Bit Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEBESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DEBESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DEBESEN_A ) -> Self { match variant { DEBESEN_A :: _0 => false , DEBESEN_A :: _1 => true } } } # [ doc = "Reader of field `DEBESEN`" ] pub type DEBESEN_R = crate :: R < bool , DEBESEN_A > ; impl DEBESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DEBESEN_A { match self . bits { false => DEBESEN_A :: _0 , true => DEBESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DEBESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DEBESEN_A :: _1 } } # [ doc = "Write proxy for field `DEBESEN`" ] pub struct DEBESEN_W < 'a > { w : & 'a mut W , } impl < 'a > DEBESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DEBESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DEBESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DEBESEN_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Auto CMD12 Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12ESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < AC12ESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12ESEN_A ) -> Self { match variant { AC12ESEN_A :: _0 => false , AC12ESEN_A :: _1 => true } } } # [ doc = "Reader of field `AC12ESEN`" ] pub type AC12ESEN_R = crate :: R < bool , AC12ESEN_A > ; impl AC12ESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12ESEN_A { match self . bits { false => AC12ESEN_A :: _0 , true => AC12ESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12ESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12ESEN_A :: _1 } } # [ doc = "Write proxy for field `AC12ESEN`" ] pub struct AC12ESEN_W < 'a > { w : & 'a mut W , } impl < 'a > AC12ESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AC12ESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AC12ESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AC12ESEN_A :: _1 ) } # [ 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 = "DMA Error Status Enable\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAESEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DMAESEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAESEN_A ) -> Self { match variant { DMAESEN_A :: _0 => false , DMAESEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAESEN`" ] pub type DMAESEN_R = crate :: R < bool , DMAESEN_A > ; impl DMAESEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAESEN_A { match self . bits { false => DMAESEN_A :: _0 , true => DMAESEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAESEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAESEN_A :: _1 } } # [ doc = "Write proxy for field `DMAESEN`" ] pub struct DMAESEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAESEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAESEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAESEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAESEN_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } impl R { # [ doc = "Bit 0 - Command Complete Status Enable" ] # [ inline ( always ) ] pub fn ccsen ( & self ) -> CCSEN_R { CCSEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transfer Complete Status Enable" ] # [ inline ( always ) ] pub fn tcsen ( & self ) -> TCSEN_R { TCSEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Block Gap Event Status Enable" ] # [ inline ( always ) ] pub fn bgesen ( & self ) -> BGESEN_R { BGESEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - DMA Interrupt Status Enable" ] # [ inline ( always ) ] pub fn dintsen ( & self ) -> DINTSEN_R { DINTSEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Buffer Write Ready Status Enable" ] # [ inline ( always ) ] pub fn bwrsen ( & self ) -> BWRSEN_R { BWRSEN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Buffer Read Ready Status Enable" ] # [ inline ( always ) ] pub fn brrsen ( & self ) -> BRRSEN_R { BRRSEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Card Insertion Status Enable" ] # [ inline ( always ) ] pub fn cinsen ( & self ) -> CINSEN_R { CINSEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Card Removal Status Enable" ] # [ inline ( always ) ] pub fn crmsen ( & self ) -> CRMSEN_R { CRMSEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Card Interrupt Status Enable" ] # [ inline ( always ) ] pub fn cintsen ( & self ) -> CINTSEN_R { CINTSEN_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Command Timeout Error Status Enable" ] # [ inline ( always ) ] pub fn ctoesen ( & self ) -> CTOESEN_R { CTOESEN_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Command CRC Error Status Enable" ] # [ inline ( always ) ] pub fn ccesen ( & self ) -> CCESEN_R { CCESEN_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Command End Bit Error Status Enable" ] # [ inline ( always ) ] pub fn cebesen ( & self ) -> CEBESEN_R { CEBESEN_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Command Index Error Status Enable" ] # [ inline ( always ) ] pub fn ciesen ( & self ) -> CIESEN_R { CIESEN_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Data Timeout Error Status Enable" ] # [ inline ( always ) ] pub fn dtoesen ( & self ) -> DTOESEN_R { DTOESEN_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Data CRC Error Status Enable" ] # [ inline ( always ) ] pub fn dcesen ( & self ) -> DCESEN_R { DCESEN_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Data End Bit Error Status Enable" ] # [ inline ( always ) ] pub fn debesen ( & self ) -> DEBESEN_R { DEBESEN_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Auto CMD12 Error Status Enable" ] # [ inline ( always ) ] pub fn ac12esen ( & self ) -> AC12ESEN_R { AC12ESEN_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - DMA Error Status Enable" ] # [ inline ( always ) ] pub fn dmaesen ( & self ) -> DMAESEN_R { DMAESEN_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Command Complete Status Enable" ] # [ inline ( always ) ] pub fn ccsen ( & mut self ) -> CCSEN_W { CCSEN_W { w : self } } # [ doc = "Bit 1 - Transfer Complete Status Enable" ] # [ inline ( always ) ] pub fn tcsen ( & mut self ) -> TCSEN_W { TCSEN_W { w : self } } # [ doc = "Bit 2 - Block Gap Event Status Enable" ] # [ inline ( always ) ] pub fn bgesen ( & mut self ) -> BGESEN_W { BGESEN_W { w : self } } # [ doc = "Bit 3 - DMA Interrupt Status Enable" ] # [ inline ( always ) ] pub fn dintsen ( & mut self ) -> DINTSEN_W { DINTSEN_W { w : self } } # [ doc = "Bit 4 - Buffer Write Ready Status Enable" ] # [ inline ( always ) ] pub fn bwrsen ( & mut self ) -> BWRSEN_W { BWRSEN_W { w : self } } # [ doc = "Bit 5 - Buffer Read Ready Status Enable" ] # [ inline ( always ) ] pub fn brrsen ( & mut self ) -> BRRSEN_W { BRRSEN_W { w : self } } # [ doc = "Bit 6 - Card Insertion Status Enable" ] # [ inline ( always ) ] pub fn cinsen ( & mut self ) -> CINSEN_W { CINSEN_W { w : self } } # [ doc = "Bit 7 - Card Removal Status Enable" ] # [ inline ( always ) ] pub fn crmsen ( & mut self ) -> CRMSEN_W { CRMSEN_W { w : self } } # [ doc = "Bit 8 - Card Interrupt Status Enable" ] # [ inline ( always ) ] pub fn cintsen ( & mut self ) -> CINTSEN_W { CINTSEN_W { w : self } } # [ doc = "Bit 16 - Command Timeout Error Status Enable" ] # [ inline ( always ) ] pub fn ctoesen ( & mut self ) -> CTOESEN_W { CTOESEN_W { w : self } } # [ doc = "Bit 17 - Command CRC Error Status Enable" ] # [ inline ( always ) ] pub fn ccesen ( & mut self ) -> CCESEN_W { CCESEN_W { w : self } } # [ doc = "Bit 18 - Command End Bit Error Status Enable" ] # [ inline ( always ) ] pub fn cebesen ( & mut self ) -> CEBESEN_W { CEBESEN_W { w : self } } # [ doc = "Bit 19 - Command Index Error Status Enable" ] # [ inline ( always ) ] pub fn ciesen ( & mut self ) -> CIESEN_W { CIESEN_W { w : self } } # [ doc = "Bit 20 - Data Timeout Error Status Enable" ] # [ inline ( always ) ] pub fn dtoesen ( & mut self ) -> DTOESEN_W { DTOESEN_W { w : self } } # [ doc = "Bit 21 - Data CRC Error Status Enable" ] # [ inline ( always ) ] pub fn dcesen ( & mut self ) -> DCESEN_W { DCESEN_W { w : self } } # [ doc = "Bit 22 - Data End Bit Error Status Enable" ] # [ inline ( always ) ] pub fn debesen ( & mut self ) -> DEBESEN_W { DEBESEN_W { w : self } } # [ doc = "Bit 24 - Auto CMD12 Error Status Enable" ] # [ inline ( always ) ] pub fn ac12esen ( & mut self ) -> AC12ESEN_W { AC12ESEN_W { w : self } } # [ doc = "Bit 28 - DMA Error Status Enable" ] # [ inline ( always ) ] pub fn dmaesen ( & mut self ) -> DMAESEN_W { DMAESEN_W { w : self } } } } # [ doc = "Interrupt Signal Enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [irqsigen](irqsigen) module" ] pub type IRQSIGEN = crate :: Reg < u32 , _IRQSIGEN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IRQSIGEN ; # [ doc = "`read()` method returns [irqsigen::R](irqsigen::R) reader structure" ] impl crate :: Readable for IRQSIGEN { } # [ doc = "`write(|w| ..)` method takes [irqsigen::W](irqsigen::W) writer structure" ] impl crate :: Writable for IRQSIGEN { } # [ doc = "Interrupt Signal Enable register" ] pub mod irqsigen { # [ doc = "Reader of register IRQSIGEN" ] pub type R = crate :: R < u32 , super :: IRQSIGEN > ; # [ doc = "Writer for register IRQSIGEN" ] pub type W = crate :: W < u32 , super :: IRQSIGEN > ; # [ doc = "Register IRQSIGEN `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IRQSIGEN { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Command Complete Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CCIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CCIEN_A ) -> Self { match variant { CCIEN_A :: _0 => false , CCIEN_A :: _1 => true } } } # [ doc = "Reader of field `CCIEN`" ] pub type CCIEN_R = crate :: R < bool , CCIEN_A > ; impl CCIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCIEN_A { match self . bits { false => CCIEN_A :: _0 , true => CCIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCIEN_A :: _1 } } # [ doc = "Write proxy for field `CCIEN`" ] pub struct CCIEN_W < 'a > { w : & 'a mut W , } impl < 'a > CCIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CCIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CCIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CCIEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Transfer Complete Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < TCIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : TCIEN_A ) -> Self { match variant { TCIEN_A :: _0 => false , TCIEN_A :: _1 => true } } } # [ doc = "Reader of field `TCIEN`" ] pub type TCIEN_R = crate :: R < bool , TCIEN_A > ; impl TCIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCIEN_A { match self . bits { false => TCIEN_A :: _0 , true => TCIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCIEN_A :: _1 } } # [ doc = "Write proxy for field `TCIEN`" ] pub struct TCIEN_W < 'a > { w : & 'a mut W , } impl < 'a > TCIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCIEN_A :: _1 ) } # [ 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 } } # [ doc = "Block Gap Event Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BGEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < BGEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BGEIEN_A ) -> Self { match variant { BGEIEN_A :: _0 => false , BGEIEN_A :: _1 => true } } } # [ doc = "Reader of field `BGEIEN`" ] pub type BGEIEN_R = crate :: R < bool , BGEIEN_A > ; impl BGEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BGEIEN_A { match self . bits { false => BGEIEN_A :: _0 , true => BGEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BGEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BGEIEN_A :: _1 } } # [ doc = "Write proxy for field `BGEIEN`" ] pub struct BGEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > BGEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BGEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BGEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BGEIEN_A :: _1 ) } # [ 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 = "DMA Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DINTIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DINTIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DINTIEN_A ) -> Self { match variant { DINTIEN_A :: _0 => false , DINTIEN_A :: _1 => true } } } # [ doc = "Reader of field `DINTIEN`" ] pub type DINTIEN_R = crate :: R < bool , DINTIEN_A > ; impl DINTIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DINTIEN_A { match self . bits { false => DINTIEN_A :: _0 , true => DINTIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DINTIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DINTIEN_A :: _1 } } # [ doc = "Write proxy for field `DINTIEN`" ] pub struct DINTIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DINTIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DINTIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DINTIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DINTIEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Buffer Write Ready Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BWRIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < BWRIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BWRIEN_A ) -> Self { match variant { BWRIEN_A :: _0 => false , BWRIEN_A :: _1 => true } } } # [ doc = "Reader of field `BWRIEN`" ] pub type BWRIEN_R = crate :: R < bool , BWRIEN_A > ; impl BWRIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BWRIEN_A { match self . bits { false => BWRIEN_A :: _0 , true => BWRIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BWRIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BWRIEN_A :: _1 } } # [ doc = "Write proxy for field `BWRIEN`" ] pub struct BWRIEN_W < 'a > { w : & 'a mut W , } impl < 'a > BWRIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BWRIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BWRIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BWRIEN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Buffer Read Ready Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRRIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < BRRIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BRRIEN_A ) -> Self { match variant { BRRIEN_A :: _0 => false , BRRIEN_A :: _1 => true } } } # [ doc = "Reader of field `BRRIEN`" ] pub type BRRIEN_R = crate :: R < bool , BRRIEN_A > ; impl BRRIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRRIEN_A { match self . bits { false => BRRIEN_A :: _0 , true => BRRIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRRIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRRIEN_A :: _1 } } # [ doc = "Write proxy for field `BRRIEN`" ] pub struct BRRIEN_W < 'a > { w : & 'a mut W , } impl < 'a > BRRIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRRIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRRIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRRIEN_A :: _1 ) } # [ 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 = "Card Insertion Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CINSIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CINSIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CINSIEN_A ) -> Self { match variant { CINSIEN_A :: _0 => false , CINSIEN_A :: _1 => true } } } # [ doc = "Reader of field `CINSIEN`" ] pub type CINSIEN_R = crate :: R < bool , CINSIEN_A > ; impl CINSIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CINSIEN_A { match self . bits { false => CINSIEN_A :: _0 , true => CINSIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CINSIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CINSIEN_A :: _1 } } # [ doc = "Write proxy for field `CINSIEN`" ] pub struct CINSIEN_W < 'a > { w : & 'a mut W , } impl < 'a > CINSIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CINSIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CINSIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CINSIEN_A :: _1 ) } # [ 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 = "Card Removal Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRMIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CRMIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CRMIEN_A ) -> Self { match variant { CRMIEN_A :: _0 => false , CRMIEN_A :: _1 => true } } } # [ doc = "Reader of field `CRMIEN`" ] pub type CRMIEN_R = crate :: R < bool , CRMIEN_A > ; impl CRMIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRMIEN_A { match self . bits { false => CRMIEN_A :: _0 , true => CRMIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRMIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRMIEN_A :: _1 } } # [ doc = "Write proxy for field `CRMIEN`" ] pub struct CRMIEN_W < 'a > { w : & 'a mut W , } impl < 'a > CRMIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRMIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRMIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRMIEN_A :: _1 ) } # [ 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 = "Card Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CINTIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CINTIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CINTIEN_A ) -> Self { match variant { CINTIEN_A :: _0 => false , CINTIEN_A :: _1 => true } } } # [ doc = "Reader of field `CINTIEN`" ] pub type CINTIEN_R = crate :: R < bool , CINTIEN_A > ; impl CINTIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CINTIEN_A { match self . bits { false => CINTIEN_A :: _0 , true => CINTIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CINTIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CINTIEN_A :: _1 } } # [ doc = "Write proxy for field `CINTIEN`" ] pub struct CINTIEN_W < 'a > { w : & 'a mut W , } impl < 'a > CINTIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CINTIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CINTIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CINTIEN_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Command Timeout Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTOEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CTOEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CTOEIEN_A ) -> Self { match variant { CTOEIEN_A :: _0 => false , CTOEIEN_A :: _1 => true } } } # [ doc = "Reader of field `CTOEIEN`" ] pub type CTOEIEN_R = crate :: R < bool , CTOEIEN_A > ; impl CTOEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CTOEIEN_A { match self . bits { false => CTOEIEN_A :: _0 , true => CTOEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CTOEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CTOEIEN_A :: _1 } } # [ doc = "Write proxy for field `CTOEIEN`" ] pub struct CTOEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > CTOEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CTOEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CTOEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CTOEIEN_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Command CRC Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CCEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CCEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CCEIEN_A ) -> Self { match variant { CCEIEN_A :: _0 => false , CCEIEN_A :: _1 => true } } } # [ doc = "Reader of field `CCEIEN`" ] pub type CCEIEN_R = crate :: R < bool , CCEIEN_A > ; impl CCEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CCEIEN_A { match self . bits { false => CCEIEN_A :: _0 , true => CCEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CCEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CCEIEN_A :: _1 } } # [ doc = "Write proxy for field `CCEIEN`" ] pub struct CCEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > CCEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CCEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CCEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CCEIEN_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Command End Bit Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CEBEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CEBEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CEBEIEN_A ) -> Self { match variant { CEBEIEN_A :: _0 => false , CEBEIEN_A :: _1 => true } } } # [ doc = "Reader of field `CEBEIEN`" ] pub type CEBEIEN_R = crate :: R < bool , CEBEIEN_A > ; impl CEBEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CEBEIEN_A { match self . bits { false => CEBEIEN_A :: _0 , true => CEBEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CEBEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CEBEIEN_A :: _1 } } # [ doc = "Write proxy for field `CEBEIEN`" ] pub struct CEBEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > CEBEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CEBEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CEBEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CEBEIEN_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Command Index Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CIEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < CIEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CIEIEN_A ) -> Self { match variant { CIEIEN_A :: _0 => false , CIEIEN_A :: _1 => true } } } # [ doc = "Reader of field `CIEIEN`" ] pub type CIEIEN_R = crate :: R < bool , CIEIEN_A > ; impl CIEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CIEIEN_A { match self . bits { false => CIEIEN_A :: _0 , true => CIEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CIEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CIEIEN_A :: _1 } } # [ doc = "Write proxy for field `CIEIEN`" ] pub struct CIEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > CIEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CIEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CIEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CIEIEN_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Data Timeout Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTOEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DTOEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DTOEIEN_A ) -> Self { match variant { DTOEIEN_A :: _0 => false , DTOEIEN_A :: _1 => true } } } # [ doc = "Reader of field `DTOEIEN`" ] pub type DTOEIEN_R = crate :: R < bool , DTOEIEN_A > ; impl DTOEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DTOEIEN_A { match self . bits { false => DTOEIEN_A :: _0 , true => DTOEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DTOEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DTOEIEN_A :: _1 } } # [ doc = "Write proxy for field `DTOEIEN`" ] pub struct DTOEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DTOEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTOEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DTOEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DTOEIEN_A :: _1 ) } # [ 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 = "Data CRC Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DCEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DCEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DCEIEN_A ) -> Self { match variant { DCEIEN_A :: _0 => false , DCEIEN_A :: _1 => true } } } # [ doc = "Reader of field `DCEIEN`" ] pub type DCEIEN_R = crate :: R < bool , DCEIEN_A > ; impl DCEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DCEIEN_A { match self . bits { false => DCEIEN_A :: _0 , true => DCEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DCEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DCEIEN_A :: _1 } } # [ doc = "Write proxy for field `DCEIEN`" ] pub struct DCEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DCEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DCEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DCEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DCEIEN_A :: _1 ) } # [ 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 = "Data End Bit Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEBEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DEBEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DEBEIEN_A ) -> Self { match variant { DEBEIEN_A :: _0 => false , DEBEIEN_A :: _1 => true } } } # [ doc = "Reader of field `DEBEIEN`" ] pub type DEBEIEN_R = crate :: R < bool , DEBEIEN_A > ; impl DEBEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DEBEIEN_A { match self . bits { false => DEBEIEN_A :: _0 , true => DEBEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DEBEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DEBEIEN_A :: _1 } } # [ doc = "Write proxy for field `DEBEIEN`" ] pub struct DEBEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DEBEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DEBEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DEBEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DEBEIEN_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Auto CMD12 Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12EIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < AC12EIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12EIEN_A ) -> Self { match variant { AC12EIEN_A :: _0 => false , AC12EIEN_A :: _1 => true } } } # [ doc = "Reader of field `AC12EIEN`" ] pub type AC12EIEN_R = crate :: R < bool , AC12EIEN_A > ; impl AC12EIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12EIEN_A { match self . bits { false => AC12EIEN_A :: _0 , true => AC12EIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12EIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12EIEN_A :: _1 } } # [ doc = "Write proxy for field `AC12EIEN`" ] pub struct AC12EIEN_W < 'a > { w : & 'a mut W , } impl < 'a > AC12EIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AC12EIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AC12EIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AC12EIEN_A :: _1 ) } # [ 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 = "DMA Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEIEN_A { # [ doc = "0: Masked" ] _0 , # [ doc = "1: Enabled" ] _1 } impl From < DMAEIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEIEN_A ) -> Self { match variant { DMAEIEN_A :: _0 => false , DMAEIEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEIEN`" ] pub type DMAEIEN_R = crate :: R < bool , DMAEIEN_A > ; impl DMAEIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEIEN_A { match self . bits { false => DMAEIEN_A :: _0 , true => DMAEIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEIEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEIEN`" ] pub struct DMAEIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Masked" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEIEN_A :: _0 ) } # [ doc = "Enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEIEN_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } impl R { # [ doc = "Bit 0 - Command Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn ccien ( & self ) -> CCIEN_R { CCIEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transfer Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcien ( & self ) -> TCIEN_R { TCIEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Block Gap Event Interrupt Enable" ] # [ inline ( always ) ] pub fn bgeien ( & self ) -> BGEIEN_R { BGEIEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - DMA Interrupt Enable" ] # [ inline ( always ) ] pub fn dintien ( & self ) -> DINTIEN_R { DINTIEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Buffer Write Ready Interrupt Enable" ] # [ inline ( always ) ] pub fn bwrien ( & self ) -> BWRIEN_R { BWRIEN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Buffer Read Ready Interrupt Enable" ] # [ inline ( always ) ] pub fn brrien ( & self ) -> BRRIEN_R { BRRIEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Card Insertion Interrupt Enable" ] # [ inline ( always ) ] pub fn cinsien ( & self ) -> CINSIEN_R { CINSIEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Card Removal Interrupt Enable" ] # [ inline ( always ) ] pub fn crmien ( & self ) -> CRMIEN_R { CRMIEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Card Interrupt Enable" ] # [ inline ( always ) ] pub fn cintien ( & self ) -> CINTIEN_R { CINTIEN_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Command Timeout Error Interrupt Enable" ] # [ inline ( always ) ] pub fn ctoeien ( & self ) -> CTOEIEN_R { CTOEIEN_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Command CRC Error Interrupt Enable" ] # [ inline ( always ) ] pub fn cceien ( & self ) -> CCEIEN_R { CCEIEN_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Command End Bit Error Interrupt Enable" ] # [ inline ( always ) ] pub fn cebeien ( & self ) -> CEBEIEN_R { CEBEIEN_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Command Index Error Interrupt Enable" ] # [ inline ( always ) ] pub fn cieien ( & self ) -> CIEIEN_R { CIEIEN_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Data Timeout Error Interrupt Enable" ] # [ inline ( always ) ] pub fn dtoeien ( & self ) -> DTOEIEN_R { DTOEIEN_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Data CRC Error Interrupt Enable" ] # [ inline ( always ) ] pub fn dceien ( & self ) -> DCEIEN_R { DCEIEN_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Data End Bit Error Interrupt Enable" ] # [ inline ( always ) ] pub fn debeien ( & self ) -> DEBEIEN_R { DEBEIEN_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Auto CMD12 Error Interrupt Enable" ] # [ inline ( always ) ] pub fn ac12eien ( & self ) -> AC12EIEN_R { AC12EIEN_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - DMA Error Interrupt Enable" ] # [ inline ( always ) ] pub fn dmaeien ( & self ) -> DMAEIEN_R { DMAEIEN_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Command Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn ccien ( & mut self ) -> CCIEN_W { CCIEN_W { w : self } } # [ doc = "Bit 1 - Transfer Complete Interrupt Enable" ] # [ inline ( always ) ] pub fn tcien ( & mut self ) -> TCIEN_W { TCIEN_W { w : self } } # [ doc = "Bit 2 - Block Gap Event Interrupt Enable" ] # [ inline ( always ) ] pub fn bgeien ( & mut self ) -> BGEIEN_W { BGEIEN_W { w : self } } # [ doc = "Bit 3 - DMA Interrupt Enable" ] # [ inline ( always ) ] pub fn dintien ( & mut self ) -> DINTIEN_W { DINTIEN_W { w : self } } # [ doc = "Bit 4 - Buffer Write Ready Interrupt Enable" ] # [ inline ( always ) ] pub fn bwrien ( & mut self ) -> BWRIEN_W { BWRIEN_W { w : self } } # [ doc = "Bit 5 - Buffer Read Ready Interrupt Enable" ] # [ inline ( always ) ] pub fn brrien ( & mut self ) -> BRRIEN_W { BRRIEN_W { w : self } } # [ doc = "Bit 6 - Card Insertion Interrupt Enable" ] # [ inline ( always ) ] pub fn cinsien ( & mut self ) -> CINSIEN_W { CINSIEN_W { w : self } } # [ doc = "Bit 7 - Card Removal Interrupt Enable" ] # [ inline ( always ) ] pub fn crmien ( & mut self ) -> CRMIEN_W { CRMIEN_W { w : self } } # [ doc = "Bit 8 - Card Interrupt Enable" ] # [ inline ( always ) ] pub fn cintien ( & mut self ) -> CINTIEN_W { CINTIEN_W { w : self } } # [ doc = "Bit 16 - Command Timeout Error Interrupt Enable" ] # [ inline ( always ) ] pub fn ctoeien ( & mut self ) -> CTOEIEN_W { CTOEIEN_W { w : self } } # [ doc = "Bit 17 - Command CRC Error Interrupt Enable" ] # [ inline ( always ) ] pub fn cceien ( & mut self ) -> CCEIEN_W { CCEIEN_W { w : self } } # [ doc = "Bit 18 - Command End Bit Error Interrupt Enable" ] # [ inline ( always ) ] pub fn cebeien ( & mut self ) -> CEBEIEN_W { CEBEIEN_W { w : self } } # [ doc = "Bit 19 - Command Index Error Interrupt Enable" ] # [ inline ( always ) ] pub fn cieien ( & mut self ) -> CIEIEN_W { CIEIEN_W { w : self } } # [ doc = "Bit 20 - Data Timeout Error Interrupt Enable" ] # [ inline ( always ) ] pub fn dtoeien ( & mut self ) -> DTOEIEN_W { DTOEIEN_W { w : self } } # [ doc = "Bit 21 - Data CRC Error Interrupt Enable" ] # [ inline ( always ) ] pub fn dceien ( & mut self ) -> DCEIEN_W { DCEIEN_W { w : self } } # [ doc = "Bit 22 - Data End Bit Error Interrupt Enable" ] # [ inline ( always ) ] pub fn debeien ( & mut self ) -> DEBEIEN_W { DEBEIEN_W { w : self } } # [ doc = "Bit 24 - Auto CMD12 Error Interrupt Enable" ] # [ inline ( always ) ] pub fn ac12eien ( & mut self ) -> AC12EIEN_W { AC12EIEN_W { w : self } } # [ doc = "Bit 28 - DMA Error Interrupt Enable" ] # [ inline ( always ) ] pub fn dmaeien ( & mut self ) -> DMAEIEN_W { DMAEIEN_W { w : self } } } } # [ doc = "Auto CMD12 Error Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ac12err](ac12err) module" ] pub type AC12ERR = crate :: Reg < u32 , _AC12ERR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _AC12ERR ; # [ doc = "`read()` method returns [ac12err::R](ac12err::R) reader structure" ] impl crate :: Readable for AC12ERR { } # [ doc = "Auto CMD12 Error Status Register" ] pub mod ac12err { # [ doc = "Reader of register AC12ERR" ] pub type R = crate :: R < u32 , super :: AC12ERR > ; # [ doc = "Auto CMD12 Not Executed\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12NE_A { # [ doc = "0: Executed." ] _0 , # [ doc = "1: Not executed." ] _1 } impl From < AC12NE_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12NE_A ) -> Self { match variant { AC12NE_A :: _0 => false , AC12NE_A :: _1 => true } } } # [ doc = "Reader of field `AC12NE`" ] pub type AC12NE_R = crate :: R < bool , AC12NE_A > ; impl AC12NE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12NE_A { match self . bits { false => AC12NE_A :: _0 , true => AC12NE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12NE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12NE_A :: _1 } } # [ doc = "Auto CMD12 Timeout Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12TOE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Time out." ] _1 } impl From < AC12TOE_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12TOE_A ) -> Self { match variant { AC12TOE_A :: _0 => false , AC12TOE_A :: _1 => true } } } # [ doc = "Reader of field `AC12TOE`" ] pub type AC12TOE_R = crate :: R < bool , AC12TOE_A > ; impl AC12TOE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12TOE_A { match self . bits { false => AC12TOE_A :: _0 , true => AC12TOE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12TOE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12TOE_A :: _1 } } # [ doc = "Auto CMD12 End Bit Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12EBE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: End bit error generated." ] _1 } impl From < AC12EBE_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12EBE_A ) -> Self { match variant { AC12EBE_A :: _0 => false , AC12EBE_A :: _1 => true } } } # [ doc = "Reader of field `AC12EBE`" ] pub type AC12EBE_R = crate :: R < bool , AC12EBE_A > ; impl AC12EBE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12EBE_A { match self . bits { false => AC12EBE_A :: _0 , true => AC12EBE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12EBE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12EBE_A :: _1 } } # [ doc = "Auto CMD12 CRC Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12CE_A { # [ doc = "0: No CRC error." ] _0 , # [ doc = "1: CRC error met in Auto CMD12 response." ] _1 } impl From < AC12CE_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12CE_A ) -> Self { match variant { AC12CE_A :: _0 => false , AC12CE_A :: _1 => true } } } # [ doc = "Reader of field `AC12CE`" ] pub type AC12CE_R = crate :: R < bool , AC12CE_A > ; impl AC12CE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12CE_A { match self . bits { false => AC12CE_A :: _0 , true => AC12CE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12CE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12CE_A :: _1 } } # [ doc = "Auto CMD12 Index Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AC12IE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Error, the CMD index in response is not CMD12." ] _1 } impl From < AC12IE_A > for bool { # [ inline ( always ) ] fn from ( variant : AC12IE_A ) -> Self { match variant { AC12IE_A :: _0 => false , AC12IE_A :: _1 => true } } } # [ doc = "Reader of field `AC12IE`" ] pub type AC12IE_R = crate :: R < bool , AC12IE_A > ; impl AC12IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AC12IE_A { match self . bits { false => AC12IE_A :: _0 , true => AC12IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AC12IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AC12IE_A :: _1 } } # [ doc = "Command Not Issued By Auto CMD12 Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNIBAC12E_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Not issued." ] _1 } impl From < CNIBAC12E_A > for bool { # [ inline ( always ) ] fn from ( variant : CNIBAC12E_A ) -> Self { match variant { CNIBAC12E_A :: _0 => false , CNIBAC12E_A :: _1 => true } } } # [ doc = "Reader of field `CNIBAC12E`" ] pub type CNIBAC12E_R = crate :: R < bool , CNIBAC12E_A > ; impl CNIBAC12E_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNIBAC12E_A { match self . bits { false => CNIBAC12E_A :: _0 , true => CNIBAC12E_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNIBAC12E_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNIBAC12E_A :: _1 } } impl R { # [ doc = "Bit 0 - Auto CMD12 Not Executed" ] # [ inline ( always ) ] pub fn ac12ne ( & self ) -> AC12NE_R { AC12NE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Auto CMD12 Timeout Error" ] # [ inline ( always ) ] pub fn ac12toe ( & self ) -> AC12TOE_R { AC12TOE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Auto CMD12 End Bit Error" ] # [ inline ( always ) ] pub fn ac12ebe ( & self ) -> AC12EBE_R { AC12EBE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Auto CMD12 CRC Error" ] # [ inline ( always ) ] pub fn ac12ce ( & self ) -> AC12CE_R { AC12CE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Auto CMD12 Index Error" ] # [ inline ( always ) ] pub fn ac12ie ( & self ) -> AC12IE_R { AC12IE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Command Not Issued By Auto CMD12 Error" ] # [ inline ( always ) ] pub fn cnibac12e ( & self ) -> CNIBAC12E_R { CNIBAC12E_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } } # [ doc = "Host Controller Capabilities\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [htcapblt](htcapblt) module" ] pub type HTCAPBLT = crate :: Reg < u32 , _HTCAPBLT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HTCAPBLT ; # [ doc = "`read()` method returns [htcapblt::R](htcapblt::R) reader structure" ] impl crate :: Readable for HTCAPBLT { } # [ doc = "Host Controller Capabilities" ] pub mod htcapblt { # [ doc = "Reader of register HTCAPBLT" ] pub type R = crate :: R < u32 , super :: HTCAPBLT > ; # [ doc = "Max Block Length\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MBL_A { # [ doc = "0: 512 bytes" ] _000 , # [ doc = "1: 1024 bytes" ] _001 , # [ doc = "2: 2048 bytes" ] _010 , # [ doc = "3: 4096 bytes" ] _011 } impl From < MBL_A > for u8 { # [ inline ( always ) ] fn from ( variant : MBL_A ) -> Self { match variant { MBL_A :: _000 => 0 , MBL_A :: _001 => 1 , MBL_A :: _010 => 2 , MBL_A :: _011 => 3 } } } # [ doc = "Reader of field `MBL`" ] pub type MBL_R = crate :: R < u8 , MBL_A > ; impl MBL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , MBL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( MBL_A :: _000 ) , 1 => Val ( MBL_A :: _001 ) , 2 => Val ( MBL_A :: _010 ) , 3 => Val ( MBL_A :: _011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == MBL_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == MBL_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == MBL_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == MBL_A :: _011 } } # [ doc = "ADMA Support\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADMAS_A { # [ doc = "0: Advanced DMA not supported." ] _0 , # [ doc = "1: Advanced DMA supported." ] _1 } impl From < ADMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : ADMAS_A ) -> Self { match variant { ADMAS_A :: _0 => false , ADMAS_A :: _1 => true } } } # [ doc = "Reader of field `ADMAS`" ] pub type ADMAS_R = crate :: R < bool , ADMAS_A > ; impl ADMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADMAS_A { match self . bits { false => ADMAS_A :: _0 , true => ADMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADMAS_A :: _1 } } # [ doc = "High Speed Support\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HSS_A { # [ doc = "0: High speed not supported." ] _0 , # [ doc = "1: High speed supported." ] _1 } impl From < HSS_A > for bool { # [ inline ( always ) ] fn from ( variant : HSS_A ) -> Self { match variant { HSS_A :: _0 => false , HSS_A :: _1 => true } } } # [ doc = "Reader of field `HSS`" ] pub type HSS_R = crate :: R < bool , HSS_A > ; impl HSS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HSS_A { match self . bits { false => HSS_A :: _0 , true => HSS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HSS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HSS_A :: _1 } } # [ doc = "DMA Support\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAS_A { # [ doc = "0: DMA not supported." ] _0 , # [ doc = "1: DMA supported." ] _1 } impl From < DMAS_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAS_A ) -> Self { match variant { DMAS_A :: _0 => false , DMAS_A :: _1 => true } } } # [ doc = "Reader of field `DMAS`" ] pub type DMAS_R = crate :: R < bool , DMAS_A > ; impl DMAS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAS_A { match self . bits { false => DMAS_A :: _0 , true => DMAS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAS_A :: _1 } } # [ doc = "Suspend/Resume Support\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRS_A { # [ doc = "0: Not supported." ] _0 , # [ doc = "1: Supported." ] _1 } impl From < SRS_A > for bool { # [ inline ( always ) ] fn from ( variant : SRS_A ) -> Self { match variant { SRS_A :: _0 => false , SRS_A :: _1 => true } } } # [ doc = "Reader of field `SRS`" ] pub type SRS_R = crate :: R < bool , SRS_A > ; impl SRS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRS_A { match self . bits { false => SRS_A :: _0 , true => SRS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SRS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SRS_A :: _1 } } # [ doc = "Voltage Support 3.3 V\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VS33_A { # [ doc = "0: 3.3 V not supported." ] _0 , # [ doc = "1: 3.3 V supported." ] _1 } impl From < VS33_A > for bool { # [ inline ( always ) ] fn from ( variant : VS33_A ) -> Self { match variant { VS33_A :: _0 => false , VS33_A :: _1 => true } } } # [ doc = "Reader of field `VS33`" ] pub type VS33_R = crate :: R < bool , VS33_A > ; impl VS33_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VS33_A { match self . bits { false => VS33_A :: _0 , true => VS33_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VS33_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VS33_A :: _1 } } impl R { # [ doc = "Bits 16:18 - Max Block Length" ] # [ inline ( always ) ] pub fn mbl ( & self ) -> MBL_R { MBL_R :: new ( ( ( self . bits >> 16 ) & 0x07 ) as u8 ) } # [ doc = "Bit 20 - ADMA Support" ] # [ inline ( always ) ] pub fn admas ( & self ) -> ADMAS_R { ADMAS_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - High Speed Support" ] # [ inline ( always ) ] pub fn hss ( & self ) -> HSS_R { HSS_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - DMA Support" ] # [ inline ( always ) ] pub fn dmas ( & self ) -> DMAS_R { DMAS_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Suspend/Resume Support" ] # [ inline ( always ) ] pub fn srs ( & self ) -> SRS_R { SRS_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Voltage Support 3.3 V" ] # [ inline ( always ) ] pub fn vs33 ( & self ) -> VS33_R { VS33_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } } # [ doc = "Watermark Level Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wml](wml) module" ] pub type WML = crate :: Reg < u32 , _WML > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _WML ; # [ doc = "`read()` method returns [wml::R](wml::R) reader structure" ] impl crate :: Readable for WML { } # [ doc = "`write(|w| ..)` method takes [wml::W](wml::W) writer structure" ] impl crate :: Writable for WML { } # [ doc = "Watermark Level Register" ] pub mod wml { # [ doc = "Reader of register WML" ] pub type R = crate :: R < u32 , super :: WML > ; # [ doc = "Writer for register WML" ] pub type W = crate :: W < u32 , super :: WML > ; # [ doc = "Register WML `reset()`'s with value 0x0010_0010" ] impl crate :: ResetValue for super :: WML { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0010_0010 } } # [ doc = "Reader of field `RDWML`" ] pub type RDWML_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RDWML`" ] pub struct RDWML_W < 'a > { w : & 'a mut W , } impl < 'a > RDWML_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `WRWML`" ] pub type WRWML_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `WRWML`" ] pub struct WRWML_W < 'a > { w : & 'a mut W , } impl < 'a > WRWML_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Read Watermark Level" ] # [ inline ( always ) ] pub fn rdwml ( & self ) -> RDWML_R { RDWML_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Write Watermark Level" ] # [ inline ( always ) ] pub fn wrwml ( & self ) -> WRWML_R { WRWML_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Read Watermark Level" ] # [ inline ( always ) ] pub fn rdwml ( & mut self ) -> RDWML_W { RDWML_W { w : self } } # [ doc = "Bits 16:23 - Write Watermark Level" ] # [ inline ( always ) ] pub fn wrwml ( & mut self ) -> WRWML_W { WRWML_W { w : self } } } } # [ doc = "Force Event register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fevt](fevt) module" ] pub type FEVT = crate :: Reg < u32 , _FEVT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FEVT ; # [ doc = "`write(|w| ..)` method takes [fevt::W](fevt::W) writer structure" ] impl crate :: Writable for FEVT { } # [ doc = "Force Event register" ] pub mod fevt { # [ doc = "Writer for register FEVT" ] pub type W = crate :: W < u32 , super :: FEVT > ; # [ doc = "Register FEVT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FEVT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `AC12NE`" ] pub struct AC12NE_W < 'a > { w : & 'a mut W , } impl < 'a > AC12NE_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write proxy for field `AC12TOE`" ] pub struct AC12TOE_W < 'a > { w : & 'a mut W , } impl < 'a > AC12TOE_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 } } # [ doc = "Write proxy for field `AC12CE`" ] pub struct AC12CE_W < 'a > { w : & 'a mut W , } impl < 'a > AC12CE_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 = "Write proxy for field `AC12EBE`" ] pub struct AC12EBE_W < 'a > { w : & 'a mut W , } impl < 'a > AC12EBE_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Write proxy for field `AC12IE`" ] pub struct AC12IE_W < 'a > { w : & 'a mut W , } impl < 'a > AC12IE_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Write proxy for field `CNIBAC12E`" ] pub struct CNIBAC12E_W < 'a > { w : & 'a mut W , } impl < 'a > CNIBAC12E_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 = "Write proxy for field `CTOE`" ] pub struct CTOE_W < 'a > { w : & 'a mut W , } impl < 'a > CTOE_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Write proxy for field `CCE`" ] pub struct CCE_W < 'a > { w : & 'a mut W , } impl < 'a > CCE_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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Write proxy for field `CEBE`" ] pub struct CEBE_W < 'a > { w : & 'a mut W , } impl < 'a > CEBE_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Write proxy for field `CIE`" ] pub struct CIE_W < 'a > { w : & 'a mut W , } impl < 'a > CIE_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Write proxy for field `DTOE`" ] pub struct DTOE_W < 'a > { w : & 'a mut W , } impl < 'a > DTOE_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 = "Write proxy for field `DCE`" ] pub struct DCE_W < 'a > { w : & 'a mut W , } impl < 'a > DCE_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 = "Write proxy for field `DEBE`" ] pub struct DEBE_W < 'a > { w : & 'a mut W , } impl < 'a > DEBE_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Write proxy for field `AC12E`" ] pub struct AC12E_W < 'a > { w : & 'a mut W , } impl < 'a > AC12E_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 = "Write proxy for field `DMAE`" ] pub struct DMAE_W < 'a > { w : & 'a mut W , } impl < 'a > DMAE_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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Write proxy for field `CINT`" ] pub struct CINT_W < 'a > { w : & 'a mut W , } impl < 'a > CINT_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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Force Event Auto Command 12 Not Executed" ] # [ inline ( always ) ] pub fn ac12ne ( & mut self ) -> AC12NE_W { AC12NE_W { w : self } } # [ doc = "Bit 1 - Force Event Auto Command 12 Time Out Error" ] # [ inline ( always ) ] pub fn ac12toe ( & mut self ) -> AC12TOE_W { AC12TOE_W { w : self } } # [ doc = "Bit 2 - Force Event Auto Command 12 CRC Error" ] # [ inline ( always ) ] pub fn ac12ce ( & mut self ) -> AC12CE_W { AC12CE_W { w : self } } # [ doc = "Bit 3 - Force Event Auto Command 12 End Bit Error" ] # [ inline ( always ) ] pub fn ac12ebe ( & mut self ) -> AC12EBE_W { AC12EBE_W { w : self } } # [ doc = "Bit 4 - Force Event Auto Command 12 Index Error" ] # [ inline ( always ) ] pub fn ac12ie ( & mut self ) -> AC12IE_W { AC12IE_W { w : self } } # [ doc = "Bit 7 - Force Event Command Not Executed By Auto Command 12 Error" ] # [ inline ( always ) ] pub fn cnibac12e ( & mut self ) -> CNIBAC12E_W { CNIBAC12E_W { w : self } } # [ doc = "Bit 16 - Force Event Command Time Out Error" ] # [ inline ( always ) ] pub fn ctoe ( & mut self ) -> CTOE_W { CTOE_W { w : self } } # [ doc = "Bit 17 - Force Event Command CRC Error" ] # [ inline ( always ) ] pub fn cce ( & mut self ) -> CCE_W { CCE_W { w : self } } # [ doc = "Bit 18 - Force Event Command End Bit Error" ] # [ inline ( always ) ] pub fn cebe ( & mut self ) -> CEBE_W { CEBE_W { w : self } } # [ doc = "Bit 19 - Force Event Command Index Error" ] # [ inline ( always ) ] pub fn cie ( & mut self ) -> CIE_W { CIE_W { w : self } } # [ doc = "Bit 20 - Force Event Data Time Out Error" ] # [ inline ( always ) ] pub fn dtoe ( & mut self ) -> DTOE_W { DTOE_W { w : self } } # [ doc = "Bit 21 - Force Event Data CRC Error" ] # [ inline ( always ) ] pub fn dce ( & mut self ) -> DCE_W { DCE_W { w : self } } # [ doc = "Bit 22 - Force Event Data End Bit Error" ] # [ inline ( always ) ] pub fn debe ( & mut self ) -> DEBE_W { DEBE_W { w : self } } # [ doc = "Bit 24 - Force Event Auto Command 12 Error" ] # [ inline ( always ) ] pub fn ac12e ( & mut self ) -> AC12E_W { AC12E_W { w : self } } # [ doc = "Bit 28 - Force Event DMA Error" ] # [ inline ( always ) ] pub fn dmae ( & mut self ) -> DMAE_W { DMAE_W { w : self } } # [ doc = "Bit 31 - Force Event Card Interrupt" ] # [ inline ( always ) ] pub fn cint ( & mut self ) -> CINT_W { CINT_W { w : self } } } } # [ doc = "ADMA Error Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [admaes](admaes) module" ] pub type ADMAES = crate :: Reg < u32 , _ADMAES > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ADMAES ; # [ doc = "`read()` method returns [admaes::R](admaes::R) reader structure" ] impl crate :: Readable for ADMAES { } # [ doc = "ADMA Error Status register" ] pub mod admaes { # [ doc = "Reader of register ADMAES" ] pub type R = crate :: R < u32 , super :: ADMAES > ; # [ doc = "Reader of field `ADMAES`" ] pub type ADMAES_R = crate :: R < u8 , u8 > ; # [ doc = "ADMA Length Mismatch Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADMALME_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Error." ] _1 } impl From < ADMALME_A > for bool { # [ inline ( always ) ] fn from ( variant : ADMALME_A ) -> Self { match variant { ADMALME_A :: _0 => false , ADMALME_A :: _1 => true } } } # [ doc = "Reader of field `ADMALME`" ] pub type ADMALME_R = crate :: R < bool , ADMALME_A > ; impl ADMALME_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADMALME_A { match self . bits { false => ADMALME_A :: _0 , true => ADMALME_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADMALME_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADMALME_A :: _1 } } # [ doc = "ADMA Descriptor Error\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADMADCE_A { # [ doc = "0: No error." ] _0 , # [ doc = "1: Error." ] _1 } impl From < ADMADCE_A > for bool { # [ inline ( always ) ] fn from ( variant : ADMADCE_A ) -> Self { match variant { ADMADCE_A :: _0 => false , ADMADCE_A :: _1 => true } } } # [ doc = "Reader of field `ADMADCE`" ] pub type ADMADCE_R = crate :: R < bool , ADMADCE_A > ; impl ADMADCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADMADCE_A { match self . bits { false => ADMADCE_A :: _0 , true => ADMADCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADMADCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADMADCE_A :: _1 } } impl R { # [ doc = "Bits 0:1 - ADMA Error State (When ADMA Error Is Occurred.)" ] # [ inline ( always ) ] pub fn admaes ( & self ) -> ADMAES_R { ADMAES_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bit 2 - ADMA Length Mismatch Error" ] # [ inline ( always ) ] pub fn admalme ( & self ) -> ADMALME_R { ADMALME_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - ADMA Descriptor Error" ] # [ inline ( always ) ] pub fn admadce ( & self ) -> ADMADCE_R { ADMADCE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } } # [ doc = "ADMA System Addressregister\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [adsaddr](adsaddr) module" ] pub type ADSADDR = crate :: Reg < u32 , _ADSADDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ADSADDR ; # [ doc = "`read()` method returns [adsaddr::R](adsaddr::R) reader structure" ] impl crate :: Readable for ADSADDR { } # [ doc = "`write(|w| ..)` method takes [adsaddr::W](adsaddr::W) writer structure" ] impl crate :: Writable for ADSADDR { } # [ doc = "ADMA System Addressregister" ] pub mod adsaddr { # [ doc = "Reader of register ADSADDR" ] pub type R = crate :: R < u32 , super :: ADSADDR > ; # [ doc = "Writer for register ADSADDR" ] pub type W = crate :: W < u32 , super :: ADSADDR > ; # [ doc = "Register ADSADDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ADSADDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ADSADDR`" ] pub type ADSADDR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `ADSADDR`" ] pub struct ADSADDR_W < 'a > { w : & 'a mut W , } impl < 'a > ADSADDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x3fff_ffff << 2 ) ) | ( ( ( value as u32 ) & 0x3fff_ffff ) << 2 ) ; self . w } } impl R { # [ doc = "Bits 2:31 - ADMA System Address" ] # [ inline ( always ) ] pub fn adsaddr ( & self ) -> ADSADDR_R { ADSADDR_R :: new ( ( ( self . bits >> 2 ) & 0x3fff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 2:31 - ADMA System Address" ] # [ inline ( always ) ] pub fn adsaddr ( & mut self ) -> ADSADDR_W { ADSADDR_W { w : self } } } } # [ doc = "Vendor Specific register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [vendor](vendor) module" ] pub type VENDOR = crate :: Reg < u32 , _VENDOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _VENDOR ; # [ doc = "`read()` method returns [vendor::R](vendor::R) reader structure" ] impl crate :: Readable for VENDOR { } # [ doc = "`write(|w| ..)` method takes [vendor::W](vendor::W) writer structure" ] impl crate :: Writable for VENDOR { } # [ doc = "Vendor Specific register" ] pub mod vendor { # [ doc = "Reader of register VENDOR" ] pub type R = crate :: R < u32 , super :: VENDOR > ; # [ doc = "Writer for register VENDOR" ] pub type W = crate :: W < u32 , super :: VENDOR > ; # [ doc = "Register VENDOR `reset()`'s with value 0x01" ] impl crate :: ResetValue for super :: VENDOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x01 } } # [ doc = "Exact Block Number Block Read Enable For SDIO CMD53\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXBLKNU_A { # [ doc = "0: None exact block read." ] _0 , # [ doc = "1: Exact block read for SDIO CMD53." ] _1 } impl From < EXBLKNU_A > for bool { # [ inline ( always ) ] fn from ( variant : EXBLKNU_A ) -> Self { match variant { EXBLKNU_A :: _0 => false , EXBLKNU_A :: _1 => true } } } # [ doc = "Reader of field `EXBLKNU`" ] pub type EXBLKNU_R = crate :: R < bool , EXBLKNU_A > ; impl EXBLKNU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EXBLKNU_A { match self . bits { false => EXBLKNU_A :: _0 , true => EXBLKNU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EXBLKNU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EXBLKNU_A :: _1 } } # [ doc = "Write proxy for field `EXBLKNU`" ] pub struct EXBLKNU_W < 'a > { w : & 'a mut W , } impl < 'a > EXBLKNU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EXBLKNU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "None exact block read." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EXBLKNU_A :: _0 ) } # [ doc = "Exact block read for SDIO CMD53." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EXBLKNU_A :: _1 ) } # [ 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 } } # [ doc = "Reader of field `INTSTVAL`" ] pub type INTSTVAL_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bit 1 - Exact Block Number Block Read Enable For SDIO CMD53" ] # [ inline ( always ) ] pub fn exblknu ( & self ) -> EXBLKNU_R { EXBLKNU_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:23 - Internal State Value" ] # [ inline ( always ) ] pub fn intstval ( & self ) -> INTSTVAL_R { INTSTVAL_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bit 1 - Exact Block Number Block Read Enable For SDIO CMD53" ] # [ inline ( always ) ] pub fn exblknu ( & mut self ) -> EXBLKNU_W { EXBLKNU_W { w : self } } } } # [ doc = "MMC Boot register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mmcboot](mmcboot) module" ] pub type MMCBOOT = crate :: Reg < u32 , _MMCBOOT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MMCBOOT ; # [ doc = "`read()` method returns [mmcboot::R](mmcboot::R) reader structure" ] impl crate :: Readable for MMCBOOT { } # [ doc = "`write(|w| ..)` method takes [mmcboot::W](mmcboot::W) writer structure" ] impl crate :: Writable for MMCBOOT { } # [ doc = "MMC Boot register" ] pub mod mmcboot { # [ doc = "Reader of register MMCBOOT" ] pub type R = crate :: R < u32 , super :: MMCBOOT > ; # [ doc = "Writer for register MMCBOOT" ] pub type W = crate :: W < u32 , super :: MMCBOOT > ; # [ doc = "Register MMCBOOT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MMCBOOT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Boot ACK Time Out Counter Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTOCVACK_A { # [ doc = "0: SDCLK x 2^8" ] _0000 , # [ doc = "1: SDCLK x 2^9" ] _0001 , # [ doc = "2: SDCLK x 2^10" ] _0010 , # [ doc = "3: SDCLK x 2^11" ] _0011 , # [ doc = "4: SDCLK x 2^12" ] _0100 , # [ doc = "5: SDCLK x 2^13" ] _0101 , # [ doc = "6: SDCLK x 2^14" ] _0110 , # [ doc = "7: SDCLK x 2^15" ] _0111 , # [ doc = "14: SDCLK x 2^22" ] _1110 } impl From < DTOCVACK_A > for u8 { # [ inline ( always ) ] fn from ( variant : DTOCVACK_A ) -> Self { match variant { DTOCVACK_A :: _0000 => 0 , DTOCVACK_A :: _0001 => 1 , DTOCVACK_A :: _0010 => 2 , DTOCVACK_A :: _0011 => 3 , DTOCVACK_A :: _0100 => 4 , DTOCVACK_A :: _0101 => 5 , DTOCVACK_A :: _0110 => 6 , DTOCVACK_A :: _0111 => 7 , DTOCVACK_A :: _1110 => 14 } } } # [ doc = "Reader of field `DTOCVACK`" ] pub type DTOCVACK_R = crate :: R < u8 , DTOCVACK_A > ; impl DTOCVACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DTOCVACK_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DTOCVACK_A :: _0000 ) , 1 => Val ( DTOCVACK_A :: _0001 ) , 2 => Val ( DTOCVACK_A :: _0010 ) , 3 => Val ( DTOCVACK_A :: _0011 ) , 4 => Val ( DTOCVACK_A :: _0100 ) , 5 => Val ( DTOCVACK_A :: _0101 ) , 6 => Val ( DTOCVACK_A :: _0110 ) , 7 => Val ( DTOCVACK_A :: _0111 ) , 14 => Val ( DTOCVACK_A :: _1110 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == DTOCVACK_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == DTOCVACK_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == DTOCVACK_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == DTOCVACK_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == DTOCVACK_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == DTOCVACK_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == DTOCVACK_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == DTOCVACK_A :: _0111 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == DTOCVACK_A :: _1110 } } # [ doc = "Write proxy for field `DTOCVACK`" ] pub struct DTOCVACK_W < 'a > { w : & 'a mut W , } impl < 'a > DTOCVACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DTOCVACK_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "SDCLK x 2^8" ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _0000 ) } # [ doc = "SDCLK x 2^9" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _0001 ) } # [ doc = "SDCLK x 2^10" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _0010 ) } # [ doc = "SDCLK x 2^11" ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _0011 ) } # [ doc = "SDCLK x 2^12" ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _0100 ) } # [ doc = "SDCLK x 2^13" ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _0101 ) } # [ doc = "SDCLK x 2^14" ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _0110 ) } # [ doc = "SDCLK x 2^15" ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _0111 ) } # [ doc = "SDCLK x 2^22" ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( DTOCVACK_A :: _1110 ) } # [ 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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Boot Ack Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOOTACK_A { # [ doc = "0: No ack." ] _0 , # [ doc = "1: Ack." ] _1 } impl From < BOOTACK_A > for bool { # [ inline ( always ) ] fn from ( variant : BOOTACK_A ) -> Self { match variant { BOOTACK_A :: _0 => false , BOOTACK_A :: _1 => true } } } # [ doc = "Reader of field `BOOTACK`" ] pub type BOOTACK_R = crate :: R < bool , BOOTACK_A > ; impl BOOTACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOOTACK_A { match self . bits { false => BOOTACK_A :: _0 , true => BOOTACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOOTACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOOTACK_A :: _1 } } # [ doc = "Write proxy for field `BOOTACK`" ] pub struct BOOTACK_W < 'a > { w : & 'a mut W , } impl < 'a > BOOTACK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOOTACK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No ack." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOOTACK_A :: _0 ) } # [ doc = "Ack." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOOTACK_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Boot Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOOTMODE_A { # [ doc = "0: Normal boot." ] _0 , # [ doc = "1: Alternative boot." ] _1 } impl From < BOOTMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : BOOTMODE_A ) -> Self { match variant { BOOTMODE_A :: _0 => false , BOOTMODE_A :: _1 => true } } } # [ doc = "Reader of field `BOOTMODE`" ] pub type BOOTMODE_R = crate :: R < bool , BOOTMODE_A > ; impl BOOTMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOOTMODE_A { match self . bits { false => BOOTMODE_A :: _0 , true => BOOTMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOOTMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOOTMODE_A :: _1 } } # [ doc = "Write proxy for field `BOOTMODE`" ] pub struct BOOTMODE_W < 'a > { w : & 'a mut W , } impl < 'a > BOOTMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOOTMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal boot." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOOTMODE_A :: _0 ) } # [ doc = "Alternative boot." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOOTMODE_A :: _1 ) } # [ 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 = "Boot Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOOTEN_A { # [ doc = "0: Fast boot disable." ] _0 , # [ doc = "1: Fast boot enable." ] _1 } impl From < BOOTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : BOOTEN_A ) -> Self { match variant { BOOTEN_A :: _0 => false , BOOTEN_A :: _1 => true } } } # [ doc = "Reader of field `BOOTEN`" ] pub type BOOTEN_R = crate :: R < bool , BOOTEN_A > ; impl BOOTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOOTEN_A { match self . bits { false => BOOTEN_A :: _0 , true => BOOTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOOTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOOTEN_A :: _1 } } # [ doc = "Write proxy for field `BOOTEN`" ] pub struct BOOTEN_W < 'a > { w : & 'a mut W , } impl < 'a > BOOTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOOTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Fast boot disable." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOOTEN_A :: _0 ) } # [ doc = "Fast boot enable." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOOTEN_A :: _1 ) } # [ 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 = "Reader of field `AUTOSABGEN`" ] pub type AUTOSABGEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `AUTOSABGEN`" ] pub struct AUTOSABGEN_W < 'a > { w : & 'a mut W , } impl < 'a > AUTOSABGEN_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 = "Reader of field `BOOTBLKCNT`" ] pub type BOOTBLKCNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `BOOTBLKCNT`" ] pub struct BOOTBLKCNT_W < 'a > { w : & 'a mut W , } impl < 'a > BOOTBLKCNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Boot ACK Time Out Counter Value" ] # [ inline ( always ) ] pub fn dtocvack ( & self ) -> DTOCVACK_R { DTOCVACK_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bit 4 - Boot Ack Mode Select" ] # [ inline ( always ) ] pub fn bootack ( & self ) -> BOOTACK_R { BOOTACK_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Boot Mode Select" ] # [ inline ( always ) ] pub fn bootmode ( & self ) -> BOOTMODE_R { BOOTMODE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Boot Mode Enable" ] # [ inline ( always ) ] pub fn booten ( & self ) -> BOOTEN_R { BOOTEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - When boot, enable auto stop at block gap function" ] # [ inline ( always ) ] pub fn autosabgen ( & self ) -> AUTOSABGEN_R { AUTOSABGEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:31 - Defines the stop at block gap value of automatic mode" ] # [ inline ( always ) ] pub fn bootblkcnt ( & self ) -> BOOTBLKCNT_R { BOOTBLKCNT_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:3 - Boot ACK Time Out Counter Value" ] # [ inline ( always ) ] pub fn dtocvack ( & mut self ) -> DTOCVACK_W { DTOCVACK_W { w : self } } # [ doc = "Bit 4 - Boot Ack Mode Select" ] # [ inline ( always ) ] pub fn bootack ( & mut self ) -> BOOTACK_W { BOOTACK_W { w : self } } # [ doc = "Bit 5 - Boot Mode Select" ] # [ inline ( always ) ] pub fn bootmode ( & mut self ) -> BOOTMODE_W { BOOTMODE_W { w : self } } # [ doc = "Bit 6 - Boot Mode Enable" ] # [ inline ( always ) ] pub fn booten ( & mut self ) -> BOOTEN_W { BOOTEN_W { w : self } } # [ doc = "Bit 7 - When boot, enable auto stop at block gap function" ] # [ inline ( always ) ] pub fn autosabgen ( & mut self ) -> AUTOSABGEN_W { AUTOSABGEN_W { w : self } } # [ doc = "Bits 16:31 - Defines the stop at block gap value of automatic mode" ] # [ inline ( always ) ] pub fn bootblkcnt ( & mut self ) -> BOOTBLKCNT_W { BOOTBLKCNT_W { w : self } } } } # [ doc = "Host Controller Version\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hostver](hostver) module" ] pub type HOSTVER = crate :: Reg < u32 , _HOSTVER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HOSTVER ; # [ doc = "`read()` method returns [hostver::R](hostver::R) reader structure" ] impl crate :: Readable for HOSTVER { } # [ doc = "Host Controller Version" ] pub mod hostver { # [ doc = "Reader of register HOSTVER" ] pub type R = crate :: R < u32 , super :: HOSTVER > ; # [ doc = "Specification Version Number\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SVN_A { # [ doc = "1: SD host specification version 2.0, supports test event register and ADMA." ] _1 } impl From < SVN_A > for u8 { # [ inline ( always ) ] fn from ( variant : SVN_A ) -> Self { match variant { SVN_A :: _1 => 1 } } } # [ doc = "Reader of field `SVN`" ] pub type SVN_R = crate :: R < u8 , SVN_A > ; impl SVN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , SVN_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( SVN_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SVN_A :: _1 } } # [ doc = "Vendor Version Number\n\nValue on reset: 18" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VVN_A { # [ doc = "0: Freescale SDHC version 1.0" ] _0 , # [ doc = "16: Freescale SDHC version 2.0" ] _10000 , # [ doc = "17: Freescale SDHC version 2.1" ] _10001 , # [ doc = "18: Freescale SDHC version 2.2" ] _10010 } impl From < VVN_A > for u8 { # [ inline ( always ) ] fn from ( variant : VVN_A ) -> Self { match variant { VVN_A :: _0 => 0 , VVN_A :: _10000 => 16 , VVN_A :: _10001 => 17 , VVN_A :: _10010 => 18 } } } # [ doc = "Reader of field `VVN`" ] pub type VVN_R = crate :: R < u8 , VVN_A > ; impl VVN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , VVN_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( VVN_A :: _0 ) , 16 => Val ( VVN_A :: _10000 ) , 17 => Val ( VVN_A :: _10001 ) , 18 => Val ( VVN_A :: _10010 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VVN_A :: _0 } # [ doc = "Checks if the value of the field is `_10000`" ] # [ inline ( always ) ] pub fn is_10000 ( & self ) -> bool { * self == VVN_A :: _10000 } # [ doc = "Checks if the value of the field is `_10001`" ] # [ inline ( always ) ] pub fn is_10001 ( & self ) -> bool { * self == VVN_A :: _10001 } # [ doc = "Checks if the value of the field is `_10010`" ] # [ inline ( always ) ] pub fn is_10010 ( & self ) -> bool { * self == VVN_A :: _10010 } } impl R { # [ doc = "Bits 0:7 - Specification Version Number" ] # [ inline ( always ) ] pub fn svn ( & self ) -> SVN_R { SVN_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Vendor Version Number" ] # [ inline ( always ) ] pub fn vvn ( & self ) -> VVN_R { VVN_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } } } } # [ doc = "Ethernet MAC-NET Core" ] pub struct ENET { _marker : PhantomData < * const ( ) > } unsafe impl Send for ENET { } impl ENET { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const enet :: RegisterBlock { 0x400c_0000 as * const _ } } impl Deref for ENET { type Target = enet :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * ENET :: ptr ( ) } } } # [ doc = "Ethernet MAC-NET Core" ] pub mod enet { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 4usize ] , # [ doc = "0x04 - Interrupt Event Register" ] pub eir : EIR , # [ doc = "0x08 - Interrupt Mask Register" ] pub eimr : EIMR , _reserved2 : [ u8 ; 4usize ] , # [ doc = "0x10 - Receive Descriptor Active Register" ] pub rdar : RDAR , # [ doc = "0x14 - Transmit Descriptor Active Register" ] pub tdar : TDAR , _reserved4 : [ u8 ; 12usize ] , # [ doc = "0x24 - Ethernet Control Register" ] pub ecr : ECR , _reserved5 : [ u8 ; 24usize ] , # [ doc = "0x40 - MII Management Frame Register" ] pub mmfr : MMFR , # [ doc = "0x44 - MII Speed Control Register" ] pub mscr : MSCR , _reserved7 : [ u8 ; 28usize ] , # [ doc = "0x64 - MIB Control Register" ] pub mibc : MIBC , _reserved8 : [ u8 ; 28usize ] , # [ doc = "0x84 - Receive Control Register" ] pub rcr : RCR , _reserved9 : [ u8 ; 60usize ] , # [ doc = "0xc4 - Transmit Control Register" ] pub tcr : TCR , _reserved10 : [ u8 ; 28usize ] , # [ doc = "0xe4 - Physical Address Lower Register" ] pub palr : PALR , # [ doc = "0xe8 - Physical Address Upper Register" ] pub paur : PAUR , # [ doc = "0xec - Opcode/Pause Duration Register" ] pub opd : OPD , _reserved13 : [ u8 ; 40usize ] , # [ doc = "0x118 - Descriptor Individual Upper Address Register" ] pub iaur : IAUR , # [ doc = "0x11c - Descriptor Individual Lower Address Register" ] pub ialr : IALR , # [ doc = "0x120 - Descriptor Group Upper Address Register" ] pub gaur : GAUR , # [ doc = "0x124 - Descriptor Group Lower Address Register" ] pub galr : GALR , _reserved17 : [ u8 ; 28usize ] , # [ doc = "0x144 - Transmit FIFO Watermark Register" ] pub tfwr : TFWR , _reserved18 : [ u8 ; 56usize ] , # [ doc = "0x180 - Receive Descriptor Ring Start Register" ] pub rdsr : RDSR , # [ doc = "0x184 - Transmit Buffer Descriptor Ring Start Register" ] pub tdsr : TDSR , # [ doc = "0x188 - Maximum Receive Buffer Size Register" ] pub mrbr : MRBR , _reserved21 : [ u8 ; 4usize ] , # [ doc = "0x190 - Receive FIFO Section Full Threshold" ] pub rsfl : RSFL , # [ doc = "0x194 - Receive FIFO Section Empty Threshold" ] pub rsem : RSEM , # [ doc = "0x198 - Receive FIFO Almost Empty Threshold" ] pub raem : RAEM , # [ doc = "0x19c - Receive FIFO Almost Full Threshold" ] pub rafl : RAFL , # [ doc = "0x1a0 - Transmit FIFO Section Empty Threshold" ] pub tsem : TSEM , # [ doc = "0x1a4 - Transmit FIFO Almost Empty Threshold" ] pub taem : TAEM , # [ doc = "0x1a8 - Transmit FIFO Almost Full Threshold" ] pub tafl : TAFL , # [ doc = "0x1ac - Transmit Inter-Packet Gap" ] pub tipg : TIPG , # [ doc = "0x1b0 - Frame Truncation Length" ] pub ftrl : FTRL , _reserved30 : [ u8 ; 12usize ] , # [ doc = "0x1c0 - Transmit Accelerator Function Configuration" ] pub tacc : TACC , # [ doc = "0x1c4 - Receive Accelerator Function Configuration" ] pub racc : RACC , _reserved32 : [ u8 ; 56usize ] , # [ doc = "0x200 - Reserved Statistic Register" ] pub rmon_t_drop : RMON_T_DROP , # [ doc = "0x204 - Tx Packet Count Statistic Register" ] pub rmon_t_packets : RMON_T_PACKETS , # [ doc = "0x208 - Tx Broadcast Packets Statistic Register" ] pub rmon_t_bc_pkt : RMON_T_BC_PKT , # [ doc = "0x20c - Tx Multicast Packets Statistic Register" ] pub rmon_t_mc_pkt : RMON_T_MC_PKT , # [ doc = "0x210 - Tx Packets with CRC/Align Error Statistic Register" ] pub rmon_t_crc_align : RMON_T_CRC_ALIGN , # [ doc = "0x214 - Tx Packets Less Than Bytes and Good CRC Statistic Register" ] pub rmon_t_undersize : RMON_T_UNDERSIZE , # [ doc = "0x218 - Tx Packets GT MAX_FL bytes and Good CRC Statistic Register" ] pub rmon_t_oversize : RMON_T_OVERSIZE , # [ doc = "0x21c - Tx Packets Less Than 64 Bytes and Bad CRC Statistic Register" ] pub rmon_t_frag : RMON_T_FRAG , # [ doc = "0x220 - Tx Packets Greater Than MAX_FL bytes and Bad CRC Statistic Register" ] pub rmon_t_jab : RMON_T_JAB , # [ doc = "0x224 - Tx Collision Count Statistic Register" ] pub rmon_t_col : RMON_T_COL , # [ doc = "0x228 - Tx 64-Byte Packets Statistic Register" ] pub rmon_t_p64 : RMON_T_P64 , # [ doc = "0x22c - Tx 65- to 127-byte Packets Statistic Register" ] pub rmon_t_p65to127 : RMON_T_P65TO127 , # [ doc = "0x230 - Tx 128- to 255-byte Packets Statistic Register" ] pub rmon_t_p128to255 : RMON_T_P128TO255 , # [ doc = "0x234 - Tx 256- to 511-byte Packets Statistic Register" ] pub rmon_t_p256to511 : RMON_T_P256TO511 , # [ doc = "0x238 - Tx 512- to 1023-byte Packets Statistic Register" ] pub rmon_t_p512to1023 : RMON_T_P512TO1023 , # [ doc = "0x23c - Tx 1024- to 2047-byte Packets Statistic Register" ] pub rmon_t_p1024to2047 : RMON_T_P1024TO2047 , # [ doc = "0x240 - Tx Packets Greater Than 2048 Bytes Statistic Register" ] pub rmon_t_p_gte2048 : RMON_T_P_GTE2048 , # [ doc = "0x244 - Tx Octets Statistic Register" ] pub rmon_t_octets : RMON_T_OCTETS , # [ doc = "0x248 - IEEE_T_DROP Reserved Statistic Register" ] pub ieee_t_drop : IEEE_T_DROP , # [ doc = "0x24c - Frames Transmitted OK Statistic Register" ] pub ieee_t_frame_ok : IEEE_T_FRAME_OK , # [ doc = "0x250 - Frames Transmitted with Single Collision Statistic Register" ] pub ieee_t_1col : IEEE_T_1COL , # [ doc = "0x254 - Frames Transmitted with Multiple Collisions Statistic Register" ] pub ieee_t_mcol : IEEE_T_MCOL , # [ doc = "0x258 - Frames Transmitted after Deferral Delay Statistic Register" ] pub ieee_t_def : IEEE_T_DEF , # [ doc = "0x25c - Frames Transmitted with Late Collision Statistic Register" ] pub ieee_t_lcol : IEEE_T_LCOL , # [ doc = "0x260 - Frames Transmitted with Excessive Collisions Statistic Register" ] pub ieee_t_excol : IEEE_T_EXCOL , # [ doc = "0x264 - Frames Transmitted with Tx FIFO Underrun Statistic Register" ] pub ieee_t_macerr : IEEE_T_MACERR , # [ doc = "0x268 - Frames Transmitted with Carrier Sense Error Statistic Register" ] pub ieee_t_cserr : IEEE_T_CSERR , # [ doc = "0x26c - no description available" ] pub ieee_t_sqe : IEEE_T_SQE , # [ doc = "0x270 - Flow Control Pause Frames Transmitted Statistic Register" ] pub ieee_t_fdxfc : IEEE_T_FDXFC , # [ doc = "0x274 - Octet Count for Frames Transmitted w/o Error Statistic Register" ] pub ieee_t_octets_ok : IEEE_T_OCTETS_OK , _reserved62 : [ u8 ; 12usize ] , # [ doc = "0x284 - Rx Packet Count Statistic Register" ] pub rmon_r_packets : RMON_R_PACKETS , # [ doc = "0x288 - Rx Broadcast Packets Statistic Register" ] pub rmon_r_bc_pkt : RMON_R_BC_PKT , # [ doc = "0x28c - Rx Multicast Packets Statistic Register" ] pub rmon_r_mc_pkt : RMON_R_MC_PKT , # [ doc = "0x290 - Rx Packets with CRC/Align Error Statistic Register" ] pub rmon_r_crc_align : RMON_R_CRC_ALIGN , # [ doc = "0x294 - Rx Packets with Less Than 64 Bytes and Good CRC Statistic Register" ] pub rmon_r_undersize : RMON_R_UNDERSIZE , # [ doc = "0x298 - Rx Packets Greater Than MAX_FL and Good CRC Statistic Register" ] pub rmon_r_oversize : RMON_R_OVERSIZE , # [ doc = "0x29c - Rx Packets Less Than 64 Bytes and Bad CRC Statistic Register" ] pub rmon_r_frag : RMON_R_FRAG , # [ doc = "0x2a0 - Rx Packets Greater Than MAX_FL Bytes and Bad CRC Statistic Register" ] pub rmon_r_jab : RMON_R_JAB , # [ doc = "0x2a4 - Reserved Statistic Register" ] pub rmon_r_resvd_0 : RMON_R_RESVD_0 , # [ doc = "0x2a8 - Rx 64-Byte Packets Statistic Register" ] pub rmon_r_p64 : RMON_R_P64 , # [ doc = "0x2ac - Rx 65- to 127-Byte Packets Statistic Register" ] pub rmon_r_p65to127 : RMON_R_P65TO127 , # [ doc = "0x2b0 - Rx 128- to 255-Byte Packets Statistic Register" ] pub rmon_r_p128to255 : RMON_R_P128TO255 , # [ doc = "0x2b4 - Rx 256- to 511-Byte Packets Statistic Register" ] pub rmon_r_p256to511 : RMON_R_P256TO511 , # [ doc = "0x2b8 - Rx 512- to 1023-Byte Packets Statistic Register" ] pub rmon_r_p512to1023 : RMON_R_P512TO1023 , # [ doc = "0x2bc - Rx 1024- to 2047-Byte Packets Statistic Register" ] pub rmon_r_p1024to2047 : RMON_R_P1024TO2047 , # [ doc = "0x2c0 - Rx Packets Greater than 2048 Bytes Statistic Register" ] pub rmon_r_p_gte2048 : RMON_R_P_GTE2048 , # [ doc = "0x2c4 - Rx Octets Statistic Register" ] pub rmon_r_octets : RMON_R_OCTETS , # [ doc = "0x2c8 - Frames not Counted Correctly Statistic Register" ] pub ieee_r_drop : IEEE_R_DROP , # [ doc = "0x2cc - Frames Received OK Statistic Register" ] pub ieee_r_frame_ok : IEEE_R_FRAME_OK , # [ doc = "0x2d0 - Frames Received with CRC Error Statistic Register" ] pub ieee_r_crc : IEEE_R_CRC , # [ doc = "0x2d4 - Frames Received with Alignment Error Statistic Register" ] pub ieee_r_align : IEEE_R_ALIGN , # [ doc = "0x2d8 - Receive FIFO Overflow Count Statistic Register" ] pub ieee_r_macerr : IEEE_R_MACERR , # [ doc = "0x2dc - Flow Control Pause Frames Received Statistic Register" ] pub ieee_r_fdxfc : IEEE_R_FDXFC , # [ doc = "0x2e0 - Octet Count for Frames Received without Error Statistic Register" ] pub ieee_r_octets_ok : IEEE_R_OCTETS_OK , _reserved86 : [ u8 ; 284usize ] , # [ doc = "0x400 - Adjustable Timer Control Register" ] pub atcr : ATCR , # [ doc = "0x404 - Timer Value Register" ] pub atvr : ATVR , # [ doc = "0x408 - Timer Offset Register" ] pub atoff : ATOFF , # [ doc = "0x40c - Timer Period Register" ] pub atper : ATPER , # [ doc = "0x410 - Timer Correction Register" ] pub atcor : ATCOR , # [ doc = "0x414 - Time-Stamping Clock Period Register" ] pub atinc : ATINC , # [ doc = "0x418 - Timestamp of Last Transmitted Frame" ] pub atstmp : ATSTMP , _reserved93 : [ u8 ; 488usize ] , # [ doc = "0x604 - Timer Global Status Register" ] pub tgsr : TGSR , # [ doc = "0x608 - Timer Control Status Register" ] pub tcsr0 : TCSR , # [ doc = "0x60c - Timer Compare Capture Register" ] pub tccr0 : TCCR , # [ doc = "0x610 - Timer Control Status Register" ] pub tcsr1 : TCSR , # [ doc = "0x614 - Timer Compare Capture Register" ] pub tccr1 : TCCR , # [ doc = "0x618 - Timer Control Status Register" ] pub tcsr2 : TCSR , # [ doc = "0x61c - Timer Compare Capture Register" ] pub tccr2 : TCCR , # [ doc = "0x620 - Timer Control Status Register" ] pub tcsr3 : TCSR , # [ doc = "0x624 - Timer Compare Capture Register" ] pub tccr3 : TCCR , } # [ doc = "Interrupt Event Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [eir](eir) module" ] pub type EIR = crate :: Reg < u32 , _EIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EIR ; # [ doc = "`read()` method returns [eir::R](eir::R) reader structure" ] impl crate :: Readable for EIR { } # [ doc = "`write(|w| ..)` method takes [eir::W](eir::W) writer structure" ] impl crate :: Writable for EIR { } # [ doc = "Interrupt Event Register" ] pub mod eir { # [ doc = "Reader of register EIR" ] pub type R = crate :: R < u32 , super :: EIR > ; # [ doc = "Writer for register EIR" ] pub type W = crate :: W < u32 , super :: EIR > ; # [ doc = "Register EIR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EIR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TS_TIMER`" ] pub type TS_TIMER_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TS_TIMER`" ] pub struct TS_TIMER_W < 'a > { w : & 'a mut W , } impl < 'a > TS_TIMER_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `TS_AVAIL`" ] pub type TS_AVAIL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TS_AVAIL`" ] pub struct TS_AVAIL_W < 'a > { w : & 'a mut W , } impl < 'a > TS_AVAIL_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Reader of field `WAKEUP`" ] pub type WAKEUP_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `WAKEUP`" ] pub struct WAKEUP_W < 'a > { w : & 'a mut W , } impl < 'a > WAKEUP_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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Reader of field `PLR`" ] pub type PLR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLR`" ] pub struct PLR_W < 'a > { w : & 'a mut W , } impl < 'a > PLR_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `UN`" ] pub type UN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UN`" ] pub struct UN_W < 'a > { w : & 'a mut W , } impl < 'a > UN_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Reader of field `RL`" ] pub type RL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RL`" ] pub struct RL_W < 'a > { w : & 'a mut W , } impl < 'a > RL_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 = "Reader of field `LC`" ] pub type LC_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `LC`" ] pub struct LC_W < 'a > { w : & 'a mut W , } impl < 'a > LC_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 = "Reader of field `EBERR`" ] pub type EBERR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `EBERR`" ] pub struct EBERR_W < 'a > { w : & 'a mut W , } impl < 'a > EBERR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `MII`" ] pub type MII_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MII`" ] pub struct MII_W < 'a > { w : & 'a mut W , } impl < 'a > MII_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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Reader of field `RXB`" ] pub type RXB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RXB`" ] pub struct RXB_W < 'a > { w : & 'a mut W , } impl < 'a > RXB_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 = "Reader of field `RXF`" ] pub type RXF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RXF`" ] pub struct RXF_W < 'a > { w : & 'a mut W , } impl < 'a > RXF_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 = "Reader of field `TXB`" ] pub type TXB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TXB`" ] pub struct TXB_W < 'a > { w : & 'a mut W , } impl < 'a > TXB_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 = "Reader of field `TXF`" ] pub type TXF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TXF`" ] pub struct TXF_W < 'a > { w : & 'a mut W , } impl < 'a > TXF_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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Reader of field `GRA`" ] pub type GRA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `GRA`" ] pub struct GRA_W < 'a > { w : & 'a mut W , } impl < 'a > GRA_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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Reader of field `BABT`" ] pub type BABT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BABT`" ] pub struct BABT_W < 'a > { w : & 'a mut W , } impl < 'a > BABT_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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Reader of field `BABR`" ] pub type BABR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BABR`" ] pub struct BABR_W < 'a > { w : & 'a mut W , } impl < 'a > BABR_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 15 - Timestamp Timer" ] # [ inline ( always ) ] pub fn ts_timer ( & self ) -> TS_TIMER_R { TS_TIMER_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Transmit Timestamp Available" ] # [ inline ( always ) ] pub fn ts_avail ( & self ) -> TS_AVAIL_R { TS_AVAIL_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Node Wakeup Request Indication" ] # [ inline ( always ) ] pub fn wakeup ( & self ) -> WAKEUP_R { WAKEUP_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Payload Receive Error" ] # [ inline ( always ) ] pub fn plr ( & self ) -> PLR_R { PLR_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Transmit FIFO Underrun" ] # [ inline ( always ) ] pub fn un ( & self ) -> UN_R { UN_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Collision Retry Limit" ] # [ inline ( always ) ] pub fn rl ( & self ) -> RL_R { RL_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Late Collision" ] # [ inline ( always ) ] pub fn lc ( & self ) -> LC_R { LC_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Ethernet Bus Error" ] # [ inline ( always ) ] pub fn eberr ( & self ) -> EBERR_R { EBERR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - MII Interrupt." ] # [ inline ( always ) ] pub fn mii ( & self ) -> MII_R { MII_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Receive Buffer Interrupt" ] # [ inline ( always ) ] pub fn rxb ( & self ) -> RXB_R { RXB_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Receive Frame Interrupt" ] # [ inline ( always ) ] pub fn rxf ( & self ) -> RXF_R { RXF_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Transmit Buffer Interrupt" ] # [ inline ( always ) ] pub fn txb ( & self ) -> TXB_R { TXB_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Transmit Frame Interrupt" ] # [ inline ( always ) ] pub fn txf ( & self ) -> TXF_R { TXF_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Graceful Stop Complete" ] # [ inline ( always ) ] pub fn gra ( & self ) -> GRA_R { GRA_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Babbling Transmit Error" ] # [ inline ( always ) ] pub fn babt ( & self ) -> BABT_R { BABT_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Babbling Receive Error" ] # [ inline ( always ) ] pub fn babr ( & self ) -> BABR_R { BABR_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 15 - Timestamp Timer" ] # [ inline ( always ) ] pub fn ts_timer ( & mut self ) -> TS_TIMER_W { TS_TIMER_W { w : self } } # [ doc = "Bit 16 - Transmit Timestamp Available" ] # [ inline ( always ) ] pub fn ts_avail ( & mut self ) -> TS_AVAIL_W { TS_AVAIL_W { w : self } } # [ doc = "Bit 17 - Node Wakeup Request Indication" ] # [ inline ( always ) ] pub fn wakeup ( & mut self ) -> WAKEUP_W { WAKEUP_W { w : self } } # [ doc = "Bit 18 - Payload Receive Error" ] # [ inline ( always ) ] pub fn plr ( & mut self ) -> PLR_W { PLR_W { w : self } } # [ doc = "Bit 19 - Transmit FIFO Underrun" ] # [ inline ( always ) ] pub fn un ( & mut self ) -> UN_W { UN_W { w : self } } # [ doc = "Bit 20 - Collision Retry Limit" ] # [ inline ( always ) ] pub fn rl ( & mut self ) -> RL_W { RL_W { w : self } } # [ doc = "Bit 21 - Late Collision" ] # [ inline ( always ) ] pub fn lc ( & mut self ) -> LC_W { LC_W { w : self } } # [ doc = "Bit 22 - Ethernet Bus Error" ] # [ inline ( always ) ] pub fn eberr ( & mut self ) -> EBERR_W { EBERR_W { w : self } } # [ doc = "Bit 23 - MII Interrupt." ] # [ inline ( always ) ] pub fn mii ( & mut self ) -> MII_W { MII_W { w : self } } # [ doc = "Bit 24 - Receive Buffer Interrupt" ] # [ inline ( always ) ] pub fn rxb ( & mut self ) -> RXB_W { RXB_W { w : self } } # [ doc = "Bit 25 - Receive Frame Interrupt" ] # [ inline ( always ) ] pub fn rxf ( & mut self ) -> RXF_W { RXF_W { w : self } } # [ doc = "Bit 26 - Transmit Buffer Interrupt" ] # [ inline ( always ) ] pub fn txb ( & mut self ) -> TXB_W { TXB_W { w : self } } # [ doc = "Bit 27 - Transmit Frame Interrupt" ] # [ inline ( always ) ] pub fn txf ( & mut self ) -> TXF_W { TXF_W { w : self } } # [ doc = "Bit 28 - Graceful Stop Complete" ] # [ inline ( always ) ] pub fn gra ( & mut self ) -> GRA_W { GRA_W { w : self } } # [ doc = "Bit 29 - Babbling Transmit Error" ] # [ inline ( always ) ] pub fn babt ( & mut self ) -> BABT_W { BABT_W { w : self } } # [ doc = "Bit 30 - Babbling Receive Error" ] # [ inline ( always ) ] pub fn babr ( & mut self ) -> BABR_W { BABR_W { w : self } } } } # [ doc = "Interrupt Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [eimr](eimr) module" ] pub type EIMR = crate :: Reg < u32 , _EIMR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _EIMR ; # [ doc = "`read()` method returns [eimr::R](eimr::R) reader structure" ] impl crate :: Readable for EIMR { } # [ doc = "`write(|w| ..)` method takes [eimr::W](eimr::W) writer structure" ] impl crate :: Writable for EIMR { } # [ doc = "Interrupt Mask Register" ] pub mod eimr { # [ doc = "Reader of register EIMR" ] pub type R = crate :: R < u32 , super :: EIMR > ; # [ doc = "Writer for register EIMR" ] pub type W = crate :: W < u32 , super :: EIMR > ; # [ doc = "Register EIMR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: EIMR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TS_TIMER`" ] pub type TS_TIMER_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TS_TIMER`" ] pub struct TS_TIMER_W < 'a > { w : & 'a mut W , } impl < 'a > TS_TIMER_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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `TS_AVAIL`" ] pub type TS_AVAIL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TS_AVAIL`" ] pub struct TS_AVAIL_W < 'a > { w : & 'a mut W , } impl < 'a > TS_AVAIL_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Reader of field `WAKEUP`" ] pub type WAKEUP_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `WAKEUP`" ] pub struct WAKEUP_W < 'a > { w : & 'a mut W , } impl < 'a > WAKEUP_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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Reader of field `PLR`" ] pub type PLR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PLR`" ] pub struct PLR_W < 'a > { w : & 'a mut W , } impl < 'a > PLR_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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `UN`" ] pub type UN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `UN`" ] pub struct UN_W < 'a > { w : & 'a mut W , } impl < 'a > UN_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Reader of field `RL`" ] pub type RL_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RL`" ] pub struct RL_W < 'a > { w : & 'a mut W , } impl < 'a > RL_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 = "Reader of field `LC`" ] pub type LC_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `LC`" ] pub struct LC_W < 'a > { w : & 'a mut W , } impl < 'a > LC_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 = "Reader of field `EBERR`" ] pub type EBERR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `EBERR`" ] pub struct EBERR_W < 'a > { w : & 'a mut W , } impl < 'a > EBERR_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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Reader of field `MII`" ] pub type MII_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MII`" ] pub struct MII_W < 'a > { w : & 'a mut W , } impl < 'a > MII_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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Reader of field `RXB`" ] pub type RXB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RXB`" ] pub struct RXB_W < 'a > { w : & 'a mut W , } impl < 'a > RXB_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 = "Reader of field `RXF`" ] pub type RXF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RXF`" ] pub struct RXF_W < 'a > { w : & 'a mut W , } impl < 'a > RXF_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 = "TXB Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXB_A { # [ doc = "0: The corresponding interrupt source is masked." ] _0 , # [ doc = "1: The corresponding interrupt source is not masked." ] _1 } impl From < TXB_A > for bool { # [ inline ( always ) ] fn from ( variant : TXB_A ) -> Self { match variant { TXB_A :: _0 => false , TXB_A :: _1 => true } } } # [ doc = "Reader of field `TXB`" ] pub type TXB_R = crate :: R < bool , TXB_A > ; impl TXB_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXB_A { match self . bits { false => TXB_A :: _0 , true => TXB_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXB_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXB_A :: _1 } } # [ doc = "Write proxy for field `TXB`" ] pub struct TXB_W < 'a > { w : & 'a mut W , } impl < 'a > TXB_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXB_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding interrupt source is masked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXB_A :: _0 ) } # [ doc = "The corresponding interrupt source is not masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXB_A :: _1 ) } # [ 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 = "TXF Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXF_A { # [ doc = "0: The corresponding interrupt source is masked." ] _0 , # [ doc = "1: The corresponding interrupt source is not masked." ] _1 } impl From < TXF_A > for bool { # [ inline ( always ) ] fn from ( variant : TXF_A ) -> Self { match variant { TXF_A :: _0 => false , TXF_A :: _1 => true } } } # [ doc = "Reader of field `TXF`" ] pub type TXF_R = crate :: R < bool , TXF_A > ; impl TXF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXF_A { match self . bits { false => TXF_A :: _0 , true => TXF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXF_A :: _1 } } # [ doc = "Write proxy for field `TXF`" ] pub struct TXF_W < 'a > { w : & 'a mut W , } impl < 'a > TXF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding interrupt source is masked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXF_A :: _0 ) } # [ doc = "The corresponding interrupt source is not masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXF_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "GRA Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GRA_A { # [ doc = "0: The corresponding interrupt source is masked." ] _0 , # [ doc = "1: The corresponding interrupt source is not masked." ] _1 } impl From < GRA_A > for bool { # [ inline ( always ) ] fn from ( variant : GRA_A ) -> Self { match variant { GRA_A :: _0 => false , GRA_A :: _1 => true } } } # [ doc = "Reader of field `GRA`" ] pub type GRA_R = crate :: R < bool , GRA_A > ; impl GRA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GRA_A { match self . bits { false => GRA_A :: _0 , true => GRA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GRA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GRA_A :: _1 } } # [ doc = "Write proxy for field `GRA`" ] pub struct GRA_W < 'a > { w : & 'a mut W , } impl < 'a > GRA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GRA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding interrupt source is masked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GRA_A :: _0 ) } # [ doc = "The corresponding interrupt source is not masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GRA_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "BABT Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BABT_A { # [ doc = "0: The corresponding interrupt source is masked." ] _0 , # [ doc = "1: The corresponding interrupt source is not masked." ] _1 } impl From < BABT_A > for bool { # [ inline ( always ) ] fn from ( variant : BABT_A ) -> Self { match variant { BABT_A :: _0 => false , BABT_A :: _1 => true } } } # [ doc = "Reader of field `BABT`" ] pub type BABT_R = crate :: R < bool , BABT_A > ; impl BABT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BABT_A { match self . bits { false => BABT_A :: _0 , true => BABT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BABT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BABT_A :: _1 } } # [ doc = "Write proxy for field `BABT`" ] pub struct BABT_W < 'a > { w : & 'a mut W , } impl < 'a > BABT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BABT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding interrupt source is masked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BABT_A :: _0 ) } # [ doc = "The corresponding interrupt source is not masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BABT_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "BABR Interrupt Mask\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BABR_A { # [ doc = "0: The corresponding interrupt source is masked." ] _0 , # [ doc = "1: The corresponding interrupt source is not masked." ] _1 } impl From < BABR_A > for bool { # [ inline ( always ) ] fn from ( variant : BABR_A ) -> Self { match variant { BABR_A :: _0 => false , BABR_A :: _1 => true } } } # [ doc = "Reader of field `BABR`" ] pub type BABR_R = crate :: R < bool , BABR_A > ; impl BABR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BABR_A { match self . bits { false => BABR_A :: _0 , true => BABR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BABR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BABR_A :: _1 } } # [ doc = "Write proxy for field `BABR`" ] pub struct BABR_W < 'a > { w : & 'a mut W , } impl < 'a > BABR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BABR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The corresponding interrupt source is masked." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BABR_A :: _0 ) } # [ doc = "The corresponding interrupt source is not masked." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BABR_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bit 15 - TS_TIMER Interrupt Mask" ] # [ inline ( always ) ] pub fn ts_timer ( & self ) -> TS_TIMER_R { TS_TIMER_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - TS_AVAIL Interrupt Mask" ] # [ inline ( always ) ] pub fn ts_avail ( & self ) -> TS_AVAIL_R { TS_AVAIL_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - WAKEUP Interrupt Mask" ] # [ inline ( always ) ] pub fn wakeup ( & self ) -> WAKEUP_R { WAKEUP_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - PLR Interrupt Mask" ] # [ inline ( always ) ] pub fn plr ( & self ) -> PLR_R { PLR_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - UN Interrupt Mask" ] # [ inline ( always ) ] pub fn un ( & self ) -> UN_R { UN_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - RL Interrupt Mask" ] # [ inline ( always ) ] pub fn rl ( & self ) -> RL_R { RL_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - LC Interrupt Mask" ] # [ inline ( always ) ] pub fn lc ( & self ) -> LC_R { LC_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - EBERR Interrupt Mask" ] # [ inline ( always ) ] pub fn eberr ( & self ) -> EBERR_R { EBERR_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - MII Interrupt Mask" ] # [ inline ( always ) ] pub fn mii ( & self ) -> MII_R { MII_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - RXB Interrupt Mask" ] # [ inline ( always ) ] pub fn rxb ( & self ) -> RXB_R { RXB_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - RXF Interrupt Mask" ] # [ inline ( always ) ] pub fn rxf ( & self ) -> RXF_R { RXF_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - TXB Interrupt Mask" ] # [ inline ( always ) ] pub fn txb ( & self ) -> TXB_R { TXB_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - TXF Interrupt Mask" ] # [ inline ( always ) ] pub fn txf ( & self ) -> TXF_R { TXF_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - GRA Interrupt Mask" ] # [ inline ( always ) ] pub fn gra ( & self ) -> GRA_R { GRA_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - BABT Interrupt Mask" ] # [ inline ( always ) ] pub fn babt ( & self ) -> BABT_R { BABT_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - BABR Interrupt Mask" ] # [ inline ( always ) ] pub fn babr ( & self ) -> BABR_R { BABR_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 15 - TS_TIMER Interrupt Mask" ] # [ inline ( always ) ] pub fn ts_timer ( & mut self ) -> TS_TIMER_W { TS_TIMER_W { w : self } } # [ doc = "Bit 16 - TS_AVAIL Interrupt Mask" ] # [ inline ( always ) ] pub fn ts_avail ( & mut self ) -> TS_AVAIL_W { TS_AVAIL_W { w : self } } # [ doc = "Bit 17 - WAKEUP Interrupt Mask" ] # [ inline ( always ) ] pub fn wakeup ( & mut self ) -> WAKEUP_W { WAKEUP_W { w : self } } # [ doc = "Bit 18 - PLR Interrupt Mask" ] # [ inline ( always ) ] pub fn plr ( & mut self ) -> PLR_W { PLR_W { w : self } } # [ doc = "Bit 19 - UN Interrupt Mask" ] # [ inline ( always ) ] pub fn un ( & mut self ) -> UN_W { UN_W { w : self } } # [ doc = "Bit 20 - RL Interrupt Mask" ] # [ inline ( always ) ] pub fn rl ( & mut self ) -> RL_W { RL_W { w : self } } # [ doc = "Bit 21 - LC Interrupt Mask" ] # [ inline ( always ) ] pub fn lc ( & mut self ) -> LC_W { LC_W { w : self } } # [ doc = "Bit 22 - EBERR Interrupt Mask" ] # [ inline ( always ) ] pub fn eberr ( & mut self ) -> EBERR_W { EBERR_W { w : self } } # [ doc = "Bit 23 - MII Interrupt Mask" ] # [ inline ( always ) ] pub fn mii ( & mut self ) -> MII_W { MII_W { w : self } } # [ doc = "Bit 24 - RXB Interrupt Mask" ] # [ inline ( always ) ] pub fn rxb ( & mut self ) -> RXB_W { RXB_W { w : self } } # [ doc = "Bit 25 - RXF Interrupt Mask" ] # [ inline ( always ) ] pub fn rxf ( & mut self ) -> RXF_W { RXF_W { w : self } } # [ doc = "Bit 26 - TXB Interrupt Mask" ] # [ inline ( always ) ] pub fn txb ( & mut self ) -> TXB_W { TXB_W { w : self } } # [ doc = "Bit 27 - TXF Interrupt Mask" ] # [ inline ( always ) ] pub fn txf ( & mut self ) -> TXF_W { TXF_W { w : self } } # [ doc = "Bit 28 - GRA Interrupt Mask" ] # [ inline ( always ) ] pub fn gra ( & mut self ) -> GRA_W { GRA_W { w : self } } # [ doc = "Bit 29 - BABT Interrupt Mask" ] # [ inline ( always ) ] pub fn babt ( & mut self ) -> BABT_W { BABT_W { w : self } } # [ doc = "Bit 30 - BABR Interrupt Mask" ] # [ inline ( always ) ] pub fn babr ( & mut self ) -> BABR_W { BABR_W { w : self } } } } # [ doc = "Receive Descriptor Active Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rdar](rdar) module" ] pub type RDAR = crate :: Reg < u32 , _RDAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RDAR ; # [ doc = "`read()` method returns [rdar::R](rdar::R) reader structure" ] impl crate :: Readable for RDAR { } # [ doc = "`write(|w| ..)` method takes [rdar::W](rdar::W) writer structure" ] impl crate :: Writable for RDAR { } # [ doc = "Receive Descriptor Active Register" ] pub mod rdar { # [ doc = "Reader of register RDAR" ] pub type R = crate :: R < u32 , super :: RDAR > ; # [ doc = "Writer for register RDAR" ] pub type W = crate :: W < u32 , super :: RDAR > ; # [ doc = "Register RDAR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RDAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RDAR`" ] pub type RDAR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RDAR`" ] pub struct RDAR_W < 'a > { w : & 'a mut W , } impl < 'a > RDAR_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 } } impl R { # [ doc = "Bit 24 - Receive Descriptor Active" ] # [ inline ( always ) ] pub fn rdar ( & self ) -> RDAR_R { RDAR_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 24 - Receive Descriptor Active" ] # [ inline ( always ) ] pub fn rdar ( & mut self ) -> RDAR_W { RDAR_W { w : self } } } } # [ doc = "Transmit Descriptor Active Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tdar](tdar) module" ] pub type TDAR = crate :: Reg < u32 , _TDAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TDAR ; # [ doc = "`read()` method returns [tdar::R](tdar::R) reader structure" ] impl crate :: Readable for TDAR { } # [ doc = "`write(|w| ..)` method takes [tdar::W](tdar::W) writer structure" ] impl crate :: Writable for TDAR { } # [ doc = "Transmit Descriptor Active Register" ] pub mod tdar { # [ doc = "Reader of register TDAR" ] pub type R = crate :: R < u32 , super :: TDAR > ; # [ doc = "Writer for register TDAR" ] pub type W = crate :: W < u32 , super :: TDAR > ; # [ doc = "Register TDAR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TDAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TDAR`" ] pub type TDAR_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `TDAR`" ] pub struct TDAR_W < 'a > { w : & 'a mut W , } impl < 'a > TDAR_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 } } impl R { # [ doc = "Bit 24 - Transmit Descriptor Active" ] # [ inline ( always ) ] pub fn tdar ( & self ) -> TDAR_R { TDAR_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 24 - Transmit Descriptor Active" ] # [ inline ( always ) ] pub fn tdar ( & mut self ) -> TDAR_W { TDAR_W { w : self } } } } # [ doc = "Ethernet Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ecr](ecr) module" ] pub type ECR = crate :: Reg < u32 , _ECR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ECR ; # [ doc = "`read()` method returns [ecr::R](ecr::R) reader structure" ] impl crate :: Readable for ECR { } # [ doc = "`write(|w| ..)` method takes [ecr::W](ecr::W) writer structure" ] impl crate :: Writable for ECR { } # [ doc = "Ethernet Control Register" ] pub mod ecr { # [ doc = "Reader of register ECR" ] pub type R = crate :: R < u32 , super :: ECR > ; # [ doc = "Writer for register ECR" ] pub type W = crate :: W < u32 , super :: ECR > ; # [ doc = "Register ECR `reset()`'s with value 0xf000_0000" ] impl crate :: ResetValue for super :: ECR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xf000_0000 } } # [ doc = "Reader of field `RESET`" ] pub type RESET_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RESET`" ] pub struct RESET_W < 'a > { w : & 'a mut W , } impl < 'a > RESET_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Ethernet Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ETHEREN_A { # [ doc = "0: Reception immediately stops and transmission stops after a bad CRC is appended to any currently transmitted frame." ] _0 , # [ doc = "1: MAC is enabled, and reception and transmission are possible." ] _1 } impl From < ETHEREN_A > for bool { # [ inline ( always ) ] fn from ( variant : ETHEREN_A ) -> Self { match variant { ETHEREN_A :: _0 => false , ETHEREN_A :: _1 => true } } } # [ doc = "Reader of field `ETHEREN`" ] pub type ETHEREN_R = crate :: R < bool , ETHEREN_A > ; impl ETHEREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ETHEREN_A { match self . bits { false => ETHEREN_A :: _0 , true => ETHEREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ETHEREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ETHEREN_A :: _1 } } # [ doc = "Write proxy for field `ETHEREN`" ] pub struct ETHEREN_W < 'a > { w : & 'a mut W , } impl < 'a > ETHEREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ETHEREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reception immediately stops and transmission stops after a bad CRC is appended to any currently transmitted frame." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ETHEREN_A :: _0 ) } # [ doc = "MAC is enabled, and reception and transmission are possible." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ETHEREN_A :: _1 ) } # [ 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 } } # [ doc = "Magic Packet Detection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAGICEN_A { # [ doc = "0: Magic detection logic disabled." ] _0 , # [ doc = "1: The MAC core detects magic packets and asserts EIR\\[WAKEUP\\] when a frame is detected." ] _1 } impl From < MAGICEN_A > for bool { # [ inline ( always ) ] fn from ( variant : MAGICEN_A ) -> Self { match variant { MAGICEN_A :: _0 => false , MAGICEN_A :: _1 => true } } } # [ doc = "Reader of field `MAGICEN`" ] pub type MAGICEN_R = crate :: R < bool , MAGICEN_A > ; impl MAGICEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAGICEN_A { match self . bits { false => MAGICEN_A :: _0 , true => MAGICEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAGICEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAGICEN_A :: _1 } } # [ doc = "Write proxy for field `MAGICEN`" ] pub struct MAGICEN_W < 'a > { w : & 'a mut W , } impl < 'a > MAGICEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAGICEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Magic detection logic disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAGICEN_A :: _0 ) } # [ doc = "The MAC core detects magic packets and asserts EIR\\[WAKEUP\\] when a frame is detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAGICEN_A :: _1 ) } # [ 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 = "Sleep Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEP_A { # [ doc = "0: Normal operating mode." ] _0 , # [ doc = "1: Sleep mode." ] _1 } impl From < SLEEP_A > for bool { # [ inline ( always ) ] fn from ( variant : SLEEP_A ) -> Self { match variant { SLEEP_A :: _0 => false , SLEEP_A :: _1 => true } } } # [ doc = "Reader of field `SLEEP`" ] pub type SLEEP_R = crate :: R < bool , SLEEP_A > ; impl SLEEP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLEEP_A { match self . bits { false => SLEEP_A :: _0 , true => SLEEP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLEEP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLEEP_A :: _1 } } # [ doc = "Write proxy for field `SLEEP`" ] pub struct SLEEP_W < 'a > { w : & 'a mut W , } impl < 'a > SLEEP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLEEP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operating mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLEEP_A :: _0 ) } # [ doc = "Sleep mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLEEP_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "EN1588 Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN1588_A { # [ doc = "0: Legacy FEC buffer descriptors and functions enabled." ] _0 , # [ doc = "1: Enhanced frame time-stamping functions enabled." ] _1 } impl From < EN1588_A > for bool { # [ inline ( always ) ] fn from ( variant : EN1588_A ) -> Self { match variant { EN1588_A :: _0 => false , EN1588_A :: _1 => true } } } # [ doc = "Reader of field `EN1588`" ] pub type EN1588_R = crate :: R < bool , EN1588_A > ; impl EN1588_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN1588_A { match self . bits { false => EN1588_A :: _0 , true => EN1588_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN1588_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN1588_A :: _1 } } # [ doc = "Write proxy for field `EN1588`" ] pub struct EN1588_W < 'a > { w : & 'a mut W , } impl < 'a > EN1588_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN1588_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Legacy FEC buffer descriptors and functions enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN1588_A :: _0 ) } # [ doc = "Enhanced frame time-stamping functions enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN1588_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Debug Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBGEN_A { # [ doc = "0: MAC continues operation in debug mode." ] _0 , # [ doc = "1: MAC enters hardware freeze mode when the processor is in debug mode." ] _1 } impl From < DBGEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DBGEN_A ) -> Self { match variant { DBGEN_A :: _0 => false , DBGEN_A :: _1 => true } } } # [ doc = "Reader of field `DBGEN`" ] pub type DBGEN_R = crate :: R < bool , DBGEN_A > ; impl DBGEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBGEN_A { match self . bits { false => DBGEN_A :: _0 , true => DBGEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBGEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBGEN_A :: _1 } } # [ doc = "Write proxy for field `DBGEN`" ] pub struct DBGEN_W < 'a > { w : & 'a mut W , } impl < 'a > DBGEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBGEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MAC continues operation in debug mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DBGEN_A :: _0 ) } # [ doc = "MAC enters hardware freeze mode when the processor is in debug mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DBGEN_A :: _1 ) } # [ 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 = "Reader of field `STOPEN`" ] pub type STOPEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `STOPEN`" ] pub struct STOPEN_W < 'a > { w : & 'a mut W , } impl < 'a > STOPEN_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 = "Descriptor Byte Swapping Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBSWP_A { # [ doc = "0: The buffer descriptor bytes are not swapped to support big-endian devices." ] _0 , # [ doc = "1: The buffer descriptor bytes are swapped to support little-endian devices." ] _1 } impl From < DBSWP_A > for bool { # [ inline ( always ) ] fn from ( variant : DBSWP_A ) -> Self { match variant { DBSWP_A :: _0 => false , DBSWP_A :: _1 => true } } } # [ doc = "Reader of field `DBSWP`" ] pub type DBSWP_R = crate :: R < bool , DBSWP_A > ; impl DBSWP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DBSWP_A { match self . bits { false => DBSWP_A :: _0 , true => DBSWP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DBSWP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DBSWP_A :: _1 } } # [ doc = "Write proxy for field `DBSWP`" ] pub struct DBSWP_W < 'a > { w : & 'a mut W , } impl < 'a > DBSWP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBSWP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The buffer descriptor bytes are not swapped to support big-endian devices." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DBSWP_A :: _0 ) } # [ doc = "The buffer descriptor bytes are swapped to support little-endian devices." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DBSWP_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } impl R { # [ doc = "Bit 0 - Ethernet MAC Reset" ] # [ inline ( always ) ] pub fn reset ( & self ) -> RESET_R { RESET_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Ethernet Enable" ] # [ inline ( always ) ] pub fn etheren ( & self ) -> ETHEREN_R { ETHEREN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Magic Packet Detection Enable" ] # [ inline ( always ) ] pub fn magicen ( & self ) -> MAGICEN_R { MAGICEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Sleep Mode Enable" ] # [ inline ( always ) ] pub fn sleep ( & self ) -> SLEEP_R { SLEEP_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - EN1588 Enable" ] # [ inline ( always ) ] pub fn en1588 ( & self ) -> EN1588_R { EN1588_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Debug Enable" ] # [ inline ( always ) ] pub fn dbgen ( & self ) -> DBGEN_R { DBGEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - STOPEN Signal Control" ] # [ inline ( always ) ] pub fn stopen ( & self ) -> STOPEN_R { STOPEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Descriptor Byte Swapping Enable" ] # [ inline ( always ) ] pub fn dbswp ( & self ) -> DBSWP_R { DBSWP_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Ethernet MAC Reset" ] # [ inline ( always ) ] pub fn reset ( & mut self ) -> RESET_W { RESET_W { w : self } } # [ doc = "Bit 1 - Ethernet Enable" ] # [ inline ( always ) ] pub fn etheren ( & mut self ) -> ETHEREN_W { ETHEREN_W { w : self } } # [ doc = "Bit 2 - Magic Packet Detection Enable" ] # [ inline ( always ) ] pub fn magicen ( & mut self ) -> MAGICEN_W { MAGICEN_W { w : self } } # [ doc = "Bit 3 - Sleep Mode Enable" ] # [ inline ( always ) ] pub fn sleep ( & mut self ) -> SLEEP_W { SLEEP_W { w : self } } # [ doc = "Bit 4 - EN1588 Enable" ] # [ inline ( always ) ] pub fn en1588 ( & mut self ) -> EN1588_W { EN1588_W { w : self } } # [ doc = "Bit 6 - Debug Enable" ] # [ inline ( always ) ] pub fn dbgen ( & mut self ) -> DBGEN_W { DBGEN_W { w : self } } # [ doc = "Bit 7 - STOPEN Signal Control" ] # [ inline ( always ) ] pub fn stopen ( & mut self ) -> STOPEN_W { STOPEN_W { w : self } } # [ doc = "Bit 8 - Descriptor Byte Swapping Enable" ] # [ inline ( always ) ] pub fn dbswp ( & mut self ) -> DBSWP_W { DBSWP_W { w : self } } } } # [ doc = "MII Management Frame Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mmfr](mmfr) module" ] pub type MMFR = crate :: Reg < u32 , _MMFR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MMFR ; # [ doc = "`read()` method returns [mmfr::R](mmfr::R) reader structure" ] impl crate :: Readable for MMFR { } # [ doc = "`write(|w| ..)` method takes [mmfr::W](mmfr::W) writer structure" ] impl crate :: Writable for MMFR { } # [ doc = "MII Management Frame Register" ] pub mod mmfr { # [ doc = "Reader of register MMFR" ] pub type R = crate :: R < u32 , super :: MMFR > ; # [ doc = "Writer for register MMFR" ] pub type W = crate :: W < u32 , super :: MMFR > ; # [ doc = "Register MMFR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MMFR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA`" ] pub type DATA_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `DATA`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `TA`" ] pub type TA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TA`" ] pub struct TA_W < 'a > { w : & 'a mut W , } impl < 'a > TA_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 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "Reader of field `RA`" ] pub type RA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RA`" ] pub struct RA_W < 'a > { w : & 'a mut W , } impl < 'a > RA_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 & ! ( 0x1f << 18 ) ) | ( ( ( value as u32 ) & 0x1f ) << 18 ) ; self . w } } # [ doc = "Reader of field `PA`" ] pub type PA_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PA`" ] pub struct PA_W < 'a > { w : & 'a mut W , } impl < 'a > PA_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 & ! ( 0x1f << 23 ) ) | ( ( ( value as u32 ) & 0x1f ) << 23 ) ; self . w } } # [ doc = "Reader of field `OP`" ] pub type OP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `OP`" ] pub struct OP_W < 'a > { w : & 'a mut W , } impl < 'a > OP_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 << 28 ) ) | ( ( ( value as u32 ) & 0x03 ) << 28 ) ; self . w } } # [ doc = "Reader of field `ST`" ] pub type ST_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `ST`" ] pub struct ST_W < 'a > { w : & 'a mut W , } impl < 'a > ST_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 << 30 ) ) | ( ( ( value as u32 ) & 0x03 ) << 30 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Management Frame Data" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:17 - Turn Around" ] # [ inline ( always ) ] pub fn ta ( & self ) -> TA_R { TA_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:22 - Register Address" ] # [ inline ( always ) ] pub fn ra ( & self ) -> RA_R { RA_R :: new ( ( ( self . bits >> 18 ) & 0x1f ) as u8 ) } # [ doc = "Bits 23:27 - PHY Address" ] # [ inline ( always ) ] pub fn pa ( & self ) -> PA_R { PA_R :: new ( ( ( self . bits >> 23 ) & 0x1f ) as u8 ) } # [ doc = "Bits 28:29 - Operation Code" ] # [ inline ( always ) ] pub fn op ( & self ) -> OP_R { OP_R :: new ( ( ( self . bits >> 28 ) & 0x03 ) as u8 ) } # [ doc = "Bits 30:31 - Start Of Frame Delimiter" ] # [ inline ( always ) ] pub fn st ( & self ) -> ST_R { ST_R :: new ( ( ( self . bits >> 30 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:15 - Management Frame Data" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } # [ doc = "Bits 16:17 - Turn Around" ] # [ inline ( always ) ] pub fn ta ( & mut self ) -> TA_W { TA_W { w : self } } # [ doc = "Bits 18:22 - Register Address" ] # [ inline ( always ) ] pub fn ra ( & mut self ) -> RA_W { RA_W { w : self } } # [ doc = "Bits 23:27 - PHY Address" ] # [ inline ( always ) ] pub fn pa ( & mut self ) -> PA_W { PA_W { w : self } } # [ doc = "Bits 28:29 - Operation Code" ] # [ inline ( always ) ] pub fn op ( & mut self ) -> OP_W { OP_W { w : self } } # [ doc = "Bits 30:31 - Start Of Frame Delimiter" ] # [ inline ( always ) ] pub fn st ( & mut self ) -> ST_W { ST_W { w : self } } } } # [ doc = "MII Speed Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mscr](mscr) module" ] pub type MSCR = crate :: Reg < u32 , _MSCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MSCR ; # [ doc = "`read()` method returns [mscr::R](mscr::R) reader structure" ] impl crate :: Readable for MSCR { } # [ doc = "`write(|w| ..)` method takes [mscr::W](mscr::W) writer structure" ] impl crate :: Writable for MSCR { } # [ doc = "MII Speed Control Register" ] pub mod mscr { # [ doc = "Reader of register MSCR" ] pub type R = crate :: R < u32 , super :: MSCR > ; # [ doc = "Writer for register MSCR" ] pub type W = crate :: W < u32 , super :: MSCR > ; # [ doc = "Register MSCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MSCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MII_SPEED`" ] pub type MII_SPEED_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `MII_SPEED`" ] pub struct MII_SPEED_W < 'a > { w : & 'a mut W , } impl < 'a > MII_SPEED_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 & ! ( 0x3f << 1 ) ) | ( ( ( value as u32 ) & 0x3f ) << 1 ) ; self . w } } # [ doc = "Disable Preamble\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIS_PRE_A { # [ doc = "0: Preamble enabled." ] _0 , # [ doc = "1: Preamble (32 ones) is not prepended to the MII management frame." ] _1 } impl From < DIS_PRE_A > for bool { # [ inline ( always ) ] fn from ( variant : DIS_PRE_A ) -> Self { match variant { DIS_PRE_A :: _0 => false , DIS_PRE_A :: _1 => true } } } # [ doc = "Reader of field `DIS_PRE`" ] pub type DIS_PRE_R = crate :: R < bool , DIS_PRE_A > ; impl DIS_PRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIS_PRE_A { match self . bits { false => DIS_PRE_A :: _0 , true => DIS_PRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIS_PRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIS_PRE_A :: _1 } } # [ doc = "Write proxy for field `DIS_PRE`" ] pub struct DIS_PRE_W < 'a > { w : & 'a mut W , } impl < 'a > DIS_PRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIS_PRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Preamble enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIS_PRE_A :: _0 ) } # [ doc = "Preamble (32 ones) is not prepended to the MII management frame." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIS_PRE_A :: _1 ) } # [ 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 = "Hold time On MDIO Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HOLDTIME_A { # [ doc = "0: 1 internal module clock cycle" ] _000 , # [ doc = "1: 2 internal module clock cycles" ] _001 , # [ doc = "2: 3 internal module clock cycles" ] _010 , # [ doc = "7: 8 internal module clock cycles" ] _111 } impl From < HOLDTIME_A > for u8 { # [ inline ( always ) ] fn from ( variant : HOLDTIME_A ) -> Self { match variant { HOLDTIME_A :: _000 => 0 , HOLDTIME_A :: _001 => 1 , HOLDTIME_A :: _010 => 2 , HOLDTIME_A :: _111 => 7 } } } # [ doc = "Reader of field `HOLDTIME`" ] pub type HOLDTIME_R = crate :: R < u8 , HOLDTIME_A > ; impl HOLDTIME_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , HOLDTIME_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( HOLDTIME_A :: _000 ) , 1 => Val ( HOLDTIME_A :: _001 ) , 2 => Val ( HOLDTIME_A :: _010 ) , 7 => Val ( HOLDTIME_A :: _111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == HOLDTIME_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == HOLDTIME_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == HOLDTIME_A :: _010 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == HOLDTIME_A :: _111 } } # [ doc = "Write proxy for field `HOLDTIME`" ] pub struct HOLDTIME_W < 'a > { w : & 'a mut W , } impl < 'a > HOLDTIME_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HOLDTIME_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "1 internal module clock cycle" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( HOLDTIME_A :: _000 ) } # [ doc = "2 internal module clock cycles" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( HOLDTIME_A :: _001 ) } # [ doc = "3 internal module clock cycles" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( HOLDTIME_A :: _010 ) } # [ doc = "8 internal module clock cycles" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( HOLDTIME_A :: _111 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 1:6 - MII Speed" ] # [ inline ( always ) ] pub fn mii_speed ( & self ) -> MII_SPEED_R { MII_SPEED_R :: new ( ( ( self . bits >> 1 ) & 0x3f ) as u8 ) } # [ doc = "Bit 7 - Disable Preamble" ] # [ inline ( always ) ] pub fn dis_pre ( & self ) -> DIS_PRE_R { DIS_PRE_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Hold time On MDIO Output" ] # [ inline ( always ) ] pub fn holdtime ( & self ) -> HOLDTIME_R { HOLDTIME_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } } impl W { # [ doc = "Bits 1:6 - MII Speed" ] # [ inline ( always ) ] pub fn mii_speed ( & mut self ) -> MII_SPEED_W { MII_SPEED_W { w : self } } # [ doc = "Bit 7 - Disable Preamble" ] # [ inline ( always ) ] pub fn dis_pre ( & mut self ) -> DIS_PRE_W { DIS_PRE_W { w : self } } # [ doc = "Bits 8:10 - Hold time On MDIO Output" ] # [ inline ( always ) ] pub fn holdtime ( & mut self ) -> HOLDTIME_W { HOLDTIME_W { w : self } } } } # [ doc = "MIB Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mibc](mibc) module" ] pub type MIBC = crate :: Reg < u32 , _MIBC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MIBC ; # [ doc = "`read()` method returns [mibc::R](mibc::R) reader structure" ] impl crate :: Readable for MIBC { } # [ doc = "`write(|w| ..)` method takes [mibc::W](mibc::W) writer structure" ] impl crate :: Writable for MIBC { } # [ doc = "MIB Control Register" ] pub mod mibc { # [ doc = "Reader of register MIBC" ] pub type R = crate :: R < u32 , super :: MIBC > ; # [ doc = "Writer for register MIBC" ] pub type W = crate :: W < u32 , super :: MIBC > ; # [ doc = "Register MIBC `reset()`'s with value 0xc000_0000" ] impl crate :: ResetValue for super :: MIBC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc000_0000 } } # [ doc = "MIB Clear\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MIB_CLEAR_A { # [ doc = "0: See note above." ] _0 , # [ doc = "1: All statistics counters are reset to 0." ] _1 } impl From < MIB_CLEAR_A > for bool { # [ inline ( always ) ] fn from ( variant : MIB_CLEAR_A ) -> Self { match variant { MIB_CLEAR_A :: _0 => false , MIB_CLEAR_A :: _1 => true } } } # [ doc = "Reader of field `MIB_CLEAR`" ] pub type MIB_CLEAR_R = crate :: R < bool , MIB_CLEAR_A > ; impl MIB_CLEAR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MIB_CLEAR_A { match self . bits { false => MIB_CLEAR_A :: _0 , true => MIB_CLEAR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MIB_CLEAR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MIB_CLEAR_A :: _1 } } # [ doc = "Write proxy for field `MIB_CLEAR`" ] pub struct MIB_CLEAR_W < 'a > { w : & 'a mut W , } impl < 'a > MIB_CLEAR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MIB_CLEAR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "See note above." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MIB_CLEAR_A :: _0 ) } # [ doc = "All statistics counters are reset to 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MIB_CLEAR_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "MIB Idle\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MIB_IDLE_A { # [ doc = "0: The MIB block is updating MIB counters." ] _0 , # [ doc = "1: The MIB block is not currently updating any MIB counters." ] _1 } impl From < MIB_IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : MIB_IDLE_A ) -> Self { match variant { MIB_IDLE_A :: _0 => false , MIB_IDLE_A :: _1 => true } } } # [ doc = "Reader of field `MIB_IDLE`" ] pub type MIB_IDLE_R = crate :: R < bool , MIB_IDLE_A > ; impl MIB_IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MIB_IDLE_A { match self . bits { false => MIB_IDLE_A :: _0 , true => MIB_IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MIB_IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MIB_IDLE_A :: _1 } } # [ doc = "Disable MIB Logic\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MIB_DIS_A { # [ doc = "0: MIB logic is enabled." ] _0 , # [ doc = "1: MIB logic is disabled. The MIB logic halts and does not update any MIB counters." ] _1 } impl From < MIB_DIS_A > for bool { # [ inline ( always ) ] fn from ( variant : MIB_DIS_A ) -> Self { match variant { MIB_DIS_A :: _0 => false , MIB_DIS_A :: _1 => true } } } # [ doc = "Reader of field `MIB_DIS`" ] pub type MIB_DIS_R = crate :: R < bool , MIB_DIS_A > ; impl MIB_DIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MIB_DIS_A { match self . bits { false => MIB_DIS_A :: _0 , true => MIB_DIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MIB_DIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MIB_DIS_A :: _1 } } # [ doc = "Write proxy for field `MIB_DIS`" ] pub struct MIB_DIS_W < 'a > { w : & 'a mut W , } impl < 'a > MIB_DIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MIB_DIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MIB logic is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MIB_DIS_A :: _0 ) } # [ doc = "MIB logic is disabled. The MIB logic halts and does not update any MIB counters." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MIB_DIS_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 29 - MIB Clear" ] # [ inline ( always ) ] pub fn mib_clear ( & self ) -> MIB_CLEAR_R { MIB_CLEAR_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - MIB Idle" ] # [ inline ( always ) ] pub fn mib_idle ( & self ) -> MIB_IDLE_R { MIB_IDLE_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Disable MIB Logic" ] # [ inline ( always ) ] pub fn mib_dis ( & self ) -> MIB_DIS_R { MIB_DIS_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 29 - MIB Clear" ] # [ inline ( always ) ] pub fn mib_clear ( & mut self ) -> MIB_CLEAR_W { MIB_CLEAR_W { w : self } } # [ doc = "Bit 31 - Disable MIB Logic" ] # [ inline ( always ) ] pub fn mib_dis ( & mut self ) -> MIB_DIS_W { MIB_DIS_W { w : self } } } } # [ doc = "Receive Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcr](rcr) module" ] pub type RCR = crate :: Reg < u32 , _RCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RCR ; # [ doc = "`read()` method returns [rcr::R](rcr::R) reader structure" ] impl crate :: Readable for RCR { } # [ doc = "`write(|w| ..)` method takes [rcr::W](rcr::W) writer structure" ] impl crate :: Writable for RCR { } # [ doc = "Receive Control Register" ] pub mod rcr { # [ doc = "Reader of register RCR" ] pub type R = crate :: R < u32 , super :: RCR > ; # [ doc = "Writer for register RCR" ] pub type W = crate :: W < u32 , super :: RCR > ; # [ doc = "Register RCR `reset()`'s with value 0x05ee_0001" ] impl crate :: ResetValue for super :: RCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x05ee_0001 } } # [ doc = "Internal Loopback\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOP_A { # [ doc = "0: Loopback disabled." ] _0 , # [ doc = "1: Transmitted frames are looped back internal to the device and transmit MII output signals are not asserted. DRT must be cleared." ] _1 } impl From < LOOP_A > for bool { # [ inline ( always ) ] fn from ( variant : LOOP_A ) -> Self { match variant { LOOP_A :: _0 => false , LOOP_A :: _1 => true } } } # [ doc = "Reader of field `LOOP`" ] pub type LOOP_R = crate :: R < bool , LOOP_A > ; impl LOOP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOOP_A { match self . bits { false => LOOP_A :: _0 , true => LOOP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOOP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOOP_A :: _1 } } # [ doc = "Write proxy for field `LOOP`" ] pub struct LOOP_W < 'a > { w : & 'a mut W , } impl < 'a > LOOP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOOP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Loopback disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOOP_A :: _0 ) } # [ doc = "Transmitted frames are looped back internal to the device and transmit MII output signals are not asserted. DRT must be cleared." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOOP_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Disable Receive On Transmit\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DRT_A { # [ doc = "0: Receive path operates independently of transmit. Used for full-duplex or to monitor transmit activity in half-duplex mode." ] _0 , # [ doc = "1: Disable reception of frames while transmitting. Normally used for half-duplex mode." ] _1 } impl From < DRT_A > for bool { # [ inline ( always ) ] fn from ( variant : DRT_A ) -> Self { match variant { DRT_A :: _0 => false , DRT_A :: _1 => true } } } # [ doc = "Reader of field `DRT`" ] pub type DRT_R = crate :: R < bool , DRT_A > ; impl DRT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DRT_A { match self . bits { false => DRT_A :: _0 , true => DRT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DRT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DRT_A :: _1 } } # [ doc = "Write proxy for field `DRT`" ] pub struct DRT_W < 'a > { w : & 'a mut W , } impl < 'a > DRT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DRT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive path operates independently of transmit. Used for full-duplex or to monitor transmit activity in half-duplex mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DRT_A :: _0 ) } # [ doc = "Disable reception of frames while transmitting. Normally used for half-duplex mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DRT_A :: _1 ) } # [ 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 } } # [ doc = "Media Independent Interface Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MII_MODE_A { # [ doc = "1: MII or RMII mode, as indicated by the RMII_MODE field." ] _1 } impl From < MII_MODE_A > for bool { # [ inline ( always ) ] fn from ( variant : MII_MODE_A ) -> Self { match variant { MII_MODE_A :: _1 => true } } } # [ doc = "Reader of field `MII_MODE`" ] pub type MII_MODE_R = crate :: R < bool , MII_MODE_A > ; impl MII_MODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < bool , MII_MODE_A > { use crate :: Variant :: * ; match self . bits { true => Val ( MII_MODE_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MII_MODE_A :: _1 } } # [ doc = "Write proxy for field `MII_MODE`" ] pub struct MII_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > MII_MODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MII_MODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MII or RMII mode, as indicated by the RMII_MODE field." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MII_MODE_A :: _1 ) } # [ 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 = "Promiscuous Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PROM_A { # [ doc = "0: Disabled." ] _0 , # [ doc = "1: Enabled." ] _1 } impl From < PROM_A > for bool { # [ inline ( always ) ] fn from ( variant : PROM_A ) -> Self { match variant { PROM_A :: _0 => false , PROM_A :: _1 => true } } } # [ doc = "Reader of field `PROM`" ] pub type PROM_R = crate :: R < bool , PROM_A > ; impl PROM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PROM_A { match self . bits { false => PROM_A :: _0 , true => PROM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PROM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PROM_A :: _1 } } # [ doc = "Write proxy for field `PROM`" ] pub struct PROM_W < 'a > { w : & 'a mut W , } impl < 'a > PROM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PROM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PROM_A :: _0 ) } # [ doc = "Enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PROM_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `BC_REJ`" ] pub type BC_REJ_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `BC_REJ`" ] pub struct BC_REJ_W < 'a > { w : & 'a mut W , } impl < 'a > BC_REJ_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `FCE`" ] pub type FCE_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FCE`" ] pub struct FCE_W < 'a > { w : & 'a mut W , } impl < 'a > FCE_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 = "RMII Mode Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RMII_MODE_A { # [ doc = "0: MAC configured for MII mode." ] _0 , # [ doc = "1: MAC configured for RMII operation." ] _1 } impl From < RMII_MODE_A > for bool { # [ inline ( always ) ] fn from ( variant : RMII_MODE_A ) -> Self { match variant { RMII_MODE_A :: _0 => false , RMII_MODE_A :: _1 => true } } } # [ doc = "Reader of field `RMII_MODE`" ] pub type RMII_MODE_R = crate :: R < bool , RMII_MODE_A > ; impl RMII_MODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RMII_MODE_A { match self . bits { false => RMII_MODE_A :: _0 , true => RMII_MODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RMII_MODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RMII_MODE_A :: _1 } } # [ doc = "Write proxy for field `RMII_MODE`" ] pub struct RMII_MODE_W < 'a > { w : & 'a mut W , } impl < 'a > RMII_MODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RMII_MODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MAC configured for MII mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RMII_MODE_A :: _0 ) } # [ doc = "MAC configured for RMII operation." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RMII_MODE_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Enables 10-Mbps mode of the RMII .\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RMII_10T_A { # [ doc = "0: 100 Mbps operation." ] _0 , # [ doc = "1: 10 Mbps operation." ] _1 } impl From < RMII_10T_A > for bool { # [ inline ( always ) ] fn from ( variant : RMII_10T_A ) -> Self { match variant { RMII_10T_A :: _0 => false , RMII_10T_A :: _1 => true } } } # [ doc = "Reader of field `RMII_10T`" ] pub type RMII_10T_R = crate :: R < bool , RMII_10T_A > ; impl RMII_10T_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RMII_10T_A { match self . bits { false => RMII_10T_A :: _0 , true => RMII_10T_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RMII_10T_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RMII_10T_A :: _1 } } # [ doc = "Write proxy for field `RMII_10T`" ] pub struct RMII_10T_W < 'a > { w : & 'a mut W , } impl < 'a > RMII_10T_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RMII_10T_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "100 Mbps operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RMII_10T_A :: _0 ) } # [ doc = "10 Mbps operation." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RMII_10T_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Enable Frame Padding Remove On Receive\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PADEN_A { # [ doc = "0: No padding is removed on receive by the MAC." ] _0 , # [ doc = "1: Padding is removed from received frames." ] _1 } impl From < PADEN_A > for bool { # [ inline ( always ) ] fn from ( variant : PADEN_A ) -> Self { match variant { PADEN_A :: _0 => false , PADEN_A :: _1 => true } } } # [ doc = "Reader of field `PADEN`" ] pub type PADEN_R = crate :: R < bool , PADEN_A > ; impl PADEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PADEN_A { match self . bits { false => PADEN_A :: _0 , true => PADEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PADEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PADEN_A :: _1 } } # [ doc = "Write proxy for field `PADEN`" ] pub struct PADEN_W < 'a > { w : & 'a mut W , } impl < 'a > PADEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PADEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No padding is removed on receive by the MAC." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PADEN_A :: _0 ) } # [ doc = "Padding is removed from received frames." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PADEN_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Terminate/Forward Pause Frames\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PAUFWD_A { # [ doc = "0: Pause frames are terminated and discarded in the MAC." ] _0 , # [ doc = "1: Pause frames are forwarded to the user application." ] _1 } impl From < PAUFWD_A > for bool { # [ inline ( always ) ] fn from ( variant : PAUFWD_A ) -> Self { match variant { PAUFWD_A :: _0 => false , PAUFWD_A :: _1 => true } } } # [ doc = "Reader of field `PAUFWD`" ] pub type PAUFWD_R = crate :: R < bool , PAUFWD_A > ; impl PAUFWD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PAUFWD_A { match self . bits { false => PAUFWD_A :: _0 , true => PAUFWD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PAUFWD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PAUFWD_A :: _1 } } # [ doc = "Write proxy for field `PAUFWD`" ] pub struct PAUFWD_W < 'a > { w : & 'a mut W , } impl < 'a > PAUFWD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PAUFWD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pause frames are terminated and discarded in the MAC." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PAUFWD_A :: _0 ) } # [ doc = "Pause frames are forwarded to the user application." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PAUFWD_A :: _1 ) } # [ 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 = "Terminate/Forward Received CRC\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCFWD_A { # [ doc = "0: The CRC field of received frames is transmitted to the user application." ] _0 , # [ doc = "1: The CRC field is stripped from the frame." ] _1 } impl From < CRCFWD_A > for bool { # [ inline ( always ) ] fn from ( variant : CRCFWD_A ) -> Self { match variant { CRCFWD_A :: _0 => false , CRCFWD_A :: _1 => true } } } # [ doc = "Reader of field `CRCFWD`" ] pub type CRCFWD_R = crate :: R < bool , CRCFWD_A > ; impl CRCFWD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRCFWD_A { match self . bits { false => CRCFWD_A :: _0 , true => CRCFWD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRCFWD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRCFWD_A :: _1 } } # [ doc = "Write proxy for field `CRCFWD`" ] pub struct CRCFWD_W < 'a > { w : & 'a mut W , } impl < 'a > CRCFWD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRCFWD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The CRC field of received frames is transmitted to the user application." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRCFWD_A :: _0 ) } # [ doc = "The CRC field is stripped from the frame." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRCFWD_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "MAC Control Frame Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CFEN_A { # [ doc = "0: MAC control frames with any opcode other than 0x0001 (pause frame) are accepted and forwarded to the client interface." ] _0 , # [ doc = "1: MAC control frames with any opcode other than 0x0001 (pause frame) are silently discarded." ] _1 } impl From < CFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CFEN_A ) -> Self { match variant { CFEN_A :: _0 => false , CFEN_A :: _1 => true } } } # [ doc = "Reader of field `CFEN`" ] pub type CFEN_R = crate :: R < bool , CFEN_A > ; impl CFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CFEN_A { match self . bits { false => CFEN_A :: _0 , true => CFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CFEN_A :: _1 } } # [ doc = "Write proxy for field `CFEN`" ] pub struct CFEN_W < 'a > { w : & 'a mut W , } impl < 'a > CFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MAC control frames with any opcode other than 0x0001 (pause frame) are accepted and forwarded to the client interface." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CFEN_A :: _0 ) } # [ doc = "MAC control frames with any opcode other than 0x0001 (pause frame) are silently discarded." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CFEN_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Reader of field `MAX_FL`" ] pub type MAX_FL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MAX_FL`" ] pub struct MAX_FL_W < 'a > { w : & 'a mut W , } impl < 'a > MAX_FL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x3fff << 16 ) ) | ( ( ( value as u32 ) & 0x3fff ) << 16 ) ; self . w } } # [ doc = "Payload Length Check Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NLC_A { # [ doc = "0: The payload length check is disabled." ] _0 , # [ doc = "1: The core checks the frame's payload length with the frame length/type field. Errors are indicated in the EIR\\[PLC\\] field." ] _1 } impl From < NLC_A > for bool { # [ inline ( always ) ] fn from ( variant : NLC_A ) -> Self { match variant { NLC_A :: _0 => false , NLC_A :: _1 => true } } } # [ doc = "Reader of field `NLC`" ] pub type NLC_R = crate :: R < bool , NLC_A > ; impl NLC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NLC_A { match self . bits { false => NLC_A :: _0 , true => NLC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NLC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NLC_A :: _1 } } # [ doc = "Write proxy for field `NLC`" ] pub struct NLC_W < 'a > { w : & 'a mut W , } impl < 'a > NLC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NLC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The payload length check is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NLC_A :: _0 ) } # [ doc = "The core checks the frame's payload length with the frame length/type field. Errors are indicated in the EIR\\[PLC\\] field." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NLC_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Reader of field `GRS`" ] pub type GRS_R = crate :: R < bool , bool > ; impl R { # [ doc = "Bit 0 - Internal Loopback" ] # [ inline ( always ) ] pub fn loop_ ( & self ) -> LOOP_R { LOOP_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Disable Receive On Transmit" ] # [ inline ( always ) ] pub fn drt ( & self ) -> DRT_R { DRT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Media Independent Interface Mode" ] # [ inline ( always ) ] pub fn mii_mode ( & self ) -> MII_MODE_R { MII_MODE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Promiscuous Mode" ] # [ inline ( always ) ] pub fn prom ( & self ) -> PROM_R { PROM_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Broadcast Frame Reject" ] # [ inline ( always ) ] pub fn bc_rej ( & self ) -> BC_REJ_R { BC_REJ_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Flow Control Enable" ] # [ inline ( always ) ] pub fn fce ( & self ) -> FCE_R { FCE_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - RMII Mode Enable" ] # [ inline ( always ) ] pub fn rmii_mode ( & self ) -> RMII_MODE_R { RMII_MODE_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Enables 10-Mbps mode of the RMII ." ] # [ inline ( always ) ] pub fn rmii_10t ( & self ) -> RMII_10T_R { RMII_10T_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Enable Frame Padding Remove On Receive" ] # [ inline ( always ) ] pub fn paden ( & self ) -> PADEN_R { PADEN_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Terminate/Forward Pause Frames" ] # [ inline ( always ) ] pub fn paufwd ( & self ) -> PAUFWD_R { PAUFWD_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Terminate/Forward Received CRC" ] # [ inline ( always ) ] pub fn crcfwd ( & self ) -> CRCFWD_R { CRCFWD_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - MAC Control Frame Enable" ] # [ inline ( always ) ] pub fn cfen ( & self ) -> CFEN_R { CFEN_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:29 - Maximum Frame Length" ] # [ inline ( always ) ] pub fn max_fl ( & self ) -> MAX_FL_R { MAX_FL_R :: new ( ( ( self . bits >> 16 ) & 0x3fff ) as u16 ) } # [ doc = "Bit 30 - Payload Length Check Disable" ] # [ inline ( always ) ] pub fn nlc ( & self ) -> NLC_R { NLC_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Graceful Receive Stopped" ] # [ inline ( always ) ] pub fn grs ( & self ) -> GRS_R { GRS_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Internal Loopback" ] # [ inline ( always ) ] pub fn loop_ ( & mut self ) -> LOOP_W { LOOP_W { w : self } } # [ doc = "Bit 1 - Disable Receive On Transmit" ] # [ inline ( always ) ] pub fn drt ( & mut self ) -> DRT_W { DRT_W { w : self } } # [ doc = "Bit 2 - Media Independent Interface Mode" ] # [ inline ( always ) ] pub fn mii_mode ( & mut self ) -> MII_MODE_W { MII_MODE_W { w : self } } # [ doc = "Bit 3 - Promiscuous Mode" ] # [ inline ( always ) ] pub fn prom ( & mut self ) -> PROM_W { PROM_W { w : self } } # [ doc = "Bit 4 - Broadcast Frame Reject" ] # [ inline ( always ) ] pub fn bc_rej ( & mut self ) -> BC_REJ_W { BC_REJ_W { w : self } } # [ doc = "Bit 5 - Flow Control Enable" ] # [ inline ( always ) ] pub fn fce ( & mut self ) -> FCE_W { FCE_W { w : self } } # [ doc = "Bit 8 - RMII Mode Enable" ] # [ inline ( always ) ] pub fn rmii_mode ( & mut self ) -> RMII_MODE_W { RMII_MODE_W { w : self } } # [ doc = "Bit 9 - Enables 10-Mbps mode of the RMII ." ] # [ inline ( always ) ] pub fn rmii_10t ( & mut self ) -> RMII_10T_W { RMII_10T_W { w : self } } # [ doc = "Bit 12 - Enable Frame Padding Remove On Receive" ] # [ inline ( always ) ] pub fn paden ( & mut self ) -> PADEN_W { PADEN_W { w : self } } # [ doc = "Bit 13 - Terminate/Forward Pause Frames" ] # [ inline ( always ) ] pub fn paufwd ( & mut self ) -> PAUFWD_W { PAUFWD_W { w : self } } # [ doc = "Bit 14 - Terminate/Forward Received CRC" ] # [ inline ( always ) ] pub fn crcfwd ( & mut self ) -> CRCFWD_W { CRCFWD_W { w : self } } # [ doc = "Bit 15 - MAC Control Frame Enable" ] # [ inline ( always ) ] pub fn cfen ( & mut self ) -> CFEN_W { CFEN_W { w : self } } # [ doc = "Bits 16:29 - Maximum Frame Length" ] # [ inline ( always ) ] pub fn max_fl ( & mut self ) -> MAX_FL_W { MAX_FL_W { w : self } } # [ doc = "Bit 30 - Payload Length Check Disable" ] # [ inline ( always ) ] pub fn nlc ( & mut self ) -> NLC_W { NLC_W { w : self } } } } # [ doc = "Transmit Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcr](tcr) module" ] pub type TCR = crate :: Reg < u32 , _TCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCR ; # [ doc = "`read()` method returns [tcr::R](tcr::R) reader structure" ] impl crate :: Readable for TCR { } # [ doc = "`write(|w| ..)` method takes [tcr::W](tcr::W) writer structure" ] impl crate :: Writable for TCR { } # [ doc = "Transmit Control Register" ] pub mod tcr { # [ doc = "Reader of register TCR" ] pub type R = crate :: R < u32 , super :: TCR > ; # [ doc = "Writer for register TCR" ] pub type W = crate :: W < u32 , super :: TCR > ; # [ doc = "Register TCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `GTS`" ] pub type GTS_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `GTS`" ] pub struct GTS_W < 'a > { w : & 'a mut W , } impl < 'a > GTS_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `FDEN`" ] pub type FDEN_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `FDEN`" ] pub struct FDEN_W < 'a > { w : & 'a mut W , } impl < 'a > FDEN_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 = "Transmit Frame Control Pause\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFC_PAUSE_A { # [ doc = "0: No PAUSE frame transmitted." ] _0 , # [ doc = "1: The MAC stops transmission of data frames after the current transmission is complete." ] _1 } impl From < TFC_PAUSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TFC_PAUSE_A ) -> Self { match variant { TFC_PAUSE_A :: _0 => false , TFC_PAUSE_A :: _1 => true } } } # [ doc = "Reader of field `TFC_PAUSE`" ] pub type TFC_PAUSE_R = crate :: R < bool , TFC_PAUSE_A > ; impl TFC_PAUSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TFC_PAUSE_A { match self . bits { false => TFC_PAUSE_A :: _0 , true => TFC_PAUSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TFC_PAUSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TFC_PAUSE_A :: _1 } } # [ doc = "Write proxy for field `TFC_PAUSE`" ] pub struct TFC_PAUSE_W < 'a > { w : & 'a mut W , } impl < 'a > TFC_PAUSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFC_PAUSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No PAUSE frame transmitted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TFC_PAUSE_A :: _0 ) } # [ doc = "The MAC stops transmission of data frames after the current transmission is complete." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TFC_PAUSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `RFC_PAUSE`" ] pub type RFC_PAUSE_R = crate :: R < bool , bool > ; # [ doc = "Source MAC Address Select On Transmit\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDSEL_A { # [ doc = "0: Node MAC address programmed on PADDR1/2 registers." ] _000 } impl From < ADDSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : ADDSEL_A ) -> Self { match variant { ADDSEL_A :: _000 => 0 } } } # [ doc = "Reader of field `ADDSEL`" ] pub type ADDSEL_R = crate :: R < u8 , ADDSEL_A > ; impl ADDSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ADDSEL_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ADDSEL_A :: _000 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == ADDSEL_A :: _000 } } # [ doc = "Write proxy for field `ADDSEL`" ] pub struct ADDSEL_W < 'a > { w : & 'a mut W , } impl < 'a > ADDSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADDSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Node MAC address programmed on PADDR1/2 registers." ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( ADDSEL_A :: _000 ) } # [ 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 << 5 ) ) | ( ( ( value as u32 ) & 0x07 ) << 5 ) ; self . w } } # [ doc = "Set MAC Address On Transmit\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDINS_A { # [ doc = "0: The source MAC address is not modified by the MAC." ] _0 , # [ doc = "1: The MAC overwrites the source MAC address with the programmed MAC address according to ADDSEL." ] _1 } impl From < ADDINS_A > for bool { # [ inline ( always ) ] fn from ( variant : ADDINS_A ) -> Self { match variant { ADDINS_A :: _0 => false , ADDINS_A :: _1 => true } } } # [ doc = "Reader of field `ADDINS`" ] pub type ADDINS_R = crate :: R < bool , ADDINS_A > ; impl ADDINS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ADDINS_A { match self . bits { false => ADDINS_A :: _0 , true => ADDINS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ADDINS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ADDINS_A :: _1 } } # [ doc = "Write proxy for field `ADDINS`" ] pub struct ADDINS_W < 'a > { w : & 'a mut W , } impl < 'a > ADDINS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ADDINS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The source MAC address is not modified by the MAC." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ADDINS_A :: _0 ) } # [ doc = "The MAC overwrites the source MAC address with the programmed MAC address according to ADDSEL." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ADDINS_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Forward Frame From Application With CRC\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCFWD_A { # [ doc = "0: TxBD\\[TC\\] controls whether the frame has a CRC from the application." ] _0 , # [ doc = "1: The transmitter does not append any CRC to transmitted frames, as it is expecting a frame with CRC from the application." ] _1 } impl From < CRCFWD_A > for bool { # [ inline ( always ) ] fn from ( variant : CRCFWD_A ) -> Self { match variant { CRCFWD_A :: _0 => false , CRCFWD_A :: _1 => true } } } # [ doc = "Reader of field `CRCFWD`" ] pub type CRCFWD_R = crate :: R < bool , CRCFWD_A > ; impl CRCFWD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CRCFWD_A { match self . bits { false => CRCFWD_A :: _0 , true => CRCFWD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CRCFWD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CRCFWD_A :: _1 } } # [ doc = "Write proxy for field `CRCFWD`" ] pub struct CRCFWD_W < 'a > { w : & 'a mut W , } impl < 'a > CRCFWD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CRCFWD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TxBD\\[TC\\] controls whether the frame has a CRC from the application." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CRCFWD_A :: _0 ) } # [ doc = "The transmitter does not append any CRC to transmitted frames, as it is expecting a frame with CRC from the application." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CRCFWD_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } impl R { # [ doc = "Bit 0 - Graceful Transmit Stop" ] # [ inline ( always ) ] pub fn gts ( & self ) -> GTS_R { GTS_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Full-Duplex Enable" ] # [ inline ( always ) ] pub fn fden ( & self ) -> FDEN_R { FDEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Transmit Frame Control Pause" ] # [ inline ( always ) ] pub fn tfc_pause ( & self ) -> TFC_PAUSE_R { TFC_PAUSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Receive Frame Control Pause" ] # [ inline ( always ) ] pub fn rfc_pause ( & self ) -> RFC_PAUSE_R { RFC_PAUSE_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bits 5:7 - Source MAC Address Select On Transmit" ] # [ inline ( always ) ] pub fn addsel ( & self ) -> ADDSEL_R { ADDSEL_R :: new ( ( ( self . bits >> 5 ) & 0x07 ) as u8 ) } # [ doc = "Bit 8 - Set MAC Address On Transmit" ] # [ inline ( always ) ] pub fn addins ( & self ) -> ADDINS_R { ADDINS_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Forward Frame From Application With CRC" ] # [ inline ( always ) ] pub fn crcfwd ( & self ) -> CRCFWD_R { CRCFWD_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Graceful Transmit Stop" ] # [ inline ( always ) ] pub fn gts ( & mut self ) -> GTS_W { GTS_W { w : self } } # [ doc = "Bit 2 - Full-Duplex Enable" ] # [ inline ( always ) ] pub fn fden ( & mut self ) -> FDEN_W { FDEN_W { w : self } } # [ doc = "Bit 3 - Transmit Frame Control Pause" ] # [ inline ( always ) ] pub fn tfc_pause ( & mut self ) -> TFC_PAUSE_W { TFC_PAUSE_W { w : self } } # [ doc = "Bits 5:7 - Source MAC Address Select On Transmit" ] # [ inline ( always ) ] pub fn addsel ( & mut self ) -> ADDSEL_W { ADDSEL_W { w : self } } # [ doc = "Bit 8 - Set MAC Address On Transmit" ] # [ inline ( always ) ] pub fn addins ( & mut self ) -> ADDINS_W { ADDINS_W { w : self } } # [ doc = "Bit 9 - Forward Frame From Application With CRC" ] # [ inline ( always ) ] pub fn crcfwd ( & mut self ) -> CRCFWD_W { CRCFWD_W { w : self } } } } # [ doc = "Physical Address Lower Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [palr](palr) module" ] pub type PALR = crate :: Reg < u32 , _PALR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PALR ; # [ doc = "`read()` method returns [palr::R](palr::R) reader structure" ] impl crate :: Readable for PALR { } # [ doc = "`write(|w| ..)` method takes [palr::W](palr::W) writer structure" ] impl crate :: Writable for PALR { } # [ doc = "Physical Address Lower Register" ] pub mod palr { # [ doc = "Reader of register PALR" ] pub type R = crate :: R < u32 , super :: PALR > ; # [ doc = "Writer for register PALR" ] pub type W = crate :: W < u32 , super :: PALR > ; # [ doc = "Register PALR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PALR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PADDR1`" ] pub type PADDR1_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `PADDR1`" ] pub struct PADDR1_W < 'a > { w : & 'a mut W , } impl < 'a > PADDR1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Pause Address" ] # [ inline ( always ) ] pub fn paddr1 ( & self ) -> PADDR1_R { PADDR1_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Pause Address" ] # [ inline ( always ) ] pub fn paddr1 ( & mut self ) -> PADDR1_W { PADDR1_W { w : self } } } } # [ doc = "Physical Address Upper Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [paur](paur) module" ] pub type PAUR = crate :: Reg < u32 , _PAUR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PAUR ; # [ doc = "`read()` method returns [paur::R](paur::R) reader structure" ] impl crate :: Readable for PAUR { } # [ doc = "`write(|w| ..)` method takes [paur::W](paur::W) writer structure" ] impl crate :: Writable for PAUR { } # [ doc = "Physical Address Upper Register" ] pub mod paur { # [ doc = "Reader of register PAUR" ] pub type R = crate :: R < u32 , super :: PAUR > ; # [ doc = "Writer for register PAUR" ] pub type W = crate :: W < u32 , super :: PAUR > ; # [ doc = "Register PAUR `reset()`'s with value 0x8808" ] impl crate :: ResetValue for super :: PAUR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x8808 } } # [ doc = "Reader of field `TYPE`" ] pub type TYPE_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `PADDR2`" ] pub type PADDR2_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `PADDR2`" ] pub struct PADDR2_W < 'a > { w : & 'a mut W , } impl < 'a > PADDR2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Type Field In PAUSE Frames" ] # [ inline ( always ) ] pub fn type_ ( & self ) -> TYPE_R { TYPE_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Bytes 4 (bits 31:24) and 5 (bits 23:16) of the 6-byte individual address used for exact match, and the source address field in PAUSE frames" ] # [ inline ( always ) ] pub fn paddr2 ( & self ) -> PADDR2_R { PADDR2_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 16:31 - Bytes 4 (bits 31:24) and 5 (bits 23:16) of the 6-byte individual address used for exact match, and the source address field in PAUSE frames" ] # [ inline ( always ) ] pub fn paddr2 ( & mut self ) -> PADDR2_W { PADDR2_W { w : self } } } } # [ doc = "Opcode/Pause Duration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [opd](opd) module" ] pub type OPD = crate :: Reg < u32 , _OPD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _OPD ; # [ doc = "`read()` method returns [opd::R](opd::R) reader structure" ] impl crate :: Readable for OPD { } # [ doc = "`write(|w| ..)` method takes [opd::W](opd::W) writer structure" ] impl crate :: Writable for OPD { } # [ doc = "Opcode/Pause Duration Register" ] pub mod opd { # [ doc = "Reader of register OPD" ] pub type R = crate :: R < u32 , super :: OPD > ; # [ doc = "Writer for register OPD" ] pub type W = crate :: W < u32 , super :: OPD > ; # [ doc = "Register OPD `reset()`'s with value 0x0001_0000" ] impl crate :: ResetValue for super :: OPD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0001_0000 } } # [ doc = "Reader of field `PAUSE_DUR`" ] pub type PAUSE_DUR_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `PAUSE_DUR`" ] pub struct PAUSE_DUR_W < 'a > { w : & 'a mut W , } impl < 'a > PAUSE_DUR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } # [ doc = "Reader of field `OPCODE`" ] pub type OPCODE_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Pause Duration" ] # [ inline ( always ) ] pub fn pause_dur ( & self ) -> PAUSE_DUR_R { PAUSE_DUR_R :: new ( ( self . bits & 0xffff ) as u16 ) } # [ doc = "Bits 16:31 - Opcode Field In PAUSE Frames" ] # [ inline ( always ) ] pub fn opcode ( & self ) -> OPCODE_R { OPCODE_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Pause Duration" ] # [ inline ( always ) ] pub fn pause_dur ( & mut self ) -> PAUSE_DUR_W { PAUSE_DUR_W { w : self } } } } # [ doc = "Descriptor Individual Upper Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [iaur](iaur) module" ] pub type IAUR = crate :: Reg < u32 , _IAUR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IAUR ; # [ doc = "`read()` method returns [iaur::R](iaur::R) reader structure" ] impl crate :: Readable for IAUR { } # [ doc = "`write(|w| ..)` method takes [iaur::W](iaur::W) writer structure" ] impl crate :: Writable for IAUR { } # [ doc = "Descriptor Individual Upper Address Register" ] pub mod iaur { # [ doc = "Reader of register IAUR" ] pub type R = crate :: R < u32 , super :: IAUR > ; # [ doc = "Writer for register IAUR" ] pub type W = crate :: W < u32 , super :: IAUR > ; # [ doc = "Register IAUR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IAUR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `IADDR1`" ] pub type IADDR1_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `IADDR1`" ] pub struct IADDR1_W < 'a > { w : & 'a mut W , } impl < 'a > IADDR1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Contains the upper 32 bits of the 64-bit hash table used in the address recognition process for receive frames with a unicast address" ] # [ inline ( always ) ] pub fn iaddr1 ( & self ) -> IADDR1_R { IADDR1_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Contains the upper 32 bits of the 64-bit hash table used in the address recognition process for receive frames with a unicast address" ] # [ inline ( always ) ] pub fn iaddr1 ( & mut self ) -> IADDR1_W { IADDR1_W { w : self } } } } # [ doc = "Descriptor Individual Lower Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ialr](ialr) module" ] pub type IALR = crate :: Reg < u32 , _IALR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IALR ; # [ doc = "`read()` method returns [ialr::R](ialr::R) reader structure" ] impl crate :: Readable for IALR { } # [ doc = "`write(|w| ..)` method takes [ialr::W](ialr::W) writer structure" ] impl crate :: Writable for IALR { } # [ doc = "Descriptor Individual Lower Address Register" ] pub mod ialr { # [ doc = "Reader of register IALR" ] pub type R = crate :: R < u32 , super :: IALR > ; # [ doc = "Writer for register IALR" ] pub type W = crate :: W < u32 , super :: IALR > ; # [ doc = "Register IALR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: IALR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `IADDR2`" ] pub type IADDR2_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `IADDR2`" ] pub struct IADDR2_W < 'a > { w : & 'a mut W , } impl < 'a > IADDR2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Contains the lower 32 bits of the 64-bit hash table used in the address recognition process for receive frames with a unicast address" ] # [ inline ( always ) ] pub fn iaddr2 ( & self ) -> IADDR2_R { IADDR2_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Contains the lower 32 bits of the 64-bit hash table used in the address recognition process for receive frames with a unicast address" ] # [ inline ( always ) ] pub fn iaddr2 ( & mut self ) -> IADDR2_W { IADDR2_W { w : self } } } } # [ doc = "Descriptor Group Upper Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gaur](gaur) module" ] pub type GAUR = crate :: Reg < u32 , _GAUR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GAUR ; # [ doc = "`read()` method returns [gaur::R](gaur::R) reader structure" ] impl crate :: Readable for GAUR { } # [ doc = "`write(|w| ..)` method takes [gaur::W](gaur::W) writer structure" ] impl crate :: Writable for GAUR { } # [ doc = "Descriptor Group Upper Address Register" ] pub mod gaur { # [ doc = "Reader of register GAUR" ] pub type R = crate :: R < u32 , super :: GAUR > ; # [ doc = "Writer for register GAUR" ] pub type W = crate :: W < u32 , super :: GAUR > ; # [ doc = "Register GAUR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GAUR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `GADDR1`" ] pub type GADDR1_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `GADDR1`" ] pub struct GADDR1_W < 'a > { w : & 'a mut W , } impl < 'a > GADDR1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Contains the upper 32 bits of the 64-bit hash table used in the address recognition process for receive frames with a multicast address" ] # [ inline ( always ) ] pub fn gaddr1 ( & self ) -> GADDR1_R { GADDR1_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Contains the upper 32 bits of the 64-bit hash table used in the address recognition process for receive frames with a multicast address" ] # [ inline ( always ) ] pub fn gaddr1 ( & mut self ) -> GADDR1_W { GADDR1_W { w : self } } } } # [ doc = "Descriptor Group Lower Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [galr](galr) module" ] pub type GALR = crate :: Reg < u32 , _GALR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _GALR ; # [ doc = "`read()` method returns [galr::R](galr::R) reader structure" ] impl crate :: Readable for GALR { } # [ doc = "`write(|w| ..)` method takes [galr::W](galr::W) writer structure" ] impl crate :: Writable for GALR { } # [ doc = "Descriptor Group Lower Address Register" ] pub mod galr { # [ doc = "Reader of register GALR" ] pub type R = crate :: R < u32 , super :: GALR > ; # [ doc = "Writer for register GALR" ] pub type W = crate :: W < u32 , super :: GALR > ; # [ doc = "Register GALR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: GALR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `GADDR2`" ] pub type GADDR2_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `GADDR2`" ] pub struct GADDR2_W < 'a > { w : & 'a mut W , } impl < 'a > GADDR2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Contains the lower 32 bits of the 64-bit hash table used in the address recognition process for receive frames with a multicast address" ] # [ inline ( always ) ] pub fn gaddr2 ( & self ) -> GADDR2_R { GADDR2_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Contains the lower 32 bits of the 64-bit hash table used in the address recognition process for receive frames with a multicast address" ] # [ inline ( always ) ] pub fn gaddr2 ( & mut self ) -> GADDR2_W { GADDR2_W { w : self } } } } # [ doc = "Transmit FIFO Watermark Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tfwr](tfwr) module" ] pub type TFWR = crate :: Reg < u32 , _TFWR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TFWR ; # [ doc = "`read()` method returns [tfwr::R](tfwr::R) reader structure" ] impl crate :: Readable for TFWR { } # [ doc = "`write(|w| ..)` method takes [tfwr::W](tfwr::W) writer structure" ] impl crate :: Writable for TFWR { } # [ doc = "Transmit FIFO Watermark Register" ] pub mod tfwr { # [ doc = "Reader of register TFWR" ] pub type R = crate :: R < u32 , super :: TFWR > ; # [ doc = "Writer for register TFWR" ] pub type W = crate :: W < u32 , super :: TFWR > ; # [ doc = "Register TFWR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TFWR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmit FIFO Write\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TFWR_A { # [ doc = "0: 64 bytes written." ] _000000 , # [ doc = "1: 64 bytes written." ] _000001 , # [ doc = "2: 128 bytes written." ] _000010 , # [ doc = "3: 192 bytes written." ] _000011 , # [ doc = "31: 1984 bytes written." ] _011111 } impl From < TFWR_A > for u8 { # [ inline ( always ) ] fn from ( variant : TFWR_A ) -> Self { match variant { TFWR_A :: _000000 => 0 , TFWR_A :: _000001 => 1 , TFWR_A :: _000010 => 2 , TFWR_A :: _000011 => 3 , TFWR_A :: _011111 => 31 } } } # [ doc = "Reader of field `TFWR`" ] pub type TFWR_R = crate :: R < u8 , TFWR_A > ; impl TFWR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TFWR_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TFWR_A :: _000000 ) , 1 => Val ( TFWR_A :: _000001 ) , 2 => Val ( TFWR_A :: _000010 ) , 3 => Val ( TFWR_A :: _000011 ) , 31 => Val ( TFWR_A :: _011111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_000000`" ] # [ inline ( always ) ] pub fn is_000000 ( & self ) -> bool { * self == TFWR_A :: _000000 } # [ doc = "Checks if the value of the field is `_000001`" ] # [ inline ( always ) ] pub fn is_000001 ( & self ) -> bool { * self == TFWR_A :: _000001 } # [ doc = "Checks if the value of the field is `_000010`" ] # [ inline ( always ) ] pub fn is_000010 ( & self ) -> bool { * self == TFWR_A :: _000010 } # [ doc = "Checks if the value of the field is `_000011`" ] # [ inline ( always ) ] pub fn is_000011 ( & self ) -> bool { * self == TFWR_A :: _000011 } # [ doc = "Checks if the value of the field is `_011111`" ] # [ inline ( always ) ] pub fn is_011111 ( & self ) -> bool { * self == TFWR_A :: _011111 } } # [ doc = "Write proxy for field `TFWR`" ] pub struct TFWR_W < 'a > { w : & 'a mut W , } impl < 'a > TFWR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TFWR_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "64 bytes written." ] # [ inline ( always ) ] pub fn _000000 ( self ) -> & 'a mut W { self . variant ( TFWR_A :: _000000 ) } # [ doc = "64 bytes written." ] # [ inline ( always ) ] pub fn _000001 ( self ) -> & 'a mut W { self . variant ( TFWR_A :: _000001 ) } # [ doc = "128 bytes written." ] # [ inline ( always ) ] pub fn _000010 ( self ) -> & 'a mut W { self . variant ( TFWR_A :: _000010 ) } # [ doc = "192 bytes written." ] # [ inline ( always ) ] pub fn _000011 ( self ) -> & 'a mut W { self . variant ( TFWR_A :: _000011 ) } # [ doc = "1984 bytes written." ] # [ inline ( always ) ] pub fn _011111 ( self ) -> & 'a mut W { self . variant ( TFWR_A :: _011111 ) } # [ 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 & ! 0x3f ) | ( ( value as u32 ) & 0x3f ) ; self . w } } # [ doc = "Store And Forward Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STRFWD_A { # [ doc = "0: Reset. The transmission start threshold is programmed in TFWR\\[TFWR\\]." ] _0 , # [ doc = "1: Enabled." ] _1 } impl From < STRFWD_A > for bool { # [ inline ( always ) ] fn from ( variant : STRFWD_A ) -> Self { match variant { STRFWD_A :: _0 => false , STRFWD_A :: _1 => true } } } # [ doc = "Reader of field `STRFWD`" ] pub type STRFWD_R = crate :: R < bool , STRFWD_A > ; impl STRFWD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STRFWD_A { match self . bits { false => STRFWD_A :: _0 , true => STRFWD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STRFWD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STRFWD_A :: _1 } } # [ doc = "Write proxy for field `STRFWD`" ] pub struct STRFWD_W < 'a > { w : & 'a mut W , } impl < 'a > STRFWD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STRFWD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Reset. The transmission start threshold is programmed in TFWR\\[TFWR\\]." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STRFWD_A :: _0 ) } # [ doc = "Enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STRFWD_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 0:5 - Transmit FIFO Write" ] # [ inline ( always ) ] pub fn tfwr ( & self ) -> TFWR_R { TFWR_R :: new ( ( self . bits & 0x3f ) as u8 ) } # [ doc = "Bit 8 - Store And Forward Enable" ] # [ inline ( always ) ] pub fn strfwd ( & self ) -> STRFWD_R { STRFWD_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:5 - Transmit FIFO Write" ] # [ inline ( always ) ] pub fn tfwr ( & mut self ) -> TFWR_W { TFWR_W { w : self } } # [ doc = "Bit 8 - Store And Forward Enable" ] # [ inline ( always ) ] pub fn strfwd ( & mut self ) -> STRFWD_W { STRFWD_W { w : self } } } } # [ doc = "Receive Descriptor Ring Start Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rdsr](rdsr) module" ] pub type RDSR = crate :: Reg < u32 , _RDSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RDSR ; # [ doc = "`read()` method returns [rdsr::R](rdsr::R) reader structure" ] impl crate :: Readable for RDSR { } # [ doc = "`write(|w| ..)` method takes [rdsr::W](rdsr::W) writer structure" ] impl crate :: Writable for RDSR { } # [ doc = "Receive Descriptor Ring Start Register" ] pub mod rdsr { # [ doc = "Reader of register RDSR" ] pub type R = crate :: R < u32 , super :: RDSR > ; # [ doc = "Writer for register RDSR" ] pub type W = crate :: W < u32 , super :: RDSR > ; # [ doc = "Register RDSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RDSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `R_DES_START`" ] pub type R_DES_START_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `R_DES_START`" ] pub struct R_DES_START_W < 'a > { w : & 'a mut W , } impl < 'a > R_DES_START_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x1fff_ffff << 3 ) ) | ( ( ( value as u32 ) & 0x1fff_ffff ) << 3 ) ; self . w } } impl R { # [ doc = "Bits 3:31 - Pointer to the beginning of the receive buffer descriptor queue." ] # [ inline ( always ) ] pub fn r_des_start ( & self ) -> R_DES_START_R { R_DES_START_R :: new ( ( ( self . bits >> 3 ) & 0x1fff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 3:31 - Pointer to the beginning of the receive buffer descriptor queue." ] # [ inline ( always ) ] pub fn r_des_start ( & mut self ) -> R_DES_START_W { R_DES_START_W { w : self } } } } # [ doc = "Transmit Buffer Descriptor Ring Start Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tdsr](tdsr) module" ] pub type TDSR = crate :: Reg < u32 , _TDSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TDSR ; # [ doc = "`read()` method returns [tdsr::R](tdsr::R) reader structure" ] impl crate :: Readable for TDSR { } # [ doc = "`write(|w| ..)` method takes [tdsr::W](tdsr::W) writer structure" ] impl crate :: Writable for TDSR { } # [ doc = "Transmit Buffer Descriptor Ring Start Register" ] pub mod tdsr { # [ doc = "Reader of register TDSR" ] pub type R = crate :: R < u32 , super :: TDSR > ; # [ doc = "Writer for register TDSR" ] pub type W = crate :: W < u32 , super :: TDSR > ; # [ doc = "Register TDSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TDSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `X_DES_START`" ] pub type X_DES_START_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `X_DES_START`" ] pub struct X_DES_START_W < 'a > { w : & 'a mut W , } impl < 'a > X_DES_START_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x1fff_ffff << 3 ) ) | ( ( ( value as u32 ) & 0x1fff_ffff ) << 3 ) ; self . w } } impl R { # [ doc = "Bits 3:31 - Pointer to the beginning of the transmit buffer descriptor queue." ] # [ inline ( always ) ] pub fn x_des_start ( & self ) -> X_DES_START_R { X_DES_START_R :: new ( ( ( self . bits >> 3 ) & 0x1fff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 3:31 - Pointer to the beginning of the transmit buffer descriptor queue." ] # [ inline ( always ) ] pub fn x_des_start ( & mut self ) -> X_DES_START_W { X_DES_START_W { w : self } } } } # [ doc = "Maximum Receive Buffer Size Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mrbr](mrbr) module" ] pub type MRBR = crate :: Reg < u32 , _MRBR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MRBR ; # [ doc = "`read()` method returns [mrbr::R](mrbr::R) reader structure" ] impl crate :: Readable for MRBR { } # [ doc = "`write(|w| ..)` method takes [mrbr::W](mrbr::W) writer structure" ] impl crate :: Writable for MRBR { } # [ doc = "Maximum Receive Buffer Size Register" ] pub mod mrbr { # [ doc = "Reader of register MRBR" ] pub type R = crate :: R < u32 , super :: MRBR > ; # [ doc = "Writer for register MRBR" ] pub type W = crate :: W < u32 , super :: MRBR > ; # [ doc = "Register MRBR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MRBR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `R_BUF_SIZE`" ] pub type R_BUF_SIZE_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `R_BUF_SIZE`" ] pub struct R_BUF_SIZE_W < 'a > { w : & 'a mut W , } impl < 'a > R_BUF_SIZE_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 & ! ( 0x7f << 4 ) ) | ( ( ( value as u32 ) & 0x7f ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 4:10 - Receive buffer size in bytes" ] # [ inline ( always ) ] pub fn r_buf_size ( & self ) -> R_BUF_SIZE_R { R_BUF_SIZE_R :: new ( ( ( self . bits >> 4 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 4:10 - Receive buffer size in bytes" ] # [ inline ( always ) ] pub fn r_buf_size ( & mut self ) -> R_BUF_SIZE_W { R_BUF_SIZE_W { w : self } } } } # [ doc = "Receive FIFO Section Full Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rsfl](rsfl) module" ] pub type RSFL = crate :: Reg < u32 , _RSFL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RSFL ; # [ doc = "`read()` method returns [rsfl::R](rsfl::R) reader structure" ] impl crate :: Readable for RSFL { } # [ doc = "`write(|w| ..)` method takes [rsfl::W](rsfl::W) writer structure" ] impl crate :: Writable for RSFL { } # [ doc = "Receive FIFO Section Full Threshold" ] pub mod rsfl { # [ doc = "Reader of register RSFL" ] pub type R = crate :: R < u32 , super :: RSFL > ; # [ doc = "Writer for register RSFL" ] pub type W = crate :: W < u32 , super :: RSFL > ; # [ doc = "Register RSFL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RSFL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RX_SECTION_FULL`" ] pub type RX_SECTION_FULL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RX_SECTION_FULL`" ] pub struct RX_SECTION_FULL_W < 'a > { w : & 'a mut W , } impl < 'a > RX_SECTION_FULL_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Value Of Receive FIFO Section Full Threshold" ] # [ inline ( always ) ] pub fn rx_section_full ( & self ) -> RX_SECTION_FULL_R { RX_SECTION_FULL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Value Of Receive FIFO Section Full Threshold" ] # [ inline ( always ) ] pub fn rx_section_full ( & mut self ) -> RX_SECTION_FULL_W { RX_SECTION_FULL_W { w : self } } } } # [ doc = "Receive FIFO Section Empty Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rsem](rsem) module" ] pub type RSEM = crate :: Reg < u32 , _RSEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RSEM ; # [ doc = "`read()` method returns [rsem::R](rsem::R) reader structure" ] impl crate :: Readable for RSEM { } # [ doc = "`write(|w| ..)` method takes [rsem::W](rsem::W) writer structure" ] impl crate :: Writable for RSEM { } # [ doc = "Receive FIFO Section Empty Threshold" ] pub mod rsem { # [ doc = "Reader of register RSEM" ] pub type R = crate :: R < u32 , super :: RSEM > ; # [ doc = "Writer for register RSEM" ] pub type W = crate :: W < u32 , super :: RSEM > ; # [ doc = "Register RSEM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RSEM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RX_SECTION_EMPTY`" ] pub type RX_SECTION_EMPTY_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RX_SECTION_EMPTY`" ] pub struct RX_SECTION_EMPTY_W < 'a > { w : & 'a mut W , } impl < 'a > RX_SECTION_EMPTY_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `STAT_SECTION_EMPTY`" ] pub type STAT_SECTION_EMPTY_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `STAT_SECTION_EMPTY`" ] pub struct STAT_SECTION_EMPTY_W < 'a > { w : & 'a mut W , } impl < 'a > STAT_SECTION_EMPTY_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 & ! ( 0x1f << 16 ) ) | ( ( ( value as u32 ) & 0x1f ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Value Of The Receive FIFO Section Empty Threshold" ] # [ inline ( always ) ] pub fn rx_section_empty ( & self ) -> RX_SECTION_EMPTY_R { RX_SECTION_EMPTY_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 16:20 - RX Status FIFO Section Empty Threshold" ] # [ inline ( always ) ] pub fn stat_section_empty ( & self ) -> STAT_SECTION_EMPTY_R { STAT_SECTION_EMPTY_R :: new ( ( ( self . bits >> 16 ) & 0x1f ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Value Of The Receive FIFO Section Empty Threshold" ] # [ inline ( always ) ] pub fn rx_section_empty ( & mut self ) -> RX_SECTION_EMPTY_W { RX_SECTION_EMPTY_W { w : self } } # [ doc = "Bits 16:20 - RX Status FIFO Section Empty Threshold" ] # [ inline ( always ) ] pub fn stat_section_empty ( & mut self ) -> STAT_SECTION_EMPTY_W { STAT_SECTION_EMPTY_W { w : self } } } } # [ doc = "Receive FIFO Almost Empty Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [raem](raem) module" ] pub type RAEM = crate :: Reg < u32 , _RAEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RAEM ; # [ doc = "`read()` method returns [raem::R](raem::R) reader structure" ] impl crate :: Readable for RAEM { } # [ doc = "`write(|w| ..)` method takes [raem::W](raem::W) writer structure" ] impl crate :: Writable for RAEM { } # [ doc = "Receive FIFO Almost Empty Threshold" ] pub mod raem { # [ doc = "Reader of register RAEM" ] pub type R = crate :: R < u32 , super :: RAEM > ; # [ doc = "Writer for register RAEM" ] pub type W = crate :: W < u32 , super :: RAEM > ; # [ doc = "Register RAEM `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: RAEM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `RX_ALMOST_EMPTY`" ] pub type RX_ALMOST_EMPTY_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RX_ALMOST_EMPTY`" ] pub struct RX_ALMOST_EMPTY_W < 'a > { w : & 'a mut W , } impl < 'a > RX_ALMOST_EMPTY_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Value Of The Receive FIFO Almost Empty Threshold" ] # [ inline ( always ) ] pub fn rx_almost_empty ( & self ) -> RX_ALMOST_EMPTY_R { RX_ALMOST_EMPTY_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Value Of The Receive FIFO Almost Empty Threshold" ] # [ inline ( always ) ] pub fn rx_almost_empty ( & mut self ) -> RX_ALMOST_EMPTY_W { RX_ALMOST_EMPTY_W { w : self } } } } # [ doc = "Receive FIFO Almost Full Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rafl](rafl) module" ] pub type RAFL = crate :: Reg < u32 , _RAFL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RAFL ; # [ doc = "`read()` method returns [rafl::R](rafl::R) reader structure" ] impl crate :: Readable for RAFL { } # [ doc = "`write(|w| ..)` method takes [rafl::W](rafl::W) writer structure" ] impl crate :: Writable for RAFL { } # [ doc = "Receive FIFO Almost Full Threshold" ] pub mod rafl { # [ doc = "Reader of register RAFL" ] pub type R = crate :: R < u32 , super :: RAFL > ; # [ doc = "Writer for register RAFL" ] pub type W = crate :: W < u32 , super :: RAFL > ; # [ doc = "Register RAFL `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: RAFL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `RX_ALMOST_FULL`" ] pub type RX_ALMOST_FULL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `RX_ALMOST_FULL`" ] pub struct RX_ALMOST_FULL_W < 'a > { w : & 'a mut W , } impl < 'a > RX_ALMOST_FULL_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Value Of The Receive FIFO Almost Full Threshold" ] # [ inline ( always ) ] pub fn rx_almost_full ( & self ) -> RX_ALMOST_FULL_R { RX_ALMOST_FULL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Value Of The Receive FIFO Almost Full Threshold" ] # [ inline ( always ) ] pub fn rx_almost_full ( & mut self ) -> RX_ALMOST_FULL_W { RX_ALMOST_FULL_W { w : self } } } } # [ doc = "Transmit FIFO Section Empty Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tsem](tsem) module" ] pub type TSEM = crate :: Reg < u32 , _TSEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TSEM ; # [ doc = "`read()` method returns [tsem::R](tsem::R) reader structure" ] impl crate :: Readable for TSEM { } # [ doc = "`write(|w| ..)` method takes [tsem::W](tsem::W) writer structure" ] impl crate :: Writable for TSEM { } # [ doc = "Transmit FIFO Section Empty Threshold" ] pub mod tsem { # [ doc = "Reader of register TSEM" ] pub type R = crate :: R < u32 , super :: TSEM > ; # [ doc = "Writer for register TSEM" ] pub type W = crate :: W < u32 , super :: TSEM > ; # [ doc = "Register TSEM `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TSEM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TX_SECTION_EMPTY`" ] pub type TX_SECTION_EMPTY_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TX_SECTION_EMPTY`" ] pub struct TX_SECTION_EMPTY_W < 'a > { w : & 'a mut W , } impl < 'a > TX_SECTION_EMPTY_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Value Of The Transmit FIFO Section Empty Threshold" ] # [ inline ( always ) ] pub fn tx_section_empty ( & self ) -> TX_SECTION_EMPTY_R { TX_SECTION_EMPTY_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Value Of The Transmit FIFO Section Empty Threshold" ] # [ inline ( always ) ] pub fn tx_section_empty ( & mut self ) -> TX_SECTION_EMPTY_W { TX_SECTION_EMPTY_W { w : self } } } } # [ doc = "Transmit FIFO Almost Empty Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [taem](taem) module" ] pub type TAEM = crate :: Reg < u32 , _TAEM > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TAEM ; # [ doc = "`read()` method returns [taem::R](taem::R) reader structure" ] impl crate :: Readable for TAEM { } # [ doc = "`write(|w| ..)` method takes [taem::W](taem::W) writer structure" ] impl crate :: Writable for TAEM { } # [ doc = "Transmit FIFO Almost Empty Threshold" ] pub mod taem { # [ doc = "Reader of register TAEM" ] pub type R = crate :: R < u32 , super :: TAEM > ; # [ doc = "Writer for register TAEM" ] pub type W = crate :: W < u32 , super :: TAEM > ; # [ doc = "Register TAEM `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: TAEM { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "Reader of field `TX_ALMOST_EMPTY`" ] pub type TX_ALMOST_EMPTY_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TX_ALMOST_EMPTY`" ] pub struct TX_ALMOST_EMPTY_W < 'a > { w : & 'a mut W , } impl < 'a > TX_ALMOST_EMPTY_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Value of Transmit FIFO Almost Empty Threshold" ] # [ inline ( always ) ] pub fn tx_almost_empty ( & self ) -> TX_ALMOST_EMPTY_R { TX_ALMOST_EMPTY_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Value of Transmit FIFO Almost Empty Threshold" ] # [ inline ( always ) ] pub fn tx_almost_empty ( & mut self ) -> TX_ALMOST_EMPTY_W { TX_ALMOST_EMPTY_W { w : self } } } } # [ doc = "Transmit FIFO Almost Full Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tafl](tafl) module" ] pub type TAFL = crate :: Reg < u32 , _TAFL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TAFL ; # [ doc = "`read()` method returns [tafl::R](tafl::R) reader structure" ] impl crate :: Readable for TAFL { } # [ doc = "`write(|w| ..)` method takes [tafl::W](tafl::W) writer structure" ] impl crate :: Writable for TAFL { } # [ doc = "Transmit FIFO Almost Full Threshold" ] pub mod tafl { # [ doc = "Reader of register TAFL" ] pub type R = crate :: R < u32 , super :: TAFL > ; # [ doc = "Writer for register TAFL" ] pub type W = crate :: W < u32 , super :: TAFL > ; # [ doc = "Register TAFL `reset()`'s with value 0x08" ] impl crate :: ResetValue for super :: TAFL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x08 } } # [ doc = "Reader of field `TX_ALMOST_FULL`" ] pub type TX_ALMOST_FULL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `TX_ALMOST_FULL`" ] pub struct TX_ALMOST_FULL_W < 'a > { w : & 'a mut W , } impl < 'a > TX_ALMOST_FULL_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Value Of The Transmit FIFO Almost Full Threshold" ] # [ inline ( always ) ] pub fn tx_almost_full ( & self ) -> TX_ALMOST_FULL_R { TX_ALMOST_FULL_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Value Of The Transmit FIFO Almost Full Threshold" ] # [ inline ( always ) ] pub fn tx_almost_full ( & mut self ) -> TX_ALMOST_FULL_W { TX_ALMOST_FULL_W { w : self } } } } # [ doc = "Transmit Inter-Packet Gap\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tipg](tipg) module" ] pub type TIPG = crate :: Reg < u32 , _TIPG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TIPG ; # [ doc = "`read()` method returns [tipg::R](tipg::R) reader structure" ] impl crate :: Readable for TIPG { } # [ doc = "`write(|w| ..)` method takes [tipg::W](tipg::W) writer structure" ] impl crate :: Writable for TIPG { } # [ doc = "Transmit Inter-Packet Gap" ] pub mod tipg { # [ doc = "Reader of register TIPG" ] pub type R = crate :: R < u32 , super :: TIPG > ; # [ doc = "Writer for register TIPG" ] pub type W = crate :: W < u32 , super :: TIPG > ; # [ doc = "Register TIPG `reset()`'s with value 0x0c" ] impl crate :: ResetValue for super :: TIPG { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0c } } # [ doc = "Reader of field `IPG`" ] pub type IPG_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `IPG`" ] pub struct IPG_W < 'a > { w : & 'a mut W , } impl < 'a > IPG_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 & ! 0x1f ) | ( ( value as u32 ) & 0x1f ) ; self . w } } impl R { # [ doc = "Bits 0:4 - Transmit Inter-Packet Gap" ] # [ inline ( always ) ] pub fn ipg ( & self ) -> IPG_R { IPG_R :: new ( ( self . bits & 0x1f ) as u8 ) } } impl W { # [ doc = "Bits 0:4 - Transmit Inter-Packet Gap" ] # [ inline ( always ) ] pub fn ipg ( & mut self ) -> IPG_W { IPG_W { w : self } } } } # [ doc = "Frame Truncation Length\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ftrl](ftrl) module" ] pub type FTRL = crate :: Reg < u32 , _FTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FTRL ; # [ doc = "`read()` method returns [ftrl::R](ftrl::R) reader structure" ] impl crate :: Readable for FTRL { } # [ doc = "`write(|w| ..)` method takes [ftrl::W](ftrl::W) writer structure" ] impl crate :: Writable for FTRL { } # [ doc = "Frame Truncation Length" ] pub mod ftrl { # [ doc = "Reader of register FTRL" ] pub type R = crate :: R < u32 , super :: FTRL > ; # [ doc = "Writer for register FTRL" ] pub type W = crate :: W < u32 , super :: FTRL > ; # [ doc = "Register FTRL `reset()`'s with value 0x07ff" ] impl crate :: ResetValue for super :: FTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x07ff } } # [ doc = "Reader of field `TRUNC_FL`" ] pub type TRUNC_FL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `TRUNC_FL`" ] pub struct TRUNC_FL_W < 'a > { w : & 'a mut W , } impl < 'a > TRUNC_FL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x3fff ) | ( ( value as u32 ) & 0x3fff ) ; self . w } } impl R { # [ doc = "Bits 0:13 - Frame Truncation Length" ] # [ inline ( always ) ] pub fn trunc_fl ( & self ) -> TRUNC_FL_R { TRUNC_FL_R :: new ( ( self . bits & 0x3fff ) as u16 ) } } impl W { # [ doc = "Bits 0:13 - Frame Truncation Length" ] # [ inline ( always ) ] pub fn trunc_fl ( & mut self ) -> TRUNC_FL_W { TRUNC_FL_W { w : self } } } } # [ doc = "Transmit Accelerator Function Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tacc](tacc) module" ] pub type TACC = crate :: Reg < u32 , _TACC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TACC ; # [ doc = "`read()` method returns [tacc::R](tacc::R) reader structure" ] impl crate :: Readable for TACC { } # [ doc = "`write(|w| ..)` method takes [tacc::W](tacc::W) writer structure" ] impl crate :: Writable for TACC { } # [ doc = "Transmit Accelerator Function Configuration" ] pub mod tacc { # [ doc = "Reader of register TACC" ] pub type R = crate :: R < u32 , super :: TACC > ; # [ doc = "Writer for register TACC" ] pub type W = crate :: W < u32 , super :: TACC > ; # [ doc = "Register TACC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TACC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "TX FIFO Shift-16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHIFT16_A { # [ doc = "0: Disabled." ] _0 , # [ doc = "1: Indicates to the transmit data FIFO that the written frames contain two additional octets before the frame data. This means the actual frame begins at bit 16 of the first word written into the FIFO. This function allows putting the frame payload on a 32-bit boundary in memory, as the 14-byte Ethernet header is extended to a 16-byte header." ] _1 } impl From < SHIFT16_A > for bool { # [ inline ( always ) ] fn from ( variant : SHIFT16_A ) -> Self { match variant { SHIFT16_A :: _0 => false , SHIFT16_A :: _1 => true } } } # [ doc = "Reader of field `SHIFT16`" ] pub type SHIFT16_R = crate :: R < bool , SHIFT16_A > ; impl SHIFT16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHIFT16_A { match self . bits { false => SHIFT16_A :: _0 , true => SHIFT16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHIFT16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHIFT16_A :: _1 } } # [ doc = "Write proxy for field `SHIFT16`" ] pub struct SHIFT16_W < 'a > { w : & 'a mut W , } impl < 'a > SHIFT16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHIFT16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHIFT16_A :: _0 ) } # [ doc = "Indicates to the transmit data FIFO that the written frames contain two additional octets before the frame data. This means the actual frame begins at bit 16 of the first word written into the FIFO. This function allows putting the frame payload on a 32-bit boundary in memory, as the 14-byte Ethernet header is extended to a 16-byte header." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHIFT16_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Enables insertion of IP header checksum.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IPCHK_A { # [ doc = "0: Checksum is not inserted." ] _0 , # [ doc = "1: If an IP frame is transmitted, the checksum is inserted automatically. The IP header checksum field must be cleared. If a non-IP frame is transmitted the frame is not modified." ] _1 } impl From < IPCHK_A > for bool { # [ inline ( always ) ] fn from ( variant : IPCHK_A ) -> Self { match variant { IPCHK_A :: _0 => false , IPCHK_A :: _1 => true } } } # [ doc = "Reader of field `IPCHK`" ] pub type IPCHK_R = crate :: R < bool , IPCHK_A > ; impl IPCHK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IPCHK_A { match self . bits { false => IPCHK_A :: _0 , true => IPCHK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IPCHK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IPCHK_A :: _1 } } # [ doc = "Write proxy for field `IPCHK`" ] pub struct IPCHK_W < 'a > { w : & 'a mut W , } impl < 'a > IPCHK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IPCHK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Checksum is not inserted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IPCHK_A :: _0 ) } # [ doc = "If an IP frame is transmitted, the checksum is inserted automatically. The IP header checksum field must be cleared. If a non-IP frame is transmitted the frame is not modified." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IPCHK_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enables insertion of protocol checksum.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PROCHK_A { # [ doc = "0: Checksum not inserted." ] _0 , # [ doc = "1: If an IP frame with a known protocol is transmitted, the checksum is inserted automatically into the frame. The checksum field must be cleared. The other frames are not modified." ] _1 } impl From < PROCHK_A > for bool { # [ inline ( always ) ] fn from ( variant : PROCHK_A ) -> Self { match variant { PROCHK_A :: _0 => false , PROCHK_A :: _1 => true } } } # [ doc = "Reader of field `PROCHK`" ] pub type PROCHK_R = crate :: R < bool , PROCHK_A > ; impl PROCHK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PROCHK_A { match self . bits { false => PROCHK_A :: _0 , true => PROCHK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PROCHK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PROCHK_A :: _1 } } # [ doc = "Write proxy for field `PROCHK`" ] pub struct PROCHK_W < 'a > { w : & 'a mut W , } impl < 'a > PROCHK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PROCHK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Checksum not inserted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PROCHK_A :: _0 ) } # [ doc = "If an IP frame with a known protocol is transmitted, the checksum is inserted automatically into the frame. The checksum field must be cleared. The other frames are not modified." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PROCHK_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 0 - TX FIFO Shift-16" ] # [ inline ( always ) ] pub fn shift16 ( & self ) -> SHIFT16_R { SHIFT16_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Enables insertion of IP header checksum." ] # [ inline ( always ) ] pub fn ipchk ( & self ) -> IPCHK_R { IPCHK_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enables insertion of protocol checksum." ] # [ inline ( always ) ] pub fn prochk ( & self ) -> PROCHK_R { PROCHK_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - TX FIFO Shift-16" ] # [ inline ( always ) ] pub fn shift16 ( & mut self ) -> SHIFT16_W { SHIFT16_W { w : self } } # [ doc = "Bit 3 - Enables insertion of IP header checksum." ] # [ inline ( always ) ] pub fn ipchk ( & mut self ) -> IPCHK_W { IPCHK_W { w : self } } # [ doc = "Bit 4 - Enables insertion of protocol checksum." ] # [ inline ( always ) ] pub fn prochk ( & mut self ) -> PROCHK_W { PROCHK_W { w : self } } } } # [ doc = "Receive Accelerator Function Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [racc](racc) module" ] pub type RACC = crate :: Reg < u32 , _RACC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RACC ; # [ doc = "`read()` method returns [racc::R](racc::R) reader structure" ] impl crate :: Readable for RACC { } # [ doc = "`write(|w| ..)` method takes [racc::W](racc::W) writer structure" ] impl crate :: Writable for RACC { } # [ doc = "Receive Accelerator Function Configuration" ] pub mod racc { # [ doc = "Reader of register RACC" ] pub type R = crate :: R < u32 , super :: RACC > ; # [ doc = "Writer for register RACC" ] pub type W = crate :: W < u32 , super :: RACC > ; # [ doc = "Register RACC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RACC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Enable Padding Removal For Short IP Frames\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PADREM_A { # [ doc = "0: Padding not removed." ] _0 , # [ doc = "1: Any bytes following the IP payload section of the frame are removed from the frame." ] _1 } impl From < PADREM_A > for bool { # [ inline ( always ) ] fn from ( variant : PADREM_A ) -> Self { match variant { PADREM_A :: _0 => false , PADREM_A :: _1 => true } } } # [ doc = "Reader of field `PADREM`" ] pub type PADREM_R = crate :: R < bool , PADREM_A > ; impl PADREM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PADREM_A { match self . bits { false => PADREM_A :: _0 , true => PADREM_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PADREM_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PADREM_A :: _1 } } # [ doc = "Write proxy for field `PADREM`" ] pub struct PADREM_W < 'a > { w : & 'a mut W , } impl < 'a > PADREM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PADREM_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Padding not removed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PADREM_A :: _0 ) } # [ doc = "Any bytes following the IP payload section of the frame are removed from the frame." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PADREM_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Enable Discard Of Frames With Wrong IPv4 Header Checksum\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IPDIS_A { # [ doc = "0: Frames with wrong IPv4 header checksum are not discarded." ] _0 , # [ doc = "1: If an IPv4 frame is received with a mismatching header checksum, the frame is discarded. IPv6 has no header checksum and is not affected by this setting. Discarding is only available when the RX FIFO operates in store and forward mode (RSFL cleared)." ] _1 } impl From < IPDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : IPDIS_A ) -> Self { match variant { IPDIS_A :: _0 => false , IPDIS_A :: _1 => true } } } # [ doc = "Reader of field `IPDIS`" ] pub type IPDIS_R = crate :: R < bool , IPDIS_A > ; impl IPDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IPDIS_A { match self . bits { false => IPDIS_A :: _0 , true => IPDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IPDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IPDIS_A :: _1 } } # [ doc = "Write proxy for field `IPDIS`" ] pub struct IPDIS_W < 'a > { w : & 'a mut W , } impl < 'a > IPDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IPDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frames with wrong IPv4 header checksum are not discarded." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IPDIS_A :: _0 ) } # [ doc = "If an IPv4 frame is received with a mismatching header checksum, the frame is discarded. IPv6 has no header checksum and is not affected by this setting. Discarding is only available when the RX FIFO operates in store and forward mode (RSFL cleared)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IPDIS_A :: _1 ) } # [ 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 } } # [ doc = "Enable Discard Of Frames With Wrong Protocol Checksum\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRODIS_A { # [ doc = "0: Frames with wrong checksum are not discarded." ] _0 , # [ doc = "1: If a TCP/IP, UDP/IP, or ICMP/IP frame is received that has a wrong TCP, UDP, or ICMP checksum, the frame is discarded. Discarding is only available when the RX FIFO operates in store and forward mode (RSFL cleared)." ] _1 } impl From < PRODIS_A > for bool { # [ inline ( always ) ] fn from ( variant : PRODIS_A ) -> Self { match variant { PRODIS_A :: _0 => false , PRODIS_A :: _1 => true } } } # [ doc = "Reader of field `PRODIS`" ] pub type PRODIS_R = crate :: R < bool , PRODIS_A > ; impl PRODIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PRODIS_A { match self . bits { false => PRODIS_A :: _0 , true => PRODIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PRODIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PRODIS_A :: _1 } } # [ doc = "Write proxy for field `PRODIS`" ] pub struct PRODIS_W < 'a > { w : & 'a mut W , } impl < 'a > PRODIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PRODIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frames with wrong checksum are not discarded." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PRODIS_A :: _0 ) } # [ doc = "If a TCP/IP, UDP/IP, or ICMP/IP frame is received that has a wrong TCP, UDP, or ICMP checksum, the frame is discarded. Discarding is only available when the RX FIFO operates in store and forward mode (RSFL cleared)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PRODIS_A :: _1 ) } # [ 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 = "Enable Discard Of Frames With MAC Layer Errors\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LINEDIS_A { # [ doc = "0: Frames with errors are not discarded." ] _0 , # [ doc = "1: Any frame received with a CRC, length, or PHY error is automatically discarded and not forwarded to the user application interface." ] _1 } impl From < LINEDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : LINEDIS_A ) -> Self { match variant { LINEDIS_A :: _0 => false , LINEDIS_A :: _1 => true } } } # [ doc = "Reader of field `LINEDIS`" ] pub type LINEDIS_R = crate :: R < bool , LINEDIS_A > ; impl LINEDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LINEDIS_A { match self . bits { false => LINEDIS_A :: _0 , true => LINEDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LINEDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LINEDIS_A :: _1 } } # [ doc = "Write proxy for field `LINEDIS`" ] pub struct LINEDIS_W < 'a > { w : & 'a mut W , } impl < 'a > LINEDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LINEDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Frames with errors are not discarded." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LINEDIS_A :: _0 ) } # [ doc = "Any frame received with a CRC, length, or PHY error is automatically discarded and not forwarded to the user application interface." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LINEDIS_A :: _1 ) } # [ 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 = "RX FIFO Shift-16\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SHIFT16_A { # [ doc = "0: Disabled." ] _0 , # [ doc = "1: Instructs the MAC to write two additional bytes in front of each frame received into the RX FIFO." ] _1 } impl From < SHIFT16_A > for bool { # [ inline ( always ) ] fn from ( variant : SHIFT16_A ) -> Self { match variant { SHIFT16_A :: _0 => false , SHIFT16_A :: _1 => true } } } # [ doc = "Reader of field `SHIFT16`" ] pub type SHIFT16_R = crate :: R < bool , SHIFT16_A > ; impl SHIFT16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SHIFT16_A { match self . bits { false => SHIFT16_A :: _0 , true => SHIFT16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SHIFT16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SHIFT16_A :: _1 } } # [ doc = "Write proxy for field `SHIFT16`" ] pub struct SHIFT16_W < 'a > { w : & 'a mut W , } impl < 'a > SHIFT16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SHIFT16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SHIFT16_A :: _0 ) } # [ doc = "Instructs the MAC to write two additional bytes in front of each frame received into the RX FIFO." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SHIFT16_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Enable Padding Removal For Short IP Frames" ] # [ inline ( always ) ] pub fn padrem ( & self ) -> PADREM_R { PADREM_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Enable Discard Of Frames With Wrong IPv4 Header Checksum" ] # [ inline ( always ) ] pub fn ipdis ( & self ) -> IPDIS_R { IPDIS_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Enable Discard Of Frames With Wrong Protocol Checksum" ] # [ inline ( always ) ] pub fn prodis ( & self ) -> PRODIS_R { PRODIS_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Enable Discard Of Frames With MAC Layer Errors" ] # [ inline ( always ) ] pub fn linedis ( & self ) -> LINEDIS_R { LINEDIS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - RX FIFO Shift-16" ] # [ inline ( always ) ] pub fn shift16 ( & self ) -> SHIFT16_R { SHIFT16_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Enable Padding Removal For Short IP Frames" ] # [ inline ( always ) ] pub fn padrem ( & mut self ) -> PADREM_W { PADREM_W { w : self } } # [ doc = "Bit 1 - Enable Discard Of Frames With Wrong IPv4 Header Checksum" ] # [ inline ( always ) ] pub fn ipdis ( & mut self ) -> IPDIS_W { IPDIS_W { w : self } } # [ doc = "Bit 2 - Enable Discard Of Frames With Wrong Protocol Checksum" ] # [ inline ( always ) ] pub fn prodis ( & mut self ) -> PRODIS_W { PRODIS_W { w : self } } # [ doc = "Bit 6 - Enable Discard Of Frames With MAC Layer Errors" ] # [ inline ( always ) ] pub fn linedis ( & mut self ) -> LINEDIS_W { LINEDIS_W { w : self } } # [ doc = "Bit 7 - RX FIFO Shift-16" ] # [ inline ( always ) ] pub fn shift16 ( & mut self ) -> SHIFT16_W { SHIFT16_W { w : self } } } } # [ doc = "Reserved Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_drop](rmon_t_drop) module" ] pub type RMON_T_DROP = crate :: Reg < u32 , _RMON_T_DROP > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_DROP ; # [ doc = "`read()` method returns [rmon_t_drop::R](rmon_t_drop::R) reader structure" ] impl crate :: Readable for RMON_T_DROP { } # [ doc = "Reserved Statistic Register" ] pub mod rmon_t_drop { # [ doc = "Reader of register RMON_T_DROP" ] pub type R = crate :: R < u32 , super :: RMON_T_DROP > ; impl R { } } # [ doc = "Tx Packet Count Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_packets](rmon_t_packets) module" ] pub type RMON_T_PACKETS = crate :: Reg < u32 , _RMON_T_PACKETS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_PACKETS ; # [ doc = "`read()` method returns [rmon_t_packets::R](rmon_t_packets::R) reader structure" ] impl crate :: Readable for RMON_T_PACKETS { } # [ doc = "Tx Packet Count Statistic Register" ] pub mod rmon_t_packets { # [ doc = "Reader of register RMON_T_PACKETS" ] pub type R = crate :: R < u32 , super :: RMON_T_PACKETS > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Packet count" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Broadcast Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_bc_pkt](rmon_t_bc_pkt) module" ] pub type RMON_T_BC_PKT = crate :: Reg < u32 , _RMON_T_BC_PKT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_BC_PKT ; # [ doc = "`read()` method returns [rmon_t_bc_pkt::R](rmon_t_bc_pkt::R) reader structure" ] impl crate :: Readable for RMON_T_BC_PKT { } # [ doc = "Tx Broadcast Packets Statistic Register" ] pub mod rmon_t_bc_pkt { # [ doc = "Reader of register RMON_T_BC_PKT" ] pub type R = crate :: R < u32 , super :: RMON_T_BC_PKT > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Broadcast packets" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Multicast Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_mc_pkt](rmon_t_mc_pkt) module" ] pub type RMON_T_MC_PKT = crate :: Reg < u32 , _RMON_T_MC_PKT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_MC_PKT ; # [ doc = "`read()` method returns [rmon_t_mc_pkt::R](rmon_t_mc_pkt::R) reader structure" ] impl crate :: Readable for RMON_T_MC_PKT { } # [ doc = "Tx Multicast Packets Statistic Register" ] pub mod rmon_t_mc_pkt { # [ doc = "Reader of register RMON_T_MC_PKT" ] pub type R = crate :: R < u32 , super :: RMON_T_MC_PKT > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Multicast packets" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Packets with CRC/Align Error Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_crc_align](rmon_t_crc_align) module" ] pub type RMON_T_CRC_ALIGN = crate :: Reg < u32 , _RMON_T_CRC_ALIGN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_CRC_ALIGN ; # [ doc = "`read()` method returns [rmon_t_crc_align::R](rmon_t_crc_align::R) reader structure" ] impl crate :: Readable for RMON_T_CRC_ALIGN { } # [ doc = "Tx Packets with CRC/Align Error Statistic Register" ] pub mod rmon_t_crc_align { # [ doc = "Reader of register RMON_T_CRC_ALIGN" ] pub type R = crate :: R < u32 , super :: RMON_T_CRC_ALIGN > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Packets with CRC/align error" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Packets Less Than Bytes and Good CRC Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_undersize](rmon_t_undersize) module" ] pub type RMON_T_UNDERSIZE = crate :: Reg < u32 , _RMON_T_UNDERSIZE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_UNDERSIZE ; # [ doc = "`read()` method returns [rmon_t_undersize::R](rmon_t_undersize::R) reader structure" ] impl crate :: Readable for RMON_T_UNDERSIZE { } # [ doc = "Tx Packets Less Than Bytes and Good CRC Statistic Register" ] pub mod rmon_t_undersize { # [ doc = "Reader of register RMON_T_UNDERSIZE" ] pub type R = crate :: R < u32 , super :: RMON_T_UNDERSIZE > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of transmit packets less than 64 bytes with good CRC" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Packets GT MAX_FL bytes and Good CRC Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_oversize](rmon_t_oversize) module" ] pub type RMON_T_OVERSIZE = crate :: Reg < u32 , _RMON_T_OVERSIZE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_OVERSIZE ; # [ doc = "`read()` method returns [rmon_t_oversize::R](rmon_t_oversize::R) reader structure" ] impl crate :: Readable for RMON_T_OVERSIZE { } # [ doc = "Tx Packets GT MAX_FL bytes and Good CRC Statistic Register" ] pub mod rmon_t_oversize { # [ doc = "Reader of register RMON_T_OVERSIZE" ] pub type R = crate :: R < u32 , super :: RMON_T_OVERSIZE > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of transmit packets greater than MAX_FL bytes with good CRC" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Packets Less Than 64 Bytes and Bad CRC Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_frag](rmon_t_frag) module" ] pub type RMON_T_FRAG = crate :: Reg < u32 , _RMON_T_FRAG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_FRAG ; # [ doc = "`read()` method returns [rmon_t_frag::R](rmon_t_frag::R) reader structure" ] impl crate :: Readable for RMON_T_FRAG { } # [ doc = "Tx Packets Less Than 64 Bytes and Bad CRC Statistic Register" ] pub mod rmon_t_frag { # [ doc = "Reader of register RMON_T_FRAG" ] pub type R = crate :: R < u32 , super :: RMON_T_FRAG > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of packets less than 64 bytes with bad CRC" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Packets Greater Than MAX_FL bytes and Bad CRC Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_jab](rmon_t_jab) module" ] pub type RMON_T_JAB = crate :: Reg < u32 , _RMON_T_JAB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_JAB ; # [ doc = "`read()` method returns [rmon_t_jab::R](rmon_t_jab::R) reader structure" ] impl crate :: Readable for RMON_T_JAB { } # [ doc = "Tx Packets Greater Than MAX_FL bytes and Bad CRC Statistic Register" ] pub mod rmon_t_jab { # [ doc = "Reader of register RMON_T_JAB" ] pub type R = crate :: R < u32 , super :: RMON_T_JAB > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of transmit packets greater than MAX_FL bytes and bad CRC" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Collision Count Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_col](rmon_t_col) module" ] pub type RMON_T_COL = crate :: Reg < u32 , _RMON_T_COL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_COL ; # [ doc = "`read()` method returns [rmon_t_col::R](rmon_t_col::R) reader structure" ] impl crate :: Readable for RMON_T_COL { } # [ doc = "Tx Collision Count Statistic Register" ] pub mod rmon_t_col { # [ doc = "Reader of register RMON_T_COL" ] pub type R = crate :: R < u32 , super :: RMON_T_COL > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of transmit collisions" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx 64-Byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_p64](rmon_t_p64) module" ] pub type RMON_T_P64 = crate :: Reg < u32 , _RMON_T_P64 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_P64 ; # [ doc = "`read()` method returns [rmon_t_p64::R](rmon_t_p64::R) reader structure" ] impl crate :: Readable for RMON_T_P64 { } # [ doc = "Tx 64-Byte Packets Statistic Register" ] pub mod rmon_t_p64 { # [ doc = "Reader of register RMON_T_P64" ] pub type R = crate :: R < u32 , super :: RMON_T_P64 > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 64-byte transmit packets" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx 65- to 127-byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_p65to127](rmon_t_p65to127) module" ] pub type RMON_T_P65TO127 = crate :: Reg < u32 , _RMON_T_P65TO127 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_P65TO127 ; # [ doc = "`read()` method returns [rmon_t_p65to127::R](rmon_t_p65to127::R) reader structure" ] impl crate :: Readable for RMON_T_P65TO127 { } # [ doc = "Tx 65- to 127-byte Packets Statistic Register" ] pub mod rmon_t_p65to127 { # [ doc = "Reader of register RMON_T_P65TO127" ] pub type R = crate :: R < u32 , super :: RMON_T_P65TO127 > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 65- to 127-byte transmit packets" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx 128- to 255-byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_p128to255](rmon_t_p128to255) module" ] pub type RMON_T_P128TO255 = crate :: Reg < u32 , _RMON_T_P128TO255 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_P128TO255 ; # [ doc = "`read()` method returns [rmon_t_p128to255::R](rmon_t_p128to255::R) reader structure" ] impl crate :: Readable for RMON_T_P128TO255 { } # [ doc = "Tx 128- to 255-byte Packets Statistic Register" ] pub mod rmon_t_p128to255 { # [ doc = "Reader of register RMON_T_P128TO255" ] pub type R = crate :: R < u32 , super :: RMON_T_P128TO255 > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 128- to 255-byte transmit packets" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx 256- to 511-byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_p256to511](rmon_t_p256to511) module" ] pub type RMON_T_P256TO511 = crate :: Reg < u32 , _RMON_T_P256TO511 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_P256TO511 ; # [ doc = "`read()` method returns [rmon_t_p256to511::R](rmon_t_p256to511::R) reader structure" ] impl crate :: Readable for RMON_T_P256TO511 { } # [ doc = "Tx 256- to 511-byte Packets Statistic Register" ] pub mod rmon_t_p256to511 { # [ doc = "Reader of register RMON_T_P256TO511" ] pub type R = crate :: R < u32 , super :: RMON_T_P256TO511 > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 256- to 511-byte transmit packets" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx 512- to 1023-byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_p512to1023](rmon_t_p512to1023) module" ] pub type RMON_T_P512TO1023 = crate :: Reg < u32 , _RMON_T_P512TO1023 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_P512TO1023 ; # [ doc = "`read()` method returns [rmon_t_p512to1023::R](rmon_t_p512to1023::R) reader structure" ] impl crate :: Readable for RMON_T_P512TO1023 { } # [ doc = "Tx 512- to 1023-byte Packets Statistic Register" ] pub mod rmon_t_p512to1023 { # [ doc = "Reader of register RMON_T_P512TO1023" ] pub type R = crate :: R < u32 , super :: RMON_T_P512TO1023 > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 512- to 1023-byte transmit packets" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx 1024- to 2047-byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_p1024to2047](rmon_t_p1024to2047) module" ] pub type RMON_T_P1024TO2047 = crate :: Reg < u32 , _RMON_T_P1024TO2047 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_P1024TO2047 ; # [ doc = "`read()` method returns [rmon_t_p1024to2047::R](rmon_t_p1024to2047::R) reader structure" ] impl crate :: Readable for RMON_T_P1024TO2047 { } # [ doc = "Tx 1024- to 2047-byte Packets Statistic Register" ] pub mod rmon_t_p1024to2047 { # [ doc = "Reader of register RMON_T_P1024TO2047" ] pub type R = crate :: R < u32 , super :: RMON_T_P1024TO2047 > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 1024- to 2047-byte transmit packets" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Packets Greater Than 2048 Bytes Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_p_gte2048](rmon_t_p_gte2048) module" ] pub type RMON_T_P_GTE2048 = crate :: Reg < u32 , _RMON_T_P_GTE2048 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_P_GTE2048 ; # [ doc = "`read()` method returns [rmon_t_p_gte2048::R](rmon_t_p_gte2048::R) reader structure" ] impl crate :: Readable for RMON_T_P_GTE2048 { } # [ doc = "Tx Packets Greater Than 2048 Bytes Statistic Register" ] pub mod rmon_t_p_gte2048 { # [ doc = "Reader of register RMON_T_P_GTE2048" ] pub type R = crate :: R < u32 , super :: RMON_T_P_GTE2048 > ; # [ doc = "Reader of field `TXPKTS`" ] pub type TXPKTS_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of transmit packets greater than 2048 bytes" ] # [ inline ( always ) ] pub fn txpkts ( & self ) -> TXPKTS_R { TXPKTS_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Tx Octets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_t_octets](rmon_t_octets) module" ] pub type RMON_T_OCTETS = crate :: Reg < u32 , _RMON_T_OCTETS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_T_OCTETS ; # [ doc = "`read()` method returns [rmon_t_octets::R](rmon_t_octets::R) reader structure" ] impl crate :: Readable for RMON_T_OCTETS { } # [ doc = "Tx Octets Statistic Register" ] pub mod rmon_t_octets { # [ doc = "Reader of register RMON_T_OCTETS" ] pub type R = crate :: R < u32 , super :: RMON_T_OCTETS > ; # [ doc = "Reader of field `TXOCTS`" ] pub type TXOCTS_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Number of transmit octets" ] # [ inline ( always ) ] pub fn txocts ( & self ) -> TXOCTS_R { TXOCTS_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "IEEE_T_DROP Reserved Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_drop](ieee_t_drop) module" ] pub type IEEE_T_DROP = crate :: Reg < u32 , _IEEE_T_DROP > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_DROP ; # [ doc = "`read()` method returns [ieee_t_drop::R](ieee_t_drop::R) reader structure" ] impl crate :: Readable for IEEE_T_DROP { } # [ doc = "IEEE_T_DROP Reserved Statistic Register" ] pub mod ieee_t_drop { # [ doc = "Reader of register IEEE_T_DROP" ] pub type R = crate :: R < u32 , super :: IEEE_T_DROP > ; impl R { } } # [ doc = "Frames Transmitted OK Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_frame_ok](ieee_t_frame_ok) module" ] pub type IEEE_T_FRAME_OK = crate :: Reg < u32 , _IEEE_T_FRAME_OK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_FRAME_OK ; # [ doc = "`read()` method returns [ieee_t_frame_ok::R](ieee_t_frame_ok::R) reader structure" ] impl crate :: Readable for IEEE_T_FRAME_OK { } # [ doc = "Frames Transmitted OK Statistic Register" ] pub mod ieee_t_frame_ok { # [ doc = "Reader of register IEEE_T_FRAME_OK" ] pub type R = crate :: R < u32 , super :: IEEE_T_FRAME_OK > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted OK" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Transmitted with Single Collision Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_1col](ieee_t_1col) module" ] pub type IEEE_T_1COL = crate :: Reg < u32 , _IEEE_T_1COL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_1COL ; # [ doc = "`read()` method returns [ieee_t_1col::R](ieee_t_1col::R) reader structure" ] impl crate :: Readable for IEEE_T_1COL { } # [ doc = "Frames Transmitted with Single Collision Statistic Register" ] pub mod ieee_t_1col { # [ doc = "Reader of register IEEE_T_1COL" ] pub type R = crate :: R < u32 , super :: IEEE_T_1COL > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted with one collision" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Transmitted with Multiple Collisions Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_mcol](ieee_t_mcol) module" ] pub type IEEE_T_MCOL = crate :: Reg < u32 , _IEEE_T_MCOL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_MCOL ; # [ doc = "`read()` method returns [ieee_t_mcol::R](ieee_t_mcol::R) reader structure" ] impl crate :: Readable for IEEE_T_MCOL { } # [ doc = "Frames Transmitted with Multiple Collisions Statistic Register" ] pub mod ieee_t_mcol { # [ doc = "Reader of register IEEE_T_MCOL" ] pub type R = crate :: R < u32 , super :: IEEE_T_MCOL > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted with multiple collisions" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Transmitted after Deferral Delay Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_def](ieee_t_def) module" ] pub type IEEE_T_DEF = crate :: Reg < u32 , _IEEE_T_DEF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_DEF ; # [ doc = "`read()` method returns [ieee_t_def::R](ieee_t_def::R) reader structure" ] impl crate :: Readable for IEEE_T_DEF { } # [ doc = "Frames Transmitted after Deferral Delay Statistic Register" ] pub mod ieee_t_def { # [ doc = "Reader of register IEEE_T_DEF" ] pub type R = crate :: R < u32 , super :: IEEE_T_DEF > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted with deferral delay" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Transmitted with Late Collision Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_lcol](ieee_t_lcol) module" ] pub type IEEE_T_LCOL = crate :: Reg < u32 , _IEEE_T_LCOL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_LCOL ; # [ doc = "`read()` method returns [ieee_t_lcol::R](ieee_t_lcol::R) reader structure" ] impl crate :: Readable for IEEE_T_LCOL { } # [ doc = "Frames Transmitted with Late Collision Statistic Register" ] pub mod ieee_t_lcol { # [ doc = "Reader of register IEEE_T_LCOL" ] pub type R = crate :: R < u32 , super :: IEEE_T_LCOL > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted with late collision" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Transmitted with Excessive Collisions Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_excol](ieee_t_excol) module" ] pub type IEEE_T_EXCOL = crate :: Reg < u32 , _IEEE_T_EXCOL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_EXCOL ; # [ doc = "`read()` method returns [ieee_t_excol::R](ieee_t_excol::R) reader structure" ] impl crate :: Readable for IEEE_T_EXCOL { } # [ doc = "Frames Transmitted with Excessive Collisions Statistic Register" ] pub mod ieee_t_excol { # [ doc = "Reader of register IEEE_T_EXCOL" ] pub type R = crate :: R < u32 , super :: IEEE_T_EXCOL > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted with excessive collisions" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Transmitted with Tx FIFO Underrun Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_macerr](ieee_t_macerr) module" ] pub type IEEE_T_MACERR = crate :: Reg < u32 , _IEEE_T_MACERR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_MACERR ; # [ doc = "`read()` method returns [ieee_t_macerr::R](ieee_t_macerr::R) reader structure" ] impl crate :: Readable for IEEE_T_MACERR { } # [ doc = "Frames Transmitted with Tx FIFO Underrun Statistic Register" ] pub mod ieee_t_macerr { # [ doc = "Reader of register IEEE_T_MACERR" ] pub type R = crate :: R < u32 , super :: IEEE_T_MACERR > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted with transmit FIFO underrun" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Transmitted with Carrier Sense Error Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_cserr](ieee_t_cserr) module" ] pub type IEEE_T_CSERR = crate :: Reg < u32 , _IEEE_T_CSERR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_CSERR ; # [ doc = "`read()` method returns [ieee_t_cserr::R](ieee_t_cserr::R) reader structure" ] impl crate :: Readable for IEEE_T_CSERR { } # [ doc = "Frames Transmitted with Carrier Sense Error Statistic Register" ] pub mod ieee_t_cserr { # [ doc = "Reader of register IEEE_T_CSERR" ] pub type R = crate :: R < u32 , super :: IEEE_T_CSERR > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted with carrier sense error" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "no description available\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_sqe](ieee_t_sqe) module" ] pub type IEEE_T_SQE = crate :: Reg < u32 , _IEEE_T_SQE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_SQE ; # [ doc = "`read()` method returns [ieee_t_sqe::R](ieee_t_sqe::R) reader structure" ] impl crate :: Readable for IEEE_T_SQE { } # [ doc = "no description available" ] pub mod ieee_t_sqe { # [ doc = "Reader of register IEEE_T_SQE" ] pub type R = crate :: R < u32 , super :: IEEE_T_SQE > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames transmitted with SQE error" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Flow Control Pause Frames Transmitted Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_fdxfc](ieee_t_fdxfc) module" ] pub type IEEE_T_FDXFC = crate :: Reg < u32 , _IEEE_T_FDXFC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_FDXFC ; # [ doc = "`read()` method returns [ieee_t_fdxfc::R](ieee_t_fdxfc::R) reader structure" ] impl crate :: Readable for IEEE_T_FDXFC { } # [ doc = "Flow Control Pause Frames Transmitted Statistic Register" ] pub mod ieee_t_fdxfc { # [ doc = "Reader of register IEEE_T_FDXFC" ] pub type R = crate :: R < u32 , super :: IEEE_T_FDXFC > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of flow-control pause frames transmitted" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Octet Count for Frames Transmitted w/o Error Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_t_octets_ok](ieee_t_octets_ok) module" ] pub type IEEE_T_OCTETS_OK = crate :: Reg < u32 , _IEEE_T_OCTETS_OK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_T_OCTETS_OK ; # [ doc = "`read()` method returns [ieee_t_octets_ok::R](ieee_t_octets_ok::R) reader structure" ] impl crate :: Readable for IEEE_T_OCTETS_OK { } # [ doc = "Octet Count for Frames Transmitted w/o Error Statistic Register" ] pub mod ieee_t_octets_ok { # [ doc = "Reader of register IEEE_T_OCTETS_OK" ] pub type R = crate :: R < u32 , super :: IEEE_T_OCTETS_OK > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Octet count for frames transmitted without error Counts total octets (includes header and FCS fields)." ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Rx Packet Count Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_packets](rmon_r_packets) module" ] pub type RMON_R_PACKETS = crate :: Reg < u32 , _RMON_R_PACKETS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_PACKETS ; # [ doc = "`read()` method returns [rmon_r_packets::R](rmon_r_packets::R) reader structure" ] impl crate :: Readable for RMON_R_PACKETS { } # [ doc = "Rx Packet Count Statistic Register" ] pub mod rmon_r_packets { # [ doc = "Reader of register RMON_R_PACKETS" ] pub type R = crate :: R < u32 , super :: RMON_R_PACKETS > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of packets received" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Broadcast Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_bc_pkt](rmon_r_bc_pkt) module" ] pub type RMON_R_BC_PKT = crate :: Reg < u32 , _RMON_R_BC_PKT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_BC_PKT ; # [ doc = "`read()` method returns [rmon_r_bc_pkt::R](rmon_r_bc_pkt::R) reader structure" ] impl crate :: Readable for RMON_R_BC_PKT { } # [ doc = "Rx Broadcast Packets Statistic Register" ] pub mod rmon_r_bc_pkt { # [ doc = "Reader of register RMON_R_BC_PKT" ] pub type R = crate :: R < u32 , super :: RMON_R_BC_PKT > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of receive broadcast packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Multicast Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_mc_pkt](rmon_r_mc_pkt) module" ] pub type RMON_R_MC_PKT = crate :: Reg < u32 , _RMON_R_MC_PKT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_MC_PKT ; # [ doc = "`read()` method returns [rmon_r_mc_pkt::R](rmon_r_mc_pkt::R) reader structure" ] impl crate :: Readable for RMON_R_MC_PKT { } # [ doc = "Rx Multicast Packets Statistic Register" ] pub mod rmon_r_mc_pkt { # [ doc = "Reader of register RMON_R_MC_PKT" ] pub type R = crate :: R < u32 , super :: RMON_R_MC_PKT > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of receive multicast packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Packets with CRC/Align Error Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_crc_align](rmon_r_crc_align) module" ] pub type RMON_R_CRC_ALIGN = crate :: Reg < u32 , _RMON_R_CRC_ALIGN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_CRC_ALIGN ; # [ doc = "`read()` method returns [rmon_r_crc_align::R](rmon_r_crc_align::R) reader structure" ] impl crate :: Readable for RMON_R_CRC_ALIGN { } # [ doc = "Rx Packets with CRC/Align Error Statistic Register" ] pub mod rmon_r_crc_align { # [ doc = "Reader of register RMON_R_CRC_ALIGN" ] pub type R = crate :: R < u32 , super :: RMON_R_CRC_ALIGN > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of receive packets with CRC or align error" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Packets with Less Than 64 Bytes and Good CRC Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_undersize](rmon_r_undersize) module" ] pub type RMON_R_UNDERSIZE = crate :: Reg < u32 , _RMON_R_UNDERSIZE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_UNDERSIZE ; # [ doc = "`read()` method returns [rmon_r_undersize::R](rmon_r_undersize::R) reader structure" ] impl crate :: Readable for RMON_R_UNDERSIZE { } # [ doc = "Rx Packets with Less Than 64 Bytes and Good CRC Statistic Register" ] pub mod rmon_r_undersize { # [ doc = "Reader of register RMON_R_UNDERSIZE" ] pub type R = crate :: R < u32 , super :: RMON_R_UNDERSIZE > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of receive packets with less than 64 bytes and good CRC" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Packets Greater Than MAX_FL and Good CRC Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_oversize](rmon_r_oversize) module" ] pub type RMON_R_OVERSIZE = crate :: Reg < u32 , _RMON_R_OVERSIZE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_OVERSIZE ; # [ doc = "`read()` method returns [rmon_r_oversize::R](rmon_r_oversize::R) reader structure" ] impl crate :: Readable for RMON_R_OVERSIZE { } # [ doc = "Rx Packets Greater Than MAX_FL and Good CRC Statistic Register" ] pub mod rmon_r_oversize { # [ doc = "Reader of register RMON_R_OVERSIZE" ] pub type R = crate :: R < u32 , super :: RMON_R_OVERSIZE > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of receive packets greater than MAX_FL and good CRC" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Packets Less Than 64 Bytes and Bad CRC Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_frag](rmon_r_frag) module" ] pub type RMON_R_FRAG = crate :: Reg < u32 , _RMON_R_FRAG > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_FRAG ; # [ doc = "`read()` method returns [rmon_r_frag::R](rmon_r_frag::R) reader structure" ] impl crate :: Readable for RMON_R_FRAG { } # [ doc = "Rx Packets Less Than 64 Bytes and Bad CRC Statistic Register" ] pub mod rmon_r_frag { # [ doc = "Reader of register RMON_R_FRAG" ] pub type R = crate :: R < u32 , super :: RMON_R_FRAG > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of receive packets with less than 64 bytes and bad CRC" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Packets Greater Than MAX_FL Bytes and Bad CRC Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_jab](rmon_r_jab) module" ] pub type RMON_R_JAB = crate :: Reg < u32 , _RMON_R_JAB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_JAB ; # [ doc = "`read()` method returns [rmon_r_jab::R](rmon_r_jab::R) reader structure" ] impl crate :: Readable for RMON_R_JAB { } # [ doc = "Rx Packets Greater Than MAX_FL Bytes and Bad CRC Statistic Register" ] pub mod rmon_r_jab { # [ doc = "Reader of register RMON_R_JAB" ] pub type R = crate :: R < u32 , super :: RMON_R_JAB > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of receive packets greater than MAX_FL and bad CRC" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Reserved Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_resvd_0](rmon_r_resvd_0) module" ] pub type RMON_R_RESVD_0 = crate :: Reg < u32 , _RMON_R_RESVD_0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_RESVD_0 ; # [ doc = "`read()` method returns [rmon_r_resvd_0::R](rmon_r_resvd_0::R) reader structure" ] impl crate :: Readable for RMON_R_RESVD_0 { } # [ doc = "Reserved Statistic Register" ] pub mod rmon_r_resvd_0 { # [ doc = "Reader of register RMON_R_RESVD_0" ] pub type R = crate :: R < u32 , super :: RMON_R_RESVD_0 > ; impl R { } } # [ doc = "Rx 64-Byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_p64](rmon_r_p64) module" ] pub type RMON_R_P64 = crate :: Reg < u32 , _RMON_R_P64 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_P64 ; # [ doc = "`read()` method returns [rmon_r_p64::R](rmon_r_p64::R) reader structure" ] impl crate :: Readable for RMON_R_P64 { } # [ doc = "Rx 64-Byte Packets Statistic Register" ] pub mod rmon_r_p64 { # [ doc = "Reader of register RMON_R_P64" ] pub type R = crate :: R < u32 , super :: RMON_R_P64 > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 64-byte receive packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx 65- to 127-Byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_p65to127](rmon_r_p65to127) module" ] pub type RMON_R_P65TO127 = crate :: Reg < u32 , _RMON_R_P65TO127 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_P65TO127 ; # [ doc = "`read()` method returns [rmon_r_p65to127::R](rmon_r_p65to127::R) reader structure" ] impl crate :: Readable for RMON_R_P65TO127 { } # [ doc = "Rx 65- to 127-Byte Packets Statistic Register" ] pub mod rmon_r_p65to127 { # [ doc = "Reader of register RMON_R_P65TO127" ] pub type R = crate :: R < u32 , super :: RMON_R_P65TO127 > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 65- to 127-byte recieve packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx 128- to 255-Byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_p128to255](rmon_r_p128to255) module" ] pub type RMON_R_P128TO255 = crate :: Reg < u32 , _RMON_R_P128TO255 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_P128TO255 ; # [ doc = "`read()` method returns [rmon_r_p128to255::R](rmon_r_p128to255::R) reader structure" ] impl crate :: Readable for RMON_R_P128TO255 { } # [ doc = "Rx 128- to 255-Byte Packets Statistic Register" ] pub mod rmon_r_p128to255 { # [ doc = "Reader of register RMON_R_P128TO255" ] pub type R = crate :: R < u32 , super :: RMON_R_P128TO255 > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 128- to 255-byte recieve packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx 256- to 511-Byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_p256to511](rmon_r_p256to511) module" ] pub type RMON_R_P256TO511 = crate :: Reg < u32 , _RMON_R_P256TO511 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_P256TO511 ; # [ doc = "`read()` method returns [rmon_r_p256to511::R](rmon_r_p256to511::R) reader structure" ] impl crate :: Readable for RMON_R_P256TO511 { } # [ doc = "Rx 256- to 511-Byte Packets Statistic Register" ] pub mod rmon_r_p256to511 { # [ doc = "Reader of register RMON_R_P256TO511" ] pub type R = crate :: R < u32 , super :: RMON_R_P256TO511 > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 256- to 511-byte recieve packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx 512- to 1023-Byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_p512to1023](rmon_r_p512to1023) module" ] pub type RMON_R_P512TO1023 = crate :: Reg < u32 , _RMON_R_P512TO1023 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_P512TO1023 ; # [ doc = "`read()` method returns [rmon_r_p512to1023::R](rmon_r_p512to1023::R) reader structure" ] impl crate :: Readable for RMON_R_P512TO1023 { } # [ doc = "Rx 512- to 1023-Byte Packets Statistic Register" ] pub mod rmon_r_p512to1023 { # [ doc = "Reader of register RMON_R_P512TO1023" ] pub type R = crate :: R < u32 , super :: RMON_R_P512TO1023 > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 512- to 1023-byte recieve packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx 1024- to 2047-Byte Packets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_p1024to2047](rmon_r_p1024to2047) module" ] pub type RMON_R_P1024TO2047 = crate :: Reg < u32 , _RMON_R_P1024TO2047 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_P1024TO2047 ; # [ doc = "`read()` method returns [rmon_r_p1024to2047::R](rmon_r_p1024to2047::R) reader structure" ] impl crate :: Readable for RMON_R_P1024TO2047 { } # [ doc = "Rx 1024- to 2047-Byte Packets Statistic Register" ] pub mod rmon_r_p1024to2047 { # [ doc = "Reader of register RMON_R_P1024TO2047" ] pub type R = crate :: R < u32 , super :: RMON_R_P1024TO2047 > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of 1024- to 2047-byte recieve packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Packets Greater than 2048 Bytes Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_p_gte2048](rmon_r_p_gte2048) module" ] pub type RMON_R_P_GTE2048 = crate :: Reg < u32 , _RMON_R_P_GTE2048 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_P_GTE2048 ; # [ doc = "`read()` method returns [rmon_r_p_gte2048::R](rmon_r_p_gte2048::R) reader structure" ] impl crate :: Readable for RMON_R_P_GTE2048 { } # [ doc = "Rx Packets Greater than 2048 Bytes Statistic Register" ] pub mod rmon_r_p_gte2048 { # [ doc = "Reader of register RMON_R_P_GTE2048" ] pub type R = crate :: R < u32 , super :: RMON_R_P_GTE2048 > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of greater-than-2048-byte recieve packets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Rx Octets Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rmon_r_octets](rmon_r_octets) module" ] pub type RMON_R_OCTETS = crate :: Reg < u32 , _RMON_R_OCTETS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RMON_R_OCTETS ; # [ doc = "`read()` method returns [rmon_r_octets::R](rmon_r_octets::R) reader structure" ] impl crate :: Readable for RMON_R_OCTETS { } # [ doc = "Rx Octets Statistic Register" ] pub mod rmon_r_octets { # [ doc = "Reader of register RMON_R_OCTETS" ] pub type R = crate :: R < u32 , super :: RMON_R_OCTETS > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Number of receive octets" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Frames not Counted Correctly Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_r_drop](ieee_r_drop) module" ] pub type IEEE_R_DROP = crate :: Reg < u32 , _IEEE_R_DROP > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_R_DROP ; # [ doc = "`read()` method returns [ieee_r_drop::R](ieee_r_drop::R) reader structure" ] impl crate :: Readable for IEEE_R_DROP { } # [ doc = "Frames not Counted Correctly Statistic Register" ] pub mod ieee_r_drop { # [ doc = "Reader of register IEEE_R_DROP" ] pub type R = crate :: R < u32 , super :: IEEE_R_DROP > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Frame count" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Received OK Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_r_frame_ok](ieee_r_frame_ok) module" ] pub type IEEE_R_FRAME_OK = crate :: Reg < u32 , _IEEE_R_FRAME_OK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_R_FRAME_OK ; # [ doc = "`read()` method returns [ieee_r_frame_ok::R](ieee_r_frame_ok::R) reader structure" ] impl crate :: Readable for IEEE_R_FRAME_OK { } # [ doc = "Frames Received OK Statistic Register" ] pub mod ieee_r_frame_ok { # [ doc = "Reader of register IEEE_R_FRAME_OK" ] pub type R = crate :: R < u32 , super :: IEEE_R_FRAME_OK > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames received OK" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Received with CRC Error Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_r_crc](ieee_r_crc) module" ] pub type IEEE_R_CRC = crate :: Reg < u32 , _IEEE_R_CRC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_R_CRC ; # [ doc = "`read()` method returns [ieee_r_crc::R](ieee_r_crc::R) reader structure" ] impl crate :: Readable for IEEE_R_CRC { } # [ doc = "Frames Received with CRC Error Statistic Register" ] pub mod ieee_r_crc { # [ doc = "Reader of register IEEE_R_CRC" ] pub type R = crate :: R < u32 , super :: IEEE_R_CRC > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames received with CRC error" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Frames Received with Alignment Error Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_r_align](ieee_r_align) module" ] pub type IEEE_R_ALIGN = crate :: Reg < u32 , _IEEE_R_ALIGN > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_R_ALIGN ; # [ doc = "`read()` method returns [ieee_r_align::R](ieee_r_align::R) reader structure" ] impl crate :: Readable for IEEE_R_ALIGN { } # [ doc = "Frames Received with Alignment Error Statistic Register" ] pub mod ieee_r_align { # [ doc = "Reader of register IEEE_R_ALIGN" ] pub type R = crate :: R < u32 , super :: IEEE_R_ALIGN > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of frames received with alignment error" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Receive FIFO Overflow Count Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_r_macerr](ieee_r_macerr) module" ] pub type IEEE_R_MACERR = crate :: Reg < u32 , _IEEE_R_MACERR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_R_MACERR ; # [ doc = "`read()` method returns [ieee_r_macerr::R](ieee_r_macerr::R) reader structure" ] impl crate :: Readable for IEEE_R_MACERR { } # [ doc = "Receive FIFO Overflow Count Statistic Register" ] pub mod ieee_r_macerr { # [ doc = "Reader of register IEEE_R_MACERR" ] pub type R = crate :: R < u32 , super :: IEEE_R_MACERR > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Receive FIFO overflow count" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Flow Control Pause Frames Received Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_r_fdxfc](ieee_r_fdxfc) module" ] pub type IEEE_R_FDXFC = crate :: Reg < u32 , _IEEE_R_FDXFC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_R_FDXFC ; # [ doc = "`read()` method returns [ieee_r_fdxfc::R](ieee_r_fdxfc::R) reader structure" ] impl crate :: Readable for IEEE_R_FDXFC { } # [ doc = "Flow Control Pause Frames Received Statistic Register" ] pub mod ieee_r_fdxfc { # [ doc = "Reader of register IEEE_R_FDXFC" ] pub type R = crate :: R < u32 , super :: IEEE_R_FDXFC > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:15 - Number of flow-control pause frames received" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } } # [ doc = "Octet Count for Frames Received without Error Statistic Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ieee_r_octets_ok](ieee_r_octets_ok) module" ] pub type IEEE_R_OCTETS_OK = crate :: Reg < u32 , _IEEE_R_OCTETS_OK > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _IEEE_R_OCTETS_OK ; # [ doc = "`read()` method returns [ieee_r_octets_ok::R](ieee_r_octets_ok::R) reader structure" ] impl crate :: Readable for IEEE_R_OCTETS_OK { } # [ doc = "Octet Count for Frames Received without Error Statistic Register" ] pub mod ieee_r_octets_ok { # [ doc = "Reader of register IEEE_R_OCTETS_OK" ] pub type R = crate :: R < u32 , super :: IEEE_R_OCTETS_OK > ; # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Number of octets for frames received without error" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Adjustable Timer Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atcr](atcr) module" ] pub type ATCR = crate :: Reg < u32 , _ATCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATCR ; # [ doc = "`read()` method returns [atcr::R](atcr::R) reader structure" ] impl crate :: Readable for ATCR { } # [ doc = "`write(|w| ..)` method takes [atcr::W](atcr::W) writer structure" ] impl crate :: Writable for ATCR { } # [ doc = "Adjustable Timer Control Register" ] pub mod atcr { # [ doc = "Reader of register ATCR" ] pub type R = crate :: R < u32 , super :: ATCR > ; # [ doc = "Writer for register ATCR" ] pub type W = crate :: W < u32 , super :: ATCR > ; # [ doc = "Register ATCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ATCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Enable Timer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EN_A { # [ doc = "0: The timer stops at the current value." ] _0 , # [ doc = "1: The timer starts incrementing." ] _1 } impl From < EN_A > for bool { # [ inline ( always ) ] fn from ( variant : EN_A ) -> Self { match variant { EN_A :: _0 => false , EN_A :: _1 => true } } } # [ doc = "Reader of field `EN`" ] pub type EN_R = crate :: R < bool , EN_A > ; impl EN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EN_A { match self . bits { false => EN_A :: _0 , true => EN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EN_A :: _1 } } # [ doc = "Write proxy for field `EN`" ] pub struct EN_W < 'a > { w : & 'a mut W , } impl < 'a > EN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The timer stops at the current value." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EN_A :: _0 ) } # [ doc = "The timer starts incrementing." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Enable One-Shot Offset Event\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OFFEN_A { # [ doc = "0: Disable." ] _0 , # [ doc = "1: The timer can be reset to zero when the given offset time is reached (offset event). The field is cleared when the offset event is reached, so no further event occurs until the field is set again. The timer offset value must be set before setting this field." ] _1 } impl From < OFFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : OFFEN_A ) -> Self { match variant { OFFEN_A :: _0 => false , OFFEN_A :: _1 => true } } } # [ doc = "Reader of field `OFFEN`" ] pub type OFFEN_R = crate :: R < bool , OFFEN_A > ; impl OFFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OFFEN_A { match self . bits { false => OFFEN_A :: _0 , true => OFFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OFFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OFFEN_A :: _1 } } # [ doc = "Write proxy for field `OFFEN`" ] pub struct OFFEN_W < 'a > { w : & 'a mut W , } impl < 'a > OFFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OFFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OFFEN_A :: _0 ) } # [ doc = "The timer can be reset to zero when the given offset time is reached (offset event). The field is cleared when the offset event is reached, so no further event occurs until the field is set again. The timer offset value must be set before setting this field." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OFFEN_A :: _1 ) } # [ 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 = "Reset Timer On Offset Event\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OFFRST_A { # [ doc = "0: The timer is not affected and no action occurs, besides clearing OFFEN, when the offset is reached." ] _0 , # [ doc = "1: If OFFEN is set, the timer resets to zero when the offset setting is reached. The offset event does not cause a timer interrupt." ] _1 } impl From < OFFRST_A > for bool { # [ inline ( always ) ] fn from ( variant : OFFRST_A ) -> Self { match variant { OFFRST_A :: _0 => false , OFFRST_A :: _1 => true } } } # [ doc = "Reader of field `OFFRST`" ] pub type OFFRST_R = crate :: R < bool , OFFRST_A > ; impl OFFRST_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OFFRST_A { match self . bits { false => OFFRST_A :: _0 , true => OFFRST_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OFFRST_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OFFRST_A :: _1 } } # [ doc = "Write proxy for field `OFFRST`" ] pub struct OFFRST_W < 'a > { w : & 'a mut W , } impl < 'a > OFFRST_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OFFRST_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The timer is not affected and no action occurs, besides clearing OFFEN, when the offset is reached." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OFFRST_A :: _0 ) } # [ doc = "If OFFEN is set, the timer resets to zero when the offset setting is reached. The offset event does not cause a timer interrupt." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OFFRST_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enable Periodical Event\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEREN_A { # [ doc = "0: Disable." ] _0 , # [ doc = "1: A period event interrupt can be generated (EIR\\[TS_TIMER\\]) and the event signal output is asserted when the timer wraps around according to the periodic setting ATPER. The timer period value must be set before setting this bit. Not all devices contain the event signal output. See the chip configuration details." ] _1 } impl From < PEREN_A > for bool { # [ inline ( always ) ] fn from ( variant : PEREN_A ) -> Self { match variant { PEREN_A :: _0 => false , PEREN_A :: _1 => true } } } # [ doc = "Reader of field `PEREN`" ] pub type PEREN_R = crate :: R < bool , PEREN_A > ; impl PEREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEREN_A { match self . bits { false => PEREN_A :: _0 , true => PEREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEREN_A :: _1 } } # [ doc = "Write proxy for field `PEREN`" ] pub struct PEREN_W < 'a > { w : & 'a mut W , } impl < 'a > PEREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEREN_A :: _0 ) } # [ doc = "A period event interrupt can be generated (EIR\\[TS_TIMER\\]) and the event signal output is asserted when the timer wraps around according to the periodic setting ATPER. The timer period value must be set before setting this bit. Not all devices contain the event signal output. See the chip configuration details." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEREN_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Enables event signal output assertion on period event\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PINPER_A { # [ doc = "0: Disable." ] _0 , # [ doc = "1: Enable." ] _1 } impl From < PINPER_A > for bool { # [ inline ( always ) ] fn from ( variant : PINPER_A ) -> Self { match variant { PINPER_A :: _0 => false , PINPER_A :: _1 => true } } } # [ doc = "Reader of field `PINPER`" ] pub type PINPER_R = crate :: R < bool , PINPER_A > ; impl PINPER_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PINPER_A { match self . bits { false => PINPER_A :: _0 , true => PINPER_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PINPER_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PINPER_A :: _1 } } # [ doc = "Write proxy for field `PINPER`" ] pub struct PINPER_W < 'a > { w : & 'a mut W , } impl < 'a > PINPER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PINPER_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PINPER_A :: _0 ) } # [ doc = "Enable." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PINPER_A :: _1 ) } # [ 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 = "Reader of field `RESTART`" ] pub type RESTART_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `RESTART`" ] pub struct RESTART_W < 'a > { w : & 'a mut W , } impl < 'a > RESTART_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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Capture Timer Value\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CAPTURE_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: The current time is captured and can be read from the ATVR register." ] _1 } impl From < CAPTURE_A > for bool { # [ inline ( always ) ] fn from ( variant : CAPTURE_A ) -> Self { match variant { CAPTURE_A :: _0 => false , CAPTURE_A :: _1 => true } } } # [ doc = "Reader of field `CAPTURE`" ] pub type CAPTURE_R = crate :: R < bool , CAPTURE_A > ; impl CAPTURE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CAPTURE_A { match self . bits { false => CAPTURE_A :: _0 , true => CAPTURE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CAPTURE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CAPTURE_A :: _1 } } # [ doc = "Write proxy for field `CAPTURE`" ] pub struct CAPTURE_W < 'a > { w : & 'a mut W , } impl < 'a > CAPTURE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CAPTURE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CAPTURE_A :: _0 ) } # [ doc = "The current time is captured and can be read from the ATVR register." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CAPTURE_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Enable Timer Slave Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLAVE_A { # [ doc = "0: The timer is active and all configuration fields in this register are relevant." ] _0 , # [ doc = "1: The internal timer is disabled and the externally provided timer value is used. All other fields, except CAPTURE, in this register have no effect. CAPTURE can still be used to capture the current timer value." ] _1 } impl From < SLAVE_A > for bool { # [ inline ( always ) ] fn from ( variant : SLAVE_A ) -> Self { match variant { SLAVE_A :: _0 => false , SLAVE_A :: _1 => true } } } # [ doc = "Reader of field `SLAVE`" ] pub type SLAVE_R = crate :: R < bool , SLAVE_A > ; impl SLAVE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLAVE_A { match self . bits { false => SLAVE_A :: _0 , true => SLAVE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLAVE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLAVE_A :: _1 } } # [ doc = "Write proxy for field `SLAVE`" ] pub struct SLAVE_W < 'a > { w : & 'a mut W , } impl < 'a > SLAVE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLAVE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The timer is active and all configuration fields in this register are relevant." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLAVE_A :: _0 ) } # [ doc = "The internal timer is disabled and the externally provided timer value is used. All other fields, except CAPTURE, in this register have no effect. CAPTURE can still be used to capture the current timer value." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLAVE_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Enable Timer" ] # [ inline ( always ) ] pub fn en ( & self ) -> EN_R { EN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Enable One-Shot Offset Event" ] # [ inline ( always ) ] pub fn offen ( & self ) -> OFFEN_R { OFFEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Reset Timer On Offset Event" ] # [ inline ( always ) ] pub fn offrst ( & self ) -> OFFRST_R { OFFRST_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enable Periodical Event" ] # [ inline ( always ) ] pub fn peren ( & self ) -> PEREN_R { PEREN_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Enables event signal output assertion on period event" ] # [ inline ( always ) ] pub fn pinper ( & self ) -> PINPER_R { PINPER_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Reset Timer" ] # [ inline ( always ) ] pub fn restart ( & self ) -> RESTART_R { RESTART_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Capture Timer Value" ] # [ inline ( always ) ] pub fn capture ( & self ) -> CAPTURE_R { CAPTURE_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Enable Timer Slave Mode" ] # [ inline ( always ) ] pub fn slave ( & self ) -> SLAVE_R { SLAVE_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Enable Timer" ] # [ inline ( always ) ] pub fn en ( & mut self ) -> EN_W { EN_W { w : self } } # [ doc = "Bit 2 - Enable One-Shot Offset Event" ] # [ inline ( always ) ] pub fn offen ( & mut self ) -> OFFEN_W { OFFEN_W { w : self } } # [ doc = "Bit 3 - Reset Timer On Offset Event" ] # [ inline ( always ) ] pub fn offrst ( & mut self ) -> OFFRST_W { OFFRST_W { w : self } } # [ doc = "Bit 4 - Enable Periodical Event" ] # [ inline ( always ) ] pub fn peren ( & mut self ) -> PEREN_W { PEREN_W { w : self } } # [ doc = "Bit 7 - Enables event signal output assertion on period event" ] # [ inline ( always ) ] pub fn pinper ( & mut self ) -> PINPER_W { PINPER_W { w : self } } # [ doc = "Bit 9 - Reset Timer" ] # [ inline ( always ) ] pub fn restart ( & mut self ) -> RESTART_W { RESTART_W { w : self } } # [ doc = "Bit 11 - Capture Timer Value" ] # [ inline ( always ) ] pub fn capture ( & mut self ) -> CAPTURE_W { CAPTURE_W { w : self } } # [ doc = "Bit 13 - Enable Timer Slave Mode" ] # [ inline ( always ) ] pub fn slave ( & mut self ) -> SLAVE_W { SLAVE_W { w : self } } } } # [ doc = "Timer Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atvr](atvr) module" ] pub type ATVR = crate :: Reg < u32 , _ATVR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATVR ; # [ doc = "`read()` method returns [atvr::R](atvr::R) reader structure" ] impl crate :: Readable for ATVR { } # [ doc = "`write(|w| ..)` method takes [atvr::W](atvr::W) writer structure" ] impl crate :: Writable for ATVR { } # [ doc = "Timer Value Register" ] pub mod atvr { # [ doc = "Reader of register ATVR" ] pub type R = crate :: R < u32 , super :: ATVR > ; # [ doc = "Writer for register ATVR" ] pub type W = crate :: W < u32 , super :: ATVR > ; # [ doc = "Register ATVR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ATVR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ATIME`" ] pub type ATIME_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `ATIME`" ] pub struct ATIME_W < 'a > { w : & 'a mut W , } impl < 'a > ATIME_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - A write sets the timer" ] # [ inline ( always ) ] pub fn atime ( & self ) -> ATIME_R { ATIME_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - A write sets the timer" ] # [ inline ( always ) ] pub fn atime ( & mut self ) -> ATIME_W { ATIME_W { w : self } } } } # [ doc = "Timer Offset Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atoff](atoff) module" ] pub type ATOFF = crate :: Reg < u32 , _ATOFF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATOFF ; # [ doc = "`read()` method returns [atoff::R](atoff::R) reader structure" ] impl crate :: Readable for ATOFF { } # [ doc = "`write(|w| ..)` method takes [atoff::W](atoff::W) writer structure" ] impl crate :: Writable for ATOFF { } # [ doc = "Timer Offset Register" ] pub mod atoff { # [ doc = "Reader of register ATOFF" ] pub type R = crate :: R < u32 , super :: ATOFF > ; # [ doc = "Writer for register ATOFF" ] pub type W = crate :: W < u32 , super :: ATOFF > ; # [ doc = "Register ATOFF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ATOFF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `OFFSET`" ] pub type OFFSET_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `OFFSET`" ] pub struct OFFSET_W < 'a > { w : & 'a mut W , } impl < 'a > OFFSET_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Offset value for one-shot event generation" ] # [ inline ( always ) ] pub fn offset ( & self ) -> OFFSET_R { OFFSET_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Offset value for one-shot event generation" ] # [ inline ( always ) ] pub fn offset ( & mut self ) -> OFFSET_W { OFFSET_W { w : self } } } } # [ doc = "Timer Period Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atper](atper) module" ] pub type ATPER = crate :: Reg < u32 , _ATPER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATPER ; # [ doc = "`read()` method returns [atper::R](atper::R) reader structure" ] impl crate :: Readable for ATPER { } # [ doc = "`write(|w| ..)` method takes [atper::W](atper::W) writer structure" ] impl crate :: Writable for ATPER { } # [ doc = "Timer Period Register" ] pub mod atper { # [ doc = "Reader of register ATPER" ] pub type R = crate :: R < u32 , super :: ATPER > ; # [ doc = "Writer for register ATPER" ] pub type W = crate :: W < u32 , super :: ATPER > ; # [ doc = "Register ATPER `reset()`'s with value 0x3b9a_ca00" ] impl crate :: ResetValue for super :: ATPER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x3b9a_ca00 } } # [ doc = "Reader of field `PERIOD`" ] pub type PERIOD_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `PERIOD`" ] pub struct PERIOD_W < 'a > { w : & 'a mut W , } impl < 'a > PERIOD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Value for generating periodic events" ] # [ inline ( always ) ] pub fn period ( & self ) -> PERIOD_R { PERIOD_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Value for generating periodic events" ] # [ inline ( always ) ] pub fn period ( & mut self ) -> PERIOD_W { PERIOD_W { w : self } } } } # [ doc = "Timer Correction Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atcor](atcor) module" ] pub type ATCOR = crate :: Reg < u32 , _ATCOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATCOR ; # [ doc = "`read()` method returns [atcor::R](atcor::R) reader structure" ] impl crate :: Readable for ATCOR { } # [ doc = "`write(|w| ..)` method takes [atcor::W](atcor::W) writer structure" ] impl crate :: Writable for ATCOR { } # [ doc = "Timer Correction Register" ] pub mod atcor { # [ doc = "Reader of register ATCOR" ] pub type R = crate :: R < u32 , super :: ATCOR > ; # [ doc = "Writer for register ATCOR" ] pub type W = crate :: W < u32 , super :: ATCOR > ; # [ doc = "Register ATCOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ATCOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COR`" ] pub type COR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `COR`" ] pub struct COR_W < 'a > { w : & 'a mut W , } impl < 'a > COR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x7fff_ffff ) | ( ( value as u32 ) & 0x7fff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:30 - Correction Counter Wrap-Around Value" ] # [ inline ( always ) ] pub fn cor ( & self ) -> COR_R { COR_R :: new ( ( self . bits & 0x7fff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:30 - Correction Counter Wrap-Around Value" ] # [ inline ( always ) ] pub fn cor ( & mut self ) -> COR_W { COR_W { w : self } } } } # [ doc = "Time-Stamping Clock Period Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atinc](atinc) module" ] pub type ATINC = crate :: Reg < u32 , _ATINC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATINC ; # [ doc = "`read()` method returns [atinc::R](atinc::R) reader structure" ] impl crate :: Readable for ATINC { } # [ doc = "`write(|w| ..)` method takes [atinc::W](atinc::W) writer structure" ] impl crate :: Writable for ATINC { } # [ doc = "Time-Stamping Clock Period Register" ] pub mod atinc { # [ doc = "Reader of register ATINC" ] pub type R = crate :: R < u32 , super :: ATINC > ; # [ doc = "Writer for register ATINC" ] pub type W = crate :: W < u32 , super :: ATINC > ; # [ doc = "Register ATINC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ATINC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `INC`" ] pub type INC_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `INC`" ] pub struct INC_W < 'a > { w : & 'a mut W , } impl < 'a > INC_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 & ! 0x7f ) | ( ( value as u32 ) & 0x7f ) ; self . w } } # [ doc = "Reader of field `INC_CORR`" ] pub type INC_CORR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `INC_CORR`" ] pub struct INC_CORR_W < 'a > { w : & 'a mut W , } impl < 'a > INC_CORR_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 & ! ( 0x7f << 8 ) ) | ( ( ( value as u32 ) & 0x7f ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 0:6 - Clock Period Of The Timestamping Clock (ts_clk) In Nanoseconds" ] # [ inline ( always ) ] pub fn inc ( & self ) -> INC_R { INC_R :: new ( ( self . bits & 0x7f ) as u8 ) } # [ doc = "Bits 8:14 - Correction Increment Value" ] # [ inline ( always ) ] pub fn inc_corr ( & self ) -> INC_CORR_R { INC_CORR_R :: new ( ( ( self . bits >> 8 ) & 0x7f ) as u8 ) } } impl W { # [ doc = "Bits 0:6 - Clock Period Of The Timestamping Clock (ts_clk) In Nanoseconds" ] # [ inline ( always ) ] pub fn inc ( & mut self ) -> INC_W { INC_W { w : self } } # [ doc = "Bits 8:14 - Correction Increment Value" ] # [ inline ( always ) ] pub fn inc_corr ( & mut self ) -> INC_CORR_W { INC_CORR_W { w : self } } } } # [ doc = "Timestamp of Last Transmitted Frame\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [atstmp](atstmp) module" ] pub type ATSTMP = crate :: Reg < u32 , _ATSTMP > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ATSTMP ; # [ doc = "`read()` method returns [atstmp::R](atstmp::R) reader structure" ] impl crate :: Readable for ATSTMP { } # [ doc = "Timestamp of Last Transmitted Frame" ] pub mod atstmp { # [ doc = "Reader of register ATSTMP" ] pub type R = crate :: R < u32 , super :: ATSTMP > ; # [ doc = "Reader of field `TIMESTAMP`" ] pub type TIMESTAMP_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Timestamp of the last frame transmitted by the core that had TxBD\\[TS\\] set" ] # [ inline ( always ) ] pub fn timestamp ( & self ) -> TIMESTAMP_R { TIMESTAMP_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Timer Global Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tgsr](tgsr) module" ] pub type TGSR = crate :: Reg < u32 , _TGSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TGSR ; # [ doc = "`read()` method returns [tgsr::R](tgsr::R) reader structure" ] impl crate :: Readable for TGSR { } # [ doc = "`write(|w| ..)` method takes [tgsr::W](tgsr::W) writer structure" ] impl crate :: Writable for TGSR { } # [ doc = "Timer Global Status Register" ] pub mod tgsr { # [ doc = "Reader of register TGSR" ] pub type R = crate :: R < u32 , super :: TGSR > ; # [ doc = "Writer for register TGSR" ] pub type W = crate :: W < u32 , super :: TGSR > ; # [ doc = "Register TGSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TGSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Copy Of Timer Flag For Channel 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TF0_A { # [ doc = "0: Timer Flag for Channel 0 is clear" ] _0 , # [ doc = "1: Timer Flag for Channel 0 is set" ] _1 } impl From < TF0_A > for bool { # [ inline ( always ) ] fn from ( variant : TF0_A ) -> Self { match variant { TF0_A :: _0 => false , TF0_A :: _1 => true } } } # [ doc = "Reader of field `TF0`" ] pub type TF0_R = crate :: R < bool , TF0_A > ; impl TF0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TF0_A { match self . bits { false => TF0_A :: _0 , true => TF0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TF0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TF0_A :: _1 } } # [ doc = "Write proxy for field `TF0`" ] pub struct TF0_W < 'a > { w : & 'a mut W , } impl < 'a > TF0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TF0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer Flag for Channel 0 is clear" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TF0_A :: _0 ) } # [ doc = "Timer Flag for Channel 0 is set" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TF0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Copy Of Timer Flag For Channel 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TF1_A { # [ doc = "0: Timer Flag for Channel 1 is clear" ] _0 , # [ doc = "1: Timer Flag for Channel 1 is set" ] _1 } impl From < TF1_A > for bool { # [ inline ( always ) ] fn from ( variant : TF1_A ) -> Self { match variant { TF1_A :: _0 => false , TF1_A :: _1 => true } } } # [ doc = "Reader of field `TF1`" ] pub type TF1_R = crate :: R < bool , TF1_A > ; impl TF1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TF1_A { match self . bits { false => TF1_A :: _0 , true => TF1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TF1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TF1_A :: _1 } } # [ doc = "Write proxy for field `TF1`" ] pub struct TF1_W < 'a > { w : & 'a mut W , } impl < 'a > TF1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TF1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer Flag for Channel 1 is clear" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TF1_A :: _0 ) } # [ doc = "Timer Flag for Channel 1 is set" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TF1_A :: _1 ) } # [ 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 } } # [ doc = "Copy Of Timer Flag For Channel 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TF2_A { # [ doc = "0: Timer Flag for Channel 2 is clear" ] _0 , # [ doc = "1: Timer Flag for Channel 2 is set" ] _1 } impl From < TF2_A > for bool { # [ inline ( always ) ] fn from ( variant : TF2_A ) -> Self { match variant { TF2_A :: _0 => false , TF2_A :: _1 => true } } } # [ doc = "Reader of field `TF2`" ] pub type TF2_R = crate :: R < bool , TF2_A > ; impl TF2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TF2_A { match self . bits { false => TF2_A :: _0 , true => TF2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TF2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TF2_A :: _1 } } # [ doc = "Write proxy for field `TF2`" ] pub struct TF2_W < 'a > { w : & 'a mut W , } impl < 'a > TF2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TF2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer Flag for Channel 2 is clear" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TF2_A :: _0 ) } # [ doc = "Timer Flag for Channel 2 is set" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TF2_A :: _1 ) } # [ 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 = "Copy Of Timer Flag For Channel 3\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TF3_A { # [ doc = "0: Timer Flag for Channel 3 is clear" ] _0 , # [ doc = "1: Timer Flag for Channel 3 is set" ] _1 } impl From < TF3_A > for bool { # [ inline ( always ) ] fn from ( variant : TF3_A ) -> Self { match variant { TF3_A :: _0 => false , TF3_A :: _1 => true } } } # [ doc = "Reader of field `TF3`" ] pub type TF3_R = crate :: R < bool , TF3_A > ; impl TF3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TF3_A { match self . bits { false => TF3_A :: _0 , true => TF3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TF3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TF3_A :: _1 } } # [ doc = "Write proxy for field `TF3`" ] pub struct TF3_W < 'a > { w : & 'a mut W , } impl < 'a > TF3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TF3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Timer Flag for Channel 3 is clear" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TF3_A :: _0 ) } # [ doc = "Timer Flag for Channel 3 is set" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TF3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Copy Of Timer Flag For Channel 0" ] # [ inline ( always ) ] pub fn tf0 ( & self ) -> TF0_R { TF0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Copy Of Timer Flag For Channel 1" ] # [ inline ( always ) ] pub fn tf1 ( & self ) -> TF1_R { TF1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Copy Of Timer Flag For Channel 2" ] # [ inline ( always ) ] pub fn tf2 ( & self ) -> TF2_R { TF2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Copy Of Timer Flag For Channel 3" ] # [ inline ( always ) ] pub fn tf3 ( & self ) -> TF3_R { TF3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Copy Of Timer Flag For Channel 0" ] # [ inline ( always ) ] pub fn tf0 ( & mut self ) -> TF0_W { TF0_W { w : self } } # [ doc = "Bit 1 - Copy Of Timer Flag For Channel 1" ] # [ inline ( always ) ] pub fn tf1 ( & mut self ) -> TF1_W { TF1_W { w : self } } # [ doc = "Bit 2 - Copy Of Timer Flag For Channel 2" ] # [ inline ( always ) ] pub fn tf2 ( & mut self ) -> TF2_W { TF2_W { w : self } } # [ doc = "Bit 3 - Copy Of Timer Flag For Channel 3" ] # [ inline ( always ) ] pub fn tf3 ( & mut self ) -> TF3_W { TF3_W { w : self } } } } # [ doc = "Timer Control Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcsr](tcsr) module" ] pub type TCSR = crate :: Reg < u32 , _TCSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCSR ; # [ doc = "`read()` method returns [tcsr::R](tcsr::R) reader structure" ] impl crate :: Readable for TCSR { } # [ doc = "`write(|w| ..)` method takes [tcsr::W](tcsr::W) writer structure" ] impl crate :: Writable for TCSR { } # [ doc = "Timer Control Status Register" ] pub mod tcsr { # [ doc = "Reader of register TCSR%s" ] pub type R = crate :: R < u32 , super :: TCSR > ; # [ doc = "Writer for register TCSR%s" ] pub type W = crate :: W < u32 , super :: TCSR > ; # [ doc = "Register TCSR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Timer DMA Request Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDRE_A { # [ doc = "0: DMA request is disabled" ] _0 , # [ doc = "1: DMA request is enabled" ] _1 } impl From < TDRE_A > for bool { # [ inline ( always ) ] fn from ( variant : TDRE_A ) -> Self { match variant { TDRE_A :: _0 => false , TDRE_A :: _1 => true } } } # [ doc = "Reader of field `TDRE`" ] pub type TDRE_R = crate :: R < bool , TDRE_A > ; impl TDRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDRE_A { match self . bits { false => TDRE_A :: _0 , true => TDRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDRE_A :: _1 } } # [ doc = "Write proxy for field `TDRE`" ] pub struct TDRE_W < 'a > { w : & 'a mut W , } impl < 'a > TDRE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TDRE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA request is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TDRE_A :: _0 ) } # [ doc = "DMA request is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TDRE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Timer Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TMODE_A { # [ doc = "0: Timer Channel is disabled." ] _0000 , # [ doc = "1: Timer Channel is configured for Input Capture on rising edge." ] _0001 , # [ doc = "2: Timer Channel is configured for Input Capture on falling edge." ] _0010 , # [ doc = "3: Timer Channel is configured for Input Capture on both edges." ] _0011 , # [ doc = "4: Timer Channel is configured for Output Compare - software only." ] _0100 , # [ doc = "5: Timer Channel is configured for Output Compare - toggle output on compare." ] _0101 , # [ doc = "6: Timer Channel is configured for Output Compare - clear output on compare." ] _0110 , # [ doc = "7: Timer Channel is configured for Output Compare - set output on compare." ] _0111 , # [ doc = "10: Timer Channel is configured for Output Compare - clear output on compare, set output on overflow." ] _1010 , # [ doc = "14: Timer Channel is configured for Output Compare - pulse output low on compare for one 1588-clock cycle." ] _1110 , # [ doc = "15: Timer Channel is configured for Output Compare - pulse output high on compare for one 1588-clock cycle." ] _1111 } impl From < TMODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : TMODE_A ) -> Self { match variant { TMODE_A :: _0000 => 0 , TMODE_A :: _0001 => 1 , TMODE_A :: _0010 => 2 , TMODE_A :: _0011 => 3 , TMODE_A :: _0100 => 4 , TMODE_A :: _0101 => 5 , TMODE_A :: _0110 => 6 , TMODE_A :: _0111 => 7 , TMODE_A :: _1010 => 10 , TMODE_A :: _1110 => 14 , TMODE_A :: _1111 => 15 } } } # [ doc = "Reader of field `TMODE`" ] pub type TMODE_R = crate :: R < u8 , TMODE_A > ; impl TMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TMODE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( TMODE_A :: _0000 ) , 1 => Val ( TMODE_A :: _0001 ) , 2 => Val ( TMODE_A :: _0010 ) , 3 => Val ( TMODE_A :: _0011 ) , 4 => Val ( TMODE_A :: _0100 ) , 5 => Val ( TMODE_A :: _0101 ) , 6 => Val ( TMODE_A :: _0110 ) , 7 => Val ( TMODE_A :: _0111 ) , 10 => Val ( TMODE_A :: _1010 ) , 14 => Val ( TMODE_A :: _1110 ) , 15 => Val ( TMODE_A :: _1111 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0000`" ] # [ inline ( always ) ] pub fn is_0000 ( & self ) -> bool { * self == TMODE_A :: _0000 } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == TMODE_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == TMODE_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == TMODE_A :: _0011 } # [ doc = "Checks if the value of the field is `_0100`" ] # [ inline ( always ) ] pub fn is_0100 ( & self ) -> bool { * self == TMODE_A :: _0100 } # [ doc = "Checks if the value of the field is `_0101`" ] # [ inline ( always ) ] pub fn is_0101 ( & self ) -> bool { * self == TMODE_A :: _0101 } # [ doc = "Checks if the value of the field is `_0110`" ] # [ inline ( always ) ] pub fn is_0110 ( & self ) -> bool { * self == TMODE_A :: _0110 } # [ doc = "Checks if the value of the field is `_0111`" ] # [ inline ( always ) ] pub fn is_0111 ( & self ) -> bool { * self == TMODE_A :: _0111 } # [ doc = "Checks if the value of the field is `_1010`" ] # [ inline ( always ) ] pub fn is_1010 ( & self ) -> bool { * self == TMODE_A :: _1010 } # [ doc = "Checks if the value of the field is `_1110`" ] # [ inline ( always ) ] pub fn is_1110 ( & self ) -> bool { * self == TMODE_A :: _1110 } # [ doc = "Checks if the value of the field is `_1111`" ] # [ inline ( always ) ] pub fn is_1111 ( & self ) -> bool { * self == TMODE_A :: _1111 } } # [ doc = "Write proxy for field `TMODE`" ] pub struct TMODE_W < 'a > { w : & 'a mut W , } impl < 'a > TMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TMODE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Timer Channel is disabled." ] # [ inline ( always ) ] pub fn _0000 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _0000 ) } # [ doc = "Timer Channel is configured for Input Capture on rising edge." ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _0001 ) } # [ doc = "Timer Channel is configured for Input Capture on falling edge." ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _0010 ) } # [ doc = "Timer Channel is configured for Input Capture on both edges." ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _0011 ) } # [ doc = "Timer Channel is configured for Output Compare - software only." ] # [ inline ( always ) ] pub fn _0100 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _0100 ) } # [ doc = "Timer Channel is configured for Output Compare - toggle output on compare." ] # [ inline ( always ) ] pub fn _0101 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _0101 ) } # [ doc = "Timer Channel is configured for Output Compare - clear output on compare." ] # [ inline ( always ) ] pub fn _0110 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _0110 ) } # [ doc = "Timer Channel is configured for Output Compare - set output on compare." ] # [ inline ( always ) ] pub fn _0111 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _0111 ) } # [ doc = "Timer Channel is configured for Output Compare - clear output on compare, set output on overflow." ] # [ inline ( always ) ] pub fn _1010 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _1010 ) } # [ doc = "Timer Channel is configured for Output Compare - pulse output low on compare for one 1588-clock cycle." ] # [ inline ( always ) ] pub fn _1110 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _1110 ) } # [ doc = "Timer Channel is configured for Output Compare - pulse output high on compare for one 1588-clock cycle." ] # [ inline ( always ) ] pub fn _1111 ( self ) -> & 'a mut W { self . variant ( TMODE_A :: _1111 ) } # [ 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 & ! ( 0x0f << 2 ) ) | ( ( ( value as u32 ) & 0x0f ) << 2 ) ; self . w } } # [ doc = "Timer Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: Interrupt is disabled" ] _0 , # [ doc = "1: Interrupt is enabled" ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Interrupt is disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "Interrupt is enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 = "Timer Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TF_A { # [ doc = "0: Input Capture or Output Compare has not occurred." ] _0 , # [ doc = "1: Input Capture or Output Compare has occurred." ] _1 } impl From < TF_A > for bool { # [ inline ( always ) ] fn from ( variant : TF_A ) -> Self { match variant { TF_A :: _0 => false , TF_A :: _1 => true } } } # [ doc = "Reader of field `TF`" ] pub type TF_R = crate :: R < bool , TF_A > ; impl TF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TF_A { match self . bits { false => TF_A :: _0 , true => TF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TF_A :: _1 } } # [ doc = "Write proxy for field `TF`" ] pub struct TF_W < 'a > { w : & 'a mut W , } impl < 'a > TF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Input Capture or Output Compare has not occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TF_A :: _0 ) } # [ doc = "Input Capture or Output Compare has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Timer DMA Request Enable" ] # [ inline ( always ) ] pub fn tdre ( & self ) -> TDRE_R { TDRE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 2:5 - Timer Mode" ] # [ inline ( always ) ] pub fn tmode ( & self ) -> TMODE_R { TMODE_R :: new ( ( ( self . bits >> 2 ) & 0x0f ) as u8 ) } # [ doc = "Bit 6 - Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Timer Flag" ] # [ inline ( always ) ] pub fn tf ( & self ) -> TF_R { TF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Timer DMA Request Enable" ] # [ inline ( always ) ] pub fn tdre ( & mut self ) -> TDRE_W { TDRE_W { w : self } } # [ doc = "Bits 2:5 - Timer Mode" ] # [ inline ( always ) ] pub fn tmode ( & mut self ) -> TMODE_W { TMODE_W { w : self } } # [ doc = "Bit 6 - Timer Interrupt Enable" ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } # [ doc = "Bit 7 - Timer Flag" ] # [ inline ( always ) ] pub fn tf ( & mut self ) -> TF_W { TF_W { w : self } } } } # [ doc = "Timer Compare Capture Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tccr](tccr) module" ] pub type TCCR = crate :: Reg < u32 , _TCCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _TCCR ; # [ doc = "`read()` method returns [tccr::R](tccr::R) reader structure" ] impl crate :: Readable for TCCR { } # [ doc = "`write(|w| ..)` method takes [tccr::W](tccr::W) writer structure" ] impl crate :: Writable for TCCR { } # [ doc = "Timer Compare Capture Register" ] pub mod tccr { # [ doc = "Reader of register TCCR%s" ] pub type R = crate :: R < u32 , super :: TCCR > ; # [ doc = "Writer for register TCCR%s" ] pub type W = crate :: W < u32 , super :: TCCR > ; # [ doc = "Register TCCR%s `reset()`'s with value 0" ] impl crate :: ResetValue for super :: TCCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TCC`" ] pub type TCC_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `TCC`" ] pub struct TCC_W < 'a > { w : & 'a mut W , } impl < 'a > TCC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Timer Capture Compare" ] # [ inline ( always ) ] pub fn tcc ( & self ) -> TCC_R { TCC_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Timer Capture Compare" ] # [ inline ( always ) ] pub fn tcc ( & mut self ) -> TCC_W { TCC_W { w : self } } } } } # [ doc = "Universal Asynchronous Receiver/Transmitter" ] pub struct LPUART0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for LPUART0 { } impl LPUART0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const lpuart0 :: RegisterBlock { 0x400c_4000 as * const _ } } impl Deref for LPUART0 { type Target = lpuart0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * LPUART0 :: ptr ( ) } } } # [ doc = "Universal Asynchronous Receiver/Transmitter" ] pub mod lpuart0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - LPUART Baud Rate Register" ] pub baud : BAUD , # [ doc = "0x04 - LPUART Status Register" ] pub stat : STAT , # [ doc = "0x08 - LPUART Control Register" ] pub ctrl : CTRL , # [ doc = "0x0c - LPUART Data Register" ] pub data : DATA , # [ doc = "0x10 - LPUART Match Address Register" ] pub match_ : MATCH , # [ doc = "0x14 - LPUART Modem IrDA Register" ] pub modir : MODIR , } # [ doc = "LPUART Baud Rate Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [baud](baud) module" ] pub type BAUD = crate :: Reg < u32 , _BAUD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BAUD ; # [ doc = "`read()` method returns [baud::R](baud::R) reader structure" ] impl crate :: Readable for BAUD { } # [ doc = "`write(|w| ..)` method takes [baud::W](baud::W) writer structure" ] impl crate :: Writable for BAUD { } # [ doc = "LPUART Baud Rate Register" ] pub mod baud { # [ doc = "Reader of register BAUD" ] pub type R = crate :: R < u32 , super :: BAUD > ; # [ doc = "Writer for register BAUD" ] pub type W = crate :: W < u32 , super :: BAUD > ; # [ doc = "Register BAUD `reset()`'s with value 0x0f00_0004" ] impl crate :: ResetValue for super :: BAUD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0f00_0004 } } # [ doc = "Reader of field `SBR`" ] pub type SBR_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `SBR`" ] pub struct SBR_W < 'a > { w : & 'a mut W , } impl < 'a > SBR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x1fff ) | ( ( value as u32 ) & 0x1fff ) ; self . w } } # [ doc = "Stop Bit Number Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBNS_A { # [ doc = "0: One stop bit." ] _0 , # [ doc = "1: Two stop bits." ] _1 } impl From < SBNS_A > for bool { # [ inline ( always ) ] fn from ( variant : SBNS_A ) -> Self { match variant { SBNS_A :: _0 => false , SBNS_A :: _1 => true } } } # [ doc = "Reader of field `SBNS`" ] pub type SBNS_R = crate :: R < bool , SBNS_A > ; impl SBNS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBNS_A { match self . bits { false => SBNS_A :: _0 , true => SBNS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBNS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBNS_A :: _1 } } # [ doc = "Write proxy for field `SBNS`" ] pub struct SBNS_W < 'a > { w : & 'a mut W , } impl < 'a > SBNS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBNS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "One stop bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _0 ) } # [ doc = "Two stop bits." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBNS_A :: _1 ) } # [ 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 = "RX Input Active Edge Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIE_A { # [ doc = "0: Hardware interrupts from LPUART_STAT\\[RXEDGIF\\] disabled (use polling)." ] _0 , # [ doc = "1: Hardware interrupt requested when LPUART_STAT\\[RXEDGIF\\] flag is 1." ] _1 } impl From < RXEDGIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIE_A ) -> Self { match variant { RXEDGIE_A :: _0 => false , RXEDGIE_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIE`" ] pub type RXEDGIE_R = crate :: R < bool , RXEDGIE_A > ; impl RXEDGIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIE_A { match self . bits { false => RXEDGIE_A :: _0 , true => RXEDGIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIE_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIE`" ] pub struct RXEDGIE_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from LPUART_STAT\\[RXEDGIF\\] disabled (use polling)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when LPUART_STAT\\[RXEDGIF\\] flag is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIE_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIE_A { # [ doc = "0: Hardware interrupts from LPUART_STAT\\[LBKDIF\\] disabled (use polling)." ] _0 , # [ doc = "1: Hardware interrupt requested when LPUART_STAT\\[LBKDIF\\] flag is 1." ] _1 } impl From < LBKDIE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIE_A ) -> Self { match variant { LBKDIE_A :: _0 => false , LBKDIE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIE`" ] pub type LBKDIE_R = crate :: R < bool , LBKDIE_A > ; impl LBKDIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIE_A { match self . bits { false => LBKDIE_A :: _0 , true => LBKDIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIE_A :: _1 } } # [ doc = "Write proxy for field `LBKDIE`" ] pub struct LBKDIE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from LPUART_STAT\\[LBKDIF\\] disabled (use polling)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when LPUART_STAT\\[LBKDIF\\] flag is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIE_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Resynchronization Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESYNCDIS_A { # [ doc = "0: Resynchronization during received data word is supported" ] _0 , # [ doc = "1: Resynchronization during received data word is disabled" ] _1 } impl From < RESYNCDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : RESYNCDIS_A ) -> Self { match variant { RESYNCDIS_A :: _0 => false , RESYNCDIS_A :: _1 => true } } } # [ doc = "Reader of field `RESYNCDIS`" ] pub type RESYNCDIS_R = crate :: R < bool , RESYNCDIS_A > ; impl RESYNCDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RESYNCDIS_A { match self . bits { false => RESYNCDIS_A :: _0 , true => RESYNCDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RESYNCDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RESYNCDIS_A :: _1 } } # [ doc = "Write proxy for field `RESYNCDIS`" ] pub struct RESYNCDIS_W < 'a > { w : & 'a mut W , } impl < 'a > RESYNCDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RESYNCDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Resynchronization during received data word is supported" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RESYNCDIS_A :: _0 ) } # [ doc = "Resynchronization during received data word is disabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RESYNCDIS_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Both Edge Sampling\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BOTHEDGE_A { # [ doc = "0: Receiver samples input data using the rising edge of the baud rate clock." ] _0 , # [ doc = "1: Receiver samples input data using the rising and falling edge of the baud rate clock." ] _1 } impl From < BOTHEDGE_A > for bool { # [ inline ( always ) ] fn from ( variant : BOTHEDGE_A ) -> Self { match variant { BOTHEDGE_A :: _0 => false , BOTHEDGE_A :: _1 => true } } } # [ doc = "Reader of field `BOTHEDGE`" ] pub type BOTHEDGE_R = crate :: R < bool , BOTHEDGE_A > ; impl BOTHEDGE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BOTHEDGE_A { match self . bits { false => BOTHEDGE_A :: _0 , true => BOTHEDGE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BOTHEDGE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BOTHEDGE_A :: _1 } } # [ doc = "Write proxy for field `BOTHEDGE`" ] pub struct BOTHEDGE_W < 'a > { w : & 'a mut W , } impl < 'a > BOTHEDGE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BOTHEDGE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver samples input data using the rising edge of the baud rate clock." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BOTHEDGE_A :: _0 ) } # [ doc = "Receiver samples input data using the rising and falling edge of the baud rate clock." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BOTHEDGE_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Match Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MATCFG_A { # [ doc = "0: Address Match Wakeup" ] _00 , # [ doc = "1: Idle Match Wakeup" ] _01 , # [ doc = "2: Match On and Match Off" ] _10 , # [ doc = "3: Enables RWU on Data Match and Match On/Off for transmitter CTS input" ] _11 } impl From < MATCFG_A > for u8 { # [ inline ( always ) ] fn from ( variant : MATCFG_A ) -> Self { match variant { MATCFG_A :: _00 => 0 , MATCFG_A :: _01 => 1 , MATCFG_A :: _10 => 2 , MATCFG_A :: _11 => 3 } } } # [ doc = "Reader of field `MATCFG`" ] pub type MATCFG_R = crate :: R < u8 , MATCFG_A > ; impl MATCFG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MATCFG_A { match self . bits { 0 => MATCFG_A :: _00 , 1 => MATCFG_A :: _01 , 2 => MATCFG_A :: _10 , 3 => MATCFG_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == MATCFG_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == MATCFG_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == MATCFG_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == MATCFG_A :: _11 } } # [ doc = "Write proxy for field `MATCFG`" ] pub struct MATCFG_W < 'a > { w : & 'a mut W , } impl < 'a > MATCFG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MATCFG_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Address Match Wakeup" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( MATCFG_A :: _00 ) } # [ doc = "Idle Match Wakeup" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( MATCFG_A :: _01 ) } # [ doc = "Match On and Match Off" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( MATCFG_A :: _10 ) } # [ doc = "Enables RWU on Data Match and Match On/Off for transmitter CTS input" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( MATCFG_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "Receiver Full DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDMAE_A { # [ doc = "0: DMA request disabled." ] _0 , # [ doc = "1: DMA request enabled." ] _1 } impl From < RDMAE_A > for bool { # [ inline ( always ) ] fn from ( variant : RDMAE_A ) -> Self { match variant { RDMAE_A :: _0 => false , RDMAE_A :: _1 => true } } } # [ doc = "Reader of field `RDMAE`" ] pub type RDMAE_R = crate :: R < bool , RDMAE_A > ; impl RDMAE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDMAE_A { match self . bits { false => RDMAE_A :: _0 , true => RDMAE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDMAE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDMAE_A :: _1 } } # [ doc = "Write proxy for field `RDMAE`" ] pub struct RDMAE_W < 'a > { w : & 'a mut W , } impl < 'a > RDMAE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RDMAE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA request disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RDMAE_A :: _0 ) } # [ doc = "DMA request enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RDMAE_A :: _1 ) } # [ 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 = "Transmitter DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDMAE_A { # [ doc = "0: DMA request disabled." ] _0 , # [ doc = "1: DMA request enabled." ] _1 } impl From < TDMAE_A > for bool { # [ inline ( always ) ] fn from ( variant : TDMAE_A ) -> Self { match variant { TDMAE_A :: _0 => false , TDMAE_A :: _1 => true } } } # [ doc = "Reader of field `TDMAE`" ] pub type TDMAE_R = crate :: R < bool , TDMAE_A > ; impl TDMAE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDMAE_A { match self . bits { false => TDMAE_A :: _0 , true => TDMAE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDMAE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDMAE_A :: _1 } } # [ doc = "Write proxy for field `TDMAE`" ] pub struct TDMAE_W < 'a > { w : & 'a mut W , } impl < 'a > TDMAE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TDMAE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA request disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TDMAE_A :: _0 ) } # [ doc = "DMA request enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TDMAE_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Reader of field `OSR`" ] pub type OSR_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `OSR`" ] pub struct OSR_W < 'a > { w : & 'a mut W , } impl < 'a > OSR_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 & ! ( 0x1f << 24 ) ) | ( ( ( value as u32 ) & 0x1f ) << 24 ) ; self . w } } # [ doc = "10-bit Mode select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M10_A { # [ doc = "0: Receiver and transmitter use 8-bit or 9-bit data characters." ] _0 , # [ doc = "1: Receiver and transmitter use 10-bit data characters." ] _1 } impl From < M10_A > for bool { # [ inline ( always ) ] fn from ( variant : M10_A ) -> Self { match variant { M10_A :: _0 => false , M10_A :: _1 => true } } } # [ doc = "Reader of field `M10`" ] pub type M10_R = crate :: R < bool , M10_A > ; impl M10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M10_A { match self . bits { false => M10_A :: _0 , true => M10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M10_A :: _1 } } # [ doc = "Write proxy for field `M10`" ] pub struct M10_W < 'a > { w : & 'a mut W , } impl < 'a > M10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver and transmitter use 8-bit or 9-bit data characters." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M10_A :: _0 ) } # [ doc = "Receiver and transmitter use 10-bit data characters." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M10_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Match Address Mode Enable 2\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN2_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Enables automatic address matching or data matching mode for MATCH\\[MA2\\]." ] _1 } impl From < MAEN2_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN2_A ) -> Self { match variant { MAEN2_A :: _0 => false , MAEN2_A :: _1 => true } } } # [ doc = "Reader of field `MAEN2`" ] pub type MAEN2_R = crate :: R < bool , MAEN2_A > ; impl MAEN2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN2_A { match self . bits { false => MAEN2_A :: _0 , true => MAEN2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN2_A :: _1 } } # [ doc = "Write proxy for field `MAEN2`" ] pub struct MAEN2_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _0 ) } # [ doc = "Enables automatic address matching or data matching mode for MATCH\\[MA2\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN2_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Match Address Mode Enable 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAEN1_A { # [ doc = "0: Normal operation." ] _0 , # [ doc = "1: Enables automatic address matching or data matching mode for MATCH\\[MA1\\]." ] _1 } impl From < MAEN1_A > for bool { # [ inline ( always ) ] fn from ( variant : MAEN1_A ) -> Self { match variant { MAEN1_A :: _0 => false , MAEN1_A :: _1 => true } } } # [ doc = "Reader of field `MAEN1`" ] pub type MAEN1_R = crate :: R < bool , MAEN1_A > ; impl MAEN1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MAEN1_A { match self . bits { false => MAEN1_A :: _0 , true => MAEN1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MAEN1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MAEN1_A :: _1 } } # [ doc = "Write proxy for field `MAEN1`" ] pub struct MAEN1_W < 'a > { w : & 'a mut W , } impl < 'a > MAEN1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MAEN1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _0 ) } # [ doc = "Enables automatic address matching or data matching mode for MATCH\\[MA1\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MAEN1_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:12 - Baud Rate Modulo Divisor." ] # [ inline ( always ) ] pub fn sbr ( & self ) -> SBR_R { SBR_R :: new ( ( self . bits & 0x1fff ) as u16 ) } # [ doc = "Bit 13 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & self ) -> SBNS_R { SBNS_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - RX Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & self ) -> RXEDGIE_R { RXEDGIE_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & self ) -> LBKDIE_R { LBKDIE_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Resynchronization Disable" ] # [ inline ( always ) ] pub fn resyncdis ( & self ) -> RESYNCDIS_R { RESYNCDIS_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Both Edge Sampling" ] # [ inline ( always ) ] pub fn bothedge ( & self ) -> BOTHEDGE_R { BOTHEDGE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bits 18:19 - Match Configuration" ] # [ inline ( always ) ] pub fn matcfg ( & self ) -> MATCFG_R { MATCFG_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bit 21 - Receiver Full DMA Enable" ] # [ inline ( always ) ] pub fn rdmae ( & self ) -> RDMAE_R { RDMAE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Transmitter DMA Enable" ] # [ inline ( always ) ] pub fn tdmae ( & self ) -> TDMAE_R { TDMAE_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:28 - Over Sampling Ratio" ] # [ inline ( always ) ] pub fn osr ( & self ) -> OSR_R { OSR_R :: new ( ( ( self . bits >> 24 ) & 0x1f ) as u8 ) } # [ doc = "Bit 29 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & self ) -> M10_R { M10_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & self ) -> MAEN2_R { MAEN2_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & self ) -> MAEN1_R { MAEN1_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:12 - Baud Rate Modulo Divisor." ] # [ inline ( always ) ] pub fn sbr ( & mut self ) -> SBR_W { SBR_W { w : self } } # [ doc = "Bit 13 - Stop Bit Number Select" ] # [ inline ( always ) ] pub fn sbns ( & mut self ) -> SBNS_W { SBNS_W { w : self } } # [ doc = "Bit 14 - RX Input Active Edge Interrupt Enable" ] # [ inline ( always ) ] pub fn rxedgie ( & mut self ) -> RXEDGIE_W { RXEDGIE_W { w : self } } # [ doc = "Bit 15 - LIN Break Detect Interrupt Enable" ] # [ inline ( always ) ] pub fn lbkdie ( & mut self ) -> LBKDIE_W { LBKDIE_W { w : self } } # [ doc = "Bit 16 - Resynchronization Disable" ] # [ inline ( always ) ] pub fn resyncdis ( & mut self ) -> RESYNCDIS_W { RESYNCDIS_W { w : self } } # [ doc = "Bit 17 - Both Edge Sampling" ] # [ inline ( always ) ] pub fn bothedge ( & mut self ) -> BOTHEDGE_W { BOTHEDGE_W { w : self } } # [ doc = "Bits 18:19 - Match Configuration" ] # [ inline ( always ) ] pub fn matcfg ( & mut self ) -> MATCFG_W { MATCFG_W { w : self } } # [ doc = "Bit 21 - Receiver Full DMA Enable" ] # [ inline ( always ) ] pub fn rdmae ( & mut self ) -> RDMAE_W { RDMAE_W { w : self } } # [ doc = "Bit 23 - Transmitter DMA Enable" ] # [ inline ( always ) ] pub fn tdmae ( & mut self ) -> TDMAE_W { TDMAE_W { w : self } } # [ doc = "Bits 24:28 - Over Sampling Ratio" ] # [ inline ( always ) ] pub fn osr ( & mut self ) -> OSR_W { OSR_W { w : self } } # [ doc = "Bit 29 - 10-bit Mode select" ] # [ inline ( always ) ] pub fn m10 ( & mut self ) -> M10_W { M10_W { w : self } } # [ doc = "Bit 30 - Match Address Mode Enable 2" ] # [ inline ( always ) ] pub fn maen2 ( & mut self ) -> MAEN2_W { MAEN2_W { w : self } } # [ doc = "Bit 31 - Match Address Mode Enable 1" ] # [ inline ( always ) ] pub fn maen1 ( & mut self ) -> MAEN1_W { MAEN1_W { w : self } } } } # [ doc = "LPUART Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module" ] pub type STAT = crate :: Reg < u32 , _STAT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STAT ; # [ doc = "`read()` method returns [stat::R](stat::R) reader structure" ] impl crate :: Readable for STAT { } # [ doc = "`write(|w| ..)` method takes [stat::W](stat::W) writer structure" ] impl crate :: Writable for STAT { } # [ doc = "LPUART Status Register" ] pub mod stat { # [ doc = "Reader of register STAT" ] pub type R = crate :: R < u32 , super :: STAT > ; # [ doc = "Writer for register STAT" ] pub type W = crate :: W < u32 , super :: STAT > ; # [ doc = "Register STAT `reset()`'s with value 0x00c0_0000" ] impl crate :: ResetValue for super :: STAT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x00c0_0000 } } # [ doc = "Match 2 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MA2F_A { # [ doc = "0: Received data is not equal to MA2" ] _0 , # [ doc = "1: Received data is equal to MA2" ] _1 } impl From < MA2F_A > for bool { # [ inline ( always ) ] fn from ( variant : MA2F_A ) -> Self { match variant { MA2F_A :: _0 => false , MA2F_A :: _1 => true } } } # [ doc = "Reader of field `MA2F`" ] pub type MA2F_R = crate :: R < bool , MA2F_A > ; impl MA2F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MA2F_A { match self . bits { false => MA2F_A :: _0 , true => MA2F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MA2F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MA2F_A :: _1 } } # [ doc = "Write proxy for field `MA2F`" ] pub struct MA2F_W < 'a > { w : & 'a mut W , } impl < 'a > MA2F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MA2F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Received data is not equal to MA2" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MA2F_A :: _0 ) } # [ doc = "Received data is equal to MA2" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MA2F_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Match 1 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MA1F_A { # [ doc = "0: Received data is not equal to MA1" ] _0 , # [ doc = "1: Received data is equal to MA1" ] _1 } impl From < MA1F_A > for bool { # [ inline ( always ) ] fn from ( variant : MA1F_A ) -> Self { match variant { MA1F_A :: _0 => false , MA1F_A :: _1 => true } } } # [ doc = "Reader of field `MA1F`" ] pub type MA1F_R = crate :: R < bool , MA1F_A > ; impl MA1F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MA1F_A { match self . bits { false => MA1F_A :: _0 , true => MA1F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MA1F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MA1F_A :: _1 } } # [ doc = "Write proxy for field `MA1F`" ] pub struct MA1F_W < 'a > { w : & 'a mut W , } impl < 'a > MA1F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MA1F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Received data is not equal to MA1" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MA1F_A :: _0 ) } # [ doc = "Received data is equal to MA1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MA1F_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Parity Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PF_A { # [ doc = "0: No parity error." ] _0 , # [ doc = "1: Parity error." ] _1 } impl From < PF_A > for bool { # [ inline ( always ) ] fn from ( variant : PF_A ) -> Self { match variant { PF_A :: _0 => false , PF_A :: _1 => true } } } # [ doc = "Reader of field `PF`" ] pub type PF_R = crate :: R < bool , PF_A > ; impl PF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PF_A { match self . bits { false => PF_A :: _0 , true => PF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PF_A :: _1 } } # [ doc = "Write proxy for field `PF`" ] pub struct PF_W < 'a > { w : & 'a mut W , } impl < 'a > PF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No parity error." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PF_A :: _0 ) } # [ doc = "Parity error." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PF_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Framing Error Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FE_A { # [ doc = "0: No framing error detected. This does not guarantee the framing is correct." ] _0 , # [ doc = "1: Framing error." ] _1 } impl From < FE_A > for bool { # [ inline ( always ) ] fn from ( variant : FE_A ) -> Self { match variant { FE_A :: _0 => false , FE_A :: _1 => true } } } # [ doc = "Reader of field `FE`" ] pub type FE_R = crate :: R < bool , FE_A > ; impl FE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FE_A { match self . bits { false => FE_A :: _0 , true => FE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FE_A :: _1 } } # [ doc = "Write proxy for field `FE`" ] pub struct FE_W < 'a > { w : & 'a mut W , } impl < 'a > FE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No framing error detected. This does not guarantee the framing is correct." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FE_A :: _0 ) } # [ doc = "Framing error." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FE_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Noise Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NF_A { # [ doc = "0: No noise detected." ] _0 , # [ doc = "1: Noise detected in the received character in LPUART_DATA." ] _1 } impl From < NF_A > for bool { # [ inline ( always ) ] fn from ( variant : NF_A ) -> Self { match variant { NF_A :: _0 => false , NF_A :: _1 => true } } } # [ doc = "Reader of field `NF`" ] pub type NF_R = crate :: R < bool , NF_A > ; impl NF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NF_A { match self . bits { false => NF_A :: _0 , true => NF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NF_A :: _1 } } # [ doc = "Write proxy for field `NF`" ] pub struct NF_W < 'a > { w : & 'a mut W , } impl < 'a > NF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No noise detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NF_A :: _0 ) } # [ doc = "Noise detected in the received character in LPUART_DATA." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NF_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Receiver Overrun Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OR_A { # [ doc = "0: No overrun." ] _0 , # [ doc = "1: Receive overrun (new LPUART data lost)." ] _1 } impl From < OR_A > for bool { # [ inline ( always ) ] fn from ( variant : OR_A ) -> Self { match variant { OR_A :: _0 => false , OR_A :: _1 => true } } } # [ doc = "Reader of field `OR`" ] pub type OR_R = crate :: R < bool , OR_A > ; impl OR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> OR_A { match self . bits { false => OR_A :: _0 , true => OR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == OR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == OR_A :: _1 } } # [ doc = "Write proxy for field `OR`" ] pub struct OR_W < 'a > { w : & 'a mut W , } impl < 'a > OR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : OR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No overrun." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( OR_A :: _0 ) } # [ doc = "Receive overrun (new LPUART data lost)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( OR_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Idle Line Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLE_A { # [ doc = "0: No idle line detected." ] _0 , # [ doc = "1: Idle line was detected." ] _1 } impl From < IDLE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLE_A ) -> Self { match variant { IDLE_A :: _0 => false , IDLE_A :: _1 => true } } } # [ doc = "Reader of field `IDLE`" ] pub type IDLE_R = crate :: R < bool , IDLE_A > ; impl IDLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLE_A { match self . bits { false => IDLE_A :: _0 , true => IDLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLE_A :: _1 } } # [ doc = "Write proxy for field `IDLE`" ] pub struct IDLE_W < 'a > { w : & 'a mut W , } impl < 'a > IDLE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IDLE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No idle line detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IDLE_A :: _0 ) } # [ doc = "Idle line was detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IDLE_A :: _1 ) } # [ 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 = "Receive Data Register Full Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RDRF_A { # [ doc = "0: Receive data buffer empty." ] _0 , # [ doc = "1: Receive data buffer full." ] _1 } impl From < RDRF_A > for bool { # [ inline ( always ) ] fn from ( variant : RDRF_A ) -> Self { match variant { RDRF_A :: _0 => false , RDRF_A :: _1 => true } } } # [ doc = "Reader of field `RDRF`" ] pub type RDRF_R = crate :: R < bool , RDRF_A > ; impl RDRF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RDRF_A { match self . bits { false => RDRF_A :: _0 , true => RDRF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RDRF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RDRF_A :: _1 } } # [ doc = "Transmission Complete Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TC_A { # [ doc = "0: Transmitter active (sending data, a preamble, or a break)." ] _0 , # [ doc = "1: Transmitter idle (transmission activity complete)." ] _1 } impl From < TC_A > for bool { # [ inline ( always ) ] fn from ( variant : TC_A ) -> Self { match variant { TC_A :: _0 => false , TC_A :: _1 => true } } } # [ doc = "Reader of field `TC`" ] pub type TC_R = crate :: R < bool , TC_A > ; impl TC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TC_A { match self . bits { false => TC_A :: _0 , true => TC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TC_A :: _1 } } # [ doc = "Transmit Data Register Empty Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDRE_A { # [ doc = "0: Transmit data buffer full." ] _0 , # [ doc = "1: Transmit data buffer empty." ] _1 } impl From < TDRE_A > for bool { # [ inline ( always ) ] fn from ( variant : TDRE_A ) -> Self { match variant { TDRE_A :: _0 => false , TDRE_A :: _1 => true } } } # [ doc = "Reader of field `TDRE`" ] pub type TDRE_R = crate :: R < bool , TDRE_A > ; impl TDRE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDRE_A { match self . bits { false => TDRE_A :: _0 , true => TDRE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDRE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDRE_A :: _1 } } # [ doc = "Receiver Active Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAF_A { # [ doc = "0: LPUART receiver idle waiting for a start bit." ] _0 , # [ doc = "1: LPUART receiver active (LPUART_RX input not idle)." ] _1 } impl From < RAF_A > for bool { # [ inline ( always ) ] fn from ( variant : RAF_A ) -> Self { match variant { RAF_A :: _0 => false , RAF_A :: _1 => true } } } # [ doc = "Reader of field `RAF`" ] pub type RAF_R = crate :: R < bool , RAF_A > ; impl RAF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RAF_A { match self . bits { false => RAF_A :: _0 , true => RAF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RAF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RAF_A :: _1 } } # [ doc = "LIN Break Detection Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDE_A { # [ doc = "0: Break character is detected at length 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1)." ] _0 , # [ doc = "1: Break character is detected at length of 11 bit times (if M = 0, SBNS = 0) or 12 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 14 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 15 (if M10 = 1, SNBS = 1)." ] _1 } impl From < LBKDE_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDE_A ) -> Self { match variant { LBKDE_A :: _0 => false , LBKDE_A :: _1 => true } } } # [ doc = "Reader of field `LBKDE`" ] pub type LBKDE_R = crate :: R < bool , LBKDE_A > ; impl LBKDE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDE_A { match self . bits { false => LBKDE_A :: _0 , true => LBKDE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDE_A :: _1 } } # [ doc = "Write proxy for field `LBKDE`" ] pub struct LBKDE_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character is detected at length 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _0 ) } # [ doc = "Break character is detected at length of 11 bit times (if M = 0, SBNS = 0) or 12 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 14 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 15 (if M10 = 1, SNBS = 1)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDE_A :: _1 ) } # [ 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 = "Break Character Generation Length\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BRK13_A { # [ doc = "0: Break character is transmitted with length of 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1)." ] _0 , # [ doc = "1: Break character is transmitted with length of 13 bit times (if M = 0, SBNS = 0) or 14 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 15 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 16 (if M10 = 1, SNBS = 1)." ] _1 } impl From < BRK13_A > for bool { # [ inline ( always ) ] fn from ( variant : BRK13_A ) -> Self { match variant { BRK13_A :: _0 => false , BRK13_A :: _1 => true } } } # [ doc = "Reader of field `BRK13`" ] pub type BRK13_R = crate :: R < bool , BRK13_A > ; impl BRK13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BRK13_A { match self . bits { false => BRK13_A :: _0 , true => BRK13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BRK13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BRK13_A :: _1 } } # [ doc = "Write proxy for field `BRK13`" ] pub struct BRK13_W < 'a > { w : & 'a mut W , } impl < 'a > BRK13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BRK13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Break character is transmitted with length of 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _0 ) } # [ doc = "Break character is transmitted with length of 13 bit times (if M = 0, SBNS = 0) or 14 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 15 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 16 (if M10 = 1, SNBS = 1)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BRK13_A :: _1 ) } # [ 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 = "Receive Wake Up Idle Detect\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWUID_A { # [ doc = "0: During receive standby state (RWU = 1), the IDLE bit does not get set upon detection of an idle character. During address match wakeup, the IDLE bit does not get set when an address does not match." ] _0 , # [ doc = "1: During receive standby state (RWU = 1), the IDLE bit gets set upon detection of an idle character. During address match wakeup, the IDLE bit does get set when an address does not match." ] _1 } impl From < RWUID_A > for bool { # [ inline ( always ) ] fn from ( variant : RWUID_A ) -> Self { match variant { RWUID_A :: _0 => false , RWUID_A :: _1 => true } } } # [ doc = "Reader of field `RWUID`" ] pub type RWUID_R = crate :: R < bool , RWUID_A > ; impl RWUID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWUID_A { match self . bits { false => RWUID_A :: _0 , true => RWUID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWUID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWUID_A :: _1 } } # [ doc = "Write proxy for field `RWUID`" ] pub struct RWUID_W < 'a > { w : & 'a mut W , } impl < 'a > RWUID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWUID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "During receive standby state (RWU = 1), the IDLE bit does not get set upon detection of an idle character. During address match wakeup, the IDLE bit does not get set when an address does not match." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _0 ) } # [ doc = "During receive standby state (RWU = 1), the IDLE bit gets set upon detection of an idle character. During address match wakeup, the IDLE bit does get set when an address does not match." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWUID_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Receive Data Inversion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXINV_A { # [ doc = "0: Receive data not inverted." ] _0 , # [ doc = "1: Receive data inverted." ] _1 } impl From < RXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : RXINV_A ) -> Self { match variant { RXINV_A :: _0 => false , RXINV_A :: _1 => true } } } # [ doc = "Reader of field `RXINV`" ] pub type RXINV_R = crate :: R < bool , RXINV_A > ; impl RXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXINV_A { match self . bits { false => RXINV_A :: _0 , true => RXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXINV_A :: _1 } } # [ doc = "Write proxy for field `RXINV`" ] pub struct RXINV_W < 'a > { w : & 'a mut W , } impl < 'a > RXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receive data not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _0 ) } # [ doc = "Receive data inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXINV_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "MSB First\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSBF_A { # [ doc = "0: LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] _0 , # [ doc = "1: MSB (bit9, bit8, bit7 or bit6) is the first bit that is transmitted following the start bit depending on the setting of CTRL\\[M\\], CTRL\\[PE\\] and BAUD\\[M10\\]. Further, the first bit received after the start bit is identified as bit9, bit8, bit7 or bit6 depending on the setting of CTRL\\[M\\] and CTRL\\[PE\\]." ] _1 } impl From < MSBF_A > for bool { # [ inline ( always ) ] fn from ( variant : MSBF_A ) -> Self { match variant { MSBF_A :: _0 => false , MSBF_A :: _1 => true } } } # [ doc = "Reader of field `MSBF`" ] pub type MSBF_R = crate :: R < bool , MSBF_A > ; impl MSBF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSBF_A { match self . bits { false => MSBF_A :: _0 , true => MSBF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSBF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSBF_A :: _1 } } # [ doc = "Write proxy for field `MSBF`" ] pub struct MSBF_W < 'a > { w : & 'a mut W , } impl < 'a > MSBF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSBF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _0 ) } # [ doc = "MSB (bit9, bit8, bit7 or bit6) is the first bit that is transmitted following the start bit depending on the setting of CTRL\\[M\\], CTRL\\[PE\\] and BAUD\\[M10\\]. Further, the first bit received after the start bit is identified as bit9, bit8, bit7 or bit6 depending on the setting of CTRL\\[M\\] and CTRL\\[PE\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSBF_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "LPUART_RX Pin Active Edge Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEDGIF_A { # [ doc = "0: No active edge on the receive pin has occurred." ] _0 , # [ doc = "1: An active edge on the receive pin has occurred." ] _1 } impl From < RXEDGIF_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEDGIF_A ) -> Self { match variant { RXEDGIF_A :: _0 => false , RXEDGIF_A :: _1 => true } } } # [ doc = "Reader of field `RXEDGIF`" ] pub type RXEDGIF_R = crate :: R < bool , RXEDGIF_A > ; impl RXEDGIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEDGIF_A { match self . bits { false => RXEDGIF_A :: _0 , true => RXEDGIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEDGIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEDGIF_A :: _1 } } # [ doc = "Write proxy for field `RXEDGIF`" ] pub struct RXEDGIF_W < 'a > { w : & 'a mut W , } impl < 'a > RXEDGIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXEDGIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _0 ) } # [ doc = "An active edge on the receive pin has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXEDGIF_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "LIN Break Detect Interrupt Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LBKDIF_A { # [ doc = "0: No LIN break character has been detected." ] _0 , # [ doc = "1: LIN break character has been detected." ] _1 } impl From < LBKDIF_A > for bool { # [ inline ( always ) ] fn from ( variant : LBKDIF_A ) -> Self { match variant { LBKDIF_A :: _0 => false , LBKDIF_A :: _1 => true } } } # [ doc = "Reader of field `LBKDIF`" ] pub type LBKDIF_R = crate :: R < bool , LBKDIF_A > ; impl LBKDIF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LBKDIF_A { match self . bits { false => LBKDIF_A :: _0 , true => LBKDIF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LBKDIF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LBKDIF_A :: _1 } } # [ doc = "Write proxy for field `LBKDIF`" ] pub struct LBKDIF_W < 'a > { w : & 'a mut W , } impl < 'a > LBKDIF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LBKDIF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No LIN break character has been detected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _0 ) } # [ doc = "LIN break character has been detected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LBKDIF_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 14 - Match 2 Flag" ] # [ inline ( always ) ] pub fn ma2f ( & self ) -> MA2F_R { MA2F_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Match 1 Flag" ] # [ inline ( always ) ] pub fn ma1f ( & self ) -> MA1F_R { MA1F_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Parity Error Flag" ] # [ inline ( always ) ] pub fn pf ( & self ) -> PF_R { PF_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Framing Error Flag" ] # [ inline ( always ) ] pub fn fe ( & self ) -> FE_R { FE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Noise Flag" ] # [ inline ( always ) ] pub fn nf ( & self ) -> NF_R { NF_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Receiver Overrun Flag" ] # [ inline ( always ) ] pub fn or ( & self ) -> OR_R { OR_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Idle Line Flag" ] # [ inline ( always ) ] pub fn idle ( & self ) -> IDLE_R { IDLE_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Receive Data Register Full Flag" ] # [ inline ( always ) ] pub fn rdrf ( & self ) -> RDRF_R { RDRF_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Transmission Complete Flag" ] # [ inline ( always ) ] pub fn tc ( & self ) -> TC_R { TC_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Transmit Data Register Empty Flag" ] # [ inline ( always ) ] pub fn tdre ( & self ) -> TDRE_R { TDRE_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Receiver Active Flag" ] # [ inline ( always ) ] pub fn raf ( & self ) -> RAF_R { RAF_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & self ) -> LBKDE_R { LBKDE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Break Character Generation Length" ] # [ inline ( always ) ] pub fn brk13 ( & self ) -> BRK13_R { BRK13_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Receive Wake Up Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & self ) -> RWUID_R { RWUID_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & self ) -> RXINV_R { RXINV_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - MSB First" ] # [ inline ( always ) ] pub fn msbf ( & self ) -> MSBF_R { MSBF_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - LPUART_RX Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & self ) -> RXEDGIF_R { RXEDGIF_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & self ) -> LBKDIF_R { LBKDIF_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 14 - Match 2 Flag" ] # [ inline ( always ) ] pub fn ma2f ( & mut self ) -> MA2F_W { MA2F_W { w : self } } # [ doc = "Bit 15 - Match 1 Flag" ] # [ inline ( always ) ] pub fn ma1f ( & mut self ) -> MA1F_W { MA1F_W { w : self } } # [ doc = "Bit 16 - Parity Error Flag" ] # [ inline ( always ) ] pub fn pf ( & mut self ) -> PF_W { PF_W { w : self } } # [ doc = "Bit 17 - Framing Error Flag" ] # [ inline ( always ) ] pub fn fe ( & mut self ) -> FE_W { FE_W { w : self } } # [ doc = "Bit 18 - Noise Flag" ] # [ inline ( always ) ] pub fn nf ( & mut self ) -> NF_W { NF_W { w : self } } # [ doc = "Bit 19 - Receiver Overrun Flag" ] # [ inline ( always ) ] pub fn or ( & mut self ) -> OR_W { OR_W { w : self } } # [ doc = "Bit 20 - Idle Line Flag" ] # [ inline ( always ) ] pub fn idle ( & mut self ) -> IDLE_W { IDLE_W { w : self } } # [ doc = "Bit 25 - LIN Break Detection Enable" ] # [ inline ( always ) ] pub fn lbkde ( & mut self ) -> LBKDE_W { LBKDE_W { w : self } } # [ doc = "Bit 26 - Break Character Generation Length" ] # [ inline ( always ) ] pub fn brk13 ( & mut self ) -> BRK13_W { BRK13_W { w : self } } # [ doc = "Bit 27 - Receive Wake Up Idle Detect" ] # [ inline ( always ) ] pub fn rwuid ( & mut self ) -> RWUID_W { RWUID_W { w : self } } # [ doc = "Bit 28 - Receive Data Inversion" ] # [ inline ( always ) ] pub fn rxinv ( & mut self ) -> RXINV_W { RXINV_W { w : self } } # [ doc = "Bit 29 - MSB First" ] # [ inline ( always ) ] pub fn msbf ( & mut self ) -> MSBF_W { MSBF_W { w : self } } # [ doc = "Bit 30 - LPUART_RX Pin Active Edge Interrupt Flag" ] # [ inline ( always ) ] pub fn rxedgif ( & mut self ) -> RXEDGIF_W { RXEDGIF_W { w : self } } # [ doc = "Bit 31 - LIN Break Detect Interrupt Flag" ] # [ inline ( always ) ] pub fn lbkdif ( & mut self ) -> LBKDIF_W { LBKDIF_W { w : self } } } } # [ doc = "LPUART Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctrl](ctrl) module" ] pub type CTRL = crate :: Reg < u32 , _CTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CTRL ; # [ doc = "`read()` method returns [ctrl::R](ctrl::R) reader structure" ] impl crate :: Readable for CTRL { } # [ doc = "`write(|w| ..)` method takes [ctrl::W](ctrl::W) writer structure" ] impl crate :: Writable for CTRL { } # [ doc = "LPUART Control Register" ] pub mod ctrl { # [ doc = "Reader of register CTRL" ] pub type R = crate :: R < u32 , super :: CTRL > ; # [ doc = "Writer for register CTRL" ] pub type W = crate :: W < u32 , super :: CTRL > ; # [ doc = "Register CTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Parity Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PT_A { # [ doc = "0: Even parity." ] _0 , # [ doc = "1: Odd parity." ] _1 } impl From < PT_A > for bool { # [ inline ( always ) ] fn from ( variant : PT_A ) -> Self { match variant { PT_A :: _0 => false , PT_A :: _1 => true } } } # [ doc = "Reader of field `PT`" ] pub type PT_R = crate :: R < bool , PT_A > ; impl PT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PT_A { match self . bits { false => PT_A :: _0 , true => PT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PT_A :: _1 } } # [ doc = "Write proxy for field `PT`" ] pub struct PT_W < 'a > { w : & 'a mut W , } impl < 'a > PT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Even parity." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PT_A :: _0 ) } # [ doc = "Odd parity." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Parity Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PE_A { # [ doc = "0: No hardware parity generation or checking." ] _0 , # [ doc = "1: Parity enabled." ] _1 } impl From < PE_A > for bool { # [ inline ( always ) ] fn from ( variant : PE_A ) -> Self { match variant { PE_A :: _0 => false , PE_A :: _1 => true } } } # [ doc = "Reader of field `PE`" ] pub type PE_R = crate :: R < bool , PE_A > ; impl PE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PE_A { match self . bits { false => PE_A :: _0 , true => PE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PE_A :: _1 } } # [ doc = "Write proxy for field `PE`" ] pub struct PE_W < 'a > { w : & 'a mut W , } impl < 'a > PE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No hardware parity generation or checking." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PE_A :: _0 ) } # [ doc = "Parity enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PE_A :: _1 ) } # [ 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 } } # [ doc = "Idle Line Type Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILT_A { # [ doc = "0: Idle character bit count starts after start bit." ] _0 , # [ doc = "1: Idle character bit count starts after stop bit." ] _1 } impl From < ILT_A > for bool { # [ inline ( always ) ] fn from ( variant : ILT_A ) -> Self { match variant { ILT_A :: _0 => false , ILT_A :: _1 => true } } } # [ doc = "Reader of field `ILT`" ] pub type ILT_R = crate :: R < bool , ILT_A > ; impl ILT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILT_A { match self . bits { false => ILT_A :: _0 , true => ILT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILT_A :: _1 } } # [ doc = "Write proxy for field `ILT`" ] pub struct ILT_W < 'a > { w : & 'a mut W , } impl < 'a > ILT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Idle character bit count starts after start bit." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _0 ) } # [ doc = "Idle character bit count starts after stop bit." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILT_A :: _1 ) } # [ 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 = "Receiver Wakeup Method Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WAKE_A { # [ doc = "0: Configures RWU for idle-line wakeup." ] _0 , # [ doc = "1: Configures RWU with address-mark wakeup." ] _1 } impl From < WAKE_A > for bool { # [ inline ( always ) ] fn from ( variant : WAKE_A ) -> Self { match variant { WAKE_A :: _0 => false , WAKE_A :: _1 => true } } } # [ doc = "Reader of field `WAKE`" ] pub type WAKE_R = crate :: R < bool , WAKE_A > ; impl WAKE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WAKE_A { match self . bits { false => WAKE_A :: _0 , true => WAKE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WAKE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WAKE_A :: _1 } } # [ doc = "Write proxy for field `WAKE`" ] pub struct WAKE_W < 'a > { w : & 'a mut W , } impl < 'a > WAKE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WAKE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Configures RWU for idle-line wakeup." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _0 ) } # [ doc = "Configures RWU with address-mark wakeup." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WAKE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "9-Bit or 8-Bit Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum M_A { # [ doc = "0: Receiver and transmitter use 8-bit data characters." ] _0 , # [ doc = "1: Receiver and transmitter use 9-bit data characters." ] _1 } impl From < M_A > for bool { # [ inline ( always ) ] fn from ( variant : M_A ) -> Self { match variant { M_A :: _0 => false , M_A :: _1 => true } } } # [ doc = "Reader of field `M`" ] pub type M_R = crate :: R < bool , M_A > ; impl M_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> M_A { match self . bits { false => M_A :: _0 , true => M_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == M_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == M_A :: _1 } } # [ doc = "Write proxy for field `M`" ] pub struct M_W < 'a > { w : & 'a mut W , } impl < 'a > M_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : M_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver and transmitter use 8-bit data characters." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( M_A :: _0 ) } # [ doc = "Receiver and transmitter use 9-bit data characters." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( M_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Receiver Source Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSRC_A { # [ doc = "0: Provided LOOPS is set, RSRC is cleared, selects internal loop back mode and the LPUART does not use the LPUART_RX pin." ] _0 , # [ doc = "1: Single-wire LPUART mode where the LPUART_TX pin is connected to the transmitter output and receiver input." ] _1 } impl From < RSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : RSRC_A ) -> Self { match variant { RSRC_A :: _0 => false , RSRC_A :: _1 => true } } } # [ doc = "Reader of field `RSRC`" ] pub type RSRC_R = crate :: R < bool , RSRC_A > ; impl RSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSRC_A { match self . bits { false => RSRC_A :: _0 , true => RSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RSRC_A :: _1 } } # [ doc = "Write proxy for field `RSRC`" ] pub struct RSRC_W < 'a > { w : & 'a mut W , } impl < 'a > RSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Provided LOOPS is set, RSRC is cleared, selects internal loop back mode and the LPUART does not use the LPUART_RX pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _0 ) } # [ doc = "Single-wire LPUART mode where the LPUART_TX pin is connected to the transmitter output and receiver input." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RSRC_A :: _1 ) } # [ 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 = "Doze Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOZEEN_A { # [ doc = "0: LPUART is enabled in Doze mode." ] _0 , # [ doc = "1: LPUART is disabled in Doze mode." ] _1 } impl From < DOZEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DOZEEN_A ) -> Self { match variant { DOZEEN_A :: _0 => false , DOZEEN_A :: _1 => true } } } # [ doc = "Reader of field `DOZEEN`" ] pub type DOZEEN_R = crate :: R < bool , DOZEEN_A > ; impl DOZEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DOZEEN_A { match self . bits { false => DOZEEN_A :: _0 , true => DOZEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DOZEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DOZEEN_A :: _1 } } # [ doc = "Write proxy for field `DOZEEN`" ] pub struct DOZEEN_W < 'a > { w : & 'a mut W , } impl < 'a > DOZEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DOZEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LPUART is enabled in Doze mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DOZEEN_A :: _0 ) } # [ doc = "LPUART is disabled in Doze mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DOZEEN_A :: _1 ) } # [ 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 = "Loop Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPS_A { # [ doc = "0: Normal operation - LPUART_RX and LPUART_TX use separate pins." ] _0 , # [ doc = "1: Loop mode or single-wire mode where transmitter outputs are internally connected to receiver input (see RSRC bit)." ] _1 } impl From < LOOPS_A > for bool { # [ inline ( always ) ] fn from ( variant : LOOPS_A ) -> Self { match variant { LOOPS_A :: _0 => false , LOOPS_A :: _1 => true } } } # [ doc = "Reader of field `LOOPS`" ] pub type LOOPS_R = crate :: R < bool , LOOPS_A > ; impl LOOPS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LOOPS_A { match self . bits { false => LOOPS_A :: _0 , true => LOOPS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LOOPS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LOOPS_A :: _1 } } # [ doc = "Write proxy for field `LOOPS`" ] pub struct LOOPS_W < 'a > { w : & 'a mut W , } impl < 'a > LOOPS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LOOPS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal operation - LPUART_RX and LPUART_TX use separate pins." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _0 ) } # [ doc = "Loop mode or single-wire mode where transmitter outputs are internally connected to receiver input (see RSRC bit)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LOOPS_A :: _1 ) } # [ 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 = "Idle Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLECFG_A { # [ doc = "0: 1 idle character" ] _000 , # [ doc = "1: 2 idle characters" ] _001 , # [ doc = "2: 4 idle characters" ] _010 , # [ doc = "3: 8 idle characters" ] _011 , # [ doc = "4: 16 idle characters" ] _100 , # [ doc = "5: 32 idle characters" ] _101 , # [ doc = "6: 64 idle characters" ] _110 , # [ doc = "7: 128 idle characters" ] _111 } impl From < IDLECFG_A > for u8 { # [ inline ( always ) ] fn from ( variant : IDLECFG_A ) -> Self { match variant { IDLECFG_A :: _000 => 0 , IDLECFG_A :: _001 => 1 , IDLECFG_A :: _010 => 2 , IDLECFG_A :: _011 => 3 , IDLECFG_A :: _100 => 4 , IDLECFG_A :: _101 => 5 , IDLECFG_A :: _110 => 6 , IDLECFG_A :: _111 => 7 } } } # [ doc = "Reader of field `IDLECFG`" ] pub type IDLECFG_R = crate :: R < u8 , IDLECFG_A > ; impl IDLECFG_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLECFG_A { match self . bits { 0 => IDLECFG_A :: _000 , 1 => IDLECFG_A :: _001 , 2 => IDLECFG_A :: _010 , 3 => IDLECFG_A :: _011 , 4 => IDLECFG_A :: _100 , 5 => IDLECFG_A :: _101 , 6 => IDLECFG_A :: _110 , 7 => IDLECFG_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == IDLECFG_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == IDLECFG_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == IDLECFG_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == IDLECFG_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == IDLECFG_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == IDLECFG_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == IDLECFG_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == IDLECFG_A :: _111 } } # [ doc = "Write proxy for field `IDLECFG`" ] pub struct IDLECFG_W < 'a > { w : & 'a mut W , } impl < 'a > IDLECFG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IDLECFG_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "1 idle character" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( IDLECFG_A :: _000 ) } # [ doc = "2 idle characters" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( IDLECFG_A :: _001 ) } # [ doc = "4 idle characters" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( IDLECFG_A :: _010 ) } # [ doc = "8 idle characters" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( IDLECFG_A :: _011 ) } # [ doc = "16 idle characters" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( IDLECFG_A :: _100 ) } # [ doc = "32 idle characters" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( IDLECFG_A :: _101 ) } # [ doc = "64 idle characters" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( IDLECFG_A :: _110 ) } # [ doc = "128 idle characters" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( IDLECFG_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x07 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "Match 2 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MA2IE_A { # [ doc = "0: MA2F interrupt disabled" ] _0 , # [ doc = "1: MA2F interrupt enabled" ] _1 } impl From < MA2IE_A > for bool { # [ inline ( always ) ] fn from ( variant : MA2IE_A ) -> Self { match variant { MA2IE_A :: _0 => false , MA2IE_A :: _1 => true } } } # [ doc = "Reader of field `MA2IE`" ] pub type MA2IE_R = crate :: R < bool , MA2IE_A > ; impl MA2IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MA2IE_A { match self . bits { false => MA2IE_A :: _0 , true => MA2IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MA2IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MA2IE_A :: _1 } } # [ doc = "Write proxy for field `MA2IE`" ] pub struct MA2IE_W < 'a > { w : & 'a mut W , } impl < 'a > MA2IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MA2IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MA2F interrupt disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MA2IE_A :: _0 ) } # [ doc = "MA2F interrupt enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MA2IE_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Match 1 Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MA1IE_A { # [ doc = "0: MA1F interrupt disabled" ] _0 , # [ doc = "1: MA1F interrupt enabled" ] _1 } impl From < MA1IE_A > for bool { # [ inline ( always ) ] fn from ( variant : MA1IE_A ) -> Self { match variant { MA1IE_A :: _0 => false , MA1IE_A :: _1 => true } } } # [ doc = "Reader of field `MA1IE`" ] pub type MA1IE_R = crate :: R < bool , MA1IE_A > ; impl MA1IE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MA1IE_A { match self . bits { false => MA1IE_A :: _0 , true => MA1IE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MA1IE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MA1IE_A :: _1 } } # [ doc = "Write proxy for field `MA1IE`" ] pub struct MA1IE_W < 'a > { w : & 'a mut W , } impl < 'a > MA1IE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MA1IE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MA1F interrupt disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MA1IE_A :: _0 ) } # [ doc = "MA1F interrupt enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MA1IE_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Send Break\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SBK_A { # [ doc = "0: Normal transmitter operation." ] _0 , # [ doc = "1: Queue break character(s) to be sent." ] _1 } impl From < SBK_A > for bool { # [ inline ( always ) ] fn from ( variant : SBK_A ) -> Self { match variant { SBK_A :: _0 => false , SBK_A :: _1 => true } } } # [ doc = "Reader of field `SBK`" ] pub type SBK_R = crate :: R < bool , SBK_A > ; impl SBK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SBK_A { match self . bits { false => SBK_A :: _0 , true => SBK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SBK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SBK_A :: _1 } } # [ doc = "Write proxy for field `SBK`" ] pub struct SBK_W < 'a > { w : & 'a mut W , } impl < 'a > SBK_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SBK_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal transmitter operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _0 ) } # [ doc = "Queue break character(s) to be sent." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SBK_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Receiver Wakeup Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RWU_A { # [ doc = "0: Normal receiver operation." ] _0 , # [ doc = "1: LPUART receiver in standby waiting for wakeup condition." ] _1 } impl From < RWU_A > for bool { # [ inline ( always ) ] fn from ( variant : RWU_A ) -> Self { match variant { RWU_A :: _0 => false , RWU_A :: _1 => true } } } # [ doc = "Reader of field `RWU`" ] pub type RWU_R = crate :: R < bool , RWU_A > ; impl RWU_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RWU_A { match self . bits { false => RWU_A :: _0 , true => RWU_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RWU_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RWU_A :: _1 } } # [ doc = "Write proxy for field `RWU`" ] pub struct RWU_W < 'a > { w : & 'a mut W , } impl < 'a > RWU_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RWU_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Normal receiver operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _0 ) } # [ doc = "LPUART receiver in standby waiting for wakeup condition." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RWU_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Receiver Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RE_A { # [ doc = "0: Receiver disabled." ] _0 , # [ doc = "1: Receiver enabled." ] _1 } impl From < RE_A > for bool { # [ inline ( always ) ] fn from ( variant : RE_A ) -> Self { match variant { RE_A :: _0 => false , RE_A :: _1 => true } } } # [ doc = "Reader of field `RE`" ] pub type RE_R = crate :: R < bool , RE_A > ; impl RE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RE_A { match self . bits { false => RE_A :: _0 , true => RE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RE_A :: _1 } } # [ doc = "Write proxy for field `RE`" ] pub struct RE_W < 'a > { w : & 'a mut W , } impl < 'a > RE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Receiver disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RE_A :: _0 ) } # [ doc = "Receiver enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RE_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Transmitter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TE_A { # [ doc = "0: Transmitter disabled." ] _0 , # [ doc = "1: Transmitter enabled." ] _1 } impl From < TE_A > for bool { # [ inline ( always ) ] fn from ( variant : TE_A ) -> Self { match variant { TE_A :: _0 => false , TE_A :: _1 => true } } } # [ doc = "Reader of field `TE`" ] pub type TE_R = crate :: R < bool , TE_A > ; impl TE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TE_A { match self . bits { false => TE_A :: _0 , true => TE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TE_A :: _1 } } # [ doc = "Write proxy for field `TE`" ] pub struct TE_W < 'a > { w : & 'a mut W , } impl < 'a > TE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TE_A :: _0 ) } # [ doc = "Transmitter enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TE_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Idle Line Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ILIE_A { # [ doc = "0: Hardware interrupts from IDLE disabled; use polling." ] _0 , # [ doc = "1: Hardware interrupt requested when IDLE flag is 1." ] _1 } impl From < ILIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ILIE_A ) -> Self { match variant { ILIE_A :: _0 => false , ILIE_A :: _1 => true } } } # [ doc = "Reader of field `ILIE`" ] pub type ILIE_R = crate :: R < bool , ILIE_A > ; impl ILIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ILIE_A { match self . bits { false => ILIE_A :: _0 , true => ILIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ILIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ILIE_A :: _1 } } # [ doc = "Write proxy for field `ILIE`" ] pub struct ILIE_W < 'a > { w : & 'a mut W , } impl < 'a > ILIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ILIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from IDLE disabled; use polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when IDLE flag is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ILIE_A :: _1 ) } # [ 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 = "Receiver Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RIE_A { # [ doc = "0: Hardware interrupts from RDRF disabled; use polling." ] _0 , # [ doc = "1: Hardware interrupt requested when RDRF flag is 1." ] _1 } impl From < RIE_A > for bool { # [ inline ( always ) ] fn from ( variant : RIE_A ) -> Self { match variant { RIE_A :: _0 => false , RIE_A :: _1 => true } } } # [ doc = "Reader of field `RIE`" ] pub type RIE_R = crate :: R < bool , RIE_A > ; impl RIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RIE_A { match self . bits { false => RIE_A :: _0 , true => RIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RIE_A :: _1 } } # [ doc = "Write proxy for field `RIE`" ] pub struct RIE_W < 'a > { w : & 'a mut W , } impl < 'a > RIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from RDRF disabled; use polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when RDRF flag is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RIE_A :: _1 ) } # [ 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 = "Transmission Complete Interrupt Enable for\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TCIE_A { # [ doc = "0: Hardware interrupts from TC disabled; use polling." ] _0 , # [ doc = "1: Hardware interrupt requested when TC flag is 1." ] _1 } impl From < TCIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TCIE_A ) -> Self { match variant { TCIE_A :: _0 => false , TCIE_A :: _1 => true } } } # [ doc = "Reader of field `TCIE`" ] pub type TCIE_R = crate :: R < bool , TCIE_A > ; impl TCIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TCIE_A { match self . bits { false => TCIE_A :: _0 , true => TCIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TCIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TCIE_A :: _1 } } # [ doc = "Write proxy for field `TCIE`" ] pub struct TCIE_W < 'a > { w : & 'a mut W , } impl < 'a > TCIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TCIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from TC disabled; use polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when TC flag is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TCIE_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Transmit Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIE_A { # [ doc = "0: Hardware interrupts from TDRE disabled; use polling." ] _0 , # [ doc = "1: Hardware interrupt requested when TDRE flag is 1." ] _1 } impl From < TIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TIE_A ) -> Self { match variant { TIE_A :: _0 => false , TIE_A :: _1 => true } } } # [ doc = "Reader of field `TIE`" ] pub type TIE_R = crate :: R < bool , TIE_A > ; impl TIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TIE_A { match self . bits { false => TIE_A :: _0 , true => TIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TIE_A :: _1 } } # [ doc = "Write proxy for field `TIE`" ] pub struct TIE_W < 'a > { w : & 'a mut W , } impl < 'a > TIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Hardware interrupts from TDRE disabled; use polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when TDRE flag is 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TIE_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Parity Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PEIE_A { # [ doc = "0: PF interrupts disabled; use polling)." ] _0 , # [ doc = "1: Hardware interrupt requested when PF is set." ] _1 } impl From < PEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : PEIE_A ) -> Self { match variant { PEIE_A :: _0 => false , PEIE_A :: _1 => true } } } # [ doc = "Reader of field `PEIE`" ] pub type PEIE_R = crate :: R < bool , PEIE_A > ; impl PEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PEIE_A { match self . bits { false => PEIE_A :: _0 , true => PEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PEIE_A :: _1 } } # [ doc = "Write proxy for field `PEIE`" ] pub struct PEIE_W < 'a > { w : & 'a mut W , } impl < 'a > PEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "PF interrupts disabled; use polling)." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when PF is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PEIE_A :: _1 ) } # [ 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 = "Framing Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FEIE_A { # [ doc = "0: FE interrupts disabled; use polling." ] _0 , # [ doc = "1: Hardware interrupt requested when FE is set." ] _1 } impl From < FEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : FEIE_A ) -> Self { match variant { FEIE_A :: _0 => false , FEIE_A :: _1 => true } } } # [ doc = "Reader of field `FEIE`" ] pub type FEIE_R = crate :: R < bool , FEIE_A > ; impl FEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FEIE_A { match self . bits { false => FEIE_A :: _0 , true => FEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FEIE_A :: _1 } } # [ doc = "Write proxy for field `FEIE`" ] pub struct FEIE_W < 'a > { w : & 'a mut W , } impl < 'a > FEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "FE interrupts disabled; use polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when FE is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FEIE_A :: _1 ) } # [ 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 = "Noise Error Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NEIE_A { # [ doc = "0: NF interrupts disabled; use polling." ] _0 , # [ doc = "1: Hardware interrupt requested when NF is set." ] _1 } impl From < NEIE_A > for bool { # [ inline ( always ) ] fn from ( variant : NEIE_A ) -> Self { match variant { NEIE_A :: _0 => false , NEIE_A :: _1 => true } } } # [ doc = "Reader of field `NEIE`" ] pub type NEIE_R = crate :: R < bool , NEIE_A > ; impl NEIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NEIE_A { match self . bits { false => NEIE_A :: _0 , true => NEIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NEIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NEIE_A :: _1 } } # [ doc = "Write proxy for field `NEIE`" ] pub struct NEIE_W < 'a > { w : & 'a mut W , } impl < 'a > NEIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NEIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "NF interrupts disabled; use polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when NF is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NEIE_A :: _1 ) } # [ 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 = "Overrun Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORIE_A { # [ doc = "0: OR interrupts disabled; use polling." ] _0 , # [ doc = "1: Hardware interrupt requested when OR is set." ] _1 } impl From < ORIE_A > for bool { # [ inline ( always ) ] fn from ( variant : ORIE_A ) -> Self { match variant { ORIE_A :: _0 => false , ORIE_A :: _1 => true } } } # [ doc = "Reader of field `ORIE`" ] pub type ORIE_R = crate :: R < bool , ORIE_A > ; impl ORIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ORIE_A { match self . bits { false => ORIE_A :: _0 , true => ORIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ORIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ORIE_A :: _1 } } # [ doc = "Write proxy for field `ORIE`" ] pub struct ORIE_W < 'a > { w : & 'a mut W , } impl < 'a > ORIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ORIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "OR interrupts disabled; use polling." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _0 ) } # [ doc = "Hardware interrupt requested when OR is set." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ORIE_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Transmit Data Inversion\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXINV_A { # [ doc = "0: Transmit data not inverted." ] _0 , # [ doc = "1: Transmit data inverted." ] _1 } impl From < TXINV_A > for bool { # [ inline ( always ) ] fn from ( variant : TXINV_A ) -> Self { match variant { TXINV_A :: _0 => false , TXINV_A :: _1 => true } } } # [ doc = "Reader of field `TXINV`" ] pub type TXINV_R = crate :: R < bool , TXINV_A > ; impl TXINV_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXINV_A { match self . bits { false => TXINV_A :: _0 , true => TXINV_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXINV_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXINV_A :: _1 } } # [ doc = "Write proxy for field `TXINV`" ] pub struct TXINV_W < 'a > { w : & 'a mut W , } impl < 'a > TXINV_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXINV_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmit data not inverted." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _0 ) } # [ doc = "Transmit data inverted." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXINV_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "LPUART_TX Pin Direction in Single-Wire Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDIR_A { # [ doc = "0: LPUART_TX pin is an input in single-wire mode." ] _0 , # [ doc = "1: LPUART_TX pin is an output in single-wire mode." ] _1 } impl From < TXDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TXDIR_A ) -> Self { match variant { TXDIR_A :: _0 => false , TXDIR_A :: _1 => true } } } # [ doc = "Reader of field `TXDIR`" ] pub type TXDIR_R = crate :: R < bool , TXDIR_A > ; impl TXDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXDIR_A { match self . bits { false => TXDIR_A :: _0 , true => TXDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXDIR_A :: _1 } } # [ doc = "Write proxy for field `TXDIR`" ] pub struct TXDIR_W < 'a > { w : & 'a mut W , } impl < 'a > TXDIR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXDIR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "LPUART_TX pin is an input in single-wire mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _0 ) } # [ doc = "LPUART_TX pin is an output in single-wire mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXDIR_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Reader of field `R9T8`" ] pub type R9T8_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R9T8`" ] pub struct R9T8_W < 'a > { w : & 'a mut W , } impl < 'a > R9T8_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Reader of field `R8T9`" ] pub type R8T9_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R8T9`" ] pub struct R8T9_W < 'a > { w : & 'a mut W , } impl < 'a > R8T9_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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & self ) -> PT_R { PT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & self ) -> PE_R { PE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & self ) -> ILT_R { ILT_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & self ) -> WAKE_R { WAKE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - 9-Bit or 8-Bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & self ) -> M_R { M_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & self ) -> RSRC_R { RSRC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Doze Enable" ] # [ inline ( always ) ] pub fn dozeen ( & self ) -> DOZEEN_R { DOZEEN_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & self ) -> LOOPS_R { LOOPS_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:10 - Idle Configuration" ] # [ inline ( always ) ] pub fn idlecfg ( & self ) -> IDLECFG_R { IDLECFG_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 14 - Match 2 Interrupt Enable" ] # [ inline ( always ) ] pub fn ma2ie ( & self ) -> MA2IE_R { MA2IE_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Match 1 Interrupt Enable" ] # [ inline ( always ) ] pub fn ma1ie ( & self ) -> MA1IE_R { MA1IE_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & self ) -> SBK_R { SBK_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & self ) -> RWU_R { RWU_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & self ) -> RE_R { RE_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & self ) -> TE_R { TE_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & self ) -> ILIE_R { ILIE_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Receiver Interrupt Enable" ] # [ inline ( always ) ] pub fn rie ( & self ) -> RIE_R { RIE_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Transmission Complete Interrupt Enable for" ] # [ inline ( always ) ] pub fn tcie ( & self ) -> TCIE_R { TCIE_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Transmit Interrupt Enable" ] # [ inline ( always ) ] pub fn tie ( & self ) -> TIE_R { TIE_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & self ) -> PEIE_R { PEIE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & self ) -> FEIE_R { FEIE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & self ) -> NEIE_R { NEIE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Overrun Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & self ) -> ORIE_R { ORIE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Transmit Data Inversion" ] # [ inline ( always ) ] pub fn txinv ( & self ) -> TXINV_R { TXINV_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - LPUART_TX Pin Direction in Single-Wire Mode" ] # [ inline ( always ) ] pub fn txdir ( & self ) -> TXDIR_R { TXDIR_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Receive Bit 9 / Transmit Bit 8" ] # [ inline ( always ) ] pub fn r9t8 ( & self ) -> R9T8_R { R9T8_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Receive Bit 8 / Transmit Bit 9" ] # [ inline ( always ) ] pub fn r8t9 ( & self ) -> R8T9_R { R8T9_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Parity Type" ] # [ inline ( always ) ] pub fn pt ( & mut self ) -> PT_W { PT_W { w : self } } # [ doc = "Bit 1 - Parity Enable" ] # [ inline ( always ) ] pub fn pe ( & mut self ) -> PE_W { PE_W { w : self } } # [ doc = "Bit 2 - Idle Line Type Select" ] # [ inline ( always ) ] pub fn ilt ( & mut self ) -> ILT_W { ILT_W { w : self } } # [ doc = "Bit 3 - Receiver Wakeup Method Select" ] # [ inline ( always ) ] pub fn wake ( & mut self ) -> WAKE_W { WAKE_W { w : self } } # [ doc = "Bit 4 - 9-Bit or 8-Bit Mode Select" ] # [ inline ( always ) ] pub fn m ( & mut self ) -> M_W { M_W { w : self } } # [ doc = "Bit 5 - Receiver Source Select" ] # [ inline ( always ) ] pub fn rsrc ( & mut self ) -> RSRC_W { RSRC_W { w : self } } # [ doc = "Bit 6 - Doze Enable" ] # [ inline ( always ) ] pub fn dozeen ( & mut self ) -> DOZEEN_W { DOZEEN_W { w : self } } # [ doc = "Bit 7 - Loop Mode Select" ] # [ inline ( always ) ] pub fn loops ( & mut self ) -> LOOPS_W { LOOPS_W { w : self } } # [ doc = "Bits 8:10 - Idle Configuration" ] # [ inline ( always ) ] pub fn idlecfg ( & mut self ) -> IDLECFG_W { IDLECFG_W { w : self } } # [ doc = "Bit 14 - Match 2 Interrupt Enable" ] # [ inline ( always ) ] pub fn ma2ie ( & mut self ) -> MA2IE_W { MA2IE_W { w : self } } # [ doc = "Bit 15 - Match 1 Interrupt Enable" ] # [ inline ( always ) ] pub fn ma1ie ( & mut self ) -> MA1IE_W { MA1IE_W { w : self } } # [ doc = "Bit 16 - Send Break" ] # [ inline ( always ) ] pub fn sbk ( & mut self ) -> SBK_W { SBK_W { w : self } } # [ doc = "Bit 17 - Receiver Wakeup Control" ] # [ inline ( always ) ] pub fn rwu ( & mut self ) -> RWU_W { RWU_W { w : self } } # [ doc = "Bit 18 - Receiver Enable" ] # [ inline ( always ) ] pub fn re ( & mut self ) -> RE_W { RE_W { w : self } } # [ doc = "Bit 19 - Transmitter Enable" ] # [ inline ( always ) ] pub fn te ( & mut self ) -> TE_W { TE_W { w : self } } # [ doc = "Bit 20 - Idle Line Interrupt Enable" ] # [ inline ( always ) ] pub fn ilie ( & mut self ) -> ILIE_W { ILIE_W { w : self } } # [ doc = "Bit 21 - Receiver Interrupt Enable" ] # [ inline ( always ) ] pub fn rie ( & mut self ) -> RIE_W { RIE_W { w : self } } # [ doc = "Bit 22 - Transmission Complete Interrupt Enable for" ] # [ inline ( always ) ] pub fn tcie ( & mut self ) -> TCIE_W { TCIE_W { w : self } } # [ doc = "Bit 23 - Transmit Interrupt Enable" ] # [ inline ( always ) ] pub fn tie ( & mut self ) -> TIE_W { TIE_W { w : self } } # [ doc = "Bit 24 - Parity Error Interrupt Enable" ] # [ inline ( always ) ] pub fn peie ( & mut self ) -> PEIE_W { PEIE_W { w : self } } # [ doc = "Bit 25 - Framing Error Interrupt Enable" ] # [ inline ( always ) ] pub fn feie ( & mut self ) -> FEIE_W { FEIE_W { w : self } } # [ doc = "Bit 26 - Noise Error Interrupt Enable" ] # [ inline ( always ) ] pub fn neie ( & mut self ) -> NEIE_W { NEIE_W { w : self } } # [ doc = "Bit 27 - Overrun Interrupt Enable" ] # [ inline ( always ) ] pub fn orie ( & mut self ) -> ORIE_W { ORIE_W { w : self } } # [ doc = "Bit 28 - Transmit Data Inversion" ] # [ inline ( always ) ] pub fn txinv ( & mut self ) -> TXINV_W { TXINV_W { w : self } } # [ doc = "Bit 29 - LPUART_TX Pin Direction in Single-Wire Mode" ] # [ inline ( always ) ] pub fn txdir ( & mut self ) -> TXDIR_W { TXDIR_W { w : self } } # [ doc = "Bit 30 - Receive Bit 9 / Transmit Bit 8" ] # [ inline ( always ) ] pub fn r9t8 ( & mut self ) -> R9T8_W { R9T8_W { w : self } } # [ doc = "Bit 31 - Receive Bit 8 / Transmit Bit 9" ] # [ inline ( always ) ] pub fn r8t9 ( & mut self ) -> R8T9_W { R8T9_W { w : self } } } } # [ doc = "LPUART Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data](data) module" ] pub type DATA = crate :: Reg < u32 , _DATA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATA ; # [ doc = "`read()` method returns [data::R](data::R) reader structure" ] impl crate :: Readable for DATA { } # [ doc = "`write(|w| ..)` method takes [data::W](data::W) writer structure" ] impl crate :: Writable for DATA { } # [ doc = "LPUART Data Register" ] pub mod data { # [ doc = "Reader of register DATA" ] pub type R = crate :: R < u32 , super :: DATA > ; # [ doc = "Writer for register DATA" ] pub type W = crate :: W < u32 , super :: DATA > ; # [ doc = "Register DATA `reset()`'s with value 0x1000" ] impl crate :: ResetValue for super :: DATA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x1000 } } # [ doc = "Reader of field `R0T0`" ] pub type R0T0_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R0T0`" ] pub struct R0T0_W < 'a > { w : & 'a mut W , } impl < 'a > R0T0_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `R1T1`" ] pub type R1T1_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R1T1`" ] pub struct R1T1_W < 'a > { w : & 'a mut W , } impl < 'a > R1T1_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 } } # [ doc = "Reader of field `R2T2`" ] pub type R2T2_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R2T2`" ] pub struct R2T2_W < 'a > { w : & 'a mut W , } impl < 'a > R2T2_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 = "Reader of field `R3T3`" ] pub type R3T3_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R3T3`" ] pub struct R3T3_W < 'a > { w : & 'a mut W , } impl < 'a > R3T3_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `R4T4`" ] pub type R4T4_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R4T4`" ] pub struct R4T4_W < 'a > { w : & 'a mut W , } impl < 'a > R4T4_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `R5T5`" ] pub type R5T5_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R5T5`" ] pub struct R5T5_W < 'a > { w : & 'a mut W , } impl < 'a > R5T5_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 = "Reader of field `R6T6`" ] pub type R6T6_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R6T6`" ] pub struct R6T6_W < 'a > { w : & 'a mut W , } impl < 'a > R6T6_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 = "Reader of field `R7T7`" ] pub type R7T7_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R7T7`" ] pub struct R7T7_W < 'a > { w : & 'a mut W , } impl < 'a > R7T7_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 = "Reader of field `R8T8`" ] pub type R8T8_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R8T8`" ] pub struct R8T8_W < 'a > { w : & 'a mut W , } impl < 'a > R8T8_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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Reader of field `R9T9`" ] pub type R9T9_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `R9T9`" ] pub struct R9T9_W < 'a > { w : & 'a mut W , } impl < 'a > R9T9_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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Idle Line\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IDLINE_A { # [ doc = "0: Receiver was not idle before receiving this character." ] _0 , # [ doc = "1: Receiver was idle before receiving this character." ] _1 } impl From < IDLINE_A > for bool { # [ inline ( always ) ] fn from ( variant : IDLINE_A ) -> Self { match variant { IDLINE_A :: _0 => false , IDLINE_A :: _1 => true } } } # [ doc = "Reader of field `IDLINE`" ] pub type IDLINE_R = crate :: R < bool , IDLINE_A > ; impl IDLINE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IDLINE_A { match self . bits { false => IDLINE_A :: _0 , true => IDLINE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IDLINE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IDLINE_A :: _1 } } # [ doc = "Receive Buffer Empty\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXEMPT_A { # [ doc = "0: Receive buffer contains valid data." ] _0 , # [ doc = "1: Receive buffer is empty, data returned on read is not valid." ] _1 } impl From < RXEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : RXEMPT_A ) -> Self { match variant { RXEMPT_A :: _0 => false , RXEMPT_A :: _1 => true } } } # [ doc = "Reader of field `RXEMPT`" ] pub type RXEMPT_R = crate :: R < bool , RXEMPT_A > ; impl RXEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXEMPT_A { match self . bits { false => RXEMPT_A :: _0 , true => RXEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXEMPT_A :: _1 } } # [ doc = "Frame Error / Transmit Special Character\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRETSC_A { # [ doc = "0: The dataword was received without a frame error on read, transmit a normal character on write." ] _0 , # [ doc = "1: The dataword was received with a frame error, transmit an idle or break character on transmit." ] _1 } impl From < FRETSC_A > for bool { # [ inline ( always ) ] fn from ( variant : FRETSC_A ) -> Self { match variant { FRETSC_A :: _0 => false , FRETSC_A :: _1 => true } } } # [ doc = "Reader of field `FRETSC`" ] pub type FRETSC_R = crate :: R < bool , FRETSC_A > ; impl FRETSC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FRETSC_A { match self . bits { false => FRETSC_A :: _0 , true => FRETSC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FRETSC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FRETSC_A :: _1 } } # [ doc = "Write proxy for field `FRETSC`" ] pub struct FRETSC_W < 'a > { w : & 'a mut W , } impl < 'a > FRETSC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FRETSC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The dataword was received without a frame error on read, transmit a normal character on write." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FRETSC_A :: _0 ) } # [ doc = "The dataword was received with a frame error, transmit an idle or break character on transmit." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FRETSC_A :: _1 ) } # [ 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 = "The current received dataword contained in DATA\\[R9:R0\\] was received with a parity error.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYE_A { # [ doc = "0: The dataword was received without a parity error." ] _0 , # [ doc = "1: The dataword was received with a parity error." ] _1 } impl From < PARITYE_A > for bool { # [ inline ( always ) ] fn from ( variant : PARITYE_A ) -> Self { match variant { PARITYE_A :: _0 => false , PARITYE_A :: _1 => true } } } # [ doc = "Reader of field `PARITYE`" ] pub type PARITYE_R = crate :: R < bool , PARITYE_A > ; impl PARITYE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PARITYE_A { match self . bits { false => PARITYE_A :: _0 , true => PARITYE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PARITYE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PARITYE_A :: _1 } } # [ doc = "The current received dataword contained in DATA\\[R9:R0\\] was received with noise.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOISY_A { # [ doc = "0: The dataword was received without noise." ] _0 , # [ doc = "1: The data was received with noise." ] _1 } impl From < NOISY_A > for bool { # [ inline ( always ) ] fn from ( variant : NOISY_A ) -> Self { match variant { NOISY_A :: _0 => false , NOISY_A :: _1 => true } } } # [ doc = "Reader of field `NOISY`" ] pub type NOISY_R = crate :: R < bool , NOISY_A > ; impl NOISY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOISY_A { match self . bits { false => NOISY_A :: _0 , true => NOISY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOISY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOISY_A :: _1 } } impl R { # [ doc = "Bit 0 - Read receive data buffer 0 or write transmit data buffer 0." ] # [ inline ( always ) ] pub fn r0t0 ( & self ) -> R0T0_R { R0T0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Read receive data buffer 1 or write transmit data buffer 1." ] # [ inline ( always ) ] pub fn r1t1 ( & self ) -> R1T1_R { R1T1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Read receive data buffer 2 or write transmit data buffer 2." ] # [ inline ( always ) ] pub fn r2t2 ( & self ) -> R2T2_R { R2T2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Read receive data buffer 3 or write transmit data buffer 3." ] # [ inline ( always ) ] pub fn r3t3 ( & self ) -> R3T3_R { R3T3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Read receive data buffer 4 or write transmit data buffer 4." ] # [ inline ( always ) ] pub fn r4t4 ( & self ) -> R4T4_R { R4T4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Read receive data buffer 5 or write transmit data buffer 5." ] # [ inline ( always ) ] pub fn r5t5 ( & self ) -> R5T5_R { R5T5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Read receive data buffer 6 or write transmit data buffer 6." ] # [ inline ( always ) ] pub fn r6t6 ( & self ) -> R6T6_R { R6T6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Read receive data buffer 7 or write transmit data buffer 7." ] # [ inline ( always ) ] pub fn r7t7 ( & self ) -> R7T7_R { R7T7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Read receive data buffer 8 or write transmit data buffer 8." ] # [ inline ( always ) ] pub fn r8t8 ( & self ) -> R8T8_R { R8T8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Read receive data buffer 9 or write transmit data buffer 9." ] # [ inline ( always ) ] pub fn r9t9 ( & self ) -> R9T9_R { R9T9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Idle Line" ] # [ inline ( always ) ] pub fn idline ( & self ) -> IDLINE_R { IDLINE_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Receive Buffer Empty" ] # [ inline ( always ) ] pub fn rxempt ( & self ) -> RXEMPT_R { RXEMPT_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Frame Error / Transmit Special Character" ] # [ inline ( always ) ] pub fn fretsc ( & self ) -> FRETSC_R { FRETSC_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - The current received dataword contained in DATA\\[R9:R0\\] was received with a parity error." ] # [ inline ( always ) ] pub fn paritye ( & self ) -> PARITYE_R { PARITYE_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - The current received dataword contained in DATA\\[R9:R0\\] was received with noise." ] # [ inline ( always ) ] pub fn noisy ( & self ) -> NOISY_R { NOISY_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Read receive data buffer 0 or write transmit data buffer 0." ] # [ inline ( always ) ] pub fn r0t0 ( & mut self ) -> R0T0_W { R0T0_W { w : self } } # [ doc = "Bit 1 - Read receive data buffer 1 or write transmit data buffer 1." ] # [ inline ( always ) ] pub fn r1t1 ( & mut self ) -> R1T1_W { R1T1_W { w : self } } # [ doc = "Bit 2 - Read receive data buffer 2 or write transmit data buffer 2." ] # [ inline ( always ) ] pub fn r2t2 ( & mut self ) -> R2T2_W { R2T2_W { w : self } } # [ doc = "Bit 3 - Read receive data buffer 3 or write transmit data buffer 3." ] # [ inline ( always ) ] pub fn r3t3 ( & mut self ) -> R3T3_W { R3T3_W { w : self } } # [ doc = "Bit 4 - Read receive data buffer 4 or write transmit data buffer 4." ] # [ inline ( always ) ] pub fn r4t4 ( & mut self ) -> R4T4_W { R4T4_W { w : self } } # [ doc = "Bit 5 - Read receive data buffer 5 or write transmit data buffer 5." ] # [ inline ( always ) ] pub fn r5t5 ( & mut self ) -> R5T5_W { R5T5_W { w : self } } # [ doc = "Bit 6 - Read receive data buffer 6 or write transmit data buffer 6." ] # [ inline ( always ) ] pub fn r6t6 ( & mut self ) -> R6T6_W { R6T6_W { w : self } } # [ doc = "Bit 7 - Read receive data buffer 7 or write transmit data buffer 7." ] # [ inline ( always ) ] pub fn r7t7 ( & mut self ) -> R7T7_W { R7T7_W { w : self } } # [ doc = "Bit 8 - Read receive data buffer 8 or write transmit data buffer 8." ] # [ inline ( always ) ] pub fn r8t8 ( & mut self ) -> R8T8_W { R8T8_W { w : self } } # [ doc = "Bit 9 - Read receive data buffer 9 or write transmit data buffer 9." ] # [ inline ( always ) ] pub fn r9t9 ( & mut self ) -> R9T9_W { R9T9_W { w : self } } # [ doc = "Bit 13 - Frame Error / Transmit Special Character" ] # [ inline ( always ) ] pub fn fretsc ( & mut self ) -> FRETSC_W { FRETSC_W { w : self } } } } # [ doc = "LPUART Match Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [match_](match_) module" ] pub type MATCH = crate :: Reg < u32 , _MATCH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MATCH ; # [ doc = "`read()` method returns [match_::R](match_::R) reader structure" ] impl crate :: Readable for MATCH { } # [ doc = "`write(|w| ..)` method takes [match_::W](match_::W) writer structure" ] impl crate :: Writable for MATCH { } # [ doc = "LPUART Match Address Register" ] pub mod match_ { # [ doc = "Reader of register MATCH" ] pub type R = crate :: R < u32 , super :: MATCH > ; # [ doc = "Writer for register MATCH" ] pub type W = crate :: W < u32 , super :: MATCH > ; # [ doc = "Register MATCH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MATCH { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `MA1`" ] pub type MA1_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MA1`" ] pub struct MA1_W < 'a > { w : & 'a mut W , } impl < 'a > MA1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03ff ) | ( ( value as u32 ) & 0x03ff ) ; self . w } } # [ doc = "Reader of field `MA2`" ] pub type MA2_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MA2`" ] pub struct MA2_W < 'a > { w : & 'a mut W , } impl < 'a > MA2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 16 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:9 - Match Address 1" ] # [ inline ( always ) ] pub fn ma1 ( & self ) -> MA1_R { MA1_R :: new ( ( self . bits & 0x03ff ) as u16 ) } # [ doc = "Bits 16:25 - Match Address 2" ] # [ inline ( always ) ] pub fn ma2 ( & self ) -> MA2_R { MA2_R :: new ( ( ( self . bits >> 16 ) & 0x03ff ) as u16 ) } } impl W { # [ doc = "Bits 0:9 - Match Address 1" ] # [ inline ( always ) ] pub fn ma1 ( & mut self ) -> MA1_W { MA1_W { w : self } } # [ doc = "Bits 16:25 - Match Address 2" ] # [ inline ( always ) ] pub fn ma2 ( & mut self ) -> MA2_W { MA2_W { w : self } } } } # [ doc = "LPUART Modem IrDA Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [modir](modir) module" ] pub type MODIR = crate :: Reg < u32 , _MODIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MODIR ; # [ doc = "`read()` method returns [modir::R](modir::R) reader structure" ] impl crate :: Readable for MODIR { } # [ doc = "`write(|w| ..)` method takes [modir::W](modir::W) writer structure" ] impl crate :: Writable for MODIR { } # [ doc = "LPUART Modem IrDA Register" ] pub mod modir { # [ doc = "Reader of register MODIR" ] pub type R = crate :: R < u32 , super :: MODIR > ; # [ doc = "Writer for register MODIR" ] pub type W = crate :: W < u32 , super :: MODIR > ; # [ doc = "Register MODIR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MODIR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Transmitter clear-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXCTSE_A { # [ doc = "0: CTS has no effect on the transmitter." ] _0 , # [ doc = "1: Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] _1 } impl From < TXCTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXCTSE_A ) -> Self { match variant { TXCTSE_A :: _0 => false , TXCTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXCTSE`" ] pub type TXCTSE_R = crate :: R < bool , TXCTSE_A > ; impl TXCTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXCTSE_A { match self . bits { false => TXCTSE_A :: _0 , true => TXCTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXCTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXCTSE_A :: _1 } } # [ doc = "Write proxy for field `TXCTSE`" ] pub struct TXCTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXCTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXCTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CTS has no effect on the transmitter." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _0 ) } # [ doc = "Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXCTSE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Transmitter request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSE_A { # [ doc = "0: The transmitter has no effect on RTS." ] _0 , # [ doc = "1: When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit." ] _1 } impl From < TXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSE_A ) -> Self { match variant { TXRTSE_A :: _0 => false , TXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSE`" ] pub type TXRTSE_R = crate :: R < bool , TXRTSE_A > ; impl TXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSE_A { match self . bits { false => TXRTSE_A :: _0 , true => TXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSE_A :: _1 } } # [ doc = "Write proxy for field `TXRTSE`" ] pub struct TXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The transmitter has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _0 ) } # [ doc = "When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSE_A :: _1 ) } # [ 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 } } # [ doc = "Transmitter request-to-send polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXRTSPOL_A { # [ doc = "0: Transmitter RTS is active low." ] _0 , # [ doc = "1: Transmitter RTS is active high." ] _1 } impl From < TXRTSPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : TXRTSPOL_A ) -> Self { match variant { TXRTSPOL_A :: _0 => false , TXRTSPOL_A :: _1 => true } } } # [ doc = "Reader of field `TXRTSPOL`" ] pub type TXRTSPOL_R = crate :: R < bool , TXRTSPOL_A > ; impl TXRTSPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXRTSPOL_A { match self . bits { false => TXRTSPOL_A :: _0 , true => TXRTSPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXRTSPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXRTSPOL_A :: _1 } } # [ doc = "Write proxy for field `TXRTSPOL`" ] pub struct TXRTSPOL_W < 'a > { w : & 'a mut W , } impl < 'a > TXRTSPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXRTSPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Transmitter RTS is active low." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _0 ) } # [ doc = "Transmitter RTS is active high." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXRTSPOL_A :: _1 ) } # [ 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 = "Receiver request-to-send enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXRTSE_A { # [ doc = "0: The receiver has no effect on RTS." ] _0 , # [ doc = "1: RTS is deasserted if the receiver data register is full or a start bit has been detected that would cause the receiver data register to become full. RTS is asserted if the receiver data register is not full and has not detected a start bit that would cause the receiver data register to become full." ] _1 } impl From < RXRTSE_A > for bool { # [ inline ( always ) ] fn from ( variant : RXRTSE_A ) -> Self { match variant { RXRTSE_A :: _0 => false , RXRTSE_A :: _1 => true } } } # [ doc = "Reader of field `RXRTSE`" ] pub type RXRTSE_R = crate :: R < bool , RXRTSE_A > ; impl RXRTSE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RXRTSE_A { match self . bits { false => RXRTSE_A :: _0 , true => RXRTSE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RXRTSE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RXRTSE_A :: _1 } } # [ doc = "Write proxy for field `RXRTSE`" ] pub struct RXRTSE_W < 'a > { w : & 'a mut W , } impl < 'a > RXRTSE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RXRTSE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The receiver has no effect on RTS." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _0 ) } # [ doc = "RTS is deasserted if the receiver data register is full or a start bit has been detected that would cause the receiver data register to become full. RTS is asserted if the receiver data register is not full and has not detected a start bit that would cause the receiver data register to become full." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RXRTSE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Transmit CTS Configuration\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXCTSC_A { # [ doc = "0: CTS input is sampled at the start of each character." ] _0 , # [ doc = "1: CTS input is sampled when the transmitter is idle." ] _1 } impl From < TXCTSC_A > for bool { # [ inline ( always ) ] fn from ( variant : TXCTSC_A ) -> Self { match variant { TXCTSC_A :: _0 => false , TXCTSC_A :: _1 => true } } } # [ doc = "Reader of field `TXCTSC`" ] pub type TXCTSC_R = crate :: R < bool , TXCTSC_A > ; impl TXCTSC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXCTSC_A { match self . bits { false => TXCTSC_A :: _0 , true => TXCTSC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXCTSC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXCTSC_A :: _1 } } # [ doc = "Write proxy for field `TXCTSC`" ] pub struct TXCTSC_W < 'a > { w : & 'a mut W , } impl < 'a > TXCTSC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXCTSC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CTS input is sampled at the start of each character." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXCTSC_A :: _0 ) } # [ doc = "CTS input is sampled when the transmitter is idle." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXCTSC_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Transmit CTS Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXCTSSRC_A { # [ doc = "0: CTS input is the LPUART_CTS pin." ] _0 , # [ doc = "1: CTS input is the inverted Receiver Match result." ] _1 } impl From < TXCTSSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : TXCTSSRC_A ) -> Self { match variant { TXCTSSRC_A :: _0 => false , TXCTSSRC_A :: _1 => true } } } # [ doc = "Reader of field `TXCTSSRC`" ] pub type TXCTSSRC_R = crate :: R < bool , TXCTSSRC_A > ; impl TXCTSSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TXCTSSRC_A { match self . bits { false => TXCTSSRC_A :: _0 , true => TXCTSSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TXCTSSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TXCTSSRC_A :: _1 } } # [ doc = "Write proxy for field `TXCTSSRC`" ] pub struct TXCTSSRC_W < 'a > { w : & 'a mut W , } impl < 'a > TXCTSSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TXCTSSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "CTS input is the LPUART_CTS pin." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TXCTSSRC_A :: _0 ) } # [ doc = "CTS input is the inverted Receiver Match result." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TXCTSSRC_A :: _1 ) } # [ 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 = "Transmitter narrow pulse\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TNP_A { # [ doc = "0: 1/OSR." ] _00 , # [ doc = "1: 2/OSR." ] _01 , # [ doc = "2: 3/OSR." ] _10 , # [ doc = "3: 4/OSR." ] _11 } impl From < TNP_A > for u8 { # [ inline ( always ) ] fn from ( variant : TNP_A ) -> Self { match variant { TNP_A :: _00 => 0 , TNP_A :: _01 => 1 , TNP_A :: _10 => 2 , TNP_A :: _11 => 3 } } } # [ doc = "Reader of field `TNP`" ] pub type TNP_R = crate :: R < u8 , TNP_A > ; impl TNP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TNP_A { match self . bits { 0 => TNP_A :: _00 , 1 => TNP_A :: _01 , 2 => TNP_A :: _10 , 3 => TNP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == TNP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == TNP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == TNP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == TNP_A :: _11 } } # [ doc = "Write proxy for field `TNP`" ] pub struct TNP_W < 'a > { w : & 'a mut W , } impl < 'a > TNP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TNP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "1/OSR." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _00 ) } # [ doc = "2/OSR." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _01 ) } # [ doc = "3/OSR." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _10 ) } # [ doc = "4/OSR." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( TNP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "Infrared enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IREN_A { # [ doc = "0: IR disabled." ] _0 , # [ doc = "1: IR enabled." ] _1 } impl From < IREN_A > for bool { # [ inline ( always ) ] fn from ( variant : IREN_A ) -> Self { match variant { IREN_A :: _0 => false , IREN_A :: _1 => true } } } # [ doc = "Reader of field `IREN`" ] pub type IREN_R = crate :: R < bool , IREN_A > ; impl IREN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IREN_A { match self . bits { false => IREN_A :: _0 , true => IREN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IREN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IREN_A :: _1 } } # [ doc = "Write proxy for field `IREN`" ] pub struct IREN_W < 'a > { w : & 'a mut W , } impl < 'a > IREN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IREN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IR disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _0 ) } # [ doc = "IR enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IREN_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } impl R { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & self ) -> TXCTSE_R { TXCTSE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & self ) -> TXRTSE_R { TXRTSE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & self ) -> TXRTSPOL_R { TXRTSPOL_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & self ) -> RXRTSE_R { RXRTSE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Transmit CTS Configuration" ] # [ inline ( always ) ] pub fn txctsc ( & self ) -> TXCTSC_R { TXCTSC_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Transmit CTS Source" ] # [ inline ( always ) ] pub fn txctssrc ( & self ) -> TXCTSSRC_R { TXCTSSRC_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:17 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & self ) -> TNP_R { TNP_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bit 18 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & self ) -> IREN_R { IREN_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Transmitter clear-to-send enable" ] # [ inline ( always ) ] pub fn txctse ( & mut self ) -> TXCTSE_W { TXCTSE_W { w : self } } # [ doc = "Bit 1 - Transmitter request-to-send enable" ] # [ inline ( always ) ] pub fn txrtse ( & mut self ) -> TXRTSE_W { TXRTSE_W { w : self } } # [ doc = "Bit 2 - Transmitter request-to-send polarity" ] # [ inline ( always ) ] pub fn txrtspol ( & mut self ) -> TXRTSPOL_W { TXRTSPOL_W { w : self } } # [ doc = "Bit 3 - Receiver request-to-send enable" ] # [ inline ( always ) ] pub fn rxrtse ( & mut self ) -> RXRTSE_W { RXRTSE_W { w : self } } # [ doc = "Bit 4 - Transmit CTS Configuration" ] # [ inline ( always ) ] pub fn txctsc ( & mut self ) -> TXCTSC_W { TXCTSC_W { w : self } } # [ doc = "Bit 5 - Transmit CTS Source" ] # [ inline ( always ) ] pub fn txctssrc ( & mut self ) -> TXCTSSRC_W { TXCTSSRC_W { w : self } } # [ doc = "Bits 16:17 - Transmitter narrow pulse" ] # [ inline ( always ) ] pub fn tnp ( & mut self ) -> TNP_W { TNP_W { w : self } } # [ doc = "Bit 18 - Infrared enable" ] # [ inline ( always ) ] pub fn iren ( & mut self ) -> IREN_W { IREN_W { w : self } } } } } # [ doc = "Timer/PWM Module" ] pub struct TPM1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TPM1 { } impl TPM1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const tpm1 :: RegisterBlock { 0x400c_9000 as * const _ } } impl Deref for TPM1 { type Target = tpm1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * TPM1 :: ptr ( ) } } } # [ doc = "Timer/PWM Module" ] pub mod tpm1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Status and Control" ] pub sc : SC , # [ doc = "0x04 - Counter" ] pub cnt : CNT , # [ doc = "0x08 - Modulo" ] pub mod_ : MOD , # [ doc = "0x0c - Channel (n) Status and Control" ] pub c0sc : CSC , # [ doc = "0x10 - Channel (n) Value" ] pub c0v : CV , # [ doc = "0x14 - Channel (n) Status and Control" ] pub c1sc : CSC , # [ doc = "0x18 - Channel (n) Value" ] pub c1v : CV , _reserved7 : [ u8 ; 52usize ] , # [ doc = "0x50 - Capture and Compare Status" ] pub status : STATUS , _reserved8 : [ u8 ; 16usize ] , # [ doc = "0x64 - Combine Channel Register" ] pub combine : COMBINE , _reserved9 : [ u8 ; 8usize ] , # [ doc = "0x70 - Channel Polarity" ] pub pol : POL , _reserved10 : [ u8 ; 4usize ] , # [ doc = "0x78 - Filter Control" ] pub filter : FILTER , _reserved11 : [ u8 ; 4usize ] , # [ doc = "0x80 - Quadrature Decoder Control and Status" ] pub qdctrl : QDCTRL , # [ doc = "0x84 - Configuration" ] pub conf : CONF , } # [ doc = "Status and Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u32 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "Status and Control" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u32 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u32 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Prescale Factor Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Divide by 1" ] _000 , # [ doc = "1: Divide by 2" ] _001 , # [ doc = "2: Divide by 4" ] _010 , # [ doc = "3: Divide by 8" ] _011 , # [ doc = "4: Divide by 16" ] _100 , # [ doc = "5: Divide by 32" ] _101 , # [ doc = "6: Divide by 64" ] _110 , # [ doc = "7: Divide by 128" ] _111 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _000 => 0 , PS_A :: _001 => 1 , PS_A :: _010 => 2 , PS_A :: _011 => 3 , PS_A :: _100 => 4 , PS_A :: _101 => 5 , PS_A :: _110 => 6 , PS_A :: _111 => 7 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _000 , 1 => PS_A :: _001 , 2 => PS_A :: _010 , 3 => PS_A :: _011 , 4 => PS_A :: _100 , 5 => PS_A :: _101 , 6 => PS_A :: _110 , 7 => PS_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PS_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PS_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PS_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PS_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PS_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PS_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PS_A :: _111 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide by 1" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PS_A :: _000 ) } # [ doc = "Divide by 2" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PS_A :: _001 ) } # [ doc = "Divide by 4" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PS_A :: _010 ) } # [ doc = "Divide by 8" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PS_A :: _011 ) } # [ doc = "Divide by 16" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PS_A :: _100 ) } # [ doc = "Divide by 32" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PS_A :: _101 ) } # [ doc = "Divide by 64" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PS_A :: _110 ) } # [ doc = "Divide by 128" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PS_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Clock Mode Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CMOD_A { # [ doc = "0: TPM counter is disabled" ] _00 , # [ doc = "1: TPM counter increments on every TPM counter clock" ] _01 , # [ doc = "2: TPM counter increments on rising edge of TPM_EXTCLK synchronized to the TPM counter clock" ] _10 } impl From < CMOD_A > for u8 { # [ inline ( always ) ] fn from ( variant : CMOD_A ) -> Self { match variant { CMOD_A :: _00 => 0 , CMOD_A :: _01 => 1 , CMOD_A :: _10 => 2 } } } # [ doc = "Reader of field `CMOD`" ] pub type CMOD_R = crate :: R < u8 , CMOD_A > ; impl CMOD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CMOD_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CMOD_A :: _00 ) , 1 => Val ( CMOD_A :: _01 ) , 2 => Val ( CMOD_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CMOD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CMOD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CMOD_A :: _10 } } # [ doc = "Write proxy for field `CMOD`" ] pub struct CMOD_W < 'a > { w : & 'a mut W , } impl < 'a > CMOD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CMOD_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "TPM counter is disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CMOD_A :: _00 ) } # [ doc = "TPM counter increments on every TPM counter clock" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CMOD_A :: _01 ) } # [ doc = "TPM counter increments on rising edge of TPM_EXTCLK synchronized to the TPM counter clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CMOD_A :: _10 ) } # [ 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 = "Center-Aligned PWM Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPWMS_A { # [ doc = "0: TPM counter operates in up counting mode." ] _0 , # [ doc = "1: TPM counter operates in up-down counting mode." ] _1 } impl From < CPWMS_A > for bool { # [ inline ( always ) ] fn from ( variant : CPWMS_A ) -> Self { match variant { CPWMS_A :: _0 => false , CPWMS_A :: _1 => true } } } # [ doc = "Reader of field `CPWMS`" ] pub type CPWMS_R = crate :: R < bool , CPWMS_A > ; impl CPWMS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPWMS_A { match self . bits { false => CPWMS_A :: _0 , true => CPWMS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPWMS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPWMS_A :: _1 } } # [ doc = "Write proxy for field `CPWMS`" ] pub struct CPWMS_W < 'a > { w : & 'a mut W , } impl < 'a > CPWMS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPWMS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter operates in up counting mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _0 ) } # [ doc = "TPM counter operates in up-down counting mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _1 ) } # [ 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 = "Timer Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOIE_A { # [ doc = "0: Disable TOF interrupts. Use software polling or DMA request." ] _0 , # [ doc = "1: Enable TOF interrupts. An interrupt is generated when TOF equals one." ] _1 } impl From < TOIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TOIE_A ) -> Self { match variant { TOIE_A :: _0 => false , TOIE_A :: _1 => true } } } # [ doc = "Reader of field `TOIE`" ] pub type TOIE_R = crate :: R < bool , TOIE_A > ; impl TOIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOIE_A { match self . bits { false => TOIE_A :: _0 , true => TOIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOIE_A :: _1 } } # [ doc = "Write proxy for field `TOIE`" ] pub struct TOIE_W < 'a > { w : & 'a mut W , } impl < 'a > TOIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable TOF interrupts. Use software polling or DMA request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _0 ) } # [ doc = "Enable TOF interrupts. An interrupt is generated when TOF equals one." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _1 ) } # [ 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 = "Timer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: TPM counter has not overflowed." ] _0 , # [ doc = "1: TPM counter has overflowed." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Write proxy for field `TOF`" ] pub struct TOF_W < 'a > { w : & 'a mut W , } impl < 'a > TOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter has not overflowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _0 ) } # [ doc = "TPM counter has overflowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _1 ) } # [ 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 = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Disables DMA transfers." ] _0 , # [ doc = "1: Enables DMA transfers." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables DMA transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Enables DMA transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:4 - Clock Mode Selection" ] # [ inline ( always ) ] pub fn cmod ( & self ) -> CMOD_R { CMOD_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & self ) -> CPWMS_R { CPWMS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & self ) -> TOIE_R { TOIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bits 3:4 - Clock Mode Selection" ] # [ inline ( always ) ] pub fn cmod ( & mut self ) -> CMOD_W { CMOD_W { w : self } } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & mut self ) -> CPWMS_W { CPWMS_W { w : self } } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & mut self ) -> TOIE_W { TOIE_W { w : self } } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & mut self ) -> TOF_W { TOF_W { w : self } } # [ doc = "Bit 8 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } } } # [ doc = "Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module" ] pub type CNT = crate :: Reg < u32 , _CNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNT ; # [ doc = "`read()` method returns [cnt::R](cnt::R) reader structure" ] impl crate :: Readable for CNT { } # [ doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure" ] impl crate :: Writable for CNT { } # [ doc = "Counter" ] pub mod cnt { # [ doc = "Reader of register CNT" ] pub type R = crate :: R < u32 , super :: CNT > ; # [ doc = "Writer for register CNT" ] pub type W = crate :: W < u32 , super :: CNT > ; # [ doc = "Register CNT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `COUNT`" ] pub struct COUNT_W < 'a > { w : & 'a mut W , } impl < 'a > COUNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Counter value" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Counter value" ] # [ inline ( always ) ] pub fn count ( & mut self ) -> COUNT_W { COUNT_W { w : self } } } } # [ doc = "Modulo\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mod_](mod_) module" ] pub type MOD = crate :: Reg < u32 , _MOD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MOD ; # [ doc = "`read()` method returns [mod_::R](mod_::R) reader structure" ] impl crate :: Readable for MOD { } # [ doc = "`write(|w| ..)` method takes [mod_::W](mod_::W) writer structure" ] impl crate :: Writable for MOD { } # [ doc = "Modulo" ] pub mod mod_ { # [ doc = "Reader of register MOD" ] pub type R = crate :: R < u32 , super :: MOD > ; # [ doc = "Writer for register MOD" ] pub type W = crate :: W < u32 , super :: MOD > ; # [ doc = "Register MOD `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: MOD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Reader of field `MOD`" ] pub type MOD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MOD`" ] pub struct MOD_W < 'a > { w : & 'a mut W , } impl < 'a > MOD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Modulo value" ] # [ inline ( always ) ] pub fn mod_ ( & self ) -> MOD_R { MOD_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Modulo value" ] # [ inline ( always ) ] pub fn mod_ ( & mut self ) -> MOD_W { MOD_W { w : self } } } } # [ doc = "Channel (n) Status and Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csc](csc) module" ] pub type CSC = crate :: Reg < u32 , _CSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSC ; # [ doc = "`read()` method returns [csc::R](csc::R) reader structure" ] impl crate :: Readable for CSC { } # [ doc = "`write(|w| ..)` method takes [csc::W](csc::W) writer structure" ] impl crate :: Writable for CSC { } # [ doc = "Channel (n) Status and Control" ] pub mod csc { # [ doc = "Reader of register C%sSC" ] pub type R = crate :: R < u32 , super :: CSC > ; # [ doc = "Writer for register C%sSC" ] pub type W = crate :: W < u32 , super :: CSC > ; # [ doc = "Register C%sSC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Disable DMA transfers." ] _0 , # [ doc = "1: Enable DMA transfers." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable DMA transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Enable DMA transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ELSA`" ] pub type ELSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSA`" ] pub struct ELSA_W < 'a > { w : & 'a mut W , } impl < 'a > ELSA_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 = "Reader of field `ELSB`" ] pub type ELSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSB`" ] pub struct ELSB_W < 'a > { w : & 'a mut W , } impl < 'a > ELSB_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `MSA`" ] pub type MSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSA`" ] pub struct MSA_W < 'a > { w : & 'a mut W , } impl < 'a > MSA_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `MSB`" ] pub type MSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSB`" ] pub struct MSB_W < 'a > { w : & 'a mut W , } impl < 'a > MSB_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 = "Channel Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHIE_A { # [ doc = "0: Disable channel interrupts." ] _0 , # [ doc = "1: Enable channel interrupts." ] _1 } impl From < CHIE_A > for bool { # [ inline ( always ) ] fn from ( variant : CHIE_A ) -> Self { match variant { CHIE_A :: _0 => false , CHIE_A :: _1 => true } } } # [ doc = "Reader of field `CHIE`" ] pub type CHIE_R = crate :: R < bool , CHIE_A > ; impl CHIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHIE_A { match self . bits { false => CHIE_A :: _0 , true => CHIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHIE_A :: _1 } } # [ doc = "Write proxy for field `CHIE`" ] pub struct CHIE_W < 'a > { w : & 'a mut W , } impl < 'a > CHIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable channel interrupts." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _0 ) } # [ doc = "Enable channel interrupts." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _1 ) } # [ 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 = "Channel Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHF_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CHF_A > for bool { # [ inline ( always ) ] fn from ( variant : CHF_A ) -> Self { match variant { CHF_A :: _0 => false , CHF_A :: _1 => true } } } # [ doc = "Reader of field `CHF`" ] pub type CHF_R = crate :: R < bool , CHF_A > ; impl CHF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHF_A { match self . bits { false => CHF_A :: _0 , true => CHF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHF_A :: _1 } } # [ doc = "Write proxy for field `CHF`" ] pub struct CHF_W < 'a > { w : & 'a mut W , } impl < 'a > CHF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & self ) -> ELSA_R { ELSA_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & self ) -> ELSB_R { ELSB_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & self ) -> MSA_R { MSA_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & self ) -> MSB_R { MSB_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & self ) -> CHIE_R { CHIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & self ) -> CHF_R { CHF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & mut self ) -> ELSA_W { ELSA_W { w : self } } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & mut self ) -> ELSB_W { ELSB_W { w : self } } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & mut self ) -> MSA_W { MSA_W { w : self } } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & mut self ) -> MSB_W { MSB_W { w : self } } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & mut self ) -> CHIE_W { CHIE_W { w : self } } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & mut self ) -> CHF_W { CHF_W { w : self } } } } # [ doc = "Channel (n) Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cv](cv) module" ] pub type CV = crate :: Reg < u32 , _CV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CV ; # [ doc = "`read()` method returns [cv::R](cv::R) reader structure" ] impl crate :: Readable for CV { } # [ doc = "`write(|w| ..)` method takes [cv::W](cv::W) writer structure" ] impl crate :: Writable for CV { } # [ doc = "Channel (n) Value" ] pub mod cv { # [ doc = "Reader of register C%sV" ] pub type R = crate :: R < u32 , super :: CV > ; # [ doc = "Writer for register C%sV" ] pub type W = crate :: W < u32 , super :: CV > ; # [ doc = "Register C%sV `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CV { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VAL`" ] pub type VAL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `VAL`" ] pub struct VAL_W < 'a > { w : & 'a mut W , } impl < 'a > VAL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & self ) -> VAL_R { VAL_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & mut self ) -> VAL_W { VAL_W { w : self } } } } # [ doc = "Capture and Compare Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "`write(|w| ..)` method takes [status::W](status::W) writer structure" ] impl crate :: Writable for STATUS { } # [ doc = "Capture and Compare Status" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Writer for register STATUS" ] pub type W = crate :: W < u32 , super :: STATUS > ; # [ doc = "Register STATUS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: STATUS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH0F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0F_A ) -> Self { match variant { CH0F_A :: _0 => false , CH0F_A :: _1 => true } } } # [ doc = "Reader of field `CH0F`" ] pub type CH0F_R = crate :: R < bool , CH0F_A > ; impl CH0F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0F_A { match self . bits { false => CH0F_A :: _0 , true => CH0F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0F_A :: _1 } } # [ doc = "Write proxy for field `CH0F`" ] pub struct CH0F_W < 'a > { w : & 'a mut W , } impl < 'a > CH0F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH1F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1F_A ) -> Self { match variant { CH1F_A :: _0 => false , CH1F_A :: _1 => true } } } # [ doc = "Reader of field `CH1F`" ] pub type CH1F_R = crate :: R < bool , CH1F_A > ; impl CH1F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1F_A { match self . bits { false => CH1F_A :: _0 , true => CH1F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1F_A :: _1 } } # [ doc = "Write proxy for field `CH1F`" ] pub struct CH1F_W < 'a > { w : & 'a mut W , } impl < 'a > CH1F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _1 ) } # [ 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 } } # [ doc = "Timer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: TPM counter has not overflowed." ] _0 , # [ doc = "1: TPM counter has overflowed." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Write proxy for field `TOF`" ] pub struct TOF_W < 'a > { w : & 'a mut W , } impl < 'a > TOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter has not overflowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _0 ) } # [ doc = "TPM counter has overflowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & self ) -> CH0F_R { CH0F_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & self ) -> CH1F_R { CH1F_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & mut self ) -> CH0F_W { CH0F_W { w : self } } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & mut self ) -> CH1F_W { CH1F_W { w : self } } # [ doc = "Bit 8 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & mut self ) -> TOF_W { TOF_W { w : self } } } } # [ doc = "Combine Channel Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [combine](combine) module" ] pub type COMBINE = crate :: Reg < u32 , _COMBINE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _COMBINE ; # [ doc = "`read()` method returns [combine::R](combine::R) reader structure" ] impl crate :: Readable for COMBINE { } # [ doc = "`write(|w| ..)` method takes [combine::W](combine::W) writer structure" ] impl crate :: Writable for COMBINE { } # [ doc = "Combine Channel Register" ] pub mod combine { # [ doc = "Reader of register COMBINE" ] pub type R = crate :: R < u32 , super :: COMBINE > ; # [ doc = "Writer for register COMBINE" ] pub type W = crate :: W < u32 , super :: COMBINE > ; # [ doc = "Register COMBINE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: COMBINE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Combine Channels 0 and 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE0_A { # [ doc = "0: Channels 0 and 1 are independent." ] _0 , # [ doc = "1: Channels 0 and 1 are combined." ] _1 } impl From < COMBINE0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE0_A ) -> Self { match variant { COMBINE0_A :: _0 => false , COMBINE0_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE0`" ] pub type COMBINE0_R = crate :: R < bool , COMBINE0_A > ; impl COMBINE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE0_A { match self . bits { false => COMBINE0_A :: _0 , true => COMBINE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE0_A :: _1 } } # [ doc = "Write proxy for field `COMBINE0`" ] pub struct COMBINE0_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels 0 and 1 are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _0 ) } # [ doc = "Channels 0 and 1 are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Combine Channel 0 and 1 Swap\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMSWAP0_A { # [ doc = "0: Even channel is used for input capture and 1st compare." ] _0 , # [ doc = "1: Odd channel is used for input capture and 1st compare." ] _1 } impl From < COMSWAP0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMSWAP0_A ) -> Self { match variant { COMSWAP0_A :: _0 => false , COMSWAP0_A :: _1 => true } } } # [ doc = "Reader of field `COMSWAP0`" ] pub type COMSWAP0_R = crate :: R < bool , COMSWAP0_A > ; impl COMSWAP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMSWAP0_A { match self . bits { false => COMSWAP0_A :: _0 , true => COMSWAP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMSWAP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMSWAP0_A :: _1 } } # [ doc = "Write proxy for field `COMSWAP0`" ] pub struct COMSWAP0_W < 'a > { w : & 'a mut W , } impl < 'a > COMSWAP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMSWAP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Even channel is used for input capture and 1st compare." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMSWAP0_A :: _0 ) } # [ doc = "Odd channel is used for input capture and 1st compare." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMSWAP0_A :: _1 ) } # [ 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 0 - Combine Channels 0 and 1" ] # [ inline ( always ) ] pub fn combine0 ( & self ) -> COMBINE0_R { COMBINE0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Combine Channel 0 and 1 Swap" ] # [ inline ( always ) ] pub fn comswap0 ( & self ) -> COMSWAP0_R { COMSWAP0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Combine Channels 0 and 1" ] # [ inline ( always ) ] pub fn combine0 ( & mut self ) -> COMBINE0_W { COMBINE0_W { w : self } } # [ doc = "Bit 1 - Combine Channel 0 and 1 Swap" ] # [ inline ( always ) ] pub fn comswap0 ( & mut self ) -> COMSWAP0_W { COMSWAP0_W { w : self } } } } # [ doc = "Channel Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pol](pol) module" ] pub type POL = crate :: Reg < u32 , _POL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POL ; # [ doc = "`read()` method returns [pol::R](pol::R) reader structure" ] impl crate :: Readable for POL { } # [ doc = "`write(|w| ..)` method takes [pol::W](pol::W) writer structure" ] impl crate :: Writable for POL { } # [ doc = "Channel Polarity" ] pub mod pol { # [ doc = "Reader of register POL" ] pub type R = crate :: R < u32 , super :: POL > ; # [ doc = "Writer for register POL" ] pub type W = crate :: W < u32 , super :: POL > ; # [ doc = "Register POL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: POL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL0_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL0_A > for bool { # [ inline ( always ) ] fn from ( variant : POL0_A ) -> Self { match variant { POL0_A :: _0 => false , POL0_A :: _1 => true } } } # [ doc = "Reader of field `POL0`" ] pub type POL0_R = crate :: R < bool , POL0_A > ; impl POL0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL0_A { match self . bits { false => POL0_A :: _0 , true => POL0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL0_A :: _1 } } # [ doc = "Write proxy for field `POL0`" ] pub struct POL0_W < 'a > { w : & 'a mut W , } impl < 'a > POL0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL1_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL1_A > for bool { # [ inline ( always ) ] fn from ( variant : POL1_A ) -> Self { match variant { POL1_A :: _0 => false , POL1_A :: _1 => true } } } # [ doc = "Reader of field `POL1`" ] pub type POL1_R = crate :: R < bool , POL1_A > ; impl POL1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL1_A { match self . bits { false => POL1_A :: _0 , true => POL1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL1_A :: _1 } } # [ doc = "Write proxy for field `POL1`" ] pub struct POL1_W < 'a > { w : & 'a mut W , } impl < 'a > POL1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _1 ) } # [ 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 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & self ) -> POL0_R { POL0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & self ) -> POL1_R { POL1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & mut self ) -> POL0_W { POL0_W { w : self } } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & mut self ) -> POL1_W { POL1_W { w : self } } } } # [ doc = "Filter Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filter](filter) module" ] pub type FILTER = crate :: Reg < u32 , _FILTER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILTER ; # [ doc = "`read()` method returns [filter::R](filter::R) reader structure" ] impl crate :: Readable for FILTER { } # [ doc = "`write(|w| ..)` method takes [filter::W](filter::W) writer structure" ] impl crate :: Writable for FILTER { } # [ doc = "Filter Control" ] pub mod filter { # [ doc = "Reader of register FILTER" ] pub type R = crate :: R < u32 , super :: FILTER > ; # [ doc = "Writer for register FILTER" ] pub type W = crate :: W < u32 , super :: FILTER > ; # [ doc = "Register FILTER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILTER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CH0FVAL`" ] pub type CH0FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH0FVAL`" ] pub struct CH0FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0FVAL_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `CH1FVAL`" ] pub type CH1FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH1FVAL`" ] pub struct CH1FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1FVAL_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Channel 0 Filter Value" ] # [ inline ( always ) ] pub fn ch0fval ( & self ) -> CH0FVAL_R { CH0FVAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Channel 1 Filter Value" ] # [ inline ( always ) ] pub fn ch1fval ( & self ) -> CH1FVAL_R { CH1FVAL_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Channel 0 Filter Value" ] # [ inline ( always ) ] pub fn ch0fval ( & mut self ) -> CH0FVAL_W { CH0FVAL_W { w : self } } # [ doc = "Bits 4:7 - Channel 1 Filter Value" ] # [ inline ( always ) ] pub fn ch1fval ( & mut self ) -> CH1FVAL_W { CH1FVAL_W { w : self } } } } # [ doc = "Quadrature Decoder Control and Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [qdctrl](qdctrl) module" ] pub type QDCTRL = crate :: Reg < u32 , _QDCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _QDCTRL ; # [ doc = "`read()` method returns [qdctrl::R](qdctrl::R) reader structure" ] impl crate :: Readable for QDCTRL { } # [ doc = "`write(|w| ..)` method takes [qdctrl::W](qdctrl::W) writer structure" ] impl crate :: Writable for QDCTRL { } # [ doc = "Quadrature Decoder Control and Status" ] pub mod qdctrl { # [ doc = "Reader of register QDCTRL" ] pub type R = crate :: R < u32 , super :: QDCTRL > ; # [ doc = "Writer for register QDCTRL" ] pub type W = crate :: W < u32 , super :: QDCTRL > ; # [ doc = "Register QDCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: QDCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Enables the quadrature decoder mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADEN_A { # [ doc = "0: Quadrature decoder mode is disabled." ] _0 , # [ doc = "1: Quadrature decoder mode is enabled." ] _1 } impl From < QUADEN_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADEN_A ) -> Self { match variant { QUADEN_A :: _0 => false , QUADEN_A :: _1 => true } } } # [ doc = "Reader of field `QUADEN`" ] pub type QUADEN_R = crate :: R < bool , QUADEN_A > ; impl QUADEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADEN_A { match self . bits { false => QUADEN_A :: _0 , true => QUADEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADEN_A :: _1 } } # [ doc = "Write proxy for field `QUADEN`" ] pub struct QUADEN_W < 'a > { w : & 'a mut W , } impl < 'a > QUADEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Quadrature decoder mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _0 ) } # [ doc = "Quadrature decoder mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Indicates if the TOF bit was set on the top or the bottom of counting.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOFDIR_A { # [ doc = "0: TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes from its minimum value (zero) to its maximum value (MOD register)." ] _0 , # [ doc = "1: TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from its maximum value (MOD register) to its minimum value (zero)." ] _1 } impl From < TOFDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TOFDIR_A ) -> Self { match variant { TOFDIR_A :: _0 => false , TOFDIR_A :: _1 => true } } } # [ doc = "Reader of field `TOFDIR`" ] pub type TOFDIR_R = crate :: R < bool , TOFDIR_A > ; impl TOFDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOFDIR_A { match self . bits { false => TOFDIR_A :: _0 , true => TOFDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOFDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOFDIR_A :: _1 } } # [ doc = "Counter Direction in Quadrature Decode Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADIR_A { # [ doc = "0: Counter direction is decreasing (counter decrement)." ] _0 , # [ doc = "1: Counter direction is increasing (counter increment)." ] _1 } impl From < QUADIR_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADIR_A ) -> Self { match variant { QUADIR_A :: _0 => false , QUADIR_A :: _1 => true } } } # [ doc = "Reader of field `QUADIR`" ] pub type QUADIR_R = crate :: R < bool , QUADIR_A > ; impl QUADIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADIR_A { match self . bits { false => QUADIR_A :: _0 , true => QUADIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADIR_A :: _1 } } # [ doc = "Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADMODE_A { # [ doc = "0: Phase encoding mode." ] _0 , # [ doc = "1: Count and direction encoding mode." ] _1 } impl From < QUADMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADMODE_A ) -> Self { match variant { QUADMODE_A :: _0 => false , QUADMODE_A :: _1 => true } } } # [ doc = "Reader of field `QUADMODE`" ] pub type QUADMODE_R = crate :: R < bool , QUADMODE_A > ; impl QUADMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADMODE_A { match self . bits { false => QUADMODE_A :: _0 , true => QUADMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADMODE_A :: _1 } } # [ doc = "Write proxy for field `QUADMODE`" ] pub struct QUADMODE_W < 'a > { w : & 'a mut W , } impl < 'a > QUADMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase encoding mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _0 ) } # [ doc = "Count and direction encoding mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Enables the quadrature decoder mode" ] # [ inline ( always ) ] pub fn quaden ( & self ) -> QUADEN_R { QUADEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Indicates if the TOF bit was set on the top or the bottom of counting." ] # [ inline ( always ) ] pub fn tofdir ( & self ) -> TOFDIR_R { TOFDIR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Counter Direction in Quadrature Decode Mode" ] # [ inline ( always ) ] pub fn quadir ( & self ) -> QUADIR_R { QUADIR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & self ) -> QUADMODE_R { QUADMODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Enables the quadrature decoder mode" ] # [ inline ( always ) ] pub fn quaden ( & mut self ) -> QUADEN_W { QUADEN_W { w : self } } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & mut self ) -> QUADMODE_W { QUADMODE_W { w : self } } } } # [ doc = "Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [conf](conf) module" ] pub type CONF = crate :: Reg < u32 , _CONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONF ; # [ doc = "`read()` method returns [conf::R](conf::R) reader structure" ] impl crate :: Readable for CONF { } # [ doc = "`write(|w| ..)` method takes [conf::W](conf::W) writer structure" ] impl crate :: Writable for CONF { } # [ doc = "Configuration" ] pub mod conf { # [ doc = "Reader of register CONF" ] pub type R = crate :: R < u32 , super :: CONF > ; # [ doc = "Writer for register CONF" ] pub type W = crate :: W < u32 , super :: CONF > ; # [ doc = "Register CONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Doze Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOZEEN_A { # [ doc = "0: Internal TPM counter continues in Doze mode." ] _0 , # [ doc = "1: Internal TPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture events are also ignored." ] _1 } impl From < DOZEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DOZEEN_A ) -> Self { match variant { DOZEEN_A :: _0 => false , DOZEEN_A :: _1 => true } } } # [ doc = "Reader of field `DOZEEN`" ] pub type DOZEEN_R = crate :: R < bool , DOZEEN_A > ; impl DOZEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DOZEEN_A { match self . bits { false => DOZEEN_A :: _0 , true => DOZEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DOZEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DOZEEN_A :: _1 } } # [ doc = "Write proxy for field `DOZEEN`" ] pub struct DOZEEN_W < 'a > { w : & 'a mut W , } impl < 'a > DOZEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DOZEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal TPM counter continues in Doze mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DOZEEN_A :: _0 ) } # [ doc = "Internal TPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture events are also ignored." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DOZEEN_A :: _1 ) } # [ 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 = "Debug Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBGMODE_A { # [ doc = "0: TPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events are also ignored." ] _00 , # [ doc = "3: TPM counter continues in debug mode." ] _11 } impl From < DBGMODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : DBGMODE_A ) -> Self { match variant { DBGMODE_A :: _00 => 0 , DBGMODE_A :: _11 => 3 } } } # [ doc = "Reader of field `DBGMODE`" ] pub type DBGMODE_R = crate :: R < u8 , DBGMODE_A > ; impl DBGMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DBGMODE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DBGMODE_A :: _00 ) , 3 => Val ( DBGMODE_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DBGMODE_A :: _00 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DBGMODE_A :: _11 } } # [ doc = "Write proxy for field `DBGMODE`" ] pub struct DBGMODE_W < 'a > { w : & 'a mut W , } impl < 'a > DBGMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBGMODE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "TPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events are also ignored." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DBGMODE_A :: _00 ) } # [ doc = "TPM counter continues in debug mode." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DBGMODE_A :: _11 ) } # [ 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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Global Time Base Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBSYNC_A { # [ doc = "0: Global timebase synchronization disabled." ] _0 , # [ doc = "1: Global timebase synchronization enabled." ] _1 } impl From < GTBSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBSYNC_A ) -> Self { match variant { GTBSYNC_A :: _0 => false , GTBSYNC_A :: _1 => true } } } # [ doc = "Reader of field `GTBSYNC`" ] pub type GTBSYNC_R = crate :: R < bool , GTBSYNC_A > ; impl GTBSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBSYNC_A { match self . bits { false => GTBSYNC_A :: _0 , true => GTBSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBSYNC_A :: _1 } } # [ doc = "Write proxy for field `GTBSYNC`" ] pub struct GTBSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > GTBSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Global timebase synchronization disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBSYNC_A :: _0 ) } # [ doc = "Global timebase synchronization enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBSYNC_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Global time base enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEEN_A { # [ doc = "0: All channels use the internally generated TPM counter as their timebase" ] _0 , # [ doc = "1: All channels use an externally generated global timebase as their timebase" ] _1 } impl From < GTBEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEEN_A ) -> Self { match variant { GTBEEN_A :: _0 => false , GTBEEN_A :: _1 => true } } } # [ doc = "Reader of field `GTBEEN`" ] pub type GTBEEN_R = crate :: R < bool , GTBEEN_A > ; impl GTBEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEEN_A { match self . bits { false => GTBEEN_A :: _0 , true => GTBEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEEN_A :: _1 } } # [ doc = "Write proxy for field `GTBEEN`" ] pub struct GTBEEN_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All channels use the internally generated TPM counter as their timebase" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _0 ) } # [ doc = "All channels use an externally generated global timebase as their timebase" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Counter Start on Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CSOT_A { # [ doc = "0: TPM counter starts to increment immediately, once it is enabled." ] _0 , # [ doc = "1: TPM counter only starts to increment when it a rising edge on the selected input trigger is detected, after it has been enabled or after it has stopped due to overflow." ] _1 } impl From < CSOT_A > for bool { # [ inline ( always ) ] fn from ( variant : CSOT_A ) -> Self { match variant { CSOT_A :: _0 => false , CSOT_A :: _1 => true } } } # [ doc = "Reader of field `CSOT`" ] pub type CSOT_R = crate :: R < bool , CSOT_A > ; impl CSOT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CSOT_A { match self . bits { false => CSOT_A :: _0 , true => CSOT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CSOT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CSOT_A :: _1 } } # [ doc = "Write proxy for field `CSOT`" ] pub struct CSOT_W < 'a > { w : & 'a mut W , } impl < 'a > CSOT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CSOT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter starts to increment immediately, once it is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CSOT_A :: _0 ) } # [ doc = "TPM counter only starts to increment when it a rising edge on the selected input trigger is detected, after it has been enabled or after it has stopped due to overflow." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CSOT_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Counter Stop On Overflow\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CSOO_A { # [ doc = "0: TPM counter continues incrementing or decrementing after overflow" ] _0 , # [ doc = "1: TPM counter stops incrementing or decrementing after overflow." ] _1 } impl From < CSOO_A > for bool { # [ inline ( always ) ] fn from ( variant : CSOO_A ) -> Self { match variant { CSOO_A :: _0 => false , CSOO_A :: _1 => true } } } # [ doc = "Reader of field `CSOO`" ] pub type CSOO_R = crate :: R < bool , CSOO_A > ; impl CSOO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CSOO_A { match self . bits { false => CSOO_A :: _0 , true => CSOO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CSOO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CSOO_A :: _1 } } # [ doc = "Write proxy for field `CSOO`" ] pub struct CSOO_W < 'a > { w : & 'a mut W , } impl < 'a > CSOO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CSOO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter continues incrementing or decrementing after overflow" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CSOO_A :: _0 ) } # [ doc = "TPM counter stops incrementing or decrementing after overflow." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CSOO_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Counter Reload On Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROT_A { # [ doc = "0: Counter is not reloaded due to a rising edge on the selected input trigger" ] _0 , # [ doc = "1: Counter is reloaded when a rising edge is detected on the selected input trigger" ] _1 } impl From < CROT_A > for bool { # [ inline ( always ) ] fn from ( variant : CROT_A ) -> Self { match variant { CROT_A :: _0 => false , CROT_A :: _1 => true } } } # [ doc = "Reader of field `CROT`" ] pub type CROT_R = crate :: R < bool , CROT_A > ; impl CROT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CROT_A { match self . bits { false => CROT_A :: _0 , true => CROT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CROT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CROT_A :: _1 } } # [ doc = "Write proxy for field `CROT`" ] pub struct CROT_W < 'a > { w : & 'a mut W , } impl < 'a > CROT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CROT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Counter is not reloaded due to a rising edge on the selected input trigger" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CROT_A :: _0 ) } # [ doc = "Counter is reloaded when a rising edge is detected on the selected input trigger" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CROT_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `CPOT`" ] pub type CPOT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CPOT`" ] pub struct CPOT_W < 'a > { w : & 'a mut W , } impl < 'a > CPOT_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Trigger Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRGPOL_A { # [ doc = "0: Trigger is active high." ] _0 , # [ doc = "1: Trigger is active low." ] _1 } impl From < TRGPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : TRGPOL_A ) -> Self { match variant { TRGPOL_A :: _0 => false , TRGPOL_A :: _1 => true } } } # [ doc = "Reader of field `TRGPOL`" ] pub type TRGPOL_R = crate :: R < bool , TRGPOL_A > ; impl TRGPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRGPOL_A { match self . bits { false => TRGPOL_A :: _0 , true => TRGPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRGPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRGPOL_A :: _1 } } # [ doc = "Write proxy for field `TRGPOL`" ] pub struct TRGPOL_W < 'a > { w : & 'a mut W , } impl < 'a > TRGPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRGPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRGPOL_A :: _0 ) } # [ doc = "Trigger is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRGPOL_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trigger Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRGSRC_A { # [ doc = "0: Trigger source selected by TRGSEL is external." ] _0 , # [ doc = "1: Trigger source selected by TRGSEL is internal (channel pin input capture)." ] _1 } impl From < TRGSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : TRGSRC_A ) -> Self { match variant { TRGSRC_A :: _0 => false , TRGSRC_A :: _1 => true } } } # [ doc = "Reader of field `TRGSRC`" ] pub type TRGSRC_R = crate :: R < bool , TRGSRC_A > ; impl TRGSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRGSRC_A { match self . bits { false => TRGSRC_A :: _0 , true => TRGSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRGSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRGSRC_A :: _1 } } # [ doc = "Write proxy for field `TRGSRC`" ] pub struct TRGSRC_W < 'a > { w : & 'a mut W , } impl < 'a > TRGSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRGSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger source selected by TRGSEL is external." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRGSRC_A :: _0 ) } # [ doc = "Trigger source selected by TRGSEL is internal (channel pin input capture)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRGSRC_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Trigger Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRGSEL_A { # [ doc = "1: Channel 0 pin input capture" ] _0001 , # [ doc = "2: Channel 1 pin input capture" ] _0010 , # [ doc = "3: Channel 0 or Channel 1 pin input capture" ] _0011 } impl From < TRGSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : TRGSEL_A ) -> Self { match variant { TRGSEL_A :: _0001 => 1 , TRGSEL_A :: _0010 => 2 , TRGSEL_A :: _0011 => 3 } } } # [ doc = "Reader of field `TRGSEL`" ] pub type TRGSEL_R = crate :: R < u8 , TRGSEL_A > ; impl TRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TRGSEL_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( TRGSEL_A :: _0001 ) , 2 => Val ( TRGSEL_A :: _0010 ) , 3 => Val ( TRGSEL_A :: _0011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == TRGSEL_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == TRGSEL_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == TRGSEL_A :: _0011 } } # [ doc = "Write proxy for field `TRGSEL`" ] pub struct TRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRGSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Channel 0 pin input capture" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0001 ) } # [ doc = "Channel 1 pin input capture" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0010 ) } # [ doc = "Channel 0 or Channel 1 pin input capture" ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0011 ) } # [ 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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bit 5 - Doze Enable" ] # [ inline ( always ) ] pub fn dozeen ( & self ) -> DOZEEN_R { DOZEEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bits 6:7 - Debug Mode" ] # [ inline ( always ) ] pub fn dbgmode ( & self ) -> DBGMODE_R { DBGMODE_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bit 8 - Global Time Base Synchronization" ] # [ inline ( always ) ] pub fn gtbsync ( & self ) -> GTBSYNC_R { GTBSYNC_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Global time base enable" ] # [ inline ( always ) ] pub fn gtbeen ( & self ) -> GTBEEN_R { GTBEEN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Counter Start on Trigger" ] # [ inline ( always ) ] pub fn csot ( & self ) -> CSOT_R { CSOT_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Counter Stop On Overflow" ] # [ inline ( always ) ] pub fn csoo ( & self ) -> CSOO_R { CSOO_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Counter Reload On Trigger" ] # [ inline ( always ) ] pub fn crot ( & self ) -> CROT_R { CROT_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Counter Pause On Trigger" ] # [ inline ( always ) ] pub fn cpot ( & self ) -> CPOT_R { CPOT_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Trigger Polarity" ] # [ inline ( always ) ] pub fn trgpol ( & self ) -> TRGPOL_R { TRGPOL_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Trigger Source" ] # [ inline ( always ) ] pub fn trgsrc ( & self ) -> TRGSRC_R { TRGSRC_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Trigger Select" ] # [ inline ( always ) ] pub fn trgsel ( & self ) -> TRGSEL_R { TRGSEL_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 5 - Doze Enable" ] # [ inline ( always ) ] pub fn dozeen ( & mut self ) -> DOZEEN_W { DOZEEN_W { w : self } } # [ doc = "Bits 6:7 - Debug Mode" ] # [ inline ( always ) ] pub fn dbgmode ( & mut self ) -> DBGMODE_W { DBGMODE_W { w : self } } # [ doc = "Bit 8 - Global Time Base Synchronization" ] # [ inline ( always ) ] pub fn gtbsync ( & mut self ) -> GTBSYNC_W { GTBSYNC_W { w : self } } # [ doc = "Bit 9 - Global time base enable" ] # [ inline ( always ) ] pub fn gtbeen ( & mut self ) -> GTBEEN_W { GTBEEN_W { w : self } } # [ doc = "Bit 16 - Counter Start on Trigger" ] # [ inline ( always ) ] pub fn csot ( & mut self ) -> CSOT_W { CSOT_W { w : self } } # [ doc = "Bit 17 - Counter Stop On Overflow" ] # [ inline ( always ) ] pub fn csoo ( & mut self ) -> CSOO_W { CSOO_W { w : self } } # [ doc = "Bit 18 - Counter Reload On Trigger" ] # [ inline ( always ) ] pub fn crot ( & mut self ) -> CROT_W { CROT_W { w : self } } # [ doc = "Bit 19 - Counter Pause On Trigger" ] # [ inline ( always ) ] pub fn cpot ( & mut self ) -> CPOT_W { CPOT_W { w : self } } # [ doc = "Bit 22 - Trigger Polarity" ] # [ inline ( always ) ] pub fn trgpol ( & mut self ) -> TRGPOL_W { TRGPOL_W { w : self } } # [ doc = "Bit 23 - Trigger Source" ] # [ inline ( always ) ] pub fn trgsrc ( & mut self ) -> TRGSRC_W { TRGSRC_W { w : self } } # [ doc = "Bits 24:27 - Trigger Select" ] # [ inline ( always ) ] pub fn trgsel ( & mut self ) -> TRGSEL_W { TRGSEL_W { w : self } } } } } # [ doc = "Timer/PWM Module" ] pub struct TPM2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TPM2 { } impl TPM2 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const tpm2 :: RegisterBlock { 0x400c_a000 as * const _ } } impl Deref for TPM2 { type Target = tpm2 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * TPM2 :: ptr ( ) } } } # [ doc = "Timer/PWM Module" ] pub mod tpm2 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Status and Control" ] pub sc : SC , # [ doc = "0x04 - Counter" ] pub cnt : CNT , # [ doc = "0x08 - Modulo" ] pub mod_ : MOD , # [ doc = "0x0c - Channel (n) Status and Control" ] pub c0sc : CSC , # [ doc = "0x10 - Channel (n) Value" ] pub c0v : CV , # [ doc = "0x14 - Channel (n) Status and Control" ] pub c1sc : CSC , # [ doc = "0x18 - Channel (n) Value" ] pub c1v : CV , _reserved7 : [ u8 ; 52usize ] , # [ doc = "0x50 - Capture and Compare Status" ] pub status : STATUS , _reserved8 : [ u8 ; 16usize ] , # [ doc = "0x64 - Combine Channel Register" ] pub combine : COMBINE , _reserved9 : [ u8 ; 8usize ] , # [ doc = "0x70 - Channel Polarity" ] pub pol : POL , _reserved10 : [ u8 ; 4usize ] , # [ doc = "0x78 - Filter Control" ] pub filter : FILTER , _reserved11 : [ u8 ; 4usize ] , # [ doc = "0x80 - Quadrature Decoder Control and Status" ] pub qdctrl : QDCTRL , # [ doc = "0x84 - Configuration" ] pub conf : CONF , } # [ doc = "Status and Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sc](sc) module" ] pub type SC = crate :: Reg < u32 , _SC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SC ; # [ doc = "`read()` method returns [sc::R](sc::R) reader structure" ] impl crate :: Readable for SC { } # [ doc = "`write(|w| ..)` method takes [sc::W](sc::W) writer structure" ] impl crate :: Writable for SC { } # [ doc = "Status and Control" ] pub mod sc { # [ doc = "Reader of register SC" ] pub type R = crate :: R < u32 , super :: SC > ; # [ doc = "Writer for register SC" ] pub type W = crate :: W < u32 , super :: SC > ; # [ doc = "Register SC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Prescale Factor Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PS_A { # [ doc = "0: Divide by 1" ] _000 , # [ doc = "1: Divide by 2" ] _001 , # [ doc = "2: Divide by 4" ] _010 , # [ doc = "3: Divide by 8" ] _011 , # [ doc = "4: Divide by 16" ] _100 , # [ doc = "5: Divide by 32" ] _101 , # [ doc = "6: Divide by 64" ] _110 , # [ doc = "7: Divide by 128" ] _111 } impl From < PS_A > for u8 { # [ inline ( always ) ] fn from ( variant : PS_A ) -> Self { match variant { PS_A :: _000 => 0 , PS_A :: _001 => 1 , PS_A :: _010 => 2 , PS_A :: _011 => 3 , PS_A :: _100 => 4 , PS_A :: _101 => 5 , PS_A :: _110 => 6 , PS_A :: _111 => 7 } } } # [ doc = "Reader of field `PS`" ] pub type PS_R = crate :: R < u8 , PS_A > ; impl PS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PS_A { match self . bits { 0 => PS_A :: _000 , 1 => PS_A :: _001 , 2 => PS_A :: _010 , 3 => PS_A :: _011 , 4 => PS_A :: _100 , 5 => PS_A :: _101 , 6 => PS_A :: _110 , 7 => PS_A :: _111 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_000`" ] # [ inline ( always ) ] pub fn is_000 ( & self ) -> bool { * self == PS_A :: _000 } # [ doc = "Checks if the value of the field is `_001`" ] # [ inline ( always ) ] pub fn is_001 ( & self ) -> bool { * self == PS_A :: _001 } # [ doc = "Checks if the value of the field is `_010`" ] # [ inline ( always ) ] pub fn is_010 ( & self ) -> bool { * self == PS_A :: _010 } # [ doc = "Checks if the value of the field is `_011`" ] # [ inline ( always ) ] pub fn is_011 ( & self ) -> bool { * self == PS_A :: _011 } # [ doc = "Checks if the value of the field is `_100`" ] # [ inline ( always ) ] pub fn is_100 ( & self ) -> bool { * self == PS_A :: _100 } # [ doc = "Checks if the value of the field is `_101`" ] # [ inline ( always ) ] pub fn is_101 ( & self ) -> bool { * self == PS_A :: _101 } # [ doc = "Checks if the value of the field is `_110`" ] # [ inline ( always ) ] pub fn is_110 ( & self ) -> bool { * self == PS_A :: _110 } # [ doc = "Checks if the value of the field is `_111`" ] # [ inline ( always ) ] pub fn is_111 ( & self ) -> bool { * self == PS_A :: _111 } } # [ doc = "Write proxy for field `PS`" ] pub struct PS_W < 'a > { w : & 'a mut W , } impl < 'a > PS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PS_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Divide by 1" ] # [ inline ( always ) ] pub fn _000 ( self ) -> & 'a mut W { self . variant ( PS_A :: _000 ) } # [ doc = "Divide by 2" ] # [ inline ( always ) ] pub fn _001 ( self ) -> & 'a mut W { self . variant ( PS_A :: _001 ) } # [ doc = "Divide by 4" ] # [ inline ( always ) ] pub fn _010 ( self ) -> & 'a mut W { self . variant ( PS_A :: _010 ) } # [ doc = "Divide by 8" ] # [ inline ( always ) ] pub fn _011 ( self ) -> & 'a mut W { self . variant ( PS_A :: _011 ) } # [ doc = "Divide by 16" ] # [ inline ( always ) ] pub fn _100 ( self ) -> & 'a mut W { self . variant ( PS_A :: _100 ) } # [ doc = "Divide by 32" ] # [ inline ( always ) ] pub fn _101 ( self ) -> & 'a mut W { self . variant ( PS_A :: _101 ) } # [ doc = "Divide by 64" ] # [ inline ( always ) ] pub fn _110 ( self ) -> & 'a mut W { self . variant ( PS_A :: _110 ) } # [ doc = "Divide by 128" ] # [ inline ( always ) ] pub fn _111 ( self ) -> & 'a mut W { self . variant ( PS_A :: _111 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07 ) | ( ( value as u32 ) & 0x07 ) ; self . w } } # [ doc = "Clock Mode Selection\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CMOD_A { # [ doc = "0: TPM counter is disabled" ] _00 , # [ doc = "1: TPM counter increments on every TPM counter clock" ] _01 , # [ doc = "2: TPM counter increments on rising edge of TPM_EXTCLK synchronized to the TPM counter clock" ] _10 } impl From < CMOD_A > for u8 { # [ inline ( always ) ] fn from ( variant : CMOD_A ) -> Self { match variant { CMOD_A :: _00 => 0 , CMOD_A :: _01 => 1 , CMOD_A :: _10 => 2 } } } # [ doc = "Reader of field `CMOD`" ] pub type CMOD_R = crate :: R < u8 , CMOD_A > ; impl CMOD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , CMOD_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( CMOD_A :: _00 ) , 1 => Val ( CMOD_A :: _01 ) , 2 => Val ( CMOD_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CMOD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CMOD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CMOD_A :: _10 } } # [ doc = "Write proxy for field `CMOD`" ] pub struct CMOD_W < 'a > { w : & 'a mut W , } impl < 'a > CMOD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CMOD_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "TPM counter is disabled" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CMOD_A :: _00 ) } # [ doc = "TPM counter increments on every TPM counter clock" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CMOD_A :: _01 ) } # [ doc = "TPM counter increments on rising edge of TPM_EXTCLK synchronized to the TPM counter clock" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CMOD_A :: _10 ) } # [ 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 = "Center-Aligned PWM Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPWMS_A { # [ doc = "0: TPM counter operates in up counting mode." ] _0 , # [ doc = "1: TPM counter operates in up-down counting mode." ] _1 } impl From < CPWMS_A > for bool { # [ inline ( always ) ] fn from ( variant : CPWMS_A ) -> Self { match variant { CPWMS_A :: _0 => false , CPWMS_A :: _1 => true } } } # [ doc = "Reader of field `CPWMS`" ] pub type CPWMS_R = crate :: R < bool , CPWMS_A > ; impl CPWMS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPWMS_A { match self . bits { false => CPWMS_A :: _0 , true => CPWMS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPWMS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPWMS_A :: _1 } } # [ doc = "Write proxy for field `CPWMS`" ] pub struct CPWMS_W < 'a > { w : & 'a mut W , } impl < 'a > CPWMS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPWMS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter operates in up counting mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _0 ) } # [ doc = "TPM counter operates in up-down counting mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPWMS_A :: _1 ) } # [ 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 = "Timer Overflow Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOIE_A { # [ doc = "0: Disable TOF interrupts. Use software polling or DMA request." ] _0 , # [ doc = "1: Enable TOF interrupts. An interrupt is generated when TOF equals one." ] _1 } impl From < TOIE_A > for bool { # [ inline ( always ) ] fn from ( variant : TOIE_A ) -> Self { match variant { TOIE_A :: _0 => false , TOIE_A :: _1 => true } } } # [ doc = "Reader of field `TOIE`" ] pub type TOIE_R = crate :: R < bool , TOIE_A > ; impl TOIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOIE_A { match self . bits { false => TOIE_A :: _0 , true => TOIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOIE_A :: _1 } } # [ doc = "Write proxy for field `TOIE`" ] pub struct TOIE_W < 'a > { w : & 'a mut W , } impl < 'a > TOIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable TOF interrupts. Use software polling or DMA request." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _0 ) } # [ doc = "Enable TOF interrupts. An interrupt is generated when TOF equals one." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOIE_A :: _1 ) } # [ 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 = "Timer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: TPM counter has not overflowed." ] _0 , # [ doc = "1: TPM counter has overflowed." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Write proxy for field `TOF`" ] pub struct TOF_W < 'a > { w : & 'a mut W , } impl < 'a > TOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter has not overflowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _0 ) } # [ doc = "TPM counter has overflowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _1 ) } # [ 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 = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Disables DMA transfers." ] _0 , # [ doc = "1: Enables DMA transfers." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disables DMA transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Enables DMA transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } impl R { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & self ) -> PS_R { PS_R :: new ( ( self . bits & 0x07 ) as u8 ) } # [ doc = "Bits 3:4 - Clock Mode Selection" ] # [ inline ( always ) ] pub fn cmod ( & self ) -> CMOD_R { CMOD_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & self ) -> CPWMS_R { CPWMS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & self ) -> TOIE_R { TOIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 0:2 - Prescale Factor Selection" ] # [ inline ( always ) ] pub fn ps ( & mut self ) -> PS_W { PS_W { w : self } } # [ doc = "Bits 3:4 - Clock Mode Selection" ] # [ inline ( always ) ] pub fn cmod ( & mut self ) -> CMOD_W { CMOD_W { w : self } } # [ doc = "Bit 5 - Center-Aligned PWM Select" ] # [ inline ( always ) ] pub fn cpwms ( & mut self ) -> CPWMS_W { CPWMS_W { w : self } } # [ doc = "Bit 6 - Timer Overflow Interrupt Enable" ] # [ inline ( always ) ] pub fn toie ( & mut self ) -> TOIE_W { TOIE_W { w : self } } # [ doc = "Bit 7 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & mut self ) -> TOF_W { TOF_W { w : self } } # [ doc = "Bit 8 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } } } # [ doc = "Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module" ] pub type CNT = crate :: Reg < u32 , _CNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CNT ; # [ doc = "`read()` method returns [cnt::R](cnt::R) reader structure" ] impl crate :: Readable for CNT { } # [ doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure" ] impl crate :: Writable for CNT { } # [ doc = "Counter" ] pub mod cnt { # [ doc = "Reader of register CNT" ] pub type R = crate :: R < u32 , super :: CNT > ; # [ doc = "Writer for register CNT" ] pub type W = crate :: W < u32 , super :: CNT > ; # [ doc = "Register CNT `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CNT { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `COUNT`" ] pub type COUNT_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `COUNT`" ] pub struct COUNT_W < 'a > { w : & 'a mut W , } impl < 'a > COUNT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Counter value" ] # [ inline ( always ) ] pub fn count ( & self ) -> COUNT_R { COUNT_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Counter value" ] # [ inline ( always ) ] pub fn count ( & mut self ) -> COUNT_W { COUNT_W { w : self } } } } # [ doc = "Modulo\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mod_](mod_) module" ] pub type MOD = crate :: Reg < u32 , _MOD > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MOD ; # [ doc = "`read()` method returns [mod_::R](mod_::R) reader structure" ] impl crate :: Readable for MOD { } # [ doc = "`write(|w| ..)` method takes [mod_::W](mod_::W) writer structure" ] impl crate :: Writable for MOD { } # [ doc = "Modulo" ] pub mod mod_ { # [ doc = "Reader of register MOD" ] pub type R = crate :: R < u32 , super :: MOD > ; # [ doc = "Writer for register MOD" ] pub type W = crate :: W < u32 , super :: MOD > ; # [ doc = "Register MOD `reset()`'s with value 0xffff" ] impl crate :: ResetValue for super :: MOD { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xffff } } # [ doc = "Reader of field `MOD`" ] pub type MOD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `MOD`" ] pub struct MOD_W < 'a > { w : & 'a mut W , } impl < 'a > MOD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Modulo value" ] # [ inline ( always ) ] pub fn mod_ ( & self ) -> MOD_R { MOD_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Modulo value" ] # [ inline ( always ) ] pub fn mod_ ( & mut self ) -> MOD_W { MOD_W { w : self } } } } # [ doc = "Channel (n) Status and Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csc](csc) module" ] pub type CSC = crate :: Reg < u32 , _CSC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSC ; # [ doc = "`read()` method returns [csc::R](csc::R) reader structure" ] impl crate :: Readable for CSC { } # [ doc = "`write(|w| ..)` method takes [csc::W](csc::W) writer structure" ] impl crate :: Writable for CSC { } # [ doc = "Channel (n) Status and Control" ] pub mod csc { # [ doc = "Reader of register C%sSC" ] pub type R = crate :: R < u32 , super :: CSC > ; # [ doc = "Writer for register C%sSC" ] pub type W = crate :: W < u32 , super :: CSC > ; # [ doc = "Register C%sSC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CSC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DMA Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMA_A { # [ doc = "0: Disable DMA transfers." ] _0 , # [ doc = "1: Enable DMA transfers." ] _1 } impl From < DMA_A > for bool { # [ inline ( always ) ] fn from ( variant : DMA_A ) -> Self { match variant { DMA_A :: _0 => false , DMA_A :: _1 => true } } } # [ doc = "Reader of field `DMA`" ] pub type DMA_R = crate :: R < bool , DMA_A > ; impl DMA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMA_A { match self . bits { false => DMA_A :: _0 , true => DMA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMA_A :: _1 } } # [ doc = "Write proxy for field `DMA`" ] pub struct DMA_W < 'a > { w : & 'a mut W , } impl < 'a > DMA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable DMA transfers." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _0 ) } # [ doc = "Enable DMA transfers." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMA_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `ELSA`" ] pub type ELSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSA`" ] pub struct ELSA_W < 'a > { w : & 'a mut W , } impl < 'a > ELSA_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 = "Reader of field `ELSB`" ] pub type ELSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `ELSB`" ] pub struct ELSB_W < 'a > { w : & 'a mut W , } impl < 'a > ELSB_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Reader of field `MSA`" ] pub type MSA_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSA`" ] pub struct MSA_W < 'a > { w : & 'a mut W , } impl < 'a > MSA_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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Reader of field `MSB`" ] pub type MSB_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `MSB`" ] pub struct MSB_W < 'a > { w : & 'a mut W , } impl < 'a > MSB_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 = "Channel Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHIE_A { # [ doc = "0: Disable channel interrupts." ] _0 , # [ doc = "1: Enable channel interrupts." ] _1 } impl From < CHIE_A > for bool { # [ inline ( always ) ] fn from ( variant : CHIE_A ) -> Self { match variant { CHIE_A :: _0 => false , CHIE_A :: _1 => true } } } # [ doc = "Reader of field `CHIE`" ] pub type CHIE_R = crate :: R < bool , CHIE_A > ; impl CHIE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHIE_A { match self . bits { false => CHIE_A :: _0 , true => CHIE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHIE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHIE_A :: _1 } } # [ doc = "Write proxy for field `CHIE`" ] pub struct CHIE_W < 'a > { w : & 'a mut W , } impl < 'a > CHIE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHIE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable channel interrupts." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _0 ) } # [ doc = "Enable channel interrupts." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHIE_A :: _1 ) } # [ 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 = "Channel Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CHF_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CHF_A > for bool { # [ inline ( always ) ] fn from ( variant : CHF_A ) -> Self { match variant { CHF_A :: _0 => false , CHF_A :: _1 => true } } } # [ doc = "Reader of field `CHF`" ] pub type CHF_R = crate :: R < bool , CHF_A > ; impl CHF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CHF_A { match self . bits { false => CHF_A :: _0 , true => CHF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CHF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CHF_A :: _1 } } # [ doc = "Write proxy for field `CHF`" ] pub struct CHF_W < 'a > { w : & 'a mut W , } impl < 'a > CHF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CHF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CHF_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & self ) -> DMA_R { DMA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & self ) -> ELSA_R { ELSA_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & self ) -> ELSB_R { ELSB_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & self ) -> MSA_R { MSA_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & self ) -> MSB_R { MSB_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & self ) -> CHIE_R { CHIE_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & self ) -> CHF_R { CHF_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DMA Enable" ] # [ inline ( always ) ] pub fn dma ( & mut self ) -> DMA_W { DMA_W { w : self } } # [ doc = "Bit 2 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsa ( & mut self ) -> ELSA_W { ELSA_W { w : self } } # [ doc = "Bit 3 - Edge or Level Select" ] # [ inline ( always ) ] pub fn elsb ( & mut self ) -> ELSB_W { ELSB_W { w : self } } # [ doc = "Bit 4 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msa ( & mut self ) -> MSA_W { MSA_W { w : self } } # [ doc = "Bit 5 - Channel Mode Select" ] # [ inline ( always ) ] pub fn msb ( & mut self ) -> MSB_W { MSB_W { w : self } } # [ doc = "Bit 6 - Channel Interrupt Enable" ] # [ inline ( always ) ] pub fn chie ( & mut self ) -> CHIE_W { CHIE_W { w : self } } # [ doc = "Bit 7 - Channel Flag" ] # [ inline ( always ) ] pub fn chf ( & mut self ) -> CHF_W { CHF_W { w : self } } } } # [ doc = "Channel (n) Value\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cv](cv) module" ] pub type CV = crate :: Reg < u32 , _CV > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CV ; # [ doc = "`read()` method returns [cv::R](cv::R) reader structure" ] impl crate :: Readable for CV { } # [ doc = "`write(|w| ..)` method takes [cv::W](cv::W) writer structure" ] impl crate :: Writable for CV { } # [ doc = "Channel (n) Value" ] pub mod cv { # [ doc = "Reader of register C%sV" ] pub type R = crate :: R < u32 , super :: CV > ; # [ doc = "Writer for register C%sV" ] pub type W = crate :: W < u32 , super :: CV > ; # [ doc = "Register C%sV `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CV { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VAL`" ] pub type VAL_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `VAL`" ] pub struct VAL_W < 'a > { w : & 'a mut W , } impl < 'a > VAL_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff ) | ( ( value as u32 ) & 0xffff ) ; self . w } } impl R { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & self ) -> VAL_R { VAL_R :: new ( ( self . bits & 0xffff ) as u16 ) } } impl W { # [ doc = "Bits 0:15 - Channel Value" ] # [ inline ( always ) ] pub fn val ( & mut self ) -> VAL_W { VAL_W { w : self } } } } # [ doc = "Capture and Compare Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [status](status) module" ] pub type STATUS = crate :: Reg < u32 , _STATUS > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _STATUS ; # [ doc = "`read()` method returns [status::R](status::R) reader structure" ] impl crate :: Readable for STATUS { } # [ doc = "`write(|w| ..)` method takes [status::W](status::W) writer structure" ] impl crate :: Writable for STATUS { } # [ doc = "Capture and Compare Status" ] pub mod status { # [ doc = "Reader of register STATUS" ] pub type R = crate :: R < u32 , super :: STATUS > ; # [ doc = "Writer for register STATUS" ] pub type W = crate :: W < u32 , super :: STATUS > ; # [ doc = "Register STATUS `reset()`'s with value 0" ] impl crate :: ResetValue for super :: STATUS { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH0F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH0F_A ) -> Self { match variant { CH0F_A :: _0 => false , CH0F_A :: _1 => true } } } # [ doc = "Reader of field `CH0F`" ] pub type CH0F_R = crate :: R < bool , CH0F_A > ; impl CH0F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH0F_A { match self . bits { false => CH0F_A :: _0 , true => CH0F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH0F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH0F_A :: _1 } } # [ doc = "Write proxy for field `CH0F`" ] pub struct CH0F_W < 'a > { w : & 'a mut W , } impl < 'a > CH0F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH0F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH0F_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1F_A { # [ doc = "0: No channel event has occurred." ] _0 , # [ doc = "1: A channel event has occurred." ] _1 } impl From < CH1F_A > for bool { # [ inline ( always ) ] fn from ( variant : CH1F_A ) -> Self { match variant { CH1F_A :: _0 => false , CH1F_A :: _1 => true } } } # [ doc = "Reader of field `CH1F`" ] pub type CH1F_R = crate :: R < bool , CH1F_A > ; impl CH1F_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CH1F_A { match self . bits { false => CH1F_A :: _0 , true => CH1F_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CH1F_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CH1F_A :: _1 } } # [ doc = "Write proxy for field `CH1F`" ] pub struct CH1F_W < 'a > { w : & 'a mut W , } impl < 'a > CH1F_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CH1F_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No channel event has occurred." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _0 ) } # [ doc = "A channel event has occurred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CH1F_A :: _1 ) } # [ 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 } } # [ doc = "Timer Overflow Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOF_A { # [ doc = "0: TPM counter has not overflowed." ] _0 , # [ doc = "1: TPM counter has overflowed." ] _1 } impl From < TOF_A > for bool { # [ inline ( always ) ] fn from ( variant : TOF_A ) -> Self { match variant { TOF_A :: _0 => false , TOF_A :: _1 => true } } } # [ doc = "Reader of field `TOF`" ] pub type TOF_R = crate :: R < bool , TOF_A > ; impl TOF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOF_A { match self . bits { false => TOF_A :: _0 , true => TOF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOF_A :: _1 } } # [ doc = "Write proxy for field `TOF`" ] pub struct TOF_W < 'a > { w : & 'a mut W , } impl < 'a > TOF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TOF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter has not overflowed." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _0 ) } # [ doc = "TPM counter has overflowed." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TOF_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } impl R { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & self ) -> CH0F_R { CH0F_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & self ) -> CH1F_R { CH1F_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & self ) -> TOF_R { TOF_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Flag" ] # [ inline ( always ) ] pub fn ch0f ( & mut self ) -> CH0F_W { CH0F_W { w : self } } # [ doc = "Bit 1 - Channel 1 Flag" ] # [ inline ( always ) ] pub fn ch1f ( & mut self ) -> CH1F_W { CH1F_W { w : self } } # [ doc = "Bit 8 - Timer Overflow Flag" ] # [ inline ( always ) ] pub fn tof ( & mut self ) -> TOF_W { TOF_W { w : self } } } } # [ doc = "Combine Channel Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [combine](combine) module" ] pub type COMBINE = crate :: Reg < u32 , _COMBINE > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _COMBINE ; # [ doc = "`read()` method returns [combine::R](combine::R) reader structure" ] impl crate :: Readable for COMBINE { } # [ doc = "`write(|w| ..)` method takes [combine::W](combine::W) writer structure" ] impl crate :: Writable for COMBINE { } # [ doc = "Combine Channel Register" ] pub mod combine { # [ doc = "Reader of register COMBINE" ] pub type R = crate :: R < u32 , super :: COMBINE > ; # [ doc = "Writer for register COMBINE" ] pub type W = crate :: W < u32 , super :: COMBINE > ; # [ doc = "Register COMBINE `reset()`'s with value 0" ] impl crate :: ResetValue for super :: COMBINE { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Combine Channels 0 and 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMBINE0_A { # [ doc = "0: Channels 0 and 1 are independent." ] _0 , # [ doc = "1: Channels 0 and 1 are combined." ] _1 } impl From < COMBINE0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMBINE0_A ) -> Self { match variant { COMBINE0_A :: _0 => false , COMBINE0_A :: _1 => true } } } # [ doc = "Reader of field `COMBINE0`" ] pub type COMBINE0_R = crate :: R < bool , COMBINE0_A > ; impl COMBINE0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMBINE0_A { match self . bits { false => COMBINE0_A :: _0 , true => COMBINE0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMBINE0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMBINE0_A :: _1 } } # [ doc = "Write proxy for field `COMBINE0`" ] pub struct COMBINE0_W < 'a > { w : & 'a mut W , } impl < 'a > COMBINE0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMBINE0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Channels 0 and 1 are independent." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _0 ) } # [ doc = "Channels 0 and 1 are combined." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMBINE0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Combine Channel 0 and 1 Swap\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMSWAP0_A { # [ doc = "0: Even channel is used for input capture and 1st compare." ] _0 , # [ doc = "1: Odd channel is used for input capture and 1st compare." ] _1 } impl From < COMSWAP0_A > for bool { # [ inline ( always ) ] fn from ( variant : COMSWAP0_A ) -> Self { match variant { COMSWAP0_A :: _0 => false , COMSWAP0_A :: _1 => true } } } # [ doc = "Reader of field `COMSWAP0`" ] pub type COMSWAP0_R = crate :: R < bool , COMSWAP0_A > ; impl COMSWAP0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> COMSWAP0_A { match self . bits { false => COMSWAP0_A :: _0 , true => COMSWAP0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == COMSWAP0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == COMSWAP0_A :: _1 } } # [ doc = "Write proxy for field `COMSWAP0`" ] pub struct COMSWAP0_W < 'a > { w : & 'a mut W , } impl < 'a > COMSWAP0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : COMSWAP0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Even channel is used for input capture and 1st compare." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( COMSWAP0_A :: _0 ) } # [ doc = "Odd channel is used for input capture and 1st compare." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( COMSWAP0_A :: _1 ) } # [ 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 0 - Combine Channels 0 and 1" ] # [ inline ( always ) ] pub fn combine0 ( & self ) -> COMBINE0_R { COMBINE0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Combine Channel 0 and 1 Swap" ] # [ inline ( always ) ] pub fn comswap0 ( & self ) -> COMSWAP0_R { COMSWAP0_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Combine Channels 0 and 1" ] # [ inline ( always ) ] pub fn combine0 ( & mut self ) -> COMBINE0_W { COMBINE0_W { w : self } } # [ doc = "Bit 1 - Combine Channel 0 and 1 Swap" ] # [ inline ( always ) ] pub fn comswap0 ( & mut self ) -> COMSWAP0_W { COMSWAP0_W { w : self } } } } # [ doc = "Channel Polarity\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pol](pol) module" ] pub type POL = crate :: Reg < u32 , _POL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _POL ; # [ doc = "`read()` method returns [pol::R](pol::R) reader structure" ] impl crate :: Readable for POL { } # [ doc = "`write(|w| ..)` method takes [pol::W](pol::W) writer structure" ] impl crate :: Writable for POL { } # [ doc = "Channel Polarity" ] pub mod pol { # [ doc = "Reader of register POL" ] pub type R = crate :: R < u32 , super :: POL > ; # [ doc = "Writer for register POL" ] pub type W = crate :: W < u32 , super :: POL > ; # [ doc = "Register POL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: POL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Channel 0 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL0_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL0_A > for bool { # [ inline ( always ) ] fn from ( variant : POL0_A ) -> Self { match variant { POL0_A :: _0 => false , POL0_A :: _1 => true } } } # [ doc = "Reader of field `POL0`" ] pub type POL0_R = crate :: R < bool , POL0_A > ; impl POL0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL0_A { match self . bits { false => POL0_A :: _0 , true => POL0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL0_A :: _1 } } # [ doc = "Write proxy for field `POL0`" ] pub struct POL0_W < 'a > { w : & 'a mut W , } impl < 'a > POL0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Channel 1 Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POL1_A { # [ doc = "0: The channel polarity is active high." ] _0 , # [ doc = "1: The channel polarity is active low." ] _1 } impl From < POL1_A > for bool { # [ inline ( always ) ] fn from ( variant : POL1_A ) -> Self { match variant { POL1_A :: _0 => false , POL1_A :: _1 => true } } } # [ doc = "Reader of field `POL1`" ] pub type POL1_R = crate :: R < bool , POL1_A > ; impl POL1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> POL1_A { match self . bits { false => POL1_A :: _0 , true => POL1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == POL1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == POL1_A :: _1 } } # [ doc = "Write proxy for field `POL1`" ] pub struct POL1_W < 'a > { w : & 'a mut W , } impl < 'a > POL1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : POL1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The channel polarity is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _0 ) } # [ doc = "The channel polarity is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( POL1_A :: _1 ) } # [ 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 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & self ) -> POL0_R { POL0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & self ) -> POL1_R { POL1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Channel 0 Polarity" ] # [ inline ( always ) ] pub fn pol0 ( & mut self ) -> POL0_W { POL0_W { w : self } } # [ doc = "Bit 1 - Channel 1 Polarity" ] # [ inline ( always ) ] pub fn pol1 ( & mut self ) -> POL1_W { POL1_W { w : self } } } } # [ doc = "Filter Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [filter](filter) module" ] pub type FILTER = crate :: Reg < u32 , _FILTER > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FILTER ; # [ doc = "`read()` method returns [filter::R](filter::R) reader structure" ] impl crate :: Readable for FILTER { } # [ doc = "`write(|w| ..)` method takes [filter::W](filter::W) writer structure" ] impl crate :: Writable for FILTER { } # [ doc = "Filter Control" ] pub mod filter { # [ doc = "Reader of register FILTER" ] pub type R = crate :: R < u32 , super :: FILTER > ; # [ doc = "Writer for register FILTER" ] pub type W = crate :: W < u32 , super :: FILTER > ; # [ doc = "Register FILTER `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FILTER { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CH0FVAL`" ] pub type CH0FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH0FVAL`" ] pub struct CH0FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH0FVAL_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 & ! 0x0f ) | ( ( value as u32 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `CH1FVAL`" ] pub type CH1FVAL_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `CH1FVAL`" ] pub struct CH1FVAL_W < 'a > { w : & 'a mut W , } impl < 'a > CH1FVAL_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u32 ) & 0x0f ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - Channel 0 Filter Value" ] # [ inline ( always ) ] pub fn ch0fval ( & self ) -> CH0FVAL_R { CH0FVAL_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - Channel 1 Filter Value" ] # [ inline ( always ) ] pub fn ch1fval ( & self ) -> CH1FVAL_R { CH1FVAL_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - Channel 0 Filter Value" ] # [ inline ( always ) ] pub fn ch0fval ( & mut self ) -> CH0FVAL_W { CH0FVAL_W { w : self } } # [ doc = "Bits 4:7 - Channel 1 Filter Value" ] # [ inline ( always ) ] pub fn ch1fval ( & mut self ) -> CH1FVAL_W { CH1FVAL_W { w : self } } } } # [ doc = "Quadrature Decoder Control and Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [qdctrl](qdctrl) module" ] pub type QDCTRL = crate :: Reg < u32 , _QDCTRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _QDCTRL ; # [ doc = "`read()` method returns [qdctrl::R](qdctrl::R) reader structure" ] impl crate :: Readable for QDCTRL { } # [ doc = "`write(|w| ..)` method takes [qdctrl::W](qdctrl::W) writer structure" ] impl crate :: Writable for QDCTRL { } # [ doc = "Quadrature Decoder Control and Status" ] pub mod qdctrl { # [ doc = "Reader of register QDCTRL" ] pub type R = crate :: R < u32 , super :: QDCTRL > ; # [ doc = "Writer for register QDCTRL" ] pub type W = crate :: W < u32 , super :: QDCTRL > ; # [ doc = "Register QDCTRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: QDCTRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Enables the quadrature decoder mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADEN_A { # [ doc = "0: Quadrature decoder mode is disabled." ] _0 , # [ doc = "1: Quadrature decoder mode is enabled." ] _1 } impl From < QUADEN_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADEN_A ) -> Self { match variant { QUADEN_A :: _0 => false , QUADEN_A :: _1 => true } } } # [ doc = "Reader of field `QUADEN`" ] pub type QUADEN_R = crate :: R < bool , QUADEN_A > ; impl QUADEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADEN_A { match self . bits { false => QUADEN_A :: _0 , true => QUADEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADEN_A :: _1 } } # [ doc = "Write proxy for field `QUADEN`" ] pub struct QUADEN_W < 'a > { w : & 'a mut W , } impl < 'a > QUADEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Quadrature decoder mode is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _0 ) } # [ doc = "Quadrature decoder mode is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Indicates if the TOF bit was set on the top or the bottom of counting.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TOFDIR_A { # [ doc = "0: TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes from its minimum value (zero) to its maximum value (MOD register)." ] _0 , # [ doc = "1: TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from its maximum value (MOD register) to its minimum value (zero)." ] _1 } impl From < TOFDIR_A > for bool { # [ inline ( always ) ] fn from ( variant : TOFDIR_A ) -> Self { match variant { TOFDIR_A :: _0 => false , TOFDIR_A :: _1 => true } } } # [ doc = "Reader of field `TOFDIR`" ] pub type TOFDIR_R = crate :: R < bool , TOFDIR_A > ; impl TOFDIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TOFDIR_A { match self . bits { false => TOFDIR_A :: _0 , true => TOFDIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TOFDIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TOFDIR_A :: _1 } } # [ doc = "Counter Direction in Quadrature Decode Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADIR_A { # [ doc = "0: Counter direction is decreasing (counter decrement)." ] _0 , # [ doc = "1: Counter direction is increasing (counter increment)." ] _1 } impl From < QUADIR_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADIR_A ) -> Self { match variant { QUADIR_A :: _0 => false , QUADIR_A :: _1 => true } } } # [ doc = "Reader of field `QUADIR`" ] pub type QUADIR_R = crate :: R < bool , QUADIR_A > ; impl QUADIR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADIR_A { match self . bits { false => QUADIR_A :: _0 , true => QUADIR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADIR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADIR_A :: _1 } } # [ doc = "Quadrature Decoder Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum QUADMODE_A { # [ doc = "0: Phase encoding mode." ] _0 , # [ doc = "1: Count and direction encoding mode." ] _1 } impl From < QUADMODE_A > for bool { # [ inline ( always ) ] fn from ( variant : QUADMODE_A ) -> Self { match variant { QUADMODE_A :: _0 => false , QUADMODE_A :: _1 => true } } } # [ doc = "Reader of field `QUADMODE`" ] pub type QUADMODE_R = crate :: R < bool , QUADMODE_A > ; impl QUADMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> QUADMODE_A { match self . bits { false => QUADMODE_A :: _0 , true => QUADMODE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == QUADMODE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == QUADMODE_A :: _1 } } # [ doc = "Write proxy for field `QUADMODE`" ] pub struct QUADMODE_W < 'a > { w : & 'a mut W , } impl < 'a > QUADMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : QUADMODE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Phase encoding mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _0 ) } # [ doc = "Count and direction encoding mode." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( QUADMODE_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } impl R { # [ doc = "Bit 0 - Enables the quadrature decoder mode" ] # [ inline ( always ) ] pub fn quaden ( & self ) -> QUADEN_R { QUADEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Indicates if the TOF bit was set on the top or the bottom of counting." ] # [ inline ( always ) ] pub fn tofdir ( & self ) -> TOFDIR_R { TOFDIR_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Counter Direction in Quadrature Decode Mode" ] # [ inline ( always ) ] pub fn quadir ( & self ) -> QUADIR_R { QUADIR_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & self ) -> QUADMODE_R { QUADMODE_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Enables the quadrature decoder mode" ] # [ inline ( always ) ] pub fn quaden ( & mut self ) -> QUADEN_W { QUADEN_W { w : self } } # [ doc = "Bit 3 - Quadrature Decoder Mode" ] # [ inline ( always ) ] pub fn quadmode ( & mut self ) -> QUADMODE_W { QUADMODE_W { w : self } } } } # [ doc = "Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [conf](conf) module" ] pub type CONF = crate :: Reg < u32 , _CONF > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CONF ; # [ doc = "`read()` method returns [conf::R](conf::R) reader structure" ] impl crate :: Readable for CONF { } # [ doc = "`write(|w| ..)` method takes [conf::W](conf::W) writer structure" ] impl crate :: Writable for CONF { } # [ doc = "Configuration" ] pub mod conf { # [ doc = "Reader of register CONF" ] pub type R = crate :: R < u32 , super :: CONF > ; # [ doc = "Writer for register CONF" ] pub type W = crate :: W < u32 , super :: CONF > ; # [ doc = "Register CONF `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CONF { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Doze Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOZEEN_A { # [ doc = "0: Internal TPM counter continues in Doze mode." ] _0 , # [ doc = "1: Internal TPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture events are also ignored." ] _1 } impl From < DOZEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DOZEEN_A ) -> Self { match variant { DOZEEN_A :: _0 => false , DOZEEN_A :: _1 => true } } } # [ doc = "Reader of field `DOZEEN`" ] pub type DOZEEN_R = crate :: R < bool , DOZEEN_A > ; impl DOZEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DOZEEN_A { match self . bits { false => DOZEEN_A :: _0 , true => DOZEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DOZEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DOZEEN_A :: _1 } } # [ doc = "Write proxy for field `DOZEEN`" ] pub struct DOZEEN_W < 'a > { w : & 'a mut W , } impl < 'a > DOZEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DOZEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Internal TPM counter continues in Doze mode." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DOZEEN_A :: _0 ) } # [ doc = "Internal TPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture events are also ignored." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DOZEEN_A :: _1 ) } # [ 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 = "Debug Mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBGMODE_A { # [ doc = "0: TPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events are also ignored." ] _00 , # [ doc = "3: TPM counter continues in debug mode." ] _11 } impl From < DBGMODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : DBGMODE_A ) -> Self { match variant { DBGMODE_A :: _00 => 0 , DBGMODE_A :: _11 => 3 } } } # [ doc = "Reader of field `DBGMODE`" ] pub type DBGMODE_R = crate :: R < u8 , DBGMODE_A > ; impl DBGMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DBGMODE_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DBGMODE_A :: _00 ) , 3 => Val ( DBGMODE_A :: _11 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DBGMODE_A :: _00 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DBGMODE_A :: _11 } } # [ doc = "Write proxy for field `DBGMODE`" ] pub struct DBGMODE_W < 'a > { w : & 'a mut W , } impl < 'a > DBGMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DBGMODE_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "TPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events are also ignored." ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DBGMODE_A :: _00 ) } # [ doc = "TPM counter continues in debug mode." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DBGMODE_A :: _11 ) } # [ 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 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Global Time Base Synchronization\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBSYNC_A { # [ doc = "0: Global timebase synchronization disabled." ] _0 , # [ doc = "1: Global timebase synchronization enabled." ] _1 } impl From < GTBSYNC_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBSYNC_A ) -> Self { match variant { GTBSYNC_A :: _0 => false , GTBSYNC_A :: _1 => true } } } # [ doc = "Reader of field `GTBSYNC`" ] pub type GTBSYNC_R = crate :: R < bool , GTBSYNC_A > ; impl GTBSYNC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBSYNC_A { match self . bits { false => GTBSYNC_A :: _0 , true => GTBSYNC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBSYNC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBSYNC_A :: _1 } } # [ doc = "Write proxy for field `GTBSYNC`" ] pub struct GTBSYNC_W < 'a > { w : & 'a mut W , } impl < 'a > GTBSYNC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBSYNC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Global timebase synchronization disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBSYNC_A :: _0 ) } # [ doc = "Global timebase synchronization enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBSYNC_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Global time base enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GTBEEN_A { # [ doc = "0: All channels use the internally generated TPM counter as their timebase" ] _0 , # [ doc = "1: All channels use an externally generated global timebase as their timebase" ] _1 } impl From < GTBEEN_A > for bool { # [ inline ( always ) ] fn from ( variant : GTBEEN_A ) -> Self { match variant { GTBEEN_A :: _0 => false , GTBEEN_A :: _1 => true } } } # [ doc = "Reader of field `GTBEEN`" ] pub type GTBEEN_R = crate :: R < bool , GTBEEN_A > ; impl GTBEEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GTBEEN_A { match self . bits { false => GTBEEN_A :: _0 , true => GTBEEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GTBEEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GTBEEN_A :: _1 } } # [ doc = "Write proxy for field `GTBEEN`" ] pub struct GTBEEN_W < 'a > { w : & 'a mut W , } impl < 'a > GTBEEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GTBEEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "All channels use the internally generated TPM counter as their timebase" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _0 ) } # [ doc = "All channels use an externally generated global timebase as their timebase" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GTBEEN_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Counter Start on Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CSOT_A { # [ doc = "0: TPM counter starts to increment immediately, once it is enabled." ] _0 , # [ doc = "1: TPM counter only starts to increment when it a rising edge on the selected input trigger is detected, after it has been enabled or after it has stopped due to overflow." ] _1 } impl From < CSOT_A > for bool { # [ inline ( always ) ] fn from ( variant : CSOT_A ) -> Self { match variant { CSOT_A :: _0 => false , CSOT_A :: _1 => true } } } # [ doc = "Reader of field `CSOT`" ] pub type CSOT_R = crate :: R < bool , CSOT_A > ; impl CSOT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CSOT_A { match self . bits { false => CSOT_A :: _0 , true => CSOT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CSOT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CSOT_A :: _1 } } # [ doc = "Write proxy for field `CSOT`" ] pub struct CSOT_W < 'a > { w : & 'a mut W , } impl < 'a > CSOT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CSOT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter starts to increment immediately, once it is enabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CSOT_A :: _0 ) } # [ doc = "TPM counter only starts to increment when it a rising edge on the selected input trigger is detected, after it has been enabled or after it has stopped due to overflow." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CSOT_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Counter Stop On Overflow\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CSOO_A { # [ doc = "0: TPM counter continues incrementing or decrementing after overflow" ] _0 , # [ doc = "1: TPM counter stops incrementing or decrementing after overflow." ] _1 } impl From < CSOO_A > for bool { # [ inline ( always ) ] fn from ( variant : CSOO_A ) -> Self { match variant { CSOO_A :: _0 => false , CSOO_A :: _1 => true } } } # [ doc = "Reader of field `CSOO`" ] pub type CSOO_R = crate :: R < bool , CSOO_A > ; impl CSOO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CSOO_A { match self . bits { false => CSOO_A :: _0 , true => CSOO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CSOO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CSOO_A :: _1 } } # [ doc = "Write proxy for field `CSOO`" ] pub struct CSOO_W < 'a > { w : & 'a mut W , } impl < 'a > CSOO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CSOO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "TPM counter continues incrementing or decrementing after overflow" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CSOO_A :: _0 ) } # [ doc = "TPM counter stops incrementing or decrementing after overflow." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CSOO_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Counter Reload On Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROT_A { # [ doc = "0: Counter is not reloaded due to a rising edge on the selected input trigger" ] _0 , # [ doc = "1: Counter is reloaded when a rising edge is detected on the selected input trigger" ] _1 } impl From < CROT_A > for bool { # [ inline ( always ) ] fn from ( variant : CROT_A ) -> Self { match variant { CROT_A :: _0 => false , CROT_A :: _1 => true } } } # [ doc = "Reader of field `CROT`" ] pub type CROT_R = crate :: R < bool , CROT_A > ; impl CROT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CROT_A { match self . bits { false => CROT_A :: _0 , true => CROT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CROT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CROT_A :: _1 } } # [ doc = "Write proxy for field `CROT`" ] pub struct CROT_W < 'a > { w : & 'a mut W , } impl < 'a > CROT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CROT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Counter is not reloaded due to a rising edge on the selected input trigger" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CROT_A :: _0 ) } # [ doc = "Counter is reloaded when a rising edge is detected on the selected input trigger" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CROT_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Reader of field `CPOT`" ] pub type CPOT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `CPOT`" ] pub struct CPOT_W < 'a > { w : & 'a mut W , } impl < 'a > CPOT_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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Trigger Polarity\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRGPOL_A { # [ doc = "0: Trigger is active high." ] _0 , # [ doc = "1: Trigger is active low." ] _1 } impl From < TRGPOL_A > for bool { # [ inline ( always ) ] fn from ( variant : TRGPOL_A ) -> Self { match variant { TRGPOL_A :: _0 => false , TRGPOL_A :: _1 => true } } } # [ doc = "Reader of field `TRGPOL`" ] pub type TRGPOL_R = crate :: R < bool , TRGPOL_A > ; impl TRGPOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRGPOL_A { match self . bits { false => TRGPOL_A :: _0 , true => TRGPOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRGPOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRGPOL_A :: _1 } } # [ doc = "Write proxy for field `TRGPOL`" ] pub struct TRGPOL_W < 'a > { w : & 'a mut W , } impl < 'a > TRGPOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRGPOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger is active high." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRGPOL_A :: _0 ) } # [ doc = "Trigger is active low." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRGPOL_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Trigger Source\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRGSRC_A { # [ doc = "0: Trigger source selected by TRGSEL is external." ] _0 , # [ doc = "1: Trigger source selected by TRGSEL is internal (channel pin input capture)." ] _1 } impl From < TRGSRC_A > for bool { # [ inline ( always ) ] fn from ( variant : TRGSRC_A ) -> Self { match variant { TRGSRC_A :: _0 => false , TRGSRC_A :: _1 => true } } } # [ doc = "Reader of field `TRGSRC`" ] pub type TRGSRC_R = crate :: R < bool , TRGSRC_A > ; impl TRGSRC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TRGSRC_A { match self . bits { false => TRGSRC_A :: _0 , true => TRGSRC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TRGSRC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TRGSRC_A :: _1 } } # [ doc = "Write proxy for field `TRGSRC`" ] pub struct TRGSRC_W < 'a > { w : & 'a mut W , } impl < 'a > TRGSRC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRGSRC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Trigger source selected by TRGSEL is external." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TRGSRC_A :: _0 ) } # [ doc = "Trigger source selected by TRGSEL is internal (channel pin input capture)." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TRGSRC_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Trigger Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRGSEL_A { # [ doc = "1: Channel 0 pin input capture" ] _0001 , # [ doc = "2: Channel 1 pin input capture" ] _0010 , # [ doc = "3: Channel 0 or Channel 1 pin input capture" ] _0011 } impl From < TRGSEL_A > for u8 { # [ inline ( always ) ] fn from ( variant : TRGSEL_A ) -> Self { match variant { TRGSEL_A :: _0001 => 1 , TRGSEL_A :: _0010 => 2 , TRGSEL_A :: _0011 => 3 } } } # [ doc = "Reader of field `TRGSEL`" ] pub type TRGSEL_R = crate :: R < u8 , TRGSEL_A > ; impl TRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , TRGSEL_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( TRGSEL_A :: _0001 ) , 2 => Val ( TRGSEL_A :: _0010 ) , 3 => Val ( TRGSEL_A :: _0011 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == TRGSEL_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == TRGSEL_A :: _0010 } # [ doc = "Checks if the value of the field is `_0011`" ] # [ inline ( always ) ] pub fn is_0011 ( & self ) -> bool { * self == TRGSEL_A :: _0011 } } # [ doc = "Write proxy for field `TRGSEL`" ] pub struct TRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TRGSEL_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Channel 0 pin input capture" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0001 ) } # [ doc = "Channel 1 pin input capture" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0010 ) } # [ doc = "Channel 0 or Channel 1 pin input capture" ] # [ inline ( always ) ] pub fn _0011 ( self ) -> & 'a mut W { self . variant ( TRGSEL_A :: _0011 ) } # [ 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 & ! ( 0x0f << 24 ) ) | ( ( ( value as u32 ) & 0x0f ) << 24 ) ; self . w } } impl R { # [ doc = "Bit 5 - Doze Enable" ] # [ inline ( always ) ] pub fn dozeen ( & self ) -> DOZEEN_R { DOZEEN_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bits 6:7 - Debug Mode" ] # [ inline ( always ) ] pub fn dbgmode ( & self ) -> DBGMODE_R { DBGMODE_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bit 8 - Global Time Base Synchronization" ] # [ inline ( always ) ] pub fn gtbsync ( & self ) -> GTBSYNC_R { GTBSYNC_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Global time base enable" ] # [ inline ( always ) ] pub fn gtbeen ( & self ) -> GTBEEN_R { GTBEEN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Counter Start on Trigger" ] # [ inline ( always ) ] pub fn csot ( & self ) -> CSOT_R { CSOT_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Counter Stop On Overflow" ] # [ inline ( always ) ] pub fn csoo ( & self ) -> CSOO_R { CSOO_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Counter Reload On Trigger" ] # [ inline ( always ) ] pub fn crot ( & self ) -> CROT_R { CROT_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Counter Pause On Trigger" ] # [ inline ( always ) ] pub fn cpot ( & self ) -> CPOT_R { CPOT_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Trigger Polarity" ] # [ inline ( always ) ] pub fn trgpol ( & self ) -> TRGPOL_R { TRGPOL_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Trigger Source" ] # [ inline ( always ) ] pub fn trgsrc ( & self ) -> TRGSRC_R { TRGSRC_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:27 - Trigger Select" ] # [ inline ( always ) ] pub fn trgsel ( & self ) -> TRGSEL_R { TRGSEL_R :: new ( ( ( self . bits >> 24 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bit 5 - Doze Enable" ] # [ inline ( always ) ] pub fn dozeen ( & mut self ) -> DOZEEN_W { DOZEEN_W { w : self } } # [ doc = "Bits 6:7 - Debug Mode" ] # [ inline ( always ) ] pub fn dbgmode ( & mut self ) -> DBGMODE_W { DBGMODE_W { w : self } } # [ doc = "Bit 8 - Global Time Base Synchronization" ] # [ inline ( always ) ] pub fn gtbsync ( & mut self ) -> GTBSYNC_W { GTBSYNC_W { w : self } } # [ doc = "Bit 9 - Global time base enable" ] # [ inline ( always ) ] pub fn gtbeen ( & mut self ) -> GTBEEN_W { GTBEEN_W { w : self } } # [ doc = "Bit 16 - Counter Start on Trigger" ] # [ inline ( always ) ] pub fn csot ( & mut self ) -> CSOT_W { CSOT_W { w : self } } # [ doc = "Bit 17 - Counter Stop On Overflow" ] # [ inline ( always ) ] pub fn csoo ( & mut self ) -> CSOO_W { CSOO_W { w : self } } # [ doc = "Bit 18 - Counter Reload On Trigger" ] # [ inline ( always ) ] pub fn crot ( & mut self ) -> CROT_W { CROT_W { w : self } } # [ doc = "Bit 19 - Counter Pause On Trigger" ] # [ inline ( always ) ] pub fn cpot ( & mut self ) -> CPOT_W { CPOT_W { w : self } } # [ doc = "Bit 22 - Trigger Polarity" ] # [ inline ( always ) ] pub fn trgpol ( & mut self ) -> TRGPOL_W { TRGPOL_W { w : self } } # [ doc = "Bit 23 - Trigger Source" ] # [ inline ( always ) ] pub fn trgsrc ( & mut self ) -> TRGSRC_W { TRGSRC_W { w : self } } # [ doc = "Bits 24:27 - Trigger Select" ] # [ inline ( always ) ] pub fn trgsel ( & mut self ) -> TRGSEL_W { TRGSEL_W { w : self } } } } } # [ doc = "12-Bit Digital-to-Analog Converter" ] pub struct DAC0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for DAC0 { } impl DAC0 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const dac0 :: RegisterBlock { 0x400c_c000 as * const _ } } impl Deref for DAC0 { type Target = dac0 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * DAC0 :: ptr ( ) } } } # [ doc = "12-Bit Digital-to-Analog Converter" ] pub mod dac0 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - DAC Data Low Register" ] pub dat0l : DATL , # [ doc = "0x01 - DAC Data High Register" ] pub dat0h : DATH , # [ doc = "0x02 - DAC Data Low Register" ] pub dat1l : DATL , # [ doc = "0x03 - DAC Data High Register" ] pub dat1h : DATH , # [ doc = "0x04 - DAC Data Low Register" ] pub dat2l : DATL , # [ doc = "0x05 - DAC Data High Register" ] pub dat2h : DATH , # [ doc = "0x06 - DAC Data Low Register" ] pub dat3l : DATL , # [ doc = "0x07 - DAC Data High Register" ] pub dat3h : DATH , # [ doc = "0x08 - DAC Data Low Register" ] pub dat4l : DATL , # [ doc = "0x09 - DAC Data High Register" ] pub dat4h : DATH , # [ doc = "0x0a - DAC Data Low Register" ] pub dat5l : DATL , # [ doc = "0x0b - DAC Data High Register" ] pub dat5h : DATH , # [ doc = "0x0c - DAC Data Low Register" ] pub dat6l : DATL , # [ doc = "0x0d - DAC Data High Register" ] pub dat6h : DATH , # [ doc = "0x0e - DAC Data Low Register" ] pub dat7l : DATL , # [ doc = "0x0f - DAC Data High Register" ] pub dat7h : DATH , # [ doc = "0x10 - DAC Data Low Register" ] pub dat8l : DATL , # [ doc = "0x11 - DAC Data High Register" ] pub dat8h : DATH , # [ doc = "0x12 - DAC Data Low Register" ] pub dat9l : DATL , # [ doc = "0x13 - DAC Data High Register" ] pub dat9h : DATH , # [ doc = "0x14 - DAC Data Low Register" ] pub dat10l : DATL , # [ doc = "0x15 - DAC Data High Register" ] pub dat10h : DATH , # [ doc = "0x16 - DAC Data Low Register" ] pub dat11l : DATL , # [ doc = "0x17 - DAC Data High Register" ] pub dat11h : DATH , # [ doc = "0x18 - DAC Data Low Register" ] pub dat12l : DATL , # [ doc = "0x19 - DAC Data High Register" ] pub dat12h : DATH , # [ doc = "0x1a - DAC Data Low Register" ] pub dat13l : DATL , # [ doc = "0x1b - DAC Data High Register" ] pub dat13h : DATH , # [ doc = "0x1c - DAC Data Low Register" ] pub dat14l : DATL , # [ doc = "0x1d - DAC Data High Register" ] pub dat14h : DATH , # [ doc = "0x1e - DAC Data Low Register" ] pub dat15l : DATL , # [ doc = "0x1f - DAC Data High Register" ] pub dat15h : DATH , # [ doc = "0x20 - DAC Status Register" ] pub sr : SR , # [ doc = "0x21 - DAC Control Register" ] pub c0 : C0 , # [ doc = "0x22 - DAC Control Register 1" ] pub c1 : C1 , # [ doc = "0x23 - DAC Control Register 2" ] pub c2 : C2 , } # [ doc = "DAC Data Low Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datl](datl) module" ] pub type DATL = crate :: Reg < u8 , _DATL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATL ; # [ doc = "`read()` method returns [datl::R](datl::R) reader structure" ] impl crate :: Readable for DATL { } # [ doc = "`write(|w| ..)` method takes [datl::W](datl::W) writer structure" ] impl crate :: Writable for DATL { } # [ doc = "DAC Data Low Register" ] pub mod datl { # [ doc = "Reader of register DAT%sL" ] pub type R = crate :: R < u8 , super :: DATL > ; # [ doc = "Writer for register DAT%sL" ] pub type W = crate :: W < u8 , super :: DATL > ; # [ doc = "Register DAT%sL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA0`" ] pub type DATA0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA0`" ] pub struct DATA0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA0_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - DATA0" ] # [ inline ( always ) ] pub fn data0 ( & self ) -> DATA0_R { DATA0_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - DATA0" ] # [ inline ( always ) ] pub fn data0 ( & mut self ) -> DATA0_W { DATA0_W { w : self } } } } # [ doc = "DAC Data High Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dath](dath) module" ] pub type DATH = crate :: Reg < u8 , _DATH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATH ; # [ doc = "`read()` method returns [dath::R](dath::R) reader structure" ] impl crate :: Readable for DATH { } # [ doc = "`write(|w| ..)` method takes [dath::W](dath::W) writer structure" ] impl crate :: Writable for DATH { } # [ doc = "DAC Data High Register" ] pub mod dath { # [ doc = "Reader of register DAT%sH" ] pub type R = crate :: R < u8 , super :: DATH > ; # [ doc = "Writer for register DAT%sH" ] pub type W = crate :: W < u8 , super :: DATH > ; # [ doc = "Register DAT%sH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA1`" ] pub type DATA1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA1`" ] pub struct DATA1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA1_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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } impl R { # [ doc = "Bits 0:3 - DATA1" ] # [ inline ( always ) ] pub fn data1 ( & self ) -> DATA1_R { DATA1_R :: new ( ( self . bits & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - DATA1" ] # [ inline ( always ) ] pub fn data1 ( & mut self ) -> DATA1_W { DATA1_W { w : self } } } } # [ doc = "DAC Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sr](sr) module" ] pub type SR = crate :: Reg < u8 , _SR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SR ; # [ doc = "`read()` method returns [sr::R](sr::R) reader structure" ] impl crate :: Readable for SR { } # [ doc = "`write(|w| ..)` method takes [sr::W](sr::W) writer structure" ] impl crate :: Writable for SR { } # [ doc = "DAC Status Register" ] pub mod sr { # [ doc = "Reader of register SR" ] pub type R = crate :: R < u8 , super :: SR > ; # [ doc = "Writer for register SR" ] pub type W = crate :: W < u8 , super :: SR > ; # [ doc = "Register SR `reset()`'s with value 0x02" ] impl crate :: ResetValue for super :: SR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x02 } } # [ doc = "DAC Buffer Read Pointer Bottom Position Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFRPBF_A { # [ doc = "0: The DAC buffer read pointer is not equal to C2\\[DACBFUP\\]." ] _0 , # [ doc = "1: The DAC buffer read pointer is equal to C2\\[DACBFUP\\]." ] _1 } impl From < DACBFRPBF_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBFRPBF_A ) -> Self { match variant { DACBFRPBF_A :: _0 => false , DACBFRPBF_A :: _1 => true } } } # [ doc = "Reader of field `DACBFRPBF`" ] pub type DACBFRPBF_R = crate :: R < bool , DACBFRPBF_A > ; impl DACBFRPBF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFRPBF_A { match self . bits { false => DACBFRPBF_A :: _0 , true => DACBFRPBF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBFRPBF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBFRPBF_A :: _1 } } # [ doc = "Write proxy for field `DACBFRPBF`" ] pub struct DACBFRPBF_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFRPBF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFRPBF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer is not equal to C2\\[DACBFUP\\]." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBFRPBF_A :: _0 ) } # [ doc = "The DAC buffer read pointer is equal to C2\\[DACBFUP\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBFRPBF_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "DAC Buffer Read Pointer Top Position Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFRPTF_A { # [ doc = "0: The DAC buffer read pointer is not zero." ] _0 , # [ doc = "1: The DAC buffer read pointer is zero." ] _1 } impl From < DACBFRPTF_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBFRPTF_A ) -> Self { match variant { DACBFRPTF_A :: _0 => false , DACBFRPTF_A :: _1 => true } } } # [ doc = "Reader of field `DACBFRPTF`" ] pub type DACBFRPTF_R = crate :: R < bool , DACBFRPTF_A > ; impl DACBFRPTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFRPTF_A { match self . bits { false => DACBFRPTF_A :: _0 , true => DACBFRPTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBFRPTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBFRPTF_A :: _1 } } # [ doc = "Write proxy for field `DACBFRPTF`" ] pub struct DACBFRPTF_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFRPTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFRPTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer is not zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBFRPTF_A :: _0 ) } # [ doc = "The DAC buffer read pointer is zero." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBFRPTF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "DAC Buffer Watermark Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFWMF_A { # [ doc = "0: The DAC buffer read pointer has not reached the watermark level." ] _0 , # [ doc = "1: The DAC buffer read pointer has reached the watermark level." ] _1 } impl From < DACBFWMF_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBFWMF_A ) -> Self { match variant { DACBFWMF_A :: _0 => false , DACBFWMF_A :: _1 => true } } } # [ doc = "Reader of field `DACBFWMF`" ] pub type DACBFWMF_R = crate :: R < bool , DACBFWMF_A > ; impl DACBFWMF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFWMF_A { match self . bits { false => DACBFWMF_A :: _0 , true => DACBFWMF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBFWMF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBFWMF_A :: _1 } } # [ doc = "Write proxy for field `DACBFWMF`" ] pub struct DACBFWMF_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFWMF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFWMF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer has not reached the watermark level." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBFWMF_A :: _0 ) } # [ doc = "The DAC buffer read pointer has reached the watermark level." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBFWMF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } impl R { # [ doc = "Bit 0 - DAC Buffer Read Pointer Bottom Position Flag" ] # [ inline ( always ) ] pub fn dacbfrpbf ( & self ) -> DACBFRPBF_R { DACBFRPBF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - DAC Buffer Read Pointer Top Position Flag" ] # [ inline ( always ) ] pub fn dacbfrptf ( & self ) -> DACBFRPTF_R { DACBFRPTF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - DAC Buffer Watermark Flag" ] # [ inline ( always ) ] pub fn dacbfwmf ( & self ) -> DACBFWMF_R { DACBFWMF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DAC Buffer Read Pointer Bottom Position Flag" ] # [ inline ( always ) ] pub fn dacbfrpbf ( & mut self ) -> DACBFRPBF_W { DACBFRPBF_W { w : self } } # [ doc = "Bit 1 - DAC Buffer Read Pointer Top Position Flag" ] # [ inline ( always ) ] pub fn dacbfrptf ( & mut self ) -> DACBFRPTF_W { DACBFRPTF_W { w : self } } # [ doc = "Bit 2 - DAC Buffer Watermark Flag" ] # [ inline ( always ) ] pub fn dacbfwmf ( & mut self ) -> DACBFWMF_W { DACBFWMF_W { w : self } } } } # [ doc = "DAC Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c0](c0) module" ] pub type C0 = crate :: Reg < u8 , _C0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C0 ; # [ doc = "`read()` method returns [c0::R](c0::R) reader structure" ] impl crate :: Readable for C0 { } # [ doc = "`write(|w| ..)` method takes [c0::W](c0::W) writer structure" ] impl crate :: Writable for C0 { } # [ doc = "DAC Control Register" ] pub mod c0 { # [ doc = "Reader of register C0" ] pub type R = crate :: R < u8 , super :: C0 > ; # [ doc = "Writer for register C0" ] pub type W = crate :: W < u8 , super :: C0 > ; # [ doc = "Register C0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DAC Buffer Read Pointer Bottom Flag Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBBIEN_A { # [ doc = "0: The DAC buffer read pointer bottom flag interrupt is disabled." ] _0 , # [ doc = "1: The DAC buffer read pointer bottom flag interrupt is enabled." ] _1 } impl From < DACBBIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBBIEN_A ) -> Self { match variant { DACBBIEN_A :: _0 => false , DACBBIEN_A :: _1 => true } } } # [ doc = "Reader of field `DACBBIEN`" ] pub type DACBBIEN_R = crate :: R < bool , DACBBIEN_A > ; impl DACBBIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBBIEN_A { match self . bits { false => DACBBIEN_A :: _0 , true => DACBBIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBBIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBBIEN_A :: _1 } } # [ doc = "Write proxy for field `DACBBIEN`" ] pub struct DACBBIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACBBIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBBIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer bottom flag interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBBIEN_A :: _0 ) } # [ doc = "The DAC buffer read pointer bottom flag interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBBIEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "DAC Buffer Read Pointer Top Flag Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBTIEN_A { # [ doc = "0: The DAC buffer read pointer top flag interrupt is disabled." ] _0 , # [ doc = "1: The DAC buffer read pointer top flag interrupt is enabled." ] _1 } impl From < DACBTIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBTIEN_A ) -> Self { match variant { DACBTIEN_A :: _0 => false , DACBTIEN_A :: _1 => true } } } # [ doc = "Reader of field `DACBTIEN`" ] pub type DACBTIEN_R = crate :: R < bool , DACBTIEN_A > ; impl DACBTIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBTIEN_A { match self . bits { false => DACBTIEN_A :: _0 , true => DACBTIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBTIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBTIEN_A :: _1 } } # [ doc = "Write proxy for field `DACBTIEN`" ] pub struct DACBTIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACBTIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBTIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer top flag interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBTIEN_A :: _0 ) } # [ doc = "The DAC buffer read pointer top flag interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBTIEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "DAC Buffer Watermark Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBWIEN_A { # [ doc = "0: The DAC buffer watermark interrupt is disabled." ] _0 , # [ doc = "1: The DAC buffer watermark interrupt is enabled." ] _1 } impl From < DACBWIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBWIEN_A ) -> Self { match variant { DACBWIEN_A :: _0 => false , DACBWIEN_A :: _1 => true } } } # [ doc = "Reader of field `DACBWIEN`" ] pub type DACBWIEN_R = crate :: R < bool , DACBWIEN_A > ; impl DACBWIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBWIEN_A { match self . bits { false => DACBWIEN_A :: _0 , true => DACBWIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBWIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBWIEN_A :: _1 } } # [ doc = "Write proxy for field `DACBWIEN`" ] pub struct DACBWIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACBWIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBWIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer watermark interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBWIEN_A :: _0 ) } # [ doc = "The DAC buffer watermark interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBWIEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "DAC Low Power Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPEN_A { # [ doc = "0: High-Power mode" ] _0 , # [ doc = "1: Low-Power mode" ] _1 } impl From < LPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : LPEN_A ) -> Self { match variant { LPEN_A :: _0 => false , LPEN_A :: _1 => true } } } # [ doc = "Reader of field `LPEN`" ] pub type LPEN_R = crate :: R < bool , LPEN_A > ; impl LPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPEN_A { match self . bits { false => LPEN_A :: _0 , true => LPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPEN_A :: _1 } } # [ doc = "Write proxy for field `LPEN`" ] pub struct LPEN_W < 'a > { w : & 'a mut W , } impl < 'a > LPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "High-Power mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LPEN_A :: _0 ) } # [ doc = "Low-Power mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LPEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "DAC Software Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACSWTRG_AW { # [ doc = "0: The DAC soft trigger is not valid." ] _0 , # [ doc = "1: The DAC soft trigger is valid." ] _1 } impl From < DACSWTRG_AW > for bool { # [ inline ( always ) ] fn from ( variant : DACSWTRG_AW ) -> Self { match variant { DACSWTRG_AW :: _0 => false , DACSWTRG_AW :: _1 => true } } } # [ doc = "Write proxy for field `DACSWTRG`" ] pub struct DACSWTRG_W < 'a > { w : & 'a mut W , } impl < 'a > DACSWTRG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACSWTRG_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC soft trigger is not valid." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACSWTRG_AW :: _0 ) } # [ doc = "The DAC soft trigger is valid." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACSWTRG_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "DAC Trigger Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACTRGSEL_A { # [ doc = "0: The DAC hardware trigger is selected." ] _0 , # [ doc = "1: The DAC software trigger is selected." ] _1 } impl From < DACTRGSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : DACTRGSEL_A ) -> Self { match variant { DACTRGSEL_A :: _0 => false , DACTRGSEL_A :: _1 => true } } } # [ doc = "Reader of field `DACTRGSEL`" ] pub type DACTRGSEL_R = crate :: R < bool , DACTRGSEL_A > ; impl DACTRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACTRGSEL_A { match self . bits { false => DACTRGSEL_A :: _0 , true => DACTRGSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACTRGSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACTRGSEL_A :: _1 } } # [ doc = "Write proxy for field `DACTRGSEL`" ] pub struct DACTRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > DACTRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACTRGSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC hardware trigger is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACTRGSEL_A :: _0 ) } # [ doc = "The DAC software trigger is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACTRGSEL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "DAC Reference Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACRFS_A { # [ doc = "0: The DAC selects DACREF_1 as the reference voltage." ] _0 , # [ doc = "1: The DAC selects DACREF_2 as the reference voltage." ] _1 } impl From < DACRFS_A > for bool { # [ inline ( always ) ] fn from ( variant : DACRFS_A ) -> Self { match variant { DACRFS_A :: _0 => false , DACRFS_A :: _1 => true } } } # [ doc = "Reader of field `DACRFS`" ] pub type DACRFS_R = crate :: R < bool , DACRFS_A > ; impl DACRFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACRFS_A { match self . bits { false => DACRFS_A :: _0 , true => DACRFS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACRFS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACRFS_A :: _1 } } # [ doc = "Write proxy for field `DACRFS`" ] pub struct DACRFS_W < 'a > { w : & 'a mut W , } impl < 'a > DACRFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACRFS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC selects DACREF_1 as the reference voltage." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACRFS_A :: _0 ) } # [ doc = "The DAC selects DACREF_2 as the reference voltage." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACRFS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "DAC Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACEN_A { # [ doc = "0: The DAC system is disabled." ] _0 , # [ doc = "1: The DAC system is enabled." ] _1 } impl From < DACEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACEN_A ) -> Self { match variant { DACEN_A :: _0 => false , DACEN_A :: _1 => true } } } # [ doc = "Reader of field `DACEN`" ] pub type DACEN_R = crate :: R < bool , DACEN_A > ; impl DACEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACEN_A { match self . bits { false => DACEN_A :: _0 , true => DACEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACEN_A :: _1 } } # [ doc = "Write proxy for field `DACEN`" ] pub struct DACEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC system is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _0 ) } # [ doc = "The DAC system is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - DAC Buffer Read Pointer Bottom Flag Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbbien ( & self ) -> DACBBIEN_R { DACBBIEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - DAC Buffer Read Pointer Top Flag Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbtien ( & self ) -> DACBTIEN_R { DACBTIEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - DAC Buffer Watermark Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbwien ( & self ) -> DACBWIEN_R { DACBWIEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - DAC Low Power Control" ] # [ inline ( always ) ] pub fn lpen ( & self ) -> LPEN_R { LPEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - DAC Trigger Select" ] # [ inline ( always ) ] pub fn dactrgsel ( & self ) -> DACTRGSEL_R { DACTRGSEL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - DAC Reference Select" ] # [ inline ( always ) ] pub fn dacrfs ( & self ) -> DACRFS_R { DACRFS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & self ) -> DACEN_R { DACEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DAC Buffer Read Pointer Bottom Flag Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbbien ( & mut self ) -> DACBBIEN_W { DACBBIEN_W { w : self } } # [ doc = "Bit 1 - DAC Buffer Read Pointer Top Flag Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbtien ( & mut self ) -> DACBTIEN_W { DACBTIEN_W { w : self } } # [ doc = "Bit 2 - DAC Buffer Watermark Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbwien ( & mut self ) -> DACBWIEN_W { DACBWIEN_W { w : self } } # [ doc = "Bit 3 - DAC Low Power Control" ] # [ inline ( always ) ] pub fn lpen ( & mut self ) -> LPEN_W { LPEN_W { w : self } } # [ doc = "Bit 4 - DAC Software Trigger" ] # [ inline ( always ) ] pub fn dacswtrg ( & mut self ) -> DACSWTRG_W { DACSWTRG_W { w : self } } # [ doc = "Bit 5 - DAC Trigger Select" ] # [ inline ( always ) ] pub fn dactrgsel ( & mut self ) -> DACTRGSEL_W { DACTRGSEL_W { w : self } } # [ doc = "Bit 6 - DAC Reference Select" ] # [ inline ( always ) ] pub fn dacrfs ( & mut self ) -> DACRFS_W { DACRFS_W { w : self } } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & mut self ) -> DACEN_W { DACEN_W { w : self } } } } # [ doc = "DAC Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "DAC Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DAC Buffer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFEN_A { # [ doc = "0: Buffer read pointer is disabled. The converted data is always the first word of the buffer." ] _0 , # [ doc = "1: Buffer read pointer is enabled. The converted data is the word that the read pointer points to. It means converted data can be from any word of the buffer." ] _1 } impl From < DACBFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBFEN_A ) -> Self { match variant { DACBFEN_A :: _0 => false , DACBFEN_A :: _1 => true } } } # [ doc = "Reader of field `DACBFEN`" ] pub type DACBFEN_R = crate :: R < bool , DACBFEN_A > ; impl DACBFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFEN_A { match self . bits { false => DACBFEN_A :: _0 , true => DACBFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBFEN_A :: _1 } } # [ doc = "Write proxy for field `DACBFEN`" ] pub struct DACBFEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Buffer read pointer is disabled. The converted data is always the first word of the buffer." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBFEN_A :: _0 ) } # [ doc = "Buffer read pointer is enabled. The converted data is the word that the read pointer points to. It means converted data can be from any word of the buffer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBFEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "DAC Buffer Work Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFMD_A { # [ doc = "0: Normal mode" ] _00 , # [ doc = "1: Swing mode" ] _01 , # [ doc = "2: One-Time Scan mode" ] _10 } impl From < DACBFMD_A > for u8 { # [ inline ( always ) ] fn from ( variant : DACBFMD_A ) -> Self { match variant { DACBFMD_A :: _00 => 0 , DACBFMD_A :: _01 => 1 , DACBFMD_A :: _10 => 2 } } } # [ doc = "Reader of field `DACBFMD`" ] pub type DACBFMD_R = crate :: R < u8 , DACBFMD_A > ; impl DACBFMD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DACBFMD_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DACBFMD_A :: _00 ) , 1 => Val ( DACBFMD_A :: _01 ) , 2 => Val ( DACBFMD_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DACBFMD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == DACBFMD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DACBFMD_A :: _10 } } # [ doc = "Write proxy for field `DACBFMD`" ] pub struct DACBFMD_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFMD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFMD_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Normal mode" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DACBFMD_A :: _00 ) } # [ doc = "Swing mode" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( DACBFMD_A :: _01 ) } # [ doc = "One-Time Scan mode" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DACBFMD_A :: _10 ) } # [ 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 << 1 ) ) | ( ( ( value as u8 ) & 0x03 ) << 1 ) ; self . w } } # [ doc = "DAC Buffer Watermark Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFWM_A { # [ doc = "0: 1 word" ] _00 , # [ doc = "1: 2 words" ] _01 , # [ doc = "2: 3 words" ] _10 , # [ doc = "3: 4 words" ] _11 } impl From < DACBFWM_A > for u8 { # [ inline ( always ) ] fn from ( variant : DACBFWM_A ) -> Self { match variant { DACBFWM_A :: _00 => 0 , DACBFWM_A :: _01 => 1 , DACBFWM_A :: _10 => 2 , DACBFWM_A :: _11 => 3 } } } # [ doc = "Reader of field `DACBFWM`" ] pub type DACBFWM_R = crate :: R < u8 , DACBFWM_A > ; impl DACBFWM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFWM_A { match self . bits { 0 => DACBFWM_A :: _00 , 1 => DACBFWM_A :: _01 , 2 => DACBFWM_A :: _10 , 3 => DACBFWM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DACBFWM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == DACBFWM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DACBFWM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DACBFWM_A :: _11 } } # [ doc = "Write proxy for field `DACBFWM`" ] pub struct DACBFWM_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFWM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFWM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "1 word" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DACBFWM_A :: _00 ) } # [ doc = "2 words" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( DACBFWM_A :: _01 ) } # [ doc = "3 words" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DACBFWM_A :: _10 ) } # [ doc = "4 words" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DACBFWM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 3 ) ) | ( ( ( value as u8 ) & 0x03 ) << 3 ) ; self . w } } # [ doc = "DMA Enable Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA is disabled." ] _0 , # [ doc = "1: DMA is enabled. When DMA is enabled, the DMA request will be generated by original interrupts. The interrupts will not be presented on this module at the same time." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA is enabled. When DMA is enabled, the DMA request will be generated by original interrupts. The interrupts will not be presented on this module at the same time." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - DAC Buffer Enable" ] # [ inline ( always ) ] pub fn dacbfen ( & self ) -> DACBFEN_R { DACBFEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:2 - DAC Buffer Work Mode Select" ] # [ inline ( always ) ] pub fn dacbfmd ( & self ) -> DACBFMD_R { DACBFMD_R :: new ( ( ( self . bits >> 1 ) & 0x03 ) as u8 ) } # [ doc = "Bits 3:4 - DAC Buffer Watermark Select" ] # [ inline ( always ) ] pub fn dacbfwm ( & self ) -> DACBFWM_R { DACBFWM_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - DMA Enable Select" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DAC Buffer Enable" ] # [ inline ( always ) ] pub fn dacbfen ( & mut self ) -> DACBFEN_W { DACBFEN_W { w : self } } # [ doc = "Bits 1:2 - DAC Buffer Work Mode Select" ] # [ inline ( always ) ] pub fn dacbfmd ( & mut self ) -> DACBFMD_W { DACBFMD_W { w : self } } # [ doc = "Bits 3:4 - DAC Buffer Watermark Select" ] # [ inline ( always ) ] pub fn dacbfwm ( & mut self ) -> DACBFWM_W { DACBFWM_W { w : self } } # [ doc = "Bit 7 - DMA Enable Select" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } } } # [ doc = "DAC Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "DAC Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0x0f" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0f } } # [ doc = "Reader of field `DACBFUP`" ] pub type DACBFUP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DACBFUP`" ] pub struct DACBFUP_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFUP_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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `DACBFRP`" ] pub type DACBFRP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DACBFRP`" ] pub struct DACBFRP_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFRP_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u8 ) & 0x0f ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - DAC Buffer Upper Limit" ] # [ inline ( always ) ] pub fn dacbfup ( & self ) -> DACBFUP_R { DACBFUP_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - DAC Buffer Read Pointer" ] # [ inline ( always ) ] pub fn dacbfrp ( & self ) -> DACBFRP_R { DACBFRP_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - DAC Buffer Upper Limit" ] # [ inline ( always ) ] pub fn dacbfup ( & mut self ) -> DACBFUP_W { DACBFUP_W { w : self } } # [ doc = "Bits 4:7 - DAC Buffer Read Pointer" ] # [ inline ( always ) ] pub fn dacbfrp ( & mut self ) -> DACBFRP_W { DACBFRP_W { w : self } } } } } # [ doc = "12-Bit Digital-to-Analog Converter" ] pub struct DAC1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for DAC1 { } impl DAC1 { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const dac1 :: RegisterBlock { 0x400c_d000 as * const _ } } impl Deref for DAC1 { type Target = dac1 :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * DAC1 :: ptr ( ) } } } # [ doc = "12-Bit Digital-to-Analog Converter" ] pub mod dac1 { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - DAC Data Low Register" ] pub dat0l : DATL , # [ doc = "0x01 - DAC Data High Register" ] pub dat0h : DATH , # [ doc = "0x02 - DAC Data Low Register" ] pub dat1l : DATL , # [ doc = "0x03 - DAC Data High Register" ] pub dat1h : DATH , # [ doc = "0x04 - DAC Data Low Register" ] pub dat2l : DATL , # [ doc = "0x05 - DAC Data High Register" ] pub dat2h : DATH , # [ doc = "0x06 - DAC Data Low Register" ] pub dat3l : DATL , # [ doc = "0x07 - DAC Data High Register" ] pub dat3h : DATH , # [ doc = "0x08 - DAC Data Low Register" ] pub dat4l : DATL , # [ doc = "0x09 - DAC Data High Register" ] pub dat4h : DATH , # [ doc = "0x0a - DAC Data Low Register" ] pub dat5l : DATL , # [ doc = "0x0b - DAC Data High Register" ] pub dat5h : DATH , # [ doc = "0x0c - DAC Data Low Register" ] pub dat6l : DATL , # [ doc = "0x0d - DAC Data High Register" ] pub dat6h : DATH , # [ doc = "0x0e - DAC Data Low Register" ] pub dat7l : DATL , # [ doc = "0x0f - DAC Data High Register" ] pub dat7h : DATH , # [ doc = "0x10 - DAC Data Low Register" ] pub dat8l : DATL , # [ doc = "0x11 - DAC Data High Register" ] pub dat8h : DATH , # [ doc = "0x12 - DAC Data Low Register" ] pub dat9l : DATL , # [ doc = "0x13 - DAC Data High Register" ] pub dat9h : DATH , # [ doc = "0x14 - DAC Data Low Register" ] pub dat10l : DATL , # [ doc = "0x15 - DAC Data High Register" ] pub dat10h : DATH , # [ doc = "0x16 - DAC Data Low Register" ] pub dat11l : DATL , # [ doc = "0x17 - DAC Data High Register" ] pub dat11h : DATH , # [ doc = "0x18 - DAC Data Low Register" ] pub dat12l : DATL , # [ doc = "0x19 - DAC Data High Register" ] pub dat12h : DATH , # [ doc = "0x1a - DAC Data Low Register" ] pub dat13l : DATL , # [ doc = "0x1b - DAC Data High Register" ] pub dat13h : DATH , # [ doc = "0x1c - DAC Data Low Register" ] pub dat14l : DATL , # [ doc = "0x1d - DAC Data High Register" ] pub dat14h : DATH , # [ doc = "0x1e - DAC Data Low Register" ] pub dat15l : DATL , # [ doc = "0x1f - DAC Data High Register" ] pub dat15h : DATH , # [ doc = "0x20 - DAC Status Register" ] pub sr : SR , # [ doc = "0x21 - DAC Control Register" ] pub c0 : C0 , # [ doc = "0x22 - DAC Control Register 1" ] pub c1 : C1 , # [ doc = "0x23 - DAC Control Register 2" ] pub c2 : C2 , } # [ doc = "DAC Data Low Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [datl](datl) module" ] pub type DATL = crate :: Reg < u8 , _DATL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATL ; # [ doc = "`read()` method returns [datl::R](datl::R) reader structure" ] impl crate :: Readable for DATL { } # [ doc = "`write(|w| ..)` method takes [datl::W](datl::W) writer structure" ] impl crate :: Writable for DATL { } # [ doc = "DAC Data Low Register" ] pub mod datl { # [ doc = "Reader of register DAT%sL" ] pub type R = crate :: R < u8 , super :: DATL > ; # [ doc = "Writer for register DAT%sL" ] pub type W = crate :: W < u8 , super :: DATL > ; # [ doc = "Register DAT%sL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATL { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA0`" ] pub type DATA0_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA0`" ] pub struct DATA0_W < 'a > { w : & 'a mut W , } impl < 'a > DATA0_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 & ! 0xff ) | ( ( value as u8 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - DATA0" ] # [ inline ( always ) ] pub fn data0 ( & self ) -> DATA0_R { DATA0_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - DATA0" ] # [ inline ( always ) ] pub fn data0 ( & mut self ) -> DATA0_W { DATA0_W { w : self } } } } # [ doc = "DAC Data High Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dath](dath) module" ] pub type DATH = crate :: Reg < u8 , _DATH > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DATH ; # [ doc = "`read()` method returns [dath::R](dath::R) reader structure" ] impl crate :: Readable for DATH { } # [ doc = "`write(|w| ..)` method takes [dath::W](dath::W) writer structure" ] impl crate :: Writable for DATH { } # [ doc = "DAC Data High Register" ] pub mod dath { # [ doc = "Reader of register DAT%sH" ] pub type R = crate :: R < u8 , super :: DATH > ; # [ doc = "Writer for register DAT%sH" ] pub type W = crate :: W < u8 , super :: DATH > ; # [ doc = "Register DAT%sH `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DATH { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA1`" ] pub type DATA1_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DATA1`" ] pub struct DATA1_W < 'a > { w : & 'a mut W , } impl < 'a > DATA1_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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } impl R { # [ doc = "Bits 0:3 - DATA1" ] # [ inline ( always ) ] pub fn data1 ( & self ) -> DATA1_R { DATA1_R :: new ( ( self . bits & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - DATA1" ] # [ inline ( always ) ] pub fn data1 ( & mut self ) -> DATA1_W { DATA1_W { w : self } } } } # [ doc = "DAC Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sr](sr) module" ] pub type SR = crate :: Reg < u8 , _SR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SR ; # [ doc = "`read()` method returns [sr::R](sr::R) reader structure" ] impl crate :: Readable for SR { } # [ doc = "`write(|w| ..)` method takes [sr::W](sr::W) writer structure" ] impl crate :: Writable for SR { } # [ doc = "DAC Status Register" ] pub mod sr { # [ doc = "Reader of register SR" ] pub type R = crate :: R < u8 , super :: SR > ; # [ doc = "Writer for register SR" ] pub type W = crate :: W < u8 , super :: SR > ; # [ doc = "Register SR `reset()`'s with value 0x02" ] impl crate :: ResetValue for super :: SR { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x02 } } # [ doc = "DAC Buffer Read Pointer Bottom Position Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFRPBF_A { # [ doc = "0: The DAC buffer read pointer is not equal to C2\\[DACBFUP\\]." ] _0 , # [ doc = "1: The DAC buffer read pointer is equal to C2\\[DACBFUP\\]." ] _1 } impl From < DACBFRPBF_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBFRPBF_A ) -> Self { match variant { DACBFRPBF_A :: _0 => false , DACBFRPBF_A :: _1 => true } } } # [ doc = "Reader of field `DACBFRPBF`" ] pub type DACBFRPBF_R = crate :: R < bool , DACBFRPBF_A > ; impl DACBFRPBF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFRPBF_A { match self . bits { false => DACBFRPBF_A :: _0 , true => DACBFRPBF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBFRPBF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBFRPBF_A :: _1 } } # [ doc = "Write proxy for field `DACBFRPBF`" ] pub struct DACBFRPBF_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFRPBF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFRPBF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer is not equal to C2\\[DACBFUP\\]." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBFRPBF_A :: _0 ) } # [ doc = "The DAC buffer read pointer is equal to C2\\[DACBFUP\\]." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBFRPBF_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "DAC Buffer Read Pointer Top Position Flag\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFRPTF_A { # [ doc = "0: The DAC buffer read pointer is not zero." ] _0 , # [ doc = "1: The DAC buffer read pointer is zero." ] _1 } impl From < DACBFRPTF_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBFRPTF_A ) -> Self { match variant { DACBFRPTF_A :: _0 => false , DACBFRPTF_A :: _1 => true } } } # [ doc = "Reader of field `DACBFRPTF`" ] pub type DACBFRPTF_R = crate :: R < bool , DACBFRPTF_A > ; impl DACBFRPTF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFRPTF_A { match self . bits { false => DACBFRPTF_A :: _0 , true => DACBFRPTF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBFRPTF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBFRPTF_A :: _1 } } # [ doc = "Write proxy for field `DACBFRPTF`" ] pub struct DACBFRPTF_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFRPTF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFRPTF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer is not zero." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBFRPTF_A :: _0 ) } # [ doc = "The DAC buffer read pointer is zero." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBFRPTF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "DAC Buffer Watermark Flag\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFWMF_A { # [ doc = "0: The DAC buffer read pointer has not reached the watermark level." ] _0 , # [ doc = "1: The DAC buffer read pointer has reached the watermark level." ] _1 } impl From < DACBFWMF_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBFWMF_A ) -> Self { match variant { DACBFWMF_A :: _0 => false , DACBFWMF_A :: _1 => true } } } # [ doc = "Reader of field `DACBFWMF`" ] pub type DACBFWMF_R = crate :: R < bool , DACBFWMF_A > ; impl DACBFWMF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFWMF_A { match self . bits { false => DACBFWMF_A :: _0 , true => DACBFWMF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBFWMF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBFWMF_A :: _1 } } # [ doc = "Write proxy for field `DACBFWMF`" ] pub struct DACBFWMF_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFWMF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFWMF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer has not reached the watermark level." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBFWMF_A :: _0 ) } # [ doc = "The DAC buffer read pointer has reached the watermark level." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBFWMF_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } impl R { # [ doc = "Bit 0 - DAC Buffer Read Pointer Bottom Position Flag" ] # [ inline ( always ) ] pub fn dacbfrpbf ( & self ) -> DACBFRPBF_R { DACBFRPBF_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - DAC Buffer Read Pointer Top Position Flag" ] # [ inline ( always ) ] pub fn dacbfrptf ( & self ) -> DACBFRPTF_R { DACBFRPTF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - DAC Buffer Watermark Flag" ] # [ inline ( always ) ] pub fn dacbfwmf ( & self ) -> DACBFWMF_R { DACBFWMF_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DAC Buffer Read Pointer Bottom Position Flag" ] # [ inline ( always ) ] pub fn dacbfrpbf ( & mut self ) -> DACBFRPBF_W { DACBFRPBF_W { w : self } } # [ doc = "Bit 1 - DAC Buffer Read Pointer Top Position Flag" ] # [ inline ( always ) ] pub fn dacbfrptf ( & mut self ) -> DACBFRPTF_W { DACBFRPTF_W { w : self } } # [ doc = "Bit 2 - DAC Buffer Watermark Flag" ] # [ inline ( always ) ] pub fn dacbfwmf ( & mut self ) -> DACBFWMF_W { DACBFWMF_W { w : self } } } } # [ doc = "DAC Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c0](c0) module" ] pub type C0 = crate :: Reg < u8 , _C0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C0 ; # [ doc = "`read()` method returns [c0::R](c0::R) reader structure" ] impl crate :: Readable for C0 { } # [ doc = "`write(|w| ..)` method takes [c0::W](c0::W) writer structure" ] impl crate :: Writable for C0 { } # [ doc = "DAC Control Register" ] pub mod c0 { # [ doc = "Reader of register C0" ] pub type R = crate :: R < u8 , super :: C0 > ; # [ doc = "Writer for register C0" ] pub type W = crate :: W < u8 , super :: C0 > ; # [ doc = "Register C0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C0 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DAC Buffer Read Pointer Bottom Flag Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBBIEN_A { # [ doc = "0: The DAC buffer read pointer bottom flag interrupt is disabled." ] _0 , # [ doc = "1: The DAC buffer read pointer bottom flag interrupt is enabled." ] _1 } impl From < DACBBIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBBIEN_A ) -> Self { match variant { DACBBIEN_A :: _0 => false , DACBBIEN_A :: _1 => true } } } # [ doc = "Reader of field `DACBBIEN`" ] pub type DACBBIEN_R = crate :: R < bool , DACBBIEN_A > ; impl DACBBIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBBIEN_A { match self . bits { false => DACBBIEN_A :: _0 , true => DACBBIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBBIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBBIEN_A :: _1 } } # [ doc = "Write proxy for field `DACBBIEN`" ] pub struct DACBBIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACBBIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBBIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer bottom flag interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBBIEN_A :: _0 ) } # [ doc = "The DAC buffer read pointer bottom flag interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBBIEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "DAC Buffer Read Pointer Top Flag Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBTIEN_A { # [ doc = "0: The DAC buffer read pointer top flag interrupt is disabled." ] _0 , # [ doc = "1: The DAC buffer read pointer top flag interrupt is enabled." ] _1 } impl From < DACBTIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBTIEN_A ) -> Self { match variant { DACBTIEN_A :: _0 => false , DACBTIEN_A :: _1 => true } } } # [ doc = "Reader of field `DACBTIEN`" ] pub type DACBTIEN_R = crate :: R < bool , DACBTIEN_A > ; impl DACBTIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBTIEN_A { match self . bits { false => DACBTIEN_A :: _0 , true => DACBTIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBTIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBTIEN_A :: _1 } } # [ doc = "Write proxy for field `DACBTIEN`" ] pub struct DACBTIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACBTIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBTIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer read pointer top flag interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBTIEN_A :: _0 ) } # [ doc = "The DAC buffer read pointer top flag interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBTIEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 1 ) ; self . w } } # [ doc = "DAC Buffer Watermark Interrupt Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBWIEN_A { # [ doc = "0: The DAC buffer watermark interrupt is disabled." ] _0 , # [ doc = "1: The DAC buffer watermark interrupt is enabled." ] _1 } impl From < DACBWIEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBWIEN_A ) -> Self { match variant { DACBWIEN_A :: _0 => false , DACBWIEN_A :: _1 => true } } } # [ doc = "Reader of field `DACBWIEN`" ] pub type DACBWIEN_R = crate :: R < bool , DACBWIEN_A > ; impl DACBWIEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBWIEN_A { match self . bits { false => DACBWIEN_A :: _0 , true => DACBWIEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBWIEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBWIEN_A :: _1 } } # [ doc = "Write proxy for field `DACBWIEN`" ] pub struct DACBWIEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACBWIEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBWIEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC buffer watermark interrupt is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBWIEN_A :: _0 ) } # [ doc = "The DAC buffer watermark interrupt is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBWIEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 2 ) ; self . w } } # [ doc = "DAC Low Power Control\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPEN_A { # [ doc = "0: High-Power mode" ] _0 , # [ doc = "1: Low-Power mode" ] _1 } impl From < LPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : LPEN_A ) -> Self { match variant { LPEN_A :: _0 => false , LPEN_A :: _1 => true } } } # [ doc = "Reader of field `LPEN`" ] pub type LPEN_R = crate :: R < bool , LPEN_A > ; impl LPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LPEN_A { match self . bits { false => LPEN_A :: _0 , true => LPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LPEN_A :: _1 } } # [ doc = "Write proxy for field `LPEN`" ] pub struct LPEN_W < 'a > { w : & 'a mut W , } impl < 'a > LPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "High-Power mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LPEN_A :: _0 ) } # [ doc = "Low-Power mode" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LPEN_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u8 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "DAC Software Trigger\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACSWTRG_AW { # [ doc = "0: The DAC soft trigger is not valid." ] _0 , # [ doc = "1: The DAC soft trigger is valid." ] _1 } impl From < DACSWTRG_AW > for bool { # [ inline ( always ) ] fn from ( variant : DACSWTRG_AW ) -> Self { match variant { DACSWTRG_AW :: _0 => false , DACSWTRG_AW :: _1 => true } } } # [ doc = "Write proxy for field `DACSWTRG`" ] pub struct DACSWTRG_W < 'a > { w : & 'a mut W , } impl < 'a > DACSWTRG_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACSWTRG_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC soft trigger is not valid." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACSWTRG_AW :: _0 ) } # [ doc = "The DAC soft trigger is valid." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACSWTRG_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u8 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "DAC Trigger Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACTRGSEL_A { # [ doc = "0: The DAC hardware trigger is selected." ] _0 , # [ doc = "1: The DAC software trigger is selected." ] _1 } impl From < DACTRGSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : DACTRGSEL_A ) -> Self { match variant { DACTRGSEL_A :: _0 => false , DACTRGSEL_A :: _1 => true } } } # [ doc = "Reader of field `DACTRGSEL`" ] pub type DACTRGSEL_R = crate :: R < bool , DACTRGSEL_A > ; impl DACTRGSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACTRGSEL_A { match self . bits { false => DACTRGSEL_A :: _0 , true => DACTRGSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACTRGSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACTRGSEL_A :: _1 } } # [ doc = "Write proxy for field `DACTRGSEL`" ] pub struct DACTRGSEL_W < 'a > { w : & 'a mut W , } impl < 'a > DACTRGSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACTRGSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC hardware trigger is selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACTRGSEL_A :: _0 ) } # [ doc = "The DAC software trigger is selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACTRGSEL_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 5 ) ; self . w } } # [ doc = "DAC Reference Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACRFS_A { # [ doc = "0: The DAC selects DACREF_1 as the reference voltage." ] _0 , # [ doc = "1: The DAC selects DACREF_2 as the reference voltage." ] _1 } impl From < DACRFS_A > for bool { # [ inline ( always ) ] fn from ( variant : DACRFS_A ) -> Self { match variant { DACRFS_A :: _0 => false , DACRFS_A :: _1 => true } } } # [ doc = "Reader of field `DACRFS`" ] pub type DACRFS_R = crate :: R < bool , DACRFS_A > ; impl DACRFS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACRFS_A { match self . bits { false => DACRFS_A :: _0 , true => DACRFS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACRFS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACRFS_A :: _1 } } # [ doc = "Write proxy for field `DACRFS`" ] pub struct DACRFS_W < 'a > { w : & 'a mut W , } impl < 'a > DACRFS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACRFS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC selects DACREF_1 as the reference voltage." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACRFS_A :: _0 ) } # [ doc = "The DAC selects DACREF_2 as the reference voltage." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACRFS_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 6 ) ; self . w } } # [ doc = "DAC Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACEN_A { # [ doc = "0: The DAC system is disabled." ] _0 , # [ doc = "1: The DAC system is enabled." ] _1 } impl From < DACEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACEN_A ) -> Self { match variant { DACEN_A :: _0 => false , DACEN_A :: _1 => true } } } # [ doc = "Reader of field `DACEN`" ] pub type DACEN_R = crate :: R < bool , DACEN_A > ; impl DACEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACEN_A { match self . bits { false => DACEN_A :: _0 , true => DACEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACEN_A :: _1 } } # [ doc = "Write proxy for field `DACEN`" ] pub struct DACEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "The DAC system is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _0 ) } # [ doc = "The DAC system is enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - DAC Buffer Read Pointer Bottom Flag Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbbien ( & self ) -> DACBBIEN_R { DACBBIEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - DAC Buffer Read Pointer Top Flag Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbtien ( & self ) -> DACBTIEN_R { DACBTIEN_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - DAC Buffer Watermark Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbwien ( & self ) -> DACBWIEN_R { DACBWIEN_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - DAC Low Power Control" ] # [ inline ( always ) ] pub fn lpen ( & self ) -> LPEN_R { LPEN_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - DAC Trigger Select" ] # [ inline ( always ) ] pub fn dactrgsel ( & self ) -> DACTRGSEL_R { DACTRGSEL_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - DAC Reference Select" ] # [ inline ( always ) ] pub fn dacrfs ( & self ) -> DACRFS_R { DACRFS_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & self ) -> DACEN_R { DACEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DAC Buffer Read Pointer Bottom Flag Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbbien ( & mut self ) -> DACBBIEN_W { DACBBIEN_W { w : self } } # [ doc = "Bit 1 - DAC Buffer Read Pointer Top Flag Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbtien ( & mut self ) -> DACBTIEN_W { DACBTIEN_W { w : self } } # [ doc = "Bit 2 - DAC Buffer Watermark Interrupt Enable" ] # [ inline ( always ) ] pub fn dacbwien ( & mut self ) -> DACBWIEN_W { DACBWIEN_W { w : self } } # [ doc = "Bit 3 - DAC Low Power Control" ] # [ inline ( always ) ] pub fn lpen ( & mut self ) -> LPEN_W { LPEN_W { w : self } } # [ doc = "Bit 4 - DAC Software Trigger" ] # [ inline ( always ) ] pub fn dacswtrg ( & mut self ) -> DACSWTRG_W { DACSWTRG_W { w : self } } # [ doc = "Bit 5 - DAC Trigger Select" ] # [ inline ( always ) ] pub fn dactrgsel ( & mut self ) -> DACTRGSEL_W { DACTRGSEL_W { w : self } } # [ doc = "Bit 6 - DAC Reference Select" ] # [ inline ( always ) ] pub fn dacrfs ( & mut self ) -> DACRFS_W { DACRFS_W { w : self } } # [ doc = "Bit 7 - DAC Enable" ] # [ inline ( always ) ] pub fn dacen ( & mut self ) -> DACEN_W { DACEN_W { w : self } } } } # [ doc = "DAC Control Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c1](c1) module" ] pub type C1 = crate :: Reg < u8 , _C1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C1 ; # [ doc = "`read()` method returns [c1::R](c1::R) reader structure" ] impl crate :: Readable for C1 { } # [ doc = "`write(|w| ..)` method takes [c1::W](c1::W) writer structure" ] impl crate :: Writable for C1 { } # [ doc = "DAC Control Register 1" ] pub mod c1 { # [ doc = "Reader of register C1" ] pub type R = crate :: R < u8 , super :: C1 > ; # [ doc = "Writer for register C1" ] pub type W = crate :: W < u8 , super :: C1 > ; # [ doc = "Register C1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: C1 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "DAC Buffer Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFEN_A { # [ doc = "0: Buffer read pointer is disabled. The converted data is always the first word of the buffer." ] _0 , # [ doc = "1: Buffer read pointer is enabled. The converted data is the word that the read pointer points to. It means converted data can be from any word of the buffer." ] _1 } impl From < DACBFEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DACBFEN_A ) -> Self { match variant { DACBFEN_A :: _0 => false , DACBFEN_A :: _1 => true } } } # [ doc = "Reader of field `DACBFEN`" ] pub type DACBFEN_R = crate :: R < bool , DACBFEN_A > ; impl DACBFEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFEN_A { match self . bits { false => DACBFEN_A :: _0 , true => DACBFEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACBFEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACBFEN_A :: _1 } } # [ doc = "Write proxy for field `DACBFEN`" ] pub struct DACBFEN_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Buffer read pointer is disabled. The converted data is always the first word of the buffer." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACBFEN_A :: _0 ) } # [ doc = "Buffer read pointer is enabled. The converted data is the word that the read pointer points to. It means converted data can be from any word of the buffer." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACBFEN_A :: _1 ) } # [ 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 ) | ( ( value as u8 ) & 0x01 ) ; self . w } } # [ doc = "DAC Buffer Work Mode Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFMD_A { # [ doc = "0: Normal mode" ] _00 , # [ doc = "1: Swing mode" ] _01 , # [ doc = "2: One-Time Scan mode" ] _10 } impl From < DACBFMD_A > for u8 { # [ inline ( always ) ] fn from ( variant : DACBFMD_A ) -> Self { match variant { DACBFMD_A :: _00 => 0 , DACBFMD_A :: _01 => 1 , DACBFMD_A :: _10 => 2 } } } # [ doc = "Reader of field `DACBFMD`" ] pub type DACBFMD_R = crate :: R < u8 , DACBFMD_A > ; impl DACBFMD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , DACBFMD_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( DACBFMD_A :: _00 ) , 1 => Val ( DACBFMD_A :: _01 ) , 2 => Val ( DACBFMD_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DACBFMD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == DACBFMD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DACBFMD_A :: _10 } } # [ doc = "Write proxy for field `DACBFMD`" ] pub struct DACBFMD_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFMD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFMD_A ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Normal mode" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DACBFMD_A :: _00 ) } # [ doc = "Swing mode" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( DACBFMD_A :: _01 ) } # [ doc = "One-Time Scan mode" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DACBFMD_A :: _10 ) } # [ 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 << 1 ) ) | ( ( ( value as u8 ) & 0x03 ) << 1 ) ; self . w } } # [ doc = "DAC Buffer Watermark Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACBFWM_A { # [ doc = "0: 1 word" ] _00 , # [ doc = "1: 2 words" ] _01 , # [ doc = "2: 3 words" ] _10 , # [ doc = "3: 4 words" ] _11 } impl From < DACBFWM_A > for u8 { # [ inline ( always ) ] fn from ( variant : DACBFWM_A ) -> Self { match variant { DACBFWM_A :: _00 => 0 , DACBFWM_A :: _01 => 1 , DACBFWM_A :: _10 => 2 , DACBFWM_A :: _11 => 3 } } } # [ doc = "Reader of field `DACBFWM`" ] pub type DACBFWM_R = crate :: R < u8 , DACBFWM_A > ; impl DACBFWM_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACBFWM_A { match self . bits { 0 => DACBFWM_A :: _00 , 1 => DACBFWM_A :: _01 , 2 => DACBFWM_A :: _10 , 3 => DACBFWM_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == DACBFWM_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == DACBFWM_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == DACBFWM_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == DACBFWM_A :: _11 } } # [ doc = "Write proxy for field `DACBFWM`" ] pub struct DACBFWM_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFWM_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACBFWM_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "1 word" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( DACBFWM_A :: _00 ) } # [ doc = "2 words" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( DACBFWM_A :: _01 ) } # [ doc = "3 words" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( DACBFWM_A :: _10 ) } # [ doc = "4 words" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( DACBFWM_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 3 ) ) | ( ( ( value as u8 ) & 0x03 ) << 3 ) ; self . w } } # [ doc = "DMA Enable Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DMAEN_A { # [ doc = "0: DMA is disabled." ] _0 , # [ doc = "1: DMA is enabled. When DMA is enabled, the DMA request will be generated by original interrupts. The interrupts will not be presented on this module at the same time." ] _1 } impl From < DMAEN_A > for bool { # [ inline ( always ) ] fn from ( variant : DMAEN_A ) -> Self { match variant { DMAEN_A :: _0 => false , DMAEN_A :: _1 => true } } } # [ doc = "Reader of field `DMAEN`" ] pub type DMAEN_R = crate :: R < bool , DMAEN_A > ; impl DMAEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DMAEN_A { match self . bits { false => DMAEN_A :: _0 , true => DMAEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DMAEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DMAEN_A :: _1 } } # [ doc = "Write proxy for field `DMAEN`" ] pub struct DMAEN_W < 'a > { w : & 'a mut W , } impl < 'a > DMAEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DMAEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DMA is disabled." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _0 ) } # [ doc = "DMA is enabled. When DMA is enabled, the DMA request will be generated by original interrupts. The interrupts will not be presented on this module at the same time." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DMAEN_A :: _1 ) } # [ 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 u8 ) & 0x01 ) << 7 ) ; self . w } } impl R { # [ doc = "Bit 0 - DAC Buffer Enable" ] # [ inline ( always ) ] pub fn dacbfen ( & self ) -> DACBFEN_R { DACBFEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:2 - DAC Buffer Work Mode Select" ] # [ inline ( always ) ] pub fn dacbfmd ( & self ) -> DACBFMD_R { DACBFMD_R :: new ( ( ( self . bits >> 1 ) & 0x03 ) as u8 ) } # [ doc = "Bits 3:4 - DAC Buffer Watermark Select" ] # [ inline ( always ) ] pub fn dacbfwm ( & self ) -> DACBFWM_R { DACBFWM_R :: new ( ( ( self . bits >> 3 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - DMA Enable Select" ] # [ inline ( always ) ] pub fn dmaen ( & self ) -> DMAEN_R { DMAEN_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - DAC Buffer Enable" ] # [ inline ( always ) ] pub fn dacbfen ( & mut self ) -> DACBFEN_W { DACBFEN_W { w : self } } # [ doc = "Bits 1:2 - DAC Buffer Work Mode Select" ] # [ inline ( always ) ] pub fn dacbfmd ( & mut self ) -> DACBFMD_W { DACBFMD_W { w : self } } # [ doc = "Bits 3:4 - DAC Buffer Watermark Select" ] # [ inline ( always ) ] pub fn dacbfwm ( & mut self ) -> DACBFWM_W { DACBFWM_W { w : self } } # [ doc = "Bit 7 - DMA Enable Select" ] # [ inline ( always ) ] pub fn dmaen ( & mut self ) -> DMAEN_W { DMAEN_W { w : self } } } } # [ doc = "DAC Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [c2](c2) module" ] pub type C2 = crate :: Reg < u8 , _C2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _C2 ; # [ doc = "`read()` method returns [c2::R](c2::R) reader structure" ] impl crate :: Readable for C2 { } # [ doc = "`write(|w| ..)` method takes [c2::W](c2::W) writer structure" ] impl crate :: Writable for C2 { } # [ doc = "DAC Control Register 2" ] pub mod c2 { # [ doc = "Reader of register C2" ] pub type R = crate :: R < u8 , super :: C2 > ; # [ doc = "Writer for register C2" ] pub type W = crate :: W < u8 , super :: C2 > ; # [ doc = "Register C2 `reset()`'s with value 0x0f" ] impl crate :: ResetValue for super :: C2 { type Type = u8 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x0f } } # [ doc = "Reader of field `DACBFUP`" ] pub type DACBFUP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DACBFUP`" ] pub struct DACBFUP_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFUP_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 & ! 0x0f ) | ( ( value as u8 ) & 0x0f ) ; self . w } } # [ doc = "Reader of field `DACBFRP`" ] pub type DACBFRP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `DACBFRP`" ] pub struct DACBFRP_W < 'a > { w : & 'a mut W , } impl < 'a > DACBFRP_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 & ! ( 0x0f << 4 ) ) | ( ( ( value as u8 ) & 0x0f ) << 4 ) ; self . w } } impl R { # [ doc = "Bits 0:3 - DAC Buffer Upper Limit" ] # [ inline ( always ) ] pub fn dacbfup ( & self ) -> DACBFUP_R { DACBFUP_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:7 - DAC Buffer Read Pointer" ] # [ inline ( always ) ] pub fn dacbfrp ( & self ) -> DACBFRP_R { DACBFRP_R :: new ( ( ( self . bits >> 4 ) & 0x0f ) as u8 ) } } impl W { # [ doc = "Bits 0:3 - DAC Buffer Upper Limit" ] # [ inline ( always ) ] pub fn dacbfup ( & mut self ) -> DACBFUP_W { DACBFUP_W { w : self } } # [ doc = "Bits 4:7 - DAC Buffer Read Pointer" ] # [ inline ( always ) ] pub fn dacbfrp ( & mut self ) -> DACBFRP_W { DACBFRP_W { w : self } } } } } # [ doc = "General Purpose Input/Output" ] pub struct GPIOA { _marker : PhantomData < * const ( ) > } unsafe impl Send for GPIOA { } impl GPIOA { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const gpioa :: RegisterBlock { 0x400f_f000 as * const _ } } impl Deref for GPIOA { type Target = gpioa :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * GPIOA :: ptr ( ) } } } # [ doc = "General Purpose Input/Output" ] pub mod gpioa { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Port Data Output Register" ] pub pdor : PDOR , # [ doc = "0x04 - Port Set Output Register" ] pub psor : PSOR , # [ doc = "0x08 - Port Clear Output Register" ] pub pcor : PCOR , # [ doc = "0x0c - Port Toggle Output Register" ] pub ptor : PTOR , # [ doc = "0x10 - Port Data Input Register" ] pub pdir : PDIR , # [ doc = "0x14 - Port Data Direction Register" ] pub pddr : PDDR , } # [ doc = "Port Data Output Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdor](pdor) module" ] pub type PDOR = crate :: Reg < u32 , _PDOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDOR ; # [ doc = "`read()` method returns [pdor::R](pdor::R) reader structure" ] impl crate :: Readable for PDOR { } # [ doc = "`write(|w| ..)` method takes [pdor::W](pdor::W) writer structure" ] impl crate :: Writable for PDOR { } # [ doc = "Port Data Output Register" ] pub mod pdor { # [ doc = "Reader of register PDOR" ] pub type R = crate :: R < u32 , super :: PDOR > ; # [ doc = "Writer for register PDOR" ] pub type W = crate :: W < u32 , super :: PDOR > ; # [ doc = "Register PDOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO0_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO0_A ) -> Self { match variant { PDO0_A :: _0 => false , PDO0_A :: _1 => true } } } # [ doc = "Reader of field `PDO0`" ] pub type PDO0_R = crate :: R < bool , PDO0_A > ; impl PDO0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO0_A { match self . bits { false => PDO0_A :: _0 , true => PDO0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO0_A :: _1 } } # [ doc = "Write proxy for field `PDO0`" ] pub struct PDO0_W < 'a > { w : & 'a mut W , } impl < 'a > PDO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO1_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO1_A ) -> Self { match variant { PDO1_A :: _0 => false , PDO1_A :: _1 => true } } } # [ doc = "Reader of field `PDO1`" ] pub type PDO1_R = crate :: R < bool , PDO1_A > ; impl PDO1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO1_A { match self . bits { false => PDO1_A :: _0 , true => PDO1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO1_A :: _1 } } # [ doc = "Write proxy for field `PDO1`" ] pub struct PDO1_W < 'a > { w : & 'a mut W , } impl < 'a > PDO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO2_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO2_A ) -> Self { match variant { PDO2_A :: _0 => false , PDO2_A :: _1 => true } } } # [ doc = "Reader of field `PDO2`" ] pub type PDO2_R = crate :: R < bool , PDO2_A > ; impl PDO2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO2_A { match self . bits { false => PDO2_A :: _0 , true => PDO2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO2_A :: _1 } } # [ doc = "Write proxy for field `PDO2`" ] pub struct PDO2_W < 'a > { w : & 'a mut W , } impl < 'a > PDO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO3_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO3_A ) -> Self { match variant { PDO3_A :: _0 => false , PDO3_A :: _1 => true } } } # [ doc = "Reader of field `PDO3`" ] pub type PDO3_R = crate :: R < bool , PDO3_A > ; impl PDO3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO3_A { match self . bits { false => PDO3_A :: _0 , true => PDO3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO3_A :: _1 } } # [ doc = "Write proxy for field `PDO3`" ] pub struct PDO3_W < 'a > { w : & 'a mut W , } impl < 'a > PDO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO4_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO4_A ) -> Self { match variant { PDO4_A :: _0 => false , PDO4_A :: _1 => true } } } # [ doc = "Reader of field `PDO4`" ] pub type PDO4_R = crate :: R < bool , PDO4_A > ; impl PDO4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO4_A { match self . bits { false => PDO4_A :: _0 , true => PDO4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO4_A :: _1 } } # [ doc = "Write proxy for field `PDO4`" ] pub struct PDO4_W < 'a > { w : & 'a mut W , } impl < 'a > PDO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO5_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO5_A ) -> Self { match variant { PDO5_A :: _0 => false , PDO5_A :: _1 => true } } } # [ doc = "Reader of field `PDO5`" ] pub type PDO5_R = crate :: R < bool , PDO5_A > ; impl PDO5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO5_A { match self . bits { false => PDO5_A :: _0 , true => PDO5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO5_A :: _1 } } # [ doc = "Write proxy for field `PDO5`" ] pub struct PDO5_W < 'a > { w : & 'a mut W , } impl < 'a > PDO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO6_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO6_A ) -> Self { match variant { PDO6_A :: _0 => false , PDO6_A :: _1 => true } } } # [ doc = "Reader of field `PDO6`" ] pub type PDO6_R = crate :: R < bool , PDO6_A > ; impl PDO6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO6_A { match self . bits { false => PDO6_A :: _0 , true => PDO6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO6_A :: _1 } } # [ doc = "Write proxy for field `PDO6`" ] pub struct PDO6_W < 'a > { w : & 'a mut W , } impl < 'a > PDO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO7_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO7_A ) -> Self { match variant { PDO7_A :: _0 => false , PDO7_A :: _1 => true } } } # [ doc = "Reader of field `PDO7`" ] pub type PDO7_R = crate :: R < bool , PDO7_A > ; impl PDO7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO7_A { match self . bits { false => PDO7_A :: _0 , true => PDO7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO7_A :: _1 } } # [ doc = "Write proxy for field `PDO7`" ] pub struct PDO7_W < 'a > { w : & 'a mut W , } impl < 'a > PDO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO8_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO8_A ) -> Self { match variant { PDO8_A :: _0 => false , PDO8_A :: _1 => true } } } # [ doc = "Reader of field `PDO8`" ] pub type PDO8_R = crate :: R < bool , PDO8_A > ; impl PDO8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO8_A { match self . bits { false => PDO8_A :: _0 , true => PDO8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO8_A :: _1 } } # [ doc = "Write proxy for field `PDO8`" ] pub struct PDO8_W < 'a > { w : & 'a mut W , } impl < 'a > PDO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO9_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO9_A ) -> Self { match variant { PDO9_A :: _0 => false , PDO9_A :: _1 => true } } } # [ doc = "Reader of field `PDO9`" ] pub type PDO9_R = crate :: R < bool , PDO9_A > ; impl PDO9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO9_A { match self . bits { false => PDO9_A :: _0 , true => PDO9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO9_A :: _1 } } # [ doc = "Write proxy for field `PDO9`" ] pub struct PDO9_W < 'a > { w : & 'a mut W , } impl < 'a > PDO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO10_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO10_A ) -> Self { match variant { PDO10_A :: _0 => false , PDO10_A :: _1 => true } } } # [ doc = "Reader of field `PDO10`" ] pub type PDO10_R = crate :: R < bool , PDO10_A > ; impl PDO10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO10_A { match self . bits { false => PDO10_A :: _0 , true => PDO10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO10_A :: _1 } } # [ doc = "Write proxy for field `PDO10`" ] pub struct PDO10_W < 'a > { w : & 'a mut W , } impl < 'a > PDO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO11_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO11_A ) -> Self { match variant { PDO11_A :: _0 => false , PDO11_A :: _1 => true } } } # [ doc = "Reader of field `PDO11`" ] pub type PDO11_R = crate :: R < bool , PDO11_A > ; impl PDO11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO11_A { match self . bits { false => PDO11_A :: _0 , true => PDO11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO11_A :: _1 } } # [ doc = "Write proxy for field `PDO11`" ] pub struct PDO11_W < 'a > { w : & 'a mut W , } impl < 'a > PDO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO12_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO12_A ) -> Self { match variant { PDO12_A :: _0 => false , PDO12_A :: _1 => true } } } # [ doc = "Reader of field `PDO12`" ] pub type PDO12_R = crate :: R < bool , PDO12_A > ; impl PDO12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO12_A { match self . bits { false => PDO12_A :: _0 , true => PDO12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO12_A :: _1 } } # [ doc = "Write proxy for field `PDO12`" ] pub struct PDO12_W < 'a > { w : & 'a mut W , } impl < 'a > PDO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO13_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO13_A ) -> Self { match variant { PDO13_A :: _0 => false , PDO13_A :: _1 => true } } } # [ doc = "Reader of field `PDO13`" ] pub type PDO13_R = crate :: R < bool , PDO13_A > ; impl PDO13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO13_A { match self . bits { false => PDO13_A :: _0 , true => PDO13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO13_A :: _1 } } # [ doc = "Write proxy for field `PDO13`" ] pub struct PDO13_W < 'a > { w : & 'a mut W , } impl < 'a > PDO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO14_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO14_A ) -> Self { match variant { PDO14_A :: _0 => false , PDO14_A :: _1 => true } } } # [ doc = "Reader of field `PDO14`" ] pub type PDO14_R = crate :: R < bool , PDO14_A > ; impl PDO14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO14_A { match self . bits { false => PDO14_A :: _0 , true => PDO14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO14_A :: _1 } } # [ doc = "Write proxy for field `PDO14`" ] pub struct PDO14_W < 'a > { w : & 'a mut W , } impl < 'a > PDO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO15_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO15_A ) -> Self { match variant { PDO15_A :: _0 => false , PDO15_A :: _1 => true } } } # [ doc = "Reader of field `PDO15`" ] pub type PDO15_R = crate :: R < bool , PDO15_A > ; impl PDO15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO15_A { match self . bits { false => PDO15_A :: _0 , true => PDO15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO15_A :: _1 } } # [ doc = "Write proxy for field `PDO15`" ] pub struct PDO15_W < 'a > { w : & 'a mut W , } impl < 'a > PDO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO16_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO16_A ) -> Self { match variant { PDO16_A :: _0 => false , PDO16_A :: _1 => true } } } # [ doc = "Reader of field `PDO16`" ] pub type PDO16_R = crate :: R < bool , PDO16_A > ; impl PDO16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO16_A { match self . bits { false => PDO16_A :: _0 , true => PDO16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO16_A :: _1 } } # [ doc = "Write proxy for field `PDO16`" ] pub struct PDO16_W < 'a > { w : & 'a mut W , } impl < 'a > PDO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO17_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO17_A ) -> Self { match variant { PDO17_A :: _0 => false , PDO17_A :: _1 => true } } } # [ doc = "Reader of field `PDO17`" ] pub type PDO17_R = crate :: R < bool , PDO17_A > ; impl PDO17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO17_A { match self . bits { false => PDO17_A :: _0 , true => PDO17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO17_A :: _1 } } # [ doc = "Write proxy for field `PDO17`" ] pub struct PDO17_W < 'a > { w : & 'a mut W , } impl < 'a > PDO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO18_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO18_A ) -> Self { match variant { PDO18_A :: _0 => false , PDO18_A :: _1 => true } } } # [ doc = "Reader of field `PDO18`" ] pub type PDO18_R = crate :: R < bool , PDO18_A > ; impl PDO18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO18_A { match self . bits { false => PDO18_A :: _0 , true => PDO18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO18_A :: _1 } } # [ doc = "Write proxy for field `PDO18`" ] pub struct PDO18_W < 'a > { w : & 'a mut W , } impl < 'a > PDO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO19_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO19_A ) -> Self { match variant { PDO19_A :: _0 => false , PDO19_A :: _1 => true } } } # [ doc = "Reader of field `PDO19`" ] pub type PDO19_R = crate :: R < bool , PDO19_A > ; impl PDO19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO19_A { match self . bits { false => PDO19_A :: _0 , true => PDO19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO19_A :: _1 } } # [ doc = "Write proxy for field `PDO19`" ] pub struct PDO19_W < 'a > { w : & 'a mut W , } impl < 'a > PDO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO20_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO20_A ) -> Self { match variant { PDO20_A :: _0 => false , PDO20_A :: _1 => true } } } # [ doc = "Reader of field `PDO20`" ] pub type PDO20_R = crate :: R < bool , PDO20_A > ; impl PDO20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO20_A { match self . bits { false => PDO20_A :: _0 , true => PDO20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO20_A :: _1 } } # [ doc = "Write proxy for field `PDO20`" ] pub struct PDO20_W < 'a > { w : & 'a mut W , } impl < 'a > PDO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO21_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO21_A ) -> Self { match variant { PDO21_A :: _0 => false , PDO21_A :: _1 => true } } } # [ doc = "Reader of field `PDO21`" ] pub type PDO21_R = crate :: R < bool , PDO21_A > ; impl PDO21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO21_A { match self . bits { false => PDO21_A :: _0 , true => PDO21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO21_A :: _1 } } # [ doc = "Write proxy for field `PDO21`" ] pub struct PDO21_W < 'a > { w : & 'a mut W , } impl < 'a > PDO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO22_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO22_A ) -> Self { match variant { PDO22_A :: _0 => false , PDO22_A :: _1 => true } } } # [ doc = "Reader of field `PDO22`" ] pub type PDO22_R = crate :: R < bool , PDO22_A > ; impl PDO22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO22_A { match self . bits { false => PDO22_A :: _0 , true => PDO22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO22_A :: _1 } } # [ doc = "Write proxy for field `PDO22`" ] pub struct PDO22_W < 'a > { w : & 'a mut W , } impl < 'a > PDO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO23_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO23_A ) -> Self { match variant { PDO23_A :: _0 => false , PDO23_A :: _1 => true } } } # [ doc = "Reader of field `PDO23`" ] pub type PDO23_R = crate :: R < bool , PDO23_A > ; impl PDO23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO23_A { match self . bits { false => PDO23_A :: _0 , true => PDO23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO23_A :: _1 } } # [ doc = "Write proxy for field `PDO23`" ] pub struct PDO23_W < 'a > { w : & 'a mut W , } impl < 'a > PDO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO24_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO24_A ) -> Self { match variant { PDO24_A :: _0 => false , PDO24_A :: _1 => true } } } # [ doc = "Reader of field `PDO24`" ] pub type PDO24_R = crate :: R < bool , PDO24_A > ; impl PDO24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO24_A { match self . bits { false => PDO24_A :: _0 , true => PDO24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO24_A :: _1 } } # [ doc = "Write proxy for field `PDO24`" ] pub struct PDO24_W < 'a > { w : & 'a mut W , } impl < 'a > PDO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO25_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO25_A ) -> Self { match variant { PDO25_A :: _0 => false , PDO25_A :: _1 => true } } } # [ doc = "Reader of field `PDO25`" ] pub type PDO25_R = crate :: R < bool , PDO25_A > ; impl PDO25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO25_A { match self . bits { false => PDO25_A :: _0 , true => PDO25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO25_A :: _1 } } # [ doc = "Write proxy for field `PDO25`" ] pub struct PDO25_W < 'a > { w : & 'a mut W , } impl < 'a > PDO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO26_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO26_A ) -> Self { match variant { PDO26_A :: _0 => false , PDO26_A :: _1 => true } } } # [ doc = "Reader of field `PDO26`" ] pub type PDO26_R = crate :: R < bool , PDO26_A > ; impl PDO26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO26_A { match self . bits { false => PDO26_A :: _0 , true => PDO26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO26_A :: _1 } } # [ doc = "Write proxy for field `PDO26`" ] pub struct PDO26_W < 'a > { w : & 'a mut W , } impl < 'a > PDO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO27_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO27_A ) -> Self { match variant { PDO27_A :: _0 => false , PDO27_A :: _1 => true } } } # [ doc = "Reader of field `PDO27`" ] pub type PDO27_R = crate :: R < bool , PDO27_A > ; impl PDO27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO27_A { match self . bits { false => PDO27_A :: _0 , true => PDO27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO27_A :: _1 } } # [ doc = "Write proxy for field `PDO27`" ] pub struct PDO27_W < 'a > { w : & 'a mut W , } impl < 'a > PDO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO28_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO28_A ) -> Self { match variant { PDO28_A :: _0 => false , PDO28_A :: _1 => true } } } # [ doc = "Reader of field `PDO28`" ] pub type PDO28_R = crate :: R < bool , PDO28_A > ; impl PDO28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO28_A { match self . bits { false => PDO28_A :: _0 , true => PDO28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO28_A :: _1 } } # [ doc = "Write proxy for field `PDO28`" ] pub struct PDO28_W < 'a > { w : & 'a mut W , } impl < 'a > PDO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO29_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO29_A ) -> Self { match variant { PDO29_A :: _0 => false , PDO29_A :: _1 => true } } } # [ doc = "Reader of field `PDO29`" ] pub type PDO29_R = crate :: R < bool , PDO29_A > ; impl PDO29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO29_A { match self . bits { false => PDO29_A :: _0 , true => PDO29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO29_A :: _1 } } # [ doc = "Write proxy for field `PDO29`" ] pub struct PDO29_W < 'a > { w : & 'a mut W , } impl < 'a > PDO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO30_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO30_A ) -> Self { match variant { PDO30_A :: _0 => false , PDO30_A :: _1 => true } } } # [ doc = "Reader of field `PDO30`" ] pub type PDO30_R = crate :: R < bool , PDO30_A > ; impl PDO30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO30_A { match self . bits { false => PDO30_A :: _0 , true => PDO30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO30_A :: _1 } } # [ doc = "Write proxy for field `PDO30`" ] pub struct PDO30_W < 'a > { w : & 'a mut W , } impl < 'a > PDO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO31_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO31_A ) -> Self { match variant { PDO31_A :: _0 => false , PDO31_A :: _1 => true } } } # [ doc = "Reader of field `PDO31`" ] pub type PDO31_R = crate :: R < bool , PDO31_A > ; impl PDO31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO31_A { match self . bits { false => PDO31_A :: _0 , true => PDO31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO31_A :: _1 } } # [ doc = "Write proxy for field `PDO31`" ] pub struct PDO31_W < 'a > { w : & 'a mut W , } impl < 'a > PDO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & self ) -> PDO0_R { PDO0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & self ) -> PDO1_R { PDO1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & self ) -> PDO2_R { PDO2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & self ) -> PDO3_R { PDO3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & self ) -> PDO4_R { PDO4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & self ) -> PDO5_R { PDO5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & self ) -> PDO6_R { PDO6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & self ) -> PDO7_R { PDO7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & self ) -> PDO8_R { PDO8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & self ) -> PDO9_R { PDO9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & self ) -> PDO10_R { PDO10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & self ) -> PDO11_R { PDO11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & self ) -> PDO12_R { PDO12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & self ) -> PDO13_R { PDO13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & self ) -> PDO14_R { PDO14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & self ) -> PDO15_R { PDO15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & self ) -> PDO16_R { PDO16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & self ) -> PDO17_R { PDO17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & self ) -> PDO18_R { PDO18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & self ) -> PDO19_R { PDO19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & self ) -> PDO20_R { PDO20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & self ) -> PDO21_R { PDO21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & self ) -> PDO22_R { PDO22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & self ) -> PDO23_R { PDO23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & self ) -> PDO24_R { PDO24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & self ) -> PDO25_R { PDO25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & self ) -> PDO26_R { PDO26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & self ) -> PDO27_R { PDO27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & self ) -> PDO28_R { PDO28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & self ) -> PDO29_R { PDO29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & self ) -> PDO30_R { PDO30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & self ) -> PDO31_R { PDO31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & mut self ) -> PDO0_W { PDO0_W { w : self } } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & mut self ) -> PDO1_W { PDO1_W { w : self } } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & mut self ) -> PDO2_W { PDO2_W { w : self } } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & mut self ) -> PDO3_W { PDO3_W { w : self } } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & mut self ) -> PDO4_W { PDO4_W { w : self } } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & mut self ) -> PDO5_W { PDO5_W { w : self } } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & mut self ) -> PDO6_W { PDO6_W { w : self } } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & mut self ) -> PDO7_W { PDO7_W { w : self } } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & mut self ) -> PDO8_W { PDO8_W { w : self } } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & mut self ) -> PDO9_W { PDO9_W { w : self } } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & mut self ) -> PDO10_W { PDO10_W { w : self } } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & mut self ) -> PDO11_W { PDO11_W { w : self } } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & mut self ) -> PDO12_W { PDO12_W { w : self } } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & mut self ) -> PDO13_W { PDO13_W { w : self } } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & mut self ) -> PDO14_W { PDO14_W { w : self } } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & mut self ) -> PDO15_W { PDO15_W { w : self } } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & mut self ) -> PDO16_W { PDO16_W { w : self } } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & mut self ) -> PDO17_W { PDO17_W { w : self } } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & mut self ) -> PDO18_W { PDO18_W { w : self } } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & mut self ) -> PDO19_W { PDO19_W { w : self } } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & mut self ) -> PDO20_W { PDO20_W { w : self } } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & mut self ) -> PDO21_W { PDO21_W { w : self } } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & mut self ) -> PDO22_W { PDO22_W { w : self } } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & mut self ) -> PDO23_W { PDO23_W { w : self } } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & mut self ) -> PDO24_W { PDO24_W { w : self } } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & mut self ) -> PDO25_W { PDO25_W { w : self } } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & mut self ) -> PDO26_W { PDO26_W { w : self } } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & mut self ) -> PDO27_W { PDO27_W { w : self } } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & mut self ) -> PDO28_W { PDO28_W { w : self } } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & mut self ) -> PDO29_W { PDO29_W { w : self } } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & mut self ) -> PDO30_W { PDO30_W { w : self } } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & mut self ) -> PDO31_W { PDO31_W { w : self } } } } # [ doc = "Port Set Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psor](psor) module" ] pub type PSOR = crate :: Reg < u32 , _PSOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PSOR ; # [ doc = "`write(|w| ..)` method takes [psor::W](psor::W) writer structure" ] impl crate :: Writable for PSOR { } # [ doc = "Port Set Output Register" ] pub mod psor { # [ doc = "Writer for register PSOR" ] pub type W = crate :: W < u32 , super :: PSOR > ; # [ doc = "Register PSOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PSOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO0_AW ) -> Self { match variant { PTSO0_AW :: _0 => false , PTSO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO0`" ] pub struct PTSO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO1_AW ) -> Self { match variant { PTSO1_AW :: _0 => false , PTSO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO1`" ] pub struct PTSO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO2_AW ) -> Self { match variant { PTSO2_AW :: _0 => false , PTSO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO2`" ] pub struct PTSO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO3_AW ) -> Self { match variant { PTSO3_AW :: _0 => false , PTSO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO3`" ] pub struct PTSO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO4_AW ) -> Self { match variant { PTSO4_AW :: _0 => false , PTSO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO4`" ] pub struct PTSO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO5_AW ) -> Self { match variant { PTSO5_AW :: _0 => false , PTSO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO5`" ] pub struct PTSO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO6_AW ) -> Self { match variant { PTSO6_AW :: _0 => false , PTSO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO6`" ] pub struct PTSO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO7_AW ) -> Self { match variant { PTSO7_AW :: _0 => false , PTSO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO7`" ] pub struct PTSO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO8_AW ) -> Self { match variant { PTSO8_AW :: _0 => false , PTSO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO8`" ] pub struct PTSO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO9_AW ) -> Self { match variant { PTSO9_AW :: _0 => false , PTSO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO9`" ] pub struct PTSO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO10_AW ) -> Self { match variant { PTSO10_AW :: _0 => false , PTSO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO10`" ] pub struct PTSO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO11_AW ) -> Self { match variant { PTSO11_AW :: _0 => false , PTSO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO11`" ] pub struct PTSO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO12_AW ) -> Self { match variant { PTSO12_AW :: _0 => false , PTSO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO12`" ] pub struct PTSO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO13_AW ) -> Self { match variant { PTSO13_AW :: _0 => false , PTSO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO13`" ] pub struct PTSO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO14_AW ) -> Self { match variant { PTSO14_AW :: _0 => false , PTSO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO14`" ] pub struct PTSO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO15_AW ) -> Self { match variant { PTSO15_AW :: _0 => false , PTSO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO15`" ] pub struct PTSO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO16_AW ) -> Self { match variant { PTSO16_AW :: _0 => false , PTSO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO16`" ] pub struct PTSO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO17_AW ) -> Self { match variant { PTSO17_AW :: _0 => false , PTSO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO17`" ] pub struct PTSO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO18_AW ) -> Self { match variant { PTSO18_AW :: _0 => false , PTSO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO18`" ] pub struct PTSO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO19_AW ) -> Self { match variant { PTSO19_AW :: _0 => false , PTSO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO19`" ] pub struct PTSO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO20_AW ) -> Self { match variant { PTSO20_AW :: _0 => false , PTSO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO20`" ] pub struct PTSO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO21_AW ) -> Self { match variant { PTSO21_AW :: _0 => false , PTSO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO21`" ] pub struct PTSO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO22_AW ) -> Self { match variant { PTSO22_AW :: _0 => false , PTSO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO22`" ] pub struct PTSO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO23_AW ) -> Self { match variant { PTSO23_AW :: _0 => false , PTSO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO23`" ] pub struct PTSO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO24_AW ) -> Self { match variant { PTSO24_AW :: _0 => false , PTSO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO24`" ] pub struct PTSO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO25_AW ) -> Self { match variant { PTSO25_AW :: _0 => false , PTSO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO25`" ] pub struct PTSO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO26_AW ) -> Self { match variant { PTSO26_AW :: _0 => false , PTSO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO26`" ] pub struct PTSO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO27_AW ) -> Self { match variant { PTSO27_AW :: _0 => false , PTSO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO27`" ] pub struct PTSO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO28_AW ) -> Self { match variant { PTSO28_AW :: _0 => false , PTSO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO28`" ] pub struct PTSO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO29_AW ) -> Self { match variant { PTSO29_AW :: _0 => false , PTSO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO29`" ] pub struct PTSO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO30_AW ) -> Self { match variant { PTSO30_AW :: _0 => false , PTSO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO30`" ] pub struct PTSO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO31_AW ) -> Self { match variant { PTSO31_AW :: _0 => false , PTSO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO31`" ] pub struct PTSO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso0 ( & mut self ) -> PTSO0_W { PTSO0_W { w : self } } # [ doc = "Bit 1 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso1 ( & mut self ) -> PTSO1_W { PTSO1_W { w : self } } # [ doc = "Bit 2 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso2 ( & mut self ) -> PTSO2_W { PTSO2_W { w : self } } # [ doc = "Bit 3 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso3 ( & mut self ) -> PTSO3_W { PTSO3_W { w : self } } # [ doc = "Bit 4 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso4 ( & mut self ) -> PTSO4_W { PTSO4_W { w : self } } # [ doc = "Bit 5 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso5 ( & mut self ) -> PTSO5_W { PTSO5_W { w : self } } # [ doc = "Bit 6 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso6 ( & mut self ) -> PTSO6_W { PTSO6_W { w : self } } # [ doc = "Bit 7 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso7 ( & mut self ) -> PTSO7_W { PTSO7_W { w : self } } # [ doc = "Bit 8 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso8 ( & mut self ) -> PTSO8_W { PTSO8_W { w : self } } # [ doc = "Bit 9 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso9 ( & mut self ) -> PTSO9_W { PTSO9_W { w : self } } # [ doc = "Bit 10 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso10 ( & mut self ) -> PTSO10_W { PTSO10_W { w : self } } # [ doc = "Bit 11 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso11 ( & mut self ) -> PTSO11_W { PTSO11_W { w : self } } # [ doc = "Bit 12 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso12 ( & mut self ) -> PTSO12_W { PTSO12_W { w : self } } # [ doc = "Bit 13 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso13 ( & mut self ) -> PTSO13_W { PTSO13_W { w : self } } # [ doc = "Bit 14 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso14 ( & mut self ) -> PTSO14_W { PTSO14_W { w : self } } # [ doc = "Bit 15 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso15 ( & mut self ) -> PTSO15_W { PTSO15_W { w : self } } # [ doc = "Bit 16 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso16 ( & mut self ) -> PTSO16_W { PTSO16_W { w : self } } # [ doc = "Bit 17 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso17 ( & mut self ) -> PTSO17_W { PTSO17_W { w : self } } # [ doc = "Bit 18 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso18 ( & mut self ) -> PTSO18_W { PTSO18_W { w : self } } # [ doc = "Bit 19 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso19 ( & mut self ) -> PTSO19_W { PTSO19_W { w : self } } # [ doc = "Bit 20 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso20 ( & mut self ) -> PTSO20_W { PTSO20_W { w : self } } # [ doc = "Bit 21 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso21 ( & mut self ) -> PTSO21_W { PTSO21_W { w : self } } # [ doc = "Bit 22 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso22 ( & mut self ) -> PTSO22_W { PTSO22_W { w : self } } # [ doc = "Bit 23 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso23 ( & mut self ) -> PTSO23_W { PTSO23_W { w : self } } # [ doc = "Bit 24 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso24 ( & mut self ) -> PTSO24_W { PTSO24_W { w : self } } # [ doc = "Bit 25 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso25 ( & mut self ) -> PTSO25_W { PTSO25_W { w : self } } # [ doc = "Bit 26 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso26 ( & mut self ) -> PTSO26_W { PTSO26_W { w : self } } # [ doc = "Bit 27 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso27 ( & mut self ) -> PTSO27_W { PTSO27_W { w : self } } # [ doc = "Bit 28 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso28 ( & mut self ) -> PTSO28_W { PTSO28_W { w : self } } # [ doc = "Bit 29 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso29 ( & mut self ) -> PTSO29_W { PTSO29_W { w : self } } # [ doc = "Bit 30 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso30 ( & mut self ) -> PTSO30_W { PTSO30_W { w : self } } # [ doc = "Bit 31 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso31 ( & mut self ) -> PTSO31_W { PTSO31_W { w : self } } } } # [ doc = "Port Clear Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcor](pcor) module" ] pub type PCOR = crate :: Reg < u32 , _PCOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCOR ; # [ doc = "`write(|w| ..)` method takes [pcor::W](pcor::W) writer structure" ] impl crate :: Writable for PCOR { } # [ doc = "Port Clear Output Register" ] pub mod pcor { # [ doc = "Writer for register PCOR" ] pub type W = crate :: W < u32 , super :: PCOR > ; # [ doc = "Register PCOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO0_AW ) -> Self { match variant { PTCO0_AW :: _0 => false , PTCO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO0`" ] pub struct PTCO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO1_AW ) -> Self { match variant { PTCO1_AW :: _0 => false , PTCO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO1`" ] pub struct PTCO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO2_AW ) -> Self { match variant { PTCO2_AW :: _0 => false , PTCO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO2`" ] pub struct PTCO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO3_AW ) -> Self { match variant { PTCO3_AW :: _0 => false , PTCO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO3`" ] pub struct PTCO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO4_AW ) -> Self { match variant { PTCO4_AW :: _0 => false , PTCO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO4`" ] pub struct PTCO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO5_AW ) -> Self { match variant { PTCO5_AW :: _0 => false , PTCO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO5`" ] pub struct PTCO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO6_AW ) -> Self { match variant { PTCO6_AW :: _0 => false , PTCO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO6`" ] pub struct PTCO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO7_AW ) -> Self { match variant { PTCO7_AW :: _0 => false , PTCO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO7`" ] pub struct PTCO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO8_AW ) -> Self { match variant { PTCO8_AW :: _0 => false , PTCO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO8`" ] pub struct PTCO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO9_AW ) -> Self { match variant { PTCO9_AW :: _0 => false , PTCO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO9`" ] pub struct PTCO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO10_AW ) -> Self { match variant { PTCO10_AW :: _0 => false , PTCO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO10`" ] pub struct PTCO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO11_AW ) -> Self { match variant { PTCO11_AW :: _0 => false , PTCO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO11`" ] pub struct PTCO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO12_AW ) -> Self { match variant { PTCO12_AW :: _0 => false , PTCO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO12`" ] pub struct PTCO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO13_AW ) -> Self { match variant { PTCO13_AW :: _0 => false , PTCO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO13`" ] pub struct PTCO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO14_AW ) -> Self { match variant { PTCO14_AW :: _0 => false , PTCO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO14`" ] pub struct PTCO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO15_AW ) -> Self { match variant { PTCO15_AW :: _0 => false , PTCO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO15`" ] pub struct PTCO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO16_AW ) -> Self { match variant { PTCO16_AW :: _0 => false , PTCO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO16`" ] pub struct PTCO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO17_AW ) -> Self { match variant { PTCO17_AW :: _0 => false , PTCO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO17`" ] pub struct PTCO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO18_AW ) -> Self { match variant { PTCO18_AW :: _0 => false , PTCO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO18`" ] pub struct PTCO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO19_AW ) -> Self { match variant { PTCO19_AW :: _0 => false , PTCO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO19`" ] pub struct PTCO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO20_AW ) -> Self { match variant { PTCO20_AW :: _0 => false , PTCO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO20`" ] pub struct PTCO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO21_AW ) -> Self { match variant { PTCO21_AW :: _0 => false , PTCO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO21`" ] pub struct PTCO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO22_AW ) -> Self { match variant { PTCO22_AW :: _0 => false , PTCO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO22`" ] pub struct PTCO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO23_AW ) -> Self { match variant { PTCO23_AW :: _0 => false , PTCO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO23`" ] pub struct PTCO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO24_AW ) -> Self { match variant { PTCO24_AW :: _0 => false , PTCO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO24`" ] pub struct PTCO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO25_AW ) -> Self { match variant { PTCO25_AW :: _0 => false , PTCO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO25`" ] pub struct PTCO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO26_AW ) -> Self { match variant { PTCO26_AW :: _0 => false , PTCO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO26`" ] pub struct PTCO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO27_AW ) -> Self { match variant { PTCO27_AW :: _0 => false , PTCO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO27`" ] pub struct PTCO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO28_AW ) -> Self { match variant { PTCO28_AW :: _0 => false , PTCO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO28`" ] pub struct PTCO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO29_AW ) -> Self { match variant { PTCO29_AW :: _0 => false , PTCO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO29`" ] pub struct PTCO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO30_AW ) -> Self { match variant { PTCO30_AW :: _0 => false , PTCO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO30`" ] pub struct PTCO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO31_AW ) -> Self { match variant { PTCO31_AW :: _0 => false , PTCO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO31`" ] pub struct PTCO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco0 ( & mut self ) -> PTCO0_W { PTCO0_W { w : self } } # [ doc = "Bit 1 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco1 ( & mut self ) -> PTCO1_W { PTCO1_W { w : self } } # [ doc = "Bit 2 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco2 ( & mut self ) -> PTCO2_W { PTCO2_W { w : self } } # [ doc = "Bit 3 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco3 ( & mut self ) -> PTCO3_W { PTCO3_W { w : self } } # [ doc = "Bit 4 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco4 ( & mut self ) -> PTCO4_W { PTCO4_W { w : self } } # [ doc = "Bit 5 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco5 ( & mut self ) -> PTCO5_W { PTCO5_W { w : self } } # [ doc = "Bit 6 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco6 ( & mut self ) -> PTCO6_W { PTCO6_W { w : self } } # [ doc = "Bit 7 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco7 ( & mut self ) -> PTCO7_W { PTCO7_W { w : self } } # [ doc = "Bit 8 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco8 ( & mut self ) -> PTCO8_W { PTCO8_W { w : self } } # [ doc = "Bit 9 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco9 ( & mut self ) -> PTCO9_W { PTCO9_W { w : self } } # [ doc = "Bit 10 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco10 ( & mut self ) -> PTCO10_W { PTCO10_W { w : self } } # [ doc = "Bit 11 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco11 ( & mut self ) -> PTCO11_W { PTCO11_W { w : self } } # [ doc = "Bit 12 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco12 ( & mut self ) -> PTCO12_W { PTCO12_W { w : self } } # [ doc = "Bit 13 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco13 ( & mut self ) -> PTCO13_W { PTCO13_W { w : self } } # [ doc = "Bit 14 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco14 ( & mut self ) -> PTCO14_W { PTCO14_W { w : self } } # [ doc = "Bit 15 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco15 ( & mut self ) -> PTCO15_W { PTCO15_W { w : self } } # [ doc = "Bit 16 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco16 ( & mut self ) -> PTCO16_W { PTCO16_W { w : self } } # [ doc = "Bit 17 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco17 ( & mut self ) -> PTCO17_W { PTCO17_W { w : self } } # [ doc = "Bit 18 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco18 ( & mut self ) -> PTCO18_W { PTCO18_W { w : self } } # [ doc = "Bit 19 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco19 ( & mut self ) -> PTCO19_W { PTCO19_W { w : self } } # [ doc = "Bit 20 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco20 ( & mut self ) -> PTCO20_W { PTCO20_W { w : self } } # [ doc = "Bit 21 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco21 ( & mut self ) -> PTCO21_W { PTCO21_W { w : self } } # [ doc = "Bit 22 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco22 ( & mut self ) -> PTCO22_W { PTCO22_W { w : self } } # [ doc = "Bit 23 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco23 ( & mut self ) -> PTCO23_W { PTCO23_W { w : self } } # [ doc = "Bit 24 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco24 ( & mut self ) -> PTCO24_W { PTCO24_W { w : self } } # [ doc = "Bit 25 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco25 ( & mut self ) -> PTCO25_W { PTCO25_W { w : self } } # [ doc = "Bit 26 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco26 ( & mut self ) -> PTCO26_W { PTCO26_W { w : self } } # [ doc = "Bit 27 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco27 ( & mut self ) -> PTCO27_W { PTCO27_W { w : self } } # [ doc = "Bit 28 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco28 ( & mut self ) -> PTCO28_W { PTCO28_W { w : self } } # [ doc = "Bit 29 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco29 ( & mut self ) -> PTCO29_W { PTCO29_W { w : self } } # [ doc = "Bit 30 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco30 ( & mut self ) -> PTCO30_W { PTCO30_W { w : self } } # [ doc = "Bit 31 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco31 ( & mut self ) -> PTCO31_W { PTCO31_W { w : self } } } } # [ doc = "Port Toggle Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ptor](ptor) module" ] pub type PTOR = crate :: Reg < u32 , _PTOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PTOR ; # [ doc = "`write(|w| ..)` method takes [ptor::W](ptor::W) writer structure" ] impl crate :: Writable for PTOR { } # [ doc = "Port Toggle Output Register" ] pub mod ptor { # [ doc = "Writer for register PTOR" ] pub type W = crate :: W < u32 , super :: PTOR > ; # [ doc = "Register PTOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PTOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO0_AW ) -> Self { match variant { PTTO0_AW :: _0 => false , PTTO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO0`" ] pub struct PTTO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO1_AW ) -> Self { match variant { PTTO1_AW :: _0 => false , PTTO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO1`" ] pub struct PTTO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO2_AW ) -> Self { match variant { PTTO2_AW :: _0 => false , PTTO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO2`" ] pub struct PTTO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO3_AW ) -> Self { match variant { PTTO3_AW :: _0 => false , PTTO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO3`" ] pub struct PTTO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO4_AW ) -> Self { match variant { PTTO4_AW :: _0 => false , PTTO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO4`" ] pub struct PTTO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO5_AW ) -> Self { match variant { PTTO5_AW :: _0 => false , PTTO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO5`" ] pub struct PTTO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO6_AW ) -> Self { match variant { PTTO6_AW :: _0 => false , PTTO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO6`" ] pub struct PTTO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO7_AW ) -> Self { match variant { PTTO7_AW :: _0 => false , PTTO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO7`" ] pub struct PTTO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO8_AW ) -> Self { match variant { PTTO8_AW :: _0 => false , PTTO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO8`" ] pub struct PTTO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO9_AW ) -> Self { match variant { PTTO9_AW :: _0 => false , PTTO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO9`" ] pub struct PTTO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO10_AW ) -> Self { match variant { PTTO10_AW :: _0 => false , PTTO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO10`" ] pub struct PTTO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO11_AW ) -> Self { match variant { PTTO11_AW :: _0 => false , PTTO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO11`" ] pub struct PTTO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO12_AW ) -> Self { match variant { PTTO12_AW :: _0 => false , PTTO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO12`" ] pub struct PTTO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO13_AW ) -> Self { match variant { PTTO13_AW :: _0 => false , PTTO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO13`" ] pub struct PTTO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO14_AW ) -> Self { match variant { PTTO14_AW :: _0 => false , PTTO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO14`" ] pub struct PTTO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO15_AW ) -> Self { match variant { PTTO15_AW :: _0 => false , PTTO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO15`" ] pub struct PTTO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO16_AW ) -> Self { match variant { PTTO16_AW :: _0 => false , PTTO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO16`" ] pub struct PTTO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO17_AW ) -> Self { match variant { PTTO17_AW :: _0 => false , PTTO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO17`" ] pub struct PTTO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO18_AW ) -> Self { match variant { PTTO18_AW :: _0 => false , PTTO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO18`" ] pub struct PTTO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO19_AW ) -> Self { match variant { PTTO19_AW :: _0 => false , PTTO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO19`" ] pub struct PTTO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO20_AW ) -> Self { match variant { PTTO20_AW :: _0 => false , PTTO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO20`" ] pub struct PTTO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO21_AW ) -> Self { match variant { PTTO21_AW :: _0 => false , PTTO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO21`" ] pub struct PTTO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO22_AW ) -> Self { match variant { PTTO22_AW :: _0 => false , PTTO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO22`" ] pub struct PTTO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO23_AW ) -> Self { match variant { PTTO23_AW :: _0 => false , PTTO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO23`" ] pub struct PTTO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO24_AW ) -> Self { match variant { PTTO24_AW :: _0 => false , PTTO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO24`" ] pub struct PTTO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO25_AW ) -> Self { match variant { PTTO25_AW :: _0 => false , PTTO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO25`" ] pub struct PTTO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO26_AW ) -> Self { match variant { PTTO26_AW :: _0 => false , PTTO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO26`" ] pub struct PTTO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO27_AW ) -> Self { match variant { PTTO27_AW :: _0 => false , PTTO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO27`" ] pub struct PTTO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO28_AW ) -> Self { match variant { PTTO28_AW :: _0 => false , PTTO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO28`" ] pub struct PTTO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO29_AW ) -> Self { match variant { PTTO29_AW :: _0 => false , PTTO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO29`" ] pub struct PTTO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO30_AW ) -> Self { match variant { PTTO30_AW :: _0 => false , PTTO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO30`" ] pub struct PTTO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO31_AW ) -> Self { match variant { PTTO31_AW :: _0 => false , PTTO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO31`" ] pub struct PTTO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto0 ( & mut self ) -> PTTO0_W { PTTO0_W { w : self } } # [ doc = "Bit 1 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto1 ( & mut self ) -> PTTO1_W { PTTO1_W { w : self } } # [ doc = "Bit 2 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto2 ( & mut self ) -> PTTO2_W { PTTO2_W { w : self } } # [ doc = "Bit 3 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto3 ( & mut self ) -> PTTO3_W { PTTO3_W { w : self } } # [ doc = "Bit 4 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto4 ( & mut self ) -> PTTO4_W { PTTO4_W { w : self } } # [ doc = "Bit 5 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto5 ( & mut self ) -> PTTO5_W { PTTO5_W { w : self } } # [ doc = "Bit 6 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto6 ( & mut self ) -> PTTO6_W { PTTO6_W { w : self } } # [ doc = "Bit 7 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto7 ( & mut self ) -> PTTO7_W { PTTO7_W { w : self } } # [ doc = "Bit 8 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto8 ( & mut self ) -> PTTO8_W { PTTO8_W { w : self } } # [ doc = "Bit 9 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto9 ( & mut self ) -> PTTO9_W { PTTO9_W { w : self } } # [ doc = "Bit 10 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto10 ( & mut self ) -> PTTO10_W { PTTO10_W { w : self } } # [ doc = "Bit 11 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto11 ( & mut self ) -> PTTO11_W { PTTO11_W { w : self } } # [ doc = "Bit 12 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto12 ( & mut self ) -> PTTO12_W { PTTO12_W { w : self } } # [ doc = "Bit 13 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto13 ( & mut self ) -> PTTO13_W { PTTO13_W { w : self } } # [ doc = "Bit 14 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto14 ( & mut self ) -> PTTO14_W { PTTO14_W { w : self } } # [ doc = "Bit 15 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto15 ( & mut self ) -> PTTO15_W { PTTO15_W { w : self } } # [ doc = "Bit 16 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto16 ( & mut self ) -> PTTO16_W { PTTO16_W { w : self } } # [ doc = "Bit 17 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto17 ( & mut self ) -> PTTO17_W { PTTO17_W { w : self } } # [ doc = "Bit 18 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto18 ( & mut self ) -> PTTO18_W { PTTO18_W { w : self } } # [ doc = "Bit 19 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto19 ( & mut self ) -> PTTO19_W { PTTO19_W { w : self } } # [ doc = "Bit 20 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto20 ( & mut self ) -> PTTO20_W { PTTO20_W { w : self } } # [ doc = "Bit 21 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto21 ( & mut self ) -> PTTO21_W { PTTO21_W { w : self } } # [ doc = "Bit 22 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto22 ( & mut self ) -> PTTO22_W { PTTO22_W { w : self } } # [ doc = "Bit 23 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto23 ( & mut self ) -> PTTO23_W { PTTO23_W { w : self } } # [ doc = "Bit 24 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto24 ( & mut self ) -> PTTO24_W { PTTO24_W { w : self } } # [ doc = "Bit 25 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto25 ( & mut self ) -> PTTO25_W { PTTO25_W { w : self } } # [ doc = "Bit 26 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto26 ( & mut self ) -> PTTO26_W { PTTO26_W { w : self } } # [ doc = "Bit 27 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto27 ( & mut self ) -> PTTO27_W { PTTO27_W { w : self } } # [ doc = "Bit 28 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto28 ( & mut self ) -> PTTO28_W { PTTO28_W { w : self } } # [ doc = "Bit 29 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto29 ( & mut self ) -> PTTO29_W { PTTO29_W { w : self } } # [ doc = "Bit 30 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto30 ( & mut self ) -> PTTO30_W { PTTO30_W { w : self } } # [ doc = "Bit 31 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto31 ( & mut self ) -> PTTO31_W { PTTO31_W { w : self } } } } # [ doc = "Port Data Input Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdir](pdir) module" ] pub type PDIR = crate :: Reg < u32 , _PDIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDIR ; # [ doc = "`read()` method returns [pdir::R](pdir::R) reader structure" ] impl crate :: Readable for PDIR { } # [ doc = "Port Data Input Register" ] pub mod pdir { # [ doc = "Reader of register PDIR" ] pub type R = crate :: R < u32 , super :: PDIR > ; # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI0_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI0_A ) -> Self { match variant { PDI0_A :: _0 => false , PDI0_A :: _1 => true } } } # [ doc = "Reader of field `PDI0`" ] pub type PDI0_R = crate :: R < bool , PDI0_A > ; impl PDI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI0_A { match self . bits { false => PDI0_A :: _0 , true => PDI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI0_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI1_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI1_A ) -> Self { match variant { PDI1_A :: _0 => false , PDI1_A :: _1 => true } } } # [ doc = "Reader of field `PDI1`" ] pub type PDI1_R = crate :: R < bool , PDI1_A > ; impl PDI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI1_A { match self . bits { false => PDI1_A :: _0 , true => PDI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI1_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI2_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI2_A ) -> Self { match variant { PDI2_A :: _0 => false , PDI2_A :: _1 => true } } } # [ doc = "Reader of field `PDI2`" ] pub type PDI2_R = crate :: R < bool , PDI2_A > ; impl PDI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI2_A { match self . bits { false => PDI2_A :: _0 , true => PDI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI2_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI3_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI3_A ) -> Self { match variant { PDI3_A :: _0 => false , PDI3_A :: _1 => true } } } # [ doc = "Reader of field `PDI3`" ] pub type PDI3_R = crate :: R < bool , PDI3_A > ; impl PDI3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI3_A { match self . bits { false => PDI3_A :: _0 , true => PDI3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI3_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI4_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI4_A ) -> Self { match variant { PDI4_A :: _0 => false , PDI4_A :: _1 => true } } } # [ doc = "Reader of field `PDI4`" ] pub type PDI4_R = crate :: R < bool , PDI4_A > ; impl PDI4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI4_A { match self . bits { false => PDI4_A :: _0 , true => PDI4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI4_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI5_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI5_A ) -> Self { match variant { PDI5_A :: _0 => false , PDI5_A :: _1 => true } } } # [ doc = "Reader of field `PDI5`" ] pub type PDI5_R = crate :: R < bool , PDI5_A > ; impl PDI5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI5_A { match self . bits { false => PDI5_A :: _0 , true => PDI5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI5_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI6_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI6_A ) -> Self { match variant { PDI6_A :: _0 => false , PDI6_A :: _1 => true } } } # [ doc = "Reader of field `PDI6`" ] pub type PDI6_R = crate :: R < bool , PDI6_A > ; impl PDI6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI6_A { match self . bits { false => PDI6_A :: _0 , true => PDI6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI6_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI7_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI7_A ) -> Self { match variant { PDI7_A :: _0 => false , PDI7_A :: _1 => true } } } # [ doc = "Reader of field `PDI7`" ] pub type PDI7_R = crate :: R < bool , PDI7_A > ; impl PDI7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI7_A { match self . bits { false => PDI7_A :: _0 , true => PDI7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI7_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI8_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI8_A ) -> Self { match variant { PDI8_A :: _0 => false , PDI8_A :: _1 => true } } } # [ doc = "Reader of field `PDI8`" ] pub type PDI8_R = crate :: R < bool , PDI8_A > ; impl PDI8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI8_A { match self . bits { false => PDI8_A :: _0 , true => PDI8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI8_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI9_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI9_A ) -> Self { match variant { PDI9_A :: _0 => false , PDI9_A :: _1 => true } } } # [ doc = "Reader of field `PDI9`" ] pub type PDI9_R = crate :: R < bool , PDI9_A > ; impl PDI9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI9_A { match self . bits { false => PDI9_A :: _0 , true => PDI9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI9_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI10_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI10_A ) -> Self { match variant { PDI10_A :: _0 => false , PDI10_A :: _1 => true } } } # [ doc = "Reader of field `PDI10`" ] pub type PDI10_R = crate :: R < bool , PDI10_A > ; impl PDI10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI10_A { match self . bits { false => PDI10_A :: _0 , true => PDI10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI10_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI11_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI11_A ) -> Self { match variant { PDI11_A :: _0 => false , PDI11_A :: _1 => true } } } # [ doc = "Reader of field `PDI11`" ] pub type PDI11_R = crate :: R < bool , PDI11_A > ; impl PDI11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI11_A { match self . bits { false => PDI11_A :: _0 , true => PDI11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI11_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI12_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI12_A ) -> Self { match variant { PDI12_A :: _0 => false , PDI12_A :: _1 => true } } } # [ doc = "Reader of field `PDI12`" ] pub type PDI12_R = crate :: R < bool , PDI12_A > ; impl PDI12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI12_A { match self . bits { false => PDI12_A :: _0 , true => PDI12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI12_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI13_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI13_A ) -> Self { match variant { PDI13_A :: _0 => false , PDI13_A :: _1 => true } } } # [ doc = "Reader of field `PDI13`" ] pub type PDI13_R = crate :: R < bool , PDI13_A > ; impl PDI13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI13_A { match self . bits { false => PDI13_A :: _0 , true => PDI13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI13_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI14_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI14_A ) -> Self { match variant { PDI14_A :: _0 => false , PDI14_A :: _1 => true } } } # [ doc = "Reader of field `PDI14`" ] pub type PDI14_R = crate :: R < bool , PDI14_A > ; impl PDI14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI14_A { match self . bits { false => PDI14_A :: _0 , true => PDI14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI14_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI15_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI15_A ) -> Self { match variant { PDI15_A :: _0 => false , PDI15_A :: _1 => true } } } # [ doc = "Reader of field `PDI15`" ] pub type PDI15_R = crate :: R < bool , PDI15_A > ; impl PDI15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI15_A { match self . bits { false => PDI15_A :: _0 , true => PDI15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI15_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI16_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI16_A ) -> Self { match variant { PDI16_A :: _0 => false , PDI16_A :: _1 => true } } } # [ doc = "Reader of field `PDI16`" ] pub type PDI16_R = crate :: R < bool , PDI16_A > ; impl PDI16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI16_A { match self . bits { false => PDI16_A :: _0 , true => PDI16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI16_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI17_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI17_A ) -> Self { match variant { PDI17_A :: _0 => false , PDI17_A :: _1 => true } } } # [ doc = "Reader of field `PDI17`" ] pub type PDI17_R = crate :: R < bool , PDI17_A > ; impl PDI17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI17_A { match self . bits { false => PDI17_A :: _0 , true => PDI17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI17_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI18_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI18_A ) -> Self { match variant { PDI18_A :: _0 => false , PDI18_A :: _1 => true } } } # [ doc = "Reader of field `PDI18`" ] pub type PDI18_R = crate :: R < bool , PDI18_A > ; impl PDI18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI18_A { match self . bits { false => PDI18_A :: _0 , true => PDI18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI18_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI19_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI19_A ) -> Self { match variant { PDI19_A :: _0 => false , PDI19_A :: _1 => true } } } # [ doc = "Reader of field `PDI19`" ] pub type PDI19_R = crate :: R < bool , PDI19_A > ; impl PDI19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI19_A { match self . bits { false => PDI19_A :: _0 , true => PDI19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI19_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI20_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI20_A ) -> Self { match variant { PDI20_A :: _0 => false , PDI20_A :: _1 => true } } } # [ doc = "Reader of field `PDI20`" ] pub type PDI20_R = crate :: R < bool , PDI20_A > ; impl PDI20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI20_A { match self . bits { false => PDI20_A :: _0 , true => PDI20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI20_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI21_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI21_A ) -> Self { match variant { PDI21_A :: _0 => false , PDI21_A :: _1 => true } } } # [ doc = "Reader of field `PDI21`" ] pub type PDI21_R = crate :: R < bool , PDI21_A > ; impl PDI21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI21_A { match self . bits { false => PDI21_A :: _0 , true => PDI21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI21_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI22_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI22_A ) -> Self { match variant { PDI22_A :: _0 => false , PDI22_A :: _1 => true } } } # [ doc = "Reader of field `PDI22`" ] pub type PDI22_R = crate :: R < bool , PDI22_A > ; impl PDI22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI22_A { match self . bits { false => PDI22_A :: _0 , true => PDI22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI22_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI23_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI23_A ) -> Self { match variant { PDI23_A :: _0 => false , PDI23_A :: _1 => true } } } # [ doc = "Reader of field `PDI23`" ] pub type PDI23_R = crate :: R < bool , PDI23_A > ; impl PDI23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI23_A { match self . bits { false => PDI23_A :: _0 , true => PDI23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI23_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI24_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI24_A ) -> Self { match variant { PDI24_A :: _0 => false , PDI24_A :: _1 => true } } } # [ doc = "Reader of field `PDI24`" ] pub type PDI24_R = crate :: R < bool , PDI24_A > ; impl PDI24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI24_A { match self . bits { false => PDI24_A :: _0 , true => PDI24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI24_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI25_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI25_A ) -> Self { match variant { PDI25_A :: _0 => false , PDI25_A :: _1 => true } } } # [ doc = "Reader of field `PDI25`" ] pub type PDI25_R = crate :: R < bool , PDI25_A > ; impl PDI25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI25_A { match self . bits { false => PDI25_A :: _0 , true => PDI25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI25_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI26_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI26_A ) -> Self { match variant { PDI26_A :: _0 => false , PDI26_A :: _1 => true } } } # [ doc = "Reader of field `PDI26`" ] pub type PDI26_R = crate :: R < bool , PDI26_A > ; impl PDI26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI26_A { match self . bits { false => PDI26_A :: _0 , true => PDI26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI26_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI27_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI27_A ) -> Self { match variant { PDI27_A :: _0 => false , PDI27_A :: _1 => true } } } # [ doc = "Reader of field `PDI27`" ] pub type PDI27_R = crate :: R < bool , PDI27_A > ; impl PDI27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI27_A { match self . bits { false => PDI27_A :: _0 , true => PDI27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI27_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI28_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI28_A ) -> Self { match variant { PDI28_A :: _0 => false , PDI28_A :: _1 => true } } } # [ doc = "Reader of field `PDI28`" ] pub type PDI28_R = crate :: R < bool , PDI28_A > ; impl PDI28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI28_A { match self . bits { false => PDI28_A :: _0 , true => PDI28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI28_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI29_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI29_A ) -> Self { match variant { PDI29_A :: _0 => false , PDI29_A :: _1 => true } } } # [ doc = "Reader of field `PDI29`" ] pub type PDI29_R = crate :: R < bool , PDI29_A > ; impl PDI29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI29_A { match self . bits { false => PDI29_A :: _0 , true => PDI29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI29_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI30_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI30_A ) -> Self { match variant { PDI30_A :: _0 => false , PDI30_A :: _1 => true } } } # [ doc = "Reader of field `PDI30`" ] pub type PDI30_R = crate :: R < bool , PDI30_A > ; impl PDI30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI30_A { match self . bits { false => PDI30_A :: _0 , true => PDI30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI30_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI31_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI31_A ) -> Self { match variant { PDI31_A :: _0 => false , PDI31_A :: _1 => true } } } # [ doc = "Reader of field `PDI31`" ] pub type PDI31_R = crate :: R < bool , PDI31_A > ; impl PDI31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI31_A { match self . bits { false => PDI31_A :: _0 , true => PDI31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI31_A :: _1 } } impl R { # [ doc = "Bit 0 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi0 ( & self ) -> PDI0_R { PDI0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi1 ( & self ) -> PDI1_R { PDI1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi2 ( & self ) -> PDI2_R { PDI2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi3 ( & self ) -> PDI3_R { PDI3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi4 ( & self ) -> PDI4_R { PDI4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi5 ( & self ) -> PDI5_R { PDI5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi6 ( & self ) -> PDI6_R { PDI6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi7 ( & self ) -> PDI7_R { PDI7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi8 ( & self ) -> PDI8_R { PDI8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi9 ( & self ) -> PDI9_R { PDI9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi10 ( & self ) -> PDI10_R { PDI10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi11 ( & self ) -> PDI11_R { PDI11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi12 ( & self ) -> PDI12_R { PDI12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi13 ( & self ) -> PDI13_R { PDI13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi14 ( & self ) -> PDI14_R { PDI14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi15 ( & self ) -> PDI15_R { PDI15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi16 ( & self ) -> PDI16_R { PDI16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi17 ( & self ) -> PDI17_R { PDI17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi18 ( & self ) -> PDI18_R { PDI18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi19 ( & self ) -> PDI19_R { PDI19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi20 ( & self ) -> PDI20_R { PDI20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi21 ( & self ) -> PDI21_R { PDI21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi22 ( & self ) -> PDI22_R { PDI22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi23 ( & self ) -> PDI23_R { PDI23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi24 ( & self ) -> PDI24_R { PDI24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi25 ( & self ) -> PDI25_R { PDI25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi26 ( & self ) -> PDI26_R { PDI26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi27 ( & self ) -> PDI27_R { PDI27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi28 ( & self ) -> PDI28_R { PDI28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi29 ( & self ) -> PDI29_R { PDI29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi30 ( & self ) -> PDI30_R { PDI30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi31 ( & self ) -> PDI31_R { PDI31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Port Data Direction Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pddr](pddr) module" ] pub type PDDR = crate :: Reg < u32 , _PDDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDDR ; # [ doc = "`read()` method returns [pddr::R](pddr::R) reader structure" ] impl crate :: Readable for PDDR { } # [ doc = "`write(|w| ..)` method takes [pddr::W](pddr::W) writer structure" ] impl crate :: Writable for PDDR { } # [ doc = "Port Data Direction Register" ] pub mod pddr { # [ doc = "Reader of register PDDR" ] pub type R = crate :: R < u32 , super :: PDDR > ; # [ doc = "Writer for register PDDR" ] pub type W = crate :: W < u32 , super :: PDDR > ; # [ doc = "Register PDDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD0_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD0_A ) -> Self { match variant { PDD0_A :: _0 => false , PDD0_A :: _1 => true } } } # [ doc = "Reader of field `PDD0`" ] pub type PDD0_R = crate :: R < bool , PDD0_A > ; impl PDD0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD0_A { match self . bits { false => PDD0_A :: _0 , true => PDD0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD0_A :: _1 } } # [ doc = "Write proxy for field `PDD0`" ] pub struct PDD0_W < 'a > { w : & 'a mut W , } impl < 'a > PDD0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD1_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD1_A ) -> Self { match variant { PDD1_A :: _0 => false , PDD1_A :: _1 => true } } } # [ doc = "Reader of field `PDD1`" ] pub type PDD1_R = crate :: R < bool , PDD1_A > ; impl PDD1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD1_A { match self . bits { false => PDD1_A :: _0 , true => PDD1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD1_A :: _1 } } # [ doc = "Write proxy for field `PDD1`" ] pub struct PDD1_W < 'a > { w : & 'a mut W , } impl < 'a > PDD1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD2_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD2_A ) -> Self { match variant { PDD2_A :: _0 => false , PDD2_A :: _1 => true } } } # [ doc = "Reader of field `PDD2`" ] pub type PDD2_R = crate :: R < bool , PDD2_A > ; impl PDD2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD2_A { match self . bits { false => PDD2_A :: _0 , true => PDD2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD2_A :: _1 } } # [ doc = "Write proxy for field `PDD2`" ] pub struct PDD2_W < 'a > { w : & 'a mut W , } impl < 'a > PDD2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD3_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD3_A ) -> Self { match variant { PDD3_A :: _0 => false , PDD3_A :: _1 => true } } } # [ doc = "Reader of field `PDD3`" ] pub type PDD3_R = crate :: R < bool , PDD3_A > ; impl PDD3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD3_A { match self . bits { false => PDD3_A :: _0 , true => PDD3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD3_A :: _1 } } # [ doc = "Write proxy for field `PDD3`" ] pub struct PDD3_W < 'a > { w : & 'a mut W , } impl < 'a > PDD3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD4_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD4_A ) -> Self { match variant { PDD4_A :: _0 => false , PDD4_A :: _1 => true } } } # [ doc = "Reader of field `PDD4`" ] pub type PDD4_R = crate :: R < bool , PDD4_A > ; impl PDD4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD4_A { match self . bits { false => PDD4_A :: _0 , true => PDD4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD4_A :: _1 } } # [ doc = "Write proxy for field `PDD4`" ] pub struct PDD4_W < 'a > { w : & 'a mut W , } impl < 'a > PDD4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD5_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD5_A ) -> Self { match variant { PDD5_A :: _0 => false , PDD5_A :: _1 => true } } } # [ doc = "Reader of field `PDD5`" ] pub type PDD5_R = crate :: R < bool , PDD5_A > ; impl PDD5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD5_A { match self . bits { false => PDD5_A :: _0 , true => PDD5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD5_A :: _1 } } # [ doc = "Write proxy for field `PDD5`" ] pub struct PDD5_W < 'a > { w : & 'a mut W , } impl < 'a > PDD5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD6_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD6_A ) -> Self { match variant { PDD6_A :: _0 => false , PDD6_A :: _1 => true } } } # [ doc = "Reader of field `PDD6`" ] pub type PDD6_R = crate :: R < bool , PDD6_A > ; impl PDD6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD6_A { match self . bits { false => PDD6_A :: _0 , true => PDD6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD6_A :: _1 } } # [ doc = "Write proxy for field `PDD6`" ] pub struct PDD6_W < 'a > { w : & 'a mut W , } impl < 'a > PDD6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD7_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD7_A ) -> Self { match variant { PDD7_A :: _0 => false , PDD7_A :: _1 => true } } } # [ doc = "Reader of field `PDD7`" ] pub type PDD7_R = crate :: R < bool , PDD7_A > ; impl PDD7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD7_A { match self . bits { false => PDD7_A :: _0 , true => PDD7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD7_A :: _1 } } # [ doc = "Write proxy for field `PDD7`" ] pub struct PDD7_W < 'a > { w : & 'a mut W , } impl < 'a > PDD7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD8_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD8_A ) -> Self { match variant { PDD8_A :: _0 => false , PDD8_A :: _1 => true } } } # [ doc = "Reader of field `PDD8`" ] pub type PDD8_R = crate :: R < bool , PDD8_A > ; impl PDD8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD8_A { match self . bits { false => PDD8_A :: _0 , true => PDD8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD8_A :: _1 } } # [ doc = "Write proxy for field `PDD8`" ] pub struct PDD8_W < 'a > { w : & 'a mut W , } impl < 'a > PDD8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD9_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD9_A ) -> Self { match variant { PDD9_A :: _0 => false , PDD9_A :: _1 => true } } } # [ doc = "Reader of field `PDD9`" ] pub type PDD9_R = crate :: R < bool , PDD9_A > ; impl PDD9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD9_A { match self . bits { false => PDD9_A :: _0 , true => PDD9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD9_A :: _1 } } # [ doc = "Write proxy for field `PDD9`" ] pub struct PDD9_W < 'a > { w : & 'a mut W , } impl < 'a > PDD9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD10_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD10_A ) -> Self { match variant { PDD10_A :: _0 => false , PDD10_A :: _1 => true } } } # [ doc = "Reader of field `PDD10`" ] pub type PDD10_R = crate :: R < bool , PDD10_A > ; impl PDD10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD10_A { match self . bits { false => PDD10_A :: _0 , true => PDD10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD10_A :: _1 } } # [ doc = "Write proxy for field `PDD10`" ] pub struct PDD10_W < 'a > { w : & 'a mut W , } impl < 'a > PDD10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD11_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD11_A ) -> Self { match variant { PDD11_A :: _0 => false , PDD11_A :: _1 => true } } } # [ doc = "Reader of field `PDD11`" ] pub type PDD11_R = crate :: R < bool , PDD11_A > ; impl PDD11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD11_A { match self . bits { false => PDD11_A :: _0 , true => PDD11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD11_A :: _1 } } # [ doc = "Write proxy for field `PDD11`" ] pub struct PDD11_W < 'a > { w : & 'a mut W , } impl < 'a > PDD11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD12_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD12_A ) -> Self { match variant { PDD12_A :: _0 => false , PDD12_A :: _1 => true } } } # [ doc = "Reader of field `PDD12`" ] pub type PDD12_R = crate :: R < bool , PDD12_A > ; impl PDD12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD12_A { match self . bits { false => PDD12_A :: _0 , true => PDD12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD12_A :: _1 } } # [ doc = "Write proxy for field `PDD12`" ] pub struct PDD12_W < 'a > { w : & 'a mut W , } impl < 'a > PDD12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD13_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD13_A ) -> Self { match variant { PDD13_A :: _0 => false , PDD13_A :: _1 => true } } } # [ doc = "Reader of field `PDD13`" ] pub type PDD13_R = crate :: R < bool , PDD13_A > ; impl PDD13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD13_A { match self . bits { false => PDD13_A :: _0 , true => PDD13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD13_A :: _1 } } # [ doc = "Write proxy for field `PDD13`" ] pub struct PDD13_W < 'a > { w : & 'a mut W , } impl < 'a > PDD13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD14_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD14_A ) -> Self { match variant { PDD14_A :: _0 => false , PDD14_A :: _1 => true } } } # [ doc = "Reader of field `PDD14`" ] pub type PDD14_R = crate :: R < bool , PDD14_A > ; impl PDD14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD14_A { match self . bits { false => PDD14_A :: _0 , true => PDD14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD14_A :: _1 } } # [ doc = "Write proxy for field `PDD14`" ] pub struct PDD14_W < 'a > { w : & 'a mut W , } impl < 'a > PDD14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD15_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD15_A ) -> Self { match variant { PDD15_A :: _0 => false , PDD15_A :: _1 => true } } } # [ doc = "Reader of field `PDD15`" ] pub type PDD15_R = crate :: R < bool , PDD15_A > ; impl PDD15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD15_A { match self . bits { false => PDD15_A :: _0 , true => PDD15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD15_A :: _1 } } # [ doc = "Write proxy for field `PDD15`" ] pub struct PDD15_W < 'a > { w : & 'a mut W , } impl < 'a > PDD15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD16_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD16_A ) -> Self { match variant { PDD16_A :: _0 => false , PDD16_A :: _1 => true } } } # [ doc = "Reader of field `PDD16`" ] pub type PDD16_R = crate :: R < bool , PDD16_A > ; impl PDD16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD16_A { match self . bits { false => PDD16_A :: _0 , true => PDD16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD16_A :: _1 } } # [ doc = "Write proxy for field `PDD16`" ] pub struct PDD16_W < 'a > { w : & 'a mut W , } impl < 'a > PDD16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD17_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD17_A ) -> Self { match variant { PDD17_A :: _0 => false , PDD17_A :: _1 => true } } } # [ doc = "Reader of field `PDD17`" ] pub type PDD17_R = crate :: R < bool , PDD17_A > ; impl PDD17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD17_A { match self . bits { false => PDD17_A :: _0 , true => PDD17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD17_A :: _1 } } # [ doc = "Write proxy for field `PDD17`" ] pub struct PDD17_W < 'a > { w : & 'a mut W , } impl < 'a > PDD17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD18_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD18_A ) -> Self { match variant { PDD18_A :: _0 => false , PDD18_A :: _1 => true } } } # [ doc = "Reader of field `PDD18`" ] pub type PDD18_R = crate :: R < bool , PDD18_A > ; impl PDD18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD18_A { match self . bits { false => PDD18_A :: _0 , true => PDD18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD18_A :: _1 } } # [ doc = "Write proxy for field `PDD18`" ] pub struct PDD18_W < 'a > { w : & 'a mut W , } impl < 'a > PDD18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD19_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD19_A ) -> Self { match variant { PDD19_A :: _0 => false , PDD19_A :: _1 => true } } } # [ doc = "Reader of field `PDD19`" ] pub type PDD19_R = crate :: R < bool , PDD19_A > ; impl PDD19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD19_A { match self . bits { false => PDD19_A :: _0 , true => PDD19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD19_A :: _1 } } # [ doc = "Write proxy for field `PDD19`" ] pub struct PDD19_W < 'a > { w : & 'a mut W , } impl < 'a > PDD19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD20_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD20_A ) -> Self { match variant { PDD20_A :: _0 => false , PDD20_A :: _1 => true } } } # [ doc = "Reader of field `PDD20`" ] pub type PDD20_R = crate :: R < bool , PDD20_A > ; impl PDD20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD20_A { match self . bits { false => PDD20_A :: _0 , true => PDD20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD20_A :: _1 } } # [ doc = "Write proxy for field `PDD20`" ] pub struct PDD20_W < 'a > { w : & 'a mut W , } impl < 'a > PDD20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD21_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD21_A ) -> Self { match variant { PDD21_A :: _0 => false , PDD21_A :: _1 => true } } } # [ doc = "Reader of field `PDD21`" ] pub type PDD21_R = crate :: R < bool , PDD21_A > ; impl PDD21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD21_A { match self . bits { false => PDD21_A :: _0 , true => PDD21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD21_A :: _1 } } # [ doc = "Write proxy for field `PDD21`" ] pub struct PDD21_W < 'a > { w : & 'a mut W , } impl < 'a > PDD21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD22_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD22_A ) -> Self { match variant { PDD22_A :: _0 => false , PDD22_A :: _1 => true } } } # [ doc = "Reader of field `PDD22`" ] pub type PDD22_R = crate :: R < bool , PDD22_A > ; impl PDD22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD22_A { match self . bits { false => PDD22_A :: _0 , true => PDD22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD22_A :: _1 } } # [ doc = "Write proxy for field `PDD22`" ] pub struct PDD22_W < 'a > { w : & 'a mut W , } impl < 'a > PDD22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD23_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD23_A ) -> Self { match variant { PDD23_A :: _0 => false , PDD23_A :: _1 => true } } } # [ doc = "Reader of field `PDD23`" ] pub type PDD23_R = crate :: R < bool , PDD23_A > ; impl PDD23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD23_A { match self . bits { false => PDD23_A :: _0 , true => PDD23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD23_A :: _1 } } # [ doc = "Write proxy for field `PDD23`" ] pub struct PDD23_W < 'a > { w : & 'a mut W , } impl < 'a > PDD23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD24_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD24_A ) -> Self { match variant { PDD24_A :: _0 => false , PDD24_A :: _1 => true } } } # [ doc = "Reader of field `PDD24`" ] pub type PDD24_R = crate :: R < bool , PDD24_A > ; impl PDD24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD24_A { match self . bits { false => PDD24_A :: _0 , true => PDD24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD24_A :: _1 } } # [ doc = "Write proxy for field `PDD24`" ] pub struct PDD24_W < 'a > { w : & 'a mut W , } impl < 'a > PDD24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD25_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD25_A ) -> Self { match variant { PDD25_A :: _0 => false , PDD25_A :: _1 => true } } } # [ doc = "Reader of field `PDD25`" ] pub type PDD25_R = crate :: R < bool , PDD25_A > ; impl PDD25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD25_A { match self . bits { false => PDD25_A :: _0 , true => PDD25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD25_A :: _1 } } # [ doc = "Write proxy for field `PDD25`" ] pub struct PDD25_W < 'a > { w : & 'a mut W , } impl < 'a > PDD25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD26_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD26_A ) -> Self { match variant { PDD26_A :: _0 => false , PDD26_A :: _1 => true } } } # [ doc = "Reader of field `PDD26`" ] pub type PDD26_R = crate :: R < bool , PDD26_A > ; impl PDD26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD26_A { match self . bits { false => PDD26_A :: _0 , true => PDD26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD26_A :: _1 } } # [ doc = "Write proxy for field `PDD26`" ] pub struct PDD26_W < 'a > { w : & 'a mut W , } impl < 'a > PDD26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD27_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD27_A ) -> Self { match variant { PDD27_A :: _0 => false , PDD27_A :: _1 => true } } } # [ doc = "Reader of field `PDD27`" ] pub type PDD27_R = crate :: R < bool , PDD27_A > ; impl PDD27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD27_A { match self . bits { false => PDD27_A :: _0 , true => PDD27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD27_A :: _1 } } # [ doc = "Write proxy for field `PDD27`" ] pub struct PDD27_W < 'a > { w : & 'a mut W , } impl < 'a > PDD27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD28_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD28_A ) -> Self { match variant { PDD28_A :: _0 => false , PDD28_A :: _1 => true } } } # [ doc = "Reader of field `PDD28`" ] pub type PDD28_R = crate :: R < bool , PDD28_A > ; impl PDD28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD28_A { match self . bits { false => PDD28_A :: _0 , true => PDD28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD28_A :: _1 } } # [ doc = "Write proxy for field `PDD28`" ] pub struct PDD28_W < 'a > { w : & 'a mut W , } impl < 'a > PDD28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD29_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD29_A ) -> Self { match variant { PDD29_A :: _0 => false , PDD29_A :: _1 => true } } } # [ doc = "Reader of field `PDD29`" ] pub type PDD29_R = crate :: R < bool , PDD29_A > ; impl PDD29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD29_A { match self . bits { false => PDD29_A :: _0 , true => PDD29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD29_A :: _1 } } # [ doc = "Write proxy for field `PDD29`" ] pub struct PDD29_W < 'a > { w : & 'a mut W , } impl < 'a > PDD29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD30_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD30_A ) -> Self { match variant { PDD30_A :: _0 => false , PDD30_A :: _1 => true } } } # [ doc = "Reader of field `PDD30`" ] pub type PDD30_R = crate :: R < bool , PDD30_A > ; impl PDD30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD30_A { match self . bits { false => PDD30_A :: _0 , true => PDD30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD30_A :: _1 } } # [ doc = "Write proxy for field `PDD30`" ] pub struct PDD30_W < 'a > { w : & 'a mut W , } impl < 'a > PDD30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD31_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD31_A ) -> Self { match variant { PDD31_A :: _0 => false , PDD31_A :: _1 => true } } } # [ doc = "Reader of field `PDD31`" ] pub type PDD31_R = crate :: R < bool , PDD31_A > ; impl PDD31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD31_A { match self . bits { false => PDD31_A :: _0 , true => PDD31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD31_A :: _1 } } # [ doc = "Write proxy for field `PDD31`" ] pub struct PDD31_W < 'a > { w : & 'a mut W , } impl < 'a > PDD31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & self ) -> PDD0_R { PDD0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & self ) -> PDD1_R { PDD1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & self ) -> PDD2_R { PDD2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & self ) -> PDD3_R { PDD3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & self ) -> PDD4_R { PDD4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & self ) -> PDD5_R { PDD5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & self ) -> PDD6_R { PDD6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & self ) -> PDD7_R { PDD7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & self ) -> PDD8_R { PDD8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & self ) -> PDD9_R { PDD9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & self ) -> PDD10_R { PDD10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & self ) -> PDD11_R { PDD11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & self ) -> PDD12_R { PDD12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & self ) -> PDD13_R { PDD13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & self ) -> PDD14_R { PDD14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & self ) -> PDD15_R { PDD15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & self ) -> PDD16_R { PDD16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & self ) -> PDD17_R { PDD17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & self ) -> PDD18_R { PDD18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & self ) -> PDD19_R { PDD19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & self ) -> PDD20_R { PDD20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & self ) -> PDD21_R { PDD21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & self ) -> PDD22_R { PDD22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & self ) -> PDD23_R { PDD23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & self ) -> PDD24_R { PDD24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & self ) -> PDD25_R { PDD25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & self ) -> PDD26_R { PDD26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & self ) -> PDD27_R { PDD27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & self ) -> PDD28_R { PDD28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & self ) -> PDD29_R { PDD29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & self ) -> PDD30_R { PDD30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & self ) -> PDD31_R { PDD31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & mut self ) -> PDD0_W { PDD0_W { w : self } } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & mut self ) -> PDD1_W { PDD1_W { w : self } } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & mut self ) -> PDD2_W { PDD2_W { w : self } } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & mut self ) -> PDD3_W { PDD3_W { w : self } } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & mut self ) -> PDD4_W { PDD4_W { w : self } } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & mut self ) -> PDD5_W { PDD5_W { w : self } } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & mut self ) -> PDD6_W { PDD6_W { w : self } } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & mut self ) -> PDD7_W { PDD7_W { w : self } } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & mut self ) -> PDD8_W { PDD8_W { w : self } } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & mut self ) -> PDD9_W { PDD9_W { w : self } } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & mut self ) -> PDD10_W { PDD10_W { w : self } } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & mut self ) -> PDD11_W { PDD11_W { w : self } } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & mut self ) -> PDD12_W { PDD12_W { w : self } } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & mut self ) -> PDD13_W { PDD13_W { w : self } } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & mut self ) -> PDD14_W { PDD14_W { w : self } } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & mut self ) -> PDD15_W { PDD15_W { w : self } } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & mut self ) -> PDD16_W { PDD16_W { w : self } } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & mut self ) -> PDD17_W { PDD17_W { w : self } } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & mut self ) -> PDD18_W { PDD18_W { w : self } } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & mut self ) -> PDD19_W { PDD19_W { w : self } } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & mut self ) -> PDD20_W { PDD20_W { w : self } } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & mut self ) -> PDD21_W { PDD21_W { w : self } } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & mut self ) -> PDD22_W { PDD22_W { w : self } } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & mut self ) -> PDD23_W { PDD23_W { w : self } } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & mut self ) -> PDD24_W { PDD24_W { w : self } } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & mut self ) -> PDD25_W { PDD25_W { w : self } } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & mut self ) -> PDD26_W { PDD26_W { w : self } } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & mut self ) -> PDD27_W { PDD27_W { w : self } } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & mut self ) -> PDD28_W { PDD28_W { w : self } } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & mut self ) -> PDD29_W { PDD29_W { w : self } } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & mut self ) -> PDD30_W { PDD30_W { w : self } } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & mut self ) -> PDD31_W { PDD31_W { w : self } } } } } # [ doc = "General Purpose Input/Output" ] pub struct GPIOB { _marker : PhantomData < * const ( ) > } unsafe impl Send for GPIOB { } impl GPIOB { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const gpiob :: RegisterBlock { 0x400f_f040 as * const _ } } impl Deref for GPIOB { type Target = gpiob :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * GPIOB :: ptr ( ) } } } # [ doc = "General Purpose Input/Output" ] pub mod gpiob { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Port Data Output Register" ] pub pdor : PDOR , # [ doc = "0x04 - Port Set Output Register" ] pub psor : PSOR , # [ doc = "0x08 - Port Clear Output Register" ] pub pcor : PCOR , # [ doc = "0x0c - Port Toggle Output Register" ] pub ptor : PTOR , # [ doc = "0x10 - Port Data Input Register" ] pub pdir : PDIR , # [ doc = "0x14 - Port Data Direction Register" ] pub pddr : PDDR , } # [ doc = "Port Data Output Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdor](pdor) module" ] pub type PDOR = crate :: Reg < u32 , _PDOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDOR ; # [ doc = "`read()` method returns [pdor::R](pdor::R) reader structure" ] impl crate :: Readable for PDOR { } # [ doc = "`write(|w| ..)` method takes [pdor::W](pdor::W) writer structure" ] impl crate :: Writable for PDOR { } # [ doc = "Port Data Output Register" ] pub mod pdor { # [ doc = "Reader of register PDOR" ] pub type R = crate :: R < u32 , super :: PDOR > ; # [ doc = "Writer for register PDOR" ] pub type W = crate :: W < u32 , super :: PDOR > ; # [ doc = "Register PDOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO0_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO0_A ) -> Self { match variant { PDO0_A :: _0 => false , PDO0_A :: _1 => true } } } # [ doc = "Reader of field `PDO0`" ] pub type PDO0_R = crate :: R < bool , PDO0_A > ; impl PDO0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO0_A { match self . bits { false => PDO0_A :: _0 , true => PDO0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO0_A :: _1 } } # [ doc = "Write proxy for field `PDO0`" ] pub struct PDO0_W < 'a > { w : & 'a mut W , } impl < 'a > PDO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO1_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO1_A ) -> Self { match variant { PDO1_A :: _0 => false , PDO1_A :: _1 => true } } } # [ doc = "Reader of field `PDO1`" ] pub type PDO1_R = crate :: R < bool , PDO1_A > ; impl PDO1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO1_A { match self . bits { false => PDO1_A :: _0 , true => PDO1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO1_A :: _1 } } # [ doc = "Write proxy for field `PDO1`" ] pub struct PDO1_W < 'a > { w : & 'a mut W , } impl < 'a > PDO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO2_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO2_A ) -> Self { match variant { PDO2_A :: _0 => false , PDO2_A :: _1 => true } } } # [ doc = "Reader of field `PDO2`" ] pub type PDO2_R = crate :: R < bool , PDO2_A > ; impl PDO2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO2_A { match self . bits { false => PDO2_A :: _0 , true => PDO2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO2_A :: _1 } } # [ doc = "Write proxy for field `PDO2`" ] pub struct PDO2_W < 'a > { w : & 'a mut W , } impl < 'a > PDO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO3_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO3_A ) -> Self { match variant { PDO3_A :: _0 => false , PDO3_A :: _1 => true } } } # [ doc = "Reader of field `PDO3`" ] pub type PDO3_R = crate :: R < bool , PDO3_A > ; impl PDO3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO3_A { match self . bits { false => PDO3_A :: _0 , true => PDO3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO3_A :: _1 } } # [ doc = "Write proxy for field `PDO3`" ] pub struct PDO3_W < 'a > { w : & 'a mut W , } impl < 'a > PDO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO4_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO4_A ) -> Self { match variant { PDO4_A :: _0 => false , PDO4_A :: _1 => true } } } # [ doc = "Reader of field `PDO4`" ] pub type PDO4_R = crate :: R < bool , PDO4_A > ; impl PDO4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO4_A { match self . bits { false => PDO4_A :: _0 , true => PDO4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO4_A :: _1 } } # [ doc = "Write proxy for field `PDO4`" ] pub struct PDO4_W < 'a > { w : & 'a mut W , } impl < 'a > PDO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO5_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO5_A ) -> Self { match variant { PDO5_A :: _0 => false , PDO5_A :: _1 => true } } } # [ doc = "Reader of field `PDO5`" ] pub type PDO5_R = crate :: R < bool , PDO5_A > ; impl PDO5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO5_A { match self . bits { false => PDO5_A :: _0 , true => PDO5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO5_A :: _1 } } # [ doc = "Write proxy for field `PDO5`" ] pub struct PDO5_W < 'a > { w : & 'a mut W , } impl < 'a > PDO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO6_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO6_A ) -> Self { match variant { PDO6_A :: _0 => false , PDO6_A :: _1 => true } } } # [ doc = "Reader of field `PDO6`" ] pub type PDO6_R = crate :: R < bool , PDO6_A > ; impl PDO6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO6_A { match self . bits { false => PDO6_A :: _0 , true => PDO6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO6_A :: _1 } } # [ doc = "Write proxy for field `PDO6`" ] pub struct PDO6_W < 'a > { w : & 'a mut W , } impl < 'a > PDO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO7_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO7_A ) -> Self { match variant { PDO7_A :: _0 => false , PDO7_A :: _1 => true } } } # [ doc = "Reader of field `PDO7`" ] pub type PDO7_R = crate :: R < bool , PDO7_A > ; impl PDO7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO7_A { match self . bits { false => PDO7_A :: _0 , true => PDO7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO7_A :: _1 } } # [ doc = "Write proxy for field `PDO7`" ] pub struct PDO7_W < 'a > { w : & 'a mut W , } impl < 'a > PDO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO8_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO8_A ) -> Self { match variant { PDO8_A :: _0 => false , PDO8_A :: _1 => true } } } # [ doc = "Reader of field `PDO8`" ] pub type PDO8_R = crate :: R < bool , PDO8_A > ; impl PDO8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO8_A { match self . bits { false => PDO8_A :: _0 , true => PDO8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO8_A :: _1 } } # [ doc = "Write proxy for field `PDO8`" ] pub struct PDO8_W < 'a > { w : & 'a mut W , } impl < 'a > PDO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO9_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO9_A ) -> Self { match variant { PDO9_A :: _0 => false , PDO9_A :: _1 => true } } } # [ doc = "Reader of field `PDO9`" ] pub type PDO9_R = crate :: R < bool , PDO9_A > ; impl PDO9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO9_A { match self . bits { false => PDO9_A :: _0 , true => PDO9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO9_A :: _1 } } # [ doc = "Write proxy for field `PDO9`" ] pub struct PDO9_W < 'a > { w : & 'a mut W , } impl < 'a > PDO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO10_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO10_A ) -> Self { match variant { PDO10_A :: _0 => false , PDO10_A :: _1 => true } } } # [ doc = "Reader of field `PDO10`" ] pub type PDO10_R = crate :: R < bool , PDO10_A > ; impl PDO10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO10_A { match self . bits { false => PDO10_A :: _0 , true => PDO10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO10_A :: _1 } } # [ doc = "Write proxy for field `PDO10`" ] pub struct PDO10_W < 'a > { w : & 'a mut W , } impl < 'a > PDO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO11_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO11_A ) -> Self { match variant { PDO11_A :: _0 => false , PDO11_A :: _1 => true } } } # [ doc = "Reader of field `PDO11`" ] pub type PDO11_R = crate :: R < bool , PDO11_A > ; impl PDO11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO11_A { match self . bits { false => PDO11_A :: _0 , true => PDO11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO11_A :: _1 } } # [ doc = "Write proxy for field `PDO11`" ] pub struct PDO11_W < 'a > { w : & 'a mut W , } impl < 'a > PDO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO12_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO12_A ) -> Self { match variant { PDO12_A :: _0 => false , PDO12_A :: _1 => true } } } # [ doc = "Reader of field `PDO12`" ] pub type PDO12_R = crate :: R < bool , PDO12_A > ; impl PDO12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO12_A { match self . bits { false => PDO12_A :: _0 , true => PDO12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO12_A :: _1 } } # [ doc = "Write proxy for field `PDO12`" ] pub struct PDO12_W < 'a > { w : & 'a mut W , } impl < 'a > PDO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO13_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO13_A ) -> Self { match variant { PDO13_A :: _0 => false , PDO13_A :: _1 => true } } } # [ doc = "Reader of field `PDO13`" ] pub type PDO13_R = crate :: R < bool , PDO13_A > ; impl PDO13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO13_A { match self . bits { false => PDO13_A :: _0 , true => PDO13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO13_A :: _1 } } # [ doc = "Write proxy for field `PDO13`" ] pub struct PDO13_W < 'a > { w : & 'a mut W , } impl < 'a > PDO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO14_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO14_A ) -> Self { match variant { PDO14_A :: _0 => false , PDO14_A :: _1 => true } } } # [ doc = "Reader of field `PDO14`" ] pub type PDO14_R = crate :: R < bool , PDO14_A > ; impl PDO14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO14_A { match self . bits { false => PDO14_A :: _0 , true => PDO14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO14_A :: _1 } } # [ doc = "Write proxy for field `PDO14`" ] pub struct PDO14_W < 'a > { w : & 'a mut W , } impl < 'a > PDO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO15_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO15_A ) -> Self { match variant { PDO15_A :: _0 => false , PDO15_A :: _1 => true } } } # [ doc = "Reader of field `PDO15`" ] pub type PDO15_R = crate :: R < bool , PDO15_A > ; impl PDO15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO15_A { match self . bits { false => PDO15_A :: _0 , true => PDO15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO15_A :: _1 } } # [ doc = "Write proxy for field `PDO15`" ] pub struct PDO15_W < 'a > { w : & 'a mut W , } impl < 'a > PDO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO16_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO16_A ) -> Self { match variant { PDO16_A :: _0 => false , PDO16_A :: _1 => true } } } # [ doc = "Reader of field `PDO16`" ] pub type PDO16_R = crate :: R < bool , PDO16_A > ; impl PDO16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO16_A { match self . bits { false => PDO16_A :: _0 , true => PDO16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO16_A :: _1 } } # [ doc = "Write proxy for field `PDO16`" ] pub struct PDO16_W < 'a > { w : & 'a mut W , } impl < 'a > PDO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO17_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO17_A ) -> Self { match variant { PDO17_A :: _0 => false , PDO17_A :: _1 => true } } } # [ doc = "Reader of field `PDO17`" ] pub type PDO17_R = crate :: R < bool , PDO17_A > ; impl PDO17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO17_A { match self . bits { false => PDO17_A :: _0 , true => PDO17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO17_A :: _1 } } # [ doc = "Write proxy for field `PDO17`" ] pub struct PDO17_W < 'a > { w : & 'a mut W , } impl < 'a > PDO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO18_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO18_A ) -> Self { match variant { PDO18_A :: _0 => false , PDO18_A :: _1 => true } } } # [ doc = "Reader of field `PDO18`" ] pub type PDO18_R = crate :: R < bool , PDO18_A > ; impl PDO18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO18_A { match self . bits { false => PDO18_A :: _0 , true => PDO18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO18_A :: _1 } } # [ doc = "Write proxy for field `PDO18`" ] pub struct PDO18_W < 'a > { w : & 'a mut W , } impl < 'a > PDO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO19_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO19_A ) -> Self { match variant { PDO19_A :: _0 => false , PDO19_A :: _1 => true } } } # [ doc = "Reader of field `PDO19`" ] pub type PDO19_R = crate :: R < bool , PDO19_A > ; impl PDO19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO19_A { match self . bits { false => PDO19_A :: _0 , true => PDO19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO19_A :: _1 } } # [ doc = "Write proxy for field `PDO19`" ] pub struct PDO19_W < 'a > { w : & 'a mut W , } impl < 'a > PDO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO20_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO20_A ) -> Self { match variant { PDO20_A :: _0 => false , PDO20_A :: _1 => true } } } # [ doc = "Reader of field `PDO20`" ] pub type PDO20_R = crate :: R < bool , PDO20_A > ; impl PDO20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO20_A { match self . bits { false => PDO20_A :: _0 , true => PDO20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO20_A :: _1 } } # [ doc = "Write proxy for field `PDO20`" ] pub struct PDO20_W < 'a > { w : & 'a mut W , } impl < 'a > PDO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO21_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO21_A ) -> Self { match variant { PDO21_A :: _0 => false , PDO21_A :: _1 => true } } } # [ doc = "Reader of field `PDO21`" ] pub type PDO21_R = crate :: R < bool , PDO21_A > ; impl PDO21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO21_A { match self . bits { false => PDO21_A :: _0 , true => PDO21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO21_A :: _1 } } # [ doc = "Write proxy for field `PDO21`" ] pub struct PDO21_W < 'a > { w : & 'a mut W , } impl < 'a > PDO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO22_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO22_A ) -> Self { match variant { PDO22_A :: _0 => false , PDO22_A :: _1 => true } } } # [ doc = "Reader of field `PDO22`" ] pub type PDO22_R = crate :: R < bool , PDO22_A > ; impl PDO22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO22_A { match self . bits { false => PDO22_A :: _0 , true => PDO22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO22_A :: _1 } } # [ doc = "Write proxy for field `PDO22`" ] pub struct PDO22_W < 'a > { w : & 'a mut W , } impl < 'a > PDO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO23_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO23_A ) -> Self { match variant { PDO23_A :: _0 => false , PDO23_A :: _1 => true } } } # [ doc = "Reader of field `PDO23`" ] pub type PDO23_R = crate :: R < bool , PDO23_A > ; impl PDO23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO23_A { match self . bits { false => PDO23_A :: _0 , true => PDO23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO23_A :: _1 } } # [ doc = "Write proxy for field `PDO23`" ] pub struct PDO23_W < 'a > { w : & 'a mut W , } impl < 'a > PDO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO24_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO24_A ) -> Self { match variant { PDO24_A :: _0 => false , PDO24_A :: _1 => true } } } # [ doc = "Reader of field `PDO24`" ] pub type PDO24_R = crate :: R < bool , PDO24_A > ; impl PDO24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO24_A { match self . bits { false => PDO24_A :: _0 , true => PDO24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO24_A :: _1 } } # [ doc = "Write proxy for field `PDO24`" ] pub struct PDO24_W < 'a > { w : & 'a mut W , } impl < 'a > PDO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO25_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO25_A ) -> Self { match variant { PDO25_A :: _0 => false , PDO25_A :: _1 => true } } } # [ doc = "Reader of field `PDO25`" ] pub type PDO25_R = crate :: R < bool , PDO25_A > ; impl PDO25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO25_A { match self . bits { false => PDO25_A :: _0 , true => PDO25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO25_A :: _1 } } # [ doc = "Write proxy for field `PDO25`" ] pub struct PDO25_W < 'a > { w : & 'a mut W , } impl < 'a > PDO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO26_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO26_A ) -> Self { match variant { PDO26_A :: _0 => false , PDO26_A :: _1 => true } } } # [ doc = "Reader of field `PDO26`" ] pub type PDO26_R = crate :: R < bool , PDO26_A > ; impl PDO26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO26_A { match self . bits { false => PDO26_A :: _0 , true => PDO26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO26_A :: _1 } } # [ doc = "Write proxy for field `PDO26`" ] pub struct PDO26_W < 'a > { w : & 'a mut W , } impl < 'a > PDO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO27_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO27_A ) -> Self { match variant { PDO27_A :: _0 => false , PDO27_A :: _1 => true } } } # [ doc = "Reader of field `PDO27`" ] pub type PDO27_R = crate :: R < bool , PDO27_A > ; impl PDO27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO27_A { match self . bits { false => PDO27_A :: _0 , true => PDO27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO27_A :: _1 } } # [ doc = "Write proxy for field `PDO27`" ] pub struct PDO27_W < 'a > { w : & 'a mut W , } impl < 'a > PDO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO28_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO28_A ) -> Self { match variant { PDO28_A :: _0 => false , PDO28_A :: _1 => true } } } # [ doc = "Reader of field `PDO28`" ] pub type PDO28_R = crate :: R < bool , PDO28_A > ; impl PDO28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO28_A { match self . bits { false => PDO28_A :: _0 , true => PDO28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO28_A :: _1 } } # [ doc = "Write proxy for field `PDO28`" ] pub struct PDO28_W < 'a > { w : & 'a mut W , } impl < 'a > PDO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO29_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO29_A ) -> Self { match variant { PDO29_A :: _0 => false , PDO29_A :: _1 => true } } } # [ doc = "Reader of field `PDO29`" ] pub type PDO29_R = crate :: R < bool , PDO29_A > ; impl PDO29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO29_A { match self . bits { false => PDO29_A :: _0 , true => PDO29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO29_A :: _1 } } # [ doc = "Write proxy for field `PDO29`" ] pub struct PDO29_W < 'a > { w : & 'a mut W , } impl < 'a > PDO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO30_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO30_A ) -> Self { match variant { PDO30_A :: _0 => false , PDO30_A :: _1 => true } } } # [ doc = "Reader of field `PDO30`" ] pub type PDO30_R = crate :: R < bool , PDO30_A > ; impl PDO30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO30_A { match self . bits { false => PDO30_A :: _0 , true => PDO30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO30_A :: _1 } } # [ doc = "Write proxy for field `PDO30`" ] pub struct PDO30_W < 'a > { w : & 'a mut W , } impl < 'a > PDO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO31_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO31_A ) -> Self { match variant { PDO31_A :: _0 => false , PDO31_A :: _1 => true } } } # [ doc = "Reader of field `PDO31`" ] pub type PDO31_R = crate :: R < bool , PDO31_A > ; impl PDO31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO31_A { match self . bits { false => PDO31_A :: _0 , true => PDO31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO31_A :: _1 } } # [ doc = "Write proxy for field `PDO31`" ] pub struct PDO31_W < 'a > { w : & 'a mut W , } impl < 'a > PDO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & self ) -> PDO0_R { PDO0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & self ) -> PDO1_R { PDO1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & self ) -> PDO2_R { PDO2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & self ) -> PDO3_R { PDO3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & self ) -> PDO4_R { PDO4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & self ) -> PDO5_R { PDO5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & self ) -> PDO6_R { PDO6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & self ) -> PDO7_R { PDO7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & self ) -> PDO8_R { PDO8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & self ) -> PDO9_R { PDO9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & self ) -> PDO10_R { PDO10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & self ) -> PDO11_R { PDO11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & self ) -> PDO12_R { PDO12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & self ) -> PDO13_R { PDO13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & self ) -> PDO14_R { PDO14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & self ) -> PDO15_R { PDO15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & self ) -> PDO16_R { PDO16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & self ) -> PDO17_R { PDO17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & self ) -> PDO18_R { PDO18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & self ) -> PDO19_R { PDO19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & self ) -> PDO20_R { PDO20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & self ) -> PDO21_R { PDO21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & self ) -> PDO22_R { PDO22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & self ) -> PDO23_R { PDO23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & self ) -> PDO24_R { PDO24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & self ) -> PDO25_R { PDO25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & self ) -> PDO26_R { PDO26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & self ) -> PDO27_R { PDO27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & self ) -> PDO28_R { PDO28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & self ) -> PDO29_R { PDO29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & self ) -> PDO30_R { PDO30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & self ) -> PDO31_R { PDO31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & mut self ) -> PDO0_W { PDO0_W { w : self } } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & mut self ) -> PDO1_W { PDO1_W { w : self } } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & mut self ) -> PDO2_W { PDO2_W { w : self } } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & mut self ) -> PDO3_W { PDO3_W { w : self } } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & mut self ) -> PDO4_W { PDO4_W { w : self } } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & mut self ) -> PDO5_W { PDO5_W { w : self } } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & mut self ) -> PDO6_W { PDO6_W { w : self } } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & mut self ) -> PDO7_W { PDO7_W { w : self } } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & mut self ) -> PDO8_W { PDO8_W { w : self } } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & mut self ) -> PDO9_W { PDO9_W { w : self } } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & mut self ) -> PDO10_W { PDO10_W { w : self } } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & mut self ) -> PDO11_W { PDO11_W { w : self } } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & mut self ) -> PDO12_W { PDO12_W { w : self } } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & mut self ) -> PDO13_W { PDO13_W { w : self } } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & mut self ) -> PDO14_W { PDO14_W { w : self } } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & mut self ) -> PDO15_W { PDO15_W { w : self } } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & mut self ) -> PDO16_W { PDO16_W { w : self } } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & mut self ) -> PDO17_W { PDO17_W { w : self } } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & mut self ) -> PDO18_W { PDO18_W { w : self } } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & mut self ) -> PDO19_W { PDO19_W { w : self } } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & mut self ) -> PDO20_W { PDO20_W { w : self } } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & mut self ) -> PDO21_W { PDO21_W { w : self } } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & mut self ) -> PDO22_W { PDO22_W { w : self } } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & mut self ) -> PDO23_W { PDO23_W { w : self } } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & mut self ) -> PDO24_W { PDO24_W { w : self } } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & mut self ) -> PDO25_W { PDO25_W { w : self } } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & mut self ) -> PDO26_W { PDO26_W { w : self } } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & mut self ) -> PDO27_W { PDO27_W { w : self } } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & mut self ) -> PDO28_W { PDO28_W { w : self } } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & mut self ) -> PDO29_W { PDO29_W { w : self } } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & mut self ) -> PDO30_W { PDO30_W { w : self } } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & mut self ) -> PDO31_W { PDO31_W { w : self } } } } # [ doc = "Port Set Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psor](psor) module" ] pub type PSOR = crate :: Reg < u32 , _PSOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PSOR ; # [ doc = "`write(|w| ..)` method takes [psor::W](psor::W) writer structure" ] impl crate :: Writable for PSOR { } # [ doc = "Port Set Output Register" ] pub mod psor { # [ doc = "Writer for register PSOR" ] pub type W = crate :: W < u32 , super :: PSOR > ; # [ doc = "Register PSOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PSOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO0_AW ) -> Self { match variant { PTSO0_AW :: _0 => false , PTSO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO0`" ] pub struct PTSO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO1_AW ) -> Self { match variant { PTSO1_AW :: _0 => false , PTSO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO1`" ] pub struct PTSO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO2_AW ) -> Self { match variant { PTSO2_AW :: _0 => false , PTSO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO2`" ] pub struct PTSO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO3_AW ) -> Self { match variant { PTSO3_AW :: _0 => false , PTSO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO3`" ] pub struct PTSO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO4_AW ) -> Self { match variant { PTSO4_AW :: _0 => false , PTSO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO4`" ] pub struct PTSO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO5_AW ) -> Self { match variant { PTSO5_AW :: _0 => false , PTSO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO5`" ] pub struct PTSO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO6_AW ) -> Self { match variant { PTSO6_AW :: _0 => false , PTSO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO6`" ] pub struct PTSO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO7_AW ) -> Self { match variant { PTSO7_AW :: _0 => false , PTSO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO7`" ] pub struct PTSO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO8_AW ) -> Self { match variant { PTSO8_AW :: _0 => false , PTSO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO8`" ] pub struct PTSO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO9_AW ) -> Self { match variant { PTSO9_AW :: _0 => false , PTSO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO9`" ] pub struct PTSO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO10_AW ) -> Self { match variant { PTSO10_AW :: _0 => false , PTSO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO10`" ] pub struct PTSO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO11_AW ) -> Self { match variant { PTSO11_AW :: _0 => false , PTSO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO11`" ] pub struct PTSO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO12_AW ) -> Self { match variant { PTSO12_AW :: _0 => false , PTSO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO12`" ] pub struct PTSO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO13_AW ) -> Self { match variant { PTSO13_AW :: _0 => false , PTSO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO13`" ] pub struct PTSO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO14_AW ) -> Self { match variant { PTSO14_AW :: _0 => false , PTSO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO14`" ] pub struct PTSO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO15_AW ) -> Self { match variant { PTSO15_AW :: _0 => false , PTSO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO15`" ] pub struct PTSO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO16_AW ) -> Self { match variant { PTSO16_AW :: _0 => false , PTSO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO16`" ] pub struct PTSO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO17_AW ) -> Self { match variant { PTSO17_AW :: _0 => false , PTSO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO17`" ] pub struct PTSO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO18_AW ) -> Self { match variant { PTSO18_AW :: _0 => false , PTSO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO18`" ] pub struct PTSO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO19_AW ) -> Self { match variant { PTSO19_AW :: _0 => false , PTSO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO19`" ] pub struct PTSO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO20_AW ) -> Self { match variant { PTSO20_AW :: _0 => false , PTSO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO20`" ] pub struct PTSO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO21_AW ) -> Self { match variant { PTSO21_AW :: _0 => false , PTSO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO21`" ] pub struct PTSO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO22_AW ) -> Self { match variant { PTSO22_AW :: _0 => false , PTSO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO22`" ] pub struct PTSO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO23_AW ) -> Self { match variant { PTSO23_AW :: _0 => false , PTSO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO23`" ] pub struct PTSO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO24_AW ) -> Self { match variant { PTSO24_AW :: _0 => false , PTSO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO24`" ] pub struct PTSO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO25_AW ) -> Self { match variant { PTSO25_AW :: _0 => false , PTSO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO25`" ] pub struct PTSO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO26_AW ) -> Self { match variant { PTSO26_AW :: _0 => false , PTSO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO26`" ] pub struct PTSO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO27_AW ) -> Self { match variant { PTSO27_AW :: _0 => false , PTSO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO27`" ] pub struct PTSO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO28_AW ) -> Self { match variant { PTSO28_AW :: _0 => false , PTSO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO28`" ] pub struct PTSO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO29_AW ) -> Self { match variant { PTSO29_AW :: _0 => false , PTSO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO29`" ] pub struct PTSO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO30_AW ) -> Self { match variant { PTSO30_AW :: _0 => false , PTSO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO30`" ] pub struct PTSO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO31_AW ) -> Self { match variant { PTSO31_AW :: _0 => false , PTSO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO31`" ] pub struct PTSO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso0 ( & mut self ) -> PTSO0_W { PTSO0_W { w : self } } # [ doc = "Bit 1 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso1 ( & mut self ) -> PTSO1_W { PTSO1_W { w : self } } # [ doc = "Bit 2 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso2 ( & mut self ) -> PTSO2_W { PTSO2_W { w : self } } # [ doc = "Bit 3 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso3 ( & mut self ) -> PTSO3_W { PTSO3_W { w : self } } # [ doc = "Bit 4 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso4 ( & mut self ) -> PTSO4_W { PTSO4_W { w : self } } # [ doc = "Bit 5 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso5 ( & mut self ) -> PTSO5_W { PTSO5_W { w : self } } # [ doc = "Bit 6 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso6 ( & mut self ) -> PTSO6_W { PTSO6_W { w : self } } # [ doc = "Bit 7 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso7 ( & mut self ) -> PTSO7_W { PTSO7_W { w : self } } # [ doc = "Bit 8 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso8 ( & mut self ) -> PTSO8_W { PTSO8_W { w : self } } # [ doc = "Bit 9 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso9 ( & mut self ) -> PTSO9_W { PTSO9_W { w : self } } # [ doc = "Bit 10 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso10 ( & mut self ) -> PTSO10_W { PTSO10_W { w : self } } # [ doc = "Bit 11 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso11 ( & mut self ) -> PTSO11_W { PTSO11_W { w : self } } # [ doc = "Bit 12 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso12 ( & mut self ) -> PTSO12_W { PTSO12_W { w : self } } # [ doc = "Bit 13 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso13 ( & mut self ) -> PTSO13_W { PTSO13_W { w : self } } # [ doc = "Bit 14 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso14 ( & mut self ) -> PTSO14_W { PTSO14_W { w : self } } # [ doc = "Bit 15 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso15 ( & mut self ) -> PTSO15_W { PTSO15_W { w : self } } # [ doc = "Bit 16 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso16 ( & mut self ) -> PTSO16_W { PTSO16_W { w : self } } # [ doc = "Bit 17 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso17 ( & mut self ) -> PTSO17_W { PTSO17_W { w : self } } # [ doc = "Bit 18 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso18 ( & mut self ) -> PTSO18_W { PTSO18_W { w : self } } # [ doc = "Bit 19 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso19 ( & mut self ) -> PTSO19_W { PTSO19_W { w : self } } # [ doc = "Bit 20 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso20 ( & mut self ) -> PTSO20_W { PTSO20_W { w : self } } # [ doc = "Bit 21 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso21 ( & mut self ) -> PTSO21_W { PTSO21_W { w : self } } # [ doc = "Bit 22 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso22 ( & mut self ) -> PTSO22_W { PTSO22_W { w : self } } # [ doc = "Bit 23 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso23 ( & mut self ) -> PTSO23_W { PTSO23_W { w : self } } # [ doc = "Bit 24 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso24 ( & mut self ) -> PTSO24_W { PTSO24_W { w : self } } # [ doc = "Bit 25 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso25 ( & mut self ) -> PTSO25_W { PTSO25_W { w : self } } # [ doc = "Bit 26 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso26 ( & mut self ) -> PTSO26_W { PTSO26_W { w : self } } # [ doc = "Bit 27 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso27 ( & mut self ) -> PTSO27_W { PTSO27_W { w : self } } # [ doc = "Bit 28 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso28 ( & mut self ) -> PTSO28_W { PTSO28_W { w : self } } # [ doc = "Bit 29 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso29 ( & mut self ) -> PTSO29_W { PTSO29_W { w : self } } # [ doc = "Bit 30 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso30 ( & mut self ) -> PTSO30_W { PTSO30_W { w : self } } # [ doc = "Bit 31 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso31 ( & mut self ) -> PTSO31_W { PTSO31_W { w : self } } } } # [ doc = "Port Clear Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcor](pcor) module" ] pub type PCOR = crate :: Reg < u32 , _PCOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCOR ; # [ doc = "`write(|w| ..)` method takes [pcor::W](pcor::W) writer structure" ] impl crate :: Writable for PCOR { } # [ doc = "Port Clear Output Register" ] pub mod pcor { # [ doc = "Writer for register PCOR" ] pub type W = crate :: W < u32 , super :: PCOR > ; # [ doc = "Register PCOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO0_AW ) -> Self { match variant { PTCO0_AW :: _0 => false , PTCO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO0`" ] pub struct PTCO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO1_AW ) -> Self { match variant { PTCO1_AW :: _0 => false , PTCO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO1`" ] pub struct PTCO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO2_AW ) -> Self { match variant { PTCO2_AW :: _0 => false , PTCO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO2`" ] pub struct PTCO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO3_AW ) -> Self { match variant { PTCO3_AW :: _0 => false , PTCO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO3`" ] pub struct PTCO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO4_AW ) -> Self { match variant { PTCO4_AW :: _0 => false , PTCO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO4`" ] pub struct PTCO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO5_AW ) -> Self { match variant { PTCO5_AW :: _0 => false , PTCO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO5`" ] pub struct PTCO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO6_AW ) -> Self { match variant { PTCO6_AW :: _0 => false , PTCO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO6`" ] pub struct PTCO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO7_AW ) -> Self { match variant { PTCO7_AW :: _0 => false , PTCO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO7`" ] pub struct PTCO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO8_AW ) -> Self { match variant { PTCO8_AW :: _0 => false , PTCO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO8`" ] pub struct PTCO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO9_AW ) -> Self { match variant { PTCO9_AW :: _0 => false , PTCO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO9`" ] pub struct PTCO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO10_AW ) -> Self { match variant { PTCO10_AW :: _0 => false , PTCO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO10`" ] pub struct PTCO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO11_AW ) -> Self { match variant { PTCO11_AW :: _0 => false , PTCO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO11`" ] pub struct PTCO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO12_AW ) -> Self { match variant { PTCO12_AW :: _0 => false , PTCO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO12`" ] pub struct PTCO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO13_AW ) -> Self { match variant { PTCO13_AW :: _0 => false , PTCO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO13`" ] pub struct PTCO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO14_AW ) -> Self { match variant { PTCO14_AW :: _0 => false , PTCO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO14`" ] pub struct PTCO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO15_AW ) -> Self { match variant { PTCO15_AW :: _0 => false , PTCO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO15`" ] pub struct PTCO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO16_AW ) -> Self { match variant { PTCO16_AW :: _0 => false , PTCO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO16`" ] pub struct PTCO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO17_AW ) -> Self { match variant { PTCO17_AW :: _0 => false , PTCO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO17`" ] pub struct PTCO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO18_AW ) -> Self { match variant { PTCO18_AW :: _0 => false , PTCO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO18`" ] pub struct PTCO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO19_AW ) -> Self { match variant { PTCO19_AW :: _0 => false , PTCO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO19`" ] pub struct PTCO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO20_AW ) -> Self { match variant { PTCO20_AW :: _0 => false , PTCO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO20`" ] pub struct PTCO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO21_AW ) -> Self { match variant { PTCO21_AW :: _0 => false , PTCO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO21`" ] pub struct PTCO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO22_AW ) -> Self { match variant { PTCO22_AW :: _0 => false , PTCO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO22`" ] pub struct PTCO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO23_AW ) -> Self { match variant { PTCO23_AW :: _0 => false , PTCO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO23`" ] pub struct PTCO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO24_AW ) -> Self { match variant { PTCO24_AW :: _0 => false , PTCO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO24`" ] pub struct PTCO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO25_AW ) -> Self { match variant { PTCO25_AW :: _0 => false , PTCO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO25`" ] pub struct PTCO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO26_AW ) -> Self { match variant { PTCO26_AW :: _0 => false , PTCO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO26`" ] pub struct PTCO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO27_AW ) -> Self { match variant { PTCO27_AW :: _0 => false , PTCO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO27`" ] pub struct PTCO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO28_AW ) -> Self { match variant { PTCO28_AW :: _0 => false , PTCO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO28`" ] pub struct PTCO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO29_AW ) -> Self { match variant { PTCO29_AW :: _0 => false , PTCO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO29`" ] pub struct PTCO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO30_AW ) -> Self { match variant { PTCO30_AW :: _0 => false , PTCO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO30`" ] pub struct PTCO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO31_AW ) -> Self { match variant { PTCO31_AW :: _0 => false , PTCO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO31`" ] pub struct PTCO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco0 ( & mut self ) -> PTCO0_W { PTCO0_W { w : self } } # [ doc = "Bit 1 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco1 ( & mut self ) -> PTCO1_W { PTCO1_W { w : self } } # [ doc = "Bit 2 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco2 ( & mut self ) -> PTCO2_W { PTCO2_W { w : self } } # [ doc = "Bit 3 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco3 ( & mut self ) -> PTCO3_W { PTCO3_W { w : self } } # [ doc = "Bit 4 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco4 ( & mut self ) -> PTCO4_W { PTCO4_W { w : self } } # [ doc = "Bit 5 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco5 ( & mut self ) -> PTCO5_W { PTCO5_W { w : self } } # [ doc = "Bit 6 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco6 ( & mut self ) -> PTCO6_W { PTCO6_W { w : self } } # [ doc = "Bit 7 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco7 ( & mut self ) -> PTCO7_W { PTCO7_W { w : self } } # [ doc = "Bit 8 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco8 ( & mut self ) -> PTCO8_W { PTCO8_W { w : self } } # [ doc = "Bit 9 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco9 ( & mut self ) -> PTCO9_W { PTCO9_W { w : self } } # [ doc = "Bit 10 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco10 ( & mut self ) -> PTCO10_W { PTCO10_W { w : self } } # [ doc = "Bit 11 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco11 ( & mut self ) -> PTCO11_W { PTCO11_W { w : self } } # [ doc = "Bit 12 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco12 ( & mut self ) -> PTCO12_W { PTCO12_W { w : self } } # [ doc = "Bit 13 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco13 ( & mut self ) -> PTCO13_W { PTCO13_W { w : self } } # [ doc = "Bit 14 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco14 ( & mut self ) -> PTCO14_W { PTCO14_W { w : self } } # [ doc = "Bit 15 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco15 ( & mut self ) -> PTCO15_W { PTCO15_W { w : self } } # [ doc = "Bit 16 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco16 ( & mut self ) -> PTCO16_W { PTCO16_W { w : self } } # [ doc = "Bit 17 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco17 ( & mut self ) -> PTCO17_W { PTCO17_W { w : self } } # [ doc = "Bit 18 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco18 ( & mut self ) -> PTCO18_W { PTCO18_W { w : self } } # [ doc = "Bit 19 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco19 ( & mut self ) -> PTCO19_W { PTCO19_W { w : self } } # [ doc = "Bit 20 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco20 ( & mut self ) -> PTCO20_W { PTCO20_W { w : self } } # [ doc = "Bit 21 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco21 ( & mut self ) -> PTCO21_W { PTCO21_W { w : self } } # [ doc = "Bit 22 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco22 ( & mut self ) -> PTCO22_W { PTCO22_W { w : self } } # [ doc = "Bit 23 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco23 ( & mut self ) -> PTCO23_W { PTCO23_W { w : self } } # [ doc = "Bit 24 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco24 ( & mut self ) -> PTCO24_W { PTCO24_W { w : self } } # [ doc = "Bit 25 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco25 ( & mut self ) -> PTCO25_W { PTCO25_W { w : self } } # [ doc = "Bit 26 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco26 ( & mut self ) -> PTCO26_W { PTCO26_W { w : self } } # [ doc = "Bit 27 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco27 ( & mut self ) -> PTCO27_W { PTCO27_W { w : self } } # [ doc = "Bit 28 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco28 ( & mut self ) -> PTCO28_W { PTCO28_W { w : self } } # [ doc = "Bit 29 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco29 ( & mut self ) -> PTCO29_W { PTCO29_W { w : self } } # [ doc = "Bit 30 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco30 ( & mut self ) -> PTCO30_W { PTCO30_W { w : self } } # [ doc = "Bit 31 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco31 ( & mut self ) -> PTCO31_W { PTCO31_W { w : self } } } } # [ doc = "Port Toggle Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ptor](ptor) module" ] pub type PTOR = crate :: Reg < u32 , _PTOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PTOR ; # [ doc = "`write(|w| ..)` method takes [ptor::W](ptor::W) writer structure" ] impl crate :: Writable for PTOR { } # [ doc = "Port Toggle Output Register" ] pub mod ptor { # [ doc = "Writer for register PTOR" ] pub type W = crate :: W < u32 , super :: PTOR > ; # [ doc = "Register PTOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PTOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO0_AW ) -> Self { match variant { PTTO0_AW :: _0 => false , PTTO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO0`" ] pub struct PTTO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO1_AW ) -> Self { match variant { PTTO1_AW :: _0 => false , PTTO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO1`" ] pub struct PTTO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO2_AW ) -> Self { match variant { PTTO2_AW :: _0 => false , PTTO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO2`" ] pub struct PTTO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO3_AW ) -> Self { match variant { PTTO3_AW :: _0 => false , PTTO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO3`" ] pub struct PTTO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO4_AW ) -> Self { match variant { PTTO4_AW :: _0 => false , PTTO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO4`" ] pub struct PTTO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO5_AW ) -> Self { match variant { PTTO5_AW :: _0 => false , PTTO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO5`" ] pub struct PTTO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO6_AW ) -> Self { match variant { PTTO6_AW :: _0 => false , PTTO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO6`" ] pub struct PTTO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO7_AW ) -> Self { match variant { PTTO7_AW :: _0 => false , PTTO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO7`" ] pub struct PTTO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO8_AW ) -> Self { match variant { PTTO8_AW :: _0 => false , PTTO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO8`" ] pub struct PTTO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO9_AW ) -> Self { match variant { PTTO9_AW :: _0 => false , PTTO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO9`" ] pub struct PTTO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO10_AW ) -> Self { match variant { PTTO10_AW :: _0 => false , PTTO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO10`" ] pub struct PTTO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO11_AW ) -> Self { match variant { PTTO11_AW :: _0 => false , PTTO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO11`" ] pub struct PTTO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO12_AW ) -> Self { match variant { PTTO12_AW :: _0 => false , PTTO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO12`" ] pub struct PTTO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO13_AW ) -> Self { match variant { PTTO13_AW :: _0 => false , PTTO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO13`" ] pub struct PTTO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO14_AW ) -> Self { match variant { PTTO14_AW :: _0 => false , PTTO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO14`" ] pub struct PTTO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO15_AW ) -> Self { match variant { PTTO15_AW :: _0 => false , PTTO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO15`" ] pub struct PTTO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO16_AW ) -> Self { match variant { PTTO16_AW :: _0 => false , PTTO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO16`" ] pub struct PTTO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO17_AW ) -> Self { match variant { PTTO17_AW :: _0 => false , PTTO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO17`" ] pub struct PTTO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO18_AW ) -> Self { match variant { PTTO18_AW :: _0 => false , PTTO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO18`" ] pub struct PTTO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO19_AW ) -> Self { match variant { PTTO19_AW :: _0 => false , PTTO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO19`" ] pub struct PTTO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO20_AW ) -> Self { match variant { PTTO20_AW :: _0 => false , PTTO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO20`" ] pub struct PTTO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO21_AW ) -> Self { match variant { PTTO21_AW :: _0 => false , PTTO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO21`" ] pub struct PTTO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO22_AW ) -> Self { match variant { PTTO22_AW :: _0 => false , PTTO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO22`" ] pub struct PTTO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO23_AW ) -> Self { match variant { PTTO23_AW :: _0 => false , PTTO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO23`" ] pub struct PTTO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO24_AW ) -> Self { match variant { PTTO24_AW :: _0 => false , PTTO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO24`" ] pub struct PTTO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO25_AW ) -> Self { match variant { PTTO25_AW :: _0 => false , PTTO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO25`" ] pub struct PTTO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO26_AW ) -> Self { match variant { PTTO26_AW :: _0 => false , PTTO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO26`" ] pub struct PTTO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO27_AW ) -> Self { match variant { PTTO27_AW :: _0 => false , PTTO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO27`" ] pub struct PTTO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO28_AW ) -> Self { match variant { PTTO28_AW :: _0 => false , PTTO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO28`" ] pub struct PTTO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO29_AW ) -> Self { match variant { PTTO29_AW :: _0 => false , PTTO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO29`" ] pub struct PTTO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO30_AW ) -> Self { match variant { PTTO30_AW :: _0 => false , PTTO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO30`" ] pub struct PTTO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO31_AW ) -> Self { match variant { PTTO31_AW :: _0 => false , PTTO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO31`" ] pub struct PTTO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto0 ( & mut self ) -> PTTO0_W { PTTO0_W { w : self } } # [ doc = "Bit 1 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto1 ( & mut self ) -> PTTO1_W { PTTO1_W { w : self } } # [ doc = "Bit 2 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto2 ( & mut self ) -> PTTO2_W { PTTO2_W { w : self } } # [ doc = "Bit 3 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto3 ( & mut self ) -> PTTO3_W { PTTO3_W { w : self } } # [ doc = "Bit 4 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto4 ( & mut self ) -> PTTO4_W { PTTO4_W { w : self } } # [ doc = "Bit 5 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto5 ( & mut self ) -> PTTO5_W { PTTO5_W { w : self } } # [ doc = "Bit 6 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto6 ( & mut self ) -> PTTO6_W { PTTO6_W { w : self } } # [ doc = "Bit 7 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto7 ( & mut self ) -> PTTO7_W { PTTO7_W { w : self } } # [ doc = "Bit 8 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto8 ( & mut self ) -> PTTO8_W { PTTO8_W { w : self } } # [ doc = "Bit 9 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto9 ( & mut self ) -> PTTO9_W { PTTO9_W { w : self } } # [ doc = "Bit 10 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto10 ( & mut self ) -> PTTO10_W { PTTO10_W { w : self } } # [ doc = "Bit 11 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto11 ( & mut self ) -> PTTO11_W { PTTO11_W { w : self } } # [ doc = "Bit 12 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto12 ( & mut self ) -> PTTO12_W { PTTO12_W { w : self } } # [ doc = "Bit 13 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto13 ( & mut self ) -> PTTO13_W { PTTO13_W { w : self } } # [ doc = "Bit 14 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto14 ( & mut self ) -> PTTO14_W { PTTO14_W { w : self } } # [ doc = "Bit 15 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto15 ( & mut self ) -> PTTO15_W { PTTO15_W { w : self } } # [ doc = "Bit 16 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto16 ( & mut self ) -> PTTO16_W { PTTO16_W { w : self } } # [ doc = "Bit 17 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto17 ( & mut self ) -> PTTO17_W { PTTO17_W { w : self } } # [ doc = "Bit 18 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto18 ( & mut self ) -> PTTO18_W { PTTO18_W { w : self } } # [ doc = "Bit 19 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto19 ( & mut self ) -> PTTO19_W { PTTO19_W { w : self } } # [ doc = "Bit 20 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto20 ( & mut self ) -> PTTO20_W { PTTO20_W { w : self } } # [ doc = "Bit 21 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto21 ( & mut self ) -> PTTO21_W { PTTO21_W { w : self } } # [ doc = "Bit 22 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto22 ( & mut self ) -> PTTO22_W { PTTO22_W { w : self } } # [ doc = "Bit 23 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto23 ( & mut self ) -> PTTO23_W { PTTO23_W { w : self } } # [ doc = "Bit 24 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto24 ( & mut self ) -> PTTO24_W { PTTO24_W { w : self } } # [ doc = "Bit 25 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto25 ( & mut self ) -> PTTO25_W { PTTO25_W { w : self } } # [ doc = "Bit 26 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto26 ( & mut self ) -> PTTO26_W { PTTO26_W { w : self } } # [ doc = "Bit 27 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto27 ( & mut self ) -> PTTO27_W { PTTO27_W { w : self } } # [ doc = "Bit 28 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto28 ( & mut self ) -> PTTO28_W { PTTO28_W { w : self } } # [ doc = "Bit 29 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto29 ( & mut self ) -> PTTO29_W { PTTO29_W { w : self } } # [ doc = "Bit 30 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto30 ( & mut self ) -> PTTO30_W { PTTO30_W { w : self } } # [ doc = "Bit 31 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto31 ( & mut self ) -> PTTO31_W { PTTO31_W { w : self } } } } # [ doc = "Port Data Input Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdir](pdir) module" ] pub type PDIR = crate :: Reg < u32 , _PDIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDIR ; # [ doc = "`read()` method returns [pdir::R](pdir::R) reader structure" ] impl crate :: Readable for PDIR { } # [ doc = "Port Data Input Register" ] pub mod pdir { # [ doc = "Reader of register PDIR" ] pub type R = crate :: R < u32 , super :: PDIR > ; # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI0_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI0_A ) -> Self { match variant { PDI0_A :: _0 => false , PDI0_A :: _1 => true } } } # [ doc = "Reader of field `PDI0`" ] pub type PDI0_R = crate :: R < bool , PDI0_A > ; impl PDI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI0_A { match self . bits { false => PDI0_A :: _0 , true => PDI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI0_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI1_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI1_A ) -> Self { match variant { PDI1_A :: _0 => false , PDI1_A :: _1 => true } } } # [ doc = "Reader of field `PDI1`" ] pub type PDI1_R = crate :: R < bool , PDI1_A > ; impl PDI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI1_A { match self . bits { false => PDI1_A :: _0 , true => PDI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI1_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI2_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI2_A ) -> Self { match variant { PDI2_A :: _0 => false , PDI2_A :: _1 => true } } } # [ doc = "Reader of field `PDI2`" ] pub type PDI2_R = crate :: R < bool , PDI2_A > ; impl PDI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI2_A { match self . bits { false => PDI2_A :: _0 , true => PDI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI2_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI3_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI3_A ) -> Self { match variant { PDI3_A :: _0 => false , PDI3_A :: _1 => true } } } # [ doc = "Reader of field `PDI3`" ] pub type PDI3_R = crate :: R < bool , PDI3_A > ; impl PDI3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI3_A { match self . bits { false => PDI3_A :: _0 , true => PDI3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI3_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI4_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI4_A ) -> Self { match variant { PDI4_A :: _0 => false , PDI4_A :: _1 => true } } } # [ doc = "Reader of field `PDI4`" ] pub type PDI4_R = crate :: R < bool , PDI4_A > ; impl PDI4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI4_A { match self . bits { false => PDI4_A :: _0 , true => PDI4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI4_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI5_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI5_A ) -> Self { match variant { PDI5_A :: _0 => false , PDI5_A :: _1 => true } } } # [ doc = "Reader of field `PDI5`" ] pub type PDI5_R = crate :: R < bool , PDI5_A > ; impl PDI5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI5_A { match self . bits { false => PDI5_A :: _0 , true => PDI5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI5_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI6_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI6_A ) -> Self { match variant { PDI6_A :: _0 => false , PDI6_A :: _1 => true } } } # [ doc = "Reader of field `PDI6`" ] pub type PDI6_R = crate :: R < bool , PDI6_A > ; impl PDI6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI6_A { match self . bits { false => PDI6_A :: _0 , true => PDI6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI6_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI7_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI7_A ) -> Self { match variant { PDI7_A :: _0 => false , PDI7_A :: _1 => true } } } # [ doc = "Reader of field `PDI7`" ] pub type PDI7_R = crate :: R < bool , PDI7_A > ; impl PDI7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI7_A { match self . bits { false => PDI7_A :: _0 , true => PDI7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI7_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI8_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI8_A ) -> Self { match variant { PDI8_A :: _0 => false , PDI8_A :: _1 => true } } } # [ doc = "Reader of field `PDI8`" ] pub type PDI8_R = crate :: R < bool , PDI8_A > ; impl PDI8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI8_A { match self . bits { false => PDI8_A :: _0 , true => PDI8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI8_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI9_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI9_A ) -> Self { match variant { PDI9_A :: _0 => false , PDI9_A :: _1 => true } } } # [ doc = "Reader of field `PDI9`" ] pub type PDI9_R = crate :: R < bool , PDI9_A > ; impl PDI9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI9_A { match self . bits { false => PDI9_A :: _0 , true => PDI9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI9_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI10_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI10_A ) -> Self { match variant { PDI10_A :: _0 => false , PDI10_A :: _1 => true } } } # [ doc = "Reader of field `PDI10`" ] pub type PDI10_R = crate :: R < bool , PDI10_A > ; impl PDI10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI10_A { match self . bits { false => PDI10_A :: _0 , true => PDI10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI10_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI11_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI11_A ) -> Self { match variant { PDI11_A :: _0 => false , PDI11_A :: _1 => true } } } # [ doc = "Reader of field `PDI11`" ] pub type PDI11_R = crate :: R < bool , PDI11_A > ; impl PDI11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI11_A { match self . bits { false => PDI11_A :: _0 , true => PDI11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI11_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI12_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI12_A ) -> Self { match variant { PDI12_A :: _0 => false , PDI12_A :: _1 => true } } } # [ doc = "Reader of field `PDI12`" ] pub type PDI12_R = crate :: R < bool , PDI12_A > ; impl PDI12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI12_A { match self . bits { false => PDI12_A :: _0 , true => PDI12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI12_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI13_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI13_A ) -> Self { match variant { PDI13_A :: _0 => false , PDI13_A :: _1 => true } } } # [ doc = "Reader of field `PDI13`" ] pub type PDI13_R = crate :: R < bool , PDI13_A > ; impl PDI13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI13_A { match self . bits { false => PDI13_A :: _0 , true => PDI13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI13_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI14_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI14_A ) -> Self { match variant { PDI14_A :: _0 => false , PDI14_A :: _1 => true } } } # [ doc = "Reader of field `PDI14`" ] pub type PDI14_R = crate :: R < bool , PDI14_A > ; impl PDI14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI14_A { match self . bits { false => PDI14_A :: _0 , true => PDI14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI14_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI15_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI15_A ) -> Self { match variant { PDI15_A :: _0 => false , PDI15_A :: _1 => true } } } # [ doc = "Reader of field `PDI15`" ] pub type PDI15_R = crate :: R < bool , PDI15_A > ; impl PDI15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI15_A { match self . bits { false => PDI15_A :: _0 , true => PDI15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI15_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI16_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI16_A ) -> Self { match variant { PDI16_A :: _0 => false , PDI16_A :: _1 => true } } } # [ doc = "Reader of field `PDI16`" ] pub type PDI16_R = crate :: R < bool , PDI16_A > ; impl PDI16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI16_A { match self . bits { false => PDI16_A :: _0 , true => PDI16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI16_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI17_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI17_A ) -> Self { match variant { PDI17_A :: _0 => false , PDI17_A :: _1 => true } } } # [ doc = "Reader of field `PDI17`" ] pub type PDI17_R = crate :: R < bool , PDI17_A > ; impl PDI17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI17_A { match self . bits { false => PDI17_A :: _0 , true => PDI17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI17_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI18_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI18_A ) -> Self { match variant { PDI18_A :: _0 => false , PDI18_A :: _1 => true } } } # [ doc = "Reader of field `PDI18`" ] pub type PDI18_R = crate :: R < bool , PDI18_A > ; impl PDI18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI18_A { match self . bits { false => PDI18_A :: _0 , true => PDI18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI18_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI19_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI19_A ) -> Self { match variant { PDI19_A :: _0 => false , PDI19_A :: _1 => true } } } # [ doc = "Reader of field `PDI19`" ] pub type PDI19_R = crate :: R < bool , PDI19_A > ; impl PDI19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI19_A { match self . bits { false => PDI19_A :: _0 , true => PDI19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI19_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI20_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI20_A ) -> Self { match variant { PDI20_A :: _0 => false , PDI20_A :: _1 => true } } } # [ doc = "Reader of field `PDI20`" ] pub type PDI20_R = crate :: R < bool , PDI20_A > ; impl PDI20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI20_A { match self . bits { false => PDI20_A :: _0 , true => PDI20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI20_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI21_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI21_A ) -> Self { match variant { PDI21_A :: _0 => false , PDI21_A :: _1 => true } } } # [ doc = "Reader of field `PDI21`" ] pub type PDI21_R = crate :: R < bool , PDI21_A > ; impl PDI21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI21_A { match self . bits { false => PDI21_A :: _0 , true => PDI21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI21_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI22_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI22_A ) -> Self { match variant { PDI22_A :: _0 => false , PDI22_A :: _1 => true } } } # [ doc = "Reader of field `PDI22`" ] pub type PDI22_R = crate :: R < bool , PDI22_A > ; impl PDI22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI22_A { match self . bits { false => PDI22_A :: _0 , true => PDI22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI22_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI23_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI23_A ) -> Self { match variant { PDI23_A :: _0 => false , PDI23_A :: _1 => true } } } # [ doc = "Reader of field `PDI23`" ] pub type PDI23_R = crate :: R < bool , PDI23_A > ; impl PDI23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI23_A { match self . bits { false => PDI23_A :: _0 , true => PDI23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI23_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI24_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI24_A ) -> Self { match variant { PDI24_A :: _0 => false , PDI24_A :: _1 => true } } } # [ doc = "Reader of field `PDI24`" ] pub type PDI24_R = crate :: R < bool , PDI24_A > ; impl PDI24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI24_A { match self . bits { false => PDI24_A :: _0 , true => PDI24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI24_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI25_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI25_A ) -> Self { match variant { PDI25_A :: _0 => false , PDI25_A :: _1 => true } } } # [ doc = "Reader of field `PDI25`" ] pub type PDI25_R = crate :: R < bool , PDI25_A > ; impl PDI25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI25_A { match self . bits { false => PDI25_A :: _0 , true => PDI25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI25_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI26_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI26_A ) -> Self { match variant { PDI26_A :: _0 => false , PDI26_A :: _1 => true } } } # [ doc = "Reader of field `PDI26`" ] pub type PDI26_R = crate :: R < bool , PDI26_A > ; impl PDI26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI26_A { match self . bits { false => PDI26_A :: _0 , true => PDI26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI26_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI27_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI27_A ) -> Self { match variant { PDI27_A :: _0 => false , PDI27_A :: _1 => true } } } # [ doc = "Reader of field `PDI27`" ] pub type PDI27_R = crate :: R < bool , PDI27_A > ; impl PDI27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI27_A { match self . bits { false => PDI27_A :: _0 , true => PDI27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI27_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI28_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI28_A ) -> Self { match variant { PDI28_A :: _0 => false , PDI28_A :: _1 => true } } } # [ doc = "Reader of field `PDI28`" ] pub type PDI28_R = crate :: R < bool , PDI28_A > ; impl PDI28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI28_A { match self . bits { false => PDI28_A :: _0 , true => PDI28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI28_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI29_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI29_A ) -> Self { match variant { PDI29_A :: _0 => false , PDI29_A :: _1 => true } } } # [ doc = "Reader of field `PDI29`" ] pub type PDI29_R = crate :: R < bool , PDI29_A > ; impl PDI29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI29_A { match self . bits { false => PDI29_A :: _0 , true => PDI29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI29_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI30_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI30_A ) -> Self { match variant { PDI30_A :: _0 => false , PDI30_A :: _1 => true } } } # [ doc = "Reader of field `PDI30`" ] pub type PDI30_R = crate :: R < bool , PDI30_A > ; impl PDI30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI30_A { match self . bits { false => PDI30_A :: _0 , true => PDI30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI30_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI31_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI31_A ) -> Self { match variant { PDI31_A :: _0 => false , PDI31_A :: _1 => true } } } # [ doc = "Reader of field `PDI31`" ] pub type PDI31_R = crate :: R < bool , PDI31_A > ; impl PDI31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI31_A { match self . bits { false => PDI31_A :: _0 , true => PDI31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI31_A :: _1 } } impl R { # [ doc = "Bit 0 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi0 ( & self ) -> PDI0_R { PDI0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi1 ( & self ) -> PDI1_R { PDI1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi2 ( & self ) -> PDI2_R { PDI2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi3 ( & self ) -> PDI3_R { PDI3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi4 ( & self ) -> PDI4_R { PDI4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi5 ( & self ) -> PDI5_R { PDI5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi6 ( & self ) -> PDI6_R { PDI6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi7 ( & self ) -> PDI7_R { PDI7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi8 ( & self ) -> PDI8_R { PDI8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi9 ( & self ) -> PDI9_R { PDI9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi10 ( & self ) -> PDI10_R { PDI10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi11 ( & self ) -> PDI11_R { PDI11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi12 ( & self ) -> PDI12_R { PDI12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi13 ( & self ) -> PDI13_R { PDI13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi14 ( & self ) -> PDI14_R { PDI14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi15 ( & self ) -> PDI15_R { PDI15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi16 ( & self ) -> PDI16_R { PDI16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi17 ( & self ) -> PDI17_R { PDI17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi18 ( & self ) -> PDI18_R { PDI18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi19 ( & self ) -> PDI19_R { PDI19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi20 ( & self ) -> PDI20_R { PDI20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi21 ( & self ) -> PDI21_R { PDI21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi22 ( & self ) -> PDI22_R { PDI22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi23 ( & self ) -> PDI23_R { PDI23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi24 ( & self ) -> PDI24_R { PDI24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi25 ( & self ) -> PDI25_R { PDI25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi26 ( & self ) -> PDI26_R { PDI26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi27 ( & self ) -> PDI27_R { PDI27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi28 ( & self ) -> PDI28_R { PDI28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi29 ( & self ) -> PDI29_R { PDI29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi30 ( & self ) -> PDI30_R { PDI30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi31 ( & self ) -> PDI31_R { PDI31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Port Data Direction Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pddr](pddr) module" ] pub type PDDR = crate :: Reg < u32 , _PDDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDDR ; # [ doc = "`read()` method returns [pddr::R](pddr::R) reader structure" ] impl crate :: Readable for PDDR { } # [ doc = "`write(|w| ..)` method takes [pddr::W](pddr::W) writer structure" ] impl crate :: Writable for PDDR { } # [ doc = "Port Data Direction Register" ] pub mod pddr { # [ doc = "Reader of register PDDR" ] pub type R = crate :: R < u32 , super :: PDDR > ; # [ doc = "Writer for register PDDR" ] pub type W = crate :: W < u32 , super :: PDDR > ; # [ doc = "Register PDDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD0_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD0_A ) -> Self { match variant { PDD0_A :: _0 => false , PDD0_A :: _1 => true } } } # [ doc = "Reader of field `PDD0`" ] pub type PDD0_R = crate :: R < bool , PDD0_A > ; impl PDD0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD0_A { match self . bits { false => PDD0_A :: _0 , true => PDD0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD0_A :: _1 } } # [ doc = "Write proxy for field `PDD0`" ] pub struct PDD0_W < 'a > { w : & 'a mut W , } impl < 'a > PDD0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD1_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD1_A ) -> Self { match variant { PDD1_A :: _0 => false , PDD1_A :: _1 => true } } } # [ doc = "Reader of field `PDD1`" ] pub type PDD1_R = crate :: R < bool , PDD1_A > ; impl PDD1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD1_A { match self . bits { false => PDD1_A :: _0 , true => PDD1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD1_A :: _1 } } # [ doc = "Write proxy for field `PDD1`" ] pub struct PDD1_W < 'a > { w : & 'a mut W , } impl < 'a > PDD1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD2_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD2_A ) -> Self { match variant { PDD2_A :: _0 => false , PDD2_A :: _1 => true } } } # [ doc = "Reader of field `PDD2`" ] pub type PDD2_R = crate :: R < bool , PDD2_A > ; impl PDD2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD2_A { match self . bits { false => PDD2_A :: _0 , true => PDD2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD2_A :: _1 } } # [ doc = "Write proxy for field `PDD2`" ] pub struct PDD2_W < 'a > { w : & 'a mut W , } impl < 'a > PDD2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD3_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD3_A ) -> Self { match variant { PDD3_A :: _0 => false , PDD3_A :: _1 => true } } } # [ doc = "Reader of field `PDD3`" ] pub type PDD3_R = crate :: R < bool , PDD3_A > ; impl PDD3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD3_A { match self . bits { false => PDD3_A :: _0 , true => PDD3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD3_A :: _1 } } # [ doc = "Write proxy for field `PDD3`" ] pub struct PDD3_W < 'a > { w : & 'a mut W , } impl < 'a > PDD3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD4_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD4_A ) -> Self { match variant { PDD4_A :: _0 => false , PDD4_A :: _1 => true } } } # [ doc = "Reader of field `PDD4`" ] pub type PDD4_R = crate :: R < bool , PDD4_A > ; impl PDD4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD4_A { match self . bits { false => PDD4_A :: _0 , true => PDD4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD4_A :: _1 } } # [ doc = "Write proxy for field `PDD4`" ] pub struct PDD4_W < 'a > { w : & 'a mut W , } impl < 'a > PDD4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD5_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD5_A ) -> Self { match variant { PDD5_A :: _0 => false , PDD5_A :: _1 => true } } } # [ doc = "Reader of field `PDD5`" ] pub type PDD5_R = crate :: R < bool , PDD5_A > ; impl PDD5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD5_A { match self . bits { false => PDD5_A :: _0 , true => PDD5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD5_A :: _1 } } # [ doc = "Write proxy for field `PDD5`" ] pub struct PDD5_W < 'a > { w : & 'a mut W , } impl < 'a > PDD5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD6_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD6_A ) -> Self { match variant { PDD6_A :: _0 => false , PDD6_A :: _1 => true } } } # [ doc = "Reader of field `PDD6`" ] pub type PDD6_R = crate :: R < bool , PDD6_A > ; impl PDD6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD6_A { match self . bits { false => PDD6_A :: _0 , true => PDD6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD6_A :: _1 } } # [ doc = "Write proxy for field `PDD6`" ] pub struct PDD6_W < 'a > { w : & 'a mut W , } impl < 'a > PDD6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD7_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD7_A ) -> Self { match variant { PDD7_A :: _0 => false , PDD7_A :: _1 => true } } } # [ doc = "Reader of field `PDD7`" ] pub type PDD7_R = crate :: R < bool , PDD7_A > ; impl PDD7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD7_A { match self . bits { false => PDD7_A :: _0 , true => PDD7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD7_A :: _1 } } # [ doc = "Write proxy for field `PDD7`" ] pub struct PDD7_W < 'a > { w : & 'a mut W , } impl < 'a > PDD7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD8_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD8_A ) -> Self { match variant { PDD8_A :: _0 => false , PDD8_A :: _1 => true } } } # [ doc = "Reader of field `PDD8`" ] pub type PDD8_R = crate :: R < bool , PDD8_A > ; impl PDD8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD8_A { match self . bits { false => PDD8_A :: _0 , true => PDD8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD8_A :: _1 } } # [ doc = "Write proxy for field `PDD8`" ] pub struct PDD8_W < 'a > { w : & 'a mut W , } impl < 'a > PDD8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD9_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD9_A ) -> Self { match variant { PDD9_A :: _0 => false , PDD9_A :: _1 => true } } } # [ doc = "Reader of field `PDD9`" ] pub type PDD9_R = crate :: R < bool , PDD9_A > ; impl PDD9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD9_A { match self . bits { false => PDD9_A :: _0 , true => PDD9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD9_A :: _1 } } # [ doc = "Write proxy for field `PDD9`" ] pub struct PDD9_W < 'a > { w : & 'a mut W , } impl < 'a > PDD9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD10_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD10_A ) -> Self { match variant { PDD10_A :: _0 => false , PDD10_A :: _1 => true } } } # [ doc = "Reader of field `PDD10`" ] pub type PDD10_R = crate :: R < bool , PDD10_A > ; impl PDD10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD10_A { match self . bits { false => PDD10_A :: _0 , true => PDD10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD10_A :: _1 } } # [ doc = "Write proxy for field `PDD10`" ] pub struct PDD10_W < 'a > { w : & 'a mut W , } impl < 'a > PDD10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD11_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD11_A ) -> Self { match variant { PDD11_A :: _0 => false , PDD11_A :: _1 => true } } } # [ doc = "Reader of field `PDD11`" ] pub type PDD11_R = crate :: R < bool , PDD11_A > ; impl PDD11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD11_A { match self . bits { false => PDD11_A :: _0 , true => PDD11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD11_A :: _1 } } # [ doc = "Write proxy for field `PDD11`" ] pub struct PDD11_W < 'a > { w : & 'a mut W , } impl < 'a > PDD11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD12_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD12_A ) -> Self { match variant { PDD12_A :: _0 => false , PDD12_A :: _1 => true } } } # [ doc = "Reader of field `PDD12`" ] pub type PDD12_R = crate :: R < bool , PDD12_A > ; impl PDD12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD12_A { match self . bits { false => PDD12_A :: _0 , true => PDD12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD12_A :: _1 } } # [ doc = "Write proxy for field `PDD12`" ] pub struct PDD12_W < 'a > { w : & 'a mut W , } impl < 'a > PDD12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD13_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD13_A ) -> Self { match variant { PDD13_A :: _0 => false , PDD13_A :: _1 => true } } } # [ doc = "Reader of field `PDD13`" ] pub type PDD13_R = crate :: R < bool , PDD13_A > ; impl PDD13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD13_A { match self . bits { false => PDD13_A :: _0 , true => PDD13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD13_A :: _1 } } # [ doc = "Write proxy for field `PDD13`" ] pub struct PDD13_W < 'a > { w : & 'a mut W , } impl < 'a > PDD13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD14_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD14_A ) -> Self { match variant { PDD14_A :: _0 => false , PDD14_A :: _1 => true } } } # [ doc = "Reader of field `PDD14`" ] pub type PDD14_R = crate :: R < bool , PDD14_A > ; impl PDD14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD14_A { match self . bits { false => PDD14_A :: _0 , true => PDD14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD14_A :: _1 } } # [ doc = "Write proxy for field `PDD14`" ] pub struct PDD14_W < 'a > { w : & 'a mut W , } impl < 'a > PDD14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD15_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD15_A ) -> Self { match variant { PDD15_A :: _0 => false , PDD15_A :: _1 => true } } } # [ doc = "Reader of field `PDD15`" ] pub type PDD15_R = crate :: R < bool , PDD15_A > ; impl PDD15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD15_A { match self . bits { false => PDD15_A :: _0 , true => PDD15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD15_A :: _1 } } # [ doc = "Write proxy for field `PDD15`" ] pub struct PDD15_W < 'a > { w : & 'a mut W , } impl < 'a > PDD15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD16_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD16_A ) -> Self { match variant { PDD16_A :: _0 => false , PDD16_A :: _1 => true } } } # [ doc = "Reader of field `PDD16`" ] pub type PDD16_R = crate :: R < bool , PDD16_A > ; impl PDD16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD16_A { match self . bits { false => PDD16_A :: _0 , true => PDD16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD16_A :: _1 } } # [ doc = "Write proxy for field `PDD16`" ] pub struct PDD16_W < 'a > { w : & 'a mut W , } impl < 'a > PDD16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD17_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD17_A ) -> Self { match variant { PDD17_A :: _0 => false , PDD17_A :: _1 => true } } } # [ doc = "Reader of field `PDD17`" ] pub type PDD17_R = crate :: R < bool , PDD17_A > ; impl PDD17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD17_A { match self . bits { false => PDD17_A :: _0 , true => PDD17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD17_A :: _1 } } # [ doc = "Write proxy for field `PDD17`" ] pub struct PDD17_W < 'a > { w : & 'a mut W , } impl < 'a > PDD17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD18_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD18_A ) -> Self { match variant { PDD18_A :: _0 => false , PDD18_A :: _1 => true } } } # [ doc = "Reader of field `PDD18`" ] pub type PDD18_R = crate :: R < bool , PDD18_A > ; impl PDD18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD18_A { match self . bits { false => PDD18_A :: _0 , true => PDD18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD18_A :: _1 } } # [ doc = "Write proxy for field `PDD18`" ] pub struct PDD18_W < 'a > { w : & 'a mut W , } impl < 'a > PDD18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD19_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD19_A ) -> Self { match variant { PDD19_A :: _0 => false , PDD19_A :: _1 => true } } } # [ doc = "Reader of field `PDD19`" ] pub type PDD19_R = crate :: R < bool , PDD19_A > ; impl PDD19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD19_A { match self . bits { false => PDD19_A :: _0 , true => PDD19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD19_A :: _1 } } # [ doc = "Write proxy for field `PDD19`" ] pub struct PDD19_W < 'a > { w : & 'a mut W , } impl < 'a > PDD19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD20_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD20_A ) -> Self { match variant { PDD20_A :: _0 => false , PDD20_A :: _1 => true } } } # [ doc = "Reader of field `PDD20`" ] pub type PDD20_R = crate :: R < bool , PDD20_A > ; impl PDD20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD20_A { match self . bits { false => PDD20_A :: _0 , true => PDD20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD20_A :: _1 } } # [ doc = "Write proxy for field `PDD20`" ] pub struct PDD20_W < 'a > { w : & 'a mut W , } impl < 'a > PDD20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD21_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD21_A ) -> Self { match variant { PDD21_A :: _0 => false , PDD21_A :: _1 => true } } } # [ doc = "Reader of field `PDD21`" ] pub type PDD21_R = crate :: R < bool , PDD21_A > ; impl PDD21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD21_A { match self . bits { false => PDD21_A :: _0 , true => PDD21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD21_A :: _1 } } # [ doc = "Write proxy for field `PDD21`" ] pub struct PDD21_W < 'a > { w : & 'a mut W , } impl < 'a > PDD21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD22_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD22_A ) -> Self { match variant { PDD22_A :: _0 => false , PDD22_A :: _1 => true } } } # [ doc = "Reader of field `PDD22`" ] pub type PDD22_R = crate :: R < bool , PDD22_A > ; impl PDD22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD22_A { match self . bits { false => PDD22_A :: _0 , true => PDD22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD22_A :: _1 } } # [ doc = "Write proxy for field `PDD22`" ] pub struct PDD22_W < 'a > { w : & 'a mut W , } impl < 'a > PDD22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD23_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD23_A ) -> Self { match variant { PDD23_A :: _0 => false , PDD23_A :: _1 => true } } } # [ doc = "Reader of field `PDD23`" ] pub type PDD23_R = crate :: R < bool , PDD23_A > ; impl PDD23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD23_A { match self . bits { false => PDD23_A :: _0 , true => PDD23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD23_A :: _1 } } # [ doc = "Write proxy for field `PDD23`" ] pub struct PDD23_W < 'a > { w : & 'a mut W , } impl < 'a > PDD23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD24_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD24_A ) -> Self { match variant { PDD24_A :: _0 => false , PDD24_A :: _1 => true } } } # [ doc = "Reader of field `PDD24`" ] pub type PDD24_R = crate :: R < bool , PDD24_A > ; impl PDD24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD24_A { match self . bits { false => PDD24_A :: _0 , true => PDD24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD24_A :: _1 } } # [ doc = "Write proxy for field `PDD24`" ] pub struct PDD24_W < 'a > { w : & 'a mut W , } impl < 'a > PDD24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD25_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD25_A ) -> Self { match variant { PDD25_A :: _0 => false , PDD25_A :: _1 => true } } } # [ doc = "Reader of field `PDD25`" ] pub type PDD25_R = crate :: R < bool , PDD25_A > ; impl PDD25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD25_A { match self . bits { false => PDD25_A :: _0 , true => PDD25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD25_A :: _1 } } # [ doc = "Write proxy for field `PDD25`" ] pub struct PDD25_W < 'a > { w : & 'a mut W , } impl < 'a > PDD25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD26_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD26_A ) -> Self { match variant { PDD26_A :: _0 => false , PDD26_A :: _1 => true } } } # [ doc = "Reader of field `PDD26`" ] pub type PDD26_R = crate :: R < bool , PDD26_A > ; impl PDD26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD26_A { match self . bits { false => PDD26_A :: _0 , true => PDD26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD26_A :: _1 } } # [ doc = "Write proxy for field `PDD26`" ] pub struct PDD26_W < 'a > { w : & 'a mut W , } impl < 'a > PDD26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD27_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD27_A ) -> Self { match variant { PDD27_A :: _0 => false , PDD27_A :: _1 => true } } } # [ doc = "Reader of field `PDD27`" ] pub type PDD27_R = crate :: R < bool , PDD27_A > ; impl PDD27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD27_A { match self . bits { false => PDD27_A :: _0 , true => PDD27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD27_A :: _1 } } # [ doc = "Write proxy for field `PDD27`" ] pub struct PDD27_W < 'a > { w : & 'a mut W , } impl < 'a > PDD27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD28_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD28_A ) -> Self { match variant { PDD28_A :: _0 => false , PDD28_A :: _1 => true } } } # [ doc = "Reader of field `PDD28`" ] pub type PDD28_R = crate :: R < bool , PDD28_A > ; impl PDD28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD28_A { match self . bits { false => PDD28_A :: _0 , true => PDD28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD28_A :: _1 } } # [ doc = "Write proxy for field `PDD28`" ] pub struct PDD28_W < 'a > { w : & 'a mut W , } impl < 'a > PDD28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD29_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD29_A ) -> Self { match variant { PDD29_A :: _0 => false , PDD29_A :: _1 => true } } } # [ doc = "Reader of field `PDD29`" ] pub type PDD29_R = crate :: R < bool , PDD29_A > ; impl PDD29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD29_A { match self . bits { false => PDD29_A :: _0 , true => PDD29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD29_A :: _1 } } # [ doc = "Write proxy for field `PDD29`" ] pub struct PDD29_W < 'a > { w : & 'a mut W , } impl < 'a > PDD29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD30_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD30_A ) -> Self { match variant { PDD30_A :: _0 => false , PDD30_A :: _1 => true } } } # [ doc = "Reader of field `PDD30`" ] pub type PDD30_R = crate :: R < bool , PDD30_A > ; impl PDD30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD30_A { match self . bits { false => PDD30_A :: _0 , true => PDD30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD30_A :: _1 } } # [ doc = "Write proxy for field `PDD30`" ] pub struct PDD30_W < 'a > { w : & 'a mut W , } impl < 'a > PDD30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD31_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD31_A ) -> Self { match variant { PDD31_A :: _0 => false , PDD31_A :: _1 => true } } } # [ doc = "Reader of field `PDD31`" ] pub type PDD31_R = crate :: R < bool , PDD31_A > ; impl PDD31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD31_A { match self . bits { false => PDD31_A :: _0 , true => PDD31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD31_A :: _1 } } # [ doc = "Write proxy for field `PDD31`" ] pub struct PDD31_W < 'a > { w : & 'a mut W , } impl < 'a > PDD31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & self ) -> PDD0_R { PDD0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & self ) -> PDD1_R { PDD1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & self ) -> PDD2_R { PDD2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & self ) -> PDD3_R { PDD3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & self ) -> PDD4_R { PDD4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & self ) -> PDD5_R { PDD5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & self ) -> PDD6_R { PDD6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & self ) -> PDD7_R { PDD7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & self ) -> PDD8_R { PDD8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & self ) -> PDD9_R { PDD9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & self ) -> PDD10_R { PDD10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & self ) -> PDD11_R { PDD11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & self ) -> PDD12_R { PDD12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & self ) -> PDD13_R { PDD13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & self ) -> PDD14_R { PDD14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & self ) -> PDD15_R { PDD15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & self ) -> PDD16_R { PDD16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & self ) -> PDD17_R { PDD17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & self ) -> PDD18_R { PDD18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & self ) -> PDD19_R { PDD19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & self ) -> PDD20_R { PDD20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & self ) -> PDD21_R { PDD21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & self ) -> PDD22_R { PDD22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & self ) -> PDD23_R { PDD23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & self ) -> PDD24_R { PDD24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & self ) -> PDD25_R { PDD25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & self ) -> PDD26_R { PDD26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & self ) -> PDD27_R { PDD27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & self ) -> PDD28_R { PDD28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & self ) -> PDD29_R { PDD29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & self ) -> PDD30_R { PDD30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & self ) -> PDD31_R { PDD31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & mut self ) -> PDD0_W { PDD0_W { w : self } } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & mut self ) -> PDD1_W { PDD1_W { w : self } } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & mut self ) -> PDD2_W { PDD2_W { w : self } } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & mut self ) -> PDD3_W { PDD3_W { w : self } } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & mut self ) -> PDD4_W { PDD4_W { w : self } } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & mut self ) -> PDD5_W { PDD5_W { w : self } } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & mut self ) -> PDD6_W { PDD6_W { w : self } } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & mut self ) -> PDD7_W { PDD7_W { w : self } } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & mut self ) -> PDD8_W { PDD8_W { w : self } } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & mut self ) -> PDD9_W { PDD9_W { w : self } } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & mut self ) -> PDD10_W { PDD10_W { w : self } } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & mut self ) -> PDD11_W { PDD11_W { w : self } } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & mut self ) -> PDD12_W { PDD12_W { w : self } } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & mut self ) -> PDD13_W { PDD13_W { w : self } } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & mut self ) -> PDD14_W { PDD14_W { w : self } } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & mut self ) -> PDD15_W { PDD15_W { w : self } } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & mut self ) -> PDD16_W { PDD16_W { w : self } } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & mut self ) -> PDD17_W { PDD17_W { w : self } } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & mut self ) -> PDD18_W { PDD18_W { w : self } } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & mut self ) -> PDD19_W { PDD19_W { w : self } } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & mut self ) -> PDD20_W { PDD20_W { w : self } } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & mut self ) -> PDD21_W { PDD21_W { w : self } } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & mut self ) -> PDD22_W { PDD22_W { w : self } } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & mut self ) -> PDD23_W { PDD23_W { w : self } } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & mut self ) -> PDD24_W { PDD24_W { w : self } } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & mut self ) -> PDD25_W { PDD25_W { w : self } } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & mut self ) -> PDD26_W { PDD26_W { w : self } } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & mut self ) -> PDD27_W { PDD27_W { w : self } } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & mut self ) -> PDD28_W { PDD28_W { w : self } } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & mut self ) -> PDD29_W { PDD29_W { w : self } } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & mut self ) -> PDD30_W { PDD30_W { w : self } } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & mut self ) -> PDD31_W { PDD31_W { w : self } } } } } # [ doc = "General Purpose Input/Output" ] pub struct GPIOC { _marker : PhantomData < * const ( ) > } unsafe impl Send for GPIOC { } impl GPIOC { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const gpioc :: RegisterBlock { 0x400f_f080 as * const _ } } impl Deref for GPIOC { type Target = gpioc :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * GPIOC :: ptr ( ) } } } # [ doc = "General Purpose Input/Output" ] pub mod gpioc { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Port Data Output Register" ] pub pdor : PDOR , # [ doc = "0x04 - Port Set Output Register" ] pub psor : PSOR , # [ doc = "0x08 - Port Clear Output Register" ] pub pcor : PCOR , # [ doc = "0x0c - Port Toggle Output Register" ] pub ptor : PTOR , # [ doc = "0x10 - Port Data Input Register" ] pub pdir : PDIR , # [ doc = "0x14 - Port Data Direction Register" ] pub pddr : PDDR , } # [ doc = "Port Data Output Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdor](pdor) module" ] pub type PDOR = crate :: Reg < u32 , _PDOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDOR ; # [ doc = "`read()` method returns [pdor::R](pdor::R) reader structure" ] impl crate :: Readable for PDOR { } # [ doc = "`write(|w| ..)` method takes [pdor::W](pdor::W) writer structure" ] impl crate :: Writable for PDOR { } # [ doc = "Port Data Output Register" ] pub mod pdor { # [ doc = "Reader of register PDOR" ] pub type R = crate :: R < u32 , super :: PDOR > ; # [ doc = "Writer for register PDOR" ] pub type W = crate :: W < u32 , super :: PDOR > ; # [ doc = "Register PDOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO0_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO0_A ) -> Self { match variant { PDO0_A :: _0 => false , PDO0_A :: _1 => true } } } # [ doc = "Reader of field `PDO0`" ] pub type PDO0_R = crate :: R < bool , PDO0_A > ; impl PDO0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO0_A { match self . bits { false => PDO0_A :: _0 , true => PDO0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO0_A :: _1 } } # [ doc = "Write proxy for field `PDO0`" ] pub struct PDO0_W < 'a > { w : & 'a mut W , } impl < 'a > PDO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO1_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO1_A ) -> Self { match variant { PDO1_A :: _0 => false , PDO1_A :: _1 => true } } } # [ doc = "Reader of field `PDO1`" ] pub type PDO1_R = crate :: R < bool , PDO1_A > ; impl PDO1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO1_A { match self . bits { false => PDO1_A :: _0 , true => PDO1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO1_A :: _1 } } # [ doc = "Write proxy for field `PDO1`" ] pub struct PDO1_W < 'a > { w : & 'a mut W , } impl < 'a > PDO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO2_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO2_A ) -> Self { match variant { PDO2_A :: _0 => false , PDO2_A :: _1 => true } } } # [ doc = "Reader of field `PDO2`" ] pub type PDO2_R = crate :: R < bool , PDO2_A > ; impl PDO2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO2_A { match self . bits { false => PDO2_A :: _0 , true => PDO2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO2_A :: _1 } } # [ doc = "Write proxy for field `PDO2`" ] pub struct PDO2_W < 'a > { w : & 'a mut W , } impl < 'a > PDO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO3_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO3_A ) -> Self { match variant { PDO3_A :: _0 => false , PDO3_A :: _1 => true } } } # [ doc = "Reader of field `PDO3`" ] pub type PDO3_R = crate :: R < bool , PDO3_A > ; impl PDO3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO3_A { match self . bits { false => PDO3_A :: _0 , true => PDO3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO3_A :: _1 } } # [ doc = "Write proxy for field `PDO3`" ] pub struct PDO3_W < 'a > { w : & 'a mut W , } impl < 'a > PDO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO4_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO4_A ) -> Self { match variant { PDO4_A :: _0 => false , PDO4_A :: _1 => true } } } # [ doc = "Reader of field `PDO4`" ] pub type PDO4_R = crate :: R < bool , PDO4_A > ; impl PDO4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO4_A { match self . bits { false => PDO4_A :: _0 , true => PDO4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO4_A :: _1 } } # [ doc = "Write proxy for field `PDO4`" ] pub struct PDO4_W < 'a > { w : & 'a mut W , } impl < 'a > PDO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO5_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO5_A ) -> Self { match variant { PDO5_A :: _0 => false , PDO5_A :: _1 => true } } } # [ doc = "Reader of field `PDO5`" ] pub type PDO5_R = crate :: R < bool , PDO5_A > ; impl PDO5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO5_A { match self . bits { false => PDO5_A :: _0 , true => PDO5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO5_A :: _1 } } # [ doc = "Write proxy for field `PDO5`" ] pub struct PDO5_W < 'a > { w : & 'a mut W , } impl < 'a > PDO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO6_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO6_A ) -> Self { match variant { PDO6_A :: _0 => false , PDO6_A :: _1 => true } } } # [ doc = "Reader of field `PDO6`" ] pub type PDO6_R = crate :: R < bool , PDO6_A > ; impl PDO6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO6_A { match self . bits { false => PDO6_A :: _0 , true => PDO6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO6_A :: _1 } } # [ doc = "Write proxy for field `PDO6`" ] pub struct PDO6_W < 'a > { w : & 'a mut W , } impl < 'a > PDO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO7_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO7_A ) -> Self { match variant { PDO7_A :: _0 => false , PDO7_A :: _1 => true } } } # [ doc = "Reader of field `PDO7`" ] pub type PDO7_R = crate :: R < bool , PDO7_A > ; impl PDO7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO7_A { match self . bits { false => PDO7_A :: _0 , true => PDO7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO7_A :: _1 } } # [ doc = "Write proxy for field `PDO7`" ] pub struct PDO7_W < 'a > { w : & 'a mut W , } impl < 'a > PDO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO8_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO8_A ) -> Self { match variant { PDO8_A :: _0 => false , PDO8_A :: _1 => true } } } # [ doc = "Reader of field `PDO8`" ] pub type PDO8_R = crate :: R < bool , PDO8_A > ; impl PDO8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO8_A { match self . bits { false => PDO8_A :: _0 , true => PDO8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO8_A :: _1 } } # [ doc = "Write proxy for field `PDO8`" ] pub struct PDO8_W < 'a > { w : & 'a mut W , } impl < 'a > PDO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO9_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO9_A ) -> Self { match variant { PDO9_A :: _0 => false , PDO9_A :: _1 => true } } } # [ doc = "Reader of field `PDO9`" ] pub type PDO9_R = crate :: R < bool , PDO9_A > ; impl PDO9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO9_A { match self . bits { false => PDO9_A :: _0 , true => PDO9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO9_A :: _1 } } # [ doc = "Write proxy for field `PDO9`" ] pub struct PDO9_W < 'a > { w : & 'a mut W , } impl < 'a > PDO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO10_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO10_A ) -> Self { match variant { PDO10_A :: _0 => false , PDO10_A :: _1 => true } } } # [ doc = "Reader of field `PDO10`" ] pub type PDO10_R = crate :: R < bool , PDO10_A > ; impl PDO10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO10_A { match self . bits { false => PDO10_A :: _0 , true => PDO10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO10_A :: _1 } } # [ doc = "Write proxy for field `PDO10`" ] pub struct PDO10_W < 'a > { w : & 'a mut W , } impl < 'a > PDO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO11_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO11_A ) -> Self { match variant { PDO11_A :: _0 => false , PDO11_A :: _1 => true } } } # [ doc = "Reader of field `PDO11`" ] pub type PDO11_R = crate :: R < bool , PDO11_A > ; impl PDO11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO11_A { match self . bits { false => PDO11_A :: _0 , true => PDO11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO11_A :: _1 } } # [ doc = "Write proxy for field `PDO11`" ] pub struct PDO11_W < 'a > { w : & 'a mut W , } impl < 'a > PDO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO12_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO12_A ) -> Self { match variant { PDO12_A :: _0 => false , PDO12_A :: _1 => true } } } # [ doc = "Reader of field `PDO12`" ] pub type PDO12_R = crate :: R < bool , PDO12_A > ; impl PDO12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO12_A { match self . bits { false => PDO12_A :: _0 , true => PDO12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO12_A :: _1 } } # [ doc = "Write proxy for field `PDO12`" ] pub struct PDO12_W < 'a > { w : & 'a mut W , } impl < 'a > PDO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO13_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO13_A ) -> Self { match variant { PDO13_A :: _0 => false , PDO13_A :: _1 => true } } } # [ doc = "Reader of field `PDO13`" ] pub type PDO13_R = crate :: R < bool , PDO13_A > ; impl PDO13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO13_A { match self . bits { false => PDO13_A :: _0 , true => PDO13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO13_A :: _1 } } # [ doc = "Write proxy for field `PDO13`" ] pub struct PDO13_W < 'a > { w : & 'a mut W , } impl < 'a > PDO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO14_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO14_A ) -> Self { match variant { PDO14_A :: _0 => false , PDO14_A :: _1 => true } } } # [ doc = "Reader of field `PDO14`" ] pub type PDO14_R = crate :: R < bool , PDO14_A > ; impl PDO14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO14_A { match self . bits { false => PDO14_A :: _0 , true => PDO14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO14_A :: _1 } } # [ doc = "Write proxy for field `PDO14`" ] pub struct PDO14_W < 'a > { w : & 'a mut W , } impl < 'a > PDO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO15_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO15_A ) -> Self { match variant { PDO15_A :: _0 => false , PDO15_A :: _1 => true } } } # [ doc = "Reader of field `PDO15`" ] pub type PDO15_R = crate :: R < bool , PDO15_A > ; impl PDO15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO15_A { match self . bits { false => PDO15_A :: _0 , true => PDO15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO15_A :: _1 } } # [ doc = "Write proxy for field `PDO15`" ] pub struct PDO15_W < 'a > { w : & 'a mut W , } impl < 'a > PDO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO16_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO16_A ) -> Self { match variant { PDO16_A :: _0 => false , PDO16_A :: _1 => true } } } # [ doc = "Reader of field `PDO16`" ] pub type PDO16_R = crate :: R < bool , PDO16_A > ; impl PDO16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO16_A { match self . bits { false => PDO16_A :: _0 , true => PDO16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO16_A :: _1 } } # [ doc = "Write proxy for field `PDO16`" ] pub struct PDO16_W < 'a > { w : & 'a mut W , } impl < 'a > PDO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO17_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO17_A ) -> Self { match variant { PDO17_A :: _0 => false , PDO17_A :: _1 => true } } } # [ doc = "Reader of field `PDO17`" ] pub type PDO17_R = crate :: R < bool , PDO17_A > ; impl PDO17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO17_A { match self . bits { false => PDO17_A :: _0 , true => PDO17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO17_A :: _1 } } # [ doc = "Write proxy for field `PDO17`" ] pub struct PDO17_W < 'a > { w : & 'a mut W , } impl < 'a > PDO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO18_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO18_A ) -> Self { match variant { PDO18_A :: _0 => false , PDO18_A :: _1 => true } } } # [ doc = "Reader of field `PDO18`" ] pub type PDO18_R = crate :: R < bool , PDO18_A > ; impl PDO18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO18_A { match self . bits { false => PDO18_A :: _0 , true => PDO18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO18_A :: _1 } } # [ doc = "Write proxy for field `PDO18`" ] pub struct PDO18_W < 'a > { w : & 'a mut W , } impl < 'a > PDO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO19_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO19_A ) -> Self { match variant { PDO19_A :: _0 => false , PDO19_A :: _1 => true } } } # [ doc = "Reader of field `PDO19`" ] pub type PDO19_R = crate :: R < bool , PDO19_A > ; impl PDO19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO19_A { match self . bits { false => PDO19_A :: _0 , true => PDO19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO19_A :: _1 } } # [ doc = "Write proxy for field `PDO19`" ] pub struct PDO19_W < 'a > { w : & 'a mut W , } impl < 'a > PDO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO20_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO20_A ) -> Self { match variant { PDO20_A :: _0 => false , PDO20_A :: _1 => true } } } # [ doc = "Reader of field `PDO20`" ] pub type PDO20_R = crate :: R < bool , PDO20_A > ; impl PDO20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO20_A { match self . bits { false => PDO20_A :: _0 , true => PDO20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO20_A :: _1 } } # [ doc = "Write proxy for field `PDO20`" ] pub struct PDO20_W < 'a > { w : & 'a mut W , } impl < 'a > PDO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO21_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO21_A ) -> Self { match variant { PDO21_A :: _0 => false , PDO21_A :: _1 => true } } } # [ doc = "Reader of field `PDO21`" ] pub type PDO21_R = crate :: R < bool , PDO21_A > ; impl PDO21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO21_A { match self . bits { false => PDO21_A :: _0 , true => PDO21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO21_A :: _1 } } # [ doc = "Write proxy for field `PDO21`" ] pub struct PDO21_W < 'a > { w : & 'a mut W , } impl < 'a > PDO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO22_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO22_A ) -> Self { match variant { PDO22_A :: _0 => false , PDO22_A :: _1 => true } } } # [ doc = "Reader of field `PDO22`" ] pub type PDO22_R = crate :: R < bool , PDO22_A > ; impl PDO22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO22_A { match self . bits { false => PDO22_A :: _0 , true => PDO22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO22_A :: _1 } } # [ doc = "Write proxy for field `PDO22`" ] pub struct PDO22_W < 'a > { w : & 'a mut W , } impl < 'a > PDO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO23_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO23_A ) -> Self { match variant { PDO23_A :: _0 => false , PDO23_A :: _1 => true } } } # [ doc = "Reader of field `PDO23`" ] pub type PDO23_R = crate :: R < bool , PDO23_A > ; impl PDO23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO23_A { match self . bits { false => PDO23_A :: _0 , true => PDO23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO23_A :: _1 } } # [ doc = "Write proxy for field `PDO23`" ] pub struct PDO23_W < 'a > { w : & 'a mut W , } impl < 'a > PDO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO24_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO24_A ) -> Self { match variant { PDO24_A :: _0 => false , PDO24_A :: _1 => true } } } # [ doc = "Reader of field `PDO24`" ] pub type PDO24_R = crate :: R < bool , PDO24_A > ; impl PDO24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO24_A { match self . bits { false => PDO24_A :: _0 , true => PDO24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO24_A :: _1 } } # [ doc = "Write proxy for field `PDO24`" ] pub struct PDO24_W < 'a > { w : & 'a mut W , } impl < 'a > PDO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO25_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO25_A ) -> Self { match variant { PDO25_A :: _0 => false , PDO25_A :: _1 => true } } } # [ doc = "Reader of field `PDO25`" ] pub type PDO25_R = crate :: R < bool , PDO25_A > ; impl PDO25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO25_A { match self . bits { false => PDO25_A :: _0 , true => PDO25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO25_A :: _1 } } # [ doc = "Write proxy for field `PDO25`" ] pub struct PDO25_W < 'a > { w : & 'a mut W , } impl < 'a > PDO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO26_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO26_A ) -> Self { match variant { PDO26_A :: _0 => false , PDO26_A :: _1 => true } } } # [ doc = "Reader of field `PDO26`" ] pub type PDO26_R = crate :: R < bool , PDO26_A > ; impl PDO26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO26_A { match self . bits { false => PDO26_A :: _0 , true => PDO26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO26_A :: _1 } } # [ doc = "Write proxy for field `PDO26`" ] pub struct PDO26_W < 'a > { w : & 'a mut W , } impl < 'a > PDO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO27_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO27_A ) -> Self { match variant { PDO27_A :: _0 => false , PDO27_A :: _1 => true } } } # [ doc = "Reader of field `PDO27`" ] pub type PDO27_R = crate :: R < bool , PDO27_A > ; impl PDO27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO27_A { match self . bits { false => PDO27_A :: _0 , true => PDO27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO27_A :: _1 } } # [ doc = "Write proxy for field `PDO27`" ] pub struct PDO27_W < 'a > { w : & 'a mut W , } impl < 'a > PDO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO28_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO28_A ) -> Self { match variant { PDO28_A :: _0 => false , PDO28_A :: _1 => true } } } # [ doc = "Reader of field `PDO28`" ] pub type PDO28_R = crate :: R < bool , PDO28_A > ; impl PDO28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO28_A { match self . bits { false => PDO28_A :: _0 , true => PDO28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO28_A :: _1 } } # [ doc = "Write proxy for field `PDO28`" ] pub struct PDO28_W < 'a > { w : & 'a mut W , } impl < 'a > PDO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO29_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO29_A ) -> Self { match variant { PDO29_A :: _0 => false , PDO29_A :: _1 => true } } } # [ doc = "Reader of field `PDO29`" ] pub type PDO29_R = crate :: R < bool , PDO29_A > ; impl PDO29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO29_A { match self . bits { false => PDO29_A :: _0 , true => PDO29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO29_A :: _1 } } # [ doc = "Write proxy for field `PDO29`" ] pub struct PDO29_W < 'a > { w : & 'a mut W , } impl < 'a > PDO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO30_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO30_A ) -> Self { match variant { PDO30_A :: _0 => false , PDO30_A :: _1 => true } } } # [ doc = "Reader of field `PDO30`" ] pub type PDO30_R = crate :: R < bool , PDO30_A > ; impl PDO30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO30_A { match self . bits { false => PDO30_A :: _0 , true => PDO30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO30_A :: _1 } } # [ doc = "Write proxy for field `PDO30`" ] pub struct PDO30_W < 'a > { w : & 'a mut W , } impl < 'a > PDO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO31_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO31_A ) -> Self { match variant { PDO31_A :: _0 => false , PDO31_A :: _1 => true } } } # [ doc = "Reader of field `PDO31`" ] pub type PDO31_R = crate :: R < bool , PDO31_A > ; impl PDO31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO31_A { match self . bits { false => PDO31_A :: _0 , true => PDO31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO31_A :: _1 } } # [ doc = "Write proxy for field `PDO31`" ] pub struct PDO31_W < 'a > { w : & 'a mut W , } impl < 'a > PDO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & self ) -> PDO0_R { PDO0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & self ) -> PDO1_R { PDO1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & self ) -> PDO2_R { PDO2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & self ) -> PDO3_R { PDO3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & self ) -> PDO4_R { PDO4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & self ) -> PDO5_R { PDO5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & self ) -> PDO6_R { PDO6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & self ) -> PDO7_R { PDO7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & self ) -> PDO8_R { PDO8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & self ) -> PDO9_R { PDO9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & self ) -> PDO10_R { PDO10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & self ) -> PDO11_R { PDO11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & self ) -> PDO12_R { PDO12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & self ) -> PDO13_R { PDO13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & self ) -> PDO14_R { PDO14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & self ) -> PDO15_R { PDO15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & self ) -> PDO16_R { PDO16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & self ) -> PDO17_R { PDO17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & self ) -> PDO18_R { PDO18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & self ) -> PDO19_R { PDO19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & self ) -> PDO20_R { PDO20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & self ) -> PDO21_R { PDO21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & self ) -> PDO22_R { PDO22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & self ) -> PDO23_R { PDO23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & self ) -> PDO24_R { PDO24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & self ) -> PDO25_R { PDO25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & self ) -> PDO26_R { PDO26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & self ) -> PDO27_R { PDO27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & self ) -> PDO28_R { PDO28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & self ) -> PDO29_R { PDO29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & self ) -> PDO30_R { PDO30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & self ) -> PDO31_R { PDO31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & mut self ) -> PDO0_W { PDO0_W { w : self } } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & mut self ) -> PDO1_W { PDO1_W { w : self } } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & mut self ) -> PDO2_W { PDO2_W { w : self } } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & mut self ) -> PDO3_W { PDO3_W { w : self } } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & mut self ) -> PDO4_W { PDO4_W { w : self } } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & mut self ) -> PDO5_W { PDO5_W { w : self } } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & mut self ) -> PDO6_W { PDO6_W { w : self } } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & mut self ) -> PDO7_W { PDO7_W { w : self } } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & mut self ) -> PDO8_W { PDO8_W { w : self } } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & mut self ) -> PDO9_W { PDO9_W { w : self } } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & mut self ) -> PDO10_W { PDO10_W { w : self } } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & mut self ) -> PDO11_W { PDO11_W { w : self } } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & mut self ) -> PDO12_W { PDO12_W { w : self } } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & mut self ) -> PDO13_W { PDO13_W { w : self } } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & mut self ) -> PDO14_W { PDO14_W { w : self } } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & mut self ) -> PDO15_W { PDO15_W { w : self } } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & mut self ) -> PDO16_W { PDO16_W { w : self } } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & mut self ) -> PDO17_W { PDO17_W { w : self } } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & mut self ) -> PDO18_W { PDO18_W { w : self } } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & mut self ) -> PDO19_W { PDO19_W { w : self } } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & mut self ) -> PDO20_W { PDO20_W { w : self } } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & mut self ) -> PDO21_W { PDO21_W { w : self } } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & mut self ) -> PDO22_W { PDO22_W { w : self } } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & mut self ) -> PDO23_W { PDO23_W { w : self } } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & mut self ) -> PDO24_W { PDO24_W { w : self } } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & mut self ) -> PDO25_W { PDO25_W { w : self } } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & mut self ) -> PDO26_W { PDO26_W { w : self } } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & mut self ) -> PDO27_W { PDO27_W { w : self } } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & mut self ) -> PDO28_W { PDO28_W { w : self } } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & mut self ) -> PDO29_W { PDO29_W { w : self } } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & mut self ) -> PDO30_W { PDO30_W { w : self } } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & mut self ) -> PDO31_W { PDO31_W { w : self } } } } # [ doc = "Port Set Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psor](psor) module" ] pub type PSOR = crate :: Reg < u32 , _PSOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PSOR ; # [ doc = "`write(|w| ..)` method takes [psor::W](psor::W) writer structure" ] impl crate :: Writable for PSOR { } # [ doc = "Port Set Output Register" ] pub mod psor { # [ doc = "Writer for register PSOR" ] pub type W = crate :: W < u32 , super :: PSOR > ; # [ doc = "Register PSOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PSOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO0_AW ) -> Self { match variant { PTSO0_AW :: _0 => false , PTSO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO0`" ] pub struct PTSO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO1_AW ) -> Self { match variant { PTSO1_AW :: _0 => false , PTSO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO1`" ] pub struct PTSO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO2_AW ) -> Self { match variant { PTSO2_AW :: _0 => false , PTSO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO2`" ] pub struct PTSO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO3_AW ) -> Self { match variant { PTSO3_AW :: _0 => false , PTSO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO3`" ] pub struct PTSO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO4_AW ) -> Self { match variant { PTSO4_AW :: _0 => false , PTSO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO4`" ] pub struct PTSO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO5_AW ) -> Self { match variant { PTSO5_AW :: _0 => false , PTSO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO5`" ] pub struct PTSO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO6_AW ) -> Self { match variant { PTSO6_AW :: _0 => false , PTSO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO6`" ] pub struct PTSO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO7_AW ) -> Self { match variant { PTSO7_AW :: _0 => false , PTSO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO7`" ] pub struct PTSO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO8_AW ) -> Self { match variant { PTSO8_AW :: _0 => false , PTSO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO8`" ] pub struct PTSO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO9_AW ) -> Self { match variant { PTSO9_AW :: _0 => false , PTSO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO9`" ] pub struct PTSO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO10_AW ) -> Self { match variant { PTSO10_AW :: _0 => false , PTSO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO10`" ] pub struct PTSO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO11_AW ) -> Self { match variant { PTSO11_AW :: _0 => false , PTSO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO11`" ] pub struct PTSO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO12_AW ) -> Self { match variant { PTSO12_AW :: _0 => false , PTSO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO12`" ] pub struct PTSO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO13_AW ) -> Self { match variant { PTSO13_AW :: _0 => false , PTSO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO13`" ] pub struct PTSO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO14_AW ) -> Self { match variant { PTSO14_AW :: _0 => false , PTSO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO14`" ] pub struct PTSO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO15_AW ) -> Self { match variant { PTSO15_AW :: _0 => false , PTSO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO15`" ] pub struct PTSO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO16_AW ) -> Self { match variant { PTSO16_AW :: _0 => false , PTSO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO16`" ] pub struct PTSO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO17_AW ) -> Self { match variant { PTSO17_AW :: _0 => false , PTSO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO17`" ] pub struct PTSO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO18_AW ) -> Self { match variant { PTSO18_AW :: _0 => false , PTSO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO18`" ] pub struct PTSO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO19_AW ) -> Self { match variant { PTSO19_AW :: _0 => false , PTSO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO19`" ] pub struct PTSO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO20_AW ) -> Self { match variant { PTSO20_AW :: _0 => false , PTSO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO20`" ] pub struct PTSO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO21_AW ) -> Self { match variant { PTSO21_AW :: _0 => false , PTSO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO21`" ] pub struct PTSO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO22_AW ) -> Self { match variant { PTSO22_AW :: _0 => false , PTSO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO22`" ] pub struct PTSO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO23_AW ) -> Self { match variant { PTSO23_AW :: _0 => false , PTSO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO23`" ] pub struct PTSO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO24_AW ) -> Self { match variant { PTSO24_AW :: _0 => false , PTSO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO24`" ] pub struct PTSO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO25_AW ) -> Self { match variant { PTSO25_AW :: _0 => false , PTSO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO25`" ] pub struct PTSO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO26_AW ) -> Self { match variant { PTSO26_AW :: _0 => false , PTSO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO26`" ] pub struct PTSO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO27_AW ) -> Self { match variant { PTSO27_AW :: _0 => false , PTSO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO27`" ] pub struct PTSO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO28_AW ) -> Self { match variant { PTSO28_AW :: _0 => false , PTSO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO28`" ] pub struct PTSO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO29_AW ) -> Self { match variant { PTSO29_AW :: _0 => false , PTSO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO29`" ] pub struct PTSO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO30_AW ) -> Self { match variant { PTSO30_AW :: _0 => false , PTSO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO30`" ] pub struct PTSO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO31_AW ) -> Self { match variant { PTSO31_AW :: _0 => false , PTSO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO31`" ] pub struct PTSO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso0 ( & mut self ) -> PTSO0_W { PTSO0_W { w : self } } # [ doc = "Bit 1 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso1 ( & mut self ) -> PTSO1_W { PTSO1_W { w : self } } # [ doc = "Bit 2 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso2 ( & mut self ) -> PTSO2_W { PTSO2_W { w : self } } # [ doc = "Bit 3 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso3 ( & mut self ) -> PTSO3_W { PTSO3_W { w : self } } # [ doc = "Bit 4 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso4 ( & mut self ) -> PTSO4_W { PTSO4_W { w : self } } # [ doc = "Bit 5 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso5 ( & mut self ) -> PTSO5_W { PTSO5_W { w : self } } # [ doc = "Bit 6 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso6 ( & mut self ) -> PTSO6_W { PTSO6_W { w : self } } # [ doc = "Bit 7 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso7 ( & mut self ) -> PTSO7_W { PTSO7_W { w : self } } # [ doc = "Bit 8 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso8 ( & mut self ) -> PTSO8_W { PTSO8_W { w : self } } # [ doc = "Bit 9 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso9 ( & mut self ) -> PTSO9_W { PTSO9_W { w : self } } # [ doc = "Bit 10 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso10 ( & mut self ) -> PTSO10_W { PTSO10_W { w : self } } # [ doc = "Bit 11 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso11 ( & mut self ) -> PTSO11_W { PTSO11_W { w : self } } # [ doc = "Bit 12 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso12 ( & mut self ) -> PTSO12_W { PTSO12_W { w : self } } # [ doc = "Bit 13 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso13 ( & mut self ) -> PTSO13_W { PTSO13_W { w : self } } # [ doc = "Bit 14 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso14 ( & mut self ) -> PTSO14_W { PTSO14_W { w : self } } # [ doc = "Bit 15 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso15 ( & mut self ) -> PTSO15_W { PTSO15_W { w : self } } # [ doc = "Bit 16 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso16 ( & mut self ) -> PTSO16_W { PTSO16_W { w : self } } # [ doc = "Bit 17 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso17 ( & mut self ) -> PTSO17_W { PTSO17_W { w : self } } # [ doc = "Bit 18 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso18 ( & mut self ) -> PTSO18_W { PTSO18_W { w : self } } # [ doc = "Bit 19 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso19 ( & mut self ) -> PTSO19_W { PTSO19_W { w : self } } # [ doc = "Bit 20 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso20 ( & mut self ) -> PTSO20_W { PTSO20_W { w : self } } # [ doc = "Bit 21 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso21 ( & mut self ) -> PTSO21_W { PTSO21_W { w : self } } # [ doc = "Bit 22 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso22 ( & mut self ) -> PTSO22_W { PTSO22_W { w : self } } # [ doc = "Bit 23 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso23 ( & mut self ) -> PTSO23_W { PTSO23_W { w : self } } # [ doc = "Bit 24 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso24 ( & mut self ) -> PTSO24_W { PTSO24_W { w : self } } # [ doc = "Bit 25 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso25 ( & mut self ) -> PTSO25_W { PTSO25_W { w : self } } # [ doc = "Bit 26 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso26 ( & mut self ) -> PTSO26_W { PTSO26_W { w : self } } # [ doc = "Bit 27 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso27 ( & mut self ) -> PTSO27_W { PTSO27_W { w : self } } # [ doc = "Bit 28 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso28 ( & mut self ) -> PTSO28_W { PTSO28_W { w : self } } # [ doc = "Bit 29 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso29 ( & mut self ) -> PTSO29_W { PTSO29_W { w : self } } # [ doc = "Bit 30 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso30 ( & mut self ) -> PTSO30_W { PTSO30_W { w : self } } # [ doc = "Bit 31 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso31 ( & mut self ) -> PTSO31_W { PTSO31_W { w : self } } } } # [ doc = "Port Clear Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcor](pcor) module" ] pub type PCOR = crate :: Reg < u32 , _PCOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCOR ; # [ doc = "`write(|w| ..)` method takes [pcor::W](pcor::W) writer structure" ] impl crate :: Writable for PCOR { } # [ doc = "Port Clear Output Register" ] pub mod pcor { # [ doc = "Writer for register PCOR" ] pub type W = crate :: W < u32 , super :: PCOR > ; # [ doc = "Register PCOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO0_AW ) -> Self { match variant { PTCO0_AW :: _0 => false , PTCO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO0`" ] pub struct PTCO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO1_AW ) -> Self { match variant { PTCO1_AW :: _0 => false , PTCO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO1`" ] pub struct PTCO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO2_AW ) -> Self { match variant { PTCO2_AW :: _0 => false , PTCO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO2`" ] pub struct PTCO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO3_AW ) -> Self { match variant { PTCO3_AW :: _0 => false , PTCO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO3`" ] pub struct PTCO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO4_AW ) -> Self { match variant { PTCO4_AW :: _0 => false , PTCO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO4`" ] pub struct PTCO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO5_AW ) -> Self { match variant { PTCO5_AW :: _0 => false , PTCO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO5`" ] pub struct PTCO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO6_AW ) -> Self { match variant { PTCO6_AW :: _0 => false , PTCO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO6`" ] pub struct PTCO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO7_AW ) -> Self { match variant { PTCO7_AW :: _0 => false , PTCO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO7`" ] pub struct PTCO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO8_AW ) -> Self { match variant { PTCO8_AW :: _0 => false , PTCO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO8`" ] pub struct PTCO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO9_AW ) -> Self { match variant { PTCO9_AW :: _0 => false , PTCO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO9`" ] pub struct PTCO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO10_AW ) -> Self { match variant { PTCO10_AW :: _0 => false , PTCO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO10`" ] pub struct PTCO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO11_AW ) -> Self { match variant { PTCO11_AW :: _0 => false , PTCO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO11`" ] pub struct PTCO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO12_AW ) -> Self { match variant { PTCO12_AW :: _0 => false , PTCO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO12`" ] pub struct PTCO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO13_AW ) -> Self { match variant { PTCO13_AW :: _0 => false , PTCO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO13`" ] pub struct PTCO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO14_AW ) -> Self { match variant { PTCO14_AW :: _0 => false , PTCO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO14`" ] pub struct PTCO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO15_AW ) -> Self { match variant { PTCO15_AW :: _0 => false , PTCO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO15`" ] pub struct PTCO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO16_AW ) -> Self { match variant { PTCO16_AW :: _0 => false , PTCO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO16`" ] pub struct PTCO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO17_AW ) -> Self { match variant { PTCO17_AW :: _0 => false , PTCO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO17`" ] pub struct PTCO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO18_AW ) -> Self { match variant { PTCO18_AW :: _0 => false , PTCO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO18`" ] pub struct PTCO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO19_AW ) -> Self { match variant { PTCO19_AW :: _0 => false , PTCO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO19`" ] pub struct PTCO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO20_AW ) -> Self { match variant { PTCO20_AW :: _0 => false , PTCO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO20`" ] pub struct PTCO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO21_AW ) -> Self { match variant { PTCO21_AW :: _0 => false , PTCO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO21`" ] pub struct PTCO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO22_AW ) -> Self { match variant { PTCO22_AW :: _0 => false , PTCO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO22`" ] pub struct PTCO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO23_AW ) -> Self { match variant { PTCO23_AW :: _0 => false , PTCO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO23`" ] pub struct PTCO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO24_AW ) -> Self { match variant { PTCO24_AW :: _0 => false , PTCO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO24`" ] pub struct PTCO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO25_AW ) -> Self { match variant { PTCO25_AW :: _0 => false , PTCO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO25`" ] pub struct PTCO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO26_AW ) -> Self { match variant { PTCO26_AW :: _0 => false , PTCO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO26`" ] pub struct PTCO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO27_AW ) -> Self { match variant { PTCO27_AW :: _0 => false , PTCO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO27`" ] pub struct PTCO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO28_AW ) -> Self { match variant { PTCO28_AW :: _0 => false , PTCO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO28`" ] pub struct PTCO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO29_AW ) -> Self { match variant { PTCO29_AW :: _0 => false , PTCO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO29`" ] pub struct PTCO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO30_AW ) -> Self { match variant { PTCO30_AW :: _0 => false , PTCO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO30`" ] pub struct PTCO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO31_AW ) -> Self { match variant { PTCO31_AW :: _0 => false , PTCO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO31`" ] pub struct PTCO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco0 ( & mut self ) -> PTCO0_W { PTCO0_W { w : self } } # [ doc = "Bit 1 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco1 ( & mut self ) -> PTCO1_W { PTCO1_W { w : self } } # [ doc = "Bit 2 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco2 ( & mut self ) -> PTCO2_W { PTCO2_W { w : self } } # [ doc = "Bit 3 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco3 ( & mut self ) -> PTCO3_W { PTCO3_W { w : self } } # [ doc = "Bit 4 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco4 ( & mut self ) -> PTCO4_W { PTCO4_W { w : self } } # [ doc = "Bit 5 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco5 ( & mut self ) -> PTCO5_W { PTCO5_W { w : self } } # [ doc = "Bit 6 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco6 ( & mut self ) -> PTCO6_W { PTCO6_W { w : self } } # [ doc = "Bit 7 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco7 ( & mut self ) -> PTCO7_W { PTCO7_W { w : self } } # [ doc = "Bit 8 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco8 ( & mut self ) -> PTCO8_W { PTCO8_W { w : self } } # [ doc = "Bit 9 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco9 ( & mut self ) -> PTCO9_W { PTCO9_W { w : self } } # [ doc = "Bit 10 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco10 ( & mut self ) -> PTCO10_W { PTCO10_W { w : self } } # [ doc = "Bit 11 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco11 ( & mut self ) -> PTCO11_W { PTCO11_W { w : self } } # [ doc = "Bit 12 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco12 ( & mut self ) -> PTCO12_W { PTCO12_W { w : self } } # [ doc = "Bit 13 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco13 ( & mut self ) -> PTCO13_W { PTCO13_W { w : self } } # [ doc = "Bit 14 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco14 ( & mut self ) -> PTCO14_W { PTCO14_W { w : self } } # [ doc = "Bit 15 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco15 ( & mut self ) -> PTCO15_W { PTCO15_W { w : self } } # [ doc = "Bit 16 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco16 ( & mut self ) -> PTCO16_W { PTCO16_W { w : self } } # [ doc = "Bit 17 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco17 ( & mut self ) -> PTCO17_W { PTCO17_W { w : self } } # [ doc = "Bit 18 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco18 ( & mut self ) -> PTCO18_W { PTCO18_W { w : self } } # [ doc = "Bit 19 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco19 ( & mut self ) -> PTCO19_W { PTCO19_W { w : self } } # [ doc = "Bit 20 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco20 ( & mut self ) -> PTCO20_W { PTCO20_W { w : self } } # [ doc = "Bit 21 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco21 ( & mut self ) -> PTCO21_W { PTCO21_W { w : self } } # [ doc = "Bit 22 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco22 ( & mut self ) -> PTCO22_W { PTCO22_W { w : self } } # [ doc = "Bit 23 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco23 ( & mut self ) -> PTCO23_W { PTCO23_W { w : self } } # [ doc = "Bit 24 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco24 ( & mut self ) -> PTCO24_W { PTCO24_W { w : self } } # [ doc = "Bit 25 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco25 ( & mut self ) -> PTCO25_W { PTCO25_W { w : self } } # [ doc = "Bit 26 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco26 ( & mut self ) -> PTCO26_W { PTCO26_W { w : self } } # [ doc = "Bit 27 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco27 ( & mut self ) -> PTCO27_W { PTCO27_W { w : self } } # [ doc = "Bit 28 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco28 ( & mut self ) -> PTCO28_W { PTCO28_W { w : self } } # [ doc = "Bit 29 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco29 ( & mut self ) -> PTCO29_W { PTCO29_W { w : self } } # [ doc = "Bit 30 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco30 ( & mut self ) -> PTCO30_W { PTCO30_W { w : self } } # [ doc = "Bit 31 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco31 ( & mut self ) -> PTCO31_W { PTCO31_W { w : self } } } } # [ doc = "Port Toggle Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ptor](ptor) module" ] pub type PTOR = crate :: Reg < u32 , _PTOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PTOR ; # [ doc = "`write(|w| ..)` method takes [ptor::W](ptor::W) writer structure" ] impl crate :: Writable for PTOR { } # [ doc = "Port Toggle Output Register" ] pub mod ptor { # [ doc = "Writer for register PTOR" ] pub type W = crate :: W < u32 , super :: PTOR > ; # [ doc = "Register PTOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PTOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO0_AW ) -> Self { match variant { PTTO0_AW :: _0 => false , PTTO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO0`" ] pub struct PTTO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO1_AW ) -> Self { match variant { PTTO1_AW :: _0 => false , PTTO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO1`" ] pub struct PTTO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO2_AW ) -> Self { match variant { PTTO2_AW :: _0 => false , PTTO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO2`" ] pub struct PTTO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO3_AW ) -> Self { match variant { PTTO3_AW :: _0 => false , PTTO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO3`" ] pub struct PTTO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO4_AW ) -> Self { match variant { PTTO4_AW :: _0 => false , PTTO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO4`" ] pub struct PTTO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO5_AW ) -> Self { match variant { PTTO5_AW :: _0 => false , PTTO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO5`" ] pub struct PTTO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO6_AW ) -> Self { match variant { PTTO6_AW :: _0 => false , PTTO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO6`" ] pub struct PTTO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO7_AW ) -> Self { match variant { PTTO7_AW :: _0 => false , PTTO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO7`" ] pub struct PTTO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO8_AW ) -> Self { match variant { PTTO8_AW :: _0 => false , PTTO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO8`" ] pub struct PTTO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO9_AW ) -> Self { match variant { PTTO9_AW :: _0 => false , PTTO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO9`" ] pub struct PTTO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO10_AW ) -> Self { match variant { PTTO10_AW :: _0 => false , PTTO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO10`" ] pub struct PTTO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO11_AW ) -> Self { match variant { PTTO11_AW :: _0 => false , PTTO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO11`" ] pub struct PTTO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO12_AW ) -> Self { match variant { PTTO12_AW :: _0 => false , PTTO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO12`" ] pub struct PTTO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO13_AW ) -> Self { match variant { PTTO13_AW :: _0 => false , PTTO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO13`" ] pub struct PTTO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO14_AW ) -> Self { match variant { PTTO14_AW :: _0 => false , PTTO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO14`" ] pub struct PTTO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO15_AW ) -> Self { match variant { PTTO15_AW :: _0 => false , PTTO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO15`" ] pub struct PTTO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO16_AW ) -> Self { match variant { PTTO16_AW :: _0 => false , PTTO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO16`" ] pub struct PTTO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO17_AW ) -> Self { match variant { PTTO17_AW :: _0 => false , PTTO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO17`" ] pub struct PTTO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO18_AW ) -> Self { match variant { PTTO18_AW :: _0 => false , PTTO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO18`" ] pub struct PTTO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO19_AW ) -> Self { match variant { PTTO19_AW :: _0 => false , PTTO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO19`" ] pub struct PTTO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO20_AW ) -> Self { match variant { PTTO20_AW :: _0 => false , PTTO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO20`" ] pub struct PTTO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO21_AW ) -> Self { match variant { PTTO21_AW :: _0 => false , PTTO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO21`" ] pub struct PTTO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO22_AW ) -> Self { match variant { PTTO22_AW :: _0 => false , PTTO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO22`" ] pub struct PTTO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO23_AW ) -> Self { match variant { PTTO23_AW :: _0 => false , PTTO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO23`" ] pub struct PTTO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO24_AW ) -> Self { match variant { PTTO24_AW :: _0 => false , PTTO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO24`" ] pub struct PTTO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO25_AW ) -> Self { match variant { PTTO25_AW :: _0 => false , PTTO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO25`" ] pub struct PTTO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO26_AW ) -> Self { match variant { PTTO26_AW :: _0 => false , PTTO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO26`" ] pub struct PTTO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO27_AW ) -> Self { match variant { PTTO27_AW :: _0 => false , PTTO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO27`" ] pub struct PTTO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO28_AW ) -> Self { match variant { PTTO28_AW :: _0 => false , PTTO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO28`" ] pub struct PTTO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO29_AW ) -> Self { match variant { PTTO29_AW :: _0 => false , PTTO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO29`" ] pub struct PTTO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO30_AW ) -> Self { match variant { PTTO30_AW :: _0 => false , PTTO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO30`" ] pub struct PTTO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO31_AW ) -> Self { match variant { PTTO31_AW :: _0 => false , PTTO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO31`" ] pub struct PTTO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto0 ( & mut self ) -> PTTO0_W { PTTO0_W { w : self } } # [ doc = "Bit 1 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto1 ( & mut self ) -> PTTO1_W { PTTO1_W { w : self } } # [ doc = "Bit 2 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto2 ( & mut self ) -> PTTO2_W { PTTO2_W { w : self } } # [ doc = "Bit 3 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto3 ( & mut self ) -> PTTO3_W { PTTO3_W { w : self } } # [ doc = "Bit 4 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto4 ( & mut self ) -> PTTO4_W { PTTO4_W { w : self } } # [ doc = "Bit 5 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto5 ( & mut self ) -> PTTO5_W { PTTO5_W { w : self } } # [ doc = "Bit 6 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto6 ( & mut self ) -> PTTO6_W { PTTO6_W { w : self } } # [ doc = "Bit 7 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto7 ( & mut self ) -> PTTO7_W { PTTO7_W { w : self } } # [ doc = "Bit 8 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto8 ( & mut self ) -> PTTO8_W { PTTO8_W { w : self } } # [ doc = "Bit 9 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto9 ( & mut self ) -> PTTO9_W { PTTO9_W { w : self } } # [ doc = "Bit 10 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto10 ( & mut self ) -> PTTO10_W { PTTO10_W { w : self } } # [ doc = "Bit 11 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto11 ( & mut self ) -> PTTO11_W { PTTO11_W { w : self } } # [ doc = "Bit 12 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto12 ( & mut self ) -> PTTO12_W { PTTO12_W { w : self } } # [ doc = "Bit 13 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto13 ( & mut self ) -> PTTO13_W { PTTO13_W { w : self } } # [ doc = "Bit 14 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto14 ( & mut self ) -> PTTO14_W { PTTO14_W { w : self } } # [ doc = "Bit 15 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto15 ( & mut self ) -> PTTO15_W { PTTO15_W { w : self } } # [ doc = "Bit 16 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto16 ( & mut self ) -> PTTO16_W { PTTO16_W { w : self } } # [ doc = "Bit 17 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto17 ( & mut self ) -> PTTO17_W { PTTO17_W { w : self } } # [ doc = "Bit 18 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto18 ( & mut self ) -> PTTO18_W { PTTO18_W { w : self } } # [ doc = "Bit 19 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto19 ( & mut self ) -> PTTO19_W { PTTO19_W { w : self } } # [ doc = "Bit 20 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto20 ( & mut self ) -> PTTO20_W { PTTO20_W { w : self } } # [ doc = "Bit 21 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto21 ( & mut self ) -> PTTO21_W { PTTO21_W { w : self } } # [ doc = "Bit 22 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto22 ( & mut self ) -> PTTO22_W { PTTO22_W { w : self } } # [ doc = "Bit 23 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto23 ( & mut self ) -> PTTO23_W { PTTO23_W { w : self } } # [ doc = "Bit 24 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto24 ( & mut self ) -> PTTO24_W { PTTO24_W { w : self } } # [ doc = "Bit 25 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto25 ( & mut self ) -> PTTO25_W { PTTO25_W { w : self } } # [ doc = "Bit 26 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto26 ( & mut self ) -> PTTO26_W { PTTO26_W { w : self } } # [ doc = "Bit 27 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto27 ( & mut self ) -> PTTO27_W { PTTO27_W { w : self } } # [ doc = "Bit 28 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto28 ( & mut self ) -> PTTO28_W { PTTO28_W { w : self } } # [ doc = "Bit 29 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto29 ( & mut self ) -> PTTO29_W { PTTO29_W { w : self } } # [ doc = "Bit 30 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto30 ( & mut self ) -> PTTO30_W { PTTO30_W { w : self } } # [ doc = "Bit 31 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto31 ( & mut self ) -> PTTO31_W { PTTO31_W { w : self } } } } # [ doc = "Port Data Input Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdir](pdir) module" ] pub type PDIR = crate :: Reg < u32 , _PDIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDIR ; # [ doc = "`read()` method returns [pdir::R](pdir::R) reader structure" ] impl crate :: Readable for PDIR { } # [ doc = "Port Data Input Register" ] pub mod pdir { # [ doc = "Reader of register PDIR" ] pub type R = crate :: R < u32 , super :: PDIR > ; # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI0_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI0_A ) -> Self { match variant { PDI0_A :: _0 => false , PDI0_A :: _1 => true } } } # [ doc = "Reader of field `PDI0`" ] pub type PDI0_R = crate :: R < bool , PDI0_A > ; impl PDI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI0_A { match self . bits { false => PDI0_A :: _0 , true => PDI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI0_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI1_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI1_A ) -> Self { match variant { PDI1_A :: _0 => false , PDI1_A :: _1 => true } } } # [ doc = "Reader of field `PDI1`" ] pub type PDI1_R = crate :: R < bool , PDI1_A > ; impl PDI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI1_A { match self . bits { false => PDI1_A :: _0 , true => PDI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI1_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI2_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI2_A ) -> Self { match variant { PDI2_A :: _0 => false , PDI2_A :: _1 => true } } } # [ doc = "Reader of field `PDI2`" ] pub type PDI2_R = crate :: R < bool , PDI2_A > ; impl PDI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI2_A { match self . bits { false => PDI2_A :: _0 , true => PDI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI2_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI3_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI3_A ) -> Self { match variant { PDI3_A :: _0 => false , PDI3_A :: _1 => true } } } # [ doc = "Reader of field `PDI3`" ] pub type PDI3_R = crate :: R < bool , PDI3_A > ; impl PDI3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI3_A { match self . bits { false => PDI3_A :: _0 , true => PDI3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI3_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI4_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI4_A ) -> Self { match variant { PDI4_A :: _0 => false , PDI4_A :: _1 => true } } } # [ doc = "Reader of field `PDI4`" ] pub type PDI4_R = crate :: R < bool , PDI4_A > ; impl PDI4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI4_A { match self . bits { false => PDI4_A :: _0 , true => PDI4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI4_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI5_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI5_A ) -> Self { match variant { PDI5_A :: _0 => false , PDI5_A :: _1 => true } } } # [ doc = "Reader of field `PDI5`" ] pub type PDI5_R = crate :: R < bool , PDI5_A > ; impl PDI5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI5_A { match self . bits { false => PDI5_A :: _0 , true => PDI5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI5_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI6_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI6_A ) -> Self { match variant { PDI6_A :: _0 => false , PDI6_A :: _1 => true } } } # [ doc = "Reader of field `PDI6`" ] pub type PDI6_R = crate :: R < bool , PDI6_A > ; impl PDI6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI6_A { match self . bits { false => PDI6_A :: _0 , true => PDI6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI6_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI7_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI7_A ) -> Self { match variant { PDI7_A :: _0 => false , PDI7_A :: _1 => true } } } # [ doc = "Reader of field `PDI7`" ] pub type PDI7_R = crate :: R < bool , PDI7_A > ; impl PDI7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI7_A { match self . bits { false => PDI7_A :: _0 , true => PDI7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI7_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI8_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI8_A ) -> Self { match variant { PDI8_A :: _0 => false , PDI8_A :: _1 => true } } } # [ doc = "Reader of field `PDI8`" ] pub type PDI8_R = crate :: R < bool , PDI8_A > ; impl PDI8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI8_A { match self . bits { false => PDI8_A :: _0 , true => PDI8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI8_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI9_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI9_A ) -> Self { match variant { PDI9_A :: _0 => false , PDI9_A :: _1 => true } } } # [ doc = "Reader of field `PDI9`" ] pub type PDI9_R = crate :: R < bool , PDI9_A > ; impl PDI9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI9_A { match self . bits { false => PDI9_A :: _0 , true => PDI9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI9_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI10_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI10_A ) -> Self { match variant { PDI10_A :: _0 => false , PDI10_A :: _1 => true } } } # [ doc = "Reader of field `PDI10`" ] pub type PDI10_R = crate :: R < bool , PDI10_A > ; impl PDI10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI10_A { match self . bits { false => PDI10_A :: _0 , true => PDI10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI10_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI11_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI11_A ) -> Self { match variant { PDI11_A :: _0 => false , PDI11_A :: _1 => true } } } # [ doc = "Reader of field `PDI11`" ] pub type PDI11_R = crate :: R < bool , PDI11_A > ; impl PDI11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI11_A { match self . bits { false => PDI11_A :: _0 , true => PDI11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI11_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI12_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI12_A ) -> Self { match variant { PDI12_A :: _0 => false , PDI12_A :: _1 => true } } } # [ doc = "Reader of field `PDI12`" ] pub type PDI12_R = crate :: R < bool , PDI12_A > ; impl PDI12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI12_A { match self . bits { false => PDI12_A :: _0 , true => PDI12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI12_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI13_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI13_A ) -> Self { match variant { PDI13_A :: _0 => false , PDI13_A :: _1 => true } } } # [ doc = "Reader of field `PDI13`" ] pub type PDI13_R = crate :: R < bool , PDI13_A > ; impl PDI13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI13_A { match self . bits { false => PDI13_A :: _0 , true => PDI13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI13_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI14_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI14_A ) -> Self { match variant { PDI14_A :: _0 => false , PDI14_A :: _1 => true } } } # [ doc = "Reader of field `PDI14`" ] pub type PDI14_R = crate :: R < bool , PDI14_A > ; impl PDI14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI14_A { match self . bits { false => PDI14_A :: _0 , true => PDI14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI14_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI15_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI15_A ) -> Self { match variant { PDI15_A :: _0 => false , PDI15_A :: _1 => true } } } # [ doc = "Reader of field `PDI15`" ] pub type PDI15_R = crate :: R < bool , PDI15_A > ; impl PDI15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI15_A { match self . bits { false => PDI15_A :: _0 , true => PDI15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI15_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI16_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI16_A ) -> Self { match variant { PDI16_A :: _0 => false , PDI16_A :: _1 => true } } } # [ doc = "Reader of field `PDI16`" ] pub type PDI16_R = crate :: R < bool , PDI16_A > ; impl PDI16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI16_A { match self . bits { false => PDI16_A :: _0 , true => PDI16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI16_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI17_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI17_A ) -> Self { match variant { PDI17_A :: _0 => false , PDI17_A :: _1 => true } } } # [ doc = "Reader of field `PDI17`" ] pub type PDI17_R = crate :: R < bool , PDI17_A > ; impl PDI17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI17_A { match self . bits { false => PDI17_A :: _0 , true => PDI17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI17_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI18_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI18_A ) -> Self { match variant { PDI18_A :: _0 => false , PDI18_A :: _1 => true } } } # [ doc = "Reader of field `PDI18`" ] pub type PDI18_R = crate :: R < bool , PDI18_A > ; impl PDI18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI18_A { match self . bits { false => PDI18_A :: _0 , true => PDI18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI18_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI19_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI19_A ) -> Self { match variant { PDI19_A :: _0 => false , PDI19_A :: _1 => true } } } # [ doc = "Reader of field `PDI19`" ] pub type PDI19_R = crate :: R < bool , PDI19_A > ; impl PDI19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI19_A { match self . bits { false => PDI19_A :: _0 , true => PDI19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI19_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI20_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI20_A ) -> Self { match variant { PDI20_A :: _0 => false , PDI20_A :: _1 => true } } } # [ doc = "Reader of field `PDI20`" ] pub type PDI20_R = crate :: R < bool , PDI20_A > ; impl PDI20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI20_A { match self . bits { false => PDI20_A :: _0 , true => PDI20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI20_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI21_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI21_A ) -> Self { match variant { PDI21_A :: _0 => false , PDI21_A :: _1 => true } } } # [ doc = "Reader of field `PDI21`" ] pub type PDI21_R = crate :: R < bool , PDI21_A > ; impl PDI21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI21_A { match self . bits { false => PDI21_A :: _0 , true => PDI21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI21_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI22_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI22_A ) -> Self { match variant { PDI22_A :: _0 => false , PDI22_A :: _1 => true } } } # [ doc = "Reader of field `PDI22`" ] pub type PDI22_R = crate :: R < bool , PDI22_A > ; impl PDI22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI22_A { match self . bits { false => PDI22_A :: _0 , true => PDI22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI22_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI23_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI23_A ) -> Self { match variant { PDI23_A :: _0 => false , PDI23_A :: _1 => true } } } # [ doc = "Reader of field `PDI23`" ] pub type PDI23_R = crate :: R < bool , PDI23_A > ; impl PDI23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI23_A { match self . bits { false => PDI23_A :: _0 , true => PDI23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI23_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI24_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI24_A ) -> Self { match variant { PDI24_A :: _0 => false , PDI24_A :: _1 => true } } } # [ doc = "Reader of field `PDI24`" ] pub type PDI24_R = crate :: R < bool , PDI24_A > ; impl PDI24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI24_A { match self . bits { false => PDI24_A :: _0 , true => PDI24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI24_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI25_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI25_A ) -> Self { match variant { PDI25_A :: _0 => false , PDI25_A :: _1 => true } } } # [ doc = "Reader of field `PDI25`" ] pub type PDI25_R = crate :: R < bool , PDI25_A > ; impl PDI25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI25_A { match self . bits { false => PDI25_A :: _0 , true => PDI25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI25_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI26_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI26_A ) -> Self { match variant { PDI26_A :: _0 => false , PDI26_A :: _1 => true } } } # [ doc = "Reader of field `PDI26`" ] pub type PDI26_R = crate :: R < bool , PDI26_A > ; impl PDI26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI26_A { match self . bits { false => PDI26_A :: _0 , true => PDI26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI26_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI27_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI27_A ) -> Self { match variant { PDI27_A :: _0 => false , PDI27_A :: _1 => true } } } # [ doc = "Reader of field `PDI27`" ] pub type PDI27_R = crate :: R < bool , PDI27_A > ; impl PDI27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI27_A { match self . bits { false => PDI27_A :: _0 , true => PDI27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI27_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI28_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI28_A ) -> Self { match variant { PDI28_A :: _0 => false , PDI28_A :: _1 => true } } } # [ doc = "Reader of field `PDI28`" ] pub type PDI28_R = crate :: R < bool , PDI28_A > ; impl PDI28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI28_A { match self . bits { false => PDI28_A :: _0 , true => PDI28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI28_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI29_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI29_A ) -> Self { match variant { PDI29_A :: _0 => false , PDI29_A :: _1 => true } } } # [ doc = "Reader of field `PDI29`" ] pub type PDI29_R = crate :: R < bool , PDI29_A > ; impl PDI29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI29_A { match self . bits { false => PDI29_A :: _0 , true => PDI29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI29_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI30_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI30_A ) -> Self { match variant { PDI30_A :: _0 => false , PDI30_A :: _1 => true } } } # [ doc = "Reader of field `PDI30`" ] pub type PDI30_R = crate :: R < bool , PDI30_A > ; impl PDI30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI30_A { match self . bits { false => PDI30_A :: _0 , true => PDI30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI30_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI31_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI31_A ) -> Self { match variant { PDI31_A :: _0 => false , PDI31_A :: _1 => true } } } # [ doc = "Reader of field `PDI31`" ] pub type PDI31_R = crate :: R < bool , PDI31_A > ; impl PDI31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI31_A { match self . bits { false => PDI31_A :: _0 , true => PDI31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI31_A :: _1 } } impl R { # [ doc = "Bit 0 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi0 ( & self ) -> PDI0_R { PDI0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi1 ( & self ) -> PDI1_R { PDI1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi2 ( & self ) -> PDI2_R { PDI2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi3 ( & self ) -> PDI3_R { PDI3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi4 ( & self ) -> PDI4_R { PDI4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi5 ( & self ) -> PDI5_R { PDI5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi6 ( & self ) -> PDI6_R { PDI6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi7 ( & self ) -> PDI7_R { PDI7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi8 ( & self ) -> PDI8_R { PDI8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi9 ( & self ) -> PDI9_R { PDI9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi10 ( & self ) -> PDI10_R { PDI10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi11 ( & self ) -> PDI11_R { PDI11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi12 ( & self ) -> PDI12_R { PDI12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi13 ( & self ) -> PDI13_R { PDI13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi14 ( & self ) -> PDI14_R { PDI14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi15 ( & self ) -> PDI15_R { PDI15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi16 ( & self ) -> PDI16_R { PDI16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi17 ( & self ) -> PDI17_R { PDI17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi18 ( & self ) -> PDI18_R { PDI18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi19 ( & self ) -> PDI19_R { PDI19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi20 ( & self ) -> PDI20_R { PDI20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi21 ( & self ) -> PDI21_R { PDI21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi22 ( & self ) -> PDI22_R { PDI22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi23 ( & self ) -> PDI23_R { PDI23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi24 ( & self ) -> PDI24_R { PDI24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi25 ( & self ) -> PDI25_R { PDI25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi26 ( & self ) -> PDI26_R { PDI26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi27 ( & self ) -> PDI27_R { PDI27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi28 ( & self ) -> PDI28_R { PDI28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi29 ( & self ) -> PDI29_R { PDI29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi30 ( & self ) -> PDI30_R { PDI30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi31 ( & self ) -> PDI31_R { PDI31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Port Data Direction Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pddr](pddr) module" ] pub type PDDR = crate :: Reg < u32 , _PDDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDDR ; # [ doc = "`read()` method returns [pddr::R](pddr::R) reader structure" ] impl crate :: Readable for PDDR { } # [ doc = "`write(|w| ..)` method takes [pddr::W](pddr::W) writer structure" ] impl crate :: Writable for PDDR { } # [ doc = "Port Data Direction Register" ] pub mod pddr { # [ doc = "Reader of register PDDR" ] pub type R = crate :: R < u32 , super :: PDDR > ; # [ doc = "Writer for register PDDR" ] pub type W = crate :: W < u32 , super :: PDDR > ; # [ doc = "Register PDDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD0_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD0_A ) -> Self { match variant { PDD0_A :: _0 => false , PDD0_A :: _1 => true } } } # [ doc = "Reader of field `PDD0`" ] pub type PDD0_R = crate :: R < bool , PDD0_A > ; impl PDD0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD0_A { match self . bits { false => PDD0_A :: _0 , true => PDD0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD0_A :: _1 } } # [ doc = "Write proxy for field `PDD0`" ] pub struct PDD0_W < 'a > { w : & 'a mut W , } impl < 'a > PDD0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD1_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD1_A ) -> Self { match variant { PDD1_A :: _0 => false , PDD1_A :: _1 => true } } } # [ doc = "Reader of field `PDD1`" ] pub type PDD1_R = crate :: R < bool , PDD1_A > ; impl PDD1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD1_A { match self . bits { false => PDD1_A :: _0 , true => PDD1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD1_A :: _1 } } # [ doc = "Write proxy for field `PDD1`" ] pub struct PDD1_W < 'a > { w : & 'a mut W , } impl < 'a > PDD1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD2_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD2_A ) -> Self { match variant { PDD2_A :: _0 => false , PDD2_A :: _1 => true } } } # [ doc = "Reader of field `PDD2`" ] pub type PDD2_R = crate :: R < bool , PDD2_A > ; impl PDD2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD2_A { match self . bits { false => PDD2_A :: _0 , true => PDD2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD2_A :: _1 } } # [ doc = "Write proxy for field `PDD2`" ] pub struct PDD2_W < 'a > { w : & 'a mut W , } impl < 'a > PDD2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD3_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD3_A ) -> Self { match variant { PDD3_A :: _0 => false , PDD3_A :: _1 => true } } } # [ doc = "Reader of field `PDD3`" ] pub type PDD3_R = crate :: R < bool , PDD3_A > ; impl PDD3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD3_A { match self . bits { false => PDD3_A :: _0 , true => PDD3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD3_A :: _1 } } # [ doc = "Write proxy for field `PDD3`" ] pub struct PDD3_W < 'a > { w : & 'a mut W , } impl < 'a > PDD3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD4_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD4_A ) -> Self { match variant { PDD4_A :: _0 => false , PDD4_A :: _1 => true } } } # [ doc = "Reader of field `PDD4`" ] pub type PDD4_R = crate :: R < bool , PDD4_A > ; impl PDD4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD4_A { match self . bits { false => PDD4_A :: _0 , true => PDD4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD4_A :: _1 } } # [ doc = "Write proxy for field `PDD4`" ] pub struct PDD4_W < 'a > { w : & 'a mut W , } impl < 'a > PDD4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD5_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD5_A ) -> Self { match variant { PDD5_A :: _0 => false , PDD5_A :: _1 => true } } } # [ doc = "Reader of field `PDD5`" ] pub type PDD5_R = crate :: R < bool , PDD5_A > ; impl PDD5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD5_A { match self . bits { false => PDD5_A :: _0 , true => PDD5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD5_A :: _1 } } # [ doc = "Write proxy for field `PDD5`" ] pub struct PDD5_W < 'a > { w : & 'a mut W , } impl < 'a > PDD5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD6_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD6_A ) -> Self { match variant { PDD6_A :: _0 => false , PDD6_A :: _1 => true } } } # [ doc = "Reader of field `PDD6`" ] pub type PDD6_R = crate :: R < bool , PDD6_A > ; impl PDD6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD6_A { match self . bits { false => PDD6_A :: _0 , true => PDD6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD6_A :: _1 } } # [ doc = "Write proxy for field `PDD6`" ] pub struct PDD6_W < 'a > { w : & 'a mut W , } impl < 'a > PDD6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD7_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD7_A ) -> Self { match variant { PDD7_A :: _0 => false , PDD7_A :: _1 => true } } } # [ doc = "Reader of field `PDD7`" ] pub type PDD7_R = crate :: R < bool , PDD7_A > ; impl PDD7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD7_A { match self . bits { false => PDD7_A :: _0 , true => PDD7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD7_A :: _1 } } # [ doc = "Write proxy for field `PDD7`" ] pub struct PDD7_W < 'a > { w : & 'a mut W , } impl < 'a > PDD7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD8_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD8_A ) -> Self { match variant { PDD8_A :: _0 => false , PDD8_A :: _1 => true } } } # [ doc = "Reader of field `PDD8`" ] pub type PDD8_R = crate :: R < bool , PDD8_A > ; impl PDD8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD8_A { match self . bits { false => PDD8_A :: _0 , true => PDD8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD8_A :: _1 } } # [ doc = "Write proxy for field `PDD8`" ] pub struct PDD8_W < 'a > { w : & 'a mut W , } impl < 'a > PDD8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD9_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD9_A ) -> Self { match variant { PDD9_A :: _0 => false , PDD9_A :: _1 => true } } } # [ doc = "Reader of field `PDD9`" ] pub type PDD9_R = crate :: R < bool , PDD9_A > ; impl PDD9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD9_A { match self . bits { false => PDD9_A :: _0 , true => PDD9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD9_A :: _1 } } # [ doc = "Write proxy for field `PDD9`" ] pub struct PDD9_W < 'a > { w : & 'a mut W , } impl < 'a > PDD9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD10_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD10_A ) -> Self { match variant { PDD10_A :: _0 => false , PDD10_A :: _1 => true } } } # [ doc = "Reader of field `PDD10`" ] pub type PDD10_R = crate :: R < bool , PDD10_A > ; impl PDD10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD10_A { match self . bits { false => PDD10_A :: _0 , true => PDD10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD10_A :: _1 } } # [ doc = "Write proxy for field `PDD10`" ] pub struct PDD10_W < 'a > { w : & 'a mut W , } impl < 'a > PDD10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD11_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD11_A ) -> Self { match variant { PDD11_A :: _0 => false , PDD11_A :: _1 => true } } } # [ doc = "Reader of field `PDD11`" ] pub type PDD11_R = crate :: R < bool , PDD11_A > ; impl PDD11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD11_A { match self . bits { false => PDD11_A :: _0 , true => PDD11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD11_A :: _1 } } # [ doc = "Write proxy for field `PDD11`" ] pub struct PDD11_W < 'a > { w : & 'a mut W , } impl < 'a > PDD11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD12_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD12_A ) -> Self { match variant { PDD12_A :: _0 => false , PDD12_A :: _1 => true } } } # [ doc = "Reader of field `PDD12`" ] pub type PDD12_R = crate :: R < bool , PDD12_A > ; impl PDD12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD12_A { match self . bits { false => PDD12_A :: _0 , true => PDD12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD12_A :: _1 } } # [ doc = "Write proxy for field `PDD12`" ] pub struct PDD12_W < 'a > { w : & 'a mut W , } impl < 'a > PDD12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD13_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD13_A ) -> Self { match variant { PDD13_A :: _0 => false , PDD13_A :: _1 => true } } } # [ doc = "Reader of field `PDD13`" ] pub type PDD13_R = crate :: R < bool , PDD13_A > ; impl PDD13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD13_A { match self . bits { false => PDD13_A :: _0 , true => PDD13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD13_A :: _1 } } # [ doc = "Write proxy for field `PDD13`" ] pub struct PDD13_W < 'a > { w : & 'a mut W , } impl < 'a > PDD13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD14_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD14_A ) -> Self { match variant { PDD14_A :: _0 => false , PDD14_A :: _1 => true } } } # [ doc = "Reader of field `PDD14`" ] pub type PDD14_R = crate :: R < bool , PDD14_A > ; impl PDD14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD14_A { match self . bits { false => PDD14_A :: _0 , true => PDD14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD14_A :: _1 } } # [ doc = "Write proxy for field `PDD14`" ] pub struct PDD14_W < 'a > { w : & 'a mut W , } impl < 'a > PDD14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD15_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD15_A ) -> Self { match variant { PDD15_A :: _0 => false , PDD15_A :: _1 => true } } } # [ doc = "Reader of field `PDD15`" ] pub type PDD15_R = crate :: R < bool , PDD15_A > ; impl PDD15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD15_A { match self . bits { false => PDD15_A :: _0 , true => PDD15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD15_A :: _1 } } # [ doc = "Write proxy for field `PDD15`" ] pub struct PDD15_W < 'a > { w : & 'a mut W , } impl < 'a > PDD15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD16_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD16_A ) -> Self { match variant { PDD16_A :: _0 => false , PDD16_A :: _1 => true } } } # [ doc = "Reader of field `PDD16`" ] pub type PDD16_R = crate :: R < bool , PDD16_A > ; impl PDD16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD16_A { match self . bits { false => PDD16_A :: _0 , true => PDD16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD16_A :: _1 } } # [ doc = "Write proxy for field `PDD16`" ] pub struct PDD16_W < 'a > { w : & 'a mut W , } impl < 'a > PDD16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD17_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD17_A ) -> Self { match variant { PDD17_A :: _0 => false , PDD17_A :: _1 => true } } } # [ doc = "Reader of field `PDD17`" ] pub type PDD17_R = crate :: R < bool , PDD17_A > ; impl PDD17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD17_A { match self . bits { false => PDD17_A :: _0 , true => PDD17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD17_A :: _1 } } # [ doc = "Write proxy for field `PDD17`" ] pub struct PDD17_W < 'a > { w : & 'a mut W , } impl < 'a > PDD17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD18_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD18_A ) -> Self { match variant { PDD18_A :: _0 => false , PDD18_A :: _1 => true } } } # [ doc = "Reader of field `PDD18`" ] pub type PDD18_R = crate :: R < bool , PDD18_A > ; impl PDD18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD18_A { match self . bits { false => PDD18_A :: _0 , true => PDD18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD18_A :: _1 } } # [ doc = "Write proxy for field `PDD18`" ] pub struct PDD18_W < 'a > { w : & 'a mut W , } impl < 'a > PDD18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD19_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD19_A ) -> Self { match variant { PDD19_A :: _0 => false , PDD19_A :: _1 => true } } } # [ doc = "Reader of field `PDD19`" ] pub type PDD19_R = crate :: R < bool , PDD19_A > ; impl PDD19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD19_A { match self . bits { false => PDD19_A :: _0 , true => PDD19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD19_A :: _1 } } # [ doc = "Write proxy for field `PDD19`" ] pub struct PDD19_W < 'a > { w : & 'a mut W , } impl < 'a > PDD19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD20_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD20_A ) -> Self { match variant { PDD20_A :: _0 => false , PDD20_A :: _1 => true } } } # [ doc = "Reader of field `PDD20`" ] pub type PDD20_R = crate :: R < bool , PDD20_A > ; impl PDD20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD20_A { match self . bits { false => PDD20_A :: _0 , true => PDD20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD20_A :: _1 } } # [ doc = "Write proxy for field `PDD20`" ] pub struct PDD20_W < 'a > { w : & 'a mut W , } impl < 'a > PDD20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD21_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD21_A ) -> Self { match variant { PDD21_A :: _0 => false , PDD21_A :: _1 => true } } } # [ doc = "Reader of field `PDD21`" ] pub type PDD21_R = crate :: R < bool , PDD21_A > ; impl PDD21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD21_A { match self . bits { false => PDD21_A :: _0 , true => PDD21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD21_A :: _1 } } # [ doc = "Write proxy for field `PDD21`" ] pub struct PDD21_W < 'a > { w : & 'a mut W , } impl < 'a > PDD21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD22_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD22_A ) -> Self { match variant { PDD22_A :: _0 => false , PDD22_A :: _1 => true } } } # [ doc = "Reader of field `PDD22`" ] pub type PDD22_R = crate :: R < bool , PDD22_A > ; impl PDD22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD22_A { match self . bits { false => PDD22_A :: _0 , true => PDD22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD22_A :: _1 } } # [ doc = "Write proxy for field `PDD22`" ] pub struct PDD22_W < 'a > { w : & 'a mut W , } impl < 'a > PDD22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD23_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD23_A ) -> Self { match variant { PDD23_A :: _0 => false , PDD23_A :: _1 => true } } } # [ doc = "Reader of field `PDD23`" ] pub type PDD23_R = crate :: R < bool , PDD23_A > ; impl PDD23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD23_A { match self . bits { false => PDD23_A :: _0 , true => PDD23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD23_A :: _1 } } # [ doc = "Write proxy for field `PDD23`" ] pub struct PDD23_W < 'a > { w : & 'a mut W , } impl < 'a > PDD23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD24_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD24_A ) -> Self { match variant { PDD24_A :: _0 => false , PDD24_A :: _1 => true } } } # [ doc = "Reader of field `PDD24`" ] pub type PDD24_R = crate :: R < bool , PDD24_A > ; impl PDD24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD24_A { match self . bits { false => PDD24_A :: _0 , true => PDD24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD24_A :: _1 } } # [ doc = "Write proxy for field `PDD24`" ] pub struct PDD24_W < 'a > { w : & 'a mut W , } impl < 'a > PDD24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD25_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD25_A ) -> Self { match variant { PDD25_A :: _0 => false , PDD25_A :: _1 => true } } } # [ doc = "Reader of field `PDD25`" ] pub type PDD25_R = crate :: R < bool , PDD25_A > ; impl PDD25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD25_A { match self . bits { false => PDD25_A :: _0 , true => PDD25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD25_A :: _1 } } # [ doc = "Write proxy for field `PDD25`" ] pub struct PDD25_W < 'a > { w : & 'a mut W , } impl < 'a > PDD25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD26_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD26_A ) -> Self { match variant { PDD26_A :: _0 => false , PDD26_A :: _1 => true } } } # [ doc = "Reader of field `PDD26`" ] pub type PDD26_R = crate :: R < bool , PDD26_A > ; impl PDD26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD26_A { match self . bits { false => PDD26_A :: _0 , true => PDD26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD26_A :: _1 } } # [ doc = "Write proxy for field `PDD26`" ] pub struct PDD26_W < 'a > { w : & 'a mut W , } impl < 'a > PDD26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD27_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD27_A ) -> Self { match variant { PDD27_A :: _0 => false , PDD27_A :: _1 => true } } } # [ doc = "Reader of field `PDD27`" ] pub type PDD27_R = crate :: R < bool , PDD27_A > ; impl PDD27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD27_A { match self . bits { false => PDD27_A :: _0 , true => PDD27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD27_A :: _1 } } # [ doc = "Write proxy for field `PDD27`" ] pub struct PDD27_W < 'a > { w : & 'a mut W , } impl < 'a > PDD27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD28_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD28_A ) -> Self { match variant { PDD28_A :: _0 => false , PDD28_A :: _1 => true } } } # [ doc = "Reader of field `PDD28`" ] pub type PDD28_R = crate :: R < bool , PDD28_A > ; impl PDD28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD28_A { match self . bits { false => PDD28_A :: _0 , true => PDD28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD28_A :: _1 } } # [ doc = "Write proxy for field `PDD28`" ] pub struct PDD28_W < 'a > { w : & 'a mut W , } impl < 'a > PDD28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD29_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD29_A ) -> Self { match variant { PDD29_A :: _0 => false , PDD29_A :: _1 => true } } } # [ doc = "Reader of field `PDD29`" ] pub type PDD29_R = crate :: R < bool , PDD29_A > ; impl PDD29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD29_A { match self . bits { false => PDD29_A :: _0 , true => PDD29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD29_A :: _1 } } # [ doc = "Write proxy for field `PDD29`" ] pub struct PDD29_W < 'a > { w : & 'a mut W , } impl < 'a > PDD29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD30_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD30_A ) -> Self { match variant { PDD30_A :: _0 => false , PDD30_A :: _1 => true } } } # [ doc = "Reader of field `PDD30`" ] pub type PDD30_R = crate :: R < bool , PDD30_A > ; impl PDD30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD30_A { match self . bits { false => PDD30_A :: _0 , true => PDD30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD30_A :: _1 } } # [ doc = "Write proxy for field `PDD30`" ] pub struct PDD30_W < 'a > { w : & 'a mut W , } impl < 'a > PDD30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD31_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD31_A ) -> Self { match variant { PDD31_A :: _0 => false , PDD31_A :: _1 => true } } } # [ doc = "Reader of field `PDD31`" ] pub type PDD31_R = crate :: R < bool , PDD31_A > ; impl PDD31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD31_A { match self . bits { false => PDD31_A :: _0 , true => PDD31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD31_A :: _1 } } # [ doc = "Write proxy for field `PDD31`" ] pub struct PDD31_W < 'a > { w : & 'a mut W , } impl < 'a > PDD31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & self ) -> PDD0_R { PDD0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & self ) -> PDD1_R { PDD1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & self ) -> PDD2_R { PDD2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & self ) -> PDD3_R { PDD3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & self ) -> PDD4_R { PDD4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & self ) -> PDD5_R { PDD5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & self ) -> PDD6_R { PDD6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & self ) -> PDD7_R { PDD7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & self ) -> PDD8_R { PDD8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & self ) -> PDD9_R { PDD9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & self ) -> PDD10_R { PDD10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & self ) -> PDD11_R { PDD11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & self ) -> PDD12_R { PDD12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & self ) -> PDD13_R { PDD13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & self ) -> PDD14_R { PDD14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & self ) -> PDD15_R { PDD15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & self ) -> PDD16_R { PDD16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & self ) -> PDD17_R { PDD17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & self ) -> PDD18_R { PDD18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & self ) -> PDD19_R { PDD19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & self ) -> PDD20_R { PDD20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & self ) -> PDD21_R { PDD21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & self ) -> PDD22_R { PDD22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & self ) -> PDD23_R { PDD23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & self ) -> PDD24_R { PDD24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & self ) -> PDD25_R { PDD25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & self ) -> PDD26_R { PDD26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & self ) -> PDD27_R { PDD27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & self ) -> PDD28_R { PDD28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & self ) -> PDD29_R { PDD29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & self ) -> PDD30_R { PDD30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & self ) -> PDD31_R { PDD31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & mut self ) -> PDD0_W { PDD0_W { w : self } } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & mut self ) -> PDD1_W { PDD1_W { w : self } } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & mut self ) -> PDD2_W { PDD2_W { w : self } } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & mut self ) -> PDD3_W { PDD3_W { w : self } } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & mut self ) -> PDD4_W { PDD4_W { w : self } } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & mut self ) -> PDD5_W { PDD5_W { w : self } } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & mut self ) -> PDD6_W { PDD6_W { w : self } } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & mut self ) -> PDD7_W { PDD7_W { w : self } } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & mut self ) -> PDD8_W { PDD8_W { w : self } } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & mut self ) -> PDD9_W { PDD9_W { w : self } } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & mut self ) -> PDD10_W { PDD10_W { w : self } } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & mut self ) -> PDD11_W { PDD11_W { w : self } } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & mut self ) -> PDD12_W { PDD12_W { w : self } } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & mut self ) -> PDD13_W { PDD13_W { w : self } } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & mut self ) -> PDD14_W { PDD14_W { w : self } } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & mut self ) -> PDD15_W { PDD15_W { w : self } } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & mut self ) -> PDD16_W { PDD16_W { w : self } } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & mut self ) -> PDD17_W { PDD17_W { w : self } } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & mut self ) -> PDD18_W { PDD18_W { w : self } } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & mut self ) -> PDD19_W { PDD19_W { w : self } } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & mut self ) -> PDD20_W { PDD20_W { w : self } } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & mut self ) -> PDD21_W { PDD21_W { w : self } } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & mut self ) -> PDD22_W { PDD22_W { w : self } } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & mut self ) -> PDD23_W { PDD23_W { w : self } } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & mut self ) -> PDD24_W { PDD24_W { w : self } } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & mut self ) -> PDD25_W { PDD25_W { w : self } } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & mut self ) -> PDD26_W { PDD26_W { w : self } } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & mut self ) -> PDD27_W { PDD27_W { w : self } } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & mut self ) -> PDD28_W { PDD28_W { w : self } } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & mut self ) -> PDD29_W { PDD29_W { w : self } } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & mut self ) -> PDD30_W { PDD30_W { w : self } } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & mut self ) -> PDD31_W { PDD31_W { w : self } } } } } # [ doc = "General Purpose Input/Output" ] pub struct GPIOD { _marker : PhantomData < * const ( ) > } unsafe impl Send for GPIOD { } impl GPIOD { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const gpiod :: RegisterBlock { 0x400f_f0c0 as * const _ } } impl Deref for GPIOD { type Target = gpiod :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * GPIOD :: ptr ( ) } } } # [ doc = "General Purpose Input/Output" ] pub mod gpiod { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Port Data Output Register" ] pub pdor : PDOR , # [ doc = "0x04 - Port Set Output Register" ] pub psor : PSOR , # [ doc = "0x08 - Port Clear Output Register" ] pub pcor : PCOR , # [ doc = "0x0c - Port Toggle Output Register" ] pub ptor : PTOR , # [ doc = "0x10 - Port Data Input Register" ] pub pdir : PDIR , # [ doc = "0x14 - Port Data Direction Register" ] pub pddr : PDDR , } # [ doc = "Port Data Output Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdor](pdor) module" ] pub type PDOR = crate :: Reg < u32 , _PDOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDOR ; # [ doc = "`read()` method returns [pdor::R](pdor::R) reader structure" ] impl crate :: Readable for PDOR { } # [ doc = "`write(|w| ..)` method takes [pdor::W](pdor::W) writer structure" ] impl crate :: Writable for PDOR { } # [ doc = "Port Data Output Register" ] pub mod pdor { # [ doc = "Reader of register PDOR" ] pub type R = crate :: R < u32 , super :: PDOR > ; # [ doc = "Writer for register PDOR" ] pub type W = crate :: W < u32 , super :: PDOR > ; # [ doc = "Register PDOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO0_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO0_A ) -> Self { match variant { PDO0_A :: _0 => false , PDO0_A :: _1 => true } } } # [ doc = "Reader of field `PDO0`" ] pub type PDO0_R = crate :: R < bool , PDO0_A > ; impl PDO0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO0_A { match self . bits { false => PDO0_A :: _0 , true => PDO0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO0_A :: _1 } } # [ doc = "Write proxy for field `PDO0`" ] pub struct PDO0_W < 'a > { w : & 'a mut W , } impl < 'a > PDO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO1_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO1_A ) -> Self { match variant { PDO1_A :: _0 => false , PDO1_A :: _1 => true } } } # [ doc = "Reader of field `PDO1`" ] pub type PDO1_R = crate :: R < bool , PDO1_A > ; impl PDO1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO1_A { match self . bits { false => PDO1_A :: _0 , true => PDO1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO1_A :: _1 } } # [ doc = "Write proxy for field `PDO1`" ] pub struct PDO1_W < 'a > { w : & 'a mut W , } impl < 'a > PDO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO2_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO2_A ) -> Self { match variant { PDO2_A :: _0 => false , PDO2_A :: _1 => true } } } # [ doc = "Reader of field `PDO2`" ] pub type PDO2_R = crate :: R < bool , PDO2_A > ; impl PDO2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO2_A { match self . bits { false => PDO2_A :: _0 , true => PDO2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO2_A :: _1 } } # [ doc = "Write proxy for field `PDO2`" ] pub struct PDO2_W < 'a > { w : & 'a mut W , } impl < 'a > PDO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO3_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO3_A ) -> Self { match variant { PDO3_A :: _0 => false , PDO3_A :: _1 => true } } } # [ doc = "Reader of field `PDO3`" ] pub type PDO3_R = crate :: R < bool , PDO3_A > ; impl PDO3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO3_A { match self . bits { false => PDO3_A :: _0 , true => PDO3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO3_A :: _1 } } # [ doc = "Write proxy for field `PDO3`" ] pub struct PDO3_W < 'a > { w : & 'a mut W , } impl < 'a > PDO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO4_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO4_A ) -> Self { match variant { PDO4_A :: _0 => false , PDO4_A :: _1 => true } } } # [ doc = "Reader of field `PDO4`" ] pub type PDO4_R = crate :: R < bool , PDO4_A > ; impl PDO4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO4_A { match self . bits { false => PDO4_A :: _0 , true => PDO4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO4_A :: _1 } } # [ doc = "Write proxy for field `PDO4`" ] pub struct PDO4_W < 'a > { w : & 'a mut W , } impl < 'a > PDO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO5_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO5_A ) -> Self { match variant { PDO5_A :: _0 => false , PDO5_A :: _1 => true } } } # [ doc = "Reader of field `PDO5`" ] pub type PDO5_R = crate :: R < bool , PDO5_A > ; impl PDO5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO5_A { match self . bits { false => PDO5_A :: _0 , true => PDO5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO5_A :: _1 } } # [ doc = "Write proxy for field `PDO5`" ] pub struct PDO5_W < 'a > { w : & 'a mut W , } impl < 'a > PDO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO6_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO6_A ) -> Self { match variant { PDO6_A :: _0 => false , PDO6_A :: _1 => true } } } # [ doc = "Reader of field `PDO6`" ] pub type PDO6_R = crate :: R < bool , PDO6_A > ; impl PDO6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO6_A { match self . bits { false => PDO6_A :: _0 , true => PDO6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO6_A :: _1 } } # [ doc = "Write proxy for field `PDO6`" ] pub struct PDO6_W < 'a > { w : & 'a mut W , } impl < 'a > PDO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO7_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO7_A ) -> Self { match variant { PDO7_A :: _0 => false , PDO7_A :: _1 => true } } } # [ doc = "Reader of field `PDO7`" ] pub type PDO7_R = crate :: R < bool , PDO7_A > ; impl PDO7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO7_A { match self . bits { false => PDO7_A :: _0 , true => PDO7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO7_A :: _1 } } # [ doc = "Write proxy for field `PDO7`" ] pub struct PDO7_W < 'a > { w : & 'a mut W , } impl < 'a > PDO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO8_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO8_A ) -> Self { match variant { PDO8_A :: _0 => false , PDO8_A :: _1 => true } } } # [ doc = "Reader of field `PDO8`" ] pub type PDO8_R = crate :: R < bool , PDO8_A > ; impl PDO8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO8_A { match self . bits { false => PDO8_A :: _0 , true => PDO8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO8_A :: _1 } } # [ doc = "Write proxy for field `PDO8`" ] pub struct PDO8_W < 'a > { w : & 'a mut W , } impl < 'a > PDO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO9_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO9_A ) -> Self { match variant { PDO9_A :: _0 => false , PDO9_A :: _1 => true } } } # [ doc = "Reader of field `PDO9`" ] pub type PDO9_R = crate :: R < bool , PDO9_A > ; impl PDO9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO9_A { match self . bits { false => PDO9_A :: _0 , true => PDO9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO9_A :: _1 } } # [ doc = "Write proxy for field `PDO9`" ] pub struct PDO9_W < 'a > { w : & 'a mut W , } impl < 'a > PDO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO10_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO10_A ) -> Self { match variant { PDO10_A :: _0 => false , PDO10_A :: _1 => true } } } # [ doc = "Reader of field `PDO10`" ] pub type PDO10_R = crate :: R < bool , PDO10_A > ; impl PDO10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO10_A { match self . bits { false => PDO10_A :: _0 , true => PDO10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO10_A :: _1 } } # [ doc = "Write proxy for field `PDO10`" ] pub struct PDO10_W < 'a > { w : & 'a mut W , } impl < 'a > PDO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO11_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO11_A ) -> Self { match variant { PDO11_A :: _0 => false , PDO11_A :: _1 => true } } } # [ doc = "Reader of field `PDO11`" ] pub type PDO11_R = crate :: R < bool , PDO11_A > ; impl PDO11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO11_A { match self . bits { false => PDO11_A :: _0 , true => PDO11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO11_A :: _1 } } # [ doc = "Write proxy for field `PDO11`" ] pub struct PDO11_W < 'a > { w : & 'a mut W , } impl < 'a > PDO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO12_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO12_A ) -> Self { match variant { PDO12_A :: _0 => false , PDO12_A :: _1 => true } } } # [ doc = "Reader of field `PDO12`" ] pub type PDO12_R = crate :: R < bool , PDO12_A > ; impl PDO12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO12_A { match self . bits { false => PDO12_A :: _0 , true => PDO12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO12_A :: _1 } } # [ doc = "Write proxy for field `PDO12`" ] pub struct PDO12_W < 'a > { w : & 'a mut W , } impl < 'a > PDO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO13_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO13_A ) -> Self { match variant { PDO13_A :: _0 => false , PDO13_A :: _1 => true } } } # [ doc = "Reader of field `PDO13`" ] pub type PDO13_R = crate :: R < bool , PDO13_A > ; impl PDO13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO13_A { match self . bits { false => PDO13_A :: _0 , true => PDO13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO13_A :: _1 } } # [ doc = "Write proxy for field `PDO13`" ] pub struct PDO13_W < 'a > { w : & 'a mut W , } impl < 'a > PDO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO14_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO14_A ) -> Self { match variant { PDO14_A :: _0 => false , PDO14_A :: _1 => true } } } # [ doc = "Reader of field `PDO14`" ] pub type PDO14_R = crate :: R < bool , PDO14_A > ; impl PDO14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO14_A { match self . bits { false => PDO14_A :: _0 , true => PDO14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO14_A :: _1 } } # [ doc = "Write proxy for field `PDO14`" ] pub struct PDO14_W < 'a > { w : & 'a mut W , } impl < 'a > PDO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO15_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO15_A ) -> Self { match variant { PDO15_A :: _0 => false , PDO15_A :: _1 => true } } } # [ doc = "Reader of field `PDO15`" ] pub type PDO15_R = crate :: R < bool , PDO15_A > ; impl PDO15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO15_A { match self . bits { false => PDO15_A :: _0 , true => PDO15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO15_A :: _1 } } # [ doc = "Write proxy for field `PDO15`" ] pub struct PDO15_W < 'a > { w : & 'a mut W , } impl < 'a > PDO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO16_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO16_A ) -> Self { match variant { PDO16_A :: _0 => false , PDO16_A :: _1 => true } } } # [ doc = "Reader of field `PDO16`" ] pub type PDO16_R = crate :: R < bool , PDO16_A > ; impl PDO16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO16_A { match self . bits { false => PDO16_A :: _0 , true => PDO16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO16_A :: _1 } } # [ doc = "Write proxy for field `PDO16`" ] pub struct PDO16_W < 'a > { w : & 'a mut W , } impl < 'a > PDO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO17_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO17_A ) -> Self { match variant { PDO17_A :: _0 => false , PDO17_A :: _1 => true } } } # [ doc = "Reader of field `PDO17`" ] pub type PDO17_R = crate :: R < bool , PDO17_A > ; impl PDO17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO17_A { match self . bits { false => PDO17_A :: _0 , true => PDO17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO17_A :: _1 } } # [ doc = "Write proxy for field `PDO17`" ] pub struct PDO17_W < 'a > { w : & 'a mut W , } impl < 'a > PDO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO18_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO18_A ) -> Self { match variant { PDO18_A :: _0 => false , PDO18_A :: _1 => true } } } # [ doc = "Reader of field `PDO18`" ] pub type PDO18_R = crate :: R < bool , PDO18_A > ; impl PDO18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO18_A { match self . bits { false => PDO18_A :: _0 , true => PDO18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO18_A :: _1 } } # [ doc = "Write proxy for field `PDO18`" ] pub struct PDO18_W < 'a > { w : & 'a mut W , } impl < 'a > PDO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO19_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO19_A ) -> Self { match variant { PDO19_A :: _0 => false , PDO19_A :: _1 => true } } } # [ doc = "Reader of field `PDO19`" ] pub type PDO19_R = crate :: R < bool , PDO19_A > ; impl PDO19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO19_A { match self . bits { false => PDO19_A :: _0 , true => PDO19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO19_A :: _1 } } # [ doc = "Write proxy for field `PDO19`" ] pub struct PDO19_W < 'a > { w : & 'a mut W , } impl < 'a > PDO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO20_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO20_A ) -> Self { match variant { PDO20_A :: _0 => false , PDO20_A :: _1 => true } } } # [ doc = "Reader of field `PDO20`" ] pub type PDO20_R = crate :: R < bool , PDO20_A > ; impl PDO20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO20_A { match self . bits { false => PDO20_A :: _0 , true => PDO20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO20_A :: _1 } } # [ doc = "Write proxy for field `PDO20`" ] pub struct PDO20_W < 'a > { w : & 'a mut W , } impl < 'a > PDO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO21_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO21_A ) -> Self { match variant { PDO21_A :: _0 => false , PDO21_A :: _1 => true } } } # [ doc = "Reader of field `PDO21`" ] pub type PDO21_R = crate :: R < bool , PDO21_A > ; impl PDO21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO21_A { match self . bits { false => PDO21_A :: _0 , true => PDO21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO21_A :: _1 } } # [ doc = "Write proxy for field `PDO21`" ] pub struct PDO21_W < 'a > { w : & 'a mut W , } impl < 'a > PDO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO22_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO22_A ) -> Self { match variant { PDO22_A :: _0 => false , PDO22_A :: _1 => true } } } # [ doc = "Reader of field `PDO22`" ] pub type PDO22_R = crate :: R < bool , PDO22_A > ; impl PDO22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO22_A { match self . bits { false => PDO22_A :: _0 , true => PDO22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO22_A :: _1 } } # [ doc = "Write proxy for field `PDO22`" ] pub struct PDO22_W < 'a > { w : & 'a mut W , } impl < 'a > PDO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO23_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO23_A ) -> Self { match variant { PDO23_A :: _0 => false , PDO23_A :: _1 => true } } } # [ doc = "Reader of field `PDO23`" ] pub type PDO23_R = crate :: R < bool , PDO23_A > ; impl PDO23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO23_A { match self . bits { false => PDO23_A :: _0 , true => PDO23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO23_A :: _1 } } # [ doc = "Write proxy for field `PDO23`" ] pub struct PDO23_W < 'a > { w : & 'a mut W , } impl < 'a > PDO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO24_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO24_A ) -> Self { match variant { PDO24_A :: _0 => false , PDO24_A :: _1 => true } } } # [ doc = "Reader of field `PDO24`" ] pub type PDO24_R = crate :: R < bool , PDO24_A > ; impl PDO24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO24_A { match self . bits { false => PDO24_A :: _0 , true => PDO24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO24_A :: _1 } } # [ doc = "Write proxy for field `PDO24`" ] pub struct PDO24_W < 'a > { w : & 'a mut W , } impl < 'a > PDO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO25_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO25_A ) -> Self { match variant { PDO25_A :: _0 => false , PDO25_A :: _1 => true } } } # [ doc = "Reader of field `PDO25`" ] pub type PDO25_R = crate :: R < bool , PDO25_A > ; impl PDO25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO25_A { match self . bits { false => PDO25_A :: _0 , true => PDO25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO25_A :: _1 } } # [ doc = "Write proxy for field `PDO25`" ] pub struct PDO25_W < 'a > { w : & 'a mut W , } impl < 'a > PDO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO26_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO26_A ) -> Self { match variant { PDO26_A :: _0 => false , PDO26_A :: _1 => true } } } # [ doc = "Reader of field `PDO26`" ] pub type PDO26_R = crate :: R < bool , PDO26_A > ; impl PDO26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO26_A { match self . bits { false => PDO26_A :: _0 , true => PDO26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO26_A :: _1 } } # [ doc = "Write proxy for field `PDO26`" ] pub struct PDO26_W < 'a > { w : & 'a mut W , } impl < 'a > PDO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO27_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO27_A ) -> Self { match variant { PDO27_A :: _0 => false , PDO27_A :: _1 => true } } } # [ doc = "Reader of field `PDO27`" ] pub type PDO27_R = crate :: R < bool , PDO27_A > ; impl PDO27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO27_A { match self . bits { false => PDO27_A :: _0 , true => PDO27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO27_A :: _1 } } # [ doc = "Write proxy for field `PDO27`" ] pub struct PDO27_W < 'a > { w : & 'a mut W , } impl < 'a > PDO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO28_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO28_A ) -> Self { match variant { PDO28_A :: _0 => false , PDO28_A :: _1 => true } } } # [ doc = "Reader of field `PDO28`" ] pub type PDO28_R = crate :: R < bool , PDO28_A > ; impl PDO28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO28_A { match self . bits { false => PDO28_A :: _0 , true => PDO28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO28_A :: _1 } } # [ doc = "Write proxy for field `PDO28`" ] pub struct PDO28_W < 'a > { w : & 'a mut W , } impl < 'a > PDO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO29_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO29_A ) -> Self { match variant { PDO29_A :: _0 => false , PDO29_A :: _1 => true } } } # [ doc = "Reader of field `PDO29`" ] pub type PDO29_R = crate :: R < bool , PDO29_A > ; impl PDO29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO29_A { match self . bits { false => PDO29_A :: _0 , true => PDO29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO29_A :: _1 } } # [ doc = "Write proxy for field `PDO29`" ] pub struct PDO29_W < 'a > { w : & 'a mut W , } impl < 'a > PDO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO30_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO30_A ) -> Self { match variant { PDO30_A :: _0 => false , PDO30_A :: _1 => true } } } # [ doc = "Reader of field `PDO30`" ] pub type PDO30_R = crate :: R < bool , PDO30_A > ; impl PDO30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO30_A { match self . bits { false => PDO30_A :: _0 , true => PDO30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO30_A :: _1 } } # [ doc = "Write proxy for field `PDO30`" ] pub struct PDO30_W < 'a > { w : & 'a mut W , } impl < 'a > PDO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO31_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO31_A ) -> Self { match variant { PDO31_A :: _0 => false , PDO31_A :: _1 => true } } } # [ doc = "Reader of field `PDO31`" ] pub type PDO31_R = crate :: R < bool , PDO31_A > ; impl PDO31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO31_A { match self . bits { false => PDO31_A :: _0 , true => PDO31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO31_A :: _1 } } # [ doc = "Write proxy for field `PDO31`" ] pub struct PDO31_W < 'a > { w : & 'a mut W , } impl < 'a > PDO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & self ) -> PDO0_R { PDO0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & self ) -> PDO1_R { PDO1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & self ) -> PDO2_R { PDO2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & self ) -> PDO3_R { PDO3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & self ) -> PDO4_R { PDO4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & self ) -> PDO5_R { PDO5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & self ) -> PDO6_R { PDO6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & self ) -> PDO7_R { PDO7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & self ) -> PDO8_R { PDO8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & self ) -> PDO9_R { PDO9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & self ) -> PDO10_R { PDO10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & self ) -> PDO11_R { PDO11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & self ) -> PDO12_R { PDO12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & self ) -> PDO13_R { PDO13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & self ) -> PDO14_R { PDO14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & self ) -> PDO15_R { PDO15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & self ) -> PDO16_R { PDO16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & self ) -> PDO17_R { PDO17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & self ) -> PDO18_R { PDO18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & self ) -> PDO19_R { PDO19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & self ) -> PDO20_R { PDO20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & self ) -> PDO21_R { PDO21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & self ) -> PDO22_R { PDO22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & self ) -> PDO23_R { PDO23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & self ) -> PDO24_R { PDO24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & self ) -> PDO25_R { PDO25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & self ) -> PDO26_R { PDO26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & self ) -> PDO27_R { PDO27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & self ) -> PDO28_R { PDO28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & self ) -> PDO29_R { PDO29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & self ) -> PDO30_R { PDO30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & self ) -> PDO31_R { PDO31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & mut self ) -> PDO0_W { PDO0_W { w : self } } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & mut self ) -> PDO1_W { PDO1_W { w : self } } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & mut self ) -> PDO2_W { PDO2_W { w : self } } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & mut self ) -> PDO3_W { PDO3_W { w : self } } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & mut self ) -> PDO4_W { PDO4_W { w : self } } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & mut self ) -> PDO5_W { PDO5_W { w : self } } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & mut self ) -> PDO6_W { PDO6_W { w : self } } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & mut self ) -> PDO7_W { PDO7_W { w : self } } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & mut self ) -> PDO8_W { PDO8_W { w : self } } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & mut self ) -> PDO9_W { PDO9_W { w : self } } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & mut self ) -> PDO10_W { PDO10_W { w : self } } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & mut self ) -> PDO11_W { PDO11_W { w : self } } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & mut self ) -> PDO12_W { PDO12_W { w : self } } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & mut self ) -> PDO13_W { PDO13_W { w : self } } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & mut self ) -> PDO14_W { PDO14_W { w : self } } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & mut self ) -> PDO15_W { PDO15_W { w : self } } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & mut self ) -> PDO16_W { PDO16_W { w : self } } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & mut self ) -> PDO17_W { PDO17_W { w : self } } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & mut self ) -> PDO18_W { PDO18_W { w : self } } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & mut self ) -> PDO19_W { PDO19_W { w : self } } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & mut self ) -> PDO20_W { PDO20_W { w : self } } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & mut self ) -> PDO21_W { PDO21_W { w : self } } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & mut self ) -> PDO22_W { PDO22_W { w : self } } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & mut self ) -> PDO23_W { PDO23_W { w : self } } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & mut self ) -> PDO24_W { PDO24_W { w : self } } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & mut self ) -> PDO25_W { PDO25_W { w : self } } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & mut self ) -> PDO26_W { PDO26_W { w : self } } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & mut self ) -> PDO27_W { PDO27_W { w : self } } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & mut self ) -> PDO28_W { PDO28_W { w : self } } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & mut self ) -> PDO29_W { PDO29_W { w : self } } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & mut self ) -> PDO30_W { PDO30_W { w : self } } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & mut self ) -> PDO31_W { PDO31_W { w : self } } } } # [ doc = "Port Set Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psor](psor) module" ] pub type PSOR = crate :: Reg < u32 , _PSOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PSOR ; # [ doc = "`write(|w| ..)` method takes [psor::W](psor::W) writer structure" ] impl crate :: Writable for PSOR { } # [ doc = "Port Set Output Register" ] pub mod psor { # [ doc = "Writer for register PSOR" ] pub type W = crate :: W < u32 , super :: PSOR > ; # [ doc = "Register PSOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PSOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO0_AW ) -> Self { match variant { PTSO0_AW :: _0 => false , PTSO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO0`" ] pub struct PTSO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO1_AW ) -> Self { match variant { PTSO1_AW :: _0 => false , PTSO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO1`" ] pub struct PTSO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO2_AW ) -> Self { match variant { PTSO2_AW :: _0 => false , PTSO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO2`" ] pub struct PTSO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO3_AW ) -> Self { match variant { PTSO3_AW :: _0 => false , PTSO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO3`" ] pub struct PTSO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO4_AW ) -> Self { match variant { PTSO4_AW :: _0 => false , PTSO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO4`" ] pub struct PTSO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO5_AW ) -> Self { match variant { PTSO5_AW :: _0 => false , PTSO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO5`" ] pub struct PTSO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO6_AW ) -> Self { match variant { PTSO6_AW :: _0 => false , PTSO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO6`" ] pub struct PTSO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO7_AW ) -> Self { match variant { PTSO7_AW :: _0 => false , PTSO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO7`" ] pub struct PTSO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO8_AW ) -> Self { match variant { PTSO8_AW :: _0 => false , PTSO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO8`" ] pub struct PTSO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO9_AW ) -> Self { match variant { PTSO9_AW :: _0 => false , PTSO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO9`" ] pub struct PTSO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO10_AW ) -> Self { match variant { PTSO10_AW :: _0 => false , PTSO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO10`" ] pub struct PTSO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO11_AW ) -> Self { match variant { PTSO11_AW :: _0 => false , PTSO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO11`" ] pub struct PTSO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO12_AW ) -> Self { match variant { PTSO12_AW :: _0 => false , PTSO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO12`" ] pub struct PTSO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO13_AW ) -> Self { match variant { PTSO13_AW :: _0 => false , PTSO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO13`" ] pub struct PTSO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO14_AW ) -> Self { match variant { PTSO14_AW :: _0 => false , PTSO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO14`" ] pub struct PTSO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO15_AW ) -> Self { match variant { PTSO15_AW :: _0 => false , PTSO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO15`" ] pub struct PTSO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO16_AW ) -> Self { match variant { PTSO16_AW :: _0 => false , PTSO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO16`" ] pub struct PTSO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO17_AW ) -> Self { match variant { PTSO17_AW :: _0 => false , PTSO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO17`" ] pub struct PTSO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO18_AW ) -> Self { match variant { PTSO18_AW :: _0 => false , PTSO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO18`" ] pub struct PTSO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO19_AW ) -> Self { match variant { PTSO19_AW :: _0 => false , PTSO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO19`" ] pub struct PTSO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO20_AW ) -> Self { match variant { PTSO20_AW :: _0 => false , PTSO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO20`" ] pub struct PTSO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO21_AW ) -> Self { match variant { PTSO21_AW :: _0 => false , PTSO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO21`" ] pub struct PTSO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO22_AW ) -> Self { match variant { PTSO22_AW :: _0 => false , PTSO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO22`" ] pub struct PTSO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO23_AW ) -> Self { match variant { PTSO23_AW :: _0 => false , PTSO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO23`" ] pub struct PTSO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO24_AW ) -> Self { match variant { PTSO24_AW :: _0 => false , PTSO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO24`" ] pub struct PTSO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO25_AW ) -> Self { match variant { PTSO25_AW :: _0 => false , PTSO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO25`" ] pub struct PTSO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO26_AW ) -> Self { match variant { PTSO26_AW :: _0 => false , PTSO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO26`" ] pub struct PTSO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO27_AW ) -> Self { match variant { PTSO27_AW :: _0 => false , PTSO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO27`" ] pub struct PTSO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO28_AW ) -> Self { match variant { PTSO28_AW :: _0 => false , PTSO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO28`" ] pub struct PTSO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO29_AW ) -> Self { match variant { PTSO29_AW :: _0 => false , PTSO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO29`" ] pub struct PTSO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO30_AW ) -> Self { match variant { PTSO30_AW :: _0 => false , PTSO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO30`" ] pub struct PTSO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO31_AW ) -> Self { match variant { PTSO31_AW :: _0 => false , PTSO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO31`" ] pub struct PTSO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso0 ( & mut self ) -> PTSO0_W { PTSO0_W { w : self } } # [ doc = "Bit 1 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso1 ( & mut self ) -> PTSO1_W { PTSO1_W { w : self } } # [ doc = "Bit 2 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso2 ( & mut self ) -> PTSO2_W { PTSO2_W { w : self } } # [ doc = "Bit 3 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso3 ( & mut self ) -> PTSO3_W { PTSO3_W { w : self } } # [ doc = "Bit 4 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso4 ( & mut self ) -> PTSO4_W { PTSO4_W { w : self } } # [ doc = "Bit 5 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso5 ( & mut self ) -> PTSO5_W { PTSO5_W { w : self } } # [ doc = "Bit 6 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso6 ( & mut self ) -> PTSO6_W { PTSO6_W { w : self } } # [ doc = "Bit 7 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso7 ( & mut self ) -> PTSO7_W { PTSO7_W { w : self } } # [ doc = "Bit 8 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso8 ( & mut self ) -> PTSO8_W { PTSO8_W { w : self } } # [ doc = "Bit 9 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso9 ( & mut self ) -> PTSO9_W { PTSO9_W { w : self } } # [ doc = "Bit 10 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso10 ( & mut self ) -> PTSO10_W { PTSO10_W { w : self } } # [ doc = "Bit 11 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso11 ( & mut self ) -> PTSO11_W { PTSO11_W { w : self } } # [ doc = "Bit 12 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso12 ( & mut self ) -> PTSO12_W { PTSO12_W { w : self } } # [ doc = "Bit 13 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso13 ( & mut self ) -> PTSO13_W { PTSO13_W { w : self } } # [ doc = "Bit 14 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso14 ( & mut self ) -> PTSO14_W { PTSO14_W { w : self } } # [ doc = "Bit 15 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso15 ( & mut self ) -> PTSO15_W { PTSO15_W { w : self } } # [ doc = "Bit 16 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso16 ( & mut self ) -> PTSO16_W { PTSO16_W { w : self } } # [ doc = "Bit 17 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso17 ( & mut self ) -> PTSO17_W { PTSO17_W { w : self } } # [ doc = "Bit 18 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso18 ( & mut self ) -> PTSO18_W { PTSO18_W { w : self } } # [ doc = "Bit 19 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso19 ( & mut self ) -> PTSO19_W { PTSO19_W { w : self } } # [ doc = "Bit 20 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso20 ( & mut self ) -> PTSO20_W { PTSO20_W { w : self } } # [ doc = "Bit 21 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso21 ( & mut self ) -> PTSO21_W { PTSO21_W { w : self } } # [ doc = "Bit 22 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso22 ( & mut self ) -> PTSO22_W { PTSO22_W { w : self } } # [ doc = "Bit 23 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso23 ( & mut self ) -> PTSO23_W { PTSO23_W { w : self } } # [ doc = "Bit 24 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso24 ( & mut self ) -> PTSO24_W { PTSO24_W { w : self } } # [ doc = "Bit 25 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso25 ( & mut self ) -> PTSO25_W { PTSO25_W { w : self } } # [ doc = "Bit 26 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso26 ( & mut self ) -> PTSO26_W { PTSO26_W { w : self } } # [ doc = "Bit 27 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso27 ( & mut self ) -> PTSO27_W { PTSO27_W { w : self } } # [ doc = "Bit 28 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso28 ( & mut self ) -> PTSO28_W { PTSO28_W { w : self } } # [ doc = "Bit 29 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso29 ( & mut self ) -> PTSO29_W { PTSO29_W { w : self } } # [ doc = "Bit 30 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso30 ( & mut self ) -> PTSO30_W { PTSO30_W { w : self } } # [ doc = "Bit 31 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso31 ( & mut self ) -> PTSO31_W { PTSO31_W { w : self } } } } # [ doc = "Port Clear Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcor](pcor) module" ] pub type PCOR = crate :: Reg < u32 , _PCOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCOR ; # [ doc = "`write(|w| ..)` method takes [pcor::W](pcor::W) writer structure" ] impl crate :: Writable for PCOR { } # [ doc = "Port Clear Output Register" ] pub mod pcor { # [ doc = "Writer for register PCOR" ] pub type W = crate :: W < u32 , super :: PCOR > ; # [ doc = "Register PCOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO0_AW ) -> Self { match variant { PTCO0_AW :: _0 => false , PTCO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO0`" ] pub struct PTCO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO1_AW ) -> Self { match variant { PTCO1_AW :: _0 => false , PTCO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO1`" ] pub struct PTCO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO2_AW ) -> Self { match variant { PTCO2_AW :: _0 => false , PTCO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO2`" ] pub struct PTCO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO3_AW ) -> Self { match variant { PTCO3_AW :: _0 => false , PTCO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO3`" ] pub struct PTCO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO4_AW ) -> Self { match variant { PTCO4_AW :: _0 => false , PTCO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO4`" ] pub struct PTCO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO5_AW ) -> Self { match variant { PTCO5_AW :: _0 => false , PTCO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO5`" ] pub struct PTCO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO6_AW ) -> Self { match variant { PTCO6_AW :: _0 => false , PTCO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO6`" ] pub struct PTCO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO7_AW ) -> Self { match variant { PTCO7_AW :: _0 => false , PTCO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO7`" ] pub struct PTCO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO8_AW ) -> Self { match variant { PTCO8_AW :: _0 => false , PTCO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO8`" ] pub struct PTCO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO9_AW ) -> Self { match variant { PTCO9_AW :: _0 => false , PTCO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO9`" ] pub struct PTCO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO10_AW ) -> Self { match variant { PTCO10_AW :: _0 => false , PTCO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO10`" ] pub struct PTCO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO11_AW ) -> Self { match variant { PTCO11_AW :: _0 => false , PTCO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO11`" ] pub struct PTCO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO12_AW ) -> Self { match variant { PTCO12_AW :: _0 => false , PTCO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO12`" ] pub struct PTCO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO13_AW ) -> Self { match variant { PTCO13_AW :: _0 => false , PTCO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO13`" ] pub struct PTCO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO14_AW ) -> Self { match variant { PTCO14_AW :: _0 => false , PTCO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO14`" ] pub struct PTCO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO15_AW ) -> Self { match variant { PTCO15_AW :: _0 => false , PTCO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO15`" ] pub struct PTCO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO16_AW ) -> Self { match variant { PTCO16_AW :: _0 => false , PTCO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO16`" ] pub struct PTCO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO17_AW ) -> Self { match variant { PTCO17_AW :: _0 => false , PTCO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO17`" ] pub struct PTCO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO18_AW ) -> Self { match variant { PTCO18_AW :: _0 => false , PTCO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO18`" ] pub struct PTCO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO19_AW ) -> Self { match variant { PTCO19_AW :: _0 => false , PTCO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO19`" ] pub struct PTCO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO20_AW ) -> Self { match variant { PTCO20_AW :: _0 => false , PTCO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO20`" ] pub struct PTCO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO21_AW ) -> Self { match variant { PTCO21_AW :: _0 => false , PTCO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO21`" ] pub struct PTCO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO22_AW ) -> Self { match variant { PTCO22_AW :: _0 => false , PTCO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO22`" ] pub struct PTCO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO23_AW ) -> Self { match variant { PTCO23_AW :: _0 => false , PTCO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO23`" ] pub struct PTCO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO24_AW ) -> Self { match variant { PTCO24_AW :: _0 => false , PTCO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO24`" ] pub struct PTCO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO25_AW ) -> Self { match variant { PTCO25_AW :: _0 => false , PTCO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO25`" ] pub struct PTCO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO26_AW ) -> Self { match variant { PTCO26_AW :: _0 => false , PTCO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO26`" ] pub struct PTCO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO27_AW ) -> Self { match variant { PTCO27_AW :: _0 => false , PTCO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO27`" ] pub struct PTCO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO28_AW ) -> Self { match variant { PTCO28_AW :: _0 => false , PTCO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO28`" ] pub struct PTCO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO29_AW ) -> Self { match variant { PTCO29_AW :: _0 => false , PTCO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO29`" ] pub struct PTCO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO30_AW ) -> Self { match variant { PTCO30_AW :: _0 => false , PTCO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO30`" ] pub struct PTCO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO31_AW ) -> Self { match variant { PTCO31_AW :: _0 => false , PTCO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO31`" ] pub struct PTCO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco0 ( & mut self ) -> PTCO0_W { PTCO0_W { w : self } } # [ doc = "Bit 1 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco1 ( & mut self ) -> PTCO1_W { PTCO1_W { w : self } } # [ doc = "Bit 2 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco2 ( & mut self ) -> PTCO2_W { PTCO2_W { w : self } } # [ doc = "Bit 3 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco3 ( & mut self ) -> PTCO3_W { PTCO3_W { w : self } } # [ doc = "Bit 4 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco4 ( & mut self ) -> PTCO4_W { PTCO4_W { w : self } } # [ doc = "Bit 5 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco5 ( & mut self ) -> PTCO5_W { PTCO5_W { w : self } } # [ doc = "Bit 6 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco6 ( & mut self ) -> PTCO6_W { PTCO6_W { w : self } } # [ doc = "Bit 7 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco7 ( & mut self ) -> PTCO7_W { PTCO7_W { w : self } } # [ doc = "Bit 8 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco8 ( & mut self ) -> PTCO8_W { PTCO8_W { w : self } } # [ doc = "Bit 9 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco9 ( & mut self ) -> PTCO9_W { PTCO9_W { w : self } } # [ doc = "Bit 10 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco10 ( & mut self ) -> PTCO10_W { PTCO10_W { w : self } } # [ doc = "Bit 11 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco11 ( & mut self ) -> PTCO11_W { PTCO11_W { w : self } } # [ doc = "Bit 12 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco12 ( & mut self ) -> PTCO12_W { PTCO12_W { w : self } } # [ doc = "Bit 13 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco13 ( & mut self ) -> PTCO13_W { PTCO13_W { w : self } } # [ doc = "Bit 14 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco14 ( & mut self ) -> PTCO14_W { PTCO14_W { w : self } } # [ doc = "Bit 15 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco15 ( & mut self ) -> PTCO15_W { PTCO15_W { w : self } } # [ doc = "Bit 16 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco16 ( & mut self ) -> PTCO16_W { PTCO16_W { w : self } } # [ doc = "Bit 17 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco17 ( & mut self ) -> PTCO17_W { PTCO17_W { w : self } } # [ doc = "Bit 18 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco18 ( & mut self ) -> PTCO18_W { PTCO18_W { w : self } } # [ doc = "Bit 19 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco19 ( & mut self ) -> PTCO19_W { PTCO19_W { w : self } } # [ doc = "Bit 20 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco20 ( & mut self ) -> PTCO20_W { PTCO20_W { w : self } } # [ doc = "Bit 21 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco21 ( & mut self ) -> PTCO21_W { PTCO21_W { w : self } } # [ doc = "Bit 22 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco22 ( & mut self ) -> PTCO22_W { PTCO22_W { w : self } } # [ doc = "Bit 23 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco23 ( & mut self ) -> PTCO23_W { PTCO23_W { w : self } } # [ doc = "Bit 24 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco24 ( & mut self ) -> PTCO24_W { PTCO24_W { w : self } } # [ doc = "Bit 25 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco25 ( & mut self ) -> PTCO25_W { PTCO25_W { w : self } } # [ doc = "Bit 26 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco26 ( & mut self ) -> PTCO26_W { PTCO26_W { w : self } } # [ doc = "Bit 27 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco27 ( & mut self ) -> PTCO27_W { PTCO27_W { w : self } } # [ doc = "Bit 28 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco28 ( & mut self ) -> PTCO28_W { PTCO28_W { w : self } } # [ doc = "Bit 29 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco29 ( & mut self ) -> PTCO29_W { PTCO29_W { w : self } } # [ doc = "Bit 30 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco30 ( & mut self ) -> PTCO30_W { PTCO30_W { w : self } } # [ doc = "Bit 31 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco31 ( & mut self ) -> PTCO31_W { PTCO31_W { w : self } } } } # [ doc = "Port Toggle Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ptor](ptor) module" ] pub type PTOR = crate :: Reg < u32 , _PTOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PTOR ; # [ doc = "`write(|w| ..)` method takes [ptor::W](ptor::W) writer structure" ] impl crate :: Writable for PTOR { } # [ doc = "Port Toggle Output Register" ] pub mod ptor { # [ doc = "Writer for register PTOR" ] pub type W = crate :: W < u32 , super :: PTOR > ; # [ doc = "Register PTOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PTOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO0_AW ) -> Self { match variant { PTTO0_AW :: _0 => false , PTTO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO0`" ] pub struct PTTO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO1_AW ) -> Self { match variant { PTTO1_AW :: _0 => false , PTTO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO1`" ] pub struct PTTO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO2_AW ) -> Self { match variant { PTTO2_AW :: _0 => false , PTTO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO2`" ] pub struct PTTO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO3_AW ) -> Self { match variant { PTTO3_AW :: _0 => false , PTTO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO3`" ] pub struct PTTO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO4_AW ) -> Self { match variant { PTTO4_AW :: _0 => false , PTTO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO4`" ] pub struct PTTO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO5_AW ) -> Self { match variant { PTTO5_AW :: _0 => false , PTTO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO5`" ] pub struct PTTO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO6_AW ) -> Self { match variant { PTTO6_AW :: _0 => false , PTTO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO6`" ] pub struct PTTO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO7_AW ) -> Self { match variant { PTTO7_AW :: _0 => false , PTTO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO7`" ] pub struct PTTO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO8_AW ) -> Self { match variant { PTTO8_AW :: _0 => false , PTTO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO8`" ] pub struct PTTO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO9_AW ) -> Self { match variant { PTTO9_AW :: _0 => false , PTTO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO9`" ] pub struct PTTO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO10_AW ) -> Self { match variant { PTTO10_AW :: _0 => false , PTTO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO10`" ] pub struct PTTO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO11_AW ) -> Self { match variant { PTTO11_AW :: _0 => false , PTTO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO11`" ] pub struct PTTO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO12_AW ) -> Self { match variant { PTTO12_AW :: _0 => false , PTTO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO12`" ] pub struct PTTO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO13_AW ) -> Self { match variant { PTTO13_AW :: _0 => false , PTTO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO13`" ] pub struct PTTO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO14_AW ) -> Self { match variant { PTTO14_AW :: _0 => false , PTTO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO14`" ] pub struct PTTO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO15_AW ) -> Self { match variant { PTTO15_AW :: _0 => false , PTTO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO15`" ] pub struct PTTO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO16_AW ) -> Self { match variant { PTTO16_AW :: _0 => false , PTTO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO16`" ] pub struct PTTO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO17_AW ) -> Self { match variant { PTTO17_AW :: _0 => false , PTTO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO17`" ] pub struct PTTO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO18_AW ) -> Self { match variant { PTTO18_AW :: _0 => false , PTTO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO18`" ] pub struct PTTO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO19_AW ) -> Self { match variant { PTTO19_AW :: _0 => false , PTTO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO19`" ] pub struct PTTO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO20_AW ) -> Self { match variant { PTTO20_AW :: _0 => false , PTTO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO20`" ] pub struct PTTO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO21_AW ) -> Self { match variant { PTTO21_AW :: _0 => false , PTTO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO21`" ] pub struct PTTO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO22_AW ) -> Self { match variant { PTTO22_AW :: _0 => false , PTTO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO22`" ] pub struct PTTO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO23_AW ) -> Self { match variant { PTTO23_AW :: _0 => false , PTTO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO23`" ] pub struct PTTO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO24_AW ) -> Self { match variant { PTTO24_AW :: _0 => false , PTTO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO24`" ] pub struct PTTO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO25_AW ) -> Self { match variant { PTTO25_AW :: _0 => false , PTTO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO25`" ] pub struct PTTO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO26_AW ) -> Self { match variant { PTTO26_AW :: _0 => false , PTTO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO26`" ] pub struct PTTO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO27_AW ) -> Self { match variant { PTTO27_AW :: _0 => false , PTTO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO27`" ] pub struct PTTO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO28_AW ) -> Self { match variant { PTTO28_AW :: _0 => false , PTTO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO28`" ] pub struct PTTO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO29_AW ) -> Self { match variant { PTTO29_AW :: _0 => false , PTTO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO29`" ] pub struct PTTO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO30_AW ) -> Self { match variant { PTTO30_AW :: _0 => false , PTTO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO30`" ] pub struct PTTO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO31_AW ) -> Self { match variant { PTTO31_AW :: _0 => false , PTTO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO31`" ] pub struct PTTO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto0 ( & mut self ) -> PTTO0_W { PTTO0_W { w : self } } # [ doc = "Bit 1 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto1 ( & mut self ) -> PTTO1_W { PTTO1_W { w : self } } # [ doc = "Bit 2 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto2 ( & mut self ) -> PTTO2_W { PTTO2_W { w : self } } # [ doc = "Bit 3 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto3 ( & mut self ) -> PTTO3_W { PTTO3_W { w : self } } # [ doc = "Bit 4 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto4 ( & mut self ) -> PTTO4_W { PTTO4_W { w : self } } # [ doc = "Bit 5 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto5 ( & mut self ) -> PTTO5_W { PTTO5_W { w : self } } # [ doc = "Bit 6 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto6 ( & mut self ) -> PTTO6_W { PTTO6_W { w : self } } # [ doc = "Bit 7 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto7 ( & mut self ) -> PTTO7_W { PTTO7_W { w : self } } # [ doc = "Bit 8 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto8 ( & mut self ) -> PTTO8_W { PTTO8_W { w : self } } # [ doc = "Bit 9 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto9 ( & mut self ) -> PTTO9_W { PTTO9_W { w : self } } # [ doc = "Bit 10 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto10 ( & mut self ) -> PTTO10_W { PTTO10_W { w : self } } # [ doc = "Bit 11 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto11 ( & mut self ) -> PTTO11_W { PTTO11_W { w : self } } # [ doc = "Bit 12 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto12 ( & mut self ) -> PTTO12_W { PTTO12_W { w : self } } # [ doc = "Bit 13 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto13 ( & mut self ) -> PTTO13_W { PTTO13_W { w : self } } # [ doc = "Bit 14 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto14 ( & mut self ) -> PTTO14_W { PTTO14_W { w : self } } # [ doc = "Bit 15 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto15 ( & mut self ) -> PTTO15_W { PTTO15_W { w : self } } # [ doc = "Bit 16 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto16 ( & mut self ) -> PTTO16_W { PTTO16_W { w : self } } # [ doc = "Bit 17 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto17 ( & mut self ) -> PTTO17_W { PTTO17_W { w : self } } # [ doc = "Bit 18 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto18 ( & mut self ) -> PTTO18_W { PTTO18_W { w : self } } # [ doc = "Bit 19 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto19 ( & mut self ) -> PTTO19_W { PTTO19_W { w : self } } # [ doc = "Bit 20 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto20 ( & mut self ) -> PTTO20_W { PTTO20_W { w : self } } # [ doc = "Bit 21 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto21 ( & mut self ) -> PTTO21_W { PTTO21_W { w : self } } # [ doc = "Bit 22 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto22 ( & mut self ) -> PTTO22_W { PTTO22_W { w : self } } # [ doc = "Bit 23 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto23 ( & mut self ) -> PTTO23_W { PTTO23_W { w : self } } # [ doc = "Bit 24 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto24 ( & mut self ) -> PTTO24_W { PTTO24_W { w : self } } # [ doc = "Bit 25 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto25 ( & mut self ) -> PTTO25_W { PTTO25_W { w : self } } # [ doc = "Bit 26 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto26 ( & mut self ) -> PTTO26_W { PTTO26_W { w : self } } # [ doc = "Bit 27 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto27 ( & mut self ) -> PTTO27_W { PTTO27_W { w : self } } # [ doc = "Bit 28 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto28 ( & mut self ) -> PTTO28_W { PTTO28_W { w : self } } # [ doc = "Bit 29 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto29 ( & mut self ) -> PTTO29_W { PTTO29_W { w : self } } # [ doc = "Bit 30 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto30 ( & mut self ) -> PTTO30_W { PTTO30_W { w : self } } # [ doc = "Bit 31 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto31 ( & mut self ) -> PTTO31_W { PTTO31_W { w : self } } } } # [ doc = "Port Data Input Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdir](pdir) module" ] pub type PDIR = crate :: Reg < u32 , _PDIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDIR ; # [ doc = "`read()` method returns [pdir::R](pdir::R) reader structure" ] impl crate :: Readable for PDIR { } # [ doc = "Port Data Input Register" ] pub mod pdir { # [ doc = "Reader of register PDIR" ] pub type R = crate :: R < u32 , super :: PDIR > ; # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI0_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI0_A ) -> Self { match variant { PDI0_A :: _0 => false , PDI0_A :: _1 => true } } } # [ doc = "Reader of field `PDI0`" ] pub type PDI0_R = crate :: R < bool , PDI0_A > ; impl PDI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI0_A { match self . bits { false => PDI0_A :: _0 , true => PDI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI0_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI1_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI1_A ) -> Self { match variant { PDI1_A :: _0 => false , PDI1_A :: _1 => true } } } # [ doc = "Reader of field `PDI1`" ] pub type PDI1_R = crate :: R < bool , PDI1_A > ; impl PDI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI1_A { match self . bits { false => PDI1_A :: _0 , true => PDI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI1_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI2_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI2_A ) -> Self { match variant { PDI2_A :: _0 => false , PDI2_A :: _1 => true } } } # [ doc = "Reader of field `PDI2`" ] pub type PDI2_R = crate :: R < bool , PDI2_A > ; impl PDI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI2_A { match self . bits { false => PDI2_A :: _0 , true => PDI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI2_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI3_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI3_A ) -> Self { match variant { PDI3_A :: _0 => false , PDI3_A :: _1 => true } } } # [ doc = "Reader of field `PDI3`" ] pub type PDI3_R = crate :: R < bool , PDI3_A > ; impl PDI3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI3_A { match self . bits { false => PDI3_A :: _0 , true => PDI3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI3_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI4_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI4_A ) -> Self { match variant { PDI4_A :: _0 => false , PDI4_A :: _1 => true } } } # [ doc = "Reader of field `PDI4`" ] pub type PDI4_R = crate :: R < bool , PDI4_A > ; impl PDI4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI4_A { match self . bits { false => PDI4_A :: _0 , true => PDI4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI4_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI5_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI5_A ) -> Self { match variant { PDI5_A :: _0 => false , PDI5_A :: _1 => true } } } # [ doc = "Reader of field `PDI5`" ] pub type PDI5_R = crate :: R < bool , PDI5_A > ; impl PDI5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI5_A { match self . bits { false => PDI5_A :: _0 , true => PDI5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI5_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI6_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI6_A ) -> Self { match variant { PDI6_A :: _0 => false , PDI6_A :: _1 => true } } } # [ doc = "Reader of field `PDI6`" ] pub type PDI6_R = crate :: R < bool , PDI6_A > ; impl PDI6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI6_A { match self . bits { false => PDI6_A :: _0 , true => PDI6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI6_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI7_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI7_A ) -> Self { match variant { PDI7_A :: _0 => false , PDI7_A :: _1 => true } } } # [ doc = "Reader of field `PDI7`" ] pub type PDI7_R = crate :: R < bool , PDI7_A > ; impl PDI7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI7_A { match self . bits { false => PDI7_A :: _0 , true => PDI7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI7_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI8_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI8_A ) -> Self { match variant { PDI8_A :: _0 => false , PDI8_A :: _1 => true } } } # [ doc = "Reader of field `PDI8`" ] pub type PDI8_R = crate :: R < bool , PDI8_A > ; impl PDI8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI8_A { match self . bits { false => PDI8_A :: _0 , true => PDI8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI8_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI9_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI9_A ) -> Self { match variant { PDI9_A :: _0 => false , PDI9_A :: _1 => true } } } # [ doc = "Reader of field `PDI9`" ] pub type PDI9_R = crate :: R < bool , PDI9_A > ; impl PDI9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI9_A { match self . bits { false => PDI9_A :: _0 , true => PDI9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI9_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI10_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI10_A ) -> Self { match variant { PDI10_A :: _0 => false , PDI10_A :: _1 => true } } } # [ doc = "Reader of field `PDI10`" ] pub type PDI10_R = crate :: R < bool , PDI10_A > ; impl PDI10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI10_A { match self . bits { false => PDI10_A :: _0 , true => PDI10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI10_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI11_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI11_A ) -> Self { match variant { PDI11_A :: _0 => false , PDI11_A :: _1 => true } } } # [ doc = "Reader of field `PDI11`" ] pub type PDI11_R = crate :: R < bool , PDI11_A > ; impl PDI11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI11_A { match self . bits { false => PDI11_A :: _0 , true => PDI11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI11_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI12_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI12_A ) -> Self { match variant { PDI12_A :: _0 => false , PDI12_A :: _1 => true } } } # [ doc = "Reader of field `PDI12`" ] pub type PDI12_R = crate :: R < bool , PDI12_A > ; impl PDI12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI12_A { match self . bits { false => PDI12_A :: _0 , true => PDI12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI12_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI13_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI13_A ) -> Self { match variant { PDI13_A :: _0 => false , PDI13_A :: _1 => true } } } # [ doc = "Reader of field `PDI13`" ] pub type PDI13_R = crate :: R < bool , PDI13_A > ; impl PDI13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI13_A { match self . bits { false => PDI13_A :: _0 , true => PDI13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI13_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI14_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI14_A ) -> Self { match variant { PDI14_A :: _0 => false , PDI14_A :: _1 => true } } } # [ doc = "Reader of field `PDI14`" ] pub type PDI14_R = crate :: R < bool , PDI14_A > ; impl PDI14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI14_A { match self . bits { false => PDI14_A :: _0 , true => PDI14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI14_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI15_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI15_A ) -> Self { match variant { PDI15_A :: _0 => false , PDI15_A :: _1 => true } } } # [ doc = "Reader of field `PDI15`" ] pub type PDI15_R = crate :: R < bool , PDI15_A > ; impl PDI15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI15_A { match self . bits { false => PDI15_A :: _0 , true => PDI15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI15_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI16_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI16_A ) -> Self { match variant { PDI16_A :: _0 => false , PDI16_A :: _1 => true } } } # [ doc = "Reader of field `PDI16`" ] pub type PDI16_R = crate :: R < bool , PDI16_A > ; impl PDI16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI16_A { match self . bits { false => PDI16_A :: _0 , true => PDI16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI16_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI17_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI17_A ) -> Self { match variant { PDI17_A :: _0 => false , PDI17_A :: _1 => true } } } # [ doc = "Reader of field `PDI17`" ] pub type PDI17_R = crate :: R < bool , PDI17_A > ; impl PDI17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI17_A { match self . bits { false => PDI17_A :: _0 , true => PDI17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI17_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI18_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI18_A ) -> Self { match variant { PDI18_A :: _0 => false , PDI18_A :: _1 => true } } } # [ doc = "Reader of field `PDI18`" ] pub type PDI18_R = crate :: R < bool , PDI18_A > ; impl PDI18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI18_A { match self . bits { false => PDI18_A :: _0 , true => PDI18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI18_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI19_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI19_A ) -> Self { match variant { PDI19_A :: _0 => false , PDI19_A :: _1 => true } } } # [ doc = "Reader of field `PDI19`" ] pub type PDI19_R = crate :: R < bool , PDI19_A > ; impl PDI19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI19_A { match self . bits { false => PDI19_A :: _0 , true => PDI19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI19_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI20_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI20_A ) -> Self { match variant { PDI20_A :: _0 => false , PDI20_A :: _1 => true } } } # [ doc = "Reader of field `PDI20`" ] pub type PDI20_R = crate :: R < bool , PDI20_A > ; impl PDI20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI20_A { match self . bits { false => PDI20_A :: _0 , true => PDI20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI20_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI21_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI21_A ) -> Self { match variant { PDI21_A :: _0 => false , PDI21_A :: _1 => true } } } # [ doc = "Reader of field `PDI21`" ] pub type PDI21_R = crate :: R < bool , PDI21_A > ; impl PDI21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI21_A { match self . bits { false => PDI21_A :: _0 , true => PDI21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI21_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI22_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI22_A ) -> Self { match variant { PDI22_A :: _0 => false , PDI22_A :: _1 => true } } } # [ doc = "Reader of field `PDI22`" ] pub type PDI22_R = crate :: R < bool , PDI22_A > ; impl PDI22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI22_A { match self . bits { false => PDI22_A :: _0 , true => PDI22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI22_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI23_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI23_A ) -> Self { match variant { PDI23_A :: _0 => false , PDI23_A :: _1 => true } } } # [ doc = "Reader of field `PDI23`" ] pub type PDI23_R = crate :: R < bool , PDI23_A > ; impl PDI23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI23_A { match self . bits { false => PDI23_A :: _0 , true => PDI23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI23_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI24_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI24_A ) -> Self { match variant { PDI24_A :: _0 => false , PDI24_A :: _1 => true } } } # [ doc = "Reader of field `PDI24`" ] pub type PDI24_R = crate :: R < bool , PDI24_A > ; impl PDI24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI24_A { match self . bits { false => PDI24_A :: _0 , true => PDI24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI24_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI25_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI25_A ) -> Self { match variant { PDI25_A :: _0 => false , PDI25_A :: _1 => true } } } # [ doc = "Reader of field `PDI25`" ] pub type PDI25_R = crate :: R < bool , PDI25_A > ; impl PDI25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI25_A { match self . bits { false => PDI25_A :: _0 , true => PDI25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI25_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI26_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI26_A ) -> Self { match variant { PDI26_A :: _0 => false , PDI26_A :: _1 => true } } } # [ doc = "Reader of field `PDI26`" ] pub type PDI26_R = crate :: R < bool , PDI26_A > ; impl PDI26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI26_A { match self . bits { false => PDI26_A :: _0 , true => PDI26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI26_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI27_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI27_A ) -> Self { match variant { PDI27_A :: _0 => false , PDI27_A :: _1 => true } } } # [ doc = "Reader of field `PDI27`" ] pub type PDI27_R = crate :: R < bool , PDI27_A > ; impl PDI27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI27_A { match self . bits { false => PDI27_A :: _0 , true => PDI27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI27_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI28_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI28_A ) -> Self { match variant { PDI28_A :: _0 => false , PDI28_A :: _1 => true } } } # [ doc = "Reader of field `PDI28`" ] pub type PDI28_R = crate :: R < bool , PDI28_A > ; impl PDI28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI28_A { match self . bits { false => PDI28_A :: _0 , true => PDI28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI28_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI29_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI29_A ) -> Self { match variant { PDI29_A :: _0 => false , PDI29_A :: _1 => true } } } # [ doc = "Reader of field `PDI29`" ] pub type PDI29_R = crate :: R < bool , PDI29_A > ; impl PDI29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI29_A { match self . bits { false => PDI29_A :: _0 , true => PDI29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI29_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI30_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI30_A ) -> Self { match variant { PDI30_A :: _0 => false , PDI30_A :: _1 => true } } } # [ doc = "Reader of field `PDI30`" ] pub type PDI30_R = crate :: R < bool , PDI30_A > ; impl PDI30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI30_A { match self . bits { false => PDI30_A :: _0 , true => PDI30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI30_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI31_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI31_A ) -> Self { match variant { PDI31_A :: _0 => false , PDI31_A :: _1 => true } } } # [ doc = "Reader of field `PDI31`" ] pub type PDI31_R = crate :: R < bool , PDI31_A > ; impl PDI31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI31_A { match self . bits { false => PDI31_A :: _0 , true => PDI31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI31_A :: _1 } } impl R { # [ doc = "Bit 0 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi0 ( & self ) -> PDI0_R { PDI0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi1 ( & self ) -> PDI1_R { PDI1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi2 ( & self ) -> PDI2_R { PDI2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi3 ( & self ) -> PDI3_R { PDI3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi4 ( & self ) -> PDI4_R { PDI4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi5 ( & self ) -> PDI5_R { PDI5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi6 ( & self ) -> PDI6_R { PDI6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi7 ( & self ) -> PDI7_R { PDI7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi8 ( & self ) -> PDI8_R { PDI8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi9 ( & self ) -> PDI9_R { PDI9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi10 ( & self ) -> PDI10_R { PDI10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi11 ( & self ) -> PDI11_R { PDI11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi12 ( & self ) -> PDI12_R { PDI12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi13 ( & self ) -> PDI13_R { PDI13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi14 ( & self ) -> PDI14_R { PDI14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi15 ( & self ) -> PDI15_R { PDI15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi16 ( & self ) -> PDI16_R { PDI16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi17 ( & self ) -> PDI17_R { PDI17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi18 ( & self ) -> PDI18_R { PDI18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi19 ( & self ) -> PDI19_R { PDI19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi20 ( & self ) -> PDI20_R { PDI20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi21 ( & self ) -> PDI21_R { PDI21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi22 ( & self ) -> PDI22_R { PDI22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi23 ( & self ) -> PDI23_R { PDI23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi24 ( & self ) -> PDI24_R { PDI24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi25 ( & self ) -> PDI25_R { PDI25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi26 ( & self ) -> PDI26_R { PDI26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi27 ( & self ) -> PDI27_R { PDI27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi28 ( & self ) -> PDI28_R { PDI28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi29 ( & self ) -> PDI29_R { PDI29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi30 ( & self ) -> PDI30_R { PDI30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi31 ( & self ) -> PDI31_R { PDI31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Port Data Direction Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pddr](pddr) module" ] pub type PDDR = crate :: Reg < u32 , _PDDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDDR ; # [ doc = "`read()` method returns [pddr::R](pddr::R) reader structure" ] impl crate :: Readable for PDDR { } # [ doc = "`write(|w| ..)` method takes [pddr::W](pddr::W) writer structure" ] impl crate :: Writable for PDDR { } # [ doc = "Port Data Direction Register" ] pub mod pddr { # [ doc = "Reader of register PDDR" ] pub type R = crate :: R < u32 , super :: PDDR > ; # [ doc = "Writer for register PDDR" ] pub type W = crate :: W < u32 , super :: PDDR > ; # [ doc = "Register PDDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD0_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD0_A ) -> Self { match variant { PDD0_A :: _0 => false , PDD0_A :: _1 => true } } } # [ doc = "Reader of field `PDD0`" ] pub type PDD0_R = crate :: R < bool , PDD0_A > ; impl PDD0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD0_A { match self . bits { false => PDD0_A :: _0 , true => PDD0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD0_A :: _1 } } # [ doc = "Write proxy for field `PDD0`" ] pub struct PDD0_W < 'a > { w : & 'a mut W , } impl < 'a > PDD0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD1_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD1_A ) -> Self { match variant { PDD1_A :: _0 => false , PDD1_A :: _1 => true } } } # [ doc = "Reader of field `PDD1`" ] pub type PDD1_R = crate :: R < bool , PDD1_A > ; impl PDD1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD1_A { match self . bits { false => PDD1_A :: _0 , true => PDD1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD1_A :: _1 } } # [ doc = "Write proxy for field `PDD1`" ] pub struct PDD1_W < 'a > { w : & 'a mut W , } impl < 'a > PDD1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD2_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD2_A ) -> Self { match variant { PDD2_A :: _0 => false , PDD2_A :: _1 => true } } } # [ doc = "Reader of field `PDD2`" ] pub type PDD2_R = crate :: R < bool , PDD2_A > ; impl PDD2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD2_A { match self . bits { false => PDD2_A :: _0 , true => PDD2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD2_A :: _1 } } # [ doc = "Write proxy for field `PDD2`" ] pub struct PDD2_W < 'a > { w : & 'a mut W , } impl < 'a > PDD2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD3_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD3_A ) -> Self { match variant { PDD3_A :: _0 => false , PDD3_A :: _1 => true } } } # [ doc = "Reader of field `PDD3`" ] pub type PDD3_R = crate :: R < bool , PDD3_A > ; impl PDD3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD3_A { match self . bits { false => PDD3_A :: _0 , true => PDD3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD3_A :: _1 } } # [ doc = "Write proxy for field `PDD3`" ] pub struct PDD3_W < 'a > { w : & 'a mut W , } impl < 'a > PDD3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD4_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD4_A ) -> Self { match variant { PDD4_A :: _0 => false , PDD4_A :: _1 => true } } } # [ doc = "Reader of field `PDD4`" ] pub type PDD4_R = crate :: R < bool , PDD4_A > ; impl PDD4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD4_A { match self . bits { false => PDD4_A :: _0 , true => PDD4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD4_A :: _1 } } # [ doc = "Write proxy for field `PDD4`" ] pub struct PDD4_W < 'a > { w : & 'a mut W , } impl < 'a > PDD4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD5_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD5_A ) -> Self { match variant { PDD5_A :: _0 => false , PDD5_A :: _1 => true } } } # [ doc = "Reader of field `PDD5`" ] pub type PDD5_R = crate :: R < bool , PDD5_A > ; impl PDD5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD5_A { match self . bits { false => PDD5_A :: _0 , true => PDD5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD5_A :: _1 } } # [ doc = "Write proxy for field `PDD5`" ] pub struct PDD5_W < 'a > { w : & 'a mut W , } impl < 'a > PDD5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD6_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD6_A ) -> Self { match variant { PDD6_A :: _0 => false , PDD6_A :: _1 => true } } } # [ doc = "Reader of field `PDD6`" ] pub type PDD6_R = crate :: R < bool , PDD6_A > ; impl PDD6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD6_A { match self . bits { false => PDD6_A :: _0 , true => PDD6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD6_A :: _1 } } # [ doc = "Write proxy for field `PDD6`" ] pub struct PDD6_W < 'a > { w : & 'a mut W , } impl < 'a > PDD6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD7_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD7_A ) -> Self { match variant { PDD7_A :: _0 => false , PDD7_A :: _1 => true } } } # [ doc = "Reader of field `PDD7`" ] pub type PDD7_R = crate :: R < bool , PDD7_A > ; impl PDD7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD7_A { match self . bits { false => PDD7_A :: _0 , true => PDD7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD7_A :: _1 } } # [ doc = "Write proxy for field `PDD7`" ] pub struct PDD7_W < 'a > { w : & 'a mut W , } impl < 'a > PDD7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD8_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD8_A ) -> Self { match variant { PDD8_A :: _0 => false , PDD8_A :: _1 => true } } } # [ doc = "Reader of field `PDD8`" ] pub type PDD8_R = crate :: R < bool , PDD8_A > ; impl PDD8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD8_A { match self . bits { false => PDD8_A :: _0 , true => PDD8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD8_A :: _1 } } # [ doc = "Write proxy for field `PDD8`" ] pub struct PDD8_W < 'a > { w : & 'a mut W , } impl < 'a > PDD8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD9_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD9_A ) -> Self { match variant { PDD9_A :: _0 => false , PDD9_A :: _1 => true } } } # [ doc = "Reader of field `PDD9`" ] pub type PDD9_R = crate :: R < bool , PDD9_A > ; impl PDD9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD9_A { match self . bits { false => PDD9_A :: _0 , true => PDD9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD9_A :: _1 } } # [ doc = "Write proxy for field `PDD9`" ] pub struct PDD9_W < 'a > { w : & 'a mut W , } impl < 'a > PDD9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD10_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD10_A ) -> Self { match variant { PDD10_A :: _0 => false , PDD10_A :: _1 => true } } } # [ doc = "Reader of field `PDD10`" ] pub type PDD10_R = crate :: R < bool , PDD10_A > ; impl PDD10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD10_A { match self . bits { false => PDD10_A :: _0 , true => PDD10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD10_A :: _1 } } # [ doc = "Write proxy for field `PDD10`" ] pub struct PDD10_W < 'a > { w : & 'a mut W , } impl < 'a > PDD10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD11_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD11_A ) -> Self { match variant { PDD11_A :: _0 => false , PDD11_A :: _1 => true } } } # [ doc = "Reader of field `PDD11`" ] pub type PDD11_R = crate :: R < bool , PDD11_A > ; impl PDD11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD11_A { match self . bits { false => PDD11_A :: _0 , true => PDD11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD11_A :: _1 } } # [ doc = "Write proxy for field `PDD11`" ] pub struct PDD11_W < 'a > { w : & 'a mut W , } impl < 'a > PDD11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD12_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD12_A ) -> Self { match variant { PDD12_A :: _0 => false , PDD12_A :: _1 => true } } } # [ doc = "Reader of field `PDD12`" ] pub type PDD12_R = crate :: R < bool , PDD12_A > ; impl PDD12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD12_A { match self . bits { false => PDD12_A :: _0 , true => PDD12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD12_A :: _1 } } # [ doc = "Write proxy for field `PDD12`" ] pub struct PDD12_W < 'a > { w : & 'a mut W , } impl < 'a > PDD12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD13_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD13_A ) -> Self { match variant { PDD13_A :: _0 => false , PDD13_A :: _1 => true } } } # [ doc = "Reader of field `PDD13`" ] pub type PDD13_R = crate :: R < bool , PDD13_A > ; impl PDD13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD13_A { match self . bits { false => PDD13_A :: _0 , true => PDD13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD13_A :: _1 } } # [ doc = "Write proxy for field `PDD13`" ] pub struct PDD13_W < 'a > { w : & 'a mut W , } impl < 'a > PDD13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD14_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD14_A ) -> Self { match variant { PDD14_A :: _0 => false , PDD14_A :: _1 => true } } } # [ doc = "Reader of field `PDD14`" ] pub type PDD14_R = crate :: R < bool , PDD14_A > ; impl PDD14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD14_A { match self . bits { false => PDD14_A :: _0 , true => PDD14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD14_A :: _1 } } # [ doc = "Write proxy for field `PDD14`" ] pub struct PDD14_W < 'a > { w : & 'a mut W , } impl < 'a > PDD14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD15_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD15_A ) -> Self { match variant { PDD15_A :: _0 => false , PDD15_A :: _1 => true } } } # [ doc = "Reader of field `PDD15`" ] pub type PDD15_R = crate :: R < bool , PDD15_A > ; impl PDD15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD15_A { match self . bits { false => PDD15_A :: _0 , true => PDD15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD15_A :: _1 } } # [ doc = "Write proxy for field `PDD15`" ] pub struct PDD15_W < 'a > { w : & 'a mut W , } impl < 'a > PDD15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD16_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD16_A ) -> Self { match variant { PDD16_A :: _0 => false , PDD16_A :: _1 => true } } } # [ doc = "Reader of field `PDD16`" ] pub type PDD16_R = crate :: R < bool , PDD16_A > ; impl PDD16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD16_A { match self . bits { false => PDD16_A :: _0 , true => PDD16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD16_A :: _1 } } # [ doc = "Write proxy for field `PDD16`" ] pub struct PDD16_W < 'a > { w : & 'a mut W , } impl < 'a > PDD16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD17_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD17_A ) -> Self { match variant { PDD17_A :: _0 => false , PDD17_A :: _1 => true } } } # [ doc = "Reader of field `PDD17`" ] pub type PDD17_R = crate :: R < bool , PDD17_A > ; impl PDD17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD17_A { match self . bits { false => PDD17_A :: _0 , true => PDD17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD17_A :: _1 } } # [ doc = "Write proxy for field `PDD17`" ] pub struct PDD17_W < 'a > { w : & 'a mut W , } impl < 'a > PDD17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD18_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD18_A ) -> Self { match variant { PDD18_A :: _0 => false , PDD18_A :: _1 => true } } } # [ doc = "Reader of field `PDD18`" ] pub type PDD18_R = crate :: R < bool , PDD18_A > ; impl PDD18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD18_A { match self . bits { false => PDD18_A :: _0 , true => PDD18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD18_A :: _1 } } # [ doc = "Write proxy for field `PDD18`" ] pub struct PDD18_W < 'a > { w : & 'a mut W , } impl < 'a > PDD18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD19_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD19_A ) -> Self { match variant { PDD19_A :: _0 => false , PDD19_A :: _1 => true } } } # [ doc = "Reader of field `PDD19`" ] pub type PDD19_R = crate :: R < bool , PDD19_A > ; impl PDD19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD19_A { match self . bits { false => PDD19_A :: _0 , true => PDD19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD19_A :: _1 } } # [ doc = "Write proxy for field `PDD19`" ] pub struct PDD19_W < 'a > { w : & 'a mut W , } impl < 'a > PDD19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD20_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD20_A ) -> Self { match variant { PDD20_A :: _0 => false , PDD20_A :: _1 => true } } } # [ doc = "Reader of field `PDD20`" ] pub type PDD20_R = crate :: R < bool , PDD20_A > ; impl PDD20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD20_A { match self . bits { false => PDD20_A :: _0 , true => PDD20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD20_A :: _1 } } # [ doc = "Write proxy for field `PDD20`" ] pub struct PDD20_W < 'a > { w : & 'a mut W , } impl < 'a > PDD20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD21_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD21_A ) -> Self { match variant { PDD21_A :: _0 => false , PDD21_A :: _1 => true } } } # [ doc = "Reader of field `PDD21`" ] pub type PDD21_R = crate :: R < bool , PDD21_A > ; impl PDD21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD21_A { match self . bits { false => PDD21_A :: _0 , true => PDD21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD21_A :: _1 } } # [ doc = "Write proxy for field `PDD21`" ] pub struct PDD21_W < 'a > { w : & 'a mut W , } impl < 'a > PDD21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD22_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD22_A ) -> Self { match variant { PDD22_A :: _0 => false , PDD22_A :: _1 => true } } } # [ doc = "Reader of field `PDD22`" ] pub type PDD22_R = crate :: R < bool , PDD22_A > ; impl PDD22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD22_A { match self . bits { false => PDD22_A :: _0 , true => PDD22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD22_A :: _1 } } # [ doc = "Write proxy for field `PDD22`" ] pub struct PDD22_W < 'a > { w : & 'a mut W , } impl < 'a > PDD22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD23_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD23_A ) -> Self { match variant { PDD23_A :: _0 => false , PDD23_A :: _1 => true } } } # [ doc = "Reader of field `PDD23`" ] pub type PDD23_R = crate :: R < bool , PDD23_A > ; impl PDD23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD23_A { match self . bits { false => PDD23_A :: _0 , true => PDD23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD23_A :: _1 } } # [ doc = "Write proxy for field `PDD23`" ] pub struct PDD23_W < 'a > { w : & 'a mut W , } impl < 'a > PDD23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD24_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD24_A ) -> Self { match variant { PDD24_A :: _0 => false , PDD24_A :: _1 => true } } } # [ doc = "Reader of field `PDD24`" ] pub type PDD24_R = crate :: R < bool , PDD24_A > ; impl PDD24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD24_A { match self . bits { false => PDD24_A :: _0 , true => PDD24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD24_A :: _1 } } # [ doc = "Write proxy for field `PDD24`" ] pub struct PDD24_W < 'a > { w : & 'a mut W , } impl < 'a > PDD24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD25_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD25_A ) -> Self { match variant { PDD25_A :: _0 => false , PDD25_A :: _1 => true } } } # [ doc = "Reader of field `PDD25`" ] pub type PDD25_R = crate :: R < bool , PDD25_A > ; impl PDD25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD25_A { match self . bits { false => PDD25_A :: _0 , true => PDD25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD25_A :: _1 } } # [ doc = "Write proxy for field `PDD25`" ] pub struct PDD25_W < 'a > { w : & 'a mut W , } impl < 'a > PDD25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD26_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD26_A ) -> Self { match variant { PDD26_A :: _0 => false , PDD26_A :: _1 => true } } } # [ doc = "Reader of field `PDD26`" ] pub type PDD26_R = crate :: R < bool , PDD26_A > ; impl PDD26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD26_A { match self . bits { false => PDD26_A :: _0 , true => PDD26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD26_A :: _1 } } # [ doc = "Write proxy for field `PDD26`" ] pub struct PDD26_W < 'a > { w : & 'a mut W , } impl < 'a > PDD26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD27_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD27_A ) -> Self { match variant { PDD27_A :: _0 => false , PDD27_A :: _1 => true } } } # [ doc = "Reader of field `PDD27`" ] pub type PDD27_R = crate :: R < bool , PDD27_A > ; impl PDD27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD27_A { match self . bits { false => PDD27_A :: _0 , true => PDD27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD27_A :: _1 } } # [ doc = "Write proxy for field `PDD27`" ] pub struct PDD27_W < 'a > { w : & 'a mut W , } impl < 'a > PDD27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD28_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD28_A ) -> Self { match variant { PDD28_A :: _0 => false , PDD28_A :: _1 => true } } } # [ doc = "Reader of field `PDD28`" ] pub type PDD28_R = crate :: R < bool , PDD28_A > ; impl PDD28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD28_A { match self . bits { false => PDD28_A :: _0 , true => PDD28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD28_A :: _1 } } # [ doc = "Write proxy for field `PDD28`" ] pub struct PDD28_W < 'a > { w : & 'a mut W , } impl < 'a > PDD28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD29_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD29_A ) -> Self { match variant { PDD29_A :: _0 => false , PDD29_A :: _1 => true } } } # [ doc = "Reader of field `PDD29`" ] pub type PDD29_R = crate :: R < bool , PDD29_A > ; impl PDD29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD29_A { match self . bits { false => PDD29_A :: _0 , true => PDD29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD29_A :: _1 } } # [ doc = "Write proxy for field `PDD29`" ] pub struct PDD29_W < 'a > { w : & 'a mut W , } impl < 'a > PDD29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD30_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD30_A ) -> Self { match variant { PDD30_A :: _0 => false , PDD30_A :: _1 => true } } } # [ doc = "Reader of field `PDD30`" ] pub type PDD30_R = crate :: R < bool , PDD30_A > ; impl PDD30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD30_A { match self . bits { false => PDD30_A :: _0 , true => PDD30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD30_A :: _1 } } # [ doc = "Write proxy for field `PDD30`" ] pub struct PDD30_W < 'a > { w : & 'a mut W , } impl < 'a > PDD30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD31_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD31_A ) -> Self { match variant { PDD31_A :: _0 => false , PDD31_A :: _1 => true } } } # [ doc = "Reader of field `PDD31`" ] pub type PDD31_R = crate :: R < bool , PDD31_A > ; impl PDD31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD31_A { match self . bits { false => PDD31_A :: _0 , true => PDD31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD31_A :: _1 } } # [ doc = "Write proxy for field `PDD31`" ] pub struct PDD31_W < 'a > { w : & 'a mut W , } impl < 'a > PDD31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & self ) -> PDD0_R { PDD0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & self ) -> PDD1_R { PDD1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & self ) -> PDD2_R { PDD2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & self ) -> PDD3_R { PDD3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & self ) -> PDD4_R { PDD4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & self ) -> PDD5_R { PDD5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & self ) -> PDD6_R { PDD6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & self ) -> PDD7_R { PDD7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & self ) -> PDD8_R { PDD8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & self ) -> PDD9_R { PDD9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & self ) -> PDD10_R { PDD10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & self ) -> PDD11_R { PDD11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & self ) -> PDD12_R { PDD12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & self ) -> PDD13_R { PDD13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & self ) -> PDD14_R { PDD14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & self ) -> PDD15_R { PDD15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & self ) -> PDD16_R { PDD16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & self ) -> PDD17_R { PDD17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & self ) -> PDD18_R { PDD18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & self ) -> PDD19_R { PDD19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & self ) -> PDD20_R { PDD20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & self ) -> PDD21_R { PDD21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & self ) -> PDD22_R { PDD22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & self ) -> PDD23_R { PDD23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & self ) -> PDD24_R { PDD24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & self ) -> PDD25_R { PDD25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & self ) -> PDD26_R { PDD26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & self ) -> PDD27_R { PDD27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & self ) -> PDD28_R { PDD28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & self ) -> PDD29_R { PDD29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & self ) -> PDD30_R { PDD30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & self ) -> PDD31_R { PDD31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & mut self ) -> PDD0_W { PDD0_W { w : self } } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & mut self ) -> PDD1_W { PDD1_W { w : self } } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & mut self ) -> PDD2_W { PDD2_W { w : self } } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & mut self ) -> PDD3_W { PDD3_W { w : self } } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & mut self ) -> PDD4_W { PDD4_W { w : self } } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & mut self ) -> PDD5_W { PDD5_W { w : self } } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & mut self ) -> PDD6_W { PDD6_W { w : self } } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & mut self ) -> PDD7_W { PDD7_W { w : self } } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & mut self ) -> PDD8_W { PDD8_W { w : self } } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & mut self ) -> PDD9_W { PDD9_W { w : self } } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & mut self ) -> PDD10_W { PDD10_W { w : self } } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & mut self ) -> PDD11_W { PDD11_W { w : self } } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & mut self ) -> PDD12_W { PDD12_W { w : self } } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & mut self ) -> PDD13_W { PDD13_W { w : self } } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & mut self ) -> PDD14_W { PDD14_W { w : self } } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & mut self ) -> PDD15_W { PDD15_W { w : self } } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & mut self ) -> PDD16_W { PDD16_W { w : self } } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & mut self ) -> PDD17_W { PDD17_W { w : self } } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & mut self ) -> PDD18_W { PDD18_W { w : self } } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & mut self ) -> PDD19_W { PDD19_W { w : self } } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & mut self ) -> PDD20_W { PDD20_W { w : self } } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & mut self ) -> PDD21_W { PDD21_W { w : self } } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & mut self ) -> PDD22_W { PDD22_W { w : self } } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & mut self ) -> PDD23_W { PDD23_W { w : self } } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & mut self ) -> PDD24_W { PDD24_W { w : self } } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & mut self ) -> PDD25_W { PDD25_W { w : self } } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & mut self ) -> PDD26_W { PDD26_W { w : self } } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & mut self ) -> PDD27_W { PDD27_W { w : self } } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & mut self ) -> PDD28_W { PDD28_W { w : self } } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & mut self ) -> PDD29_W { PDD29_W { w : self } } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & mut self ) -> PDD30_W { PDD30_W { w : self } } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & mut self ) -> PDD31_W { PDD31_W { w : self } } } } } # [ doc = "General Purpose Input/Output" ] pub struct GPIOE { _marker : PhantomData < * const ( ) > } unsafe impl Send for GPIOE { } impl GPIOE { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const gpioe :: RegisterBlock { 0x400f_f100 as * const _ } } impl Deref for GPIOE { type Target = gpioe :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * GPIOE :: ptr ( ) } } } # [ doc = "General Purpose Input/Output" ] pub mod gpioe { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Port Data Output Register" ] pub pdor : PDOR , # [ doc = "0x04 - Port Set Output Register" ] pub psor : PSOR , # [ doc = "0x08 - Port Clear Output Register" ] pub pcor : PCOR , # [ doc = "0x0c - Port Toggle Output Register" ] pub ptor : PTOR , # [ doc = "0x10 - Port Data Input Register" ] pub pdir : PDIR , # [ doc = "0x14 - Port Data Direction Register" ] pub pddr : PDDR , } # [ doc = "Port Data Output Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdor](pdor) module" ] pub type PDOR = crate :: Reg < u32 , _PDOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDOR ; # [ doc = "`read()` method returns [pdor::R](pdor::R) reader structure" ] impl crate :: Readable for PDOR { } # [ doc = "`write(|w| ..)` method takes [pdor::W](pdor::W) writer structure" ] impl crate :: Writable for PDOR { } # [ doc = "Port Data Output Register" ] pub mod pdor { # [ doc = "Reader of register PDOR" ] pub type R = crate :: R < u32 , super :: PDOR > ; # [ doc = "Writer for register PDOR" ] pub type W = crate :: W < u32 , super :: PDOR > ; # [ doc = "Register PDOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO0_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO0_A ) -> Self { match variant { PDO0_A :: _0 => false , PDO0_A :: _1 => true } } } # [ doc = "Reader of field `PDO0`" ] pub type PDO0_R = crate :: R < bool , PDO0_A > ; impl PDO0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO0_A { match self . bits { false => PDO0_A :: _0 , true => PDO0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO0_A :: _1 } } # [ doc = "Write proxy for field `PDO0`" ] pub struct PDO0_W < 'a > { w : & 'a mut W , } impl < 'a > PDO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO1_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO1_A ) -> Self { match variant { PDO1_A :: _0 => false , PDO1_A :: _1 => true } } } # [ doc = "Reader of field `PDO1`" ] pub type PDO1_R = crate :: R < bool , PDO1_A > ; impl PDO1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO1_A { match self . bits { false => PDO1_A :: _0 , true => PDO1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO1_A :: _1 } } # [ doc = "Write proxy for field `PDO1`" ] pub struct PDO1_W < 'a > { w : & 'a mut W , } impl < 'a > PDO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO2_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO2_A ) -> Self { match variant { PDO2_A :: _0 => false , PDO2_A :: _1 => true } } } # [ doc = "Reader of field `PDO2`" ] pub type PDO2_R = crate :: R < bool , PDO2_A > ; impl PDO2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO2_A { match self . bits { false => PDO2_A :: _0 , true => PDO2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO2_A :: _1 } } # [ doc = "Write proxy for field `PDO2`" ] pub struct PDO2_W < 'a > { w : & 'a mut W , } impl < 'a > PDO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO2_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO3_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO3_A ) -> Self { match variant { PDO3_A :: _0 => false , PDO3_A :: _1 => true } } } # [ doc = "Reader of field `PDO3`" ] pub type PDO3_R = crate :: R < bool , PDO3_A > ; impl PDO3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO3_A { match self . bits { false => PDO3_A :: _0 , true => PDO3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO3_A :: _1 } } # [ doc = "Write proxy for field `PDO3`" ] pub struct PDO3_W < 'a > { w : & 'a mut W , } impl < 'a > PDO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO4_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO4_A ) -> Self { match variant { PDO4_A :: _0 => false , PDO4_A :: _1 => true } } } # [ doc = "Reader of field `PDO4`" ] pub type PDO4_R = crate :: R < bool , PDO4_A > ; impl PDO4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO4_A { match self . bits { false => PDO4_A :: _0 , true => PDO4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO4_A :: _1 } } # [ doc = "Write proxy for field `PDO4`" ] pub struct PDO4_W < 'a > { w : & 'a mut W , } impl < 'a > PDO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO5_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO5_A ) -> Self { match variant { PDO5_A :: _0 => false , PDO5_A :: _1 => true } } } # [ doc = "Reader of field `PDO5`" ] pub type PDO5_R = crate :: R < bool , PDO5_A > ; impl PDO5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO5_A { match self . bits { false => PDO5_A :: _0 , true => PDO5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO5_A :: _1 } } # [ doc = "Write proxy for field `PDO5`" ] pub struct PDO5_W < 'a > { w : & 'a mut W , } impl < 'a > PDO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO5_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO6_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO6_A ) -> Self { match variant { PDO6_A :: _0 => false , PDO6_A :: _1 => true } } } # [ doc = "Reader of field `PDO6`" ] pub type PDO6_R = crate :: R < bool , PDO6_A > ; impl PDO6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO6_A { match self . bits { false => PDO6_A :: _0 , true => PDO6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO6_A :: _1 } } # [ doc = "Write proxy for field `PDO6`" ] pub struct PDO6_W < 'a > { w : & 'a mut W , } impl < 'a > PDO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO6_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO7_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO7_A ) -> Self { match variant { PDO7_A :: _0 => false , PDO7_A :: _1 => true } } } # [ doc = "Reader of field `PDO7`" ] pub type PDO7_R = crate :: R < bool , PDO7_A > ; impl PDO7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO7_A { match self . bits { false => PDO7_A :: _0 , true => PDO7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO7_A :: _1 } } # [ doc = "Write proxy for field `PDO7`" ] pub struct PDO7_W < 'a > { w : & 'a mut W , } impl < 'a > PDO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO7_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO8_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO8_A ) -> Self { match variant { PDO8_A :: _0 => false , PDO8_A :: _1 => true } } } # [ doc = "Reader of field `PDO8`" ] pub type PDO8_R = crate :: R < bool , PDO8_A > ; impl PDO8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO8_A { match self . bits { false => PDO8_A :: _0 , true => PDO8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO8_A :: _1 } } # [ doc = "Write proxy for field `PDO8`" ] pub struct PDO8_W < 'a > { w : & 'a mut W , } impl < 'a > PDO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO9_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO9_A ) -> Self { match variant { PDO9_A :: _0 => false , PDO9_A :: _1 => true } } } # [ doc = "Reader of field `PDO9`" ] pub type PDO9_R = crate :: R < bool , PDO9_A > ; impl PDO9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO9_A { match self . bits { false => PDO9_A :: _0 , true => PDO9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO9_A :: _1 } } # [ doc = "Write proxy for field `PDO9`" ] pub struct PDO9_W < 'a > { w : & 'a mut W , } impl < 'a > PDO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO10_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO10_A ) -> Self { match variant { PDO10_A :: _0 => false , PDO10_A :: _1 => true } } } # [ doc = "Reader of field `PDO10`" ] pub type PDO10_R = crate :: R < bool , PDO10_A > ; impl PDO10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO10_A { match self . bits { false => PDO10_A :: _0 , true => PDO10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO10_A :: _1 } } # [ doc = "Write proxy for field `PDO10`" ] pub struct PDO10_W < 'a > { w : & 'a mut W , } impl < 'a > PDO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO11_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO11_A ) -> Self { match variant { PDO11_A :: _0 => false , PDO11_A :: _1 => true } } } # [ doc = "Reader of field `PDO11`" ] pub type PDO11_R = crate :: R < bool , PDO11_A > ; impl PDO11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO11_A { match self . bits { false => PDO11_A :: _0 , true => PDO11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO11_A :: _1 } } # [ doc = "Write proxy for field `PDO11`" ] pub struct PDO11_W < 'a > { w : & 'a mut W , } impl < 'a > PDO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO12_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO12_A ) -> Self { match variant { PDO12_A :: _0 => false , PDO12_A :: _1 => true } } } # [ doc = "Reader of field `PDO12`" ] pub type PDO12_R = crate :: R < bool , PDO12_A > ; impl PDO12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO12_A { match self . bits { false => PDO12_A :: _0 , true => PDO12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO12_A :: _1 } } # [ doc = "Write proxy for field `PDO12`" ] pub struct PDO12_W < 'a > { w : & 'a mut W , } impl < 'a > PDO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO13_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO13_A ) -> Self { match variant { PDO13_A :: _0 => false , PDO13_A :: _1 => true } } } # [ doc = "Reader of field `PDO13`" ] pub type PDO13_R = crate :: R < bool , PDO13_A > ; impl PDO13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO13_A { match self . bits { false => PDO13_A :: _0 , true => PDO13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO13_A :: _1 } } # [ doc = "Write proxy for field `PDO13`" ] pub struct PDO13_W < 'a > { w : & 'a mut W , } impl < 'a > PDO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO13_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO14_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO14_A ) -> Self { match variant { PDO14_A :: _0 => false , PDO14_A :: _1 => true } } } # [ doc = "Reader of field `PDO14`" ] pub type PDO14_R = crate :: R < bool , PDO14_A > ; impl PDO14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO14_A { match self . bits { false => PDO14_A :: _0 , true => PDO14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO14_A :: _1 } } # [ doc = "Write proxy for field `PDO14`" ] pub struct PDO14_W < 'a > { w : & 'a mut W , } impl < 'a > PDO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO15_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO15_A ) -> Self { match variant { PDO15_A :: _0 => false , PDO15_A :: _1 => true } } } # [ doc = "Reader of field `PDO15`" ] pub type PDO15_R = crate :: R < bool , PDO15_A > ; impl PDO15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO15_A { match self . bits { false => PDO15_A :: _0 , true => PDO15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO15_A :: _1 } } # [ doc = "Write proxy for field `PDO15`" ] pub struct PDO15_W < 'a > { w : & 'a mut W , } impl < 'a > PDO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO16_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO16_A ) -> Self { match variant { PDO16_A :: _0 => false , PDO16_A :: _1 => true } } } # [ doc = "Reader of field `PDO16`" ] pub type PDO16_R = crate :: R < bool , PDO16_A > ; impl PDO16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO16_A { match self . bits { false => PDO16_A :: _0 , true => PDO16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO16_A :: _1 } } # [ doc = "Write proxy for field `PDO16`" ] pub struct PDO16_W < 'a > { w : & 'a mut W , } impl < 'a > PDO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO17_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO17_A ) -> Self { match variant { PDO17_A :: _0 => false , PDO17_A :: _1 => true } } } # [ doc = "Reader of field `PDO17`" ] pub type PDO17_R = crate :: R < bool , PDO17_A > ; impl PDO17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO17_A { match self . bits { false => PDO17_A :: _0 , true => PDO17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO17_A :: _1 } } # [ doc = "Write proxy for field `PDO17`" ] pub struct PDO17_W < 'a > { w : & 'a mut W , } impl < 'a > PDO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO18_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO18_A ) -> Self { match variant { PDO18_A :: _0 => false , PDO18_A :: _1 => true } } } # [ doc = "Reader of field `PDO18`" ] pub type PDO18_R = crate :: R < bool , PDO18_A > ; impl PDO18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO18_A { match self . bits { false => PDO18_A :: _0 , true => PDO18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO18_A :: _1 } } # [ doc = "Write proxy for field `PDO18`" ] pub struct PDO18_W < 'a > { w : & 'a mut W , } impl < 'a > PDO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO19_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO19_A ) -> Self { match variant { PDO19_A :: _0 => false , PDO19_A :: _1 => true } } } # [ doc = "Reader of field `PDO19`" ] pub type PDO19_R = crate :: R < bool , PDO19_A > ; impl PDO19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO19_A { match self . bits { false => PDO19_A :: _0 , true => PDO19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO19_A :: _1 } } # [ doc = "Write proxy for field `PDO19`" ] pub struct PDO19_W < 'a > { w : & 'a mut W , } impl < 'a > PDO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO20_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO20_A ) -> Self { match variant { PDO20_A :: _0 => false , PDO20_A :: _1 => true } } } # [ doc = "Reader of field `PDO20`" ] pub type PDO20_R = crate :: R < bool , PDO20_A > ; impl PDO20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO20_A { match self . bits { false => PDO20_A :: _0 , true => PDO20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO20_A :: _1 } } # [ doc = "Write proxy for field `PDO20`" ] pub struct PDO20_W < 'a > { w : & 'a mut W , } impl < 'a > PDO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO20_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO21_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO21_A ) -> Self { match variant { PDO21_A :: _0 => false , PDO21_A :: _1 => true } } } # [ doc = "Reader of field `PDO21`" ] pub type PDO21_R = crate :: R < bool , PDO21_A > ; impl PDO21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO21_A { match self . bits { false => PDO21_A :: _0 , true => PDO21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO21_A :: _1 } } # [ doc = "Write proxy for field `PDO21`" ] pub struct PDO21_W < 'a > { w : & 'a mut W , } impl < 'a > PDO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO21_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO22_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO22_A ) -> Self { match variant { PDO22_A :: _0 => false , PDO22_A :: _1 => true } } } # [ doc = "Reader of field `PDO22`" ] pub type PDO22_R = crate :: R < bool , PDO22_A > ; impl PDO22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO22_A { match self . bits { false => PDO22_A :: _0 , true => PDO22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO22_A :: _1 } } # [ doc = "Write proxy for field `PDO22`" ] pub struct PDO22_W < 'a > { w : & 'a mut W , } impl < 'a > PDO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO23_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO23_A ) -> Self { match variant { PDO23_A :: _0 => false , PDO23_A :: _1 => true } } } # [ doc = "Reader of field `PDO23`" ] pub type PDO23_R = crate :: R < bool , PDO23_A > ; impl PDO23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO23_A { match self . bits { false => PDO23_A :: _0 , true => PDO23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO23_A :: _1 } } # [ doc = "Write proxy for field `PDO23`" ] pub struct PDO23_W < 'a > { w : & 'a mut W , } impl < 'a > PDO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO24_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO24_A ) -> Self { match variant { PDO24_A :: _0 => false , PDO24_A :: _1 => true } } } # [ doc = "Reader of field `PDO24`" ] pub type PDO24_R = crate :: R < bool , PDO24_A > ; impl PDO24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO24_A { match self . bits { false => PDO24_A :: _0 , true => PDO24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO24_A :: _1 } } # [ doc = "Write proxy for field `PDO24`" ] pub struct PDO24_W < 'a > { w : & 'a mut W , } impl < 'a > PDO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO24_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO25_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO25_A ) -> Self { match variant { PDO25_A :: _0 => false , PDO25_A :: _1 => true } } } # [ doc = "Reader of field `PDO25`" ] pub type PDO25_R = crate :: R < bool , PDO25_A > ; impl PDO25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO25_A { match self . bits { false => PDO25_A :: _0 , true => PDO25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO25_A :: _1 } } # [ doc = "Write proxy for field `PDO25`" ] pub struct PDO25_W < 'a > { w : & 'a mut W , } impl < 'a > PDO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO25_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO26_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO26_A ) -> Self { match variant { PDO26_A :: _0 => false , PDO26_A :: _1 => true } } } # [ doc = "Reader of field `PDO26`" ] pub type PDO26_R = crate :: R < bool , PDO26_A > ; impl PDO26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO26_A { match self . bits { false => PDO26_A :: _0 , true => PDO26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO26_A :: _1 } } # [ doc = "Write proxy for field `PDO26`" ] pub struct PDO26_W < 'a > { w : & 'a mut W , } impl < 'a > PDO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO26_A :: _1 ) } # [ 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 = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO27_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO27_A ) -> Self { match variant { PDO27_A :: _0 => false , PDO27_A :: _1 => true } } } # [ doc = "Reader of field `PDO27`" ] pub type PDO27_R = crate :: R < bool , PDO27_A > ; impl PDO27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO27_A { match self . bits { false => PDO27_A :: _0 , true => PDO27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO27_A :: _1 } } # [ doc = "Write proxy for field `PDO27`" ] pub struct PDO27_W < 'a > { w : & 'a mut W , } impl < 'a > PDO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO28_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO28_A ) -> Self { match variant { PDO28_A :: _0 => false , PDO28_A :: _1 => true } } } # [ doc = "Reader of field `PDO28`" ] pub type PDO28_R = crate :: R < bool , PDO28_A > ; impl PDO28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO28_A { match self . bits { false => PDO28_A :: _0 , true => PDO28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO28_A :: _1 } } # [ doc = "Write proxy for field `PDO28`" ] pub struct PDO28_W < 'a > { w : & 'a mut W , } impl < 'a > PDO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO29_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO29_A ) -> Self { match variant { PDO29_A :: _0 => false , PDO29_A :: _1 => true } } } # [ doc = "Reader of field `PDO29`" ] pub type PDO29_R = crate :: R < bool , PDO29_A > ; impl PDO29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO29_A { match self . bits { false => PDO29_A :: _0 , true => PDO29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO29_A :: _1 } } # [ doc = "Write proxy for field `PDO29`" ] pub struct PDO29_W < 'a > { w : & 'a mut W , } impl < 'a > PDO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO30_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO30_A ) -> Self { match variant { PDO30_A :: _0 => false , PDO30_A :: _1 => true } } } # [ doc = "Reader of field `PDO30`" ] pub type PDO30_R = crate :: R < bool , PDO30_A > ; impl PDO30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO30_A { match self . bits { false => PDO30_A :: _0 , true => PDO30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO30_A :: _1 } } # [ doc = "Write proxy for field `PDO30`" ] pub struct PDO30_W < 'a > { w : & 'a mut W , } impl < 'a > PDO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDO31_A { # [ doc = "0: Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] _0 , # [ doc = "1: Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] _1 } impl From < PDO31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDO31_A ) -> Self { match variant { PDO31_A :: _0 => false , PDO31_A :: _1 => true } } } # [ doc = "Reader of field `PDO31`" ] pub type PDO31_R = crate :: R < bool , PDO31_A > ; impl PDO31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDO31_A { match self . bits { false => PDO31_A :: _0 , true => PDO31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDO31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDO31_A :: _1 } } # [ doc = "Write proxy for field `PDO31`" ] pub struct PDO31_W < 'a > { w : & 'a mut W , } impl < 'a > PDO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDO31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Logic level 0 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _0 ) } # [ doc = "Logic level 1 is driven on pin, provided pin is configured for general-purpose output." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDO31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & self ) -> PDO0_R { PDO0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & self ) -> PDO1_R { PDO1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & self ) -> PDO2_R { PDO2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & self ) -> PDO3_R { PDO3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & self ) -> PDO4_R { PDO4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & self ) -> PDO5_R { PDO5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & self ) -> PDO6_R { PDO6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & self ) -> PDO7_R { PDO7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & self ) -> PDO8_R { PDO8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & self ) -> PDO9_R { PDO9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & self ) -> PDO10_R { PDO10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & self ) -> PDO11_R { PDO11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & self ) -> PDO12_R { PDO12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & self ) -> PDO13_R { PDO13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & self ) -> PDO14_R { PDO14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & self ) -> PDO15_R { PDO15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & self ) -> PDO16_R { PDO16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & self ) -> PDO17_R { PDO17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & self ) -> PDO18_R { PDO18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & self ) -> PDO19_R { PDO19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & self ) -> PDO20_R { PDO20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & self ) -> PDO21_R { PDO21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & self ) -> PDO22_R { PDO22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & self ) -> PDO23_R { PDO23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & self ) -> PDO24_R { PDO24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & self ) -> PDO25_R { PDO25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & self ) -> PDO26_R { PDO26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & self ) -> PDO27_R { PDO27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & self ) -> PDO28_R { PDO28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & self ) -> PDO29_R { PDO29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & self ) -> PDO30_R { PDO30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & self ) -> PDO31_R { PDO31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo0 ( & mut self ) -> PDO0_W { PDO0_W { w : self } } # [ doc = "Bit 1 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo1 ( & mut self ) -> PDO1_W { PDO1_W { w : self } } # [ doc = "Bit 2 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo2 ( & mut self ) -> PDO2_W { PDO2_W { w : self } } # [ doc = "Bit 3 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo3 ( & mut self ) -> PDO3_W { PDO3_W { w : self } } # [ doc = "Bit 4 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo4 ( & mut self ) -> PDO4_W { PDO4_W { w : self } } # [ doc = "Bit 5 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo5 ( & mut self ) -> PDO5_W { PDO5_W { w : self } } # [ doc = "Bit 6 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo6 ( & mut self ) -> PDO6_W { PDO6_W { w : self } } # [ doc = "Bit 7 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo7 ( & mut self ) -> PDO7_W { PDO7_W { w : self } } # [ doc = "Bit 8 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo8 ( & mut self ) -> PDO8_W { PDO8_W { w : self } } # [ doc = "Bit 9 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo9 ( & mut self ) -> PDO9_W { PDO9_W { w : self } } # [ doc = "Bit 10 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo10 ( & mut self ) -> PDO10_W { PDO10_W { w : self } } # [ doc = "Bit 11 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo11 ( & mut self ) -> PDO11_W { PDO11_W { w : self } } # [ doc = "Bit 12 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo12 ( & mut self ) -> PDO12_W { PDO12_W { w : self } } # [ doc = "Bit 13 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo13 ( & mut self ) -> PDO13_W { PDO13_W { w : self } } # [ doc = "Bit 14 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo14 ( & mut self ) -> PDO14_W { PDO14_W { w : self } } # [ doc = "Bit 15 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo15 ( & mut self ) -> PDO15_W { PDO15_W { w : self } } # [ doc = "Bit 16 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo16 ( & mut self ) -> PDO16_W { PDO16_W { w : self } } # [ doc = "Bit 17 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo17 ( & mut self ) -> PDO17_W { PDO17_W { w : self } } # [ doc = "Bit 18 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo18 ( & mut self ) -> PDO18_W { PDO18_W { w : self } } # [ doc = "Bit 19 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo19 ( & mut self ) -> PDO19_W { PDO19_W { w : self } } # [ doc = "Bit 20 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo20 ( & mut self ) -> PDO20_W { PDO20_W { w : self } } # [ doc = "Bit 21 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo21 ( & mut self ) -> PDO21_W { PDO21_W { w : self } } # [ doc = "Bit 22 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo22 ( & mut self ) -> PDO22_W { PDO22_W { w : self } } # [ doc = "Bit 23 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo23 ( & mut self ) -> PDO23_W { PDO23_W { w : self } } # [ doc = "Bit 24 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo24 ( & mut self ) -> PDO24_W { PDO24_W { w : self } } # [ doc = "Bit 25 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo25 ( & mut self ) -> PDO25_W { PDO25_W { w : self } } # [ doc = "Bit 26 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo26 ( & mut self ) -> PDO26_W { PDO26_W { w : self } } # [ doc = "Bit 27 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo27 ( & mut self ) -> PDO27_W { PDO27_W { w : self } } # [ doc = "Bit 28 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo28 ( & mut self ) -> PDO28_W { PDO28_W { w : self } } # [ doc = "Bit 29 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo29 ( & mut self ) -> PDO29_W { PDO29_W { w : self } } # [ doc = "Bit 30 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo30 ( & mut self ) -> PDO30_W { PDO30_W { w : self } } # [ doc = "Bit 31 - Port Data Output" ] # [ inline ( always ) ] pub fn pdo31 ( & mut self ) -> PDO31_W { PDO31_W { w : self } } } } # [ doc = "Port Set Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psor](psor) module" ] pub type PSOR = crate :: Reg < u32 , _PSOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PSOR ; # [ doc = "`write(|w| ..)` method takes [psor::W](psor::W) writer structure" ] impl crate :: Writable for PSOR { } # [ doc = "Port Set Output Register" ] pub mod psor { # [ doc = "Writer for register PSOR" ] pub type W = crate :: W < u32 , super :: PSOR > ; # [ doc = "Register PSOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PSOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO0_AW ) -> Self { match variant { PTSO0_AW :: _0 => false , PTSO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO0`" ] pub struct PTSO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO1_AW ) -> Self { match variant { PTSO1_AW :: _0 => false , PTSO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO1`" ] pub struct PTSO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO2_AW ) -> Self { match variant { PTSO2_AW :: _0 => false , PTSO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO2`" ] pub struct PTSO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO2_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO3_AW ) -> Self { match variant { PTSO3_AW :: _0 => false , PTSO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO3`" ] pub struct PTSO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO4_AW ) -> Self { match variant { PTSO4_AW :: _0 => false , PTSO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO4`" ] pub struct PTSO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO5_AW ) -> Self { match variant { PTSO5_AW :: _0 => false , PTSO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO5`" ] pub struct PTSO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO5_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO6_AW ) -> Self { match variant { PTSO6_AW :: _0 => false , PTSO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO6`" ] pub struct PTSO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO6_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO7_AW ) -> Self { match variant { PTSO7_AW :: _0 => false , PTSO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO7`" ] pub struct PTSO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO7_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO8_AW ) -> Self { match variant { PTSO8_AW :: _0 => false , PTSO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO8`" ] pub struct PTSO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO9_AW ) -> Self { match variant { PTSO9_AW :: _0 => false , PTSO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO9`" ] pub struct PTSO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO10_AW ) -> Self { match variant { PTSO10_AW :: _0 => false , PTSO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO10`" ] pub struct PTSO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO11_AW ) -> Self { match variant { PTSO11_AW :: _0 => false , PTSO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO11`" ] pub struct PTSO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO12_AW ) -> Self { match variant { PTSO12_AW :: _0 => false , PTSO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO12`" ] pub struct PTSO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO13_AW ) -> Self { match variant { PTSO13_AW :: _0 => false , PTSO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO13`" ] pub struct PTSO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO13_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO14_AW ) -> Self { match variant { PTSO14_AW :: _0 => false , PTSO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO14`" ] pub struct PTSO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO15_AW ) -> Self { match variant { PTSO15_AW :: _0 => false , PTSO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO15`" ] pub struct PTSO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO16_AW ) -> Self { match variant { PTSO16_AW :: _0 => false , PTSO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO16`" ] pub struct PTSO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO17_AW ) -> Self { match variant { PTSO17_AW :: _0 => false , PTSO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO17`" ] pub struct PTSO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO18_AW ) -> Self { match variant { PTSO18_AW :: _0 => false , PTSO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO18`" ] pub struct PTSO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO19_AW ) -> Self { match variant { PTSO19_AW :: _0 => false , PTSO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO19`" ] pub struct PTSO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO20_AW ) -> Self { match variant { PTSO20_AW :: _0 => false , PTSO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO20`" ] pub struct PTSO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO20_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO21_AW ) -> Self { match variant { PTSO21_AW :: _0 => false , PTSO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO21`" ] pub struct PTSO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO21_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO22_AW ) -> Self { match variant { PTSO22_AW :: _0 => false , PTSO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO22`" ] pub struct PTSO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO23_AW ) -> Self { match variant { PTSO23_AW :: _0 => false , PTSO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO23`" ] pub struct PTSO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO24_AW ) -> Self { match variant { PTSO24_AW :: _0 => false , PTSO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO24`" ] pub struct PTSO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO24_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO25_AW ) -> Self { match variant { PTSO25_AW :: _0 => false , PTSO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO25`" ] pub struct PTSO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO25_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO26_AW ) -> Self { match variant { PTSO26_AW :: _0 => false , PTSO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO26`" ] pub struct PTSO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO26_AW :: _1 ) } # [ 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 = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO27_AW ) -> Self { match variant { PTSO27_AW :: _0 => false , PTSO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO27`" ] pub struct PTSO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO28_AW ) -> Self { match variant { PTSO28_AW :: _0 => false , PTSO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO28`" ] pub struct PTSO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO29_AW ) -> Self { match variant { PTSO29_AW :: _0 => false , PTSO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO29`" ] pub struct PTSO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO30_AW ) -> Self { match variant { PTSO30_AW :: _0 => false , PTSO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO30`" ] pub struct PTSO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Set Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTSO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to logic 1." ] _1 } impl From < PTSO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTSO31_AW ) -> Self { match variant { PTSO31_AW :: _0 => false , PTSO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTSO31`" ] pub struct PTSO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTSO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTSO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to logic 1." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTSO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso0 ( & mut self ) -> PTSO0_W { PTSO0_W { w : self } } # [ doc = "Bit 1 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso1 ( & mut self ) -> PTSO1_W { PTSO1_W { w : self } } # [ doc = "Bit 2 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso2 ( & mut self ) -> PTSO2_W { PTSO2_W { w : self } } # [ doc = "Bit 3 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso3 ( & mut self ) -> PTSO3_W { PTSO3_W { w : self } } # [ doc = "Bit 4 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso4 ( & mut self ) -> PTSO4_W { PTSO4_W { w : self } } # [ doc = "Bit 5 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso5 ( & mut self ) -> PTSO5_W { PTSO5_W { w : self } } # [ doc = "Bit 6 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso6 ( & mut self ) -> PTSO6_W { PTSO6_W { w : self } } # [ doc = "Bit 7 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso7 ( & mut self ) -> PTSO7_W { PTSO7_W { w : self } } # [ doc = "Bit 8 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso8 ( & mut self ) -> PTSO8_W { PTSO8_W { w : self } } # [ doc = "Bit 9 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso9 ( & mut self ) -> PTSO9_W { PTSO9_W { w : self } } # [ doc = "Bit 10 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso10 ( & mut self ) -> PTSO10_W { PTSO10_W { w : self } } # [ doc = "Bit 11 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso11 ( & mut self ) -> PTSO11_W { PTSO11_W { w : self } } # [ doc = "Bit 12 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso12 ( & mut self ) -> PTSO12_W { PTSO12_W { w : self } } # [ doc = "Bit 13 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso13 ( & mut self ) -> PTSO13_W { PTSO13_W { w : self } } # [ doc = "Bit 14 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso14 ( & mut self ) -> PTSO14_W { PTSO14_W { w : self } } # [ doc = "Bit 15 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso15 ( & mut self ) -> PTSO15_W { PTSO15_W { w : self } } # [ doc = "Bit 16 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso16 ( & mut self ) -> PTSO16_W { PTSO16_W { w : self } } # [ doc = "Bit 17 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso17 ( & mut self ) -> PTSO17_W { PTSO17_W { w : self } } # [ doc = "Bit 18 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso18 ( & mut self ) -> PTSO18_W { PTSO18_W { w : self } } # [ doc = "Bit 19 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso19 ( & mut self ) -> PTSO19_W { PTSO19_W { w : self } } # [ doc = "Bit 20 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso20 ( & mut self ) -> PTSO20_W { PTSO20_W { w : self } } # [ doc = "Bit 21 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso21 ( & mut self ) -> PTSO21_W { PTSO21_W { w : self } } # [ doc = "Bit 22 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso22 ( & mut self ) -> PTSO22_W { PTSO22_W { w : self } } # [ doc = "Bit 23 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso23 ( & mut self ) -> PTSO23_W { PTSO23_W { w : self } } # [ doc = "Bit 24 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso24 ( & mut self ) -> PTSO24_W { PTSO24_W { w : self } } # [ doc = "Bit 25 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso25 ( & mut self ) -> PTSO25_W { PTSO25_W { w : self } } # [ doc = "Bit 26 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso26 ( & mut self ) -> PTSO26_W { PTSO26_W { w : self } } # [ doc = "Bit 27 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso27 ( & mut self ) -> PTSO27_W { PTSO27_W { w : self } } # [ doc = "Bit 28 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso28 ( & mut self ) -> PTSO28_W { PTSO28_W { w : self } } # [ doc = "Bit 29 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso29 ( & mut self ) -> PTSO29_W { PTSO29_W { w : self } } # [ doc = "Bit 30 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso30 ( & mut self ) -> PTSO30_W { PTSO30_W { w : self } } # [ doc = "Bit 31 - Port Set Output" ] # [ inline ( always ) ] pub fn ptso31 ( & mut self ) -> PTSO31_W { PTSO31_W { w : self } } } } # [ doc = "Port Clear Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcor](pcor) module" ] pub type PCOR = crate :: Reg < u32 , _PCOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCOR ; # [ doc = "`write(|w| ..)` method takes [pcor::W](pcor::W) writer structure" ] impl crate :: Writable for PCOR { } # [ doc = "Port Clear Output Register" ] pub mod pcor { # [ doc = "Writer for register PCOR" ] pub type W = crate :: W < u32 , super :: PCOR > ; # [ doc = "Register PCOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO0_AW ) -> Self { match variant { PTCO0_AW :: _0 => false , PTCO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO0`" ] pub struct PTCO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO1_AW ) -> Self { match variant { PTCO1_AW :: _0 => false , PTCO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO1`" ] pub struct PTCO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO2_AW ) -> Self { match variant { PTCO2_AW :: _0 => false , PTCO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO2`" ] pub struct PTCO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO2_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO3_AW ) -> Self { match variant { PTCO3_AW :: _0 => false , PTCO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO3`" ] pub struct PTCO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO4_AW ) -> Self { match variant { PTCO4_AW :: _0 => false , PTCO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO4`" ] pub struct PTCO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO5_AW ) -> Self { match variant { PTCO5_AW :: _0 => false , PTCO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO5`" ] pub struct PTCO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO5_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO6_AW ) -> Self { match variant { PTCO6_AW :: _0 => false , PTCO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO6`" ] pub struct PTCO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO6_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO7_AW ) -> Self { match variant { PTCO7_AW :: _0 => false , PTCO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO7`" ] pub struct PTCO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO7_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO8_AW ) -> Self { match variant { PTCO8_AW :: _0 => false , PTCO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO8`" ] pub struct PTCO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO9_AW ) -> Self { match variant { PTCO9_AW :: _0 => false , PTCO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO9`" ] pub struct PTCO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO10_AW ) -> Self { match variant { PTCO10_AW :: _0 => false , PTCO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO10`" ] pub struct PTCO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO11_AW ) -> Self { match variant { PTCO11_AW :: _0 => false , PTCO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO11`" ] pub struct PTCO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO12_AW ) -> Self { match variant { PTCO12_AW :: _0 => false , PTCO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO12`" ] pub struct PTCO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO13_AW ) -> Self { match variant { PTCO13_AW :: _0 => false , PTCO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO13`" ] pub struct PTCO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO13_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO14_AW ) -> Self { match variant { PTCO14_AW :: _0 => false , PTCO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO14`" ] pub struct PTCO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO15_AW ) -> Self { match variant { PTCO15_AW :: _0 => false , PTCO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO15`" ] pub struct PTCO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO16_AW ) -> Self { match variant { PTCO16_AW :: _0 => false , PTCO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO16`" ] pub struct PTCO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO17_AW ) -> Self { match variant { PTCO17_AW :: _0 => false , PTCO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO17`" ] pub struct PTCO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO18_AW ) -> Self { match variant { PTCO18_AW :: _0 => false , PTCO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO18`" ] pub struct PTCO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO19_AW ) -> Self { match variant { PTCO19_AW :: _0 => false , PTCO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO19`" ] pub struct PTCO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO20_AW ) -> Self { match variant { PTCO20_AW :: _0 => false , PTCO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO20`" ] pub struct PTCO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO20_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO21_AW ) -> Self { match variant { PTCO21_AW :: _0 => false , PTCO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO21`" ] pub struct PTCO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO21_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO22_AW ) -> Self { match variant { PTCO22_AW :: _0 => false , PTCO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO22`" ] pub struct PTCO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO23_AW ) -> Self { match variant { PTCO23_AW :: _0 => false , PTCO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO23`" ] pub struct PTCO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO24_AW ) -> Self { match variant { PTCO24_AW :: _0 => false , PTCO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO24`" ] pub struct PTCO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO24_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO25_AW ) -> Self { match variant { PTCO25_AW :: _0 => false , PTCO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO25`" ] pub struct PTCO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO25_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO26_AW ) -> Self { match variant { PTCO26_AW :: _0 => false , PTCO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO26`" ] pub struct PTCO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO26_AW :: _1 ) } # [ 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 = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO27_AW ) -> Self { match variant { PTCO27_AW :: _0 => false , PTCO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO27`" ] pub struct PTCO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO28_AW ) -> Self { match variant { PTCO28_AW :: _0 => false , PTCO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO28`" ] pub struct PTCO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO29_AW ) -> Self { match variant { PTCO29_AW :: _0 => false , PTCO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO29`" ] pub struct PTCO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO30_AW ) -> Self { match variant { PTCO30_AW :: _0 => false , PTCO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO30`" ] pub struct PTCO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Clear Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTCO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is cleared to logic 0." ] _1 } impl From < PTCO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTCO31_AW ) -> Self { match variant { PTCO31_AW :: _0 => false , PTCO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTCO31`" ] pub struct PTCO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTCO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTCO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is cleared to logic 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTCO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco0 ( & mut self ) -> PTCO0_W { PTCO0_W { w : self } } # [ doc = "Bit 1 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco1 ( & mut self ) -> PTCO1_W { PTCO1_W { w : self } } # [ doc = "Bit 2 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco2 ( & mut self ) -> PTCO2_W { PTCO2_W { w : self } } # [ doc = "Bit 3 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco3 ( & mut self ) -> PTCO3_W { PTCO3_W { w : self } } # [ doc = "Bit 4 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco4 ( & mut self ) -> PTCO4_W { PTCO4_W { w : self } } # [ doc = "Bit 5 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco5 ( & mut self ) -> PTCO5_W { PTCO5_W { w : self } } # [ doc = "Bit 6 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco6 ( & mut self ) -> PTCO6_W { PTCO6_W { w : self } } # [ doc = "Bit 7 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco7 ( & mut self ) -> PTCO7_W { PTCO7_W { w : self } } # [ doc = "Bit 8 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco8 ( & mut self ) -> PTCO8_W { PTCO8_W { w : self } } # [ doc = "Bit 9 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco9 ( & mut self ) -> PTCO9_W { PTCO9_W { w : self } } # [ doc = "Bit 10 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco10 ( & mut self ) -> PTCO10_W { PTCO10_W { w : self } } # [ doc = "Bit 11 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco11 ( & mut self ) -> PTCO11_W { PTCO11_W { w : self } } # [ doc = "Bit 12 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco12 ( & mut self ) -> PTCO12_W { PTCO12_W { w : self } } # [ doc = "Bit 13 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco13 ( & mut self ) -> PTCO13_W { PTCO13_W { w : self } } # [ doc = "Bit 14 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco14 ( & mut self ) -> PTCO14_W { PTCO14_W { w : self } } # [ doc = "Bit 15 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco15 ( & mut self ) -> PTCO15_W { PTCO15_W { w : self } } # [ doc = "Bit 16 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco16 ( & mut self ) -> PTCO16_W { PTCO16_W { w : self } } # [ doc = "Bit 17 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco17 ( & mut self ) -> PTCO17_W { PTCO17_W { w : self } } # [ doc = "Bit 18 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco18 ( & mut self ) -> PTCO18_W { PTCO18_W { w : self } } # [ doc = "Bit 19 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco19 ( & mut self ) -> PTCO19_W { PTCO19_W { w : self } } # [ doc = "Bit 20 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco20 ( & mut self ) -> PTCO20_W { PTCO20_W { w : self } } # [ doc = "Bit 21 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco21 ( & mut self ) -> PTCO21_W { PTCO21_W { w : self } } # [ doc = "Bit 22 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco22 ( & mut self ) -> PTCO22_W { PTCO22_W { w : self } } # [ doc = "Bit 23 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco23 ( & mut self ) -> PTCO23_W { PTCO23_W { w : self } } # [ doc = "Bit 24 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco24 ( & mut self ) -> PTCO24_W { PTCO24_W { w : self } } # [ doc = "Bit 25 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco25 ( & mut self ) -> PTCO25_W { PTCO25_W { w : self } } # [ doc = "Bit 26 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco26 ( & mut self ) -> PTCO26_W { PTCO26_W { w : self } } # [ doc = "Bit 27 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco27 ( & mut self ) -> PTCO27_W { PTCO27_W { w : self } } # [ doc = "Bit 28 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco28 ( & mut self ) -> PTCO28_W { PTCO28_W { w : self } } # [ doc = "Bit 29 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco29 ( & mut self ) -> PTCO29_W { PTCO29_W { w : self } } # [ doc = "Bit 30 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco30 ( & mut self ) -> PTCO30_W { PTCO30_W { w : self } } # [ doc = "Bit 31 - Port Clear Output" ] # [ inline ( always ) ] pub fn ptco31 ( & mut self ) -> PTCO31_W { PTCO31_W { w : self } } } } # [ doc = "Port Toggle Output Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ptor](ptor) module" ] pub type PTOR = crate :: Reg < u32 , _PTOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PTOR ; # [ doc = "`write(|w| ..)` method takes [ptor::W](ptor::W) writer structure" ] impl crate :: Writable for PTOR { } # [ doc = "Port Toggle Output Register" ] pub mod ptor { # [ doc = "Writer for register PTOR" ] pub type W = crate :: W < u32 , super :: PTOR > ; # [ doc = "Register PTOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PTOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO0_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO0_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO0_AW ) -> Self { match variant { PTTO0_AW :: _0 => false , PTTO0_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO0`" ] pub struct PTTO0_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO0_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO0_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO1_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO1_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO1_AW ) -> Self { match variant { PTTO1_AW :: _0 => false , PTTO1_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO1`" ] pub struct PTTO1_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO1_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO1_AW :: _1 ) } # [ 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 } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO2_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO2_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO2_AW ) -> Self { match variant { PTTO2_AW :: _0 => false , PTTO2_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO2`" ] pub struct PTTO2_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO2_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO2_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO3_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO3_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO3_AW ) -> Self { match variant { PTTO3_AW :: _0 => false , PTTO3_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO3`" ] pub struct PTTO3_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO3_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO3_AW :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO4_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO4_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO4_AW ) -> Self { match variant { PTTO4_AW :: _0 => false , PTTO4_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO4`" ] pub struct PTTO4_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO4_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO4_AW :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO5_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO5_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO5_AW ) -> Self { match variant { PTTO5_AW :: _0 => false , PTTO5_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO5`" ] pub struct PTTO5_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO5_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO5_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO6_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO6_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO6_AW ) -> Self { match variant { PTTO6_AW :: _0 => false , PTTO6_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO6`" ] pub struct PTTO6_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO6_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO6_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO7_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO7_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO7_AW ) -> Self { match variant { PTTO7_AW :: _0 => false , PTTO7_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO7`" ] pub struct PTTO7_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO7_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO7_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO8_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO8_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO8_AW ) -> Self { match variant { PTTO8_AW :: _0 => false , PTTO8_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO8`" ] pub struct PTTO8_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO8_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO8_AW :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO9_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO9_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO9_AW ) -> Self { match variant { PTTO9_AW :: _0 => false , PTTO9_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO9`" ] pub struct PTTO9_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO9_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO9_AW :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO10_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO10_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO10_AW ) -> Self { match variant { PTTO10_AW :: _0 => false , PTTO10_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO10`" ] pub struct PTTO10_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO10_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO10_AW :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO11_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO11_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO11_AW ) -> Self { match variant { PTTO11_AW :: _0 => false , PTTO11_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO11`" ] pub struct PTTO11_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO11_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO11_AW :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO12_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO12_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO12_AW ) -> Self { match variant { PTTO12_AW :: _0 => false , PTTO12_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO12`" ] pub struct PTTO12_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO12_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO12_AW :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO13_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO13_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO13_AW ) -> Self { match variant { PTTO13_AW :: _0 => false , PTTO13_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO13`" ] pub struct PTTO13_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO13_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO13_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO14_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO14_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO14_AW ) -> Self { match variant { PTTO14_AW :: _0 => false , PTTO14_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO14`" ] pub struct PTTO14_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO14_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO14_AW :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO15_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO15_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO15_AW ) -> Self { match variant { PTTO15_AW :: _0 => false , PTTO15_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO15`" ] pub struct PTTO15_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO15_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO15_AW :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO16_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO16_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO16_AW ) -> Self { match variant { PTTO16_AW :: _0 => false , PTTO16_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO16`" ] pub struct PTTO16_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO16_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO16_AW :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO17_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO17_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO17_AW ) -> Self { match variant { PTTO17_AW :: _0 => false , PTTO17_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO17`" ] pub struct PTTO17_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO17_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO17_AW :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO18_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO18_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO18_AW ) -> Self { match variant { PTTO18_AW :: _0 => false , PTTO18_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO18`" ] pub struct PTTO18_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO18_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO18_AW :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO19_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO19_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO19_AW ) -> Self { match variant { PTTO19_AW :: _0 => false , PTTO19_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO19`" ] pub struct PTTO19_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO19_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO19_AW :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO20_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO20_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO20_AW ) -> Self { match variant { PTTO20_AW :: _0 => false , PTTO20_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO20`" ] pub struct PTTO20_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO20_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO20_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO21_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO21_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO21_AW ) -> Self { match variant { PTTO21_AW :: _0 => false , PTTO21_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO21`" ] pub struct PTTO21_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO21_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO21_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO22_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO22_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO22_AW ) -> Self { match variant { PTTO22_AW :: _0 => false , PTTO22_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO22`" ] pub struct PTTO22_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO22_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO22_AW :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO23_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO23_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO23_AW ) -> Self { match variant { PTTO23_AW :: _0 => false , PTTO23_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO23`" ] pub struct PTTO23_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO23_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO23_AW :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO24_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO24_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO24_AW ) -> Self { match variant { PTTO24_AW :: _0 => false , PTTO24_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO24`" ] pub struct PTTO24_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO24_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO24_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO25_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO25_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO25_AW ) -> Self { match variant { PTTO25_AW :: _0 => false , PTTO25_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO25`" ] pub struct PTTO25_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO25_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO25_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO26_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO26_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO26_AW ) -> Self { match variant { PTTO26_AW :: _0 => false , PTTO26_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO26`" ] pub struct PTTO26_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO26_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO26_AW :: _1 ) } # [ 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 = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO27_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO27_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO27_AW ) -> Self { match variant { PTTO27_AW :: _0 => false , PTTO27_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO27`" ] pub struct PTTO27_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO27_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO27_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO28_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO28_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO28_AW ) -> Self { match variant { PTTO28_AW :: _0 => false , PTTO28_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO28`" ] pub struct PTTO28_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO28_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO28_AW :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO29_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO29_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO29_AW ) -> Self { match variant { PTTO29_AW :: _0 => false , PTTO29_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO29`" ] pub struct PTTO29_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO29_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO29_AW :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO30_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO30_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO30_AW ) -> Self { match variant { PTTO30_AW :: _0 => false , PTTO30_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO30`" ] pub struct PTTO30_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO30_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO30_AW :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Toggle Output\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PTTO31_AW { # [ doc = "0: Corresponding bit in PDORn does not change." ] _0 , # [ doc = "1: Corresponding bit in PDORn is set to the inverse of its existing logic state." ] _1 } impl From < PTTO31_AW > for bool { # [ inline ( always ) ] fn from ( variant : PTTO31_AW ) -> Self { match variant { PTTO31_AW :: _0 => false , PTTO31_AW :: _1 => true } } } # [ doc = "Write proxy for field `PTTO31`" ] pub struct PTTO31_W < 'a > { w : & 'a mut W , } impl < 'a > PTTO31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PTTO31_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Corresponding bit in PDORn does not change." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _0 ) } # [ doc = "Corresponding bit in PDORn is set to the inverse of its existing logic state." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PTTO31_AW :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl W { # [ doc = "Bit 0 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto0 ( & mut self ) -> PTTO0_W { PTTO0_W { w : self } } # [ doc = "Bit 1 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto1 ( & mut self ) -> PTTO1_W { PTTO1_W { w : self } } # [ doc = "Bit 2 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto2 ( & mut self ) -> PTTO2_W { PTTO2_W { w : self } } # [ doc = "Bit 3 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto3 ( & mut self ) -> PTTO3_W { PTTO3_W { w : self } } # [ doc = "Bit 4 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto4 ( & mut self ) -> PTTO4_W { PTTO4_W { w : self } } # [ doc = "Bit 5 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto5 ( & mut self ) -> PTTO5_W { PTTO5_W { w : self } } # [ doc = "Bit 6 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto6 ( & mut self ) -> PTTO6_W { PTTO6_W { w : self } } # [ doc = "Bit 7 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto7 ( & mut self ) -> PTTO7_W { PTTO7_W { w : self } } # [ doc = "Bit 8 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto8 ( & mut self ) -> PTTO8_W { PTTO8_W { w : self } } # [ doc = "Bit 9 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto9 ( & mut self ) -> PTTO9_W { PTTO9_W { w : self } } # [ doc = "Bit 10 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto10 ( & mut self ) -> PTTO10_W { PTTO10_W { w : self } } # [ doc = "Bit 11 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto11 ( & mut self ) -> PTTO11_W { PTTO11_W { w : self } } # [ doc = "Bit 12 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto12 ( & mut self ) -> PTTO12_W { PTTO12_W { w : self } } # [ doc = "Bit 13 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto13 ( & mut self ) -> PTTO13_W { PTTO13_W { w : self } } # [ doc = "Bit 14 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto14 ( & mut self ) -> PTTO14_W { PTTO14_W { w : self } } # [ doc = "Bit 15 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto15 ( & mut self ) -> PTTO15_W { PTTO15_W { w : self } } # [ doc = "Bit 16 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto16 ( & mut self ) -> PTTO16_W { PTTO16_W { w : self } } # [ doc = "Bit 17 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto17 ( & mut self ) -> PTTO17_W { PTTO17_W { w : self } } # [ doc = "Bit 18 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto18 ( & mut self ) -> PTTO18_W { PTTO18_W { w : self } } # [ doc = "Bit 19 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto19 ( & mut self ) -> PTTO19_W { PTTO19_W { w : self } } # [ doc = "Bit 20 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto20 ( & mut self ) -> PTTO20_W { PTTO20_W { w : self } } # [ doc = "Bit 21 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto21 ( & mut self ) -> PTTO21_W { PTTO21_W { w : self } } # [ doc = "Bit 22 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto22 ( & mut self ) -> PTTO22_W { PTTO22_W { w : self } } # [ doc = "Bit 23 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto23 ( & mut self ) -> PTTO23_W { PTTO23_W { w : self } } # [ doc = "Bit 24 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto24 ( & mut self ) -> PTTO24_W { PTTO24_W { w : self } } # [ doc = "Bit 25 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto25 ( & mut self ) -> PTTO25_W { PTTO25_W { w : self } } # [ doc = "Bit 26 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto26 ( & mut self ) -> PTTO26_W { PTTO26_W { w : self } } # [ doc = "Bit 27 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto27 ( & mut self ) -> PTTO27_W { PTTO27_W { w : self } } # [ doc = "Bit 28 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto28 ( & mut self ) -> PTTO28_W { PTTO28_W { w : self } } # [ doc = "Bit 29 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto29 ( & mut self ) -> PTTO29_W { PTTO29_W { w : self } } # [ doc = "Bit 30 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto30 ( & mut self ) -> PTTO30_W { PTTO30_W { w : self } } # [ doc = "Bit 31 - Port Toggle Output" ] # [ inline ( always ) ] pub fn ptto31 ( & mut self ) -> PTTO31_W { PTTO31_W { w : self } } } } # [ doc = "Port Data Input Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pdir](pdir) module" ] pub type PDIR = crate :: Reg < u32 , _PDIR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDIR ; # [ doc = "`read()` method returns [pdir::R](pdir::R) reader structure" ] impl crate :: Readable for PDIR { } # [ doc = "Port Data Input Register" ] pub mod pdir { # [ doc = "Reader of register PDIR" ] pub type R = crate :: R < u32 , super :: PDIR > ; # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI0_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI0_A ) -> Self { match variant { PDI0_A :: _0 => false , PDI0_A :: _1 => true } } } # [ doc = "Reader of field `PDI0`" ] pub type PDI0_R = crate :: R < bool , PDI0_A > ; impl PDI0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI0_A { match self . bits { false => PDI0_A :: _0 , true => PDI0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI0_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI1_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI1_A ) -> Self { match variant { PDI1_A :: _0 => false , PDI1_A :: _1 => true } } } # [ doc = "Reader of field `PDI1`" ] pub type PDI1_R = crate :: R < bool , PDI1_A > ; impl PDI1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI1_A { match self . bits { false => PDI1_A :: _0 , true => PDI1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI1_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI2_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI2_A ) -> Self { match variant { PDI2_A :: _0 => false , PDI2_A :: _1 => true } } } # [ doc = "Reader of field `PDI2`" ] pub type PDI2_R = crate :: R < bool , PDI2_A > ; impl PDI2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI2_A { match self . bits { false => PDI2_A :: _0 , true => PDI2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI2_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI3_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI3_A ) -> Self { match variant { PDI3_A :: _0 => false , PDI3_A :: _1 => true } } } # [ doc = "Reader of field `PDI3`" ] pub type PDI3_R = crate :: R < bool , PDI3_A > ; impl PDI3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI3_A { match self . bits { false => PDI3_A :: _0 , true => PDI3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI3_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI4_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI4_A ) -> Self { match variant { PDI4_A :: _0 => false , PDI4_A :: _1 => true } } } # [ doc = "Reader of field `PDI4`" ] pub type PDI4_R = crate :: R < bool , PDI4_A > ; impl PDI4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI4_A { match self . bits { false => PDI4_A :: _0 , true => PDI4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI4_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI5_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI5_A ) -> Self { match variant { PDI5_A :: _0 => false , PDI5_A :: _1 => true } } } # [ doc = "Reader of field `PDI5`" ] pub type PDI5_R = crate :: R < bool , PDI5_A > ; impl PDI5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI5_A { match self . bits { false => PDI5_A :: _0 , true => PDI5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI5_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI6_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI6_A ) -> Self { match variant { PDI6_A :: _0 => false , PDI6_A :: _1 => true } } } # [ doc = "Reader of field `PDI6`" ] pub type PDI6_R = crate :: R < bool , PDI6_A > ; impl PDI6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI6_A { match self . bits { false => PDI6_A :: _0 , true => PDI6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI6_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI7_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI7_A ) -> Self { match variant { PDI7_A :: _0 => false , PDI7_A :: _1 => true } } } # [ doc = "Reader of field `PDI7`" ] pub type PDI7_R = crate :: R < bool , PDI7_A > ; impl PDI7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI7_A { match self . bits { false => PDI7_A :: _0 , true => PDI7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI7_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI8_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI8_A ) -> Self { match variant { PDI8_A :: _0 => false , PDI8_A :: _1 => true } } } # [ doc = "Reader of field `PDI8`" ] pub type PDI8_R = crate :: R < bool , PDI8_A > ; impl PDI8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI8_A { match self . bits { false => PDI8_A :: _0 , true => PDI8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI8_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI9_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI9_A ) -> Self { match variant { PDI9_A :: _0 => false , PDI9_A :: _1 => true } } } # [ doc = "Reader of field `PDI9`" ] pub type PDI9_R = crate :: R < bool , PDI9_A > ; impl PDI9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI9_A { match self . bits { false => PDI9_A :: _0 , true => PDI9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI9_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI10_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI10_A ) -> Self { match variant { PDI10_A :: _0 => false , PDI10_A :: _1 => true } } } # [ doc = "Reader of field `PDI10`" ] pub type PDI10_R = crate :: R < bool , PDI10_A > ; impl PDI10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI10_A { match self . bits { false => PDI10_A :: _0 , true => PDI10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI10_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI11_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI11_A ) -> Self { match variant { PDI11_A :: _0 => false , PDI11_A :: _1 => true } } } # [ doc = "Reader of field `PDI11`" ] pub type PDI11_R = crate :: R < bool , PDI11_A > ; impl PDI11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI11_A { match self . bits { false => PDI11_A :: _0 , true => PDI11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI11_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI12_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI12_A ) -> Self { match variant { PDI12_A :: _0 => false , PDI12_A :: _1 => true } } } # [ doc = "Reader of field `PDI12`" ] pub type PDI12_R = crate :: R < bool , PDI12_A > ; impl PDI12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI12_A { match self . bits { false => PDI12_A :: _0 , true => PDI12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI12_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI13_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI13_A ) -> Self { match variant { PDI13_A :: _0 => false , PDI13_A :: _1 => true } } } # [ doc = "Reader of field `PDI13`" ] pub type PDI13_R = crate :: R < bool , PDI13_A > ; impl PDI13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI13_A { match self . bits { false => PDI13_A :: _0 , true => PDI13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI13_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI14_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI14_A ) -> Self { match variant { PDI14_A :: _0 => false , PDI14_A :: _1 => true } } } # [ doc = "Reader of field `PDI14`" ] pub type PDI14_R = crate :: R < bool , PDI14_A > ; impl PDI14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI14_A { match self . bits { false => PDI14_A :: _0 , true => PDI14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI14_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI15_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI15_A ) -> Self { match variant { PDI15_A :: _0 => false , PDI15_A :: _1 => true } } } # [ doc = "Reader of field `PDI15`" ] pub type PDI15_R = crate :: R < bool , PDI15_A > ; impl PDI15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI15_A { match self . bits { false => PDI15_A :: _0 , true => PDI15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI15_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI16_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI16_A ) -> Self { match variant { PDI16_A :: _0 => false , PDI16_A :: _1 => true } } } # [ doc = "Reader of field `PDI16`" ] pub type PDI16_R = crate :: R < bool , PDI16_A > ; impl PDI16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI16_A { match self . bits { false => PDI16_A :: _0 , true => PDI16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI16_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI17_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI17_A ) -> Self { match variant { PDI17_A :: _0 => false , PDI17_A :: _1 => true } } } # [ doc = "Reader of field `PDI17`" ] pub type PDI17_R = crate :: R < bool , PDI17_A > ; impl PDI17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI17_A { match self . bits { false => PDI17_A :: _0 , true => PDI17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI17_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI18_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI18_A ) -> Self { match variant { PDI18_A :: _0 => false , PDI18_A :: _1 => true } } } # [ doc = "Reader of field `PDI18`" ] pub type PDI18_R = crate :: R < bool , PDI18_A > ; impl PDI18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI18_A { match self . bits { false => PDI18_A :: _0 , true => PDI18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI18_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI19_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI19_A ) -> Self { match variant { PDI19_A :: _0 => false , PDI19_A :: _1 => true } } } # [ doc = "Reader of field `PDI19`" ] pub type PDI19_R = crate :: R < bool , PDI19_A > ; impl PDI19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI19_A { match self . bits { false => PDI19_A :: _0 , true => PDI19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI19_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI20_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI20_A ) -> Self { match variant { PDI20_A :: _0 => false , PDI20_A :: _1 => true } } } # [ doc = "Reader of field `PDI20`" ] pub type PDI20_R = crate :: R < bool , PDI20_A > ; impl PDI20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI20_A { match self . bits { false => PDI20_A :: _0 , true => PDI20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI20_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI21_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI21_A ) -> Self { match variant { PDI21_A :: _0 => false , PDI21_A :: _1 => true } } } # [ doc = "Reader of field `PDI21`" ] pub type PDI21_R = crate :: R < bool , PDI21_A > ; impl PDI21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI21_A { match self . bits { false => PDI21_A :: _0 , true => PDI21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI21_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI22_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI22_A ) -> Self { match variant { PDI22_A :: _0 => false , PDI22_A :: _1 => true } } } # [ doc = "Reader of field `PDI22`" ] pub type PDI22_R = crate :: R < bool , PDI22_A > ; impl PDI22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI22_A { match self . bits { false => PDI22_A :: _0 , true => PDI22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI22_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI23_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI23_A ) -> Self { match variant { PDI23_A :: _0 => false , PDI23_A :: _1 => true } } } # [ doc = "Reader of field `PDI23`" ] pub type PDI23_R = crate :: R < bool , PDI23_A > ; impl PDI23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI23_A { match self . bits { false => PDI23_A :: _0 , true => PDI23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI23_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI24_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI24_A ) -> Self { match variant { PDI24_A :: _0 => false , PDI24_A :: _1 => true } } } # [ doc = "Reader of field `PDI24`" ] pub type PDI24_R = crate :: R < bool , PDI24_A > ; impl PDI24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI24_A { match self . bits { false => PDI24_A :: _0 , true => PDI24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI24_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI25_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI25_A ) -> Self { match variant { PDI25_A :: _0 => false , PDI25_A :: _1 => true } } } # [ doc = "Reader of field `PDI25`" ] pub type PDI25_R = crate :: R < bool , PDI25_A > ; impl PDI25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI25_A { match self . bits { false => PDI25_A :: _0 , true => PDI25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI25_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI26_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI26_A ) -> Self { match variant { PDI26_A :: _0 => false , PDI26_A :: _1 => true } } } # [ doc = "Reader of field `PDI26`" ] pub type PDI26_R = crate :: R < bool , PDI26_A > ; impl PDI26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI26_A { match self . bits { false => PDI26_A :: _0 , true => PDI26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI26_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI27_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI27_A ) -> Self { match variant { PDI27_A :: _0 => false , PDI27_A :: _1 => true } } } # [ doc = "Reader of field `PDI27`" ] pub type PDI27_R = crate :: R < bool , PDI27_A > ; impl PDI27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI27_A { match self . bits { false => PDI27_A :: _0 , true => PDI27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI27_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI28_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI28_A ) -> Self { match variant { PDI28_A :: _0 => false , PDI28_A :: _1 => true } } } # [ doc = "Reader of field `PDI28`" ] pub type PDI28_R = crate :: R < bool , PDI28_A > ; impl PDI28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI28_A { match self . bits { false => PDI28_A :: _0 , true => PDI28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI28_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI29_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI29_A ) -> Self { match variant { PDI29_A :: _0 => false , PDI29_A :: _1 => true } } } # [ doc = "Reader of field `PDI29`" ] pub type PDI29_R = crate :: R < bool , PDI29_A > ; impl PDI29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI29_A { match self . bits { false => PDI29_A :: _0 , true => PDI29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI29_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI30_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI30_A ) -> Self { match variant { PDI30_A :: _0 => false , PDI30_A :: _1 => true } } } # [ doc = "Reader of field `PDI30`" ] pub type PDI30_R = crate :: R < bool , PDI30_A > ; impl PDI30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI30_A { match self . bits { false => PDI30_A :: _0 , true => PDI30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI30_A :: _1 } } # [ doc = "Port Data Input\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDI31_A { # [ doc = "0: Pin logic level is logic 0, or is not configured for use by digital function." ] _0 , # [ doc = "1: Pin logic level is logic 1." ] _1 } impl From < PDI31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDI31_A ) -> Self { match variant { PDI31_A :: _0 => false , PDI31_A :: _1 => true } } } # [ doc = "Reader of field `PDI31`" ] pub type PDI31_R = crate :: R < bool , PDI31_A > ; impl PDI31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDI31_A { match self . bits { false => PDI31_A :: _0 , true => PDI31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDI31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDI31_A :: _1 } } impl R { # [ doc = "Bit 0 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi0 ( & self ) -> PDI0_R { PDI0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi1 ( & self ) -> PDI1_R { PDI1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi2 ( & self ) -> PDI2_R { PDI2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi3 ( & self ) -> PDI3_R { PDI3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi4 ( & self ) -> PDI4_R { PDI4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi5 ( & self ) -> PDI5_R { PDI5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi6 ( & self ) -> PDI6_R { PDI6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi7 ( & self ) -> PDI7_R { PDI7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi8 ( & self ) -> PDI8_R { PDI8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi9 ( & self ) -> PDI9_R { PDI9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi10 ( & self ) -> PDI10_R { PDI10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi11 ( & self ) -> PDI11_R { PDI11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi12 ( & self ) -> PDI12_R { PDI12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi13 ( & self ) -> PDI13_R { PDI13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi14 ( & self ) -> PDI14_R { PDI14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi15 ( & self ) -> PDI15_R { PDI15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi16 ( & self ) -> PDI16_R { PDI16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi17 ( & self ) -> PDI17_R { PDI17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi18 ( & self ) -> PDI18_R { PDI18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi19 ( & self ) -> PDI19_R { PDI19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi20 ( & self ) -> PDI20_R { PDI20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi21 ( & self ) -> PDI21_R { PDI21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi22 ( & self ) -> PDI22_R { PDI22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi23 ( & self ) -> PDI23_R { PDI23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi24 ( & self ) -> PDI24_R { PDI24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi25 ( & self ) -> PDI25_R { PDI25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi26 ( & self ) -> PDI26_R { PDI26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi27 ( & self ) -> PDI27_R { PDI27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi28 ( & self ) -> PDI28_R { PDI28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi29 ( & self ) -> PDI29_R { PDI29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi30 ( & self ) -> PDI30_R { PDI30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Input" ] # [ inline ( always ) ] pub fn pdi31 ( & self ) -> PDI31_R { PDI31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Port Data Direction Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pddr](pddr) module" ] pub type PDDR = crate :: Reg < u32 , _PDDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PDDR ; # [ doc = "`read()` method returns [pddr::R](pddr::R) reader structure" ] impl crate :: Readable for PDDR { } # [ doc = "`write(|w| ..)` method takes [pddr::W](pddr::W) writer structure" ] impl crate :: Writable for PDDR { } # [ doc = "Port Data Direction Register" ] pub mod pddr { # [ doc = "Reader of register PDDR" ] pub type R = crate :: R < u32 , super :: PDDR > ; # [ doc = "Writer for register PDDR" ] pub type W = crate :: W < u32 , super :: PDDR > ; # [ doc = "Register PDDR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PDDR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD0_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD0_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD0_A ) -> Self { match variant { PDD0_A :: _0 => false , PDD0_A :: _1 => true } } } # [ doc = "Reader of field `PDD0`" ] pub type PDD0_R = crate :: R < bool , PDD0_A > ; impl PDD0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD0_A { match self . bits { false => PDD0_A :: _0 , true => PDD0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD0_A :: _1 } } # [ doc = "Write proxy for field `PDD0`" ] pub struct PDD0_W < 'a > { w : & 'a mut W , } impl < 'a > PDD0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD0_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD1_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD1_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD1_A ) -> Self { match variant { PDD1_A :: _0 => false , PDD1_A :: _1 => true } } } # [ doc = "Reader of field `PDD1`" ] pub type PDD1_R = crate :: R < bool , PDD1_A > ; impl PDD1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD1_A { match self . bits { false => PDD1_A :: _0 , true => PDD1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD1_A :: _1 } } # [ doc = "Write proxy for field `PDD1`" ] pub struct PDD1_W < 'a > { w : & 'a mut W , } impl < 'a > PDD1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD1_A :: _1 ) } # [ 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 } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD2_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD2_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD2_A ) -> Self { match variant { PDD2_A :: _0 => false , PDD2_A :: _1 => true } } } # [ doc = "Reader of field `PDD2`" ] pub type PDD2_R = crate :: R < bool , PDD2_A > ; impl PDD2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD2_A { match self . bits { false => PDD2_A :: _0 , true => PDD2_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD2_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD2_A :: _1 } } # [ doc = "Write proxy for field `PDD2`" ] pub struct PDD2_W < 'a > { w : & 'a mut W , } impl < 'a > PDD2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD2_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD2_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD3_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD3_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD3_A ) -> Self { match variant { PDD3_A :: _0 => false , PDD3_A :: _1 => true } } } # [ doc = "Reader of field `PDD3`" ] pub type PDD3_R = crate :: R < bool , PDD3_A > ; impl PDD3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD3_A { match self . bits { false => PDD3_A :: _0 , true => PDD3_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD3_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD3_A :: _1 } } # [ doc = "Write proxy for field `PDD3`" ] pub struct PDD3_W < 'a > { w : & 'a mut W , } impl < 'a > PDD3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD3_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD3_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD4_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD4_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD4_A ) -> Self { match variant { PDD4_A :: _0 => false , PDD4_A :: _1 => true } } } # [ doc = "Reader of field `PDD4`" ] pub type PDD4_R = crate :: R < bool , PDD4_A > ; impl PDD4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD4_A { match self . bits { false => PDD4_A :: _0 , true => PDD4_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD4_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD4_A :: _1 } } # [ doc = "Write proxy for field `PDD4`" ] pub struct PDD4_W < 'a > { w : & 'a mut W , } impl < 'a > PDD4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD4_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD4_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD5_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD5_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD5_A ) -> Self { match variant { PDD5_A :: _0 => false , PDD5_A :: _1 => true } } } # [ doc = "Reader of field `PDD5`" ] pub type PDD5_R = crate :: R < bool , PDD5_A > ; impl PDD5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD5_A { match self . bits { false => PDD5_A :: _0 , true => PDD5_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD5_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD5_A :: _1 } } # [ doc = "Write proxy for field `PDD5`" ] pub struct PDD5_W < 'a > { w : & 'a mut W , } impl < 'a > PDD5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD5_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD5_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD6_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD6_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD6_A ) -> Self { match variant { PDD6_A :: _0 => false , PDD6_A :: _1 => true } } } # [ doc = "Reader of field `PDD6`" ] pub type PDD6_R = crate :: R < bool , PDD6_A > ; impl PDD6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD6_A { match self . bits { false => PDD6_A :: _0 , true => PDD6_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD6_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD6_A :: _1 } } # [ doc = "Write proxy for field `PDD6`" ] pub struct PDD6_W < 'a > { w : & 'a mut W , } impl < 'a > PDD6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD6_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD6_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD7_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD7_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD7_A ) -> Self { match variant { PDD7_A :: _0 => false , PDD7_A :: _1 => true } } } # [ doc = "Reader of field `PDD7`" ] pub type PDD7_R = crate :: R < bool , PDD7_A > ; impl PDD7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD7_A { match self . bits { false => PDD7_A :: _0 , true => PDD7_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD7_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD7_A :: _1 } } # [ doc = "Write proxy for field `PDD7`" ] pub struct PDD7_W < 'a > { w : & 'a mut W , } impl < 'a > PDD7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD7_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD7_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD8_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD8_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD8_A ) -> Self { match variant { PDD8_A :: _0 => false , PDD8_A :: _1 => true } } } # [ doc = "Reader of field `PDD8`" ] pub type PDD8_R = crate :: R < bool , PDD8_A > ; impl PDD8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD8_A { match self . bits { false => PDD8_A :: _0 , true => PDD8_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD8_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD8_A :: _1 } } # [ doc = "Write proxy for field `PDD8`" ] pub struct PDD8_W < 'a > { w : & 'a mut W , } impl < 'a > PDD8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD8_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD8_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD9_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD9_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD9_A ) -> Self { match variant { PDD9_A :: _0 => false , PDD9_A :: _1 => true } } } # [ doc = "Reader of field `PDD9`" ] pub type PDD9_R = crate :: R < bool , PDD9_A > ; impl PDD9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD9_A { match self . bits { false => PDD9_A :: _0 , true => PDD9_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD9_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD9_A :: _1 } } # [ doc = "Write proxy for field `PDD9`" ] pub struct PDD9_W < 'a > { w : & 'a mut W , } impl < 'a > PDD9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD9_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD9_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD10_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD10_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD10_A ) -> Self { match variant { PDD10_A :: _0 => false , PDD10_A :: _1 => true } } } # [ doc = "Reader of field `PDD10`" ] pub type PDD10_R = crate :: R < bool , PDD10_A > ; impl PDD10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD10_A { match self . bits { false => PDD10_A :: _0 , true => PDD10_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD10_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD10_A :: _1 } } # [ doc = "Write proxy for field `PDD10`" ] pub struct PDD10_W < 'a > { w : & 'a mut W , } impl < 'a > PDD10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD10_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD10_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD11_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD11_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD11_A ) -> Self { match variant { PDD11_A :: _0 => false , PDD11_A :: _1 => true } } } # [ doc = "Reader of field `PDD11`" ] pub type PDD11_R = crate :: R < bool , PDD11_A > ; impl PDD11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD11_A { match self . bits { false => PDD11_A :: _0 , true => PDD11_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD11_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD11_A :: _1 } } # [ doc = "Write proxy for field `PDD11`" ] pub struct PDD11_W < 'a > { w : & 'a mut W , } impl < 'a > PDD11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD11_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD11_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD12_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD12_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD12_A ) -> Self { match variant { PDD12_A :: _0 => false , PDD12_A :: _1 => true } } } # [ doc = "Reader of field `PDD12`" ] pub type PDD12_R = crate :: R < bool , PDD12_A > ; impl PDD12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD12_A { match self . bits { false => PDD12_A :: _0 , true => PDD12_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD12_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD12_A :: _1 } } # [ doc = "Write proxy for field `PDD12`" ] pub struct PDD12_W < 'a > { w : & 'a mut W , } impl < 'a > PDD12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD12_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD12_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD13_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD13_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD13_A ) -> Self { match variant { PDD13_A :: _0 => false , PDD13_A :: _1 => true } } } # [ doc = "Reader of field `PDD13`" ] pub type PDD13_R = crate :: R < bool , PDD13_A > ; impl PDD13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD13_A { match self . bits { false => PDD13_A :: _0 , true => PDD13_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD13_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD13_A :: _1 } } # [ doc = "Write proxy for field `PDD13`" ] pub struct PDD13_W < 'a > { w : & 'a mut W , } impl < 'a > PDD13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD13_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD13_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD14_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD14_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD14_A ) -> Self { match variant { PDD14_A :: _0 => false , PDD14_A :: _1 => true } } } # [ doc = "Reader of field `PDD14`" ] pub type PDD14_R = crate :: R < bool , PDD14_A > ; impl PDD14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD14_A { match self . bits { false => PDD14_A :: _0 , true => PDD14_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD14_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD14_A :: _1 } } # [ doc = "Write proxy for field `PDD14`" ] pub struct PDD14_W < 'a > { w : & 'a mut W , } impl < 'a > PDD14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD14_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD14_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD15_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD15_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD15_A ) -> Self { match variant { PDD15_A :: _0 => false , PDD15_A :: _1 => true } } } # [ doc = "Reader of field `PDD15`" ] pub type PDD15_R = crate :: R < bool , PDD15_A > ; impl PDD15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD15_A { match self . bits { false => PDD15_A :: _0 , true => PDD15_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD15_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD15_A :: _1 } } # [ doc = "Write proxy for field `PDD15`" ] pub struct PDD15_W < 'a > { w : & 'a mut W , } impl < 'a > PDD15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD15_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD15_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD16_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD16_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD16_A ) -> Self { match variant { PDD16_A :: _0 => false , PDD16_A :: _1 => true } } } # [ doc = "Reader of field `PDD16`" ] pub type PDD16_R = crate :: R < bool , PDD16_A > ; impl PDD16_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD16_A { match self . bits { false => PDD16_A :: _0 , true => PDD16_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD16_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD16_A :: _1 } } # [ doc = "Write proxy for field `PDD16`" ] pub struct PDD16_W < 'a > { w : & 'a mut W , } impl < 'a > PDD16_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD16_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD16_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD17_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD17_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD17_A ) -> Self { match variant { PDD17_A :: _0 => false , PDD17_A :: _1 => true } } } # [ doc = "Reader of field `PDD17`" ] pub type PDD17_R = crate :: R < bool , PDD17_A > ; impl PDD17_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD17_A { match self . bits { false => PDD17_A :: _0 , true => PDD17_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD17_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD17_A :: _1 } } # [ doc = "Write proxy for field `PDD17`" ] pub struct PDD17_W < 'a > { w : & 'a mut W , } impl < 'a > PDD17_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD17_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD17_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD18_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD18_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD18_A ) -> Self { match variant { PDD18_A :: _0 => false , PDD18_A :: _1 => true } } } # [ doc = "Reader of field `PDD18`" ] pub type PDD18_R = crate :: R < bool , PDD18_A > ; impl PDD18_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD18_A { match self . bits { false => PDD18_A :: _0 , true => PDD18_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD18_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD18_A :: _1 } } # [ doc = "Write proxy for field `PDD18`" ] pub struct PDD18_W < 'a > { w : & 'a mut W , } impl < 'a > PDD18_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD18_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD18_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD19_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD19_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD19_A ) -> Self { match variant { PDD19_A :: _0 => false , PDD19_A :: _1 => true } } } # [ doc = "Reader of field `PDD19`" ] pub type PDD19_R = crate :: R < bool , PDD19_A > ; impl PDD19_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD19_A { match self . bits { false => PDD19_A :: _0 , true => PDD19_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD19_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD19_A :: _1 } } # [ doc = "Write proxy for field `PDD19`" ] pub struct PDD19_W < 'a > { w : & 'a mut W , } impl < 'a > PDD19_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD19_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD19_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD20_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD20_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD20_A ) -> Self { match variant { PDD20_A :: _0 => false , PDD20_A :: _1 => true } } } # [ doc = "Reader of field `PDD20`" ] pub type PDD20_R = crate :: R < bool , PDD20_A > ; impl PDD20_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD20_A { match self . bits { false => PDD20_A :: _0 , true => PDD20_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD20_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD20_A :: _1 } } # [ doc = "Write proxy for field `PDD20`" ] pub struct PDD20_W < 'a > { w : & 'a mut W , } impl < 'a > PDD20_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD20_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD20_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD21_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD21_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD21_A ) -> Self { match variant { PDD21_A :: _0 => false , PDD21_A :: _1 => true } } } # [ doc = "Reader of field `PDD21`" ] pub type PDD21_R = crate :: R < bool , PDD21_A > ; impl PDD21_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD21_A { match self . bits { false => PDD21_A :: _0 , true => PDD21_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD21_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD21_A :: _1 } } # [ doc = "Write proxy for field `PDD21`" ] pub struct PDD21_W < 'a > { w : & 'a mut W , } impl < 'a > PDD21_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD21_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD21_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD22_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD22_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD22_A ) -> Self { match variant { PDD22_A :: _0 => false , PDD22_A :: _1 => true } } } # [ doc = "Reader of field `PDD22`" ] pub type PDD22_R = crate :: R < bool , PDD22_A > ; impl PDD22_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD22_A { match self . bits { false => PDD22_A :: _0 , true => PDD22_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD22_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD22_A :: _1 } } # [ doc = "Write proxy for field `PDD22`" ] pub struct PDD22_W < 'a > { w : & 'a mut W , } impl < 'a > PDD22_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD22_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD22_A :: _1 ) } # [ 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 << 22 ) ) | ( ( ( value as u32 ) & 0x01 ) << 22 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD23_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD23_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD23_A ) -> Self { match variant { PDD23_A :: _0 => false , PDD23_A :: _1 => true } } } # [ doc = "Reader of field `PDD23`" ] pub type PDD23_R = crate :: R < bool , PDD23_A > ; impl PDD23_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD23_A { match self . bits { false => PDD23_A :: _0 , true => PDD23_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD23_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD23_A :: _1 } } # [ doc = "Write proxy for field `PDD23`" ] pub struct PDD23_W < 'a > { w : & 'a mut W , } impl < 'a > PDD23_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD23_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD23_A :: _1 ) } # [ 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 << 23 ) ) | ( ( ( value as u32 ) & 0x01 ) << 23 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD24_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD24_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD24_A ) -> Self { match variant { PDD24_A :: _0 => false , PDD24_A :: _1 => true } } } # [ doc = "Reader of field `PDD24`" ] pub type PDD24_R = crate :: R < bool , PDD24_A > ; impl PDD24_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD24_A { match self . bits { false => PDD24_A :: _0 , true => PDD24_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD24_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD24_A :: _1 } } # [ doc = "Write proxy for field `PDD24`" ] pub struct PDD24_W < 'a > { w : & 'a mut W , } impl < 'a > PDD24_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD24_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD24_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD25_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD25_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD25_A ) -> Self { match variant { PDD25_A :: _0 => false , PDD25_A :: _1 => true } } } # [ doc = "Reader of field `PDD25`" ] pub type PDD25_R = crate :: R < bool , PDD25_A > ; impl PDD25_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD25_A { match self . bits { false => PDD25_A :: _0 , true => PDD25_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD25_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD25_A :: _1 } } # [ doc = "Write proxy for field `PDD25`" ] pub struct PDD25_W < 'a > { w : & 'a mut W , } impl < 'a > PDD25_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD25_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD25_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD26_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD26_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD26_A ) -> Self { match variant { PDD26_A :: _0 => false , PDD26_A :: _1 => true } } } # [ doc = "Reader of field `PDD26`" ] pub type PDD26_R = crate :: R < bool , PDD26_A > ; impl PDD26_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD26_A { match self . bits { false => PDD26_A :: _0 , true => PDD26_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD26_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD26_A :: _1 } } # [ doc = "Write proxy for field `PDD26`" ] pub struct PDD26_W < 'a > { w : & 'a mut W , } impl < 'a > PDD26_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD26_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD26_A :: _1 ) } # [ 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 = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD27_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD27_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD27_A ) -> Self { match variant { PDD27_A :: _0 => false , PDD27_A :: _1 => true } } } # [ doc = "Reader of field `PDD27`" ] pub type PDD27_R = crate :: R < bool , PDD27_A > ; impl PDD27_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD27_A { match self . bits { false => PDD27_A :: _0 , true => PDD27_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD27_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD27_A :: _1 } } # [ doc = "Write proxy for field `PDD27`" ] pub struct PDD27_W < 'a > { w : & 'a mut W , } impl < 'a > PDD27_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD27_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD27_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD28_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD28_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD28_A ) -> Self { match variant { PDD28_A :: _0 => false , PDD28_A :: _1 => true } } } # [ doc = "Reader of field `PDD28`" ] pub type PDD28_R = crate :: R < bool , PDD28_A > ; impl PDD28_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD28_A { match self . bits { false => PDD28_A :: _0 , true => PDD28_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD28_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD28_A :: _1 } } # [ doc = "Write proxy for field `PDD28`" ] pub struct PDD28_W < 'a > { w : & 'a mut W , } impl < 'a > PDD28_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD28_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD28_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD29_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD29_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD29_A ) -> Self { match variant { PDD29_A :: _0 => false , PDD29_A :: _1 => true } } } # [ doc = "Reader of field `PDD29`" ] pub type PDD29_R = crate :: R < bool , PDD29_A > ; impl PDD29_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD29_A { match self . bits { false => PDD29_A :: _0 , true => PDD29_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD29_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD29_A :: _1 } } # [ doc = "Write proxy for field `PDD29`" ] pub struct PDD29_W < 'a > { w : & 'a mut W , } impl < 'a > PDD29_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD29_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD29_A :: _1 ) } # [ 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 << 29 ) ) | ( ( ( value as u32 ) & 0x01 ) << 29 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD30_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD30_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD30_A ) -> Self { match variant { PDD30_A :: _0 => false , PDD30_A :: _1 => true } } } # [ doc = "Reader of field `PDD30`" ] pub type PDD30_R = crate :: R < bool , PDD30_A > ; impl PDD30_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD30_A { match self . bits { false => PDD30_A :: _0 , true => PDD30_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD30_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD30_A :: _1 } } # [ doc = "Write proxy for field `PDD30`" ] pub struct PDD30_W < 'a > { w : & 'a mut W , } impl < 'a > PDD30_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD30_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD30_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Port Data Direction\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PDD31_A { # [ doc = "0: Pin is configured as general-purpose input, for the GPIO function." ] _0 , # [ doc = "1: Pin is configured as general-purpose output, for the GPIO function." ] _1 } impl From < PDD31_A > for bool { # [ inline ( always ) ] fn from ( variant : PDD31_A ) -> Self { match variant { PDD31_A :: _0 => false , PDD31_A :: _1 => true } } } # [ doc = "Reader of field `PDD31`" ] pub type PDD31_R = crate :: R < bool , PDD31_A > ; impl PDD31_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PDD31_A { match self . bits { false => PDD31_A :: _0 , true => PDD31_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PDD31_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PDD31_A :: _1 } } # [ doc = "Write proxy for field `PDD31`" ] pub struct PDD31_W < 'a > { w : & 'a mut W , } impl < 'a > PDD31_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PDD31_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Pin is configured as general-purpose input, for the GPIO function." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _0 ) } # [ doc = "Pin is configured as general-purpose output, for the GPIO function." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PDD31_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & self ) -> PDD0_R { PDD0_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & self ) -> PDD1_R { PDD1_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & self ) -> PDD2_R { PDD2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & self ) -> PDD3_R { PDD3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & self ) -> PDD4_R { PDD4_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & self ) -> PDD5_R { PDD5_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & self ) -> PDD6_R { PDD6_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & self ) -> PDD7_R { PDD7_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & self ) -> PDD8_R { PDD8_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & self ) -> PDD9_R { PDD9_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & self ) -> PDD10_R { PDD10_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & self ) -> PDD11_R { PDD11_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & self ) -> PDD12_R { PDD12_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & self ) -> PDD13_R { PDD13_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & self ) -> PDD14_R { PDD14_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & self ) -> PDD15_R { PDD15_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & self ) -> PDD16_R { PDD16_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & self ) -> PDD17_R { PDD17_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & self ) -> PDD18_R { PDD18_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & self ) -> PDD19_R { PDD19_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & self ) -> PDD20_R { PDD20_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & self ) -> PDD21_R { PDD21_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & self ) -> PDD22_R { PDD22_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & self ) -> PDD23_R { PDD23_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & self ) -> PDD24_R { PDD24_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & self ) -> PDD25_R { PDD25_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & self ) -> PDD26_R { PDD26_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & self ) -> PDD27_R { PDD27_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & self ) -> PDD28_R { PDD28_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & self ) -> PDD29_R { PDD29_R :: new ( ( ( self . bits >> 29 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & self ) -> PDD30_R { PDD30_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & self ) -> PDD31_R { PDD31_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd0 ( & mut self ) -> PDD0_W { PDD0_W { w : self } } # [ doc = "Bit 1 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd1 ( & mut self ) -> PDD1_W { PDD1_W { w : self } } # [ doc = "Bit 2 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd2 ( & mut self ) -> PDD2_W { PDD2_W { w : self } } # [ doc = "Bit 3 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd3 ( & mut self ) -> PDD3_W { PDD3_W { w : self } } # [ doc = "Bit 4 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd4 ( & mut self ) -> PDD4_W { PDD4_W { w : self } } # [ doc = "Bit 5 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd5 ( & mut self ) -> PDD5_W { PDD5_W { w : self } } # [ doc = "Bit 6 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd6 ( & mut self ) -> PDD6_W { PDD6_W { w : self } } # [ doc = "Bit 7 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd7 ( & mut self ) -> PDD7_W { PDD7_W { w : self } } # [ doc = "Bit 8 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd8 ( & mut self ) -> PDD8_W { PDD8_W { w : self } } # [ doc = "Bit 9 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd9 ( & mut self ) -> PDD9_W { PDD9_W { w : self } } # [ doc = "Bit 10 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd10 ( & mut self ) -> PDD10_W { PDD10_W { w : self } } # [ doc = "Bit 11 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd11 ( & mut self ) -> PDD11_W { PDD11_W { w : self } } # [ doc = "Bit 12 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd12 ( & mut self ) -> PDD12_W { PDD12_W { w : self } } # [ doc = "Bit 13 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd13 ( & mut self ) -> PDD13_W { PDD13_W { w : self } } # [ doc = "Bit 14 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd14 ( & mut self ) -> PDD14_W { PDD14_W { w : self } } # [ doc = "Bit 15 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd15 ( & mut self ) -> PDD15_W { PDD15_W { w : self } } # [ doc = "Bit 16 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd16 ( & mut self ) -> PDD16_W { PDD16_W { w : self } } # [ doc = "Bit 17 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd17 ( & mut self ) -> PDD17_W { PDD17_W { w : self } } # [ doc = "Bit 18 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd18 ( & mut self ) -> PDD18_W { PDD18_W { w : self } } # [ doc = "Bit 19 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd19 ( & mut self ) -> PDD19_W { PDD19_W { w : self } } # [ doc = "Bit 20 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd20 ( & mut self ) -> PDD20_W { PDD20_W { w : self } } # [ doc = "Bit 21 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd21 ( & mut self ) -> PDD21_W { PDD21_W { w : self } } # [ doc = "Bit 22 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd22 ( & mut self ) -> PDD22_W { PDD22_W { w : self } } # [ doc = "Bit 23 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd23 ( & mut self ) -> PDD23_W { PDD23_W { w : self } } # [ doc = "Bit 24 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd24 ( & mut self ) -> PDD24_W { PDD24_W { w : self } } # [ doc = "Bit 25 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd25 ( & mut self ) -> PDD25_W { PDD25_W { w : self } } # [ doc = "Bit 26 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd26 ( & mut self ) -> PDD26_W { PDD26_W { w : self } } # [ doc = "Bit 27 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd27 ( & mut self ) -> PDD27_W { PDD27_W { w : self } } # [ doc = "Bit 28 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd28 ( & mut self ) -> PDD28_W { PDD28_W { w : self } } # [ doc = "Bit 29 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd29 ( & mut self ) -> PDD29_W { PDD29_W { w : self } } # [ doc = "Bit 30 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd30 ( & mut self ) -> PDD30_W { PDD30_W { w : self } } # [ doc = "Bit 31 - Port Data Direction" ] # [ inline ( always ) ] pub fn pdd31 ( & mut self ) -> PDD31_W { PDD31_W { w : self } } } } } # [ doc = "System Control Block" ] pub struct SYSTEMCONTROL { _marker : PhantomData < * const ( ) > } unsafe impl Send for SYSTEMCONTROL { } impl SYSTEMCONTROL { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const system_control :: RegisterBlock { 0xe000_e000 as * const _ } } impl Deref for SYSTEMCONTROL { type Target = system_control :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SYSTEMCONTROL :: ptr ( ) } } } # [ doc = "System Control Block" ] pub mod system_control { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 8usize ] , # [ doc = "0x08 - Auxiliary Control Register," ] pub actlr : ACTLR , _reserved1 : [ u8 ; 3316usize ] , # [ doc = "0xd00 - CPUID Base Register" ] pub cpuid : CPUID , # [ doc = "0xd04 - Interrupt Control and State Register" ] pub icsr : ICSR , # [ doc = "0xd08 - Vector Table Offset Register" ] pub vtor : VTOR , # [ doc = "0xd0c - Application Interrupt and Reset Control Register" ] pub aircr : AIRCR , # [ doc = "0xd10 - System Control Register" ] pub scr : SCR , # [ doc = "0xd14 - Configuration and Control Register" ] pub ccr : CCR , # [ doc = "0xd18 - System Handler Priority Register 1" ] pub shpr1 : SHPR1 , # [ doc = "0xd1c - System Handler Priority Register 2" ] pub shpr2 : SHPR2 , # [ doc = "0xd20 - System Handler Priority Register 3" ] pub shpr3 : SHPR3 , # [ doc = "0xd24 - System Handler Control and State Register" ] pub shcsr : SHCSR , # [ doc = "0xd28 - Configurable Fault Status Registers" ] pub cfsr : CFSR , # [ doc = "0xd2c - HardFault Status register" ] pub hfsr : HFSR , # [ doc = "0xd30 - Debug Fault Status Register" ] pub dfsr : DFSR , # [ doc = "0xd34 - MemManage Address Register" ] pub mmfar : MMFAR , # [ doc = "0xd38 - BusFault Address Register" ] pub bfar : BFAR , # [ doc = "0xd3c - Auxiliary Fault Status Register" ] pub afsr : AFSR , _reserved17 : [ u8 ; 72usize ] , # [ doc = "0xd88 - Coprocessor Access Control Register" ] pub cpacr : CPACR , _reserved18 : [ u8 ; 424usize ] , # [ doc = "0xf34 - Floating-point Context Control Register" ] pub fpccr : FPCCR , # [ doc = "0xf38 - Floating-point Context Address Register" ] pub fpcar : FPCAR , # [ doc = "0xf3c - Floating-point Default Status Control Register" ] pub fpdscr : FPDSCR , } # [ doc = "Auxiliary Control Register,\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [actlr](actlr) module" ] pub type ACTLR = crate :: Reg < u32 , _ACTLR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ACTLR ; # [ doc = "`read()` method returns [actlr::R](actlr::R) reader structure" ] impl crate :: Readable for ACTLR { } # [ doc = "`write(|w| ..)` method takes [actlr::W](actlr::W) writer structure" ] impl crate :: Writable for ACTLR { } # [ doc = "Auxiliary Control Register," ] pub mod actlr { # [ doc = "Reader of register ACTLR" ] pub type R = crate :: R < u32 , super :: ACTLR > ; # [ doc = "Writer for register ACTLR" ] pub type W = crate :: W < u32 , super :: ACTLR > ; # [ doc = "Register ACTLR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ACTLR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DISMCYCINT`" ] pub type DISMCYCINT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DISMCYCINT`" ] pub struct DISMCYCINT_W < 'a > { w : & 'a mut W , } impl < 'a > DISMCYCINT_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `DISDEFWBUF`" ] pub type DISDEFWBUF_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DISDEFWBUF`" ] pub struct DISDEFWBUF_W < 'a > { w : & 'a mut W , } impl < 'a > DISDEFWBUF_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 } } # [ doc = "Reader of field `DISFOLD`" ] pub type DISFOLD_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DISFOLD`" ] pub struct DISFOLD_W < 'a > { w : & 'a mut W , } impl < 'a > DISFOLD_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 } } impl R { # [ doc = "Bit 0 - Disables interruption of multi-cycle instructions." ] # [ inline ( always ) ] pub fn dismcycint ( & self ) -> DISMCYCINT_R { DISMCYCINT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Disables write buffer use during default memory map accesses." ] # [ inline ( always ) ] pub fn disdefwbuf ( & self ) -> DISDEFWBUF_R { DISDEFWBUF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Disables folding of IT instructions." ] # [ inline ( always ) ] pub fn disfold ( & self ) -> DISFOLD_R { DISFOLD_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Disables interruption of multi-cycle instructions." ] # [ inline ( always ) ] pub fn dismcycint ( & mut self ) -> DISMCYCINT_W { DISMCYCINT_W { w : self } } # [ doc = "Bit 1 - Disables write buffer use during default memory map accesses." ] # [ inline ( always ) ] pub fn disdefwbuf ( & mut self ) -> DISDEFWBUF_W { DISDEFWBUF_W { w : self } } # [ doc = "Bit 2 - Disables folding of IT instructions." ] # [ inline ( always ) ] pub fn disfold ( & mut self ) -> DISFOLD_W { DISFOLD_W { w : self } } } } # [ doc = "CPUID Base Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cpuid](cpuid) module" ] pub type CPUID = crate :: Reg < u32 , _CPUID > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CPUID ; # [ doc = "`read()` method returns [cpuid::R](cpuid::R) reader structure" ] impl crate :: Readable for CPUID { } # [ doc = "CPUID Base Register" ] pub mod cpuid { # [ doc = "Reader of register CPUID" ] pub type R = crate :: R < u32 , super :: CPUID > ; # [ doc = "Reader of field `REVISION`" ] pub type REVISION_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `PARTNO`" ] pub type PARTNO_R = crate :: R < u16 , u16 > ; # [ doc = "Reader of field `VARIANT`" ] pub type VARIANT_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `IMPLEMENTER`" ] pub type IMPLEMENTER_R = crate :: R < u8 , u8 > ; impl R { # [ doc = "Bits 0:3 - Indicates patch release: 0x0 = Patch 0" ] # [ inline ( always ) ] pub fn revision ( & self ) -> REVISION_R { REVISION_R :: new ( ( self . bits & 0x0f ) as u8 ) } # [ doc = "Bits 4:15 - Indicates part number" ] # [ inline ( always ) ] pub fn partno ( & self ) -> PARTNO_R { PARTNO_R :: new ( ( ( self . bits >> 4 ) & 0x0fff ) as u16 ) } # [ doc = "Bits 20:23 - Indicates processor revision: 0x2 = Revision 2" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VARIANT_R { VARIANT_R :: new ( ( ( self . bits >> 20 ) & 0x0f ) as u8 ) } # [ doc = "Bits 24:31 - Implementer code" ] # [ inline ( always ) ] pub fn implementer ( & self ) -> IMPLEMENTER_R { IMPLEMENTER_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } } # [ doc = "Interrupt Control and State Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [icsr](icsr) module" ] pub type ICSR = crate :: Reg < u32 , _ICSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ICSR ; # [ doc = "`read()` method returns [icsr::R](icsr::R) reader structure" ] impl crate :: Readable for ICSR { } # [ doc = "`write(|w| ..)` method takes [icsr::W](icsr::W) writer structure" ] impl crate :: Writable for ICSR { } # [ doc = "Interrupt Control and State Register" ] pub mod icsr { # [ doc = "Reader of register ICSR" ] pub type R = crate :: R < u32 , super :: ICSR > ; # [ doc = "Writer for register ICSR" ] pub type W = crate :: W < u32 , super :: ICSR > ; # [ doc = "Register ICSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ICSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `VECTACTIVE`" ] pub type VECTACTIVE_R = crate :: R < u16 , u16 > ; # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RETTOBASE_A { # [ doc = "0: there are preempted active exceptions to execute" ] _0 , # [ doc = "1: there are no active exceptions, or the currently-executing exception is the only active exception" ] _1 } impl From < RETTOBASE_A > for bool { # [ inline ( always ) ] fn from ( variant : RETTOBASE_A ) -> Self { match variant { RETTOBASE_A :: _0 => false , RETTOBASE_A :: _1 => true } } } # [ doc = "Reader of field `RETTOBASE`" ] pub type RETTOBASE_R = crate :: R < bool , RETTOBASE_A > ; impl RETTOBASE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RETTOBASE_A { match self . bits { false => RETTOBASE_A :: _0 , true => RETTOBASE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RETTOBASE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RETTOBASE_A :: _1 } } # [ doc = "Reader of field `VECTPENDING`" ] pub type VECTPENDING_R = crate :: R < u8 , u8 > ; # [ doc = "Reader of field `ISRPENDING`" ] pub type ISRPENDING_R = crate :: R < bool , bool > ; # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISRPREEMPT_A { # [ doc = "0: Will not service" ] _0 , # [ doc = "1: Will service a pending exception" ] _1 } impl From < ISRPREEMPT_A > for bool { # [ inline ( always ) ] fn from ( variant : ISRPREEMPT_A ) -> Self { match variant { ISRPREEMPT_A :: _0 => false , ISRPREEMPT_A :: _1 => true } } } # [ doc = "Reader of field `ISRPREEMPT`" ] pub type ISRPREEMPT_R = crate :: R < bool , ISRPREEMPT_A > ; impl ISRPREEMPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ISRPREEMPT_A { match self . bits { false => ISRPREEMPT_A :: _0 , true => ISRPREEMPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ISRPREEMPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ISRPREEMPT_A :: _1 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PENDSTCLR_AW { # [ doc = "0: no effect" ] _0 , # [ doc = "1: removes the pending state from the SysTick exception" ] _1 } impl From < PENDSTCLR_AW > for bool { # [ inline ( always ) ] fn from ( variant : PENDSTCLR_AW ) -> Self { match variant { PENDSTCLR_AW :: _0 => false , PENDSTCLR_AW :: _1 => true } } } # [ doc = "Write proxy for field `PENDSTCLR`" ] pub struct PENDSTCLR_W < 'a > { w : & 'a mut W , } impl < 'a > PENDSTCLR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PENDSTCLR_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no effect" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PENDSTCLR_AW :: _0 ) } # [ doc = "removes the pending state from the SysTick exception" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PENDSTCLR_AW :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PENDSTSET_A { # [ doc = "0: write: no effect; read: SysTick exception is not pending" ] _0 , # [ doc = "1: write: changes SysTick exception state to pending; read: SysTick exception is pending" ] _1 } impl From < PENDSTSET_A > for bool { # [ inline ( always ) ] fn from ( variant : PENDSTSET_A ) -> Self { match variant { PENDSTSET_A :: _0 => false , PENDSTSET_A :: _1 => true } } } # [ doc = "Reader of field `PENDSTSET`" ] pub type PENDSTSET_R = crate :: R < bool , PENDSTSET_A > ; impl PENDSTSET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PENDSTSET_A { match self . bits { false => PENDSTSET_A :: _0 , true => PENDSTSET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PENDSTSET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PENDSTSET_A :: _1 } } # [ doc = "Write proxy for field `PENDSTSET`" ] pub struct PENDSTSET_W < 'a > { w : & 'a mut W , } impl < 'a > PENDSTSET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PENDSTSET_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "write: no effect; read: SysTick exception is not pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PENDSTSET_A :: _0 ) } # [ doc = "write: changes SysTick exception state to pending; read: SysTick exception is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PENDSTSET_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PENDSVCLR_AW { # [ doc = "0: no effect" ] _0 , # [ doc = "1: removes the pending state from the PendSV exception" ] _1 } impl From < PENDSVCLR_AW > for bool { # [ inline ( always ) ] fn from ( variant : PENDSVCLR_AW ) -> Self { match variant { PENDSVCLR_AW :: _0 => false , PENDSVCLR_AW :: _1 => true } } } # [ doc = "Write proxy for field `PENDSVCLR`" ] pub struct PENDSVCLR_W < 'a > { w : & 'a mut W , } impl < 'a > PENDSVCLR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PENDSVCLR_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no effect" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PENDSVCLR_AW :: _0 ) } # [ doc = "removes the pending state from the PendSV exception" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PENDSVCLR_AW :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PENDSVSET_A { # [ doc = "0: write: no effect; read: PendSV exception is not pending" ] _0 , # [ doc = "1: write: changes PendSV exception state to pending; read: PendSV exception is pending" ] _1 } impl From < PENDSVSET_A > for bool { # [ inline ( always ) ] fn from ( variant : PENDSVSET_A ) -> Self { match variant { PENDSVSET_A :: _0 => false , PENDSVSET_A :: _1 => true } } } # [ doc = "Reader of field `PENDSVSET`" ] pub type PENDSVSET_R = crate :: R < bool , PENDSVSET_A > ; impl PENDSVSET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PENDSVSET_A { match self . bits { false => PENDSVSET_A :: _0 , true => PENDSVSET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PENDSVSET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PENDSVSET_A :: _1 } } # [ doc = "Write proxy for field `PENDSVSET`" ] pub struct PENDSVSET_W < 'a > { w : & 'a mut W , } impl < 'a > PENDSVSET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PENDSVSET_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "write: no effect; read: PendSV exception is not pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PENDSVSET_A :: _0 ) } # [ doc = "write: changes PendSV exception state to pending; read: PendSV exception is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PENDSVSET_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NMIPENDSET_A { # [ doc = "0: write: no effect; read: NMI exception is not pending" ] _0 , # [ doc = "1: write: changes NMI exception state to pending; read: NMI exception is pending" ] _1 } impl From < NMIPENDSET_A > for bool { # [ inline ( always ) ] fn from ( variant : NMIPENDSET_A ) -> Self { match variant { NMIPENDSET_A :: _0 => false , NMIPENDSET_A :: _1 => true } } } # [ doc = "Reader of field `NMIPENDSET`" ] pub type NMIPENDSET_R = crate :: R < bool , NMIPENDSET_A > ; impl NMIPENDSET_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NMIPENDSET_A { match self . bits { false => NMIPENDSET_A :: _0 , true => NMIPENDSET_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NMIPENDSET_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NMIPENDSET_A :: _1 } } # [ doc = "Write proxy for field `NMIPENDSET`" ] pub struct NMIPENDSET_W < 'a > { w : & 'a mut W , } impl < 'a > NMIPENDSET_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NMIPENDSET_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "write: no effect; read: NMI exception is not pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NMIPENDSET_A :: _0 ) } # [ doc = "write: changes NMI exception state to pending; read: NMI exception is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NMIPENDSET_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bits 0:8 - Active exception number" ] # [ inline ( always ) ] pub fn vectactive ( & self ) -> VECTACTIVE_R { VECTACTIVE_R :: new ( ( self . bits & 0x01ff ) as u16 ) } # [ doc = "Bit 11 - no description available" ] # [ inline ( always ) ] pub fn rettobase ( & self ) -> RETTOBASE_R { RETTOBASE_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bits 12:17 - Exception number of the highest priority pending enabled exception" ] # [ inline ( always ) ] pub fn vectpending ( & self ) -> VECTPENDING_R { VECTPENDING_R :: new ( ( ( self . bits >> 12 ) & 0x3f ) as u8 ) } # [ doc = "Bit 22 - no description available" ] # [ inline ( always ) ] pub fn isrpending ( & self ) -> ISRPENDING_R { ISRPENDING_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bit 23 - no description available" ] # [ inline ( always ) ] pub fn isrpreempt ( & self ) -> ISRPREEMPT_R { ISRPREEMPT_R :: new ( ( ( self . bits >> 23 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - no description available" ] # [ inline ( always ) ] pub fn pendstset ( & self ) -> PENDSTSET_R { PENDSTSET_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - no description available" ] # [ inline ( always ) ] pub fn pendsvset ( & self ) -> PENDSVSET_R { PENDSVSET_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - no description available" ] # [ inline ( always ) ] pub fn nmipendset ( & self ) -> NMIPENDSET_R { NMIPENDSET_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 25 - no description available" ] # [ inline ( always ) ] pub fn pendstclr ( & mut self ) -> PENDSTCLR_W { PENDSTCLR_W { w : self } } # [ doc = "Bit 26 - no description available" ] # [ inline ( always ) ] pub fn pendstset ( & mut self ) -> PENDSTSET_W { PENDSTSET_W { w : self } } # [ doc = "Bit 27 - no description available" ] # [ inline ( always ) ] pub fn pendsvclr ( & mut self ) -> PENDSVCLR_W { PENDSVCLR_W { w : self } } # [ doc = "Bit 28 - no description available" ] # [ inline ( always ) ] pub fn pendsvset ( & mut self ) -> PENDSVSET_W { PENDSVSET_W { w : self } } # [ doc = "Bit 31 - no description available" ] # [ inline ( always ) ] pub fn nmipendset ( & mut self ) -> NMIPENDSET_W { NMIPENDSET_W { w : self } } } } # [ doc = "Vector Table Offset Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [vtor](vtor) module" ] pub type VTOR = crate :: Reg < u32 , _VTOR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _VTOR ; # [ doc = "`read()` method returns [vtor::R](vtor::R) reader structure" ] impl crate :: Readable for VTOR { } # [ doc = "`write(|w| ..)` method takes [vtor::W](vtor::W) writer structure" ] impl crate :: Writable for VTOR { } # [ doc = "Vector Table Offset Register" ] pub mod vtor { # [ doc = "Reader of register VTOR" ] pub type R = crate :: R < u32 , super :: VTOR > ; # [ doc = "Writer for register VTOR" ] pub type W = crate :: W < u32 , super :: VTOR > ; # [ doc = "Register VTOR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: VTOR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `TBLOFF`" ] pub type TBLOFF_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `TBLOFF`" ] pub struct TBLOFF_W < 'a > { w : & 'a mut W , } impl < 'a > TBLOFF_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x01ff_ffff << 7 ) ) | ( ( ( value as u32 ) & 0x01ff_ffff ) << 7 ) ; self . w } } impl R { # [ doc = "Bits 7:31 - Vector table base offset" ] # [ inline ( always ) ] pub fn tbloff ( & self ) -> TBLOFF_R { TBLOFF_R :: new ( ( ( self . bits >> 7 ) & 0x01ff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 7:31 - Vector table base offset" ] # [ inline ( always ) ] pub fn tbloff ( & mut self ) -> TBLOFF_W { TBLOFF_W { w : self } } } } # [ doc = "Application Interrupt and Reset Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [aircr](aircr) module" ] pub type AIRCR = crate :: Reg < u32 , _AIRCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _AIRCR ; # [ doc = "`read()` method returns [aircr::R](aircr::R) reader structure" ] impl crate :: Readable for AIRCR { } # [ doc = "`write(|w| ..)` method takes [aircr::W](aircr::W) writer structure" ] impl crate :: Writable for AIRCR { } # [ doc = "Application Interrupt and Reset Control Register" ] pub mod aircr { # [ doc = "Reader of register AIRCR" ] pub type R = crate :: R < u32 , super :: AIRCR > ; # [ doc = "Writer for register AIRCR" ] pub type W = crate :: W < u32 , super :: AIRCR > ; # [ doc = "Register AIRCR `reset()`'s with value 0xfa05_0000" ] impl crate :: ResetValue for super :: AIRCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xfa05_0000 } } # [ doc = "Write proxy for field `VECTRESET`" ] pub struct VECTRESET_W < 'a > { w : & 'a mut W , } impl < 'a > VECTRESET_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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Write proxy for field `VECTCLRACTIVE`" ] pub struct VECTCLRACTIVE_W < 'a > { w : & 'a mut W , } impl < 'a > VECTCLRACTIVE_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 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYSRESETREQ_AW { # [ doc = "0: no system reset request" ] _0 , # [ doc = "1: asserts a signal to the outer system that requests a reset" ] _1 } impl From < SYSRESETREQ_AW > for bool { # [ inline ( always ) ] fn from ( variant : SYSRESETREQ_AW ) -> Self { match variant { SYSRESETREQ_AW :: _0 => false , SYSRESETREQ_AW :: _1 => true } } } # [ doc = "Write proxy for field `SYSRESETREQ`" ] pub struct SYSRESETREQ_W < 'a > { w : & 'a mut W , } impl < 'a > SYSRESETREQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYSRESETREQ_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no system reset request" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYSRESETREQ_AW :: _0 ) } # [ doc = "asserts a signal to the outer system that requests a reset" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYSRESETREQ_AW :: _1 ) } # [ 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 = "Reader of field `PRIGROUP`" ] pub type PRIGROUP_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRIGROUP`" ] pub struct PRIGROUP_W < 'a > { w : & 'a mut W , } impl < 'a > PRIGROUP_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 << 8 ) ) | ( ( ( value as u32 ) & 0x07 ) << 8 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDIANNESS_A { # [ doc = "0: Little-endian" ] _0 , # [ doc = "1: Big-endian" ] _1 } impl From < ENDIANNESS_A > for bool { # [ inline ( always ) ] fn from ( variant : ENDIANNESS_A ) -> Self { match variant { ENDIANNESS_A :: _0 => false , ENDIANNESS_A :: _1 => true } } } # [ doc = "Reader of field `ENDIANNESS`" ] pub type ENDIANNESS_R = crate :: R < bool , ENDIANNESS_A > ; impl ENDIANNESS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENDIANNESS_A { match self . bits { false => ENDIANNESS_A :: _0 , true => ENDIANNESS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENDIANNESS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENDIANNESS_A :: _1 } } # [ doc = "Reader of field `VECTKEY`" ] pub type VECTKEY_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `VECTKEY`" ] pub struct VECTKEY_W < 'a > { w : & 'a mut W , } impl < 'a > VECTKEY_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0xffff << 16 ) ) | ( ( ( value as u32 ) & 0xffff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 8:10 - Interrupt priority grouping field. This field determines the split of group priority from subpriority." ] # [ inline ( always ) ] pub fn prigroup ( & self ) -> PRIGROUP_R { PRIGROUP_R :: new ( ( ( self . bits >> 8 ) & 0x07 ) as u8 ) } # [ doc = "Bit 15 - no description available" ] # [ inline ( always ) ] pub fn endianness ( & self ) -> ENDIANNESS_R { ENDIANNESS_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bits 16:31 - Register key" ] # [ inline ( always ) ] pub fn vectkey ( & self ) -> VECTKEY_R { VECTKEY_R :: new ( ( ( self . bits >> 16 ) & 0xffff ) as u16 ) } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn vectreset ( & mut self ) -> VECTRESET_W { VECTRESET_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn vectclractive ( & mut self ) -> VECTCLRACTIVE_W { VECTCLRACTIVE_W { w : self } } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn sysresetreq ( & mut self ) -> SYSRESETREQ_W { SYSRESETREQ_W { w : self } } # [ doc = "Bits 8:10 - Interrupt priority grouping field. This field determines the split of group priority from subpriority." ] # [ inline ( always ) ] pub fn prigroup ( & mut self ) -> PRIGROUP_W { PRIGROUP_W { w : self } } # [ doc = "Bits 16:31 - Register key" ] # [ inline ( always ) ] pub fn vectkey ( & mut self ) -> VECTKEY_W { VECTKEY_W { w : self } } } } # [ doc = "System Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scr](scr) module" ] pub type SCR = crate :: Reg < u32 , _SCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SCR ; # [ doc = "`read()` method returns [scr::R](scr::R) reader structure" ] impl crate :: Readable for SCR { } # [ doc = "`write(|w| ..)` method takes [scr::W](scr::W) writer structure" ] impl crate :: Writable for SCR { } # [ doc = "System Control Register" ] pub mod scr { # [ doc = "Reader of register SCR" ] pub type R = crate :: R < u32 , super :: SCR > ; # [ doc = "Writer for register SCR" ] pub type W = crate :: W < u32 , super :: SCR > ; # [ doc = "Register SCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEPONEXIT_A { # [ doc = "0: o not sleep when returning to Thread mode" ] _0 , # [ doc = "1: enter sleep, or deep sleep, on return from an ISR" ] _1 } impl From < SLEEPONEXIT_A > for bool { # [ inline ( always ) ] fn from ( variant : SLEEPONEXIT_A ) -> Self { match variant { SLEEPONEXIT_A :: _0 => false , SLEEPONEXIT_A :: _1 => true } } } # [ doc = "Reader of field `SLEEPONEXIT`" ] pub type SLEEPONEXIT_R = crate :: R < bool , SLEEPONEXIT_A > ; impl SLEEPONEXIT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLEEPONEXIT_A { match self . bits { false => SLEEPONEXIT_A :: _0 , true => SLEEPONEXIT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLEEPONEXIT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLEEPONEXIT_A :: _1 } } # [ doc = "Write proxy for field `SLEEPONEXIT`" ] pub struct SLEEPONEXIT_W < 'a > { w : & 'a mut W , } impl < 'a > SLEEPONEXIT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLEEPONEXIT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "o not sleep when returning to Thread mode" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLEEPONEXIT_A :: _0 ) } # [ doc = "enter sleep, or deep sleep, on return from an ISR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLEEPONEXIT_A :: _1 ) } # [ 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 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEPDEEP_A { # [ doc = "0: sleep" ] _0 , # [ doc = "1: deep sleep" ] _1 } impl From < SLEEPDEEP_A > for bool { # [ inline ( always ) ] fn from ( variant : SLEEPDEEP_A ) -> Self { match variant { SLEEPDEEP_A :: _0 => false , SLEEPDEEP_A :: _1 => true } } } # [ doc = "Reader of field `SLEEPDEEP`" ] pub type SLEEPDEEP_R = crate :: R < bool , SLEEPDEEP_A > ; impl SLEEPDEEP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SLEEPDEEP_A { match self . bits { false => SLEEPDEEP_A :: _0 , true => SLEEPDEEP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SLEEPDEEP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SLEEPDEEP_A :: _1 } } # [ doc = "Write proxy for field `SLEEPDEEP`" ] pub struct SLEEPDEEP_W < 'a > { w : & 'a mut W , } impl < 'a > SLEEPDEEP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SLEEPDEEP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "sleep" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SLEEPDEEP_A :: _0 ) } # [ doc = "deep sleep" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SLEEPDEEP_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEVONPEND_A { # [ doc = "0: only enabled interrupts or events can wakeup the processor, disabled interrupts are excluded" ] _0 , # [ doc = "1: enabled events and all interrupts, including disabled interrupts, can wakeup the processor" ] _1 } impl From < SEVONPEND_A > for bool { # [ inline ( always ) ] fn from ( variant : SEVONPEND_A ) -> Self { match variant { SEVONPEND_A :: _0 => false , SEVONPEND_A :: _1 => true } } } # [ doc = "Reader of field `SEVONPEND`" ] pub type SEVONPEND_R = crate :: R < bool , SEVONPEND_A > ; impl SEVONPEND_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SEVONPEND_A { match self . bits { false => SEVONPEND_A :: _0 , true => SEVONPEND_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SEVONPEND_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SEVONPEND_A :: _1 } } # [ doc = "Write proxy for field `SEVONPEND`" ] pub struct SEVONPEND_W < 'a > { w : & 'a mut W , } impl < 'a > SEVONPEND_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SEVONPEND_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "only enabled interrupts or events can wakeup the processor, disabled interrupts are excluded" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SEVONPEND_A :: _0 ) } # [ doc = "enabled events and all interrupts, including disabled interrupts, can wakeup the processor" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SEVONPEND_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn sleeponexit ( & self ) -> SLEEPONEXIT_R { SLEEPONEXIT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn sleepdeep ( & self ) -> SLEEPDEEP_R { SLEEPDEEP_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - no description available" ] # [ inline ( always ) ] pub fn sevonpend ( & self ) -> SEVONPEND_R { SEVONPEND_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn sleeponexit ( & mut self ) -> SLEEPONEXIT_W { SLEEPONEXIT_W { w : self } } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn sleepdeep ( & mut self ) -> SLEEPDEEP_W { SLEEPDEEP_W { w : self } } # [ doc = "Bit 4 - no description available" ] # [ inline ( always ) ] pub fn sevonpend ( & mut self ) -> SEVONPEND_W { SEVONPEND_W { w : self } } } } # [ doc = "Configuration and Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ccr](ccr) module" ] pub type CCR = crate :: Reg < u32 , _CCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CCR ; # [ doc = "`read()` method returns [ccr::R](ccr::R) reader structure" ] impl crate :: Readable for CCR { } # [ doc = "`write(|w| ..)` method takes [ccr::W](ccr::W) writer structure" ] impl crate :: Writable for CCR { } # [ doc = "Configuration and Control Register" ] pub mod ccr { # [ doc = "Reader of register CCR" ] pub type R = crate :: R < u32 , super :: CCR > ; # [ doc = "Writer for register CCR" ] pub type W = crate :: W < u32 , super :: CCR > ; # [ doc = "Register CCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NONBASETHRDENA_A { # [ doc = "0: processor can enter Thread mode only when no exception is active" ] _0 , # [ doc = "1: processor can enter Thread mode from any level under the control of an EXC_RETURN value" ] _1 } impl From < NONBASETHRDENA_A > for bool { # [ inline ( always ) ] fn from ( variant : NONBASETHRDENA_A ) -> Self { match variant { NONBASETHRDENA_A :: _0 => false , NONBASETHRDENA_A :: _1 => true } } } # [ doc = "Reader of field `NONBASETHRDENA`" ] pub type NONBASETHRDENA_R = crate :: R < bool , NONBASETHRDENA_A > ; impl NONBASETHRDENA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NONBASETHRDENA_A { match self . bits { false => NONBASETHRDENA_A :: _0 , true => NONBASETHRDENA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NONBASETHRDENA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NONBASETHRDENA_A :: _1 } } # [ doc = "Write proxy for field `NONBASETHRDENA`" ] pub struct NONBASETHRDENA_W < 'a > { w : & 'a mut W , } impl < 'a > NONBASETHRDENA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NONBASETHRDENA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "processor can enter Thread mode only when no exception is active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NONBASETHRDENA_A :: _0 ) } # [ doc = "processor can enter Thread mode from any level under the control of an EXC_RETURN value" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NONBASETHRDENA_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Enables unprivileged software access to the STIR\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USERSETMPEND_A { # [ doc = "0: disable" ] _0 , # [ doc = "1: enable" ] _1 } impl From < USERSETMPEND_A > for bool { # [ inline ( always ) ] fn from ( variant : USERSETMPEND_A ) -> Self { match variant { USERSETMPEND_A :: _0 => false , USERSETMPEND_A :: _1 => true } } } # [ doc = "Reader of field `USERSETMPEND`" ] pub type USERSETMPEND_R = crate :: R < bool , USERSETMPEND_A > ; impl USERSETMPEND_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USERSETMPEND_A { match self . bits { false => USERSETMPEND_A :: _0 , true => USERSETMPEND_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USERSETMPEND_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USERSETMPEND_A :: _1 } } # [ doc = "Write proxy for field `USERSETMPEND`" ] pub struct USERSETMPEND_W < 'a > { w : & 'a mut W , } impl < 'a > USERSETMPEND_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USERSETMPEND_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "disable" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USERSETMPEND_A :: _0 ) } # [ doc = "enable" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USERSETMPEND_A :: _1 ) } # [ 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 } } # [ doc = "Enables unaligned access traps\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UNALIGN_TRP_A { # [ doc = "0: do not trap unaligned halfword and word accesses" ] _0 , # [ doc = "1: trap unaligned halfword and word accesses" ] _1 } impl From < UNALIGN_TRP_A > for bool { # [ inline ( always ) ] fn from ( variant : UNALIGN_TRP_A ) -> Self { match variant { UNALIGN_TRP_A :: _0 => false , UNALIGN_TRP_A :: _1 => true } } } # [ doc = "Reader of field `UNALIGN_TRP`" ] pub type UNALIGN_TRP_R = crate :: R < bool , UNALIGN_TRP_A > ; impl UNALIGN_TRP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UNALIGN_TRP_A { match self . bits { false => UNALIGN_TRP_A :: _0 , true => UNALIGN_TRP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UNALIGN_TRP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UNALIGN_TRP_A :: _1 } } # [ doc = "Write proxy for field `UNALIGN_TRP`" ] pub struct UNALIGN_TRP_W < 'a > { w : & 'a mut W , } impl < 'a > UNALIGN_TRP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UNALIGN_TRP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "do not trap unaligned halfword and word accesses" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UNALIGN_TRP_A :: _0 ) } # [ doc = "trap unaligned halfword and word accesses" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UNALIGN_TRP_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Enables faulting or halting when the processor executes an SDIV or UDIV instruction with a divisor of 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIV_0_TRP_A { # [ doc = "0: do not trap divide by 0" ] _0 , # [ doc = "1: trap divide by 0" ] _1 } impl From < DIV_0_TRP_A > for bool { # [ inline ( always ) ] fn from ( variant : DIV_0_TRP_A ) -> Self { match variant { DIV_0_TRP_A :: _0 => false , DIV_0_TRP_A :: _1 => true } } } # [ doc = "Reader of field `DIV_0_TRP`" ] pub type DIV_0_TRP_R = crate :: R < bool , DIV_0_TRP_A > ; impl DIV_0_TRP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIV_0_TRP_A { match self . bits { false => DIV_0_TRP_A :: _0 , true => DIV_0_TRP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIV_0_TRP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIV_0_TRP_A :: _1 } } # [ doc = "Write proxy for field `DIV_0_TRP`" ] pub struct DIV_0_TRP_W < 'a > { w : & 'a mut W , } impl < 'a > DIV_0_TRP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIV_0_TRP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "do not trap divide by 0" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIV_0_TRP_A :: _0 ) } # [ doc = "trap divide by 0" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIV_0_TRP_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Enables handlers with priority -1 or -2 to ignore data BusFaults caused by load and store instructions.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BFHFNMIGN_A { # [ doc = "0: data bus faults caused by load and store instructions cause a lock-up" ] _0 , # [ doc = "1: handlers running at priority -1 and -2 ignore data bus faults caused by load and store instructions" ] _1 } impl From < BFHFNMIGN_A > for bool { # [ inline ( always ) ] fn from ( variant : BFHFNMIGN_A ) -> Self { match variant { BFHFNMIGN_A :: _0 => false , BFHFNMIGN_A :: _1 => true } } } # [ doc = "Reader of field `BFHFNMIGN`" ] pub type BFHFNMIGN_R = crate :: R < bool , BFHFNMIGN_A > ; impl BFHFNMIGN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BFHFNMIGN_A { match self . bits { false => BFHFNMIGN_A :: _0 , true => BFHFNMIGN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BFHFNMIGN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BFHFNMIGN_A :: _1 } } # [ doc = "Write proxy for field `BFHFNMIGN`" ] pub struct BFHFNMIGN_W < 'a > { w : & 'a mut W , } impl < 'a > BFHFNMIGN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BFHFNMIGN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "data bus faults caused by load and store instructions cause a lock-up" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BFHFNMIGN_A :: _0 ) } # [ doc = "handlers running at priority -1 and -2 ignore data bus faults caused by load and store instructions" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BFHFNMIGN_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Indicates stack alignment on exception entry\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STKALIGN_A { # [ doc = "0: 4-byte aligned" ] _0 , # [ doc = "1: 8-byte aligned" ] _1 } impl From < STKALIGN_A > for bool { # [ inline ( always ) ] fn from ( variant : STKALIGN_A ) -> Self { match variant { STKALIGN_A :: _0 => false , STKALIGN_A :: _1 => true } } } # [ doc = "Reader of field `STKALIGN`" ] pub type STKALIGN_R = crate :: R < bool , STKALIGN_A > ; impl STKALIGN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STKALIGN_A { match self . bits { false => STKALIGN_A :: _0 , true => STKALIGN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STKALIGN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STKALIGN_A :: _1 } } # [ doc = "Write proxy for field `STKALIGN`" ] pub struct STKALIGN_W < 'a > { w : & 'a mut W , } impl < 'a > STKALIGN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STKALIGN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "4-byte aligned" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STKALIGN_A :: _0 ) } # [ doc = "8-byte aligned" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STKALIGN_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } impl R { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn nonbasethrdena ( & self ) -> NONBASETHRDENA_R { NONBASETHRDENA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Enables unprivileged software access to the STIR" ] # [ inline ( always ) ] pub fn usersetmpend ( & self ) -> USERSETMPEND_R { USERSETMPEND_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Enables unaligned access traps" ] # [ inline ( always ) ] pub fn unalign_trp ( & self ) -> UNALIGN_TRP_R { UNALIGN_TRP_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Enables faulting or halting when the processor executes an SDIV or UDIV instruction with a divisor of 0" ] # [ inline ( always ) ] pub fn div_0_trp ( & self ) -> DIV_0_TRP_R { DIV_0_TRP_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Enables handlers with priority -1 or -2 to ignore data BusFaults caused by load and store instructions." ] # [ inline ( always ) ] pub fn bfhfnmign ( & self ) -> BFHFNMIGN_R { BFHFNMIGN_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - Indicates stack alignment on exception entry" ] # [ inline ( always ) ] pub fn stkalign ( & self ) -> STKALIGN_R { STKALIGN_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn nonbasethrdena ( & mut self ) -> NONBASETHRDENA_W { NONBASETHRDENA_W { w : self } } # [ doc = "Bit 1 - Enables unprivileged software access to the STIR" ] # [ inline ( always ) ] pub fn usersetmpend ( & mut self ) -> USERSETMPEND_W { USERSETMPEND_W { w : self } } # [ doc = "Bit 3 - Enables unaligned access traps" ] # [ inline ( always ) ] pub fn unalign_trp ( & mut self ) -> UNALIGN_TRP_W { UNALIGN_TRP_W { w : self } } # [ doc = "Bit 4 - Enables faulting or halting when the processor executes an SDIV or UDIV instruction with a divisor of 0" ] # [ inline ( always ) ] pub fn div_0_trp ( & mut self ) -> DIV_0_TRP_W { DIV_0_TRP_W { w : self } } # [ doc = "Bit 8 - Enables handlers with priority -1 or -2 to ignore data BusFaults caused by load and store instructions." ] # [ inline ( always ) ] pub fn bfhfnmign ( & mut self ) -> BFHFNMIGN_W { BFHFNMIGN_W { w : self } } # [ doc = "Bit 9 - Indicates stack alignment on exception entry" ] # [ inline ( always ) ] pub fn stkalign ( & mut self ) -> STKALIGN_W { STKALIGN_W { w : self } } } } # [ doc = "System Handler Priority Register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [shpr1](shpr1) module" ] pub type SHPR1 = crate :: Reg < u32 , _SHPR1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SHPR1 ; # [ doc = "`read()` method returns [shpr1::R](shpr1::R) reader structure" ] impl crate :: Readable for SHPR1 { } # [ doc = "`write(|w| ..)` method takes [shpr1::W](shpr1::W) writer structure" ] impl crate :: Writable for SHPR1 { } # [ doc = "System Handler Priority Register 1" ] pub mod shpr1 { # [ doc = "Reader of register SHPR1" ] pub type R = crate :: R < u32 , super :: SHPR1 > ; # [ doc = "Writer for register SHPR1" ] pub type W = crate :: W < u32 , super :: SHPR1 > ; # [ doc = "Register SHPR1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SHPR1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PRI_4`" ] pub type PRI_4_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRI_4`" ] pub struct PRI_4_W < 'a > { w : & 'a mut W , } impl < 'a > PRI_4_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } # [ doc = "Reader of field `PRI_5`" ] pub type PRI_5_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRI_5`" ] pub struct PRI_5_W < 'a > { w : & 'a mut W , } impl < 'a > PRI_5_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 & ! ( 0xff << 8 ) ) | ( ( ( value as u32 ) & 0xff ) << 8 ) ; self . w } } # [ doc = "Reader of field `PRI_6`" ] pub type PRI_6_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRI_6`" ] pub struct PRI_6_W < 'a > { w : & 'a mut W , } impl < 'a > PRI_6_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } impl R { # [ doc = "Bits 0:7 - Priority of system handler 4, MemManage" ] # [ inline ( always ) ] pub fn pri_4 ( & self ) -> PRI_4_R { PRI_4_R :: new ( ( self . bits & 0xff ) as u8 ) } # [ doc = "Bits 8:15 - Priority of system handler 5, BusFault" ] # [ inline ( always ) ] pub fn pri_5 ( & self ) -> PRI_5_R { PRI_5_R :: new ( ( ( self . bits >> 8 ) & 0xff ) as u8 ) } # [ doc = "Bits 16:23 - Priority of system handler 6, UsageFault" ] # [ inline ( always ) ] pub fn pri_6 ( & self ) -> PRI_6_R { PRI_6_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - Priority of system handler 4, MemManage" ] # [ inline ( always ) ] pub fn pri_4 ( & mut self ) -> PRI_4_W { PRI_4_W { w : self } } # [ doc = "Bits 8:15 - Priority of system handler 5, BusFault" ] # [ inline ( always ) ] pub fn pri_5 ( & mut self ) -> PRI_5_W { PRI_5_W { w : self } } # [ doc = "Bits 16:23 - Priority of system handler 6, UsageFault" ] # [ inline ( always ) ] pub fn pri_6 ( & mut self ) -> PRI_6_W { PRI_6_W { w : self } } } } # [ doc = "System Handler Priority Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [shpr2](shpr2) module" ] pub type SHPR2 = crate :: Reg < u32 , _SHPR2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SHPR2 ; # [ doc = "`read()` method returns [shpr2::R](shpr2::R) reader structure" ] impl crate :: Readable for SHPR2 { } # [ doc = "`write(|w| ..)` method takes [shpr2::W](shpr2::W) writer structure" ] impl crate :: Writable for SHPR2 { } # [ doc = "System Handler Priority Register 2" ] pub mod shpr2 { # [ doc = "Reader of register SHPR2" ] pub type R = crate :: R < u32 , super :: SHPR2 > ; # [ doc = "Writer for register SHPR2" ] pub type W = crate :: W < u32 , super :: SHPR2 > ; # [ doc = "Register SHPR2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SHPR2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PRI_11`" ] pub type PRI_11_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRI_11`" ] pub struct PRI_11_W < 'a > { w : & 'a mut W , } impl < 'a > PRI_11_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 24:31 - Priority of system handler 11, SVCall" ] # [ inline ( always ) ] pub fn pri_11 ( & self ) -> PRI_11_R { PRI_11_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 24:31 - Priority of system handler 11, SVCall" ] # [ inline ( always ) ] pub fn pri_11 ( & mut self ) -> PRI_11_W { PRI_11_W { w : self } } } } # [ doc = "System Handler Priority Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [shpr3](shpr3) module" ] pub type SHPR3 = crate :: Reg < u32 , _SHPR3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SHPR3 ; # [ doc = "`read()` method returns [shpr3::R](shpr3::R) reader structure" ] impl crate :: Readable for SHPR3 { } # [ doc = "`write(|w| ..)` method takes [shpr3::W](shpr3::W) writer structure" ] impl crate :: Writable for SHPR3 { } # [ doc = "System Handler Priority Register 3" ] pub mod shpr3 { # [ doc = "Reader of register SHPR3" ] pub type R = crate :: R < u32 , super :: SHPR3 > ; # [ doc = "Writer for register SHPR3" ] pub type W = crate :: W < u32 , super :: SHPR3 > ; # [ doc = "Register SHPR3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SHPR3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PRI_14`" ] pub type PRI_14_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRI_14`" ] pub struct PRI_14_W < 'a > { w : & 'a mut W , } impl < 'a > PRI_14_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 & ! ( 0xff << 16 ) ) | ( ( ( value as u32 ) & 0xff ) << 16 ) ; self . w } } # [ doc = "Reader of field `PRI_15`" ] pub type PRI_15_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PRI_15`" ] pub struct PRI_15_W < 'a > { w : & 'a mut W , } impl < 'a > PRI_15_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 & ! ( 0xff << 24 ) ) | ( ( ( value as u32 ) & 0xff ) << 24 ) ; self . w } } impl R { # [ doc = "Bits 16:23 - Priority of system handler 14, PendSV" ] # [ inline ( always ) ] pub fn pri_14 ( & self ) -> PRI_14_R { PRI_14_R :: new ( ( ( self . bits >> 16 ) & 0xff ) as u8 ) } # [ doc = "Bits 24:31 - Priority of system handler 15, SysTick exception" ] # [ inline ( always ) ] pub fn pri_15 ( & self ) -> PRI_15_R { PRI_15_R :: new ( ( ( self . bits >> 24 ) & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 16:23 - Priority of system handler 14, PendSV" ] # [ inline ( always ) ] pub fn pri_14 ( & mut self ) -> PRI_14_W { PRI_14_W { w : self } } # [ doc = "Bits 24:31 - Priority of system handler 15, SysTick exception" ] # [ inline ( always ) ] pub fn pri_15 ( & mut self ) -> PRI_15_W { PRI_15_W { w : self } } } } # [ doc = "System Handler Control and State Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [shcsr](shcsr) module" ] pub type SHCSR = crate :: Reg < u32 , _SHCSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _SHCSR ; # [ doc = "`read()` method returns [shcsr::R](shcsr::R) reader structure" ] impl crate :: Readable for SHCSR { } # [ doc = "`write(|w| ..)` method takes [shcsr::W](shcsr::W) writer structure" ] impl crate :: Writable for SHCSR { } # [ doc = "System Handler Control and State Register" ] pub mod shcsr { # [ doc = "Reader of register SHCSR" ] pub type R = crate :: R < u32 , super :: SHCSR > ; # [ doc = "Writer for register SHCSR" ] pub type W = crate :: W < u32 , super :: SHCSR > ; # [ doc = "Register SHCSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: SHCSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MEMFAULTACT_A { # [ doc = "0: exception is not active" ] _0 , # [ doc = "1: exception is active" ] _1 } impl From < MEMFAULTACT_A > for bool { # [ inline ( always ) ] fn from ( variant : MEMFAULTACT_A ) -> Self { match variant { MEMFAULTACT_A :: _0 => false , MEMFAULTACT_A :: _1 => true } } } # [ doc = "Reader of field `MEMFAULTACT`" ] pub type MEMFAULTACT_R = crate :: R < bool , MEMFAULTACT_A > ; impl MEMFAULTACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MEMFAULTACT_A { match self . bits { false => MEMFAULTACT_A :: _0 , true => MEMFAULTACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MEMFAULTACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MEMFAULTACT_A :: _1 } } # [ doc = "Write proxy for field `MEMFAULTACT`" ] pub struct MEMFAULTACT_W < 'a > { w : & 'a mut W , } impl < 'a > MEMFAULTACT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MEMFAULTACT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MEMFAULTACT_A :: _0 ) } # [ doc = "exception is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MEMFAULTACT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUSFAULTACT_A { # [ doc = "0: exception is not active" ] _0 , # [ doc = "1: exception is active" ] _1 } impl From < BUSFAULTACT_A > for bool { # [ inline ( always ) ] fn from ( variant : BUSFAULTACT_A ) -> Self { match variant { BUSFAULTACT_A :: _0 => false , BUSFAULTACT_A :: _1 => true } } } # [ doc = "Reader of field `BUSFAULTACT`" ] pub type BUSFAULTACT_R = crate :: R < bool , BUSFAULTACT_A > ; impl BUSFAULTACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUSFAULTACT_A { match self . bits { false => BUSFAULTACT_A :: _0 , true => BUSFAULTACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUSFAULTACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUSFAULTACT_A :: _1 } } # [ doc = "Write proxy for field `BUSFAULTACT`" ] pub struct BUSFAULTACT_W < 'a > { w : & 'a mut W , } impl < 'a > BUSFAULTACT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUSFAULTACT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUSFAULTACT_A :: _0 ) } # [ doc = "exception is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUSFAULTACT_A :: _1 ) } # [ 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 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USGFAULTACT_A { # [ doc = "0: exception is not active" ] _0 , # [ doc = "1: exception is active" ] _1 } impl From < USGFAULTACT_A > for bool { # [ inline ( always ) ] fn from ( variant : USGFAULTACT_A ) -> Self { match variant { USGFAULTACT_A :: _0 => false , USGFAULTACT_A :: _1 => true } } } # [ doc = "Reader of field `USGFAULTACT`" ] pub type USGFAULTACT_R = crate :: R < bool , USGFAULTACT_A > ; impl USGFAULTACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USGFAULTACT_A { match self . bits { false => USGFAULTACT_A :: _0 , true => USGFAULTACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USGFAULTACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USGFAULTACT_A :: _1 } } # [ doc = "Write proxy for field `USGFAULTACT`" ] pub struct USGFAULTACT_W < 'a > { w : & 'a mut W , } impl < 'a > USGFAULTACT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USGFAULTACT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USGFAULTACT_A :: _0 ) } # [ doc = "exception is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USGFAULTACT_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SVCALLACT_A { # [ doc = "0: exception is not active" ] _0 , # [ doc = "1: exception is active" ] _1 } impl From < SVCALLACT_A > for bool { # [ inline ( always ) ] fn from ( variant : SVCALLACT_A ) -> Self { match variant { SVCALLACT_A :: _0 => false , SVCALLACT_A :: _1 => true } } } # [ doc = "Reader of field `SVCALLACT`" ] pub type SVCALLACT_R = crate :: R < bool , SVCALLACT_A > ; impl SVCALLACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SVCALLACT_A { match self . bits { false => SVCALLACT_A :: _0 , true => SVCALLACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SVCALLACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SVCALLACT_A :: _1 } } # [ doc = "Write proxy for field `SVCALLACT`" ] pub struct SVCALLACT_W < 'a > { w : & 'a mut W , } impl < 'a > SVCALLACT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SVCALLACT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SVCALLACT_A :: _0 ) } # [ doc = "exception is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SVCALLACT_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MONITORACT_A { # [ doc = "0: exception is not active" ] _0 , # [ doc = "1: exception is active" ] _1 } impl From < MONITORACT_A > for bool { # [ inline ( always ) ] fn from ( variant : MONITORACT_A ) -> Self { match variant { MONITORACT_A :: _0 => false , MONITORACT_A :: _1 => true } } } # [ doc = "Reader of field `MONITORACT`" ] pub type MONITORACT_R = crate :: R < bool , MONITORACT_A > ; impl MONITORACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MONITORACT_A { match self . bits { false => MONITORACT_A :: _0 , true => MONITORACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MONITORACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MONITORACT_A :: _1 } } # [ doc = "Write proxy for field `MONITORACT`" ] pub struct MONITORACT_W < 'a > { w : & 'a mut W , } impl < 'a > MONITORACT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MONITORACT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MONITORACT_A :: _0 ) } # [ doc = "exception is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MONITORACT_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PENDSVACT_A { # [ doc = "0: exception is not active" ] _0 , # [ doc = "1: exception is active" ] _1 } impl From < PENDSVACT_A > for bool { # [ inline ( always ) ] fn from ( variant : PENDSVACT_A ) -> Self { match variant { PENDSVACT_A :: _0 => false , PENDSVACT_A :: _1 => true } } } # [ doc = "Reader of field `PENDSVACT`" ] pub type PENDSVACT_R = crate :: R < bool , PENDSVACT_A > ; impl PENDSVACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PENDSVACT_A { match self . bits { false => PENDSVACT_A :: _0 , true => PENDSVACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PENDSVACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PENDSVACT_A :: _1 } } # [ doc = "Write proxy for field `PENDSVACT`" ] pub struct PENDSVACT_W < 'a > { w : & 'a mut W , } impl < 'a > PENDSVACT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PENDSVACT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PENDSVACT_A :: _0 ) } # [ doc = "exception is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PENDSVACT_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SYSTICKACT_A { # [ doc = "0: exception is not active" ] _0 , # [ doc = "1: exception is active" ] _1 } impl From < SYSTICKACT_A > for bool { # [ inline ( always ) ] fn from ( variant : SYSTICKACT_A ) -> Self { match variant { SYSTICKACT_A :: _0 => false , SYSTICKACT_A :: _1 => true } } } # [ doc = "Reader of field `SYSTICKACT`" ] pub type SYSTICKACT_R = crate :: R < bool , SYSTICKACT_A > ; impl SYSTICKACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SYSTICKACT_A { match self . bits { false => SYSTICKACT_A :: _0 , true => SYSTICKACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SYSTICKACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SYSTICKACT_A :: _1 } } # [ doc = "Write proxy for field `SYSTICKACT`" ] pub struct SYSTICKACT_W < 'a > { w : & 'a mut W , } impl < 'a > SYSTICKACT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SYSTICKACT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not active" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SYSTICKACT_A :: _0 ) } # [ doc = "exception is active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SYSTICKACT_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USGFAULTPENDED_A { # [ doc = "0: exception is not pending" ] _0 , # [ doc = "1: exception is pending" ] _1 } impl From < USGFAULTPENDED_A > for bool { # [ inline ( always ) ] fn from ( variant : USGFAULTPENDED_A ) -> Self { match variant { USGFAULTPENDED_A :: _0 => false , USGFAULTPENDED_A :: _1 => true } } } # [ doc = "Reader of field `USGFAULTPENDED`" ] pub type USGFAULTPENDED_R = crate :: R < bool , USGFAULTPENDED_A > ; impl USGFAULTPENDED_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USGFAULTPENDED_A { match self . bits { false => USGFAULTPENDED_A :: _0 , true => USGFAULTPENDED_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USGFAULTPENDED_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USGFAULTPENDED_A :: _1 } } # [ doc = "Write proxy for field `USGFAULTPENDED`" ] pub struct USGFAULTPENDED_W < 'a > { w : & 'a mut W , } impl < 'a > USGFAULTPENDED_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USGFAULTPENDED_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USGFAULTPENDED_A :: _0 ) } # [ doc = "exception is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USGFAULTPENDED_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MEMFAULTPENDED_A { # [ doc = "0: exception is not pending" ] _0 , # [ doc = "1: exception is pending" ] _1 } impl From < MEMFAULTPENDED_A > for bool { # [ inline ( always ) ] fn from ( variant : MEMFAULTPENDED_A ) -> Self { match variant { MEMFAULTPENDED_A :: _0 => false , MEMFAULTPENDED_A :: _1 => true } } } # [ doc = "Reader of field `MEMFAULTPENDED`" ] pub type MEMFAULTPENDED_R = crate :: R < bool , MEMFAULTPENDED_A > ; impl MEMFAULTPENDED_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MEMFAULTPENDED_A { match self . bits { false => MEMFAULTPENDED_A :: _0 , true => MEMFAULTPENDED_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MEMFAULTPENDED_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MEMFAULTPENDED_A :: _1 } } # [ doc = "Write proxy for field `MEMFAULTPENDED`" ] pub struct MEMFAULTPENDED_W < 'a > { w : & 'a mut W , } impl < 'a > MEMFAULTPENDED_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MEMFAULTPENDED_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MEMFAULTPENDED_A :: _0 ) } # [ doc = "exception is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MEMFAULTPENDED_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUSFAULTPENDED_A { # [ doc = "0: exception is not pending" ] _0 , # [ doc = "1: exception is pending" ] _1 } impl From < BUSFAULTPENDED_A > for bool { # [ inline ( always ) ] fn from ( variant : BUSFAULTPENDED_A ) -> Self { match variant { BUSFAULTPENDED_A :: _0 => false , BUSFAULTPENDED_A :: _1 => true } } } # [ doc = "Reader of field `BUSFAULTPENDED`" ] pub type BUSFAULTPENDED_R = crate :: R < bool , BUSFAULTPENDED_A > ; impl BUSFAULTPENDED_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUSFAULTPENDED_A { match self . bits { false => BUSFAULTPENDED_A :: _0 , true => BUSFAULTPENDED_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUSFAULTPENDED_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUSFAULTPENDED_A :: _1 } } # [ doc = "Write proxy for field `BUSFAULTPENDED`" ] pub struct BUSFAULTPENDED_W < 'a > { w : & 'a mut W , } impl < 'a > BUSFAULTPENDED_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUSFAULTPENDED_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUSFAULTPENDED_A :: _0 ) } # [ doc = "exception is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUSFAULTPENDED_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SVCALLPENDED_A { # [ doc = "0: exception is not pending" ] _0 , # [ doc = "1: exception is pending" ] _1 } impl From < SVCALLPENDED_A > for bool { # [ inline ( always ) ] fn from ( variant : SVCALLPENDED_A ) -> Self { match variant { SVCALLPENDED_A :: _0 => false , SVCALLPENDED_A :: _1 => true } } } # [ doc = "Reader of field `SVCALLPENDED`" ] pub type SVCALLPENDED_R = crate :: R < bool , SVCALLPENDED_A > ; impl SVCALLPENDED_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SVCALLPENDED_A { match self . bits { false => SVCALLPENDED_A :: _0 , true => SVCALLPENDED_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SVCALLPENDED_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SVCALLPENDED_A :: _1 } } # [ doc = "Write proxy for field `SVCALLPENDED`" ] pub struct SVCALLPENDED_W < 'a > { w : & 'a mut W , } impl < 'a > SVCALLPENDED_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SVCALLPENDED_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "exception is not pending" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( SVCALLPENDED_A :: _0 ) } # [ doc = "exception is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( SVCALLPENDED_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MEMFAULTENA_A { # [ doc = "0: disable the exception" ] _0 , # [ doc = "1: enable the exception" ] _1 } impl From < MEMFAULTENA_A > for bool { # [ inline ( always ) ] fn from ( variant : MEMFAULTENA_A ) -> Self { match variant { MEMFAULTENA_A :: _0 => false , MEMFAULTENA_A :: _1 => true } } } # [ doc = "Reader of field `MEMFAULTENA`" ] pub type MEMFAULTENA_R = crate :: R < bool , MEMFAULTENA_A > ; impl MEMFAULTENA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MEMFAULTENA_A { match self . bits { false => MEMFAULTENA_A :: _0 , true => MEMFAULTENA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MEMFAULTENA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MEMFAULTENA_A :: _1 } } # [ doc = "Write proxy for field `MEMFAULTENA`" ] pub struct MEMFAULTENA_W < 'a > { w : & 'a mut W , } impl < 'a > MEMFAULTENA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MEMFAULTENA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "disable the exception" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MEMFAULTENA_A :: _0 ) } # [ doc = "enable the exception" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MEMFAULTENA_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BUSFAULTENA_A { # [ doc = "0: disable the exception" ] _0 , # [ doc = "1: enable the exception" ] _1 } impl From < BUSFAULTENA_A > for bool { # [ inline ( always ) ] fn from ( variant : BUSFAULTENA_A ) -> Self { match variant { BUSFAULTENA_A :: _0 => false , BUSFAULTENA_A :: _1 => true } } } # [ doc = "Reader of field `BUSFAULTENA`" ] pub type BUSFAULTENA_R = crate :: R < bool , BUSFAULTENA_A > ; impl BUSFAULTENA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BUSFAULTENA_A { match self . bits { false => BUSFAULTENA_A :: _0 , true => BUSFAULTENA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BUSFAULTENA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BUSFAULTENA_A :: _1 } } # [ doc = "Write proxy for field `BUSFAULTENA`" ] pub struct BUSFAULTENA_W < 'a > { w : & 'a mut W , } impl < 'a > BUSFAULTENA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BUSFAULTENA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "disable the exception" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BUSFAULTENA_A :: _0 ) } # [ doc = "enable the exception" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BUSFAULTENA_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USGFAULTENA_A { # [ doc = "0: disable the exception" ] _0 , # [ doc = "1: enable the exception" ] _1 } impl From < USGFAULTENA_A > for bool { # [ inline ( always ) ] fn from ( variant : USGFAULTENA_A ) -> Self { match variant { USGFAULTENA_A :: _0 => false , USGFAULTENA_A :: _1 => true } } } # [ doc = "Reader of field `USGFAULTENA`" ] pub type USGFAULTENA_R = crate :: R < bool , USGFAULTENA_A > ; impl USGFAULTENA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USGFAULTENA_A { match self . bits { false => USGFAULTENA_A :: _0 , true => USGFAULTENA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USGFAULTENA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USGFAULTENA_A :: _1 } } # [ doc = "Write proxy for field `USGFAULTENA`" ] pub struct USGFAULTENA_W < 'a > { w : & 'a mut W , } impl < 'a > USGFAULTENA_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USGFAULTENA_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "disable the exception" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USGFAULTENA_A :: _0 ) } # [ doc = "enable the exception" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USGFAULTENA_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } impl R { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn memfaultact ( & self ) -> MEMFAULTACT_R { MEMFAULTACT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn busfaultact ( & self ) -> BUSFAULTACT_R { BUSFAULTACT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - no description available" ] # [ inline ( always ) ] pub fn usgfaultact ( & self ) -> USGFAULTACT_R { USGFAULTACT_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - no description available" ] # [ inline ( always ) ] pub fn svcallact ( & self ) -> SVCALLACT_R { SVCALLACT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - no description available" ] # [ inline ( always ) ] pub fn monitoract ( & self ) -> MONITORACT_R { MONITORACT_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - no description available" ] # [ inline ( always ) ] pub fn pendsvact ( & self ) -> PENDSVACT_R { PENDSVACT_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - no description available" ] # [ inline ( always ) ] pub fn systickact ( & self ) -> SYSTICKACT_R { SYSTICKACT_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - no description available" ] # [ inline ( always ) ] pub fn usgfaultpended ( & self ) -> USGFAULTPENDED_R { USGFAULTPENDED_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - no description available" ] # [ inline ( always ) ] pub fn memfaultpended ( & self ) -> MEMFAULTPENDED_R { MEMFAULTPENDED_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 14 - no description available" ] # [ inline ( always ) ] pub fn busfaultpended ( & self ) -> BUSFAULTPENDED_R { BUSFAULTPENDED_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - no description available" ] # [ inline ( always ) ] pub fn svcallpended ( & self ) -> SVCALLPENDED_R { SVCALLPENDED_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - no description available" ] # [ inline ( always ) ] pub fn memfaultena ( & self ) -> MEMFAULTENA_R { MEMFAULTENA_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - no description available" ] # [ inline ( always ) ] pub fn busfaultena ( & self ) -> BUSFAULTENA_R { BUSFAULTENA_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - no description available" ] # [ inline ( always ) ] pub fn usgfaultena ( & self ) -> USGFAULTENA_R { USGFAULTENA_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn memfaultact ( & mut self ) -> MEMFAULTACT_W { MEMFAULTACT_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn busfaultact ( & mut self ) -> BUSFAULTACT_W { BUSFAULTACT_W { w : self } } # [ doc = "Bit 3 - no description available" ] # [ inline ( always ) ] pub fn usgfaultact ( & mut self ) -> USGFAULTACT_W { USGFAULTACT_W { w : self } } # [ doc = "Bit 7 - no description available" ] # [ inline ( always ) ] pub fn svcallact ( & mut self ) -> SVCALLACT_W { SVCALLACT_W { w : self } } # [ doc = "Bit 8 - no description available" ] # [ inline ( always ) ] pub fn monitoract ( & mut self ) -> MONITORACT_W { MONITORACT_W { w : self } } # [ doc = "Bit 10 - no description available" ] # [ inline ( always ) ] pub fn pendsvact ( & mut self ) -> PENDSVACT_W { PENDSVACT_W { w : self } } # [ doc = "Bit 11 - no description available" ] # [ inline ( always ) ] pub fn systickact ( & mut self ) -> SYSTICKACT_W { SYSTICKACT_W { w : self } } # [ doc = "Bit 12 - no description available" ] # [ inline ( always ) ] pub fn usgfaultpended ( & mut self ) -> USGFAULTPENDED_W { USGFAULTPENDED_W { w : self } } # [ doc = "Bit 13 - no description available" ] # [ inline ( always ) ] pub fn memfaultpended ( & mut self ) -> MEMFAULTPENDED_W { MEMFAULTPENDED_W { w : self } } # [ doc = "Bit 14 - no description available" ] # [ inline ( always ) ] pub fn busfaultpended ( & mut self ) -> BUSFAULTPENDED_W { BUSFAULTPENDED_W { w : self } } # [ doc = "Bit 15 - no description available" ] # [ inline ( always ) ] pub fn svcallpended ( & mut self ) -> SVCALLPENDED_W { SVCALLPENDED_W { w : self } } # [ doc = "Bit 16 - no description available" ] # [ inline ( always ) ] pub fn memfaultena ( & mut self ) -> MEMFAULTENA_W { MEMFAULTENA_W { w : self } } # [ doc = "Bit 17 - no description available" ] # [ inline ( always ) ] pub fn busfaultena ( & mut self ) -> BUSFAULTENA_W { BUSFAULTENA_W { w : self } } # [ doc = "Bit 18 - no description available" ] # [ inline ( always ) ] pub fn usgfaultena ( & mut self ) -> USGFAULTENA_W { USGFAULTENA_W { w : self } } } } # [ doc = "Configurable Fault Status Registers\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfsr](cfsr) module" ] pub type CFSR = crate :: Reg < u32 , _CFSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CFSR ; # [ doc = "`read()` method returns [cfsr::R](cfsr::R) reader structure" ] impl crate :: Readable for CFSR { } # [ doc = "`write(|w| ..)` method takes [cfsr::W](cfsr::W) writer structure" ] impl crate :: Writable for CFSR { } # [ doc = "Configurable Fault Status Registers" ] pub mod cfsr { # [ doc = "Reader of register CFSR" ] pub type R = crate :: R < u32 , super :: CFSR > ; # [ doc = "Writer for register CFSR" ] pub type W = crate :: W < u32 , super :: CFSR > ; # [ doc = "Register CFSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CFSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IACCVIOL_A { # [ doc = "0: no instruction access violation fault" ] _0 , # [ doc = "1: the processor attempted an instruction fetch from a location that does not permit execution" ] _1 } impl From < IACCVIOL_A > for bool { # [ inline ( always ) ] fn from ( variant : IACCVIOL_A ) -> Self { match variant { IACCVIOL_A :: _0 => false , IACCVIOL_A :: _1 => true } } } # [ doc = "Reader of field `IACCVIOL`" ] pub type IACCVIOL_R = crate :: R < bool , IACCVIOL_A > ; impl IACCVIOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IACCVIOL_A { match self . bits { false => IACCVIOL_A :: _0 , true => IACCVIOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IACCVIOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IACCVIOL_A :: _1 } } # [ doc = "Write proxy for field `IACCVIOL`" ] pub struct IACCVIOL_W < 'a > { w : & 'a mut W , } impl < 'a > IACCVIOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IACCVIOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no instruction access violation fault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IACCVIOL_A :: _0 ) } # [ doc = "the processor attempted an instruction fetch from a location that does not permit execution" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IACCVIOL_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DACCVIOL_A { # [ doc = "0: no data access violation fault" ] _0 , # [ doc = "1: the processor attempted a load or store at a location that does not permit the operation" ] _1 } impl From < DACCVIOL_A > for bool { # [ inline ( always ) ] fn from ( variant : DACCVIOL_A ) -> Self { match variant { DACCVIOL_A :: _0 => false , DACCVIOL_A :: _1 => true } } } # [ doc = "Reader of field `DACCVIOL`" ] pub type DACCVIOL_R = crate :: R < bool , DACCVIOL_A > ; impl DACCVIOL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DACCVIOL_A { match self . bits { false => DACCVIOL_A :: _0 , true => DACCVIOL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DACCVIOL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DACCVIOL_A :: _1 } } # [ doc = "Write proxy for field `DACCVIOL`" ] pub struct DACCVIOL_W < 'a > { w : & 'a mut W , } impl < 'a > DACCVIOL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DACCVIOL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no data access violation fault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DACCVIOL_A :: _0 ) } # [ doc = "the processor attempted a load or store at a location that does not permit the operation" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DACCVIOL_A :: _1 ) } # [ 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 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MUNSTKERR_A { # [ doc = "0: no unstacking fault" ] _0 , # [ doc = "1: unstack for an exception return has caused one or more access violations" ] _1 } impl From < MUNSTKERR_A > for bool { # [ inline ( always ) ] fn from ( variant : MUNSTKERR_A ) -> Self { match variant { MUNSTKERR_A :: _0 => false , MUNSTKERR_A :: _1 => true } } } # [ doc = "Reader of field `MUNSTKERR`" ] pub type MUNSTKERR_R = crate :: R < bool , MUNSTKERR_A > ; impl MUNSTKERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MUNSTKERR_A { match self . bits { false => MUNSTKERR_A :: _0 , true => MUNSTKERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MUNSTKERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MUNSTKERR_A :: _1 } } # [ doc = "Write proxy for field `MUNSTKERR`" ] pub struct MUNSTKERR_W < 'a > { w : & 'a mut W , } impl < 'a > MUNSTKERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MUNSTKERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no unstacking fault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MUNSTKERR_A :: _0 ) } # [ doc = "unstack for an exception return has caused one or more access violations" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MUNSTKERR_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MSTKERR_A { # [ doc = "0: no stacking fault" ] _0 , # [ doc = "1: stacking for an exception entry has caused one or more access violations" ] _1 } impl From < MSTKERR_A > for bool { # [ inline ( always ) ] fn from ( variant : MSTKERR_A ) -> Self { match variant { MSTKERR_A :: _0 => false , MSTKERR_A :: _1 => true } } } # [ doc = "Reader of field `MSTKERR`" ] pub type MSTKERR_R = crate :: R < bool , MSTKERR_A > ; impl MSTKERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MSTKERR_A { match self . bits { false => MSTKERR_A :: _0 , true => MSTKERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MSTKERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MSTKERR_A :: _1 } } # [ doc = "Write proxy for field `MSTKERR`" ] pub struct MSTKERR_W < 'a > { w : & 'a mut W , } impl < 'a > MSTKERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MSTKERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no stacking fault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MSTKERR_A :: _0 ) } # [ doc = "stacking for an exception entry has caused one or more access violations" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MSTKERR_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MLSPERR_A { # [ doc = "0: No MemManage fault occurred during floating-point lazy state preservation" ] _0 , # [ doc = "1: A MemManage fault occurred during floating-point lazy state preservation" ] _1 } impl From < MLSPERR_A > for bool { # [ inline ( always ) ] fn from ( variant : MLSPERR_A ) -> Self { match variant { MLSPERR_A :: _0 => false , MLSPERR_A :: _1 => true } } } # [ doc = "Reader of field `MLSPERR`" ] pub type MLSPERR_R = crate :: R < bool , MLSPERR_A > ; impl MLSPERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MLSPERR_A { match self . bits { false => MLSPERR_A :: _0 , true => MLSPERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MLSPERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MLSPERR_A :: _1 } } # [ doc = "Write proxy for field `MLSPERR`" ] pub struct MLSPERR_W < 'a > { w : & 'a mut W , } impl < 'a > MLSPERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MLSPERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No MemManage fault occurred during floating-point lazy state preservation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MLSPERR_A :: _0 ) } # [ doc = "A MemManage fault occurred during floating-point lazy state preservation" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MLSPERR_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MMARVALID_A { # [ doc = "0: value in MMAR is not a valid fault address" ] _0 , # [ doc = "1: MMAR holds a valid fault address" ] _1 } impl From < MMARVALID_A > for bool { # [ inline ( always ) ] fn from ( variant : MMARVALID_A ) -> Self { match variant { MMARVALID_A :: _0 => false , MMARVALID_A :: _1 => true } } } # [ doc = "Reader of field `MMARVALID`" ] pub type MMARVALID_R = crate :: R < bool , MMARVALID_A > ; impl MMARVALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MMARVALID_A { match self . bits { false => MMARVALID_A :: _0 , true => MMARVALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MMARVALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MMARVALID_A :: _1 } } # [ doc = "Write proxy for field `MMARVALID`" ] pub struct MMARVALID_W < 'a > { w : & 'a mut W , } impl < 'a > MMARVALID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MMARVALID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "value in MMAR is not a valid fault address" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MMARVALID_A :: _0 ) } # [ doc = "MMAR holds a valid fault address" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MMARVALID_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IBUSERR_A { # [ doc = "0: no instruction bus error" ] _0 , # [ doc = "1: instruction bus error" ] _1 } impl From < IBUSERR_A > for bool { # [ inline ( always ) ] fn from ( variant : IBUSERR_A ) -> Self { match variant { IBUSERR_A :: _0 => false , IBUSERR_A :: _1 => true } } } # [ doc = "Reader of field `IBUSERR`" ] pub type IBUSERR_R = crate :: R < bool , IBUSERR_A > ; impl IBUSERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IBUSERR_A { match self . bits { false => IBUSERR_A :: _0 , true => IBUSERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IBUSERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IBUSERR_A :: _1 } } # [ doc = "Write proxy for field `IBUSERR`" ] pub struct IBUSERR_W < 'a > { w : & 'a mut W , } impl < 'a > IBUSERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IBUSERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no instruction bus error" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IBUSERR_A :: _0 ) } # [ doc = "instruction bus error" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IBUSERR_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRECISERR_A { # [ doc = "0: no precise data bus error" ] _0 , # [ doc = "1: a data bus error has occurred, and the PC value stacked for the exception return points to the instruction that caused the fault" ] _1 } impl From < PRECISERR_A > for bool { # [ inline ( always ) ] fn from ( variant : PRECISERR_A ) -> Self { match variant { PRECISERR_A :: _0 => false , PRECISERR_A :: _1 => true } } } # [ doc = "Reader of field `PRECISERR`" ] pub type PRECISERR_R = crate :: R < bool , PRECISERR_A > ; impl PRECISERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PRECISERR_A { match self . bits { false => PRECISERR_A :: _0 , true => PRECISERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PRECISERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PRECISERR_A :: _1 } } # [ doc = "Write proxy for field `PRECISERR`" ] pub struct PRECISERR_W < 'a > { w : & 'a mut W , } impl < 'a > PRECISERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PRECISERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no precise data bus error" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PRECISERR_A :: _0 ) } # [ doc = "a data bus error has occurred, and the PC value stacked for the exception return points to the instruction that caused the fault" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PRECISERR_A :: _1 ) } # [ 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 << 9 ) ) | ( ( ( value as u32 ) & 0x01 ) << 9 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IMPRECISERR_A { # [ doc = "0: no imprecise data bus error" ] _0 , # [ doc = "1: a data bus error has occurred, but the return address in the stack frame is not related to the instruction that caused the error" ] _1 } impl From < IMPRECISERR_A > for bool { # [ inline ( always ) ] fn from ( variant : IMPRECISERR_A ) -> Self { match variant { IMPRECISERR_A :: _0 => false , IMPRECISERR_A :: _1 => true } } } # [ doc = "Reader of field `IMPRECISERR`" ] pub type IMPRECISERR_R = crate :: R < bool , IMPRECISERR_A > ; impl IMPRECISERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IMPRECISERR_A { match self . bits { false => IMPRECISERR_A :: _0 , true => IMPRECISERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IMPRECISERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IMPRECISERR_A :: _1 } } # [ doc = "Write proxy for field `IMPRECISERR`" ] pub struct IMPRECISERR_W < 'a > { w : & 'a mut W , } impl < 'a > IMPRECISERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IMPRECISERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no imprecise data bus error" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IMPRECISERR_A :: _0 ) } # [ doc = "a data bus error has occurred, but the return address in the stack frame is not related to the instruction that caused the error" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IMPRECISERR_A :: _1 ) } # [ 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 << 10 ) ) | ( ( ( value as u32 ) & 0x01 ) << 10 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UNSTKERR_A { # [ doc = "0: no unstacking fault" ] _0 , # [ doc = "1: unstack for an exception return has caused one or more BusFaults" ] _1 } impl From < UNSTKERR_A > for bool { # [ inline ( always ) ] fn from ( variant : UNSTKERR_A ) -> Self { match variant { UNSTKERR_A :: _0 => false , UNSTKERR_A :: _1 => true } } } # [ doc = "Reader of field `UNSTKERR`" ] pub type UNSTKERR_R = crate :: R < bool , UNSTKERR_A > ; impl UNSTKERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UNSTKERR_A { match self . bits { false => UNSTKERR_A :: _0 , true => UNSTKERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UNSTKERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UNSTKERR_A :: _1 } } # [ doc = "Write proxy for field `UNSTKERR`" ] pub struct UNSTKERR_W < 'a > { w : & 'a mut W , } impl < 'a > UNSTKERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UNSTKERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no unstacking fault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UNSTKERR_A :: _0 ) } # [ doc = "unstack for an exception return has caused one or more BusFaults" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UNSTKERR_A :: _1 ) } # [ 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 << 11 ) ) | ( ( ( value as u32 ) & 0x01 ) << 11 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STKERR_A { # [ doc = "0: no stacking fault" ] _0 , # [ doc = "1: stacking for an exception entry has caused one or more BusFaults" ] _1 } impl From < STKERR_A > for bool { # [ inline ( always ) ] fn from ( variant : STKERR_A ) -> Self { match variant { STKERR_A :: _0 => false , STKERR_A :: _1 => true } } } # [ doc = "Reader of field `STKERR`" ] pub type STKERR_R = crate :: R < bool , STKERR_A > ; impl STKERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> STKERR_A { match self . bits { false => STKERR_A :: _0 , true => STKERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == STKERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == STKERR_A :: _1 } } # [ doc = "Write proxy for field `STKERR`" ] pub struct STKERR_W < 'a > { w : & 'a mut W , } impl < 'a > STKERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : STKERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no stacking fault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( STKERR_A :: _0 ) } # [ doc = "stacking for an exception entry has caused one or more BusFaults" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( STKERR_A :: _1 ) } # [ 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 << 12 ) ) | ( ( ( value as u32 ) & 0x01 ) << 12 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LSPERR_A { # [ doc = "0: No bus fault occurred during floating-point lazy state preservation" ] _0 , # [ doc = "1: A bus fault occurred during floating-point lazy state preservation" ] _1 } impl From < LSPERR_A > for bool { # [ inline ( always ) ] fn from ( variant : LSPERR_A ) -> Self { match variant { LSPERR_A :: _0 => false , LSPERR_A :: _1 => true } } } # [ doc = "Reader of field `LSPERR`" ] pub type LSPERR_R = crate :: R < bool , LSPERR_A > ; impl LSPERR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LSPERR_A { match self . bits { false => LSPERR_A :: _0 , true => LSPERR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LSPERR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LSPERR_A :: _1 } } # [ doc = "Write proxy for field `LSPERR`" ] pub struct LSPERR_W < 'a > { w : & 'a mut W , } impl < 'a > LSPERR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LSPERR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No bus fault occurred during floating-point lazy state preservation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LSPERR_A :: _0 ) } # [ doc = "A bus fault occurred during floating-point lazy state preservation" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LSPERR_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BFARVALID_A { # [ doc = "0: value in BFAR is not a valid fault address" ] _0 , # [ doc = "1: BFAR holds a valid fault address" ] _1 } impl From < BFARVALID_A > for bool { # [ inline ( always ) ] fn from ( variant : BFARVALID_A ) -> Self { match variant { BFARVALID_A :: _0 => false , BFARVALID_A :: _1 => true } } } # [ doc = "Reader of field `BFARVALID`" ] pub type BFARVALID_R = crate :: R < bool , BFARVALID_A > ; impl BFARVALID_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BFARVALID_A { match self . bits { false => BFARVALID_A :: _0 , true => BFARVALID_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BFARVALID_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BFARVALID_A :: _1 } } # [ doc = "Write proxy for field `BFARVALID`" ] pub struct BFARVALID_W < 'a > { w : & 'a mut W , } impl < 'a > BFARVALID_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BFARVALID_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "value in BFAR is not a valid fault address" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BFARVALID_A :: _0 ) } # [ doc = "BFAR holds a valid fault address" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BFARVALID_A :: _1 ) } # [ 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 << 15 ) ) | ( ( ( value as u32 ) & 0x01 ) << 15 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UNDEFINSTR_A { # [ doc = "0: no undefined instruction UsageFault" ] _0 , # [ doc = "1: the processor has attempted to execute an undefined instruction" ] _1 } impl From < UNDEFINSTR_A > for bool { # [ inline ( always ) ] fn from ( variant : UNDEFINSTR_A ) -> Self { match variant { UNDEFINSTR_A :: _0 => false , UNDEFINSTR_A :: _1 => true } } } # [ doc = "Reader of field `UNDEFINSTR`" ] pub type UNDEFINSTR_R = crate :: R < bool , UNDEFINSTR_A > ; impl UNDEFINSTR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UNDEFINSTR_A { match self . bits { false => UNDEFINSTR_A :: _0 , true => UNDEFINSTR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UNDEFINSTR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UNDEFINSTR_A :: _1 } } # [ doc = "Write proxy for field `UNDEFINSTR`" ] pub struct UNDEFINSTR_W < 'a > { w : & 'a mut W , } impl < 'a > UNDEFINSTR_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UNDEFINSTR_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no undefined instruction UsageFault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UNDEFINSTR_A :: _0 ) } # [ doc = "the processor has attempted to execute an undefined instruction" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UNDEFINSTR_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INVSTATE_A { # [ doc = "0: no invalid state UsageFault" ] _0 , # [ doc = "1: the processor has attempted to execute an instruction that makes illegal use of the EPSR" ] _1 } impl From < INVSTATE_A > for bool { # [ inline ( always ) ] fn from ( variant : INVSTATE_A ) -> Self { match variant { INVSTATE_A :: _0 => false , INVSTATE_A :: _1 => true } } } # [ doc = "Reader of field `INVSTATE`" ] pub type INVSTATE_R = crate :: R < bool , INVSTATE_A > ; impl INVSTATE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INVSTATE_A { match self . bits { false => INVSTATE_A :: _0 , true => INVSTATE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INVSTATE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INVSTATE_A :: _1 } } # [ doc = "Write proxy for field `INVSTATE`" ] pub struct INVSTATE_W < 'a > { w : & 'a mut W , } impl < 'a > INVSTATE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INVSTATE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no invalid state UsageFault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INVSTATE_A :: _0 ) } # [ doc = "the processor has attempted to execute an instruction that makes illegal use of the EPSR" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INVSTATE_A :: _1 ) } # [ 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 << 17 ) ) | ( ( ( value as u32 ) & 0x01 ) << 17 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INVPC_A { # [ doc = "0: no invalid PC load UsageFault" ] _0 , # [ doc = "1: the processor has attempted an illegal load of EXC_RETURN to the PC" ] _1 } impl From < INVPC_A > for bool { # [ inline ( always ) ] fn from ( variant : INVPC_A ) -> Self { match variant { INVPC_A :: _0 => false , INVPC_A :: _1 => true } } } # [ doc = "Reader of field `INVPC`" ] pub type INVPC_R = crate :: R < bool , INVPC_A > ; impl INVPC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INVPC_A { match self . bits { false => INVPC_A :: _0 , true => INVPC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INVPC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INVPC_A :: _1 } } # [ doc = "Write proxy for field `INVPC`" ] pub struct INVPC_W < 'a > { w : & 'a mut W , } impl < 'a > INVPC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INVPC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no invalid PC load UsageFault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INVPC_A :: _0 ) } # [ doc = "the processor has attempted an illegal load of EXC_RETURN to the PC" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INVPC_A :: _1 ) } # [ 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 << 18 ) ) | ( ( ( value as u32 ) & 0x01 ) << 18 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOCP_A { # [ doc = "0: no UsageFault caused by attempting to access a coprocessor" ] _0 , # [ doc = "1: the processor has attempted to access a coprocessor" ] _1 } impl From < NOCP_A > for bool { # [ inline ( always ) ] fn from ( variant : NOCP_A ) -> Self { match variant { NOCP_A :: _0 => false , NOCP_A :: _1 => true } } } # [ doc = "Reader of field `NOCP`" ] pub type NOCP_R = crate :: R < bool , NOCP_A > ; impl NOCP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOCP_A { match self . bits { false => NOCP_A :: _0 , true => NOCP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOCP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOCP_A :: _1 } } # [ doc = "Write proxy for field `NOCP`" ] pub struct NOCP_W < 'a > { w : & 'a mut W , } impl < 'a > NOCP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NOCP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no UsageFault caused by attempting to access a coprocessor" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NOCP_A :: _0 ) } # [ doc = "the processor has attempted to access a coprocessor" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NOCP_A :: _1 ) } # [ 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 << 19 ) ) | ( ( ( value as u32 ) & 0x01 ) << 19 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UNALIGNED_A { # [ doc = "0: no unaligned access fault, or unaligned access trapping not enabled" ] _0 , # [ doc = "1: the processor has made an unaligned memory access" ] _1 } impl From < UNALIGNED_A > for bool { # [ inline ( always ) ] fn from ( variant : UNALIGNED_A ) -> Self { match variant { UNALIGNED_A :: _0 => false , UNALIGNED_A :: _1 => true } } } # [ doc = "Reader of field `UNALIGNED`" ] pub type UNALIGNED_R = crate :: R < bool , UNALIGNED_A > ; impl UNALIGNED_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> UNALIGNED_A { match self . bits { false => UNALIGNED_A :: _0 , true => UNALIGNED_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == UNALIGNED_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == UNALIGNED_A :: _1 } } # [ doc = "Write proxy for field `UNALIGNED`" ] pub struct UNALIGNED_W < 'a > { w : & 'a mut W , } impl < 'a > UNALIGNED_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : UNALIGNED_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no unaligned access fault, or unaligned access trapping not enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( UNALIGNED_A :: _0 ) } # [ doc = "the processor has made an unaligned memory access" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( UNALIGNED_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIVBYZERO_A { # [ doc = "0: no divide by zero fault, or divide by zero trapping not enabled" ] _0 , # [ doc = "1: the processor has executed an SDIV or UDIV instruction with a divisor of 0" ] _1 } impl From < DIVBYZERO_A > for bool { # [ inline ( always ) ] fn from ( variant : DIVBYZERO_A ) -> Self { match variant { DIVBYZERO_A :: _0 => false , DIVBYZERO_A :: _1 => true } } } # [ doc = "Reader of field `DIVBYZERO`" ] pub type DIVBYZERO_R = crate :: R < bool , DIVBYZERO_A > ; impl DIVBYZERO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DIVBYZERO_A { match self . bits { false => DIVBYZERO_A :: _0 , true => DIVBYZERO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DIVBYZERO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DIVBYZERO_A :: _1 } } # [ doc = "Write proxy for field `DIVBYZERO`" ] pub struct DIVBYZERO_W < 'a > { w : & 'a mut W , } impl < 'a > DIVBYZERO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DIVBYZERO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no divide by zero fault, or divide by zero trapping not enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DIVBYZERO_A :: _0 ) } # [ doc = "the processor has executed an SDIV or UDIV instruction with a divisor of 0" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DIVBYZERO_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn iaccviol ( & self ) -> IACCVIOL_R { IACCVIOL_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn daccviol ( & self ) -> DACCVIOL_R { DACCVIOL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - no description available" ] # [ inline ( always ) ] pub fn munstkerr ( & self ) -> MUNSTKERR_R { MUNSTKERR_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - no description available" ] # [ inline ( always ) ] pub fn mstkerr ( & self ) -> MSTKERR_R { MSTKERR_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - no description available" ] # [ inline ( always ) ] pub fn mlsperr ( & self ) -> MLSPERR_R { MLSPERR_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 7 - no description available" ] # [ inline ( always ) ] pub fn mmarvalid ( & self ) -> MMARVALID_R { MMARVALID_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - no description available" ] # [ inline ( always ) ] pub fn ibuserr ( & self ) -> IBUSERR_R { IBUSERR_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - no description available" ] # [ inline ( always ) ] pub fn preciserr ( & self ) -> PRECISERR_R { PRECISERR_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - no description available" ] # [ inline ( always ) ] pub fn impreciserr ( & self ) -> IMPRECISERR_R { IMPRECISERR_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - no description available" ] # [ inline ( always ) ] pub fn unstkerr ( & self ) -> UNSTKERR_R { UNSTKERR_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - no description available" ] # [ inline ( always ) ] pub fn stkerr ( & self ) -> STKERR_R { STKERR_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 13 - no description available" ] # [ inline ( always ) ] pub fn lsperr ( & self ) -> LSPERR_R { LSPERR_R :: new ( ( ( self . bits >> 13 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - no description available" ] # [ inline ( always ) ] pub fn bfarvalid ( & self ) -> BFARVALID_R { BFARVALID_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - no description available" ] # [ inline ( always ) ] pub fn undefinstr ( & self ) -> UNDEFINSTR_R { UNDEFINSTR_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 17 - no description available" ] # [ inline ( always ) ] pub fn invstate ( & self ) -> INVSTATE_R { INVSTATE_R :: new ( ( ( self . bits >> 17 ) & 0x01 ) != 0 ) } # [ doc = "Bit 18 - no description available" ] # [ inline ( always ) ] pub fn invpc ( & self ) -> INVPC_R { INVPC_R :: new ( ( ( self . bits >> 18 ) & 0x01 ) != 0 ) } # [ doc = "Bit 19 - no description available" ] # [ inline ( always ) ] pub fn nocp ( & self ) -> NOCP_R { NOCP_R :: new ( ( ( self . bits >> 19 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - no description available" ] # [ inline ( always ) ] pub fn unaligned ( & self ) -> UNALIGNED_R { UNALIGNED_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - no description available" ] # [ inline ( always ) ] pub fn divbyzero ( & self ) -> DIVBYZERO_R { DIVBYZERO_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn iaccviol ( & mut self ) -> IACCVIOL_W { IACCVIOL_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn daccviol ( & mut self ) -> DACCVIOL_W { DACCVIOL_W { w : self } } # [ doc = "Bit 3 - no description available" ] # [ inline ( always ) ] pub fn munstkerr ( & mut self ) -> MUNSTKERR_W { MUNSTKERR_W { w : self } } # [ doc = "Bit 4 - no description available" ] # [ inline ( always ) ] pub fn mstkerr ( & mut self ) -> MSTKERR_W { MSTKERR_W { w : self } } # [ doc = "Bit 5 - no description available" ] # [ inline ( always ) ] pub fn mlsperr ( & mut self ) -> MLSPERR_W { MLSPERR_W { w : self } } # [ doc = "Bit 7 - no description available" ] # [ inline ( always ) ] pub fn mmarvalid ( & mut self ) -> MMARVALID_W { MMARVALID_W { w : self } } # [ doc = "Bit 8 - no description available" ] # [ inline ( always ) ] pub fn ibuserr ( & mut self ) -> IBUSERR_W { IBUSERR_W { w : self } } # [ doc = "Bit 9 - no description available" ] # [ inline ( always ) ] pub fn preciserr ( & mut self ) -> PRECISERR_W { PRECISERR_W { w : self } } # [ doc = "Bit 10 - no description available" ] # [ inline ( always ) ] pub fn impreciserr ( & mut self ) -> IMPRECISERR_W { IMPRECISERR_W { w : self } } # [ doc = "Bit 11 - no description available" ] # [ inline ( always ) ] pub fn unstkerr ( & mut self ) -> UNSTKERR_W { UNSTKERR_W { w : self } } # [ doc = "Bit 12 - no description available" ] # [ inline ( always ) ] pub fn stkerr ( & mut self ) -> STKERR_W { STKERR_W { w : self } } # [ doc = "Bit 13 - no description available" ] # [ inline ( always ) ] pub fn lsperr ( & mut self ) -> LSPERR_W { LSPERR_W { w : self } } # [ doc = "Bit 15 - no description available" ] # [ inline ( always ) ] pub fn bfarvalid ( & mut self ) -> BFARVALID_W { BFARVALID_W { w : self } } # [ doc = "Bit 16 - no description available" ] # [ inline ( always ) ] pub fn undefinstr ( & mut self ) -> UNDEFINSTR_W { UNDEFINSTR_W { w : self } } # [ doc = "Bit 17 - no description available" ] # [ inline ( always ) ] pub fn invstate ( & mut self ) -> INVSTATE_W { INVSTATE_W { w : self } } # [ doc = "Bit 18 - no description available" ] # [ inline ( always ) ] pub fn invpc ( & mut self ) -> INVPC_W { INVPC_W { w : self } } # [ doc = "Bit 19 - no description available" ] # [ inline ( always ) ] pub fn nocp ( & mut self ) -> NOCP_W { NOCP_W { w : self } } # [ doc = "Bit 24 - no description available" ] # [ inline ( always ) ] pub fn unaligned ( & mut self ) -> UNALIGNED_W { UNALIGNED_W { w : self } } # [ doc = "Bit 25 - no description available" ] # [ inline ( always ) ] pub fn divbyzero ( & mut self ) -> DIVBYZERO_W { DIVBYZERO_W { w : self } } } } # [ doc = "HardFault Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hfsr](hfsr) module" ] pub type HFSR = crate :: Reg < u32 , _HFSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _HFSR ; # [ doc = "`read()` method returns [hfsr::R](hfsr::R) reader structure" ] impl crate :: Readable for HFSR { } # [ doc = "`write(|w| ..)` method takes [hfsr::W](hfsr::W) writer structure" ] impl crate :: Writable for HFSR { } # [ doc = "HardFault Status register" ] pub mod hfsr { # [ doc = "Reader of register HFSR" ] pub type R = crate :: R < u32 , super :: HFSR > ; # [ doc = "Writer for register HFSR" ] pub type W = crate :: W < u32 , super :: HFSR > ; # [ doc = "Register HFSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: HFSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VECTTBL_A { # [ doc = "0: no BusFault on vector table read" ] _0 , # [ doc = "1: BusFault on vector table read" ] _1 } impl From < VECTTBL_A > for bool { # [ inline ( always ) ] fn from ( variant : VECTTBL_A ) -> Self { match variant { VECTTBL_A :: _0 => false , VECTTBL_A :: _1 => true } } } # [ doc = "Reader of field `VECTTBL`" ] pub type VECTTBL_R = crate :: R < bool , VECTTBL_A > ; impl VECTTBL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VECTTBL_A { match self . bits { false => VECTTBL_A :: _0 , true => VECTTBL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VECTTBL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VECTTBL_A :: _1 } } # [ doc = "Write proxy for field `VECTTBL`" ] pub struct VECTTBL_W < 'a > { w : & 'a mut W , } impl < 'a > VECTTBL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VECTTBL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no BusFault on vector table read" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VECTTBL_A :: _0 ) } # [ doc = "BusFault on vector table read" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VECTTBL_A :: _1 ) } # [ 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 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FORCED_A { # [ doc = "0: no forced HardFault" ] _0 , # [ doc = "1: forced HardFault" ] _1 } impl From < FORCED_A > for bool { # [ inline ( always ) ] fn from ( variant : FORCED_A ) -> Self { match variant { FORCED_A :: _0 => false , FORCED_A :: _1 => true } } } # [ doc = "Reader of field `FORCED`" ] pub type FORCED_R = crate :: R < bool , FORCED_A > ; impl FORCED_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FORCED_A { match self . bits { false => FORCED_A :: _0 , true => FORCED_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FORCED_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FORCED_A :: _1 } } # [ doc = "Write proxy for field `FORCED`" ] pub struct FORCED_W < 'a > { w : & 'a mut W , } impl < 'a > FORCED_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FORCED_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "no forced HardFault" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FORCED_A :: _0 ) } # [ doc = "forced HardFault" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FORCED_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Reader of field `DEBUGEVT`" ] pub type DEBUGEVT_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `DEBUGEVT`" ] pub struct DEBUGEVT_W < 'a > { w : & 'a mut W , } impl < 'a > DEBUGEVT_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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn vecttbl ( & self ) -> VECTTBL_R { VECTTBL_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - no description available" ] # [ inline ( always ) ] pub fn forced ( & self ) -> FORCED_R { FORCED_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - no description available" ] # [ inline ( always ) ] pub fn debugevt ( & self ) -> DEBUGEVT_R { DEBUGEVT_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn vecttbl ( & mut self ) -> VECTTBL_W { VECTTBL_W { w : self } } # [ doc = "Bit 30 - no description available" ] # [ inline ( always ) ] pub fn forced ( & mut self ) -> FORCED_W { FORCED_W { w : self } } # [ doc = "Bit 31 - no description available" ] # [ inline ( always ) ] pub fn debugevt ( & mut self ) -> DEBUGEVT_W { DEBUGEVT_W { w : self } } } } # [ doc = "Debug Fault Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dfsr](dfsr) module" ] pub type DFSR = crate :: Reg < u32 , _DFSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _DFSR ; # [ doc = "`read()` method returns [dfsr::R](dfsr::R) reader structure" ] impl crate :: Readable for DFSR { } # [ doc = "`write(|w| ..)` method takes [dfsr::W](dfsr::W) writer structure" ] impl crate :: Writable for DFSR { } # [ doc = "Debug Fault Status Register" ] pub mod dfsr { # [ doc = "Reader of register DFSR" ] pub type R = crate :: R < u32 , super :: DFSR > ; # [ doc = "Writer for register DFSR" ] pub type W = crate :: W < u32 , super :: DFSR > ; # [ doc = "Register DFSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: DFSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HALTED_A { # [ doc = "0: No active halt request debug event" ] _0 , # [ doc = "1: Halt request debug event active" ] _1 } impl From < HALTED_A > for bool { # [ inline ( always ) ] fn from ( variant : HALTED_A ) -> Self { match variant { HALTED_A :: _0 => false , HALTED_A :: _1 => true } } } # [ doc = "Reader of field `HALTED`" ] pub type HALTED_R = crate :: R < bool , HALTED_A > ; impl HALTED_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HALTED_A { match self . bits { false => HALTED_A :: _0 , true => HALTED_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HALTED_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HALTED_A :: _1 } } # [ doc = "Write proxy for field `HALTED`" ] pub struct HALTED_W < 'a > { w : & 'a mut W , } impl < 'a > HALTED_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HALTED_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No active halt request debug event" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HALTED_A :: _0 ) } # [ doc = "Halt request debug event active" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HALTED_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BKPT_A { # [ doc = "0: No current breakpoint debug event" ] _0 , # [ doc = "1: At least one current breakpoint debug event" ] _1 } impl From < BKPT_A > for bool { # [ inline ( always ) ] fn from ( variant : BKPT_A ) -> Self { match variant { BKPT_A :: _0 => false , BKPT_A :: _1 => true } } } # [ doc = "Reader of field `BKPT`" ] pub type BKPT_R = crate :: R < bool , BKPT_A > ; impl BKPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BKPT_A { match self . bits { false => BKPT_A :: _0 , true => BKPT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BKPT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BKPT_A :: _1 } } # [ doc = "Write proxy for field `BKPT`" ] pub struct BKPT_W < 'a > { w : & 'a mut W , } impl < 'a > BKPT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BKPT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No current breakpoint debug event" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BKPT_A :: _0 ) } # [ doc = "At least one current breakpoint debug event" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BKPT_A :: _1 ) } # [ 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 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DWTTRAP_A { # [ doc = "0: No current debug events generated by the DWT" ] _0 , # [ doc = "1: At least one current debug event generated by the DWT" ] _1 } impl From < DWTTRAP_A > for bool { # [ inline ( always ) ] fn from ( variant : DWTTRAP_A ) -> Self { match variant { DWTTRAP_A :: _0 => false , DWTTRAP_A :: _1 => true } } } # [ doc = "Reader of field `DWTTRAP`" ] pub type DWTTRAP_R = crate :: R < bool , DWTTRAP_A > ; impl DWTTRAP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DWTTRAP_A { match self . bits { false => DWTTRAP_A :: _0 , true => DWTTRAP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DWTTRAP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DWTTRAP_A :: _1 } } # [ doc = "Write proxy for field `DWTTRAP`" ] pub struct DWTTRAP_W < 'a > { w : & 'a mut W , } impl < 'a > DWTTRAP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DWTTRAP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No current debug events generated by the DWT" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DWTTRAP_A :: _0 ) } # [ doc = "At least one current debug event generated by the DWT" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DWTTRAP_A :: _1 ) } # [ 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 = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VCATCH_A { # [ doc = "0: No Vector catch triggered" ] _0 , # [ doc = "1: Vector catch triggered" ] _1 } impl From < VCATCH_A > for bool { # [ inline ( always ) ] fn from ( variant : VCATCH_A ) -> Self { match variant { VCATCH_A :: _0 => false , VCATCH_A :: _1 => true } } } # [ doc = "Reader of field `VCATCH`" ] pub type VCATCH_R = crate :: R < bool , VCATCH_A > ; impl VCATCH_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> VCATCH_A { match self . bits { false => VCATCH_A :: _0 , true => VCATCH_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == VCATCH_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == VCATCH_A :: _1 } } # [ doc = "Write proxy for field `VCATCH`" ] pub struct VCATCH_W < 'a > { w : & 'a mut W , } impl < 'a > VCATCH_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VCATCH_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No Vector catch triggered" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( VCATCH_A :: _0 ) } # [ doc = "Vector catch triggered" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( VCATCH_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXTERNAL_A { # [ doc = "0: No EDBGRQ debug event" ] _0 , # [ doc = "1: EDBGRQ debug event" ] _1 } impl From < EXTERNAL_A > for bool { # [ inline ( always ) ] fn from ( variant : EXTERNAL_A ) -> Self { match variant { EXTERNAL_A :: _0 => false , EXTERNAL_A :: _1 => true } } } # [ doc = "Reader of field `EXTERNAL`" ] pub type EXTERNAL_R = crate :: R < bool , EXTERNAL_A > ; impl EXTERNAL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> EXTERNAL_A { match self . bits { false => EXTERNAL_A :: _0 , true => EXTERNAL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == EXTERNAL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == EXTERNAL_A :: _1 } } # [ doc = "Write proxy for field `EXTERNAL`" ] pub struct EXTERNAL_W < 'a > { w : & 'a mut W , } impl < 'a > EXTERNAL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : EXTERNAL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No EDBGRQ debug event" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( EXTERNAL_A :: _0 ) } # [ doc = "EDBGRQ debug event" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( EXTERNAL_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } impl R { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn halted ( & self ) -> HALTED_R { HALTED_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn bkpt ( & self ) -> BKPT_R { BKPT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn dwttrap ( & self ) -> DWTTRAP_R { DWTTRAP_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - no description available" ] # [ inline ( always ) ] pub fn vcatch ( & self ) -> VCATCH_R { VCATCH_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - no description available" ] # [ inline ( always ) ] pub fn external ( & self ) -> EXTERNAL_R { EXTERNAL_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn halted ( & mut self ) -> HALTED_W { HALTED_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn bkpt ( & mut self ) -> BKPT_W { BKPT_W { w : self } } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn dwttrap ( & mut self ) -> DWTTRAP_W { DWTTRAP_W { w : self } } # [ doc = "Bit 3 - no description available" ] # [ inline ( always ) ] pub fn vcatch ( & mut self ) -> VCATCH_W { VCATCH_W { w : self } } # [ doc = "Bit 4 - no description available" ] # [ inline ( always ) ] pub fn external ( & mut self ) -> EXTERNAL_W { EXTERNAL_W { w : self } } } } # [ doc = "MemManage Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mmfar](mmfar) module" ] pub type MMFAR = crate :: Reg < u32 , _MMFAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _MMFAR ; # [ doc = "`read()` method returns [mmfar::R](mmfar::R) reader structure" ] impl crate :: Readable for MMFAR { } # [ doc = "`write(|w| ..)` method takes [mmfar::W](mmfar::W) writer structure" ] impl crate :: Writable for MMFAR { } # [ doc = "MemManage Address Register" ] pub mod mmfar { # [ doc = "Reader of register MMFAR" ] pub type R = crate :: R < u32 , super :: MMFAR > ; # [ doc = "Writer for register MMFAR" ] pub type W = crate :: W < u32 , super :: MMFAR > ; # [ doc = "Register MMFAR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: MMFAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ADDRESS`" ] pub type ADDRESS_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `ADDRESS`" ] pub struct ADDRESS_W < 'a > { w : & 'a mut W , } impl < 'a > ADDRESS_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Address of MemManage fault location" ] # [ inline ( always ) ] pub fn address ( & self ) -> ADDRESS_R { ADDRESS_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Address of MemManage fault location" ] # [ inline ( always ) ] pub fn address ( & mut self ) -> ADDRESS_W { ADDRESS_W { w : self } } } } # [ doc = "BusFault Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bfar](bfar) module" ] pub type BFAR = crate :: Reg < u32 , _BFAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _BFAR ; # [ doc = "`read()` method returns [bfar::R](bfar::R) reader structure" ] impl crate :: Readable for BFAR { } # [ doc = "`write(|w| ..)` method takes [bfar::W](bfar::W) writer structure" ] impl crate :: Writable for BFAR { } # [ doc = "BusFault Address Register" ] pub mod bfar { # [ doc = "Reader of register BFAR" ] pub type R = crate :: R < u32 , super :: BFAR > ; # [ doc = "Writer for register BFAR" ] pub type W = crate :: W < u32 , super :: BFAR > ; # [ doc = "Register BFAR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: BFAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ADDRESS`" ] pub type ADDRESS_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `ADDRESS`" ] pub struct ADDRESS_W < 'a > { w : & 'a mut W , } impl < 'a > ADDRESS_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Address of the BusFault location" ] # [ inline ( always ) ] pub fn address ( & self ) -> ADDRESS_R { ADDRESS_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Address of the BusFault location" ] # [ inline ( always ) ] pub fn address ( & mut self ) -> ADDRESS_W { ADDRESS_W { w : self } } } } # [ doc = "Auxiliary Fault Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [afsr](afsr) module" ] pub type AFSR = crate :: Reg < u32 , _AFSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _AFSR ; # [ doc = "`read()` method returns [afsr::R](afsr::R) reader structure" ] impl crate :: Readable for AFSR { } # [ doc = "`write(|w| ..)` method takes [afsr::W](afsr::W) writer structure" ] impl crate :: Writable for AFSR { } # [ doc = "Auxiliary Fault Status Register" ] pub mod afsr { # [ doc = "Reader of register AFSR" ] pub type R = crate :: R < u32 , super :: AFSR > ; # [ doc = "Writer for register AFSR" ] pub type W = crate :: W < u32 , super :: AFSR > ; # [ doc = "Register AFSR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: AFSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `AUXFAULT`" ] pub type AUXFAULT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `AUXFAULT`" ] pub struct AUXFAULT_W < 'a > { w : & 'a mut W , } impl < 'a > AUXFAULT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Latched version of the AUXFAULT inputs" ] # [ inline ( always ) ] pub fn auxfault ( & self ) -> AUXFAULT_R { AUXFAULT_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Latched version of the AUXFAULT inputs" ] # [ inline ( always ) ] pub fn auxfault ( & mut self ) -> AUXFAULT_W { AUXFAULT_W { w : self } } } } # [ doc = "Coprocessor Access Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cpacr](cpacr) module" ] pub type CPACR = crate :: Reg < u32 , _CPACR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CPACR ; # [ doc = "`read()` method returns [cpacr::R](cpacr::R) reader structure" ] impl crate :: Readable for CPACR { } # [ doc = "`write(|w| ..)` method takes [cpacr::W](cpacr::W) writer structure" ] impl crate :: Writable for CPACR { } # [ doc = "Coprocessor Access Control Register" ] pub mod cpacr { # [ doc = "Reader of register CPACR" ] pub type R = crate :: R < u32 , super :: CPACR > ; # [ doc = "Writer for register CPACR" ] pub type W = crate :: W < u32 , super :: CPACR > ; # [ doc = "Register CPACR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CPACR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Access privileges for coprocessor 10.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CP10_A { # [ doc = "0: Access denied. Any attempted access generates a NOCP UsageFault" ] _00 , # [ doc = "1: Privileged access only. An unprivileged access generates a NOCP fault." ] _01 , # [ doc = "2: Reserved. The result of any access is UNPREDICTABLE." ] _10 , # [ doc = "3: Full access." ] _11 } impl From < CP10_A > for u8 { # [ inline ( always ) ] fn from ( variant : CP10_A ) -> Self { match variant { CP10_A :: _00 => 0 , CP10_A :: _01 => 1 , CP10_A :: _10 => 2 , CP10_A :: _11 => 3 } } } # [ doc = "Reader of field `CP10`" ] pub type CP10_R = crate :: R < u8 , CP10_A > ; impl CP10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CP10_A { match self . bits { 0 => CP10_A :: _00 , 1 => CP10_A :: _01 , 2 => CP10_A :: _10 , 3 => CP10_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CP10_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CP10_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CP10_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CP10_A :: _11 } } # [ doc = "Write proxy for field `CP10`" ] pub struct CP10_W < 'a > { w : & 'a mut W , } impl < 'a > CP10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CP10_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Access denied. Any attempted access generates a NOCP UsageFault" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CP10_A :: _00 ) } # [ doc = "Privileged access only. An unprivileged access generates a NOCP fault." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CP10_A :: _01 ) } # [ doc = "Reserved. The result of any access is UNPREDICTABLE." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CP10_A :: _10 ) } # [ doc = "Full access." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CP10_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "Access privileges for coprocessor 11.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CP11_A { # [ doc = "0: Access denied. Any attempted access generates a NOCP UsageFault" ] _00 , # [ doc = "1: Privileged access only. An unprivileged access generates a NOCP fault." ] _01 , # [ doc = "2: Reserved. The result of any access is UNPREDICTABLE." ] _10 , # [ doc = "3: Full access." ] _11 } impl From < CP11_A > for u8 { # [ inline ( always ) ] fn from ( variant : CP11_A ) -> Self { match variant { CP11_A :: _00 => 0 , CP11_A :: _01 => 1 , CP11_A :: _10 => 2 , CP11_A :: _11 => 3 } } } # [ doc = "Reader of field `CP11`" ] pub type CP11_R = crate :: R < u8 , CP11_A > ; impl CP11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CP11_A { match self . bits { 0 => CP11_A :: _00 , 1 => CP11_A :: _01 , 2 => CP11_A :: _10 , 3 => CP11_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == CP11_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == CP11_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == CP11_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == CP11_A :: _11 } } # [ doc = "Write proxy for field `CP11`" ] pub struct CP11_W < 'a > { w : & 'a mut W , } impl < 'a > CP11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CP11_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Access denied. Any attempted access generates a NOCP UsageFault" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( CP11_A :: _00 ) } # [ doc = "Privileged access only. An unprivileged access generates a NOCP fault." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( CP11_A :: _01 ) } # [ doc = "Reserved. The result of any access is UNPREDICTABLE." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( CP11_A :: _10 ) } # [ doc = "Full access." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( CP11_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } impl R { # [ doc = "Bits 20:21 - Access privileges for coprocessor 10." ] # [ inline ( always ) ] pub fn cp10 ( & self ) -> CP10_R { CP10_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bits 22:23 - Access privileges for coprocessor 11." ] # [ inline ( always ) ] pub fn cp11 ( & self ) -> CP11_R { CP11_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 20:21 - Access privileges for coprocessor 10." ] # [ inline ( always ) ] pub fn cp10 ( & mut self ) -> CP10_W { CP10_W { w : self } } # [ doc = "Bits 22:23 - Access privileges for coprocessor 11." ] # [ inline ( always ) ] pub fn cp11 ( & mut self ) -> CP11_W { CP11_W { w : self } } } } # [ doc = "Floating-point Context Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fpccr](fpccr) module" ] pub type FPCCR = crate :: Reg < u32 , _FPCCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPCCR ; # [ doc = "`read()` method returns [fpccr::R](fpccr::R) reader structure" ] impl crate :: Readable for FPCCR { } # [ doc = "`write(|w| ..)` method takes [fpccr::W](fpccr::W) writer structure" ] impl crate :: Writable for FPCCR { } # [ doc = "Floating-point Context Control Register" ] pub mod fpccr { # [ doc = "Reader of register FPCCR" ] pub type R = crate :: R < u32 , super :: FPCCR > ; # [ doc = "Writer for register FPCCR" ] pub type W = crate :: W < u32 , super :: FPCCR > ; # [ doc = "Register FPCCR `reset()`'s with value 0xc000_0000" ] impl crate :: ResetValue for super :: FPCCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xc000_0000 } } # [ doc = "Lazy state preservation.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LSPACT_A { # [ doc = "0: Lazy state preservation is not active." ] _0 , # [ doc = "1: Lazy state preservation is active. floating-point stack frame has been allocated but saving state to it has been deferred." ] _1 } impl From < LSPACT_A > for bool { # [ inline ( always ) ] fn from ( variant : LSPACT_A ) -> Self { match variant { LSPACT_A :: _0 => false , LSPACT_A :: _1 => true } } } # [ doc = "Reader of field `LSPACT`" ] pub type LSPACT_R = crate :: R < bool , LSPACT_A > ; impl LSPACT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LSPACT_A { match self . bits { false => LSPACT_A :: _0 , true => LSPACT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LSPACT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LSPACT_A :: _1 } } # [ doc = "Write proxy for field `LSPACT`" ] pub struct LSPACT_W < 'a > { w : & 'a mut W , } impl < 'a > LSPACT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LSPACT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Lazy state preservation is not active." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LSPACT_A :: _0 ) } # [ doc = "Lazy state preservation is active. floating-point stack frame has been allocated but saving state to it has been deferred." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LSPACT_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Privilege level when the floating-point stack frame was allocated.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum USER_A { # [ doc = "0: Privilege level was not user when the floating-point stack frame was allocated." ] _0 , # [ doc = "1: Privilege level was user when the floating-point stack frame was allocated." ] _1 } impl From < USER_A > for bool { # [ inline ( always ) ] fn from ( variant : USER_A ) -> Self { match variant { USER_A :: _0 => false , USER_A :: _1 => true } } } # [ doc = "Reader of field `USER`" ] pub type USER_R = crate :: R < bool , USER_A > ; impl USER_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> USER_A { match self . bits { false => USER_A :: _0 , true => USER_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == USER_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == USER_A :: _1 } } # [ doc = "Write proxy for field `USER`" ] pub struct USER_W < 'a > { w : & 'a mut W , } impl < 'a > USER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : USER_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Privilege level was not user when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( USER_A :: _0 ) } # [ doc = "Privilege level was user when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( USER_A :: _1 ) } # [ 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 } } # [ doc = "Mode when the floating-point stack frame was allocated.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum THREAD_A { # [ doc = "0: Mode was not Thread Mode when the floating-point stack frame was allocated." ] _0 , # [ doc = "1: Mode was Thread Mode when the floating-point stack frame was allocated." ] _1 } impl From < THREAD_A > for bool { # [ inline ( always ) ] fn from ( variant : THREAD_A ) -> Self { match variant { THREAD_A :: _0 => false , THREAD_A :: _1 => true } } } # [ doc = "Reader of field `THREAD`" ] pub type THREAD_R = crate :: R < bool , THREAD_A > ; impl THREAD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> THREAD_A { match self . bits { false => THREAD_A :: _0 , true => THREAD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == THREAD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == THREAD_A :: _1 } } # [ doc = "Write proxy for field `THREAD`" ] pub struct THREAD_W < 'a > { w : & 'a mut W , } impl < 'a > THREAD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : THREAD_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Mode was not Thread Mode when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( THREAD_A :: _0 ) } # [ doc = "Mode was Thread Mode when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( THREAD_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Permission to set the HardFault handler to the pending state when the floating-point stack frame was allocated.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HFRDY_A { # [ doc = "0: Priority did not permit setting the HardFault handler to the pending state when the floating-point stack frame was allocated." ] _0 , # [ doc = "1: Priority permitted setting the HardFault handler to the pending state when the floating-point stack frame was allocated." ] _1 } impl From < HFRDY_A > for bool { # [ inline ( always ) ] fn from ( variant : HFRDY_A ) -> Self { match variant { HFRDY_A :: _0 => false , HFRDY_A :: _1 => true } } } # [ doc = "Reader of field `HFRDY`" ] pub type HFRDY_R = crate :: R < bool , HFRDY_A > ; impl HFRDY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> HFRDY_A { match self . bits { false => HFRDY_A :: _0 , true => HFRDY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == HFRDY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == HFRDY_A :: _1 } } # [ doc = "Write proxy for field `HFRDY`" ] pub struct HFRDY_W < 'a > { w : & 'a mut W , } impl < 'a > HFRDY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : HFRDY_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Priority did not permit setting the HardFault handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( HFRDY_A :: _0 ) } # [ doc = "Priority permitted setting the HardFault handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( HFRDY_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "Permission to set the MemManage handler to the pending state when the floating-point stack frame was allocated.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MMRDY_A { # [ doc = "0: MemManage is disabled or priority did not permit setting the MemManage handler to the pending state when the floating-point stack frame was allocated." ] _0 , # [ doc = "1: MemManage is enabled and priority permitted setting the MemManage handler to the pending state when the floating-point stack frame was allocated." ] _1 } impl From < MMRDY_A > for bool { # [ inline ( always ) ] fn from ( variant : MMRDY_A ) -> Self { match variant { MMRDY_A :: _0 => false , MMRDY_A :: _1 => true } } } # [ doc = "Reader of field `MMRDY`" ] pub type MMRDY_R = crate :: R < bool , MMRDY_A > ; impl MMRDY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MMRDY_A { match self . bits { false => MMRDY_A :: _0 , true => MMRDY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MMRDY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MMRDY_A :: _1 } } # [ doc = "Write proxy for field `MMRDY`" ] pub struct MMRDY_W < 'a > { w : & 'a mut W , } impl < 'a > MMRDY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MMRDY_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "MemManage is disabled or priority did not permit setting the MemManage handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MMRDY_A :: _0 ) } # [ doc = "MemManage is enabled and priority permitted setting the MemManage handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MMRDY_A :: _1 ) } # [ 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 = "Permission to set the BusFault handler to the pending state when the floating-point stack frame was allocated.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BFRDY_A { # [ doc = "0: BusFault is disabled or priority did not permit setting the BusFault handler to the pending state when the floating-point stack frame was allocated." ] _0 , # [ doc = "1: BusFault is disabled or priority did not permit setting the BusFault handler to the pending state when the floating-point stack frame was allocated." ] _1 } impl From < BFRDY_A > for bool { # [ inline ( always ) ] fn from ( variant : BFRDY_A ) -> Self { match variant { BFRDY_A :: _0 => false , BFRDY_A :: _1 => true } } } # [ doc = "Reader of field `BFRDY`" ] pub type BFRDY_R = crate :: R < bool , BFRDY_A > ; impl BFRDY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BFRDY_A { match self . bits { false => BFRDY_A :: _0 , true => BFRDY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BFRDY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BFRDY_A :: _1 } } # [ doc = "Write proxy for field `BFRDY`" ] pub struct BFRDY_W < 'a > { w : & 'a mut W , } impl < 'a > BFRDY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : BFRDY_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "BusFault is disabled or priority did not permit setting the BusFault handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( BFRDY_A :: _0 ) } # [ doc = "BusFault is disabled or priority did not permit setting the BusFault handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( BFRDY_A :: _1 ) } # [ 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 = "Permission to set the MON_PEND when the floating-point stack frame was allocated.\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MONRDY_A { # [ doc = "0: DebugMonitor is disabled or priority did not permit setting MON_PEND when the floating-point stack frame was allocated." ] _0 , # [ doc = "1: DebugMonitor is enabled and priority permits setting MON_PEND when the floating-point stack frame was allocated." ] _1 } impl From < MONRDY_A > for bool { # [ inline ( always ) ] fn from ( variant : MONRDY_A ) -> Self { match variant { MONRDY_A :: _0 => false , MONRDY_A :: _1 => true } } } # [ doc = "Reader of field `MONRDY`" ] pub type MONRDY_R = crate :: R < bool , MONRDY_A > ; impl MONRDY_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> MONRDY_A { match self . bits { false => MONRDY_A :: _0 , true => MONRDY_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == MONRDY_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == MONRDY_A :: _1 } } # [ doc = "Write proxy for field `MONRDY`" ] pub struct MONRDY_W < 'a > { w : & 'a mut W , } impl < 'a > MONRDY_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : MONRDY_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "DebugMonitor is disabled or priority did not permit setting MON_PEND when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( MONRDY_A :: _0 ) } # [ doc = "DebugMonitor is enabled and priority permits setting MON_PEND when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( MONRDY_A :: _1 ) } # [ 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 << 8 ) ) | ( ( ( value as u32 ) & 0x01 ) << 8 ) ; self . w } } # [ doc = "Lazy state preservation for floating-point context.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LSPEN_A { # [ doc = "0: Disable automatic lazy state preservation for floating-point context." ] _0 , # [ doc = "1: Enable automatic lazy state preservation for floating-point context." ] _1 } impl From < LSPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : LSPEN_A ) -> Self { match variant { LSPEN_A :: _0 => false , LSPEN_A :: _1 => true } } } # [ doc = "Reader of field `LSPEN`" ] pub type LSPEN_R = crate :: R < bool , LSPEN_A > ; impl LSPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LSPEN_A { match self . bits { false => LSPEN_A :: _0 , true => LSPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LSPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LSPEN_A :: _1 } } # [ doc = "Write proxy for field `LSPEN`" ] pub struct LSPEN_W < 'a > { w : & 'a mut W , } impl < 'a > LSPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LSPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable automatic lazy state preservation for floating-point context." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LSPEN_A :: _0 ) } # [ doc = "Enable automatic lazy state preservation for floating-point context." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LSPEN_A :: _1 ) } # [ 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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } # [ doc = "Enables CONTROL2 setting on execution of a floating-point instruction. This results in automatic hardware state preservation and restoration, for floating-point context, on exception entry and exit.\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ASPEN_A { # [ doc = "0: Disable CONTROL2 setting on execution of a floating-point instruction." ] _0 , # [ doc = "1: Enable CONTROL2 setting on execution of a floating-point instruction." ] _1 } impl From < ASPEN_A > for bool { # [ inline ( always ) ] fn from ( variant : ASPEN_A ) -> Self { match variant { ASPEN_A :: _0 => false , ASPEN_A :: _1 => true } } } # [ doc = "Reader of field `ASPEN`" ] pub type ASPEN_R = crate :: R < bool , ASPEN_A > ; impl ASPEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ASPEN_A { match self . bits { false => ASPEN_A :: _0 , true => ASPEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ASPEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ASPEN_A :: _1 } } # [ doc = "Write proxy for field `ASPEN`" ] pub struct ASPEN_W < 'a > { w : & 'a mut W , } impl < 'a > ASPEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ASPEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable CONTROL2 setting on execution of a floating-point instruction." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ASPEN_A :: _0 ) } # [ doc = "Enable CONTROL2 setting on execution of a floating-point instruction." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ASPEN_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Lazy state preservation." ] # [ inline ( always ) ] pub fn lspact ( & self ) -> LSPACT_R { LSPACT_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Privilege level when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn user ( & self ) -> USER_R { USER_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Mode when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn thread ( & self ) -> THREAD_R { THREAD_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - Permission to set the HardFault handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn hfrdy ( & self ) -> HFRDY_R { HFRDY_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - Permission to set the MemManage handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn mmrdy ( & self ) -> MMRDY_R { MMRDY_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } # [ doc = "Bit 6 - Permission to set the BusFault handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn bfrdy ( & self ) -> BFRDY_R { BFRDY_R :: new ( ( ( self . bits >> 6 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - Permission to set the MON_PEND when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn monrdy ( & self ) -> MONRDY_R { MONRDY_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 30 - Lazy state preservation for floating-point context." ] # [ inline ( always ) ] pub fn lspen ( & self ) -> LSPEN_R { LSPEN_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Enables CONTROL2 setting on execution of a floating-point instruction. This results in automatic hardware state preservation and restoration, for floating-point context, on exception entry and exit." ] # [ inline ( always ) ] pub fn aspen ( & self ) -> ASPEN_R { ASPEN_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Lazy state preservation." ] # [ inline ( always ) ] pub fn lspact ( & mut self ) -> LSPACT_W { LSPACT_W { w : self } } # [ doc = "Bit 1 - Privilege level when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn user ( & mut self ) -> USER_W { USER_W { w : self } } # [ doc = "Bit 3 - Mode when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn thread ( & mut self ) -> THREAD_W { THREAD_W { w : self } } # [ doc = "Bit 4 - Permission to set the HardFault handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn hfrdy ( & mut self ) -> HFRDY_W { HFRDY_W { w : self } } # [ doc = "Bit 5 - Permission to set the MemManage handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn mmrdy ( & mut self ) -> MMRDY_W { MMRDY_W { w : self } } # [ doc = "Bit 6 - Permission to set the BusFault handler to the pending state when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn bfrdy ( & mut self ) -> BFRDY_W { BFRDY_W { w : self } } # [ doc = "Bit 8 - Permission to set the MON_PEND when the floating-point stack frame was allocated." ] # [ inline ( always ) ] pub fn monrdy ( & mut self ) -> MONRDY_W { MONRDY_W { w : self } } # [ doc = "Bit 30 - Lazy state preservation for floating-point context." ] # [ inline ( always ) ] pub fn lspen ( & mut self ) -> LSPEN_W { LSPEN_W { w : self } } # [ doc = "Bit 31 - Enables CONTROL2 setting on execution of a floating-point instruction. This results in automatic hardware state preservation and restoration, for floating-point context, on exception entry and exit." ] # [ inline ( always ) ] pub fn aspen ( & mut self ) -> ASPEN_W { ASPEN_W { w : self } } } } # [ doc = "Floating-point Context Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fpcar](fpcar) module" ] pub type FPCAR = crate :: Reg < u32 , _FPCAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPCAR ; # [ doc = "`read()` method returns [fpcar::R](fpcar::R) reader structure" ] impl crate :: Readable for FPCAR { } # [ doc = "`write(|w| ..)` method takes [fpcar::W](fpcar::W) writer structure" ] impl crate :: Writable for FPCAR { } # [ doc = "Floating-point Context Address Register" ] pub mod fpcar { # [ doc = "Reader of register FPCAR" ] pub type R = crate :: R < u32 , super :: FPCAR > ; # [ doc = "Writer for register FPCAR" ] pub type W = crate :: W < u32 , super :: FPCAR > ; # [ doc = "Register FPCAR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FPCAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `ADDRESS`" ] pub type ADDRESS_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `ADDRESS`" ] pub struct ADDRESS_W < 'a > { w : & 'a mut W , } impl < 'a > ADDRESS_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x1fff_ffff << 3 ) ) | ( ( ( value as u32 ) & 0x1fff_ffff ) << 3 ) ; self . w } } impl R { # [ doc = "Bits 3:31 - The location of the unpopulated floating-point register space allocated on an exception stack frame." ] # [ inline ( always ) ] pub fn address ( & self ) -> ADDRESS_R { ADDRESS_R :: new ( ( ( self . bits >> 3 ) & 0x1fff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 3:31 - The location of the unpopulated floating-point register space allocated on an exception stack frame." ] # [ inline ( always ) ] pub fn address ( & mut self ) -> ADDRESS_W { ADDRESS_W { w : self } } } } # [ doc = "Floating-point Default Status Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fpdscr](fpdscr) module" ] pub type FPDSCR = crate :: Reg < u32 , _FPDSCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FPDSCR ; # [ doc = "`read()` method returns [fpdscr::R](fpdscr::R) reader structure" ] impl crate :: Readable for FPDSCR { } # [ doc = "`write(|w| ..)` method takes [fpdscr::W](fpdscr::W) writer structure" ] impl crate :: Writable for FPDSCR { } # [ doc = "Floating-point Default Status Control Register" ] pub mod fpdscr { # [ doc = "Reader of register FPDSCR" ] pub type R = crate :: R < u32 , super :: FPDSCR > ; # [ doc = "Writer for register FPDSCR" ] pub type W = crate :: W < u32 , super :: FPDSCR > ; # [ doc = "Register FPDSCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: FPDSCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Default value for FPSCR.RMode (Rounding Mode control field).\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RMODE_A { # [ doc = "0: Round to Nearest (RN) mode" ] _00 , # [ doc = "1: Round towards Plus Infinity (RP) mode." ] _01 , # [ doc = "2: Round towards Minus Infinity (RM) mode." ] _10 , # [ doc = "3: Round towards Zero (RZ) mode." ] _11 } impl From < RMODE_A > for u8 { # [ inline ( always ) ] fn from ( variant : RMODE_A ) -> Self { match variant { RMODE_A :: _00 => 0 , RMODE_A :: _01 => 1 , RMODE_A :: _10 => 2 , RMODE_A :: _11 => 3 } } } # [ doc = "Reader of field `RMode`" ] pub type RMODE_R = crate :: R < u8 , RMODE_A > ; impl RMODE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RMODE_A { match self . bits { 0 => RMODE_A :: _00 , 1 => RMODE_A :: _01 , 2 => RMODE_A :: _10 , 3 => RMODE_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RMODE_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == RMODE_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == RMODE_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == RMODE_A :: _11 } } # [ doc = "Write proxy for field `RMode`" ] pub struct RMODE_W < 'a > { w : & 'a mut W , } impl < 'a > RMODE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RMODE_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Round to Nearest (RN) mode" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RMODE_A :: _00 ) } # [ doc = "Round towards Plus Infinity (RP) mode." ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( RMODE_A :: _01 ) } # [ doc = "Round towards Minus Infinity (RM) mode." ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( RMODE_A :: _10 ) } # [ doc = "Round towards Zero (RZ) mode." ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( RMODE_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } # [ doc = "Default value for FPSCR.FZ (Flush-to-zero mode control bit).\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FZ_A { # [ doc = "0: Flush-to-zero mode disabled. Behavior of the floating-point system is fully compliant with the IEEE 754 standard." ] _0 , # [ doc = "1: Flush-to-zero mode enabled." ] _1 } impl From < FZ_A > for bool { # [ inline ( always ) ] fn from ( variant : FZ_A ) -> Self { match variant { FZ_A :: _0 => false , FZ_A :: _1 => true } } } # [ doc = "Reader of field `FZ`" ] pub type FZ_R = crate :: R < bool , FZ_A > ; impl FZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FZ_A { match self . bits { false => FZ_A :: _0 , true => FZ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FZ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FZ_A :: _1 } } # [ doc = "Write proxy for field `FZ`" ] pub struct FZ_W < 'a > { w : & 'a mut W , } impl < 'a > FZ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FZ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Flush-to-zero mode disabled. Behavior of the floating-point system is fully compliant with the IEEE 754 standard." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FZ_A :: _0 ) } # [ doc = "Flush-to-zero mode enabled." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FZ_A :: _1 ) } # [ 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 = "Default value for FPSCR.DN (Default NaN mode control bit).\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DN_A { # [ doc = "0: NaN operands propagate through to the output of a floating-point operation." ] _0 , # [ doc = "1: Any operation involving one or more NaNs returns the Default NaN." ] _1 } impl From < DN_A > for bool { # [ inline ( always ) ] fn from ( variant : DN_A ) -> Self { match variant { DN_A :: _0 => false , DN_A :: _1 => true } } } # [ doc = "Reader of field `DN`" ] pub type DN_R = crate :: R < bool , DN_A > ; impl DN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DN_A { match self . bits { false => DN_A :: _0 , true => DN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DN_A :: _1 } } # [ doc = "Write proxy for field `DN`" ] pub struct DN_W < 'a > { w : & 'a mut W , } impl < 'a > DN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "NaN operands propagate through to the output of a floating-point operation." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DN_A :: _0 ) } # [ doc = "Any operation involving one or more NaNs returns the Default NaN." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DN_A :: _1 ) } # [ 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 = "Default value for FPSCR.AHP (Alternative half-precision control bit).\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AHP_A { # [ doc = "0: IEEE half-precision format selected." ] _0 , # [ doc = "1: Alternative half-precision format selected." ] _1 } impl From < AHP_A > for bool { # [ inline ( always ) ] fn from ( variant : AHP_A ) -> Self { match variant { AHP_A :: _0 => false , AHP_A :: _1 => true } } } # [ doc = "Reader of field `AHP`" ] pub type AHP_R = crate :: R < bool , AHP_A > ; impl AHP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> AHP_A { match self . bits { false => AHP_A :: _0 , true => AHP_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AHP_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AHP_A :: _1 } } # [ doc = "Write proxy for field `AHP`" ] pub struct AHP_W < 'a > { w : & 'a mut W , } impl < 'a > AHP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : AHP_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "IEEE half-precision format selected." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( AHP_A :: _0 ) } # [ doc = "Alternative half-precision format selected." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( AHP_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bits 22:23 - Default value for FPSCR.RMode (Rounding Mode control field)." ] # [ inline ( always ) ] pub fn rmode ( & self ) -> RMODE_R { RMODE_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } # [ doc = "Bit 24 - Default value for FPSCR.FZ (Flush-to-zero mode control bit)." ] # [ inline ( always ) ] pub fn fz ( & self ) -> FZ_R { FZ_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Default value for FPSCR.DN (Default NaN mode control bit)." ] # [ inline ( always ) ] pub fn dn ( & self ) -> DN_R { DN_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Default value for FPSCR.AHP (Alternative half-precision control bit)." ] # [ inline ( always ) ] pub fn ahp ( & self ) -> AHP_R { AHP_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 22:23 - Default value for FPSCR.RMode (Rounding Mode control field)." ] # [ inline ( always ) ] pub fn rmode ( & mut self ) -> RMODE_W { RMODE_W { w : self } } # [ doc = "Bit 24 - Default value for FPSCR.FZ (Flush-to-zero mode control bit)." ] # [ inline ( always ) ] pub fn fz ( & mut self ) -> FZ_W { FZ_W { w : self } } # [ doc = "Bit 25 - Default value for FPSCR.DN (Default NaN mode control bit)." ] # [ inline ( always ) ] pub fn dn ( & mut self ) -> DN_W { DN_W { w : self } } # [ doc = "Bit 26 - Default value for FPSCR.AHP (Alternative half-precision control bit)." ] # [ inline ( always ) ] pub fn ahp ( & mut self ) -> AHP_W { AHP_W { w : self } } } } } # [ doc = "System timer" ] pub struct SYSTICK { _marker : PhantomData < * const ( ) > } unsafe impl Send for SYSTICK { } impl SYSTICK { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const sys_tick :: RegisterBlock { 0xe000_e010 as * const _ } } impl Deref for SYSTICK { type Target = sys_tick :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * SYSTICK :: ptr ( ) } } } # [ doc = "System timer" ] pub mod sys_tick { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - SysTick Control and Status Register" ] pub csr : CSR , # [ doc = "0x04 - SysTick Reload Value Register" ] pub rvr : RVR , # [ doc = "0x08 - SysTick Current Value Register" ] pub cvr : CVR , # [ doc = "0x0c - SysTick Calibration Value Register" ] pub calib : CALIB , } # [ doc = "SysTick Control and Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [csr](csr) module" ] pub type CSR = crate :: Reg < u32 , _CSR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CSR ; # [ doc = "`read()` method returns [csr::R](csr::R) reader structure" ] impl crate :: Readable for CSR { } # [ doc = "`write(|w| ..)` method takes [csr::W](csr::W) writer structure" ] impl crate :: Writable for CSR { } # [ doc = "SysTick Control and Status Register" ] pub mod csr { # [ doc = "Reader of register CSR" ] pub type R = crate :: R < u32 , super :: CSR > ; # [ doc = "Writer for register CSR" ] pub type W = crate :: W < u32 , super :: CSR > ; # [ doc = "Register CSR `reset()`'s with value 0x04" ] impl crate :: ResetValue for super :: CSR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x04 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLE_A { # [ doc = "0: counter disabled" ] _0 , # [ doc = "1: counter enabled" ] _1 } impl From < ENABLE_A > for bool { # [ inline ( always ) ] fn from ( variant : ENABLE_A ) -> Self { match variant { ENABLE_A :: _0 => false , ENABLE_A :: _1 => true } } } # [ doc = "Reader of field `ENABLE`" ] pub type ENABLE_R = crate :: R < bool , ENABLE_A > ; impl ENABLE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENABLE_A { match self . bits { false => ENABLE_A :: _0 , true => ENABLE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENABLE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENABLE_A :: _1 } } # [ doc = "Write proxy for field `ENABLE`" ] pub struct ENABLE_W < 'a > { w : & 'a mut W , } impl < 'a > ENABLE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENABLE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "counter disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENABLE_A :: _0 ) } # [ doc = "counter enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENABLE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TICKINT_A { # [ doc = "0: counting down to 0 does not assert the SysTick exception request" ] _0 , # [ doc = "1: counting down to 0 asserts the SysTick exception request" ] _1 } impl From < TICKINT_A > for bool { # [ inline ( always ) ] fn from ( variant : TICKINT_A ) -> Self { match variant { TICKINT_A :: _0 => false , TICKINT_A :: _1 => true } } } # [ doc = "Reader of field `TICKINT`" ] pub type TICKINT_R = crate :: R < bool , TICKINT_A > ; impl TICKINT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TICKINT_A { match self . bits { false => TICKINT_A :: _0 , true => TICKINT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TICKINT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TICKINT_A :: _1 } } # [ doc = "Write proxy for field `TICKINT`" ] pub struct TICKINT_W < 'a > { w : & 'a mut W , } impl < 'a > TICKINT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TICKINT_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "counting down to 0 does not assert the SysTick exception request" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TICKINT_A :: _0 ) } # [ doc = "counting down to 0 asserts the SysTick exception request" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TICKINT_A :: _1 ) } # [ 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 } } # [ doc = "no description available\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CLKSOURCE_A { # [ doc = "0: external clock" ] _0 , # [ doc = "1: processor clock" ] _1 } impl From < CLKSOURCE_A > for bool { # [ inline ( always ) ] fn from ( variant : CLKSOURCE_A ) -> Self { match variant { CLKSOURCE_A :: _0 => false , CLKSOURCE_A :: _1 => true } } } # [ doc = "Reader of field `CLKSOURCE`" ] pub type CLKSOURCE_R = crate :: R < bool , CLKSOURCE_A > ; impl CLKSOURCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CLKSOURCE_A { match self . bits { false => CLKSOURCE_A :: _0 , true => CLKSOURCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CLKSOURCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CLKSOURCE_A :: _1 } } # [ doc = "Write proxy for field `CLKSOURCE`" ] pub struct CLKSOURCE_W < 'a > { w : & 'a mut W , } impl < 'a > CLKSOURCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CLKSOURCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "external clock" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CLKSOURCE_A :: _0 ) } # [ doc = "processor clock" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CLKSOURCE_A :: _1 ) } # [ 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 = "Reader of field `COUNTFLAG`" ] pub type COUNTFLAG_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `COUNTFLAG`" ] pub struct COUNTFLAG_W < 'a > { w : & 'a mut W , } impl < 'a > COUNTFLAG_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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } impl R { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn enable ( & self ) -> ENABLE_R { ENABLE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn tickint ( & self ) -> TICKINT_R { TICKINT_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn clksource ( & self ) -> CLKSOURCE_R { CLKSOURCE_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - no description available" ] # [ inline ( always ) ] pub fn countflag ( & self ) -> COUNTFLAG_R { COUNTFLAG_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn enable ( & mut self ) -> ENABLE_W { ENABLE_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn tickint ( & mut self ) -> TICKINT_W { TICKINT_W { w : self } } # [ doc = "Bit 2 - no description available" ] # [ inline ( always ) ] pub fn clksource ( & mut self ) -> CLKSOURCE_W { CLKSOURCE_W { w : self } } # [ doc = "Bit 16 - no description available" ] # [ inline ( always ) ] pub fn countflag ( & mut self ) -> COUNTFLAG_W { COUNTFLAG_W { w : self } } } } # [ doc = "SysTick Reload Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rvr](rvr) module" ] pub type RVR = crate :: Reg < u32 , _RVR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _RVR ; # [ doc = "`read()` method returns [rvr::R](rvr::R) reader structure" ] impl crate :: Readable for RVR { } # [ doc = "`write(|w| ..)` method takes [rvr::W](rvr::W) writer structure" ] impl crate :: Writable for RVR { } # [ doc = "SysTick Reload Value Register" ] pub mod rvr { # [ doc = "Reader of register RVR" ] pub type R = crate :: R < u32 , super :: RVR > ; # [ doc = "Writer for register RVR" ] pub type W = crate :: W < u32 , super :: RVR > ; # [ doc = "Register RVR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: RVR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RELOAD`" ] pub type RELOAD_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `RELOAD`" ] pub struct RELOAD_W < 'a > { w : & 'a mut W , } impl < 'a > RELOAD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x00ff_ffff ) | ( ( value as u32 ) & 0x00ff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:23 - Value to load into the SysTick Current Value Register when the counter reaches 0" ] # [ inline ( always ) ] pub fn reload ( & self ) -> RELOAD_R { RELOAD_R :: new ( ( self . bits & 0x00ff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:23 - Value to load into the SysTick Current Value Register when the counter reaches 0" ] # [ inline ( always ) ] pub fn reload ( & mut self ) -> RELOAD_W { RELOAD_W { w : self } } } } # [ doc = "SysTick Current Value Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cvr](cvr) module" ] pub type CVR = crate :: Reg < u32 , _CVR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CVR ; # [ doc = "`read()` method returns [cvr::R](cvr::R) reader structure" ] impl crate :: Readable for CVR { } # [ doc = "`write(|w| ..)` method takes [cvr::W](cvr::W) writer structure" ] impl crate :: Writable for CVR { } # [ doc = "SysTick Current Value Register" ] pub mod cvr { # [ doc = "Reader of register CVR" ] pub type R = crate :: R < u32 , super :: CVR > ; # [ doc = "Writer for register CVR" ] pub type W = crate :: W < u32 , super :: CVR > ; # [ doc = "Register CVR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CVR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `CURRENT`" ] pub type CURRENT_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `CURRENT`" ] pub struct CURRENT_W < 'a > { w : & 'a mut W , } impl < 'a > CURRENT_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x00ff_ffff ) | ( ( value as u32 ) & 0x00ff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:23 - Current value at the time the register is accessed" ] # [ inline ( always ) ] pub fn current ( & self ) -> CURRENT_R { CURRENT_R :: new ( ( self . bits & 0x00ff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:23 - Current value at the time the register is accessed" ] # [ inline ( always ) ] pub fn current ( & mut self ) -> CURRENT_W { CURRENT_W { w : self } } } } # [ doc = "SysTick Calibration Value Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [calib](calib) module" ] pub type CALIB = crate :: Reg < u32 , _CALIB > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CALIB ; # [ doc = "`read()` method returns [calib::R](calib::R) reader structure" ] impl crate :: Readable for CALIB { } # [ doc = "SysTick Calibration Value Register" ] pub mod calib { # [ doc = "Reader of register CALIB" ] pub type R = crate :: R < u32 , super :: CALIB > ; # [ doc = "Reader of field `TENMS`" ] pub type TENMS_R = crate :: R < u32 , u32 > ; # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SKEW_A { # [ doc = "0: 10ms calibration value is exact" ] _0 , # [ doc = "1: 10ms calibration value is inexact, because of the clock frequency" ] _1 } impl From < SKEW_A > for bool { # [ inline ( always ) ] fn from ( variant : SKEW_A ) -> Self { match variant { SKEW_A :: _0 => false , SKEW_A :: _1 => true } } } # [ doc = "Reader of field `SKEW`" ] pub type SKEW_R = crate :: R < bool , SKEW_A > ; impl SKEW_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SKEW_A { match self . bits { false => SKEW_A :: _0 , true => SKEW_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == SKEW_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == SKEW_A :: _1 } } # [ doc = "no description available\n\nValue on reset: 1" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOREF_A { # [ doc = "0: The reference clock is provided" ] _0 , # [ doc = "1: The reference clock is not provided" ] _1 } impl From < NOREF_A > for bool { # [ inline ( always ) ] fn from ( variant : NOREF_A ) -> Self { match variant { NOREF_A :: _0 => false , NOREF_A :: _1 => true } } } # [ doc = "Reader of field `NOREF`" ] pub type NOREF_R = crate :: R < bool , NOREF_A > ; impl NOREF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NOREF_A { match self . bits { false => NOREF_A :: _0 , true => NOREF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NOREF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NOREF_A :: _1 } } impl R { # [ doc = "Bits 0:23 - Reload value to use for 10ms timing" ] # [ inline ( always ) ] pub fn tenms ( & self ) -> TENMS_R { TENMS_R :: new ( ( self . bits & 0x00ff_ffff ) as u32 ) } # [ doc = "Bit 30 - no description available" ] # [ inline ( always ) ] pub fn skew ( & self ) -> SKEW_R { SKEW_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - no description available" ] # [ inline ( always ) ] pub fn noref ( & self ) -> NOREF_R { NOREF_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } } # [ doc = "Core Platform Miscellaneous Control Module" ] pub struct MCM { _marker : PhantomData < * const ( ) > } unsafe impl Send for MCM { } impl MCM { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const mcm :: RegisterBlock { 0xe008_0000 as * const _ } } impl Deref for MCM { type Target = mcm :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * MCM :: ptr ( ) } } } # [ doc = "Core Platform Miscellaneous Control Module" ] pub mod mcm { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 8usize ] , # [ doc = "0x08 - Crossbar Switch (AXBS) Slave Configuration" ] pub plasc : PLASC , # [ doc = "0x0a - Crossbar Switch (AXBS) Master Configuration" ] pub plamc : PLAMC , # [ doc = "0x0c - Control Register" ] pub cr : CR , # [ doc = "0x10 - Interrupt Status Register" ] pub iscr : ISCR , # [ doc = "0x14 - ETB Counter Control register" ] pub etbcc : ETBCC , # [ doc = "0x18 - ETB Reload register" ] pub etbrl : ETBRL , # [ doc = "0x1c - ETB Counter Value register" ] pub etbcnt : ETBCNT , # [ doc = "0x20 - Fault address register" ] pub fadr : FADR , # [ doc = "0x24 - Fault attributes register" ] pub fatr : FATR , # [ doc = "0x28 - Fault data register" ] pub fdr : FDR , _reserved10 : [ u8 ; 4usize ] , # [ doc = "0x30 - Process ID register" ] pub pid : PID , _reserved11 : [ u8 ; 12usize ] , # [ doc = "0x40 - Compute Operation Control Register" ] pub cpo : CPO , } # [ doc = "Crossbar Switch (AXBS) Slave Configuration\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [plasc](plasc) module" ] pub type PLASC = crate :: Reg < u16 , _PLASC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PLASC ; # [ doc = "`read()` method returns [plasc::R](plasc::R) reader structure" ] impl crate :: Readable for PLASC { } # [ doc = "Crossbar Switch (AXBS) Slave Configuration" ] pub mod plasc { # [ doc = "Reader of register PLASC" ] pub type R = crate :: R < u16 , super :: PLASC > ; # [ doc = "Each bit in the ASC field indicates whether there is a corresponding connection to the crossbar switch's slave input port.\n\nValue on reset: 31" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ASC_A { # [ doc = "0: A bus slave connection to AXBS input port n is absent" ] _0 , # [ doc = "1: A bus slave connection to AXBS input port n is present" ] _1 } impl From < ASC_A > for u8 { # [ inline ( always ) ] fn from ( variant : ASC_A ) -> Self { match variant { ASC_A :: _0 => 0 , ASC_A :: _1 => 1 } } } # [ doc = "Reader of field `ASC`" ] pub type ASC_R = crate :: R < u8 , ASC_A > ; impl ASC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , ASC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( ASC_A :: _0 ) , 1 => Val ( ASC_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ASC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ASC_A :: _1 } } impl R { # [ doc = "Bits 0:7 - Each bit in the ASC field indicates whether there is a corresponding connection to the crossbar switch's slave input port." ] # [ inline ( always ) ] pub fn asc ( & self ) -> ASC_R { ASC_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Crossbar Switch (AXBS) Master Configuration\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [plamc](plamc) module" ] pub type PLAMC = crate :: Reg < u16 , _PLAMC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PLAMC ; # [ doc = "`read()` method returns [plamc::R](plamc::R) reader structure" ] impl crate :: Readable for PLAMC { } # [ doc = "Crossbar Switch (AXBS) Master Configuration" ] pub mod plamc { # [ doc = "Reader of register PLAMC" ] pub type R = crate :: R < u16 , super :: PLAMC > ; # [ doc = "Each bit in the AMC field indicates whether there is a corresponding connection to the AXBS master input port.\n\nValue on reset: 127" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AMC_A { # [ doc = "0: A bus master connection to AXBS input port n is absent" ] _0 , # [ doc = "1: A bus master connection to AXBS input port n is present" ] _1 } impl From < AMC_A > for u8 { # [ inline ( always ) ] fn from ( variant : AMC_A ) -> Self { match variant { AMC_A :: _0 => 0 , AMC_A :: _1 => 1 } } } # [ doc = "Reader of field `AMC`" ] pub type AMC_R = crate :: R < u8 , AMC_A > ; impl AMC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , AMC_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( AMC_A :: _0 ) , 1 => Val ( AMC_A :: _1 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == AMC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == AMC_A :: _1 } } impl R { # [ doc = "Bits 0:7 - Each bit in the AMC field indicates whether there is a corresponding connection to the AXBS master input port." ] # [ inline ( always ) ] pub fn amc ( & self ) -> AMC_R { AMC_R :: new ( ( self . bits & 0xff ) as u8 ) } } } # [ doc = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cr](cr) module" ] pub type CR = crate :: Reg < u32 , _CR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CR ; # [ doc = "`read()` method returns [cr::R](cr::R) reader structure" ] impl crate :: Readable for CR { } # [ doc = "`write(|w| ..)` method takes [cr::W](cr::W) writer structure" ] impl crate :: Writable for CR { } # [ doc = "Control Register" ] pub mod cr { # [ doc = "Reader of register CR" ] pub type R = crate :: R < u32 , super :: CR > ; # [ doc = "Writer for register CR" ] pub type W = crate :: W < u32 , super :: CR > ; # [ doc = "Register CR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "SRAM_U arbitration priority\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRAMUAP_A { # [ doc = "0: Round robin" ] _00 , # [ doc = "1: Special round robin (favors SRAM backoor accesses over the processor)" ] _01 , # [ doc = "2: Fixed priority. Processor has highest, backdoor has lowest" ] _10 , # [ doc = "3: Fixed priority. Backdoor has highest, processor has lowest" ] _11 } impl From < SRAMUAP_A > for u8 { # [ inline ( always ) ] fn from ( variant : SRAMUAP_A ) -> Self { match variant { SRAMUAP_A :: _00 => 0 , SRAMUAP_A :: _01 => 1 , SRAMUAP_A :: _10 => 2 , SRAMUAP_A :: _11 => 3 } } } # [ doc = "Reader of field `SRAMUAP`" ] pub type SRAMUAP_R = crate :: R < u8 , SRAMUAP_A > ; impl SRAMUAP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRAMUAP_A { match self . bits { 0 => SRAMUAP_A :: _00 , 1 => SRAMUAP_A :: _01 , 2 => SRAMUAP_A :: _10 , 3 => SRAMUAP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SRAMUAP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SRAMUAP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SRAMUAP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SRAMUAP_A :: _11 } } # [ doc = "Write proxy for field `SRAMUAP`" ] pub struct SRAMUAP_W < 'a > { w : & 'a mut W , } impl < 'a > SRAMUAP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRAMUAP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Round robin" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( SRAMUAP_A :: _00 ) } # [ doc = "Special round robin (favors SRAM backoor accesses over the processor)" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( SRAMUAP_A :: _01 ) } # [ doc = "Fixed priority. Processor has highest, backdoor has lowest" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SRAMUAP_A :: _10 ) } # [ doc = "Fixed priority. Backdoor has highest, processor has lowest" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( SRAMUAP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 24 ) ) | ( ( ( value as u32 ) & 0x03 ) << 24 ) ; self . w } } # [ doc = "Reader of field `SRAMUWP`" ] pub type SRAMUWP_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRAMUWP`" ] pub struct SRAMUWP_W < 'a > { w : & 'a mut W , } impl < 'a > SRAMUWP_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 = "SRAM_L arbitration priority\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRAMLAP_A { # [ doc = "0: Round robin" ] _00 , # [ doc = "1: Special round robin (favors SRAM backoor accesses over the processor)" ] _01 , # [ doc = "2: Fixed priority. Processor has highest, backdoor has lowest" ] _10 , # [ doc = "3: Fixed priority. Backdoor has highest, processor has lowest" ] _11 } impl From < SRAMLAP_A > for u8 { # [ inline ( always ) ] fn from ( variant : SRAMLAP_A ) -> Self { match variant { SRAMLAP_A :: _00 => 0 , SRAMLAP_A :: _01 => 1 , SRAMLAP_A :: _10 => 2 , SRAMLAP_A :: _11 => 3 } } } # [ doc = "Reader of field `SRAMLAP`" ] pub type SRAMLAP_R = crate :: R < u8 , SRAMLAP_A > ; impl SRAMLAP_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> SRAMLAP_A { match self . bits { 0 => SRAMLAP_A :: _00 , 1 => SRAMLAP_A :: _01 , 2 => SRAMLAP_A :: _10 , 3 => SRAMLAP_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == SRAMLAP_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == SRAMLAP_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == SRAMLAP_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == SRAMLAP_A :: _11 } } # [ doc = "Write proxy for field `SRAMLAP`" ] pub struct SRAMLAP_W < 'a > { w : & 'a mut W , } impl < 'a > SRAMLAP_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : SRAMLAP_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Round robin" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( SRAMLAP_A :: _00 ) } # [ doc = "Special round robin (favors SRAM backoor accesses over the processor)" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( SRAMLAP_A :: _01 ) } # [ doc = "Fixed priority. Processor has highest, backdoor has lowest" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( SRAMLAP_A :: _10 ) } # [ doc = "Fixed priority. Backdoor has highest, processor has lowest" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( SRAMLAP_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 28 ) ) | ( ( ( value as u32 ) & 0x03 ) << 28 ) ; self . w } } # [ doc = "Reader of field `SRAMLWP`" ] pub type SRAMLWP_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `SRAMLWP`" ] pub struct SRAMLWP_W < 'a > { w : & 'a mut W , } impl < 'a > SRAMLWP_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 << 30 ) ) | ( ( ( value as u32 ) & 0x01 ) << 30 ) ; self . w } } impl R { # [ doc = "Bits 24:25 - SRAM_U arbitration priority" ] # [ inline ( always ) ] pub fn sramuap ( & self ) -> SRAMUAP_R { SRAMUAP_R :: new ( ( ( self . bits >> 24 ) & 0x03 ) as u8 ) } # [ doc = "Bit 26 - SRAM_U write protect" ] # [ inline ( always ) ] pub fn sramuwp ( & self ) -> SRAMUWP_R { SRAMUWP_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:29 - SRAM_L arbitration priority" ] # [ inline ( always ) ] pub fn sramlap ( & self ) -> SRAMLAP_R { SRAMLAP_R :: new ( ( ( self . bits >> 28 ) & 0x03 ) as u8 ) } # [ doc = "Bit 30 - SRAM_L Write Protect" ] # [ inline ( always ) ] pub fn sramlwp ( & self ) -> SRAMLWP_R { SRAMLWP_R :: new ( ( ( self . bits >> 30 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bits 24:25 - SRAM_U arbitration priority" ] # [ inline ( always ) ] pub fn sramuap ( & mut self ) -> SRAMUAP_W { SRAMUAP_W { w : self } } # [ doc = "Bit 26 - SRAM_U write protect" ] # [ inline ( always ) ] pub fn sramuwp ( & mut self ) -> SRAMUWP_W { SRAMUWP_W { w : self } } # [ doc = "Bits 28:29 - SRAM_L arbitration priority" ] # [ inline ( always ) ] pub fn sramlap ( & mut self ) -> SRAMLAP_W { SRAMLAP_W { w : self } } # [ doc = "Bit 30 - SRAM_L Write Protect" ] # [ inline ( always ) ] pub fn sramlwp ( & mut self ) -> SRAMLWP_W { SRAMLWP_W { w : self } } } } # [ doc = "Interrupt Status Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [iscr](iscr) module" ] pub type ISCR = crate :: Reg < u32 , _ISCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ISCR ; # [ doc = "`read()` method returns [iscr::R](iscr::R) reader structure" ] impl crate :: Readable for ISCR { } # [ doc = "`write(|w| ..)` method takes [iscr::W](iscr::W) writer structure" ] impl crate :: Writable for ISCR { } # [ doc = "Interrupt Status Register" ] pub mod iscr { # [ doc = "Reader of register ISCR" ] pub type R = crate :: R < u32 , super :: ISCR > ; # [ doc = "Writer for register ISCR" ] pub type W = crate :: W < u32 , super :: ISCR > ; # [ doc = "Register ISCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ISCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Normal Interrupt Pending\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IRQ_A { # [ doc = "0: No pending interrupt" ] _0 , # [ doc = "1: Due to the ETB counter expiring, a normal interrupt is pending" ] _1 } impl From < IRQ_A > for bool { # [ inline ( always ) ] fn from ( variant : IRQ_A ) -> Self { match variant { IRQ_A :: _0 => false , IRQ_A :: _1 => true } } } # [ doc = "Reader of field `IRQ`" ] pub type IRQ_R = crate :: R < bool , IRQ_A > ; impl IRQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IRQ_A { match self . bits { false => IRQ_A :: _0 , true => IRQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IRQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IRQ_A :: _1 } } # [ doc = "Write proxy for field `IRQ`" ] pub struct IRQ_W < 'a > { w : & 'a mut W , } impl < 'a > IRQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IRQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No pending interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IRQ_A :: _0 ) } # [ doc = "Due to the ETB counter expiring, a normal interrupt is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IRQ_A :: _1 ) } # [ 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 } } # [ doc = "Non-maskable Interrupt Pending\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NMI_A { # [ doc = "0: No pending NMI" ] _0 , # [ doc = "1: Due to the ETB counter expiring, an NMI is pending" ] _1 } impl From < NMI_A > for bool { # [ inline ( always ) ] fn from ( variant : NMI_A ) -> Self { match variant { NMI_A :: _0 => false , NMI_A :: _1 => true } } } # [ doc = "Reader of field `NMI`" ] pub type NMI_R = crate :: R < bool , NMI_A > ; impl NMI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> NMI_A { match self . bits { false => NMI_A :: _0 , true => NMI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == NMI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == NMI_A :: _1 } } # [ doc = "Write proxy for field `NMI`" ] pub struct NMI_W < 'a > { w : & 'a mut W , } impl < 'a > NMI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : NMI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No pending NMI" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( NMI_A :: _0 ) } # [ doc = "Due to the ETB counter expiring, an NMI is pending" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( NMI_A :: _1 ) } # [ 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 = "Debug Halt Request Indicator\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DHREQ_A { # [ doc = "0: No debug halt request" ] _0 , # [ doc = "1: Debug halt request initiated" ] _1 } impl From < DHREQ_A > for bool { # [ inline ( always ) ] fn from ( variant : DHREQ_A ) -> Self { match variant { DHREQ_A :: _0 => false , DHREQ_A :: _1 => true } } } # [ doc = "Reader of field `DHREQ`" ] pub type DHREQ_R = crate :: R < bool , DHREQ_A > ; impl DHREQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DHREQ_A { match self . bits { false => DHREQ_A :: _0 , true => DHREQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DHREQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DHREQ_A :: _1 } } # [ doc = "FPU invalid operation interrupt status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIOC_A { # [ doc = "0: No interrupt" ] _0 , # [ doc = "1: Interrupt occurred" ] _1 } impl From < FIOC_A > for bool { # [ inline ( always ) ] fn from ( variant : FIOC_A ) -> Self { match variant { FIOC_A :: _0 => false , FIOC_A :: _1 => true } } } # [ doc = "Reader of field `FIOC`" ] pub type FIOC_R = crate :: R < bool , FIOC_A > ; impl FIOC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FIOC_A { match self . bits { false => FIOC_A :: _0 , true => FIOC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FIOC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FIOC_A :: _1 } } # [ doc = "FPU divide-by-zero interrupt status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FDZC_A { # [ doc = "0: No interrupt" ] _0 , # [ doc = "1: Interrupt occurred" ] _1 } impl From < FDZC_A > for bool { # [ inline ( always ) ] fn from ( variant : FDZC_A ) -> Self { match variant { FDZC_A :: _0 => false , FDZC_A :: _1 => true } } } # [ doc = "Reader of field `FDZC`" ] pub type FDZC_R = crate :: R < bool , FDZC_A > ; impl FDZC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FDZC_A { match self . bits { false => FDZC_A :: _0 , true => FDZC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FDZC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FDZC_A :: _1 } } # [ doc = "FPU overflow interrupt status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FOFC_A { # [ doc = "0: No interrupt" ] _0 , # [ doc = "1: Interrupt occurred" ] _1 } impl From < FOFC_A > for bool { # [ inline ( always ) ] fn from ( variant : FOFC_A ) -> Self { match variant { FOFC_A :: _0 => false , FOFC_A :: _1 => true } } } # [ doc = "Reader of field `FOFC`" ] pub type FOFC_R = crate :: R < bool , FOFC_A > ; impl FOFC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FOFC_A { match self . bits { false => FOFC_A :: _0 , true => FOFC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FOFC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FOFC_A :: _1 } } # [ doc = "FPU underflow interrupt status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FUFC_A { # [ doc = "0: No interrupt" ] _0 , # [ doc = "1: Interrupt occurred" ] _1 } impl From < FUFC_A > for bool { # [ inline ( always ) ] fn from ( variant : FUFC_A ) -> Self { match variant { FUFC_A :: _0 => false , FUFC_A :: _1 => true } } } # [ doc = "Reader of field `FUFC`" ] pub type FUFC_R = crate :: R < bool , FUFC_A > ; impl FUFC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FUFC_A { match self . bits { false => FUFC_A :: _0 , true => FUFC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FUFC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FUFC_A :: _1 } } # [ doc = "FPU inexact interrupt status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIXC_A { # [ doc = "0: No interrupt" ] _0 , # [ doc = "1: Interrupt occurred" ] _1 } impl From < FIXC_A > for bool { # [ inline ( always ) ] fn from ( variant : FIXC_A ) -> Self { match variant { FIXC_A :: _0 => false , FIXC_A :: _1 => true } } } # [ doc = "Reader of field `FIXC`" ] pub type FIXC_R = crate :: R < bool , FIXC_A > ; impl FIXC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FIXC_A { match self . bits { false => FIXC_A :: _0 , true => FIXC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FIXC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FIXC_A :: _1 } } # [ doc = "FPU input denormal interrupt status\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIDC_A { # [ doc = "0: No interrupt" ] _0 , # [ doc = "1: Interrupt occurred" ] _1 } impl From < FIDC_A > for bool { # [ inline ( always ) ] fn from ( variant : FIDC_A ) -> Self { match variant { FIDC_A :: _0 => false , FIDC_A :: _1 => true } } } # [ doc = "Reader of field `FIDC`" ] pub type FIDC_R = crate :: R < bool , FIDC_A > ; impl FIDC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FIDC_A { match self . bits { false => FIDC_A :: _0 , true => FIDC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FIDC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FIDC_A :: _1 } } # [ doc = "FPU invalid operation interrupt enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIOCE_A { # [ doc = "0: Disable interrupt" ] _0 , # [ doc = "1: Enable interrupt" ] _1 } impl From < FIOCE_A > for bool { # [ inline ( always ) ] fn from ( variant : FIOCE_A ) -> Self { match variant { FIOCE_A :: _0 => false , FIOCE_A :: _1 => true } } } # [ doc = "Reader of field `FIOCE`" ] pub type FIOCE_R = crate :: R < bool , FIOCE_A > ; impl FIOCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FIOCE_A { match self . bits { false => FIOCE_A :: _0 , true => FIOCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FIOCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FIOCE_A :: _1 } } # [ doc = "Write proxy for field `FIOCE`" ] pub struct FIOCE_W < 'a > { w : & 'a mut W , } impl < 'a > FIOCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FIOCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FIOCE_A :: _0 ) } # [ doc = "Enable interrupt" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FIOCE_A :: _1 ) } # [ 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 = "FPU divide-by-zero interrupt enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FDZCE_A { # [ doc = "0: Disable interrupt" ] _0 , # [ doc = "1: Enable interrupt" ] _1 } impl From < FDZCE_A > for bool { # [ inline ( always ) ] fn from ( variant : FDZCE_A ) -> Self { match variant { FDZCE_A :: _0 => false , FDZCE_A :: _1 => true } } } # [ doc = "Reader of field `FDZCE`" ] pub type FDZCE_R = crate :: R < bool , FDZCE_A > ; impl FDZCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FDZCE_A { match self . bits { false => FDZCE_A :: _0 , true => FDZCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FDZCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FDZCE_A :: _1 } } # [ doc = "Write proxy for field `FDZCE`" ] pub struct FDZCE_W < 'a > { w : & 'a mut W , } impl < 'a > FDZCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FDZCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FDZCE_A :: _0 ) } # [ doc = "Enable interrupt" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FDZCE_A :: _1 ) } # [ 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 = "FPU overflow interrupt enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FOFCE_A { # [ doc = "0: Disable interrupt" ] _0 , # [ doc = "1: Enable interrupt" ] _1 } impl From < FOFCE_A > for bool { # [ inline ( always ) ] fn from ( variant : FOFCE_A ) -> Self { match variant { FOFCE_A :: _0 => false , FOFCE_A :: _1 => true } } } # [ doc = "Reader of field `FOFCE`" ] pub type FOFCE_R = crate :: R < bool , FOFCE_A > ; impl FOFCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FOFCE_A { match self . bits { false => FOFCE_A :: _0 , true => FOFCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FOFCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FOFCE_A :: _1 } } # [ doc = "Write proxy for field `FOFCE`" ] pub struct FOFCE_W < 'a > { w : & 'a mut W , } impl < 'a > FOFCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FOFCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FOFCE_A :: _0 ) } # [ doc = "Enable interrupt" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FOFCE_A :: _1 ) } # [ 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 = "FPU underflow interrupt enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FUFCE_A { # [ doc = "0: Disable interrupt" ] _0 , # [ doc = "1: Enable interrupt" ] _1 } impl From < FUFCE_A > for bool { # [ inline ( always ) ] fn from ( variant : FUFCE_A ) -> Self { match variant { FUFCE_A :: _0 => false , FUFCE_A :: _1 => true } } } # [ doc = "Reader of field `FUFCE`" ] pub type FUFCE_R = crate :: R < bool , FUFCE_A > ; impl FUFCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FUFCE_A { match self . bits { false => FUFCE_A :: _0 , true => FUFCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FUFCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FUFCE_A :: _1 } } # [ doc = "Write proxy for field `FUFCE`" ] pub struct FUFCE_W < 'a > { w : & 'a mut W , } impl < 'a > FUFCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FUFCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FUFCE_A :: _0 ) } # [ doc = "Enable interrupt" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FUFCE_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "FPU inexact interrupt enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIXCE_A { # [ doc = "0: Disable interrupt" ] _0 , # [ doc = "1: Enable interrupt" ] _1 } impl From < FIXCE_A > for bool { # [ inline ( always ) ] fn from ( variant : FIXCE_A ) -> Self { match variant { FIXCE_A :: _0 => false , FIXCE_A :: _1 => true } } } # [ doc = "Reader of field `FIXCE`" ] pub type FIXCE_R = crate :: R < bool , FIXCE_A > ; impl FIXCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FIXCE_A { match self . bits { false => FIXCE_A :: _0 , true => FIXCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FIXCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FIXCE_A :: _1 } } # [ doc = "Write proxy for field `FIXCE`" ] pub struct FIXCE_W < 'a > { w : & 'a mut W , } impl < 'a > FIXCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FIXCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FIXCE_A :: _0 ) } # [ doc = "Enable interrupt" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FIXCE_A :: _1 ) } # [ 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 << 28 ) ) | ( ( ( value as u32 ) & 0x01 ) << 28 ) ; self . w } } # [ doc = "FPU input denormal interrupt enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIDCE_A { # [ doc = "0: Disable interrupt" ] _0 , # [ doc = "1: Enable interrupt" ] _1 } impl From < FIDCE_A > for bool { # [ inline ( always ) ] fn from ( variant : FIDCE_A ) -> Self { match variant { FIDCE_A :: _0 => false , FIDCE_A :: _1 => true } } } # [ doc = "Reader of field `FIDCE`" ] pub type FIDCE_R = crate :: R < bool , FIDCE_A > ; impl FIDCE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> FIDCE_A { match self . bits { false => FIDCE_A :: _0 , true => FIDCE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == FIDCE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == FIDCE_A :: _1 } } # [ doc = "Write proxy for field `FIDCE`" ] pub struct FIDCE_W < 'a > { w : & 'a mut W , } impl < 'a > FIDCE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : FIDCE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Disable interrupt" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( FIDCE_A :: _0 ) } # [ doc = "Enable interrupt" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( FIDCE_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 1 - Normal Interrupt Pending" ] # [ inline ( always ) ] pub fn irq ( & self ) -> IRQ_R { IRQ_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Non-maskable Interrupt Pending" ] # [ inline ( always ) ] pub fn nmi ( & self ) -> NMI_R { NMI_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Debug Halt Request Indicator" ] # [ inline ( always ) ] pub fn dhreq ( & self ) -> DHREQ_R { DHREQ_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 8 - FPU invalid operation interrupt status" ] # [ inline ( always ) ] pub fn fioc ( & self ) -> FIOC_R { FIOC_R :: new ( ( ( self . bits >> 8 ) & 0x01 ) != 0 ) } # [ doc = "Bit 9 - FPU divide-by-zero interrupt status" ] # [ inline ( always ) ] pub fn fdzc ( & self ) -> FDZC_R { FDZC_R :: new ( ( ( self . bits >> 9 ) & 0x01 ) != 0 ) } # [ doc = "Bit 10 - FPU overflow interrupt status" ] # [ inline ( always ) ] pub fn fofc ( & self ) -> FOFC_R { FOFC_R :: new ( ( ( self . bits >> 10 ) & 0x01 ) != 0 ) } # [ doc = "Bit 11 - FPU underflow interrupt status" ] # [ inline ( always ) ] pub fn fufc ( & self ) -> FUFC_R { FUFC_R :: new ( ( ( self . bits >> 11 ) & 0x01 ) != 0 ) } # [ doc = "Bit 12 - FPU inexact interrupt status" ] # [ inline ( always ) ] pub fn fixc ( & self ) -> FIXC_R { FIXC_R :: new ( ( ( self . bits >> 12 ) & 0x01 ) != 0 ) } # [ doc = "Bit 15 - FPU input denormal interrupt status" ] # [ inline ( always ) ] pub fn fidc ( & self ) -> FIDC_R { FIDC_R :: new ( ( ( self . bits >> 15 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - FPU invalid operation interrupt enable" ] # [ inline ( always ) ] pub fn fioce ( & self ) -> FIOCE_R { FIOCE_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - FPU divide-by-zero interrupt enable" ] # [ inline ( always ) ] pub fn fdzce ( & self ) -> FDZCE_R { FDZCE_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - FPU overflow interrupt enable" ] # [ inline ( always ) ] pub fn fofce ( & self ) -> FOFCE_R { FOFCE_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - FPU underflow interrupt enable" ] # [ inline ( always ) ] pub fn fufce ( & self ) -> FUFCE_R { FUFCE_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 28 - FPU inexact interrupt enable" ] # [ inline ( always ) ] pub fn fixce ( & self ) -> FIXCE_R { FIXCE_R :: new ( ( ( self . bits >> 28 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - FPU input denormal interrupt enable" ] # [ inline ( always ) ] pub fn fidce ( & self ) -> FIDCE_R { FIDCE_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 1 - Normal Interrupt Pending" ] # [ inline ( always ) ] pub fn irq ( & mut self ) -> IRQ_W { IRQ_W { w : self } } # [ doc = "Bit 2 - Non-maskable Interrupt Pending" ] # [ inline ( always ) ] pub fn nmi ( & mut self ) -> NMI_W { NMI_W { w : self } } # [ doc = "Bit 24 - FPU invalid operation interrupt enable" ] # [ inline ( always ) ] pub fn fioce ( & mut self ) -> FIOCE_W { FIOCE_W { w : self } } # [ doc = "Bit 25 - FPU divide-by-zero interrupt enable" ] # [ inline ( always ) ] pub fn fdzce ( & mut self ) -> FDZCE_W { FDZCE_W { w : self } } # [ doc = "Bit 26 - FPU overflow interrupt enable" ] # [ inline ( always ) ] pub fn fofce ( & mut self ) -> FOFCE_W { FOFCE_W { w : self } } # [ doc = "Bit 27 - FPU underflow interrupt enable" ] # [ inline ( always ) ] pub fn fufce ( & mut self ) -> FUFCE_W { FUFCE_W { w : self } } # [ doc = "Bit 28 - FPU inexact interrupt enable" ] # [ inline ( always ) ] pub fn fixce ( & mut self ) -> FIXCE_W { FIXCE_W { w : self } } # [ doc = "Bit 31 - FPU input denormal interrupt enable" ] # [ inline ( always ) ] pub fn fidce ( & mut self ) -> FIDCE_W { FIDCE_W { w : self } } } } # [ doc = "ETB Counter Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [etbcc](etbcc) module" ] pub type ETBCC = crate :: Reg < u32 , _ETBCC > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ETBCC ; # [ doc = "`read()` method returns [etbcc::R](etbcc::R) reader structure" ] impl crate :: Readable for ETBCC { } # [ doc = "`write(|w| ..)` method takes [etbcc::W](etbcc::W) writer structure" ] impl crate :: Writable for ETBCC { } # [ doc = "ETB Counter Control register" ] pub mod etbcc { # [ doc = "Reader of register ETBCC" ] pub type R = crate :: R < u32 , super :: ETBCC > ; # [ doc = "Writer for register ETBCC" ] pub type W = crate :: W < u32 , super :: ETBCC > ; # [ doc = "Register ETBCC `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ETBCC { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Counter Enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTEN_A { # [ doc = "0: ETB counter disabled" ] _0 , # [ doc = "1: ETB counter enabled" ] _1 } impl From < CNTEN_A > for bool { # [ inline ( always ) ] fn from ( variant : CNTEN_A ) -> Self { match variant { CNTEN_A :: _0 => false , CNTEN_A :: _1 => true } } } # [ doc = "Reader of field `CNTEN`" ] pub type CNTEN_R = crate :: R < bool , CNTEN_A > ; impl CNTEN_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CNTEN_A { match self . bits { false => CNTEN_A :: _0 , true => CNTEN_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CNTEN_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CNTEN_A :: _1 } } # [ doc = "Write proxy for field `CNTEN`" ] pub struct CNTEN_W < 'a > { w : & 'a mut W , } impl < 'a > CNTEN_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CNTEN_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "ETB counter disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CNTEN_A :: _0 ) } # [ doc = "ETB counter enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CNTEN_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Response Type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSPT_A { # [ doc = "0: No response when the ETB count expires" ] _00 , # [ doc = "1: Generate a normal interrupt when the ETB count expires" ] _01 , # [ doc = "2: Generate an NMI when the ETB count expires" ] _10 , # [ doc = "3: Generate a debug halt when the ETB count expires" ] _11 } impl From < RSPT_A > for u8 { # [ inline ( always ) ] fn from ( variant : RSPT_A ) -> Self { match variant { RSPT_A :: _00 => 0 , RSPT_A :: _01 => 1 , RSPT_A :: _10 => 2 , RSPT_A :: _11 => 3 } } } # [ doc = "Reader of field `RSPT`" ] pub type RSPT_R = crate :: R < u8 , RSPT_A > ; impl RSPT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RSPT_A { match self . bits { 0 => RSPT_A :: _00 , 1 => RSPT_A :: _01 , 2 => RSPT_A :: _10 , 3 => RSPT_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == RSPT_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == RSPT_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == RSPT_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == RSPT_A :: _11 } } # [ doc = "Write proxy for field `RSPT`" ] pub struct RSPT_W < 'a > { w : & 'a mut W , } impl < 'a > RSPT_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RSPT_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "No response when the ETB count expires" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( RSPT_A :: _00 ) } # [ doc = "Generate a normal interrupt when the ETB count expires" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( RSPT_A :: _01 ) } # [ doc = "Generate an NMI when the ETB count expires" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( RSPT_A :: _10 ) } # [ doc = "Generate a debug halt when the ETB count expires" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( RSPT_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 1 ) ) | ( ( ( value as u32 ) & 0x03 ) << 1 ) ; self . w } } # [ doc = "Reload Request\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RLRQ_A { # [ doc = "0: No effect" ] _0 , # [ doc = "1: Clears pending debug halt, NMI, or IRQ interrupt requests" ] _1 } impl From < RLRQ_A > for bool { # [ inline ( always ) ] fn from ( variant : RLRQ_A ) -> Self { match variant { RLRQ_A :: _0 => false , RLRQ_A :: _1 => true } } } # [ doc = "Reader of field `RLRQ`" ] pub type RLRQ_R = crate :: R < bool , RLRQ_A > ; impl RLRQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> RLRQ_A { match self . bits { false => RLRQ_A :: _0 , true => RLRQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == RLRQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == RLRQ_A :: _1 } } # [ doc = "Write proxy for field `RLRQ`" ] pub struct RLRQ_W < 'a > { w : & 'a mut W , } impl < 'a > RLRQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : RLRQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( RLRQ_A :: _0 ) } # [ doc = "Clears pending debug halt, NMI, or IRQ interrupt requests" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( RLRQ_A :: _1 ) } # [ 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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "ETM-To-TPIU Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ETDIS_A { # [ doc = "0: ETM-to-TPIU trace path enabled" ] _0 , # [ doc = "1: ETM-to-TPIU trace path disabled" ] _1 } impl From < ETDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : ETDIS_A ) -> Self { match variant { ETDIS_A :: _0 => false , ETDIS_A :: _1 => true } } } # [ doc = "Reader of field `ETDIS`" ] pub type ETDIS_R = crate :: R < bool , ETDIS_A > ; impl ETDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ETDIS_A { match self . bits { false => ETDIS_A :: _0 , true => ETDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ETDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ETDIS_A :: _1 } } # [ doc = "Write proxy for field `ETDIS`" ] pub struct ETDIS_W < 'a > { w : & 'a mut W , } impl < 'a > ETDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ETDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "ETM-to-TPIU trace path enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ETDIS_A :: _0 ) } # [ doc = "ETM-to-TPIU trace path disabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ETDIS_A :: _1 ) } # [ 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 << 4 ) ) | ( ( ( value as u32 ) & 0x01 ) << 4 ) ; self . w } } # [ doc = "ITM-To-TPIU Disable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ITDIS_A { # [ doc = "0: ITM-to-TPIU trace path enabled" ] _0 , # [ doc = "1: ITM-to-TPIU trace path disabled" ] _1 } impl From < ITDIS_A > for bool { # [ inline ( always ) ] fn from ( variant : ITDIS_A ) -> Self { match variant { ITDIS_A :: _0 => false , ITDIS_A :: _1 => true } } } # [ doc = "Reader of field `ITDIS`" ] pub type ITDIS_R = crate :: R < bool , ITDIS_A > ; impl ITDIS_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ITDIS_A { match self . bits { false => ITDIS_A :: _0 , true => ITDIS_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ITDIS_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ITDIS_A :: _1 } } # [ doc = "Write proxy for field `ITDIS`" ] pub struct ITDIS_W < 'a > { w : & 'a mut W , } impl < 'a > ITDIS_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ITDIS_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "ITM-to-TPIU trace path enabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ITDIS_A :: _0 ) } # [ doc = "ITM-to-TPIU trace path disabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ITDIS_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Counter Enable" ] # [ inline ( always ) ] pub fn cnten ( & self ) -> CNTEN_R { CNTEN_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 1:2 - Response Type" ] # [ inline ( always ) ] pub fn rspt ( & self ) -> RSPT_R { RSPT_R :: new ( ( ( self . bits >> 1 ) & 0x03 ) as u8 ) } # [ doc = "Bit 3 - Reload Request" ] # [ inline ( always ) ] pub fn rlrq ( & self ) -> RLRQ_R { RLRQ_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 4 - ETM-To-TPIU Disable" ] # [ inline ( always ) ] pub fn etdis ( & self ) -> ETDIS_R { ETDIS_R :: new ( ( ( self . bits >> 4 ) & 0x01 ) != 0 ) } # [ doc = "Bit 5 - ITM-To-TPIU Disable" ] # [ inline ( always ) ] pub fn itdis ( & self ) -> ITDIS_R { ITDIS_R :: new ( ( ( self . bits >> 5 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Counter Enable" ] # [ inline ( always ) ] pub fn cnten ( & mut self ) -> CNTEN_W { CNTEN_W { w : self } } # [ doc = "Bits 1:2 - Response Type" ] # [ inline ( always ) ] pub fn rspt ( & mut self ) -> RSPT_W { RSPT_W { w : self } } # [ doc = "Bit 3 - Reload Request" ] # [ inline ( always ) ] pub fn rlrq ( & mut self ) -> RLRQ_W { RLRQ_W { w : self } } # [ doc = "Bit 4 - ETM-To-TPIU Disable" ] # [ inline ( always ) ] pub fn etdis ( & mut self ) -> ETDIS_W { ETDIS_W { w : self } } # [ doc = "Bit 5 - ITM-To-TPIU Disable" ] # [ inline ( always ) ] pub fn itdis ( & mut self ) -> ITDIS_W { ITDIS_W { w : self } } } } # [ doc = "ETB Reload register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [etbrl](etbrl) module" ] pub type ETBRL = crate :: Reg < u32 , _ETBRL > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ETBRL ; # [ doc = "`read()` method returns [etbrl::R](etbrl::R) reader structure" ] impl crate :: Readable for ETBRL { } # [ doc = "`write(|w| ..)` method takes [etbrl::W](etbrl::W) writer structure" ] impl crate :: Writable for ETBRL { } # [ doc = "ETB Reload register" ] pub mod etbrl { # [ doc = "Reader of register ETBRL" ] pub type R = crate :: R < u32 , super :: ETBRL > ; # [ doc = "Writer for register ETBRL" ] pub type W = crate :: W < u32 , super :: ETBRL > ; # [ doc = "Register ETBRL `reset()`'s with value 0" ] impl crate :: ResetValue for super :: ETBRL { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `RELOAD`" ] pub type RELOAD_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `RELOAD`" ] pub struct RELOAD_W < 'a > { w : & 'a mut W , } impl < 'a > RELOAD_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x07ff ) | ( ( value as u32 ) & 0x07ff ) ; self . w } } impl R { # [ doc = "Bits 0:10 - Byte Count Reload Value" ] # [ inline ( always ) ] pub fn reload ( & self ) -> RELOAD_R { RELOAD_R :: new ( ( self . bits & 0x07ff ) as u16 ) } } impl W { # [ doc = "Bits 0:10 - Byte Count Reload Value" ] # [ inline ( always ) ] pub fn reload ( & mut self ) -> RELOAD_W { RELOAD_W { w : self } } } } # [ doc = "ETB Counter Value register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [etbcnt](etbcnt) module" ] pub type ETBCNT = crate :: Reg < u32 , _ETBCNT > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _ETBCNT ; # [ doc = "`read()` method returns [etbcnt::R](etbcnt::R) reader structure" ] impl crate :: Readable for ETBCNT { } # [ doc = "ETB Counter Value register" ] pub mod etbcnt { # [ doc = "Reader of register ETBCNT" ] pub type R = crate :: R < u32 , super :: ETBCNT > ; # [ doc = "Reader of field `COUNTER`" ] pub type COUNTER_R = crate :: R < u16 , u16 > ; impl R { # [ doc = "Bits 0:10 - Byte Count Counter Value" ] # [ inline ( always ) ] pub fn counter ( & self ) -> COUNTER_R { COUNTER_R :: new ( ( self . bits & 0x07ff ) as u16 ) } } } # [ doc = "Fault address register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fadr](fadr) module" ] pub type FADR = crate :: Reg < u32 , _FADR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FADR ; # [ doc = "`read()` method returns [fadr::R](fadr::R) reader structure" ] impl crate :: Readable for FADR { } # [ doc = "Fault address register" ] pub mod fadr { # [ doc = "Reader of register FADR" ] pub type R = crate :: R < u32 , super :: FADR > ; # [ doc = "Reader of field `ADDRESS`" ] pub type ADDRESS_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Fault address" ] # [ inline ( always ) ] pub fn address ( & self ) -> ADDRESS_R { ADDRESS_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Fault attributes register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fatr](fatr) module" ] pub type FATR = crate :: Reg < u32 , _FATR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FATR ; # [ doc = "`read()` method returns [fatr::R](fatr::R) reader structure" ] impl crate :: Readable for FATR { } # [ doc = "Fault attributes register" ] pub mod fatr { # [ doc = "Reader of register FATR" ] pub type R = crate :: R < u32 , super :: FATR > ; # [ doc = "Bus error access type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BEDA_A { # [ doc = "0: Instruction" ] _0 , # [ doc = "1: Data" ] _1 } impl From < BEDA_A > for bool { # [ inline ( always ) ] fn from ( variant : BEDA_A ) -> Self { match variant { BEDA_A :: _0 => false , BEDA_A :: _1 => true } } } # [ doc = "Reader of field `BEDA`" ] pub type BEDA_R = crate :: R < bool , BEDA_A > ; impl BEDA_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BEDA_A { match self . bits { false => BEDA_A :: _0 , true => BEDA_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BEDA_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BEDA_A :: _1 } } # [ doc = "Bus error privilege level\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BEMD_A { # [ doc = "0: User mode" ] _0 , # [ doc = "1: Supervisor/privileged mode" ] _1 } impl From < BEMD_A > for bool { # [ inline ( always ) ] fn from ( variant : BEMD_A ) -> Self { match variant { BEMD_A :: _0 => false , BEMD_A :: _1 => true } } } # [ doc = "Reader of field `BEMD`" ] pub type BEMD_R = crate :: R < bool , BEMD_A > ; impl BEMD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BEMD_A { match self . bits { false => BEMD_A :: _0 , true => BEMD_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BEMD_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BEMD_A :: _1 } } # [ doc = "Bus error size\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BESZ_A { # [ doc = "0: 8-bit access" ] _00 , # [ doc = "1: 16-bit access" ] _01 , # [ doc = "2: 32-bit access" ] _10 } impl From < BESZ_A > for u8 { # [ inline ( always ) ] fn from ( variant : BESZ_A ) -> Self { match variant { BESZ_A :: _00 => 0 , BESZ_A :: _01 => 1 , BESZ_A :: _10 => 2 } } } # [ doc = "Reader of field `BESZ`" ] pub type BESZ_R = crate :: R < u8 , BESZ_A > ; impl BESZ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , BESZ_A > { use crate :: Variant :: * ; match self . bits { 0 => Val ( BESZ_A :: _00 ) , 1 => Val ( BESZ_A :: _01 ) , 2 => Val ( BESZ_A :: _10 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == BESZ_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == BESZ_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == BESZ_A :: _10 } } # [ doc = "Bus error write\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BEWT_A { # [ doc = "0: Read access" ] _0 , # [ doc = "1: Write access" ] _1 } impl From < BEWT_A > for bool { # [ inline ( always ) ] fn from ( variant : BEWT_A ) -> Self { match variant { BEWT_A :: _0 => false , BEWT_A :: _1 => true } } } # [ doc = "Reader of field `BEWT`" ] pub type BEWT_R = crate :: R < bool , BEWT_A > ; impl BEWT_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BEWT_A { match self . bits { false => BEWT_A :: _0 , true => BEWT_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BEWT_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BEWT_A :: _1 } } # [ doc = "Reader of field `BEMN`" ] pub type BEMN_R = crate :: R < u8 , u8 > ; # [ doc = "Bus error overrun\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BEOVR_A { # [ doc = "0: No bus error overrun" ] _0 , # [ doc = "1: Bus error overrun occurred. The FADR and FDR registers and the other FATR bits are not updated to reflect this new bus error." ] _1 } impl From < BEOVR_A > for bool { # [ inline ( always ) ] fn from ( variant : BEOVR_A ) -> Self { match variant { BEOVR_A :: _0 => false , BEOVR_A :: _1 => true } } } # [ doc = "Reader of field `BEOVR`" ] pub type BEOVR_R = crate :: R < bool , BEOVR_A > ; impl BEOVR_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> BEOVR_A { match self . bits { false => BEOVR_A :: _0 , true => BEOVR_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == BEOVR_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == BEOVR_A :: _1 } } impl R { # [ doc = "Bit 0 - Bus error access type" ] # [ inline ( always ) ] pub fn beda ( & self ) -> BEDA_R { BEDA_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Bus error privilege level" ] # [ inline ( always ) ] pub fn bemd ( & self ) -> BEMD_R { BEMD_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 4:5 - Bus error size" ] # [ inline ( always ) ] pub fn besz ( & self ) -> BESZ_R { BESZ_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bit 7 - Bus error write" ] # [ inline ( always ) ] pub fn bewt ( & self ) -> BEWT_R { BEWT_R :: new ( ( ( self . bits >> 7 ) & 0x01 ) != 0 ) } # [ doc = "Bits 8:11 - Bus error master number" ] # [ inline ( always ) ] pub fn bemn ( & self ) -> BEMN_R { BEMN_R :: new ( ( ( self . bits >> 8 ) & 0x0f ) as u8 ) } # [ doc = "Bit 31 - Bus error overrun" ] # [ inline ( always ) ] pub fn beovr ( & self ) -> BEOVR_R { BEOVR_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } } # [ doc = "Fault data register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fdr](fdr) module" ] pub type FDR = crate :: Reg < u32 , _FDR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _FDR ; # [ doc = "`read()` method returns [fdr::R](fdr::R) reader structure" ] impl crate :: Readable for FDR { } # [ doc = "Fault data register" ] pub mod fdr { # [ doc = "Reader of register FDR" ] pub type R = crate :: R < u32 , super :: FDR > ; # [ doc = "Reader of field `DATA`" ] pub type DATA_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - Fault data" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Process ID register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pid](pid) module" ] pub type PID = crate :: Reg < u32 , _PID > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PID ; # [ doc = "`read()` method returns [pid::R](pid::R) reader structure" ] impl crate :: Readable for PID { } # [ doc = "`write(|w| ..)` method takes [pid::W](pid::W) writer structure" ] impl crate :: Writable for PID { } # [ doc = "Process ID register" ] pub mod pid { # [ doc = "Reader of register PID" ] pub type R = crate :: R < u32 , super :: PID > ; # [ doc = "Writer for register PID" ] pub type W = crate :: W < u32 , super :: PID > ; # [ doc = "Register PID `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PID { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `PID`" ] pub type PID_R = crate :: R < u8 , u8 > ; # [ doc = "Write proxy for field `PID`" ] pub struct PID_W < 'a > { w : & 'a mut W , } impl < 'a > PID_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 & ! 0xff ) | ( ( value as u32 ) & 0xff ) ; self . w } } impl R { # [ doc = "Bits 0:7 - M0_PID And M1_PID For MPU" ] # [ inline ( always ) ] pub fn pid ( & self ) -> PID_R { PID_R :: new ( ( self . bits & 0xff ) as u8 ) } } impl W { # [ doc = "Bits 0:7 - M0_PID And M1_PID For MPU" ] # [ inline ( always ) ] pub fn pid ( & mut self ) -> PID_W { PID_W { w : self } } } } # [ doc = "Compute Operation Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cpo](cpo) module" ] pub type CPO = crate :: Reg < u32 , _CPO > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CPO ; # [ doc = "`read()` method returns [cpo::R](cpo::R) reader structure" ] impl crate :: Readable for CPO { } # [ doc = "`write(|w| ..)` method takes [cpo::W](cpo::W) writer structure" ] impl crate :: Writable for CPO { } # [ doc = "Compute Operation Control Register" ] pub mod cpo { # [ doc = "Reader of register CPO" ] pub type R = crate :: R < u32 , super :: CPO > ; # [ doc = "Writer for register CPO" ] pub type W = crate :: W < u32 , super :: CPO > ; # [ doc = "Register CPO `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CPO { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Compute Operation request\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOREQ_A { # [ doc = "0: Request is cleared." ] _0 , # [ doc = "1: Request Compute Operation." ] _1 } impl From < CPOREQ_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOREQ_A ) -> Self { match variant { CPOREQ_A :: _0 => false , CPOREQ_A :: _1 => true } } } # [ doc = "Reader of field `CPOREQ`" ] pub type CPOREQ_R = crate :: R < bool , CPOREQ_A > ; impl CPOREQ_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOREQ_A { match self . bits { false => CPOREQ_A :: _0 , true => CPOREQ_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOREQ_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOREQ_A :: _1 } } # [ doc = "Write proxy for field `CPOREQ`" ] pub struct CPOREQ_W < 'a > { w : & 'a mut W , } impl < 'a > CPOREQ_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPOREQ_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Request is cleared." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPOREQ_A :: _0 ) } # [ doc = "Request Compute Operation." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPOREQ_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Compute Operation acknowledge\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOACK_A { # [ doc = "0: Compute operation entry has not completed or compute operation exit has completed." ] _0 , # [ doc = "1: Compute operation entry has completed or compute operation exit has not completed." ] _1 } impl From < CPOACK_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOACK_A ) -> Self { match variant { CPOACK_A :: _0 => false , CPOACK_A :: _1 => true } } } # [ doc = "Reader of field `CPOACK`" ] pub type CPOACK_R = crate :: R < bool , CPOACK_A > ; impl CPOACK_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOACK_A { match self . bits { false => CPOACK_A :: _0 , true => CPOACK_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOACK_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOACK_A :: _1 } } # [ doc = "Compute Operation wakeup on interrupt\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOWOI_A { # [ doc = "0: No effect." ] _0 , # [ doc = "1: When set, the CPOREQ is cleared on any interrupt or exception vector fetch." ] _1 } impl From < CPOWOI_A > for bool { # [ inline ( always ) ] fn from ( variant : CPOWOI_A ) -> Self { match variant { CPOWOI_A :: _0 => false , CPOWOI_A :: _1 => true } } } # [ doc = "Reader of field `CPOWOI`" ] pub type CPOWOI_R = crate :: R < bool , CPOWOI_A > ; impl CPOWOI_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> CPOWOI_A { match self . bits { false => CPOWOI_A :: _0 , true => CPOWOI_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == CPOWOI_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == CPOWOI_A :: _1 } } # [ doc = "Write proxy for field `CPOWOI`" ] pub struct CPOWOI_W < 'a > { w : & 'a mut W , } impl < 'a > CPOWOI_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : CPOWOI_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No effect." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( CPOWOI_A :: _0 ) } # [ doc = "When set, the CPOREQ is cleared on any interrupt or exception vector fetch." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( CPOWOI_A :: _1 ) } # [ 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 } } impl R { # [ doc = "Bit 0 - Compute Operation request" ] # [ inline ( always ) ] pub fn cporeq ( & self ) -> CPOREQ_R { CPOREQ_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Compute Operation acknowledge" ] # [ inline ( always ) ] pub fn cpoack ( & self ) -> CPOACK_R { CPOACK_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Compute Operation wakeup on interrupt" ] # [ inline ( always ) ] pub fn cpowoi ( & self ) -> CPOWOI_R { CPOWOI_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Compute Operation request" ] # [ inline ( always ) ] pub fn cporeq ( & mut self ) -> CPOREQ_W { CPOREQ_W { w : self } } # [ doc = "Bit 2 - Compute Operation wakeup on interrupt" ] # [ inline ( always ) ] pub fn cpowoi ( & mut self ) -> CPOWOI_W { CPOWOI_W { w : self } } } } } # [ doc = "Memory Mapped Cryptographic Acceleration Unit (MMCAU)" ] pub struct CAU { _marker : PhantomData < * const ( ) > } unsafe impl Send for CAU { } impl CAU { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const cau :: RegisterBlock { 0xe008_1000 as * const _ } } impl Deref for CAU { type Target = cau :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * CAU :: ptr ( ) } } } # [ doc = "Memory Mapped Cryptographic Acceleration Unit (MMCAU)" ] pub mod cau { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Direct access register 0" ] pub cau_direct0 : CAU_DIRECT0 , # [ doc = "0x04 - Direct access register 1" ] pub cau_direct1 : CAU_DIRECT1 , # [ doc = "0x08 - Direct access register 2" ] pub cau_direct2 : CAU_DIRECT2 , # [ doc = "0x0c - Direct access register 3" ] pub cau_direct3 : CAU_DIRECT3 , # [ doc = "0x10 - Direct access register 4" ] pub cau_direct4 : CAU_DIRECT4 , # [ doc = "0x14 - Direct access register 5" ] pub cau_direct5 : CAU_DIRECT5 , # [ doc = "0x18 - Direct access register 6" ] pub cau_direct6 : CAU_DIRECT6 , # [ doc = "0x1c - Direct access register 7" ] pub cau_direct7 : CAU_DIRECT7 , # [ doc = "0x20 - Direct access register 8" ] pub cau_direct8 : CAU_DIRECT8 , # [ doc = "0x24 - Direct access register 9" ] pub cau_direct9 : CAU_DIRECT9 , # [ doc = "0x28 - Direct access register 10" ] pub cau_direct10 : CAU_DIRECT10 , # [ doc = "0x2c - Direct access register 11" ] pub cau_direct11 : CAU_DIRECT11 , # [ doc = "0x30 - Direct access register 12" ] pub cau_direct12 : CAU_DIRECT12 , # [ doc = "0x34 - Direct access register 13" ] pub cau_direct13 : CAU_DIRECT13 , # [ doc = "0x38 - Direct access register 14" ] pub cau_direct14 : CAU_DIRECT14 , # [ doc = "0x3c - Direct access register 15" ] pub cau_direct15 : CAU_DIRECT15 , _reserved16 : [ u8 ; 2048usize ] , # [ doc = "0x840 - Status register - Load Register command" ] pub cau_ldr_casr : CAU_LDR_CASR , # [ doc = "0x844 - Accumulator register - Load Register command" ] pub cau_ldr_caa : CAU_LDR_CAA , # [ doc = "0x848 - General Purpose Register 0 - Load Register command" ] pub cau_ldr_ca0 : CAU_LDR_CA0 , # [ doc = "0x84c - General Purpose Register 1 - Load Register command" ] pub cau_ldr_ca1 : CAU_LDR_CA1 , # [ doc = "0x850 - General Purpose Register 2 - Load Register command" ] pub cau_ldr_ca2 : CAU_LDR_CA2 , # [ doc = "0x854 - General Purpose Register 3 - Load Register command" ] pub cau_ldr_ca3 : CAU_LDR_CA3 , # [ doc = "0x858 - General Purpose Register 4 - Load Register command" ] pub cau_ldr_ca4 : CAU_LDR_CA4 , # [ doc = "0x85c - General Purpose Register 5 - Load Register command" ] pub cau_ldr_ca5 : CAU_LDR_CA5 , # [ doc = "0x860 - General Purpose Register 6 - Load Register command" ] pub cau_ldr_ca6 : CAU_LDR_CA6 , # [ doc = "0x864 - General Purpose Register 7 - Load Register command" ] pub cau_ldr_ca7 : CAU_LDR_CA7 , # [ doc = "0x868 - General Purpose Register 8 - Load Register command" ] pub cau_ldr_ca8 : CAU_LDR_CA8 , _reserved27 : [ u8 ; 20usize ] , # [ doc = "0x880 - Status register - Store Register command" ] pub cau_str_casr : CAU_STR_CASR , # [ doc = "0x884 - Accumulator register - Store Register command" ] pub cau_str_caa : CAU_STR_CAA , # [ doc = "0x888 - General Purpose Register 0 - Store Register command" ] pub cau_str_ca0 : CAU_STR_CA0 , # [ doc = "0x88c - General Purpose Register 1 - Store Register command" ] pub cau_str_ca1 : CAU_STR_CA1 , # [ doc = "0x890 - General Purpose Register 2 - Store Register command" ] pub cau_str_ca2 : CAU_STR_CA2 , # [ doc = "0x894 - General Purpose Register 3 - Store Register command" ] pub cau_str_ca3 : CAU_STR_CA3 , # [ doc = "0x898 - General Purpose Register 4 - Store Register command" ] pub cau_str_ca4 : CAU_STR_CA4 , # [ doc = "0x89c - General Purpose Register 5 - Store Register command" ] pub cau_str_ca5 : CAU_STR_CA5 , # [ doc = "0x8a0 - General Purpose Register 6 - Store Register command" ] pub cau_str_ca6 : CAU_STR_CA6 , # [ doc = "0x8a4 - General Purpose Register 7 - Store Register command" ] pub cau_str_ca7 : CAU_STR_CA7 , # [ doc = "0x8a8 - General Purpose Register 8 - Store Register command" ] pub cau_str_ca8 : CAU_STR_CA8 , _reserved38 : [ u8 ; 20usize ] , # [ doc = "0x8c0 - Status register - Add Register command" ] pub cau_adr_casr : CAU_ADR_CASR , # [ doc = "0x8c4 - Accumulator register - Add to register command" ] pub cau_adr_caa : CAU_ADR_CAA , # [ doc = "0x8c8 - General Purpose Register 0 - Add to register command" ] pub cau_adr_ca0 : CAU_ADR_CA0 , # [ doc = "0x8cc - General Purpose Register 1 - Add to register command" ] pub cau_adr_ca1 : CAU_ADR_CA1 , # [ doc = "0x8d0 - General Purpose Register 2 - Add to register command" ] pub cau_adr_ca2 : CAU_ADR_CA2 , # [ doc = "0x8d4 - General Purpose Register 3 - Add to register command" ] pub cau_adr_ca3 : CAU_ADR_CA3 , # [ doc = "0x8d8 - General Purpose Register 4 - Add to register command" ] pub cau_adr_ca4 : CAU_ADR_CA4 , # [ doc = "0x8dc - General Purpose Register 5 - Add to register command" ] pub cau_adr_ca5 : CAU_ADR_CA5 , # [ doc = "0x8e0 - General Purpose Register 6 - Add to register command" ] pub cau_adr_ca6 : CAU_ADR_CA6 , # [ doc = "0x8e4 - General Purpose Register 7 - Add to register command" ] pub cau_adr_ca7 : CAU_ADR_CA7 , # [ doc = "0x8e8 - General Purpose Register 8 - Add to register command" ] pub cau_adr_ca8 : CAU_ADR_CA8 , _reserved49 : [ u8 ; 20usize ] , # [ doc = "0x900 - Status register - Reverse and Add to Register command" ] pub cau_radr_casr : CAU_RADR_CASR , # [ doc = "0x904 - Accumulator register - Reverse and Add to Register command" ] pub cau_radr_caa : CAU_RADR_CAA , # [ doc = "0x908 - General Purpose Register 0 - Reverse and Add to Register command" ] pub cau_radr_ca0 : CAU_RADR_CA0 , # [ doc = "0x90c - General Purpose Register 1 - Reverse and Add to Register command" ] pub cau_radr_ca1 : CAU_RADR_CA1 , # [ doc = "0x910 - General Purpose Register 2 - Reverse and Add to Register command" ] pub cau_radr_ca2 : CAU_RADR_CA2 , # [ doc = "0x914 - General Purpose Register 3 - Reverse and Add to Register command" ] pub cau_radr_ca3 : CAU_RADR_CA3 , # [ doc = "0x918 - General Purpose Register 4 - Reverse and Add to Register command" ] pub cau_radr_ca4 : CAU_RADR_CA4 , # [ doc = "0x91c - General Purpose Register 5 - Reverse and Add to Register command" ] pub cau_radr_ca5 : CAU_RADR_CA5 , # [ doc = "0x920 - General Purpose Register 6 - Reverse and Add to Register command" ] pub cau_radr_ca6 : CAU_RADR_CA6 , # [ doc = "0x924 - General Purpose Register 7 - Reverse and Add to Register command" ] pub cau_radr_ca7 : CAU_RADR_CA7 , # [ doc = "0x928 - General Purpose Register 8 - Reverse and Add to Register command" ] pub cau_radr_ca8 : CAU_RADR_CA8 , _reserved60 : [ u8 ; 84usize ] , # [ doc = "0x980 - Status register - Exclusive Or command" ] pub cau_xor_casr : CAU_XOR_CASR , # [ doc = "0x984 - Accumulator register - Exclusive Or command" ] pub cau_xor_caa : CAU_XOR_CAA , # [ doc = "0x988 - General Purpose Register 0 - Exclusive Or command" ] pub cau_xor_ca0 : CAU_XOR_CA0 , # [ doc = "0x98c - General Purpose Register 1 - Exclusive Or command" ] pub cau_xor_ca1 : CAU_XOR_CA1 , # [ doc = "0x990 - General Purpose Register 2 - Exclusive Or command" ] pub cau_xor_ca2 : CAU_XOR_CA2 , # [ doc = "0x994 - General Purpose Register 3 - Exclusive Or command" ] pub cau_xor_ca3 : CAU_XOR_CA3 , # [ doc = "0x998 - General Purpose Register 4 - Exclusive Or command" ] pub cau_xor_ca4 : CAU_XOR_CA4 , # [ doc = "0x99c - General Purpose Register 5 - Exclusive Or command" ] pub cau_xor_ca5 : CAU_XOR_CA5 , # [ doc = "0x9a0 - General Purpose Register 6 - Exclusive Or command" ] pub cau_xor_ca6 : CAU_XOR_CA6 , # [ doc = "0x9a4 - General Purpose Register 7 - Exclusive Or command" ] pub cau_xor_ca7 : CAU_XOR_CA7 , # [ doc = "0x9a8 - General Purpose Register 8 - Exclusive Or command" ] pub cau_xor_ca8 : CAU_XOR_CA8 , _reserved71 : [ u8 ; 20usize ] , # [ doc = "0x9c0 - Status register - Rotate Left command" ] pub cau_rotl_casr : CAU_ROTL_CASR , # [ doc = "0x9c4 - Accumulator register - Rotate Left command" ] pub cau_rotl_caa : CAU_ROTL_CAA , # [ doc = "0x9c8 - General Purpose Register 0 - Rotate Left command" ] pub cau_rotl_ca0 : CAU_ROTL_CA0 , # [ doc = "0x9cc - General Purpose Register 1 - Rotate Left command" ] pub cau_rotl_ca1 : CAU_ROTL_CA1 , # [ doc = "0x9d0 - General Purpose Register 2 - Rotate Left command" ] pub cau_rotl_ca2 : CAU_ROTL_CA2 , # [ doc = "0x9d4 - General Purpose Register 3 - Rotate Left command" ] pub cau_rotl_ca3 : CAU_ROTL_CA3 , # [ doc = "0x9d8 - General Purpose Register 4 - Rotate Left command" ] pub cau_rotl_ca4 : CAU_ROTL_CA4 , # [ doc = "0x9dc - General Purpose Register 5 - Rotate Left command" ] pub cau_rotl_ca5 : CAU_ROTL_CA5 , # [ doc = "0x9e0 - General Purpose Register 6 - Rotate Left command" ] pub cau_rotl_ca6 : CAU_ROTL_CA6 , # [ doc = "0x9e4 - General Purpose Register 7 - Rotate Left command" ] pub cau_rotl_ca7 : CAU_ROTL_CA7 , # [ doc = "0x9e8 - General Purpose Register 8 - Rotate Left command" ] pub cau_rotl_ca8 : CAU_ROTL_CA8 , _reserved82 : [ u8 ; 276usize ] , # [ doc = "0xb00 - Status register - AES Column Operation command" ] pub cau_aesc_casr : CAU_AESC_CASR , # [ doc = "0xb04 - Accumulator register - AES Column Operation command" ] pub cau_aesc_caa : CAU_AESC_CAA , # [ doc = "0xb08 - General Purpose Register 0 - AES Column Operation command" ] pub cau_aesc_ca0 : CAU_AESC_CA0 , # [ doc = "0xb0c - General Purpose Register 1 - AES Column Operation command" ] pub cau_aesc_ca1 : CAU_AESC_CA1 , # [ doc = "0xb10 - General Purpose Register 2 - AES Column Operation command" ] pub cau_aesc_ca2 : CAU_AESC_CA2 , # [ doc = "0xb14 - General Purpose Register 3 - AES Column Operation command" ] pub cau_aesc_ca3 : CAU_AESC_CA3 , # [ doc = "0xb18 - General Purpose Register 4 - AES Column Operation command" ] pub cau_aesc_ca4 : CAU_AESC_CA4 , # [ doc = "0xb1c - General Purpose Register 5 - AES Column Operation command" ] pub cau_aesc_ca5 : CAU_AESC_CA5 , # [ doc = "0xb20 - General Purpose Register 6 - AES Column Operation command" ] pub cau_aesc_ca6 : CAU_AESC_CA6 , # [ doc = "0xb24 - General Purpose Register 7 - AES Column Operation command" ] pub cau_aesc_ca7 : CAU_AESC_CA7 , # [ doc = "0xb28 - General Purpose Register 8 - AES Column Operation command" ] pub cau_aesc_ca8 : CAU_AESC_CA8 , _reserved93 : [ u8 ; 20usize ] , # [ doc = "0xb40 - Status register - AES Inverse Column Operation command" ] pub cau_aesic_casr : CAU_AESIC_CASR , # [ doc = "0xb44 - Accumulator register - AES Inverse Column Operation command" ] pub cau_aesic_caa : CAU_AESIC_CAA , # [ doc = "0xb48 - General Purpose Register 0 - AES Inverse Column Operation command" ] pub cau_aesic_ca0 : CAU_AESIC_CA0 , # [ doc = "0xb4c - General Purpose Register 1 - AES Inverse Column Operation command" ] pub cau_aesic_ca1 : CAU_AESIC_CA1 , # [ doc = "0xb50 - General Purpose Register 2 - AES Inverse Column Operation command" ] pub cau_aesic_ca2 : CAU_AESIC_CA2 , # [ doc = "0xb54 - General Purpose Register 3 - AES Inverse Column Operation command" ] pub cau_aesic_ca3 : CAU_AESIC_CA3 , # [ doc = "0xb58 - General Purpose Register 4 - AES Inverse Column Operation command" ] pub cau_aesic_ca4 : CAU_AESIC_CA4 , # [ doc = "0xb5c - General Purpose Register 5 - AES Inverse Column Operation command" ] pub cau_aesic_ca5 : CAU_AESIC_CA5 , # [ doc = "0xb60 - General Purpose Register 6 - AES Inverse Column Operation command" ] pub cau_aesic_ca6 : CAU_AESIC_CA6 , # [ doc = "0xb64 - General Purpose Register 7 - AES Inverse Column Operation command" ] pub cau_aesic_ca7 : CAU_AESIC_CA7 , # [ doc = "0xb68 - General Purpose Register 8 - AES Inverse Column Operation command" ] pub cau_aesic_ca8 : CAU_AESIC_CA8 , } # [ doc = "Direct access register 0\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct0](cau_direct0) module" ] pub type CAU_DIRECT0 = crate :: Reg < u32 , _CAU_DIRECT0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT0 ; # [ doc = "`write(|w| ..)` method takes [cau_direct0::W](cau_direct0::W) writer structure" ] impl crate :: Writable for CAU_DIRECT0 { } # [ doc = "Direct access register 0" ] pub mod cau_direct0 { # [ doc = "Writer for register CAU_DIRECT0" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT0 > ; # [ doc = "Register CAU_DIRECT0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT0`" ] pub struct CAU_DIRECT0_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT0_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 0" ] # [ inline ( always ) ] pub fn cau_direct0 ( & mut self ) -> CAU_DIRECT0_W { CAU_DIRECT0_W { w : self } } } } # [ doc = "Direct access register 1\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct1](cau_direct1) module" ] pub type CAU_DIRECT1 = crate :: Reg < u32 , _CAU_DIRECT1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT1 ; # [ doc = "`write(|w| ..)` method takes [cau_direct1::W](cau_direct1::W) writer structure" ] impl crate :: Writable for CAU_DIRECT1 { } # [ doc = "Direct access register 1" ] pub mod cau_direct1 { # [ doc = "Writer for register CAU_DIRECT1" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT1 > ; # [ doc = "Register CAU_DIRECT1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT1`" ] pub struct CAU_DIRECT1_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 1" ] # [ inline ( always ) ] pub fn cau_direct1 ( & mut self ) -> CAU_DIRECT1_W { CAU_DIRECT1_W { w : self } } } } # [ doc = "Direct access register 2\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct2](cau_direct2) module" ] pub type CAU_DIRECT2 = crate :: Reg < u32 , _CAU_DIRECT2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT2 ; # [ doc = "`write(|w| ..)` method takes [cau_direct2::W](cau_direct2::W) writer structure" ] impl crate :: Writable for CAU_DIRECT2 { } # [ doc = "Direct access register 2" ] pub mod cau_direct2 { # [ doc = "Writer for register CAU_DIRECT2" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT2 > ; # [ doc = "Register CAU_DIRECT2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT2`" ] pub struct CAU_DIRECT2_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 2" ] # [ inline ( always ) ] pub fn cau_direct2 ( & mut self ) -> CAU_DIRECT2_W { CAU_DIRECT2_W { w : self } } } } # [ doc = "Direct access register 3\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct3](cau_direct3) module" ] pub type CAU_DIRECT3 = crate :: Reg < u32 , _CAU_DIRECT3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT3 ; # [ doc = "`write(|w| ..)` method takes [cau_direct3::W](cau_direct3::W) writer structure" ] impl crate :: Writable for CAU_DIRECT3 { } # [ doc = "Direct access register 3" ] pub mod cau_direct3 { # [ doc = "Writer for register CAU_DIRECT3" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT3 > ; # [ doc = "Register CAU_DIRECT3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT3`" ] pub struct CAU_DIRECT3_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 3" ] # [ inline ( always ) ] pub fn cau_direct3 ( & mut self ) -> CAU_DIRECT3_W { CAU_DIRECT3_W { w : self } } } } # [ doc = "Direct access register 4\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct4](cau_direct4) module" ] pub type CAU_DIRECT4 = crate :: Reg < u32 , _CAU_DIRECT4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT4 ; # [ doc = "`write(|w| ..)` method takes [cau_direct4::W](cau_direct4::W) writer structure" ] impl crate :: Writable for CAU_DIRECT4 { } # [ doc = "Direct access register 4" ] pub mod cau_direct4 { # [ doc = "Writer for register CAU_DIRECT4" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT4 > ; # [ doc = "Register CAU_DIRECT4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT4`" ] pub struct CAU_DIRECT4_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 4" ] # [ inline ( always ) ] pub fn cau_direct4 ( & mut self ) -> CAU_DIRECT4_W { CAU_DIRECT4_W { w : self } } } } # [ doc = "Direct access register 5\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct5](cau_direct5) module" ] pub type CAU_DIRECT5 = crate :: Reg < u32 , _CAU_DIRECT5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT5 ; # [ doc = "`write(|w| ..)` method takes [cau_direct5::W](cau_direct5::W) writer structure" ] impl crate :: Writable for CAU_DIRECT5 { } # [ doc = "Direct access register 5" ] pub mod cau_direct5 { # [ doc = "Writer for register CAU_DIRECT5" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT5 > ; # [ doc = "Register CAU_DIRECT5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT5`" ] pub struct CAU_DIRECT5_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT5_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 5" ] # [ inline ( always ) ] pub fn cau_direct5 ( & mut self ) -> CAU_DIRECT5_W { CAU_DIRECT5_W { w : self } } } } # [ doc = "Direct access register 6\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct6](cau_direct6) module" ] pub type CAU_DIRECT6 = crate :: Reg < u32 , _CAU_DIRECT6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT6 ; # [ doc = "`write(|w| ..)` method takes [cau_direct6::W](cau_direct6::W) writer structure" ] impl crate :: Writable for CAU_DIRECT6 { } # [ doc = "Direct access register 6" ] pub mod cau_direct6 { # [ doc = "Writer for register CAU_DIRECT6" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT6 > ; # [ doc = "Register CAU_DIRECT6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT6`" ] pub struct CAU_DIRECT6_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT6_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 6" ] # [ inline ( always ) ] pub fn cau_direct6 ( & mut self ) -> CAU_DIRECT6_W { CAU_DIRECT6_W { w : self } } } } # [ doc = "Direct access register 7\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct7](cau_direct7) module" ] pub type CAU_DIRECT7 = crate :: Reg < u32 , _CAU_DIRECT7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT7 ; # [ doc = "`write(|w| ..)` method takes [cau_direct7::W](cau_direct7::W) writer structure" ] impl crate :: Writable for CAU_DIRECT7 { } # [ doc = "Direct access register 7" ] pub mod cau_direct7 { # [ doc = "Writer for register CAU_DIRECT7" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT7 > ; # [ doc = "Register CAU_DIRECT7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT7`" ] pub struct CAU_DIRECT7_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT7_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 7" ] # [ inline ( always ) ] pub fn cau_direct7 ( & mut self ) -> CAU_DIRECT7_W { CAU_DIRECT7_W { w : self } } } } # [ doc = "Direct access register 8\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct8](cau_direct8) module" ] pub type CAU_DIRECT8 = crate :: Reg < u32 , _CAU_DIRECT8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT8 ; # [ doc = "`write(|w| ..)` method takes [cau_direct8::W](cau_direct8::W) writer structure" ] impl crate :: Writable for CAU_DIRECT8 { } # [ doc = "Direct access register 8" ] pub mod cau_direct8 { # [ doc = "Writer for register CAU_DIRECT8" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT8 > ; # [ doc = "Register CAU_DIRECT8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT8`" ] pub struct CAU_DIRECT8_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT8_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 8" ] # [ inline ( always ) ] pub fn cau_direct8 ( & mut self ) -> CAU_DIRECT8_W { CAU_DIRECT8_W { w : self } } } } # [ doc = "Direct access register 9\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct9](cau_direct9) module" ] pub type CAU_DIRECT9 = crate :: Reg < u32 , _CAU_DIRECT9 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT9 ; # [ doc = "`write(|w| ..)` method takes [cau_direct9::W](cau_direct9::W) writer structure" ] impl crate :: Writable for CAU_DIRECT9 { } # [ doc = "Direct access register 9" ] pub mod cau_direct9 { # [ doc = "Writer for register CAU_DIRECT9" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT9 > ; # [ doc = "Register CAU_DIRECT9 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT9 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT9`" ] pub struct CAU_DIRECT9_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT9_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 9" ] # [ inline ( always ) ] pub fn cau_direct9 ( & mut self ) -> CAU_DIRECT9_W { CAU_DIRECT9_W { w : self } } } } # [ doc = "Direct access register 10\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct10](cau_direct10) module" ] pub type CAU_DIRECT10 = crate :: Reg < u32 , _CAU_DIRECT10 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT10 ; # [ doc = "`write(|w| ..)` method takes [cau_direct10::W](cau_direct10::W) writer structure" ] impl crate :: Writable for CAU_DIRECT10 { } # [ doc = "Direct access register 10" ] pub mod cau_direct10 { # [ doc = "Writer for register CAU_DIRECT10" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT10 > ; # [ doc = "Register CAU_DIRECT10 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT10 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT10`" ] pub struct CAU_DIRECT10_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT10_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 10" ] # [ inline ( always ) ] pub fn cau_direct10 ( & mut self ) -> CAU_DIRECT10_W { CAU_DIRECT10_W { w : self } } } } # [ doc = "Direct access register 11\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct11](cau_direct11) module" ] pub type CAU_DIRECT11 = crate :: Reg < u32 , _CAU_DIRECT11 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT11 ; # [ doc = "`write(|w| ..)` method takes [cau_direct11::W](cau_direct11::W) writer structure" ] impl crate :: Writable for CAU_DIRECT11 { } # [ doc = "Direct access register 11" ] pub mod cau_direct11 { # [ doc = "Writer for register CAU_DIRECT11" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT11 > ; # [ doc = "Register CAU_DIRECT11 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT11 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT11`" ] pub struct CAU_DIRECT11_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT11_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 11" ] # [ inline ( always ) ] pub fn cau_direct11 ( & mut self ) -> CAU_DIRECT11_W { CAU_DIRECT11_W { w : self } } } } # [ doc = "Direct access register 12\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct12](cau_direct12) module" ] pub type CAU_DIRECT12 = crate :: Reg < u32 , _CAU_DIRECT12 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT12 ; # [ doc = "`write(|w| ..)` method takes [cau_direct12::W](cau_direct12::W) writer structure" ] impl crate :: Writable for CAU_DIRECT12 { } # [ doc = "Direct access register 12" ] pub mod cau_direct12 { # [ doc = "Writer for register CAU_DIRECT12" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT12 > ; # [ doc = "Register CAU_DIRECT12 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT12 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT12`" ] pub struct CAU_DIRECT12_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT12_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 12" ] # [ inline ( always ) ] pub fn cau_direct12 ( & mut self ) -> CAU_DIRECT12_W { CAU_DIRECT12_W { w : self } } } } # [ doc = "Direct access register 13\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct13](cau_direct13) module" ] pub type CAU_DIRECT13 = crate :: Reg < u32 , _CAU_DIRECT13 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT13 ; # [ doc = "`write(|w| ..)` method takes [cau_direct13::W](cau_direct13::W) writer structure" ] impl crate :: Writable for CAU_DIRECT13 { } # [ doc = "Direct access register 13" ] pub mod cau_direct13 { # [ doc = "Writer for register CAU_DIRECT13" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT13 > ; # [ doc = "Register CAU_DIRECT13 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT13 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT13`" ] pub struct CAU_DIRECT13_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT13_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 13" ] # [ inline ( always ) ] pub fn cau_direct13 ( & mut self ) -> CAU_DIRECT13_W { CAU_DIRECT13_W { w : self } } } } # [ doc = "Direct access register 14\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct14](cau_direct14) module" ] pub type CAU_DIRECT14 = crate :: Reg < u32 , _CAU_DIRECT14 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT14 ; # [ doc = "`write(|w| ..)` method takes [cau_direct14::W](cau_direct14::W) writer structure" ] impl crate :: Writable for CAU_DIRECT14 { } # [ doc = "Direct access register 14" ] pub mod cau_direct14 { # [ doc = "Writer for register CAU_DIRECT14" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT14 > ; # [ doc = "Register CAU_DIRECT14 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT14 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT14`" ] pub struct CAU_DIRECT14_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT14_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 14" ] # [ inline ( always ) ] pub fn cau_direct14 ( & mut self ) -> CAU_DIRECT14_W { CAU_DIRECT14_W { w : self } } } } # [ doc = "Direct access register 15\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_direct15](cau_direct15) module" ] pub type CAU_DIRECT15 = crate :: Reg < u32 , _CAU_DIRECT15 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_DIRECT15 ; # [ doc = "`write(|w| ..)` method takes [cau_direct15::W](cau_direct15::W) writer structure" ] impl crate :: Writable for CAU_DIRECT15 { } # [ doc = "Direct access register 15" ] pub mod cau_direct15 { # [ doc = "Writer for register CAU_DIRECT15" ] pub type W = crate :: W < u32 , super :: CAU_DIRECT15 > ; # [ doc = "Register CAU_DIRECT15 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_DIRECT15 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CAU_DIRECT15`" ] pub struct CAU_DIRECT15_W < 'a > { w : & 'a mut W , } impl < 'a > CAU_DIRECT15_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - Direct register 15" ] # [ inline ( always ) ] pub fn cau_direct15 ( & mut self ) -> CAU_DIRECT15_W { CAU_DIRECT15_W { w : self } } } } # [ doc = "Status register - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_casr](cau_ldr_casr) module" ] pub type CAU_LDR_CASR = crate :: Reg < u32 , _CAU_LDR_CASR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CASR ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_casr::W](cau_ldr_casr::W) writer structure" ] impl crate :: Writable for CAU_LDR_CASR { } # [ doc = "Status register - Load Register command" ] pub mod cau_ldr_casr { # [ doc = "Writer for register CAU_LDR_CASR" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CASR > ; # [ doc = "Register CAU_LDR_CASR `reset()`'s with value 0x2000_0000" ] impl crate :: ResetValue for super :: CAU_LDR_CASR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x2000_0000 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IC_AW { # [ doc = "0: No illegal commands issued" ] _0 , # [ doc = "1: Illegal command issued" ] _1 } impl From < IC_AW > for bool { # [ inline ( always ) ] fn from ( variant : IC_AW ) -> Self { match variant { IC_AW :: _0 => false , IC_AW :: _1 => true } } } # [ doc = "Write proxy for field `IC`" ] pub struct IC_W < 'a > { w : & 'a mut W , } impl < 'a > IC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IC_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No illegal commands issued" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _0 ) } # [ doc = "Illegal command issued" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPE_AW { # [ doc = "0: No error detected" ] _0 , # [ doc = "1: DES key parity error detected" ] _1 } impl From < DPE_AW > for bool { # [ inline ( always ) ] fn from ( variant : DPE_AW ) -> Self { match variant { DPE_AW :: _0 => false , DPE_AW :: _1 => true } } } # [ doc = "Write proxy for field `DPE`" ] pub struct DPE_W < 'a > { w : & 'a mut W , } impl < 'a > DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _0 ) } # [ doc = "DES key parity error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _1 ) } # [ 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 } } # [ doc = "CAU version\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VER_AW { # [ doc = "1: Initial CAU version" ] _0001 , # [ doc = "2: Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] _0010 } impl From < VER_AW > for u8 { # [ inline ( always ) ] fn from ( variant : VER_AW ) -> Self { match variant { VER_AW :: _0001 => 1 , VER_AW :: _0010 => 2 } } } # [ doc = "Write proxy for field `VER`" ] pub struct VER_W < 'a > { w : & 'a mut W , } impl < 'a > VER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VER_AW ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Initial CAU version" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0001 ) } # [ doc = "Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0010 ) } # [ 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 & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn ic ( & mut self ) -> IC_W { IC_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn dpe ( & mut self ) -> DPE_W { DPE_W { w : self } } # [ doc = "Bits 28:31 - CAU version" ] # [ inline ( always ) ] pub fn ver ( & mut self ) -> VER_W { VER_W { w : self } } } } # [ doc = "Accumulator register - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_caa](cau_ldr_caa) module" ] pub type CAU_LDR_CAA = crate :: Reg < u32 , _CAU_LDR_CAA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CAA ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_caa::W](cau_ldr_caa::W) writer structure" ] impl crate :: Writable for CAU_LDR_CAA { } # [ doc = "Accumulator register - Load Register command" ] pub mod cau_ldr_caa { # [ doc = "Writer for register CAU_LDR_CAA" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CAA > ; # [ doc = "Register CAU_LDR_CAA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CAA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `ACC`" ] pub struct ACC_W < 'a > { w : & 'a mut W , } impl < 'a > ACC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - ACC" ] # [ inline ( always ) ] pub fn acc ( & mut self ) -> ACC_W { ACC_W { w : self } } } } # [ doc = "General Purpose Register 0 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca0](cau_ldr_ca0) module" ] pub type CAU_LDR_CA0 = crate :: Reg < u32 , _CAU_LDR_CA0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA0 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca0::W](cau_ldr_ca0::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA0 { } # [ doc = "General Purpose Register 0 - Load Register command" ] pub mod cau_ldr_ca0 { # [ doc = "Writer for register CAU_LDR_CA0" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA0 > ; # [ doc = "Register CAU_LDR_CA0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA0`" ] pub struct CA0_W < 'a > { w : & 'a mut W , } impl < 'a > CA0_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA0" ] # [ inline ( always ) ] pub fn ca0 ( & mut self ) -> CA0_W { CA0_W { w : self } } } } # [ doc = "General Purpose Register 1 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca1](cau_ldr_ca1) module" ] pub type CAU_LDR_CA1 = crate :: Reg < u32 , _CAU_LDR_CA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA1 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca1::W](cau_ldr_ca1::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA1 { } # [ doc = "General Purpose Register 1 - Load Register command" ] pub mod cau_ldr_ca1 { # [ doc = "Writer for register CAU_LDR_CA1" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA1 > ; # [ doc = "Register CAU_LDR_CA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA1`" ] pub struct CA1_W < 'a > { w : & 'a mut W , } impl < 'a > CA1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA1" ] # [ inline ( always ) ] pub fn ca1 ( & mut self ) -> CA1_W { CA1_W { w : self } } } } # [ doc = "General Purpose Register 2 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca2](cau_ldr_ca2) module" ] pub type CAU_LDR_CA2 = crate :: Reg < u32 , _CAU_LDR_CA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA2 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca2::W](cau_ldr_ca2::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA2 { } # [ doc = "General Purpose Register 2 - Load Register command" ] pub mod cau_ldr_ca2 { # [ doc = "Writer for register CAU_LDR_CA2" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA2 > ; # [ doc = "Register CAU_LDR_CA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA2`" ] pub struct CA2_W < 'a > { w : & 'a mut W , } impl < 'a > CA2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA2" ] # [ inline ( always ) ] pub fn ca2 ( & mut self ) -> CA2_W { CA2_W { w : self } } } } # [ doc = "General Purpose Register 3 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca3](cau_ldr_ca3) module" ] pub type CAU_LDR_CA3 = crate :: Reg < u32 , _CAU_LDR_CA3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA3 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca3::W](cau_ldr_ca3::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA3 { } # [ doc = "General Purpose Register 3 - Load Register command" ] pub mod cau_ldr_ca3 { # [ doc = "Writer for register CAU_LDR_CA3" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA3 > ; # [ doc = "Register CAU_LDR_CA3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA3`" ] pub struct CA3_W < 'a > { w : & 'a mut W , } impl < 'a > CA3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA3" ] # [ inline ( always ) ] pub fn ca3 ( & mut self ) -> CA3_W { CA3_W { w : self } } } } # [ doc = "General Purpose Register 4 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca4](cau_ldr_ca4) module" ] pub type CAU_LDR_CA4 = crate :: Reg < u32 , _CAU_LDR_CA4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA4 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca4::W](cau_ldr_ca4::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA4 { } # [ doc = "General Purpose Register 4 - Load Register command" ] pub mod cau_ldr_ca4 { # [ doc = "Writer for register CAU_LDR_CA4" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA4 > ; # [ doc = "Register CAU_LDR_CA4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA4`" ] pub struct CA4_W < 'a > { w : & 'a mut W , } impl < 'a > CA4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA4" ] # [ inline ( always ) ] pub fn ca4 ( & mut self ) -> CA4_W { CA4_W { w : self } } } } # [ doc = "General Purpose Register 5 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca5](cau_ldr_ca5) module" ] pub type CAU_LDR_CA5 = crate :: Reg < u32 , _CAU_LDR_CA5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA5 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca5::W](cau_ldr_ca5::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA5 { } # [ doc = "General Purpose Register 5 - Load Register command" ] pub mod cau_ldr_ca5 { # [ doc = "Writer for register CAU_LDR_CA5" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA5 > ; # [ doc = "Register CAU_LDR_CA5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA5`" ] pub struct CA5_W < 'a > { w : & 'a mut W , } impl < 'a > CA5_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA5" ] # [ inline ( always ) ] pub fn ca5 ( & mut self ) -> CA5_W { CA5_W { w : self } } } } # [ doc = "General Purpose Register 6 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca6](cau_ldr_ca6) module" ] pub type CAU_LDR_CA6 = crate :: Reg < u32 , _CAU_LDR_CA6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA6 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca6::W](cau_ldr_ca6::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA6 { } # [ doc = "General Purpose Register 6 - Load Register command" ] pub mod cau_ldr_ca6 { # [ doc = "Writer for register CAU_LDR_CA6" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA6 > ; # [ doc = "Register CAU_LDR_CA6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA6`" ] pub struct CA6_W < 'a > { w : & 'a mut W , } impl < 'a > CA6_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA6" ] # [ inline ( always ) ] pub fn ca6 ( & mut self ) -> CA6_W { CA6_W { w : self } } } } # [ doc = "General Purpose Register 7 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca7](cau_ldr_ca7) module" ] pub type CAU_LDR_CA7 = crate :: Reg < u32 , _CAU_LDR_CA7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA7 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca7::W](cau_ldr_ca7::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA7 { } # [ doc = "General Purpose Register 7 - Load Register command" ] pub mod cau_ldr_ca7 { # [ doc = "Writer for register CAU_LDR_CA7" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA7 > ; # [ doc = "Register CAU_LDR_CA7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA7`" ] pub struct CA7_W < 'a > { w : & 'a mut W , } impl < 'a > CA7_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA7" ] # [ inline ( always ) ] pub fn ca7 ( & mut self ) -> CA7_W { CA7_W { w : self } } } } # [ doc = "General Purpose Register 8 - Load Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_ldr_ca8](cau_ldr_ca8) module" ] pub type CAU_LDR_CA8 = crate :: Reg < u32 , _CAU_LDR_CA8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_LDR_CA8 ; # [ doc = "`write(|w| ..)` method takes [cau_ldr_ca8::W](cau_ldr_ca8::W) writer structure" ] impl crate :: Writable for CAU_LDR_CA8 { } # [ doc = "General Purpose Register 8 - Load Register command" ] pub mod cau_ldr_ca8 { # [ doc = "Writer for register CAU_LDR_CA8" ] pub type W = crate :: W < u32 , super :: CAU_LDR_CA8 > ; # [ doc = "Register CAU_LDR_CA8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_LDR_CA8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA8`" ] pub struct CA8_W < 'a > { w : & 'a mut W , } impl < 'a > CA8_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA8" ] # [ inline ( always ) ] pub fn ca8 ( & mut self ) -> CA8_W { CA8_W { w : self } } } } # [ doc = "Status register - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_casr](cau_str_casr) module" ] pub type CAU_STR_CASR = crate :: Reg < u32 , _CAU_STR_CASR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CASR ; # [ doc = "`read()` method returns [cau_str_casr::R](cau_str_casr::R) reader structure" ] impl crate :: Readable for CAU_STR_CASR { } # [ doc = "Status register - Store Register command" ] pub mod cau_str_casr { # [ doc = "Reader of register CAU_STR_CASR" ] pub type R = crate :: R < u32 , super :: CAU_STR_CASR > ; # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IC_A { # [ doc = "0: No illegal commands issued" ] _0 , # [ doc = "1: Illegal command issued" ] _1 } impl From < IC_A > for bool { # [ inline ( always ) ] fn from ( variant : IC_A ) -> Self { match variant { IC_A :: _0 => false , IC_A :: _1 => true } } } # [ doc = "Reader of field `IC`" ] pub type IC_R = crate :: R < bool , IC_A > ; impl IC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> IC_A { match self . bits { false => IC_A :: _0 , true => IC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == IC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == IC_A :: _1 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPE_A { # [ doc = "0: No error detected" ] _0 , # [ doc = "1: DES key parity error detected" ] _1 } impl From < DPE_A > for bool { # [ inline ( always ) ] fn from ( variant : DPE_A ) -> Self { match variant { DPE_A :: _0 => false , DPE_A :: _1 => true } } } # [ doc = "Reader of field `DPE`" ] pub type DPE_R = crate :: R < bool , DPE_A > ; impl DPE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> DPE_A { match self . bits { false => DPE_A :: _0 , true => DPE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == DPE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == DPE_A :: _1 } } # [ doc = "CAU version\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VER_A { # [ doc = "1: Initial CAU version" ] _0001 , # [ doc = "2: Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] _0010 } impl From < VER_A > for u8 { # [ inline ( always ) ] fn from ( variant : VER_A ) -> Self { match variant { VER_A :: _0001 => 1 , VER_A :: _0010 => 2 } } } # [ doc = "Reader of field `VER`" ] pub type VER_R = crate :: R < u8 , VER_A > ; impl VER_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> crate :: Variant < u8 , VER_A > { use crate :: Variant :: * ; match self . bits { 1 => Val ( VER_A :: _0001 ) , 2 => Val ( VER_A :: _0010 ) , i => Res ( i ) } } # [ doc = "Checks if the value of the field is `_0001`" ] # [ inline ( always ) ] pub fn is_0001 ( & self ) -> bool { * self == VER_A :: _0001 } # [ doc = "Checks if the value of the field is `_0010`" ] # [ inline ( always ) ] pub fn is_0010 ( & self ) -> bool { * self == VER_A :: _0010 } } impl R { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn ic ( & self ) -> IC_R { IC_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn dpe ( & self ) -> DPE_R { DPE_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bits 28:31 - CAU version" ] # [ inline ( always ) ] pub fn ver ( & self ) -> VER_R { VER_R :: new ( ( ( self . bits >> 28 ) & 0x0f ) as u8 ) } } } # [ doc = "Accumulator register - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_caa](cau_str_caa) module" ] pub type CAU_STR_CAA = crate :: Reg < u32 , _CAU_STR_CAA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CAA ; # [ doc = "`read()` method returns [cau_str_caa::R](cau_str_caa::R) reader structure" ] impl crate :: Readable for CAU_STR_CAA { } # [ doc = "Accumulator register - Store Register command" ] pub mod cau_str_caa { # [ doc = "Reader of register CAU_STR_CAA" ] pub type R = crate :: R < u32 , super :: CAU_STR_CAA > ; # [ doc = "Reader of field `ACC`" ] pub type ACC_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - ACC" ] # [ inline ( always ) ] pub fn acc ( & self ) -> ACC_R { ACC_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 0 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca0](cau_str_ca0) module" ] pub type CAU_STR_CA0 = crate :: Reg < u32 , _CAU_STR_CA0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA0 ; # [ doc = "`read()` method returns [cau_str_ca0::R](cau_str_ca0::R) reader structure" ] impl crate :: Readable for CAU_STR_CA0 { } # [ doc = "General Purpose Register 0 - Store Register command" ] pub mod cau_str_ca0 { # [ doc = "Reader of register CAU_STR_CA0" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA0 > ; # [ doc = "Reader of field `CA0`" ] pub type CA0_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA0" ] # [ inline ( always ) ] pub fn ca0 ( & self ) -> CA0_R { CA0_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 1 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca1](cau_str_ca1) module" ] pub type CAU_STR_CA1 = crate :: Reg < u32 , _CAU_STR_CA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA1 ; # [ doc = "`read()` method returns [cau_str_ca1::R](cau_str_ca1::R) reader structure" ] impl crate :: Readable for CAU_STR_CA1 { } # [ doc = "General Purpose Register 1 - Store Register command" ] pub mod cau_str_ca1 { # [ doc = "Reader of register CAU_STR_CA1" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA1 > ; # [ doc = "Reader of field `CA1`" ] pub type CA1_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA1" ] # [ inline ( always ) ] pub fn ca1 ( & self ) -> CA1_R { CA1_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 2 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca2](cau_str_ca2) module" ] pub type CAU_STR_CA2 = crate :: Reg < u32 , _CAU_STR_CA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA2 ; # [ doc = "`read()` method returns [cau_str_ca2::R](cau_str_ca2::R) reader structure" ] impl crate :: Readable for CAU_STR_CA2 { } # [ doc = "General Purpose Register 2 - Store Register command" ] pub mod cau_str_ca2 { # [ doc = "Reader of register CAU_STR_CA2" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA2 > ; # [ doc = "Reader of field `CA2`" ] pub type CA2_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA2" ] # [ inline ( always ) ] pub fn ca2 ( & self ) -> CA2_R { CA2_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 3 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca3](cau_str_ca3) module" ] pub type CAU_STR_CA3 = crate :: Reg < u32 , _CAU_STR_CA3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA3 ; # [ doc = "`read()` method returns [cau_str_ca3::R](cau_str_ca3::R) reader structure" ] impl crate :: Readable for CAU_STR_CA3 { } # [ doc = "General Purpose Register 3 - Store Register command" ] pub mod cau_str_ca3 { # [ doc = "Reader of register CAU_STR_CA3" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA3 > ; # [ doc = "Reader of field `CA3`" ] pub type CA3_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA3" ] # [ inline ( always ) ] pub fn ca3 ( & self ) -> CA3_R { CA3_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 4 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca4](cau_str_ca4) module" ] pub type CAU_STR_CA4 = crate :: Reg < u32 , _CAU_STR_CA4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA4 ; # [ doc = "`read()` method returns [cau_str_ca4::R](cau_str_ca4::R) reader structure" ] impl crate :: Readable for CAU_STR_CA4 { } # [ doc = "General Purpose Register 4 - Store Register command" ] pub mod cau_str_ca4 { # [ doc = "Reader of register CAU_STR_CA4" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA4 > ; # [ doc = "Reader of field `CA4`" ] pub type CA4_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA4" ] # [ inline ( always ) ] pub fn ca4 ( & self ) -> CA4_R { CA4_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 5 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca5](cau_str_ca5) module" ] pub type CAU_STR_CA5 = crate :: Reg < u32 , _CAU_STR_CA5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA5 ; # [ doc = "`read()` method returns [cau_str_ca5::R](cau_str_ca5::R) reader structure" ] impl crate :: Readable for CAU_STR_CA5 { } # [ doc = "General Purpose Register 5 - Store Register command" ] pub mod cau_str_ca5 { # [ doc = "Reader of register CAU_STR_CA5" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA5 > ; # [ doc = "Reader of field `CA5`" ] pub type CA5_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA5" ] # [ inline ( always ) ] pub fn ca5 ( & self ) -> CA5_R { CA5_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 6 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca6](cau_str_ca6) module" ] pub type CAU_STR_CA6 = crate :: Reg < u32 , _CAU_STR_CA6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA6 ; # [ doc = "`read()` method returns [cau_str_ca6::R](cau_str_ca6::R) reader structure" ] impl crate :: Readable for CAU_STR_CA6 { } # [ doc = "General Purpose Register 6 - Store Register command" ] pub mod cau_str_ca6 { # [ doc = "Reader of register CAU_STR_CA6" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA6 > ; # [ doc = "Reader of field `CA6`" ] pub type CA6_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA6" ] # [ inline ( always ) ] pub fn ca6 ( & self ) -> CA6_R { CA6_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 7 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca7](cau_str_ca7) module" ] pub type CAU_STR_CA7 = crate :: Reg < u32 , _CAU_STR_CA7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA7 ; # [ doc = "`read()` method returns [cau_str_ca7::R](cau_str_ca7::R) reader structure" ] impl crate :: Readable for CAU_STR_CA7 { } # [ doc = "General Purpose Register 7 - Store Register command" ] pub mod cau_str_ca7 { # [ doc = "Reader of register CAU_STR_CA7" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA7 > ; # [ doc = "Reader of field `CA7`" ] pub type CA7_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA7" ] # [ inline ( always ) ] pub fn ca7 ( & self ) -> CA7_R { CA7_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "General Purpose Register 8 - Store Register command\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_str_ca8](cau_str_ca8) module" ] pub type CAU_STR_CA8 = crate :: Reg < u32 , _CAU_STR_CA8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_STR_CA8 ; # [ doc = "`read()` method returns [cau_str_ca8::R](cau_str_ca8::R) reader structure" ] impl crate :: Readable for CAU_STR_CA8 { } # [ doc = "General Purpose Register 8 - Store Register command" ] pub mod cau_str_ca8 { # [ doc = "Reader of register CAU_STR_CA8" ] pub type R = crate :: R < u32 , super :: CAU_STR_CA8 > ; # [ doc = "Reader of field `CA8`" ] pub type CA8_R = crate :: R < u32 , u32 > ; impl R { # [ doc = "Bits 0:31 - CA8" ] # [ inline ( always ) ] pub fn ca8 ( & self ) -> CA8_R { CA8_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } } # [ doc = "Status register - Add Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_casr](cau_adr_casr) module" ] pub type CAU_ADR_CASR = crate :: Reg < u32 , _CAU_ADR_CASR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CASR ; # [ doc = "`write(|w| ..)` method takes [cau_adr_casr::W](cau_adr_casr::W) writer structure" ] impl crate :: Writable for CAU_ADR_CASR { } # [ doc = "Status register - Add Register command" ] pub mod cau_adr_casr { # [ doc = "Writer for register CAU_ADR_CASR" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CASR > ; # [ doc = "Register CAU_ADR_CASR `reset()`'s with value 0x2000_0000" ] impl crate :: ResetValue for super :: CAU_ADR_CASR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x2000_0000 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IC_AW { # [ doc = "0: No illegal commands issued" ] _0 , # [ doc = "1: Illegal command issued" ] _1 } impl From < IC_AW > for bool { # [ inline ( always ) ] fn from ( variant : IC_AW ) -> Self { match variant { IC_AW :: _0 => false , IC_AW :: _1 => true } } } # [ doc = "Write proxy for field `IC`" ] pub struct IC_W < 'a > { w : & 'a mut W , } impl < 'a > IC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IC_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No illegal commands issued" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _0 ) } # [ doc = "Illegal command issued" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPE_AW { # [ doc = "0: No error detected" ] _0 , # [ doc = "1: DES key parity error detected" ] _1 } impl From < DPE_AW > for bool { # [ inline ( always ) ] fn from ( variant : DPE_AW ) -> Self { match variant { DPE_AW :: _0 => false , DPE_AW :: _1 => true } } } # [ doc = "Write proxy for field `DPE`" ] pub struct DPE_W < 'a > { w : & 'a mut W , } impl < 'a > DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _0 ) } # [ doc = "DES key parity error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _1 ) } # [ 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 } } # [ doc = "CAU version\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VER_AW { # [ doc = "1: Initial CAU version" ] _0001 , # [ doc = "2: Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] _0010 } impl From < VER_AW > for u8 { # [ inline ( always ) ] fn from ( variant : VER_AW ) -> Self { match variant { VER_AW :: _0001 => 1 , VER_AW :: _0010 => 2 } } } # [ doc = "Write proxy for field `VER`" ] pub struct VER_W < 'a > { w : & 'a mut W , } impl < 'a > VER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VER_AW ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Initial CAU version" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0001 ) } # [ doc = "Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0010 ) } # [ 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 & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn ic ( & mut self ) -> IC_W { IC_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn dpe ( & mut self ) -> DPE_W { DPE_W { w : self } } # [ doc = "Bits 28:31 - CAU version" ] # [ inline ( always ) ] pub fn ver ( & mut self ) -> VER_W { VER_W { w : self } } } } # [ doc = "Accumulator register - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_caa](cau_adr_caa) module" ] pub type CAU_ADR_CAA = crate :: Reg < u32 , _CAU_ADR_CAA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CAA ; # [ doc = "`write(|w| ..)` method takes [cau_adr_caa::W](cau_adr_caa::W) writer structure" ] impl crate :: Writable for CAU_ADR_CAA { } # [ doc = "Accumulator register - Add to register command" ] pub mod cau_adr_caa { # [ doc = "Writer for register CAU_ADR_CAA" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CAA > ; # [ doc = "Register CAU_ADR_CAA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CAA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `ACC`" ] pub struct ACC_W < 'a > { w : & 'a mut W , } impl < 'a > ACC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - ACC" ] # [ inline ( always ) ] pub fn acc ( & mut self ) -> ACC_W { ACC_W { w : self } } } } # [ doc = "General Purpose Register 0 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca0](cau_adr_ca0) module" ] pub type CAU_ADR_CA0 = crate :: Reg < u32 , _CAU_ADR_CA0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA0 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca0::W](cau_adr_ca0::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA0 { } # [ doc = "General Purpose Register 0 - Add to register command" ] pub mod cau_adr_ca0 { # [ doc = "Writer for register CAU_ADR_CA0" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA0 > ; # [ doc = "Register CAU_ADR_CA0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA0`" ] pub struct CA0_W < 'a > { w : & 'a mut W , } impl < 'a > CA0_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA0" ] # [ inline ( always ) ] pub fn ca0 ( & mut self ) -> CA0_W { CA0_W { w : self } } } } # [ doc = "General Purpose Register 1 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca1](cau_adr_ca1) module" ] pub type CAU_ADR_CA1 = crate :: Reg < u32 , _CAU_ADR_CA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA1 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca1::W](cau_adr_ca1::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA1 { } # [ doc = "General Purpose Register 1 - Add to register command" ] pub mod cau_adr_ca1 { # [ doc = "Writer for register CAU_ADR_CA1" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA1 > ; # [ doc = "Register CAU_ADR_CA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA1`" ] pub struct CA1_W < 'a > { w : & 'a mut W , } impl < 'a > CA1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA1" ] # [ inline ( always ) ] pub fn ca1 ( & mut self ) -> CA1_W { CA1_W { w : self } } } } # [ doc = "General Purpose Register 2 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca2](cau_adr_ca2) module" ] pub type CAU_ADR_CA2 = crate :: Reg < u32 , _CAU_ADR_CA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA2 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca2::W](cau_adr_ca2::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA2 { } # [ doc = "General Purpose Register 2 - Add to register command" ] pub mod cau_adr_ca2 { # [ doc = "Writer for register CAU_ADR_CA2" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA2 > ; # [ doc = "Register CAU_ADR_CA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA2`" ] pub struct CA2_W < 'a > { w : & 'a mut W , } impl < 'a > CA2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA2" ] # [ inline ( always ) ] pub fn ca2 ( & mut self ) -> CA2_W { CA2_W { w : self } } } } # [ doc = "General Purpose Register 3 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca3](cau_adr_ca3) module" ] pub type CAU_ADR_CA3 = crate :: Reg < u32 , _CAU_ADR_CA3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA3 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca3::W](cau_adr_ca3::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA3 { } # [ doc = "General Purpose Register 3 - Add to register command" ] pub mod cau_adr_ca3 { # [ doc = "Writer for register CAU_ADR_CA3" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA3 > ; # [ doc = "Register CAU_ADR_CA3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA3`" ] pub struct CA3_W < 'a > { w : & 'a mut W , } impl < 'a > CA3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA3" ] # [ inline ( always ) ] pub fn ca3 ( & mut self ) -> CA3_W { CA3_W { w : self } } } } # [ doc = "General Purpose Register 4 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca4](cau_adr_ca4) module" ] pub type CAU_ADR_CA4 = crate :: Reg < u32 , _CAU_ADR_CA4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA4 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca4::W](cau_adr_ca4::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA4 { } # [ doc = "General Purpose Register 4 - Add to register command" ] pub mod cau_adr_ca4 { # [ doc = "Writer for register CAU_ADR_CA4" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA4 > ; # [ doc = "Register CAU_ADR_CA4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA4`" ] pub struct CA4_W < 'a > { w : & 'a mut W , } impl < 'a > CA4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA4" ] # [ inline ( always ) ] pub fn ca4 ( & mut self ) -> CA4_W { CA4_W { w : self } } } } # [ doc = "General Purpose Register 5 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca5](cau_adr_ca5) module" ] pub type CAU_ADR_CA5 = crate :: Reg < u32 , _CAU_ADR_CA5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA5 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca5::W](cau_adr_ca5::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA5 { } # [ doc = "General Purpose Register 5 - Add to register command" ] pub mod cau_adr_ca5 { # [ doc = "Writer for register CAU_ADR_CA5" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA5 > ; # [ doc = "Register CAU_ADR_CA5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA5`" ] pub struct CA5_W < 'a > { w : & 'a mut W , } impl < 'a > CA5_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA5" ] # [ inline ( always ) ] pub fn ca5 ( & mut self ) -> CA5_W { CA5_W { w : self } } } } # [ doc = "General Purpose Register 6 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca6](cau_adr_ca6) module" ] pub type CAU_ADR_CA6 = crate :: Reg < u32 , _CAU_ADR_CA6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA6 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca6::W](cau_adr_ca6::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA6 { } # [ doc = "General Purpose Register 6 - Add to register command" ] pub mod cau_adr_ca6 { # [ doc = "Writer for register CAU_ADR_CA6" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA6 > ; # [ doc = "Register CAU_ADR_CA6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA6`" ] pub struct CA6_W < 'a > { w : & 'a mut W , } impl < 'a > CA6_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA6" ] # [ inline ( always ) ] pub fn ca6 ( & mut self ) -> CA6_W { CA6_W { w : self } } } } # [ doc = "General Purpose Register 7 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca7](cau_adr_ca7) module" ] pub type CAU_ADR_CA7 = crate :: Reg < u32 , _CAU_ADR_CA7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA7 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca7::W](cau_adr_ca7::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA7 { } # [ doc = "General Purpose Register 7 - Add to register command" ] pub mod cau_adr_ca7 { # [ doc = "Writer for register CAU_ADR_CA7" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA7 > ; # [ doc = "Register CAU_ADR_CA7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA7`" ] pub struct CA7_W < 'a > { w : & 'a mut W , } impl < 'a > CA7_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA7" ] # [ inline ( always ) ] pub fn ca7 ( & mut self ) -> CA7_W { CA7_W { w : self } } } } # [ doc = "General Purpose Register 8 - Add to register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_adr_ca8](cau_adr_ca8) module" ] pub type CAU_ADR_CA8 = crate :: Reg < u32 , _CAU_ADR_CA8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ADR_CA8 ; # [ doc = "`write(|w| ..)` method takes [cau_adr_ca8::W](cau_adr_ca8::W) writer structure" ] impl crate :: Writable for CAU_ADR_CA8 { } # [ doc = "General Purpose Register 8 - Add to register command" ] pub mod cau_adr_ca8 { # [ doc = "Writer for register CAU_ADR_CA8" ] pub type W = crate :: W < u32 , super :: CAU_ADR_CA8 > ; # [ doc = "Register CAU_ADR_CA8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ADR_CA8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA8`" ] pub struct CA8_W < 'a > { w : & 'a mut W , } impl < 'a > CA8_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA8" ] # [ inline ( always ) ] pub fn ca8 ( & mut self ) -> CA8_W { CA8_W { w : self } } } } # [ doc = "Status register - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_casr](cau_radr_casr) module" ] pub type CAU_RADR_CASR = crate :: Reg < u32 , _CAU_RADR_CASR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CASR ; # [ doc = "`write(|w| ..)` method takes [cau_radr_casr::W](cau_radr_casr::W) writer structure" ] impl crate :: Writable for CAU_RADR_CASR { } # [ doc = "Status register - Reverse and Add to Register command" ] pub mod cau_radr_casr { # [ doc = "Writer for register CAU_RADR_CASR" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CASR > ; # [ doc = "Register CAU_RADR_CASR `reset()`'s with value 0x2000_0000" ] impl crate :: ResetValue for super :: CAU_RADR_CASR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x2000_0000 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IC_AW { # [ doc = "0: No illegal commands issued" ] _0 , # [ doc = "1: Illegal command issued" ] _1 } impl From < IC_AW > for bool { # [ inline ( always ) ] fn from ( variant : IC_AW ) -> Self { match variant { IC_AW :: _0 => false , IC_AW :: _1 => true } } } # [ doc = "Write proxy for field `IC`" ] pub struct IC_W < 'a > { w : & 'a mut W , } impl < 'a > IC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IC_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No illegal commands issued" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _0 ) } # [ doc = "Illegal command issued" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPE_AW { # [ doc = "0: No error detected" ] _0 , # [ doc = "1: DES key parity error detected" ] _1 } impl From < DPE_AW > for bool { # [ inline ( always ) ] fn from ( variant : DPE_AW ) -> Self { match variant { DPE_AW :: _0 => false , DPE_AW :: _1 => true } } } # [ doc = "Write proxy for field `DPE`" ] pub struct DPE_W < 'a > { w : & 'a mut W , } impl < 'a > DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _0 ) } # [ doc = "DES key parity error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _1 ) } # [ 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 } } # [ doc = "CAU version\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VER_AW { # [ doc = "1: Initial CAU version" ] _0001 , # [ doc = "2: Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] _0010 } impl From < VER_AW > for u8 { # [ inline ( always ) ] fn from ( variant : VER_AW ) -> Self { match variant { VER_AW :: _0001 => 1 , VER_AW :: _0010 => 2 } } } # [ doc = "Write proxy for field `VER`" ] pub struct VER_W < 'a > { w : & 'a mut W , } impl < 'a > VER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VER_AW ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Initial CAU version" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0001 ) } # [ doc = "Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0010 ) } # [ 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 & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn ic ( & mut self ) -> IC_W { IC_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn dpe ( & mut self ) -> DPE_W { DPE_W { w : self } } # [ doc = "Bits 28:31 - CAU version" ] # [ inline ( always ) ] pub fn ver ( & mut self ) -> VER_W { VER_W { w : self } } } } # [ doc = "Accumulator register - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_caa](cau_radr_caa) module" ] pub type CAU_RADR_CAA = crate :: Reg < u32 , _CAU_RADR_CAA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CAA ; # [ doc = "`write(|w| ..)` method takes [cau_radr_caa::W](cau_radr_caa::W) writer structure" ] impl crate :: Writable for CAU_RADR_CAA { } # [ doc = "Accumulator register - Reverse and Add to Register command" ] pub mod cau_radr_caa { # [ doc = "Writer for register CAU_RADR_CAA" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CAA > ; # [ doc = "Register CAU_RADR_CAA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CAA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `ACC`" ] pub struct ACC_W < 'a > { w : & 'a mut W , } impl < 'a > ACC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - ACC" ] # [ inline ( always ) ] pub fn acc ( & mut self ) -> ACC_W { ACC_W { w : self } } } } # [ doc = "General Purpose Register 0 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca0](cau_radr_ca0) module" ] pub type CAU_RADR_CA0 = crate :: Reg < u32 , _CAU_RADR_CA0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA0 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca0::W](cau_radr_ca0::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA0 { } # [ doc = "General Purpose Register 0 - Reverse and Add to Register command" ] pub mod cau_radr_ca0 { # [ doc = "Writer for register CAU_RADR_CA0" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA0 > ; # [ doc = "Register CAU_RADR_CA0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA0`" ] pub struct CA0_W < 'a > { w : & 'a mut W , } impl < 'a > CA0_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA0" ] # [ inline ( always ) ] pub fn ca0 ( & mut self ) -> CA0_W { CA0_W { w : self } } } } # [ doc = "General Purpose Register 1 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca1](cau_radr_ca1) module" ] pub type CAU_RADR_CA1 = crate :: Reg < u32 , _CAU_RADR_CA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA1 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca1::W](cau_radr_ca1::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA1 { } # [ doc = "General Purpose Register 1 - Reverse and Add to Register command" ] pub mod cau_radr_ca1 { # [ doc = "Writer for register CAU_RADR_CA1" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA1 > ; # [ doc = "Register CAU_RADR_CA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA1`" ] pub struct CA1_W < 'a > { w : & 'a mut W , } impl < 'a > CA1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA1" ] # [ inline ( always ) ] pub fn ca1 ( & mut self ) -> CA1_W { CA1_W { w : self } } } } # [ doc = "General Purpose Register 2 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca2](cau_radr_ca2) module" ] pub type CAU_RADR_CA2 = crate :: Reg < u32 , _CAU_RADR_CA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA2 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca2::W](cau_radr_ca2::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA2 { } # [ doc = "General Purpose Register 2 - Reverse and Add to Register command" ] pub mod cau_radr_ca2 { # [ doc = "Writer for register CAU_RADR_CA2" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA2 > ; # [ doc = "Register CAU_RADR_CA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA2`" ] pub struct CA2_W < 'a > { w : & 'a mut W , } impl < 'a > CA2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA2" ] # [ inline ( always ) ] pub fn ca2 ( & mut self ) -> CA2_W { CA2_W { w : self } } } } # [ doc = "General Purpose Register 3 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca3](cau_radr_ca3) module" ] pub type CAU_RADR_CA3 = crate :: Reg < u32 , _CAU_RADR_CA3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA3 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca3::W](cau_radr_ca3::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA3 { } # [ doc = "General Purpose Register 3 - Reverse and Add to Register command" ] pub mod cau_radr_ca3 { # [ doc = "Writer for register CAU_RADR_CA3" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA3 > ; # [ doc = "Register CAU_RADR_CA3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA3`" ] pub struct CA3_W < 'a > { w : & 'a mut W , } impl < 'a > CA3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA3" ] # [ inline ( always ) ] pub fn ca3 ( & mut self ) -> CA3_W { CA3_W { w : self } } } } # [ doc = "General Purpose Register 4 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca4](cau_radr_ca4) module" ] pub type CAU_RADR_CA4 = crate :: Reg < u32 , _CAU_RADR_CA4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA4 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca4::W](cau_radr_ca4::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA4 { } # [ doc = "General Purpose Register 4 - Reverse and Add to Register command" ] pub mod cau_radr_ca4 { # [ doc = "Writer for register CAU_RADR_CA4" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA4 > ; # [ doc = "Register CAU_RADR_CA4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA4`" ] pub struct CA4_W < 'a > { w : & 'a mut W , } impl < 'a > CA4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA4" ] # [ inline ( always ) ] pub fn ca4 ( & mut self ) -> CA4_W { CA4_W { w : self } } } } # [ doc = "General Purpose Register 5 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca5](cau_radr_ca5) module" ] pub type CAU_RADR_CA5 = crate :: Reg < u32 , _CAU_RADR_CA5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA5 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca5::W](cau_radr_ca5::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA5 { } # [ doc = "General Purpose Register 5 - Reverse and Add to Register command" ] pub mod cau_radr_ca5 { # [ doc = "Writer for register CAU_RADR_CA5" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA5 > ; # [ doc = "Register CAU_RADR_CA5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA5`" ] pub struct CA5_W < 'a > { w : & 'a mut W , } impl < 'a > CA5_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA5" ] # [ inline ( always ) ] pub fn ca5 ( & mut self ) -> CA5_W { CA5_W { w : self } } } } # [ doc = "General Purpose Register 6 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca6](cau_radr_ca6) module" ] pub type CAU_RADR_CA6 = crate :: Reg < u32 , _CAU_RADR_CA6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA6 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca6::W](cau_radr_ca6::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA6 { } # [ doc = "General Purpose Register 6 - Reverse and Add to Register command" ] pub mod cau_radr_ca6 { # [ doc = "Writer for register CAU_RADR_CA6" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA6 > ; # [ doc = "Register CAU_RADR_CA6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA6`" ] pub struct CA6_W < 'a > { w : & 'a mut W , } impl < 'a > CA6_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA6" ] # [ inline ( always ) ] pub fn ca6 ( & mut self ) -> CA6_W { CA6_W { w : self } } } } # [ doc = "General Purpose Register 7 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca7](cau_radr_ca7) module" ] pub type CAU_RADR_CA7 = crate :: Reg < u32 , _CAU_RADR_CA7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA7 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca7::W](cau_radr_ca7::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA7 { } # [ doc = "General Purpose Register 7 - Reverse and Add to Register command" ] pub mod cau_radr_ca7 { # [ doc = "Writer for register CAU_RADR_CA7" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA7 > ; # [ doc = "Register CAU_RADR_CA7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA7`" ] pub struct CA7_W < 'a > { w : & 'a mut W , } impl < 'a > CA7_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA7" ] # [ inline ( always ) ] pub fn ca7 ( & mut self ) -> CA7_W { CA7_W { w : self } } } } # [ doc = "General Purpose Register 8 - Reverse and Add to Register command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_radr_ca8](cau_radr_ca8) module" ] pub type CAU_RADR_CA8 = crate :: Reg < u32 , _CAU_RADR_CA8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_RADR_CA8 ; # [ doc = "`write(|w| ..)` method takes [cau_radr_ca8::W](cau_radr_ca8::W) writer structure" ] impl crate :: Writable for CAU_RADR_CA8 { } # [ doc = "General Purpose Register 8 - Reverse and Add to Register command" ] pub mod cau_radr_ca8 { # [ doc = "Writer for register CAU_RADR_CA8" ] pub type W = crate :: W < u32 , super :: CAU_RADR_CA8 > ; # [ doc = "Register CAU_RADR_CA8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_RADR_CA8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA8`" ] pub struct CA8_W < 'a > { w : & 'a mut W , } impl < 'a > CA8_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA8" ] # [ inline ( always ) ] pub fn ca8 ( & mut self ) -> CA8_W { CA8_W { w : self } } } } # [ doc = "Status register - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_casr](cau_xor_casr) module" ] pub type CAU_XOR_CASR = crate :: Reg < u32 , _CAU_XOR_CASR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CASR ; # [ doc = "`write(|w| ..)` method takes [cau_xor_casr::W](cau_xor_casr::W) writer structure" ] impl crate :: Writable for CAU_XOR_CASR { } # [ doc = "Status register - Exclusive Or command" ] pub mod cau_xor_casr { # [ doc = "Writer for register CAU_XOR_CASR" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CASR > ; # [ doc = "Register CAU_XOR_CASR `reset()`'s with value 0x2000_0000" ] impl crate :: ResetValue for super :: CAU_XOR_CASR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x2000_0000 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IC_AW { # [ doc = "0: No illegal commands issued" ] _0 , # [ doc = "1: Illegal command issued" ] _1 } impl From < IC_AW > for bool { # [ inline ( always ) ] fn from ( variant : IC_AW ) -> Self { match variant { IC_AW :: _0 => false , IC_AW :: _1 => true } } } # [ doc = "Write proxy for field `IC`" ] pub struct IC_W < 'a > { w : & 'a mut W , } impl < 'a > IC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IC_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No illegal commands issued" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _0 ) } # [ doc = "Illegal command issued" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPE_AW { # [ doc = "0: No error detected" ] _0 , # [ doc = "1: DES key parity error detected" ] _1 } impl From < DPE_AW > for bool { # [ inline ( always ) ] fn from ( variant : DPE_AW ) -> Self { match variant { DPE_AW :: _0 => false , DPE_AW :: _1 => true } } } # [ doc = "Write proxy for field `DPE`" ] pub struct DPE_W < 'a > { w : & 'a mut W , } impl < 'a > DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _0 ) } # [ doc = "DES key parity error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _1 ) } # [ 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 } } # [ doc = "CAU version\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VER_AW { # [ doc = "1: Initial CAU version" ] _0001 , # [ doc = "2: Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] _0010 } impl From < VER_AW > for u8 { # [ inline ( always ) ] fn from ( variant : VER_AW ) -> Self { match variant { VER_AW :: _0001 => 1 , VER_AW :: _0010 => 2 } } } # [ doc = "Write proxy for field `VER`" ] pub struct VER_W < 'a > { w : & 'a mut W , } impl < 'a > VER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VER_AW ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Initial CAU version" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0001 ) } # [ doc = "Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0010 ) } # [ 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 & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn ic ( & mut self ) -> IC_W { IC_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn dpe ( & mut self ) -> DPE_W { DPE_W { w : self } } # [ doc = "Bits 28:31 - CAU version" ] # [ inline ( always ) ] pub fn ver ( & mut self ) -> VER_W { VER_W { w : self } } } } # [ doc = "Accumulator register - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_caa](cau_xor_caa) module" ] pub type CAU_XOR_CAA = crate :: Reg < u32 , _CAU_XOR_CAA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CAA ; # [ doc = "`write(|w| ..)` method takes [cau_xor_caa::W](cau_xor_caa::W) writer structure" ] impl crate :: Writable for CAU_XOR_CAA { } # [ doc = "Accumulator register - Exclusive Or command" ] pub mod cau_xor_caa { # [ doc = "Writer for register CAU_XOR_CAA" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CAA > ; # [ doc = "Register CAU_XOR_CAA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CAA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `ACC`" ] pub struct ACC_W < 'a > { w : & 'a mut W , } impl < 'a > ACC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - ACC" ] # [ inline ( always ) ] pub fn acc ( & mut self ) -> ACC_W { ACC_W { w : self } } } } # [ doc = "General Purpose Register 0 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca0](cau_xor_ca0) module" ] pub type CAU_XOR_CA0 = crate :: Reg < u32 , _CAU_XOR_CA0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA0 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca0::W](cau_xor_ca0::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA0 { } # [ doc = "General Purpose Register 0 - Exclusive Or command" ] pub mod cau_xor_ca0 { # [ doc = "Writer for register CAU_XOR_CA0" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA0 > ; # [ doc = "Register CAU_XOR_CA0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA0`" ] pub struct CA0_W < 'a > { w : & 'a mut W , } impl < 'a > CA0_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA0" ] # [ inline ( always ) ] pub fn ca0 ( & mut self ) -> CA0_W { CA0_W { w : self } } } } # [ doc = "General Purpose Register 1 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca1](cau_xor_ca1) module" ] pub type CAU_XOR_CA1 = crate :: Reg < u32 , _CAU_XOR_CA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA1 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca1::W](cau_xor_ca1::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA1 { } # [ doc = "General Purpose Register 1 - Exclusive Or command" ] pub mod cau_xor_ca1 { # [ doc = "Writer for register CAU_XOR_CA1" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA1 > ; # [ doc = "Register CAU_XOR_CA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA1`" ] pub struct CA1_W < 'a > { w : & 'a mut W , } impl < 'a > CA1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA1" ] # [ inline ( always ) ] pub fn ca1 ( & mut self ) -> CA1_W { CA1_W { w : self } } } } # [ doc = "General Purpose Register 2 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca2](cau_xor_ca2) module" ] pub type CAU_XOR_CA2 = crate :: Reg < u32 , _CAU_XOR_CA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA2 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca2::W](cau_xor_ca2::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA2 { } # [ doc = "General Purpose Register 2 - Exclusive Or command" ] pub mod cau_xor_ca2 { # [ doc = "Writer for register CAU_XOR_CA2" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA2 > ; # [ doc = "Register CAU_XOR_CA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA2`" ] pub struct CA2_W < 'a > { w : & 'a mut W , } impl < 'a > CA2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA2" ] # [ inline ( always ) ] pub fn ca2 ( & mut self ) -> CA2_W { CA2_W { w : self } } } } # [ doc = "General Purpose Register 3 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca3](cau_xor_ca3) module" ] pub type CAU_XOR_CA3 = crate :: Reg < u32 , _CAU_XOR_CA3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA3 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca3::W](cau_xor_ca3::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA3 { } # [ doc = "General Purpose Register 3 - Exclusive Or command" ] pub mod cau_xor_ca3 { # [ doc = "Writer for register CAU_XOR_CA3" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA3 > ; # [ doc = "Register CAU_XOR_CA3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA3`" ] pub struct CA3_W < 'a > { w : & 'a mut W , } impl < 'a > CA3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA3" ] # [ inline ( always ) ] pub fn ca3 ( & mut self ) -> CA3_W { CA3_W { w : self } } } } # [ doc = "General Purpose Register 4 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca4](cau_xor_ca4) module" ] pub type CAU_XOR_CA4 = crate :: Reg < u32 , _CAU_XOR_CA4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA4 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca4::W](cau_xor_ca4::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA4 { } # [ doc = "General Purpose Register 4 - Exclusive Or command" ] pub mod cau_xor_ca4 { # [ doc = "Writer for register CAU_XOR_CA4" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA4 > ; # [ doc = "Register CAU_XOR_CA4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA4`" ] pub struct CA4_W < 'a > { w : & 'a mut W , } impl < 'a > CA4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA4" ] # [ inline ( always ) ] pub fn ca4 ( & mut self ) -> CA4_W { CA4_W { w : self } } } } # [ doc = "General Purpose Register 5 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca5](cau_xor_ca5) module" ] pub type CAU_XOR_CA5 = crate :: Reg < u32 , _CAU_XOR_CA5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA5 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca5::W](cau_xor_ca5::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA5 { } # [ doc = "General Purpose Register 5 - Exclusive Or command" ] pub mod cau_xor_ca5 { # [ doc = "Writer for register CAU_XOR_CA5" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA5 > ; # [ doc = "Register CAU_XOR_CA5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA5`" ] pub struct CA5_W < 'a > { w : & 'a mut W , } impl < 'a > CA5_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA5" ] # [ inline ( always ) ] pub fn ca5 ( & mut self ) -> CA5_W { CA5_W { w : self } } } } # [ doc = "General Purpose Register 6 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca6](cau_xor_ca6) module" ] pub type CAU_XOR_CA6 = crate :: Reg < u32 , _CAU_XOR_CA6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA6 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca6::W](cau_xor_ca6::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA6 { } # [ doc = "General Purpose Register 6 - Exclusive Or command" ] pub mod cau_xor_ca6 { # [ doc = "Writer for register CAU_XOR_CA6" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA6 > ; # [ doc = "Register CAU_XOR_CA6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA6`" ] pub struct CA6_W < 'a > { w : & 'a mut W , } impl < 'a > CA6_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA6" ] # [ inline ( always ) ] pub fn ca6 ( & mut self ) -> CA6_W { CA6_W { w : self } } } } # [ doc = "General Purpose Register 7 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca7](cau_xor_ca7) module" ] pub type CAU_XOR_CA7 = crate :: Reg < u32 , _CAU_XOR_CA7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA7 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca7::W](cau_xor_ca7::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA7 { } # [ doc = "General Purpose Register 7 - Exclusive Or command" ] pub mod cau_xor_ca7 { # [ doc = "Writer for register CAU_XOR_CA7" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA7 > ; # [ doc = "Register CAU_XOR_CA7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA7`" ] pub struct CA7_W < 'a > { w : & 'a mut W , } impl < 'a > CA7_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA7" ] # [ inline ( always ) ] pub fn ca7 ( & mut self ) -> CA7_W { CA7_W { w : self } } } } # [ doc = "General Purpose Register 8 - Exclusive Or command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_xor_ca8](cau_xor_ca8) module" ] pub type CAU_XOR_CA8 = crate :: Reg < u32 , _CAU_XOR_CA8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_XOR_CA8 ; # [ doc = "`write(|w| ..)` method takes [cau_xor_ca8::W](cau_xor_ca8::W) writer structure" ] impl crate :: Writable for CAU_XOR_CA8 { } # [ doc = "General Purpose Register 8 - Exclusive Or command" ] pub mod cau_xor_ca8 { # [ doc = "Writer for register CAU_XOR_CA8" ] pub type W = crate :: W < u32 , super :: CAU_XOR_CA8 > ; # [ doc = "Register CAU_XOR_CA8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_XOR_CA8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA8`" ] pub struct CA8_W < 'a > { w : & 'a mut W , } impl < 'a > CA8_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA8" ] # [ inline ( always ) ] pub fn ca8 ( & mut self ) -> CA8_W { CA8_W { w : self } } } } # [ doc = "Status register - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_casr](cau_rotl_casr) module" ] pub type CAU_ROTL_CASR = crate :: Reg < u32 , _CAU_ROTL_CASR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CASR ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_casr::W](cau_rotl_casr::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CASR { } # [ doc = "Status register - Rotate Left command" ] pub mod cau_rotl_casr { # [ doc = "Writer for register CAU_ROTL_CASR" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CASR > ; # [ doc = "Register CAU_ROTL_CASR `reset()`'s with value 0x2000_0000" ] impl crate :: ResetValue for super :: CAU_ROTL_CASR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x2000_0000 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IC_AW { # [ doc = "0: No illegal commands issued" ] _0 , # [ doc = "1: Illegal command issued" ] _1 } impl From < IC_AW > for bool { # [ inline ( always ) ] fn from ( variant : IC_AW ) -> Self { match variant { IC_AW :: _0 => false , IC_AW :: _1 => true } } } # [ doc = "Write proxy for field `IC`" ] pub struct IC_W < 'a > { w : & 'a mut W , } impl < 'a > IC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IC_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No illegal commands issued" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _0 ) } # [ doc = "Illegal command issued" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPE_AW { # [ doc = "0: No error detected" ] _0 , # [ doc = "1: DES key parity error detected" ] _1 } impl From < DPE_AW > for bool { # [ inline ( always ) ] fn from ( variant : DPE_AW ) -> Self { match variant { DPE_AW :: _0 => false , DPE_AW :: _1 => true } } } # [ doc = "Write proxy for field `DPE`" ] pub struct DPE_W < 'a > { w : & 'a mut W , } impl < 'a > DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _0 ) } # [ doc = "DES key parity error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _1 ) } # [ 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 } } # [ doc = "CAU version\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VER_AW { # [ doc = "1: Initial CAU version" ] _0001 , # [ doc = "2: Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] _0010 } impl From < VER_AW > for u8 { # [ inline ( always ) ] fn from ( variant : VER_AW ) -> Self { match variant { VER_AW :: _0001 => 1 , VER_AW :: _0010 => 2 } } } # [ doc = "Write proxy for field `VER`" ] pub struct VER_W < 'a > { w : & 'a mut W , } impl < 'a > VER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VER_AW ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Initial CAU version" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0001 ) } # [ doc = "Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0010 ) } # [ 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 & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn ic ( & mut self ) -> IC_W { IC_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn dpe ( & mut self ) -> DPE_W { DPE_W { w : self } } # [ doc = "Bits 28:31 - CAU version" ] # [ inline ( always ) ] pub fn ver ( & mut self ) -> VER_W { VER_W { w : self } } } } # [ doc = "Accumulator register - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_caa](cau_rotl_caa) module" ] pub type CAU_ROTL_CAA = crate :: Reg < u32 , _CAU_ROTL_CAA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CAA ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_caa::W](cau_rotl_caa::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CAA { } # [ doc = "Accumulator register - Rotate Left command" ] pub mod cau_rotl_caa { # [ doc = "Writer for register CAU_ROTL_CAA" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CAA > ; # [ doc = "Register CAU_ROTL_CAA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CAA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `ACC`" ] pub struct ACC_W < 'a > { w : & 'a mut W , } impl < 'a > ACC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - ACC" ] # [ inline ( always ) ] pub fn acc ( & mut self ) -> ACC_W { ACC_W { w : self } } } } # [ doc = "General Purpose Register 0 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca0](cau_rotl_ca0) module" ] pub type CAU_ROTL_CA0 = crate :: Reg < u32 , _CAU_ROTL_CA0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA0 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca0::W](cau_rotl_ca0::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA0 { } # [ doc = "General Purpose Register 0 - Rotate Left command" ] pub mod cau_rotl_ca0 { # [ doc = "Writer for register CAU_ROTL_CA0" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA0 > ; # [ doc = "Register CAU_ROTL_CA0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA0`" ] pub struct CA0_W < 'a > { w : & 'a mut W , } impl < 'a > CA0_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA0" ] # [ inline ( always ) ] pub fn ca0 ( & mut self ) -> CA0_W { CA0_W { w : self } } } } # [ doc = "General Purpose Register 1 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca1](cau_rotl_ca1) module" ] pub type CAU_ROTL_CA1 = crate :: Reg < u32 , _CAU_ROTL_CA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA1 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca1::W](cau_rotl_ca1::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA1 { } # [ doc = "General Purpose Register 1 - Rotate Left command" ] pub mod cau_rotl_ca1 { # [ doc = "Writer for register CAU_ROTL_CA1" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA1 > ; # [ doc = "Register CAU_ROTL_CA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA1`" ] pub struct CA1_W < 'a > { w : & 'a mut W , } impl < 'a > CA1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA1" ] # [ inline ( always ) ] pub fn ca1 ( & mut self ) -> CA1_W { CA1_W { w : self } } } } # [ doc = "General Purpose Register 2 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca2](cau_rotl_ca2) module" ] pub type CAU_ROTL_CA2 = crate :: Reg < u32 , _CAU_ROTL_CA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA2 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca2::W](cau_rotl_ca2::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA2 { } # [ doc = "General Purpose Register 2 - Rotate Left command" ] pub mod cau_rotl_ca2 { # [ doc = "Writer for register CAU_ROTL_CA2" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA2 > ; # [ doc = "Register CAU_ROTL_CA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA2`" ] pub struct CA2_W < 'a > { w : & 'a mut W , } impl < 'a > CA2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA2" ] # [ inline ( always ) ] pub fn ca2 ( & mut self ) -> CA2_W { CA2_W { w : self } } } } # [ doc = "General Purpose Register 3 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca3](cau_rotl_ca3) module" ] pub type CAU_ROTL_CA3 = crate :: Reg < u32 , _CAU_ROTL_CA3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA3 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca3::W](cau_rotl_ca3::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA3 { } # [ doc = "General Purpose Register 3 - Rotate Left command" ] pub mod cau_rotl_ca3 { # [ doc = "Writer for register CAU_ROTL_CA3" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA3 > ; # [ doc = "Register CAU_ROTL_CA3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA3`" ] pub struct CA3_W < 'a > { w : & 'a mut W , } impl < 'a > CA3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA3" ] # [ inline ( always ) ] pub fn ca3 ( & mut self ) -> CA3_W { CA3_W { w : self } } } } # [ doc = "General Purpose Register 4 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca4](cau_rotl_ca4) module" ] pub type CAU_ROTL_CA4 = crate :: Reg < u32 , _CAU_ROTL_CA4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA4 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca4::W](cau_rotl_ca4::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA4 { } # [ doc = "General Purpose Register 4 - Rotate Left command" ] pub mod cau_rotl_ca4 { # [ doc = "Writer for register CAU_ROTL_CA4" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA4 > ; # [ doc = "Register CAU_ROTL_CA4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA4`" ] pub struct CA4_W < 'a > { w : & 'a mut W , } impl < 'a > CA4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA4" ] # [ inline ( always ) ] pub fn ca4 ( & mut self ) -> CA4_W { CA4_W { w : self } } } } # [ doc = "General Purpose Register 5 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca5](cau_rotl_ca5) module" ] pub type CAU_ROTL_CA5 = crate :: Reg < u32 , _CAU_ROTL_CA5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA5 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca5::W](cau_rotl_ca5::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA5 { } # [ doc = "General Purpose Register 5 - Rotate Left command" ] pub mod cau_rotl_ca5 { # [ doc = "Writer for register CAU_ROTL_CA5" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA5 > ; # [ doc = "Register CAU_ROTL_CA5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA5`" ] pub struct CA5_W < 'a > { w : & 'a mut W , } impl < 'a > CA5_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA5" ] # [ inline ( always ) ] pub fn ca5 ( & mut self ) -> CA5_W { CA5_W { w : self } } } } # [ doc = "General Purpose Register 6 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca6](cau_rotl_ca6) module" ] pub type CAU_ROTL_CA6 = crate :: Reg < u32 , _CAU_ROTL_CA6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA6 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca6::W](cau_rotl_ca6::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA6 { } # [ doc = "General Purpose Register 6 - Rotate Left command" ] pub mod cau_rotl_ca6 { # [ doc = "Writer for register CAU_ROTL_CA6" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA6 > ; # [ doc = "Register CAU_ROTL_CA6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA6`" ] pub struct CA6_W < 'a > { w : & 'a mut W , } impl < 'a > CA6_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA6" ] # [ inline ( always ) ] pub fn ca6 ( & mut self ) -> CA6_W { CA6_W { w : self } } } } # [ doc = "General Purpose Register 7 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca7](cau_rotl_ca7) module" ] pub type CAU_ROTL_CA7 = crate :: Reg < u32 , _CAU_ROTL_CA7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA7 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca7::W](cau_rotl_ca7::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA7 { } # [ doc = "General Purpose Register 7 - Rotate Left command" ] pub mod cau_rotl_ca7 { # [ doc = "Writer for register CAU_ROTL_CA7" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA7 > ; # [ doc = "Register CAU_ROTL_CA7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA7`" ] pub struct CA7_W < 'a > { w : & 'a mut W , } impl < 'a > CA7_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA7" ] # [ inline ( always ) ] pub fn ca7 ( & mut self ) -> CA7_W { CA7_W { w : self } } } } # [ doc = "General Purpose Register 8 - Rotate Left command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_rotl_ca8](cau_rotl_ca8) module" ] pub type CAU_ROTL_CA8 = crate :: Reg < u32 , _CAU_ROTL_CA8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_ROTL_CA8 ; # [ doc = "`write(|w| ..)` method takes [cau_rotl_ca8::W](cau_rotl_ca8::W) writer structure" ] impl crate :: Writable for CAU_ROTL_CA8 { } # [ doc = "General Purpose Register 8 - Rotate Left command" ] pub mod cau_rotl_ca8 { # [ doc = "Writer for register CAU_ROTL_CA8" ] pub type W = crate :: W < u32 , super :: CAU_ROTL_CA8 > ; # [ doc = "Register CAU_ROTL_CA8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_ROTL_CA8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA8`" ] pub struct CA8_W < 'a > { w : & 'a mut W , } impl < 'a > CA8_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA8" ] # [ inline ( always ) ] pub fn ca8 ( & mut self ) -> CA8_W { CA8_W { w : self } } } } # [ doc = "Status register - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_casr](cau_aesc_casr) module" ] pub type CAU_AESC_CASR = crate :: Reg < u32 , _CAU_AESC_CASR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CASR ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_casr::W](cau_aesc_casr::W) writer structure" ] impl crate :: Writable for CAU_AESC_CASR { } # [ doc = "Status register - AES Column Operation command" ] pub mod cau_aesc_casr { # [ doc = "Writer for register CAU_AESC_CASR" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CASR > ; # [ doc = "Register CAU_AESC_CASR `reset()`'s with value 0x2000_0000" ] impl crate :: ResetValue for super :: CAU_AESC_CASR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x2000_0000 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IC_AW { # [ doc = "0: No illegal commands issued" ] _0 , # [ doc = "1: Illegal command issued" ] _1 } impl From < IC_AW > for bool { # [ inline ( always ) ] fn from ( variant : IC_AW ) -> Self { match variant { IC_AW :: _0 => false , IC_AW :: _1 => true } } } # [ doc = "Write proxy for field `IC`" ] pub struct IC_W < 'a > { w : & 'a mut W , } impl < 'a > IC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IC_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No illegal commands issued" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _0 ) } # [ doc = "Illegal command issued" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPE_AW { # [ doc = "0: No error detected" ] _0 , # [ doc = "1: DES key parity error detected" ] _1 } impl From < DPE_AW > for bool { # [ inline ( always ) ] fn from ( variant : DPE_AW ) -> Self { match variant { DPE_AW :: _0 => false , DPE_AW :: _1 => true } } } # [ doc = "Write proxy for field `DPE`" ] pub struct DPE_W < 'a > { w : & 'a mut W , } impl < 'a > DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _0 ) } # [ doc = "DES key parity error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _1 ) } # [ 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 } } # [ doc = "CAU version\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VER_AW { # [ doc = "1: Initial CAU version" ] _0001 , # [ doc = "2: Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] _0010 } impl From < VER_AW > for u8 { # [ inline ( always ) ] fn from ( variant : VER_AW ) -> Self { match variant { VER_AW :: _0001 => 1 , VER_AW :: _0010 => 2 } } } # [ doc = "Write proxy for field `VER`" ] pub struct VER_W < 'a > { w : & 'a mut W , } impl < 'a > VER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VER_AW ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Initial CAU version" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0001 ) } # [ doc = "Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0010 ) } # [ 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 & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn ic ( & mut self ) -> IC_W { IC_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn dpe ( & mut self ) -> DPE_W { DPE_W { w : self } } # [ doc = "Bits 28:31 - CAU version" ] # [ inline ( always ) ] pub fn ver ( & mut self ) -> VER_W { VER_W { w : self } } } } # [ doc = "Accumulator register - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_caa](cau_aesc_caa) module" ] pub type CAU_AESC_CAA = crate :: Reg < u32 , _CAU_AESC_CAA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CAA ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_caa::W](cau_aesc_caa::W) writer structure" ] impl crate :: Writable for CAU_AESC_CAA { } # [ doc = "Accumulator register - AES Column Operation command" ] pub mod cau_aesc_caa { # [ doc = "Writer for register CAU_AESC_CAA" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CAA > ; # [ doc = "Register CAU_AESC_CAA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CAA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `ACC`" ] pub struct ACC_W < 'a > { w : & 'a mut W , } impl < 'a > ACC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - ACC" ] # [ inline ( always ) ] pub fn acc ( & mut self ) -> ACC_W { ACC_W { w : self } } } } # [ doc = "General Purpose Register 0 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca0](cau_aesc_ca0) module" ] pub type CAU_AESC_CA0 = crate :: Reg < u32 , _CAU_AESC_CA0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA0 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca0::W](cau_aesc_ca0::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA0 { } # [ doc = "General Purpose Register 0 - AES Column Operation command" ] pub mod cau_aesc_ca0 { # [ doc = "Writer for register CAU_AESC_CA0" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA0 > ; # [ doc = "Register CAU_AESC_CA0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA0`" ] pub struct CA0_W < 'a > { w : & 'a mut W , } impl < 'a > CA0_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA0" ] # [ inline ( always ) ] pub fn ca0 ( & mut self ) -> CA0_W { CA0_W { w : self } } } } # [ doc = "General Purpose Register 1 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca1](cau_aesc_ca1) module" ] pub type CAU_AESC_CA1 = crate :: Reg < u32 , _CAU_AESC_CA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA1 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca1::W](cau_aesc_ca1::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA1 { } # [ doc = "General Purpose Register 1 - AES Column Operation command" ] pub mod cau_aesc_ca1 { # [ doc = "Writer for register CAU_AESC_CA1" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA1 > ; # [ doc = "Register CAU_AESC_CA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA1`" ] pub struct CA1_W < 'a > { w : & 'a mut W , } impl < 'a > CA1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA1" ] # [ inline ( always ) ] pub fn ca1 ( & mut self ) -> CA1_W { CA1_W { w : self } } } } # [ doc = "General Purpose Register 2 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca2](cau_aesc_ca2) module" ] pub type CAU_AESC_CA2 = crate :: Reg < u32 , _CAU_AESC_CA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA2 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca2::W](cau_aesc_ca2::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA2 { } # [ doc = "General Purpose Register 2 - AES Column Operation command" ] pub mod cau_aesc_ca2 { # [ doc = "Writer for register CAU_AESC_CA2" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA2 > ; # [ doc = "Register CAU_AESC_CA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA2`" ] pub struct CA2_W < 'a > { w : & 'a mut W , } impl < 'a > CA2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA2" ] # [ inline ( always ) ] pub fn ca2 ( & mut self ) -> CA2_W { CA2_W { w : self } } } } # [ doc = "General Purpose Register 3 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca3](cau_aesc_ca3) module" ] pub type CAU_AESC_CA3 = crate :: Reg < u32 , _CAU_AESC_CA3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA3 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca3::W](cau_aesc_ca3::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA3 { } # [ doc = "General Purpose Register 3 - AES Column Operation command" ] pub mod cau_aesc_ca3 { # [ doc = "Writer for register CAU_AESC_CA3" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA3 > ; # [ doc = "Register CAU_AESC_CA3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA3`" ] pub struct CA3_W < 'a > { w : & 'a mut W , } impl < 'a > CA3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA3" ] # [ inline ( always ) ] pub fn ca3 ( & mut self ) -> CA3_W { CA3_W { w : self } } } } # [ doc = "General Purpose Register 4 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca4](cau_aesc_ca4) module" ] pub type CAU_AESC_CA4 = crate :: Reg < u32 , _CAU_AESC_CA4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA4 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca4::W](cau_aesc_ca4::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA4 { } # [ doc = "General Purpose Register 4 - AES Column Operation command" ] pub mod cau_aesc_ca4 { # [ doc = "Writer for register CAU_AESC_CA4" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA4 > ; # [ doc = "Register CAU_AESC_CA4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA4`" ] pub struct CA4_W < 'a > { w : & 'a mut W , } impl < 'a > CA4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA4" ] # [ inline ( always ) ] pub fn ca4 ( & mut self ) -> CA4_W { CA4_W { w : self } } } } # [ doc = "General Purpose Register 5 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca5](cau_aesc_ca5) module" ] pub type CAU_AESC_CA5 = crate :: Reg < u32 , _CAU_AESC_CA5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA5 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca5::W](cau_aesc_ca5::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA5 { } # [ doc = "General Purpose Register 5 - AES Column Operation command" ] pub mod cau_aesc_ca5 { # [ doc = "Writer for register CAU_AESC_CA5" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA5 > ; # [ doc = "Register CAU_AESC_CA5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA5`" ] pub struct CA5_W < 'a > { w : & 'a mut W , } impl < 'a > CA5_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA5" ] # [ inline ( always ) ] pub fn ca5 ( & mut self ) -> CA5_W { CA5_W { w : self } } } } # [ doc = "General Purpose Register 6 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca6](cau_aesc_ca6) module" ] pub type CAU_AESC_CA6 = crate :: Reg < u32 , _CAU_AESC_CA6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA6 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca6::W](cau_aesc_ca6::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA6 { } # [ doc = "General Purpose Register 6 - AES Column Operation command" ] pub mod cau_aesc_ca6 { # [ doc = "Writer for register CAU_AESC_CA6" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA6 > ; # [ doc = "Register CAU_AESC_CA6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA6`" ] pub struct CA6_W < 'a > { w : & 'a mut W , } impl < 'a > CA6_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA6" ] # [ inline ( always ) ] pub fn ca6 ( & mut self ) -> CA6_W { CA6_W { w : self } } } } # [ doc = "General Purpose Register 7 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca7](cau_aesc_ca7) module" ] pub type CAU_AESC_CA7 = crate :: Reg < u32 , _CAU_AESC_CA7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA7 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca7::W](cau_aesc_ca7::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA7 { } # [ doc = "General Purpose Register 7 - AES Column Operation command" ] pub mod cau_aesc_ca7 { # [ doc = "Writer for register CAU_AESC_CA7" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA7 > ; # [ doc = "Register CAU_AESC_CA7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA7`" ] pub struct CA7_W < 'a > { w : & 'a mut W , } impl < 'a > CA7_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA7" ] # [ inline ( always ) ] pub fn ca7 ( & mut self ) -> CA7_W { CA7_W { w : self } } } } # [ doc = "General Purpose Register 8 - AES Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesc_ca8](cau_aesc_ca8) module" ] pub type CAU_AESC_CA8 = crate :: Reg < u32 , _CAU_AESC_CA8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESC_CA8 ; # [ doc = "`write(|w| ..)` method takes [cau_aesc_ca8::W](cau_aesc_ca8::W) writer structure" ] impl crate :: Writable for CAU_AESC_CA8 { } # [ doc = "General Purpose Register 8 - AES Column Operation command" ] pub mod cau_aesc_ca8 { # [ doc = "Writer for register CAU_AESC_CA8" ] pub type W = crate :: W < u32 , super :: CAU_AESC_CA8 > ; # [ doc = "Register CAU_AESC_CA8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESC_CA8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA8`" ] pub struct CA8_W < 'a > { w : & 'a mut W , } impl < 'a > CA8_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA8" ] # [ inline ( always ) ] pub fn ca8 ( & mut self ) -> CA8_W { CA8_W { w : self } } } } # [ doc = "Status register - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_casr](cau_aesic_casr) module" ] pub type CAU_AESIC_CASR = crate :: Reg < u32 , _CAU_AESIC_CASR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CASR ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_casr::W](cau_aesic_casr::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CASR { } # [ doc = "Status register - AES Inverse Column Operation command" ] pub mod cau_aesic_casr { # [ doc = "Writer for register CAU_AESIC_CASR" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CASR > ; # [ doc = "Register CAU_AESIC_CASR `reset()`'s with value 0x2000_0000" ] impl crate :: ResetValue for super :: CAU_AESIC_CASR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0x2000_0000 } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IC_AW { # [ doc = "0: No illegal commands issued" ] _0 , # [ doc = "1: Illegal command issued" ] _1 } impl From < IC_AW > for bool { # [ inline ( always ) ] fn from ( variant : IC_AW ) -> Self { match variant { IC_AW :: _0 => false , IC_AW :: _1 => true } } } # [ doc = "Write proxy for field `IC`" ] pub struct IC_W < 'a > { w : & 'a mut W , } impl < 'a > IC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : IC_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No illegal commands issued" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _0 ) } # [ doc = "Illegal command issued" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( IC_AW :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "no description available\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DPE_AW { # [ doc = "0: No error detected" ] _0 , # [ doc = "1: DES key parity error detected" ] _1 } impl From < DPE_AW > for bool { # [ inline ( always ) ] fn from ( variant : DPE_AW ) -> Self { match variant { DPE_AW :: _0 => false , DPE_AW :: _1 => true } } } # [ doc = "Write proxy for field `DPE`" ] pub struct DPE_W < 'a > { w : & 'a mut W , } impl < 'a > DPE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : DPE_AW ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No error detected" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _0 ) } # [ doc = "DES key parity error detected" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( DPE_AW :: _1 ) } # [ 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 } } # [ doc = "CAU version\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VER_AW { # [ doc = "1: Initial CAU version" ] _0001 , # [ doc = "2: Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] _0010 } impl From < VER_AW > for u8 { # [ inline ( always ) ] fn from ( variant : VER_AW ) -> Self { match variant { VER_AW :: _0001 => 1 , VER_AW :: _0010 => 2 } } } # [ doc = "Write proxy for field `VER`" ] pub struct VER_W < 'a > { w : & 'a mut W , } impl < 'a > VER_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : VER_AW ) -> & 'a mut W { unsafe { self . bits ( variant . into ( ) ) } } # [ doc = "Initial CAU version" ] # [ inline ( always ) ] pub fn _0001 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0001 ) } # [ doc = "Second version, added support for SHA-256 algorithm.(This is the value on this device)" ] # [ inline ( always ) ] pub fn _0010 ( self ) -> & 'a mut W { self . variant ( VER_AW :: _0010 ) } # [ 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 & ! ( 0x0f << 28 ) ) | ( ( ( value as u32 ) & 0x0f ) << 28 ) ; self . w } } impl W { # [ doc = "Bit 0 - no description available" ] # [ inline ( always ) ] pub fn ic ( & mut self ) -> IC_W { IC_W { w : self } } # [ doc = "Bit 1 - no description available" ] # [ inline ( always ) ] pub fn dpe ( & mut self ) -> DPE_W { DPE_W { w : self } } # [ doc = "Bits 28:31 - CAU version" ] # [ inline ( always ) ] pub fn ver ( & mut self ) -> VER_W { VER_W { w : self } } } } # [ doc = "Accumulator register - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_caa](cau_aesic_caa) module" ] pub type CAU_AESIC_CAA = crate :: Reg < u32 , _CAU_AESIC_CAA > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CAA ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_caa::W](cau_aesic_caa::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CAA { } # [ doc = "Accumulator register - AES Inverse Column Operation command" ] pub mod cau_aesic_caa { # [ doc = "Writer for register CAU_AESIC_CAA" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CAA > ; # [ doc = "Register CAU_AESIC_CAA `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CAA { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `ACC`" ] pub struct ACC_W < 'a > { w : & 'a mut W , } impl < 'a > ACC_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - ACC" ] # [ inline ( always ) ] pub fn acc ( & mut self ) -> ACC_W { ACC_W { w : self } } } } # [ doc = "General Purpose Register 0 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca0](cau_aesic_ca0) module" ] pub type CAU_AESIC_CA0 = crate :: Reg < u32 , _CAU_AESIC_CA0 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA0 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca0::W](cau_aesic_ca0::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA0 { } # [ doc = "General Purpose Register 0 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca0 { # [ doc = "Writer for register CAU_AESIC_CA0" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA0 > ; # [ doc = "Register CAU_AESIC_CA0 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA0 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA0`" ] pub struct CA0_W < 'a > { w : & 'a mut W , } impl < 'a > CA0_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA0" ] # [ inline ( always ) ] pub fn ca0 ( & mut self ) -> CA0_W { CA0_W { w : self } } } } # [ doc = "General Purpose Register 1 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca1](cau_aesic_ca1) module" ] pub type CAU_AESIC_CA1 = crate :: Reg < u32 , _CAU_AESIC_CA1 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA1 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca1::W](cau_aesic_ca1::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA1 { } # [ doc = "General Purpose Register 1 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca1 { # [ doc = "Writer for register CAU_AESIC_CA1" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA1 > ; # [ doc = "Register CAU_AESIC_CA1 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA1 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA1`" ] pub struct CA1_W < 'a > { w : & 'a mut W , } impl < 'a > CA1_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA1" ] # [ inline ( always ) ] pub fn ca1 ( & mut self ) -> CA1_W { CA1_W { w : self } } } } # [ doc = "General Purpose Register 2 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca2](cau_aesic_ca2) module" ] pub type CAU_AESIC_CA2 = crate :: Reg < u32 , _CAU_AESIC_CA2 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA2 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca2::W](cau_aesic_ca2::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA2 { } # [ doc = "General Purpose Register 2 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca2 { # [ doc = "Writer for register CAU_AESIC_CA2" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA2 > ; # [ doc = "Register CAU_AESIC_CA2 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA2 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA2`" ] pub struct CA2_W < 'a > { w : & 'a mut W , } impl < 'a > CA2_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA2" ] # [ inline ( always ) ] pub fn ca2 ( & mut self ) -> CA2_W { CA2_W { w : self } } } } # [ doc = "General Purpose Register 3 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca3](cau_aesic_ca3) module" ] pub type CAU_AESIC_CA3 = crate :: Reg < u32 , _CAU_AESIC_CA3 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA3 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca3::W](cau_aesic_ca3::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA3 { } # [ doc = "General Purpose Register 3 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca3 { # [ doc = "Writer for register CAU_AESIC_CA3" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA3 > ; # [ doc = "Register CAU_AESIC_CA3 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA3 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA3`" ] pub struct CA3_W < 'a > { w : & 'a mut W , } impl < 'a > CA3_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA3" ] # [ inline ( always ) ] pub fn ca3 ( & mut self ) -> CA3_W { CA3_W { w : self } } } } # [ doc = "General Purpose Register 4 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca4](cau_aesic_ca4) module" ] pub type CAU_AESIC_CA4 = crate :: Reg < u32 , _CAU_AESIC_CA4 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA4 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca4::W](cau_aesic_ca4::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA4 { } # [ doc = "General Purpose Register 4 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca4 { # [ doc = "Writer for register CAU_AESIC_CA4" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA4 > ; # [ doc = "Register CAU_AESIC_CA4 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA4 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA4`" ] pub struct CA4_W < 'a > { w : & 'a mut W , } impl < 'a > CA4_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA4" ] # [ inline ( always ) ] pub fn ca4 ( & mut self ) -> CA4_W { CA4_W { w : self } } } } # [ doc = "General Purpose Register 5 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca5](cau_aesic_ca5) module" ] pub type CAU_AESIC_CA5 = crate :: Reg < u32 , _CAU_AESIC_CA5 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA5 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca5::W](cau_aesic_ca5::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA5 { } # [ doc = "General Purpose Register 5 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca5 { # [ doc = "Writer for register CAU_AESIC_CA5" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA5 > ; # [ doc = "Register CAU_AESIC_CA5 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA5 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA5`" ] pub struct CA5_W < 'a > { w : & 'a mut W , } impl < 'a > CA5_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA5" ] # [ inline ( always ) ] pub fn ca5 ( & mut self ) -> CA5_W { CA5_W { w : self } } } } # [ doc = "General Purpose Register 6 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca6](cau_aesic_ca6) module" ] pub type CAU_AESIC_CA6 = crate :: Reg < u32 , _CAU_AESIC_CA6 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA6 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca6::W](cau_aesic_ca6::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA6 { } # [ doc = "General Purpose Register 6 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca6 { # [ doc = "Writer for register CAU_AESIC_CA6" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA6 > ; # [ doc = "Register CAU_AESIC_CA6 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA6 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA6`" ] pub struct CA6_W < 'a > { w : & 'a mut W , } impl < 'a > CA6_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA6" ] # [ inline ( always ) ] pub fn ca6 ( & mut self ) -> CA6_W { CA6_W { w : self } } } } # [ doc = "General Purpose Register 7 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca7](cau_aesic_ca7) module" ] pub type CAU_AESIC_CA7 = crate :: Reg < u32 , _CAU_AESIC_CA7 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA7 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca7::W](cau_aesic_ca7::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA7 { } # [ doc = "General Purpose Register 7 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca7 { # [ doc = "Writer for register CAU_AESIC_CA7" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA7 > ; # [ doc = "Register CAU_AESIC_CA7 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA7 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA7`" ] pub struct CA7_W < 'a > { w : & 'a mut W , } impl < 'a > CA7_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA7" ] # [ inline ( always ) ] pub fn ca7 ( & mut self ) -> CA7_W { CA7_W { w : self } } } } # [ doc = "General Purpose Register 8 - AES Inverse Column Operation command\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cau_aesic_ca8](cau_aesic_ca8) module" ] pub type CAU_AESIC_CA8 = crate :: Reg < u32 , _CAU_AESIC_CA8 > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _CAU_AESIC_CA8 ; # [ doc = "`write(|w| ..)` method takes [cau_aesic_ca8::W](cau_aesic_ca8::W) writer structure" ] impl crate :: Writable for CAU_AESIC_CA8 { } # [ doc = "General Purpose Register 8 - AES Inverse Column Operation command" ] pub mod cau_aesic_ca8 { # [ doc = "Writer for register CAU_AESIC_CA8" ] pub type W = crate :: W < u32 , super :: CAU_AESIC_CA8 > ; # [ doc = "Register CAU_AESIC_CA8 `reset()`'s with value 0" ] impl crate :: ResetValue for super :: CAU_AESIC_CA8 { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Write proxy for field `CA8`" ] pub struct CA8_W < 'a > { w : & 'a mut W , } impl < 'a > CA8_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl W { # [ doc = "Bits 0:31 - CA8" ] # [ inline ( always ) ] pub fn ca8 ( & mut self ) -> CA8_W { CA8_W { w : self } } } } } # [ doc = "Local Memory Controller" ] pub struct LMEM { _marker : PhantomData < * const ( ) > } unsafe impl Send for LMEM { } impl LMEM { # [ doc = r"Returns a pointer to the register block" ] # [ inline ( always ) ] pub const fn ptr ( ) -> * const lmem :: RegisterBlock { 0xe008_2000 as * const _ } } impl Deref for LMEM { type Target = lmem :: RegisterBlock ; fn deref ( & self ) -> & Self :: Target { unsafe { & * LMEM :: ptr ( ) } } } # [ doc = "Local Memory Controller" ] pub mod lmem { # [ doc = r"Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Cache control register" ] pub pcccr : PCCCR , # [ doc = "0x04 - Cache line control register" ] pub pcclcr : PCCLCR , # [ doc = "0x08 - Cache search address register" ] pub pccsar : PCCSAR , # [ doc = "0x0c - Cache read/write value register" ] pub pcccvr : PCCCVR , _reserved4 : [ u8 ; 16usize ] , # [ doc = "0x20 - Cache regions mode register" ] pub pccrmr : PCCRMR , } # [ doc = "Cache control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcccr](pcccr) module" ] pub type PCCCR = crate :: Reg < u32 , _PCCCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCCCR ; # [ doc = "`read()` method returns [pcccr::R](pcccr::R) reader structure" ] impl crate :: Readable for PCCCR { } # [ doc = "`write(|w| ..)` method takes [pcccr::W](pcccr::W) writer structure" ] impl crate :: Writable for PCCCR { } # [ doc = "Cache control register" ] pub mod pcccr { # [ doc = "Reader of register PCCCR" ] pub type R = crate :: R < u32 , super :: PCCCR > ; # [ doc = "Writer for register PCCCR" ] pub type W = crate :: W < u32 , super :: PCCCR > ; # [ doc = "Register PCCCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCCCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Cache enable\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENCACHE_A { # [ doc = "0: Cache disabled" ] _0 , # [ doc = "1: Cache enabled" ] _1 } impl From < ENCACHE_A > for bool { # [ inline ( always ) ] fn from ( variant : ENCACHE_A ) -> Self { match variant { ENCACHE_A :: _0 => false , ENCACHE_A :: _1 => true } } } # [ doc = "Reader of field `ENCACHE`" ] pub type ENCACHE_R = crate :: R < bool , ENCACHE_A > ; impl ENCACHE_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENCACHE_A { match self . bits { false => ENCACHE_A :: _0 , true => ENCACHE_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENCACHE_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENCACHE_A :: _1 } } # [ doc = "Write proxy for field `ENCACHE`" ] pub struct ENCACHE_W < 'a > { w : & 'a mut W , } impl < 'a > ENCACHE_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENCACHE_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Cache disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENCACHE_A :: _0 ) } # [ doc = "Cache enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENCACHE_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Enable Write Buffer\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENWRBUF_A { # [ doc = "0: Write buffer disabled" ] _0 , # [ doc = "1: Write buffer enabled" ] _1 } impl From < ENWRBUF_A > for bool { # [ inline ( always ) ] fn from ( variant : ENWRBUF_A ) -> Self { match variant { ENWRBUF_A :: _0 => false , ENWRBUF_A :: _1 => true } } } # [ doc = "Reader of field `ENWRBUF`" ] pub type ENWRBUF_R = crate :: R < bool , ENWRBUF_A > ; impl ENWRBUF_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> ENWRBUF_A { match self . bits { false => ENWRBUF_A :: _0 , true => ENWRBUF_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == ENWRBUF_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == ENWRBUF_A :: _1 } } # [ doc = "Write proxy for field `ENWRBUF`" ] pub struct ENWRBUF_W < 'a > { w : & 'a mut W , } impl < 'a > ENWRBUF_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : ENWRBUF_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write buffer disabled" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( ENWRBUF_A :: _0 ) } # [ doc = "Write buffer enabled" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( ENWRBUF_A :: _1 ) } # [ 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 } } # [ doc = "Reader of field `PCCR2`" ] pub type PCCR2_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PCCR2`" ] pub struct PCCR2_W < 'a > { w : & 'a mut W , } impl < 'a > PCCR2_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 = "Reader of field `PCCR3`" ] pub type PCCR3_R = crate :: R < bool , bool > ; # [ doc = "Write proxy for field `PCCR3`" ] pub struct PCCR3_W < 'a > { w : & 'a mut W , } impl < 'a > PCCR3_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 << 3 ) ) | ( ( ( value as u32 ) & 0x01 ) << 3 ) ; self . w } } # [ doc = "Invalidate Way 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INVW0_A { # [ doc = "0: No operation" ] _0 , # [ doc = "1: When setting the GO bit, invalidate all lines in way 0." ] _1 } impl From < INVW0_A > for bool { # [ inline ( always ) ] fn from ( variant : INVW0_A ) -> Self { match variant { INVW0_A :: _0 => false , INVW0_A :: _1 => true } } } # [ doc = "Reader of field `INVW0`" ] pub type INVW0_R = crate :: R < bool , INVW0_A > ; impl INVW0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INVW0_A { match self . bits { false => INVW0_A :: _0 , true => INVW0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INVW0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INVW0_A :: _1 } } # [ doc = "Write proxy for field `INVW0`" ] pub struct INVW0_W < 'a > { w : & 'a mut W , } impl < 'a > INVW0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INVW0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INVW0_A :: _0 ) } # [ doc = "When setting the GO bit, invalidate all lines in way 0." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INVW0_A :: _1 ) } # [ 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 = "Push Way 0\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PUSHW0_A { # [ doc = "0: No operation" ] _0 , # [ doc = "1: When setting the GO bit, push all modified lines in way 0" ] _1 } impl From < PUSHW0_A > for bool { # [ inline ( always ) ] fn from ( variant : PUSHW0_A ) -> Self { match variant { PUSHW0_A :: _0 => false , PUSHW0_A :: _1 => true } } } # [ doc = "Reader of field `PUSHW0`" ] pub type PUSHW0_R = crate :: R < bool , PUSHW0_A > ; impl PUSHW0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PUSHW0_A { match self . bits { false => PUSHW0_A :: _0 , true => PUSHW0_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PUSHW0_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PUSHW0_A :: _1 } } # [ doc = "Write proxy for field `PUSHW0`" ] pub struct PUSHW0_W < 'a > { w : & 'a mut W , } impl < 'a > PUSHW0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PUSHW0_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PUSHW0_A :: _0 ) } # [ doc = "When setting the GO bit, push all modified lines in way 0" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PUSHW0_A :: _1 ) } # [ 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 = "Invalidate Way 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INVW1_A { # [ doc = "0: No operation" ] _0 , # [ doc = "1: When setting the GO bit, invalidate all lines in way 1" ] _1 } impl From < INVW1_A > for bool { # [ inline ( always ) ] fn from ( variant : INVW1_A ) -> Self { match variant { INVW1_A :: _0 => false , INVW1_A :: _1 => true } } } # [ doc = "Reader of field `INVW1`" ] pub type INVW1_R = crate :: R < bool , INVW1_A > ; impl INVW1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> INVW1_A { match self . bits { false => INVW1_A :: _0 , true => INVW1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == INVW1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == INVW1_A :: _1 } } # [ doc = "Write proxy for field `INVW1`" ] pub struct INVW1_W < 'a > { w : & 'a mut W , } impl < 'a > INVW1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : INVW1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( INVW1_A :: _0 ) } # [ doc = "When setting the GO bit, invalidate all lines in way 1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( INVW1_A :: _1 ) } # [ 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 = "Push Way 1\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PUSHW1_A { # [ doc = "0: No operation" ] _0 , # [ doc = "1: When setting the GO bit, push all modified lines in way 1" ] _1 } impl From < PUSHW1_A > for bool { # [ inline ( always ) ] fn from ( variant : PUSHW1_A ) -> Self { match variant { PUSHW1_A :: _0 => false , PUSHW1_A :: _1 => true } } } # [ doc = "Reader of field `PUSHW1`" ] pub type PUSHW1_R = crate :: R < bool , PUSHW1_A > ; impl PUSHW1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> PUSHW1_A { match self . bits { false => PUSHW1_A :: _0 , true => PUSHW1_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == PUSHW1_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == PUSHW1_A :: _1 } } # [ doc = "Write proxy for field `PUSHW1`" ] pub struct PUSHW1_W < 'a > { w : & 'a mut W , } impl < 'a > PUSHW1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : PUSHW1_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "No operation" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( PUSHW1_A :: _0 ) } # [ doc = "When setting the GO bit, push all modified lines in way 1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( PUSHW1_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } # [ doc = "Initiate Cache Command\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GO_A { # [ doc = "0: Write: no effect. Read: no cache command active." ] _0 , # [ doc = "1: Write: initiate command indicated by bits 27-24. Read: cache command active." ] _1 } impl From < GO_A > for bool { # [ inline ( always ) ] fn from ( variant : GO_A ) -> Self { match variant { GO_A :: _0 => false , GO_A :: _1 => true } } } # [ doc = "Reader of field `GO`" ] pub type GO_R = crate :: R < bool , GO_A > ; impl GO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> GO_A { match self . bits { false => GO_A :: _0 , true => GO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == GO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == GO_A :: _1 } } # [ doc = "Write proxy for field `GO`" ] pub struct GO_W < 'a > { w : & 'a mut W , } impl < 'a > GO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : GO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write: no effect. Read: no cache command active." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( GO_A :: _0 ) } # [ doc = "Write: initiate command indicated by bits 27-24. Read: cache command active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( GO_A :: _1 ) } # [ 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 << 31 ) ) | ( ( ( value as u32 ) & 0x01 ) << 31 ) ; self . w } } impl R { # [ doc = "Bit 0 - Cache enable" ] # [ inline ( always ) ] pub fn encache ( & self ) -> ENCACHE_R { ENCACHE_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bit 1 - Enable Write Buffer" ] # [ inline ( always ) ] pub fn enwrbuf ( & self ) -> ENWRBUF_R { ENWRBUF_R :: new ( ( ( self . bits >> 1 ) & 0x01 ) != 0 ) } # [ doc = "Bit 2 - Forces all cacheable spaces to write through" ] # [ inline ( always ) ] pub fn pccr2 ( & self ) -> PCCR2_R { PCCR2_R :: new ( ( ( self . bits >> 2 ) & 0x01 ) != 0 ) } # [ doc = "Bit 3 - Forces no allocation on cache misses (must also have PCCR2 asserted)" ] # [ inline ( always ) ] pub fn pccr3 ( & self ) -> PCCR3_R { PCCR3_R :: new ( ( ( self . bits >> 3 ) & 0x01 ) != 0 ) } # [ doc = "Bit 24 - Invalidate Way 0" ] # [ inline ( always ) ] pub fn invw0 ( & self ) -> INVW0_R { INVW0_R :: new ( ( ( self . bits >> 24 ) & 0x01 ) != 0 ) } # [ doc = "Bit 25 - Push Way 0" ] # [ inline ( always ) ] pub fn pushw0 ( & self ) -> PUSHW0_R { PUSHW0_R :: new ( ( ( self . bits >> 25 ) & 0x01 ) != 0 ) } # [ doc = "Bit 26 - Invalidate Way 1" ] # [ inline ( always ) ] pub fn invw1 ( & self ) -> INVW1_R { INVW1_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Push Way 1" ] # [ inline ( always ) ] pub fn pushw1 ( & self ) -> PUSHW1_R { PUSHW1_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } # [ doc = "Bit 31 - Initiate Cache Command" ] # [ inline ( always ) ] pub fn go ( & self ) -> GO_R { GO_R :: new ( ( ( self . bits >> 31 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Cache enable" ] # [ inline ( always ) ] pub fn encache ( & mut self ) -> ENCACHE_W { ENCACHE_W { w : self } } # [ doc = "Bit 1 - Enable Write Buffer" ] # [ inline ( always ) ] pub fn enwrbuf ( & mut self ) -> ENWRBUF_W { ENWRBUF_W { w : self } } # [ doc = "Bit 2 - Forces all cacheable spaces to write through" ] # [ inline ( always ) ] pub fn pccr2 ( & mut self ) -> PCCR2_W { PCCR2_W { w : self } } # [ doc = "Bit 3 - Forces no allocation on cache misses (must also have PCCR2 asserted)" ] # [ inline ( always ) ] pub fn pccr3 ( & mut self ) -> PCCR3_W { PCCR3_W { w : self } } # [ doc = "Bit 24 - Invalidate Way 0" ] # [ inline ( always ) ] pub fn invw0 ( & mut self ) -> INVW0_W { INVW0_W { w : self } } # [ doc = "Bit 25 - Push Way 0" ] # [ inline ( always ) ] pub fn pushw0 ( & mut self ) -> PUSHW0_W { PUSHW0_W { w : self } } # [ doc = "Bit 26 - Invalidate Way 1" ] # [ inline ( always ) ] pub fn invw1 ( & mut self ) -> INVW1_W { INVW1_W { w : self } } # [ doc = "Bit 27 - Push Way 1" ] # [ inline ( always ) ] pub fn pushw1 ( & mut self ) -> PUSHW1_W { PUSHW1_W { w : self } } # [ doc = "Bit 31 - Initiate Cache Command" ] # [ inline ( always ) ] pub fn go ( & mut self ) -> GO_W { GO_W { w : self } } } } # [ doc = "Cache line control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcclcr](pcclcr) module" ] pub type PCCLCR = crate :: Reg < u32 , _PCCLCR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCCLCR ; # [ doc = "`read()` method returns [pcclcr::R](pcclcr::R) reader structure" ] impl crate :: Readable for PCCLCR { } # [ doc = "`write(|w| ..)` method takes [pcclcr::W](pcclcr::W) writer structure" ] impl crate :: Writable for PCCLCR { } # [ doc = "Cache line control register" ] pub mod pcclcr { # [ doc = "Reader of register PCCLCR" ] pub type R = crate :: R < u32 , super :: PCCLCR > ; # [ doc = "Writer for register PCCLCR" ] pub type W = crate :: W < u32 , super :: PCCLCR > ; # [ doc = "Register PCCLCR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCCLCR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Initiate Cache Line Command\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LGO_A { # [ doc = "0: Write: no effect. Read: no line command active." ] _0 , # [ doc = "1: Write: initiate line command indicated by bits 27-24. Read: line command active." ] _1 } impl From < LGO_A > for bool { # [ inline ( always ) ] fn from ( variant : LGO_A ) -> Self { match variant { LGO_A :: _0 => false , LGO_A :: _1 => true } } } # [ doc = "Reader of field `LGO`" ] pub type LGO_R = crate :: R < bool , LGO_A > ; impl LGO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LGO_A { match self . bits { false => LGO_A :: _0 , true => LGO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LGO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LGO_A :: _1 } } # [ doc = "Write proxy for field `LGO`" ] pub struct LGO_W < 'a > { w : & 'a mut W , } impl < 'a > LGO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LGO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write: no effect. Read: no line command active." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LGO_A :: _0 ) } # [ doc = "Write: initiate line command indicated by bits 27-24. Read: line command active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LGO_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `CACHEADDR`" ] pub type CACHEADDR_R = crate :: R < u16 , u16 > ; # [ doc = "Write proxy for field `CACHEADDR`" ] pub struct CACHEADDR_W < 'a > { w : & 'a mut W , } impl < 'a > CACHEADDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03ff << 2 ) ) | ( ( ( value as u32 ) & 0x03ff ) << 2 ) ; self . w } } # [ doc = "Way select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WSEL_A { # [ doc = "0: Way 0" ] _0 , # [ doc = "1: Way 1" ] _1 } impl From < WSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : WSEL_A ) -> Self { match variant { WSEL_A :: _0 => false , WSEL_A :: _1 => true } } } # [ doc = "Reader of field `WSEL`" ] pub type WSEL_R = crate :: R < bool , WSEL_A > ; impl WSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> WSEL_A { match self . bits { false => WSEL_A :: _0 , true => WSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == WSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == WSEL_A :: _1 } } # [ doc = "Write proxy for field `WSEL`" ] pub struct WSEL_W < 'a > { w : & 'a mut W , } impl < 'a > WSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : WSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Way 0" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( WSEL_A :: _0 ) } # [ doc = "Way 1" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( WSEL_A :: _1 ) } # [ 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 << 14 ) ) | ( ( ( value as u32 ) & 0x01 ) << 14 ) ; self . w } } # [ doc = "Tag/Data Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TDSEL_A { # [ doc = "0: Data" ] _0 , # [ doc = "1: Tag" ] _1 } impl From < TDSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : TDSEL_A ) -> Self { match variant { TDSEL_A :: _0 => false , TDSEL_A :: _1 => true } } } # [ doc = "Reader of field `TDSEL`" ] pub type TDSEL_R = crate :: R < bool , TDSEL_A > ; impl TDSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> TDSEL_A { match self . bits { false => TDSEL_A :: _0 , true => TDSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == TDSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == TDSEL_A :: _1 } } # [ doc = "Write proxy for field `TDSEL`" ] pub struct TDSEL_W < 'a > { w : & 'a mut W , } impl < 'a > TDSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : TDSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Data" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( TDSEL_A :: _0 ) } # [ doc = "Tag" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( TDSEL_A :: _1 ) } # [ 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 << 16 ) ) | ( ( ( value as u32 ) & 0x01 ) << 16 ) ; self . w } } # [ doc = "Reader of field `LCIVB`" ] pub type LCIVB_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `LCIMB`" ] pub type LCIMB_R = crate :: R < bool , bool > ; # [ doc = "Reader of field `LCWAY`" ] pub type LCWAY_R = crate :: R < bool , bool > ; # [ doc = "Line Command\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LCMD_A { # [ doc = "0: Search and read or write" ] _00 , # [ doc = "1: Invalidate" ] _01 , # [ doc = "2: Push" ] _10 , # [ doc = "3: Clear" ] _11 } impl From < LCMD_A > for u8 { # [ inline ( always ) ] fn from ( variant : LCMD_A ) -> Self { match variant { LCMD_A :: _00 => 0 , LCMD_A :: _01 => 1 , LCMD_A :: _10 => 2 , LCMD_A :: _11 => 3 } } } # [ doc = "Reader of field `LCMD`" ] pub type LCMD_R = crate :: R < u8 , LCMD_A > ; impl LCMD_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LCMD_A { match self . bits { 0 => LCMD_A :: _00 , 1 => LCMD_A :: _01 , 2 => LCMD_A :: _10 , 3 => LCMD_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == LCMD_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == LCMD_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == LCMD_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == LCMD_A :: _11 } } # [ doc = "Write proxy for field `LCMD`" ] pub struct LCMD_W < 'a > { w : & 'a mut W , } impl < 'a > LCMD_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LCMD_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Search and read or write" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( LCMD_A :: _00 ) } # [ doc = "Invalidate" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( LCMD_A :: _01 ) } # [ doc = "Push" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( LCMD_A :: _10 ) } # [ doc = "Clear" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( LCMD_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 24 ) ) | ( ( ( value as u32 ) & 0x03 ) << 24 ) ; self . w } } # [ doc = "Line Address Select\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LADSEL_A { # [ doc = "0: Cache address" ] _0 , # [ doc = "1: Physical address" ] _1 } impl From < LADSEL_A > for bool { # [ inline ( always ) ] fn from ( variant : LADSEL_A ) -> Self { match variant { LADSEL_A :: _0 => false , LADSEL_A :: _1 => true } } } # [ doc = "Reader of field `LADSEL`" ] pub type LADSEL_R = crate :: R < bool , LADSEL_A > ; impl LADSEL_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LADSEL_A { match self . bits { false => LADSEL_A :: _0 , true => LADSEL_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LADSEL_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LADSEL_A :: _1 } } # [ doc = "Write proxy for field `LADSEL`" ] pub struct LADSEL_W < 'a > { w : & 'a mut W , } impl < 'a > LADSEL_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LADSEL_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Cache address" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LADSEL_A :: _0 ) } # [ doc = "Physical address" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LADSEL_A :: _1 ) } # [ 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 = "Line access type\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LACC_A { # [ doc = "0: Read" ] _0 , # [ doc = "1: Write" ] _1 } impl From < LACC_A > for bool { # [ inline ( always ) ] fn from ( variant : LACC_A ) -> Self { match variant { LACC_A :: _0 => false , LACC_A :: _1 => true } } } # [ doc = "Reader of field `LACC`" ] pub type LACC_R = crate :: R < bool , LACC_A > ; impl LACC_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LACC_A { match self . bits { false => LACC_A :: _0 , true => LACC_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LACC_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LACC_A :: _1 } } # [ doc = "Write proxy for field `LACC`" ] pub struct LACC_W < 'a > { w : & 'a mut W , } impl < 'a > LACC_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LACC_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Read" ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LACC_A :: _0 ) } # [ doc = "Write" ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LACC_A :: _1 ) } # [ 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 << 27 ) ) | ( ( ( value as u32 ) & 0x01 ) << 27 ) ; self . w } } impl R { # [ doc = "Bit 0 - Initiate Cache Line Command" ] # [ inline ( always ) ] pub fn lgo ( & self ) -> LGO_R { LGO_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 2:11 - Cache address" ] # [ inline ( always ) ] pub fn cacheaddr ( & self ) -> CACHEADDR_R { CACHEADDR_R :: new ( ( ( self . bits >> 2 ) & 0x03ff ) as u16 ) } # [ doc = "Bit 14 - Way select" ] # [ inline ( always ) ] pub fn wsel ( & self ) -> WSEL_R { WSEL_R :: new ( ( ( self . bits >> 14 ) & 0x01 ) != 0 ) } # [ doc = "Bit 16 - Tag/Data Select" ] # [ inline ( always ) ] pub fn tdsel ( & self ) -> TDSEL_R { TDSEL_R :: new ( ( ( self . bits >> 16 ) & 0x01 ) != 0 ) } # [ doc = "Bit 20 - Line Command Initial Valid Bit" ] # [ inline ( always ) ] pub fn lcivb ( & self ) -> LCIVB_R { LCIVB_R :: new ( ( ( self . bits >> 20 ) & 0x01 ) != 0 ) } # [ doc = "Bit 21 - Line Command Initial Modified Bit" ] # [ inline ( always ) ] pub fn lcimb ( & self ) -> LCIMB_R { LCIMB_R :: new ( ( ( self . bits >> 21 ) & 0x01 ) != 0 ) } # [ doc = "Bit 22 - Line Command Way" ] # [ inline ( always ) ] pub fn lcway ( & self ) -> LCWAY_R { LCWAY_R :: new ( ( ( self . bits >> 22 ) & 0x01 ) != 0 ) } # [ doc = "Bits 24:25 - Line Command" ] # [ inline ( always ) ] pub fn lcmd ( & self ) -> LCMD_R { LCMD_R :: new ( ( ( self . bits >> 24 ) & 0x03 ) as u8 ) } # [ doc = "Bit 26 - Line Address Select" ] # [ inline ( always ) ] pub fn ladsel ( & self ) -> LADSEL_R { LADSEL_R :: new ( ( ( self . bits >> 26 ) & 0x01 ) != 0 ) } # [ doc = "Bit 27 - Line access type" ] # [ inline ( always ) ] pub fn lacc ( & self ) -> LACC_R { LACC_R :: new ( ( ( self . bits >> 27 ) & 0x01 ) != 0 ) } } impl W { # [ doc = "Bit 0 - Initiate Cache Line Command" ] # [ inline ( always ) ] pub fn lgo ( & mut self ) -> LGO_W { LGO_W { w : self } } # [ doc = "Bits 2:11 - Cache address" ] # [ inline ( always ) ] pub fn cacheaddr ( & mut self ) -> CACHEADDR_W { CACHEADDR_W { w : self } } # [ doc = "Bit 14 - Way select" ] # [ inline ( always ) ] pub fn wsel ( & mut self ) -> WSEL_W { WSEL_W { w : self } } # [ doc = "Bit 16 - Tag/Data Select" ] # [ inline ( always ) ] pub fn tdsel ( & mut self ) -> TDSEL_W { TDSEL_W { w : self } } # [ doc = "Bits 24:25 - Line Command" ] # [ inline ( always ) ] pub fn lcmd ( & mut self ) -> LCMD_W { LCMD_W { w : self } } # [ doc = "Bit 26 - Line Address Select" ] # [ inline ( always ) ] pub fn ladsel ( & mut self ) -> LADSEL_W { LADSEL_W { w : self } } # [ doc = "Bit 27 - Line access type" ] # [ inline ( always ) ] pub fn lacc ( & mut self ) -> LACC_W { LACC_W { w : self } } } } # [ doc = "Cache search address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pccsar](pccsar) module" ] pub type PCCSAR = crate :: Reg < u32 , _PCCSAR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCCSAR ; # [ doc = "`read()` method returns [pccsar::R](pccsar::R) reader structure" ] impl crate :: Readable for PCCSAR { } # [ doc = "`write(|w| ..)` method takes [pccsar::W](pccsar::W) writer structure" ] impl crate :: Writable for PCCSAR { } # [ doc = "Cache search address register" ] pub mod pccsar { # [ doc = "Reader of register PCCSAR" ] pub type R = crate :: R < u32 , super :: PCCSAR > ; # [ doc = "Writer for register PCCSAR" ] pub type W = crate :: W < u32 , super :: PCCSAR > ; # [ doc = "Register PCCSAR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCCSAR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Initiate Cache Line Command\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LGO_A { # [ doc = "0: Write: no effect. Read: no line command active." ] _0 , # [ doc = "1: Write: initiate line command indicated by bits CLCR\\[27:24\\]. Read: line command active." ] _1 } impl From < LGO_A > for bool { # [ inline ( always ) ] fn from ( variant : LGO_A ) -> Self { match variant { LGO_A :: _0 => false , LGO_A :: _1 => true } } } # [ doc = "Reader of field `LGO`" ] pub type LGO_R = crate :: R < bool , LGO_A > ; impl LGO_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> LGO_A { match self . bits { false => LGO_A :: _0 , true => LGO_A :: _1 } } # [ doc = "Checks if the value of the field is `_0`" ] # [ inline ( always ) ] pub fn is_0 ( & self ) -> bool { * self == LGO_A :: _0 } # [ doc = "Checks if the value of the field is `_1`" ] # [ inline ( always ) ] pub fn is_1 ( & self ) -> bool { * self == LGO_A :: _1 } } # [ doc = "Write proxy for field `LGO`" ] pub struct LGO_W < 'a > { w : & 'a mut W , } impl < 'a > LGO_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : LGO_A ) -> & 'a mut W { { self . bit ( variant . into ( ) ) } } # [ doc = "Write: no effect. Read: no line command active." ] # [ inline ( always ) ] pub fn _0 ( self ) -> & 'a mut W { self . variant ( LGO_A :: _0 ) } # [ doc = "Write: initiate line command indicated by bits CLCR\\[27:24\\]. Read: line command active." ] # [ inline ( always ) ] pub fn _1 ( self ) -> & 'a mut W { self . variant ( LGO_A :: _1 ) } # [ 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 ) | ( ( value as u32 ) & 0x01 ) ; self . w } } # [ doc = "Reader of field `PHYADDR`" ] pub type PHYADDR_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `PHYADDR`" ] pub struct PHYADDR_W < 'a > { w : & 'a mut W , } impl < 'a > PHYADDR_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x3fff_ffff << 2 ) ) | ( ( ( value as u32 ) & 0x3fff_ffff ) << 2 ) ; self . w } } impl R { # [ doc = "Bit 0 - Initiate Cache Line Command" ] # [ inline ( always ) ] pub fn lgo ( & self ) -> LGO_R { LGO_R :: new ( ( self . bits & 0x01 ) != 0 ) } # [ doc = "Bits 2:31 - Physical Address" ] # [ inline ( always ) ] pub fn phyaddr ( & self ) -> PHYADDR_R { PHYADDR_R :: new ( ( ( self . bits >> 2 ) & 0x3fff_ffff ) as u32 ) } } impl W { # [ doc = "Bit 0 - Initiate Cache Line Command" ] # [ inline ( always ) ] pub fn lgo ( & mut self ) -> LGO_W { LGO_W { w : self } } # [ doc = "Bits 2:31 - Physical Address" ] # [ inline ( always ) ] pub fn phyaddr ( & mut self ) -> PHYADDR_W { PHYADDR_W { w : self } } } } # [ doc = "Cache read/write value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcccvr](pcccvr) module" ] pub type PCCCVR = crate :: Reg < u32 , _PCCCVR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCCCVR ; # [ doc = "`read()` method returns [pcccvr::R](pcccvr::R) reader structure" ] impl crate :: Readable for PCCCVR { } # [ doc = "`write(|w| ..)` method takes [pcccvr::W](pcccvr::W) writer structure" ] impl crate :: Writable for PCCCVR { } # [ doc = "Cache read/write value register" ] pub mod pcccvr { # [ doc = "Reader of register PCCCVR" ] pub type R = crate :: R < u32 , super :: PCCCVR > ; # [ doc = "Writer for register PCCCVR" ] pub type W = crate :: W < u32 , super :: PCCCVR > ; # [ doc = "Register PCCCVR `reset()`'s with value 0" ] impl crate :: ResetValue for super :: PCCCVR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0 } } # [ doc = "Reader of field `DATA`" ] pub type DATA_R = crate :: R < u32 , u32 > ; # [ doc = "Write proxy for field `DATA`" ] pub struct DATA_W < 'a > { w : & 'a mut W , } impl < 'a > DATA_W < 'a > { # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0xffff_ffff ) | ( ( value as u32 ) & 0xffff_ffff ) ; self . w } } impl R { # [ doc = "Bits 0:31 - Cache read/write Data" ] # [ inline ( always ) ] pub fn data ( & self ) -> DATA_R { DATA_R :: new ( ( self . bits & 0xffff_ffff ) as u32 ) } } impl W { # [ doc = "Bits 0:31 - Cache read/write Data" ] # [ inline ( always ) ] pub fn data ( & mut self ) -> DATA_W { DATA_W { w : self } } } } # [ doc = "Cache regions mode register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pccrmr](pccrmr) module" ] pub type PCCRMR = crate :: Reg < u32 , _PCCRMR > ; # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] pub struct _PCCRMR ; # [ doc = "`read()` method returns [pccrmr::R](pccrmr::R) reader structure" ] impl crate :: Readable for PCCRMR { } # [ doc = "`write(|w| ..)` method takes [pccrmr::W](pccrmr::W) writer structure" ] impl crate :: Writable for PCCRMR { } # [ doc = "Cache regions mode register" ] pub mod pccrmr { # [ doc = "Reader of register PCCRMR" ] pub type R = crate :: R < u32 , super :: PCCRMR > ; # [ doc = "Writer for register PCCRMR" ] pub type W = crate :: W < u32 , super :: PCCRMR > ; # [ doc = "Register PCCRMR `reset()`'s with value 0xaa0f_a000" ] impl crate :: ResetValue for super :: PCCRMR { type Type = u32 ; # [ inline ( always ) ] fn reset_value ( ) -> Self :: Type { 0xaa0f_a000 } } # [ doc = "Region 15 mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R15_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R15_A > for u8 { # [ inline ( always ) ] fn from ( variant : R15_A ) -> Self { match variant { R15_A :: _00 => 0 , R15_A :: _01 => 1 , R15_A :: _10 => 2 , R15_A :: _11 => 3 } } } # [ doc = "Reader of field `R15`" ] pub type R15_R = crate :: R < u8 , R15_A > ; impl R15_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R15_A { match self . bits { 0 => R15_A :: _00 , 1 => R15_A :: _01 , 2 => R15_A :: _10 , 3 => R15_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R15_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R15_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R15_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R15_A :: _11 } } # [ doc = "Write proxy for field `R15`" ] pub struct R15_W < 'a > { w : & 'a mut W , } impl < 'a > R15_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R15_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R15_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R15_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R15_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R15_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! 0x03 ) | ( ( value as u32 ) & 0x03 ) ; self . w } } # [ doc = "Region 14 mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R14_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R14_A > for u8 { # [ inline ( always ) ] fn from ( variant : R14_A ) -> Self { match variant { R14_A :: _00 => 0 , R14_A :: _01 => 1 , R14_A :: _10 => 2 , R14_A :: _11 => 3 } } } # [ doc = "Reader of field `R14`" ] pub type R14_R = crate :: R < u8 , R14_A > ; impl R14_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R14_A { match self . bits { 0 => R14_A :: _00 , 1 => R14_A :: _01 , 2 => R14_A :: _10 , 3 => R14_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R14_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R14_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R14_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R14_A :: _11 } } # [ doc = "Write proxy for field `R14`" ] pub struct R14_W < 'a > { w : & 'a mut W , } impl < 'a > R14_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R14_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R14_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R14_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R14_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R14_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 2 ) ) | ( ( ( value as u32 ) & 0x03 ) << 2 ) ; self . w } } # [ doc = "Region 13 mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R13_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R13_A > for u8 { # [ inline ( always ) ] fn from ( variant : R13_A ) -> Self { match variant { R13_A :: _00 => 0 , R13_A :: _01 => 1 , R13_A :: _10 => 2 , R13_A :: _11 => 3 } } } # [ doc = "Reader of field `R13`" ] pub type R13_R = crate :: R < u8 , R13_A > ; impl R13_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R13_A { match self . bits { 0 => R13_A :: _00 , 1 => R13_A :: _01 , 2 => R13_A :: _10 , 3 => R13_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R13_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R13_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R13_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R13_A :: _11 } } # [ doc = "Write proxy for field `R13`" ] pub struct R13_W < 'a > { w : & 'a mut W , } impl < 'a > R13_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R13_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R13_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R13_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R13_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R13_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 4 ) ) | ( ( ( value as u32 ) & 0x03 ) << 4 ) ; self . w } } # [ doc = "Region 12 mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R12_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R12_A > for u8 { # [ inline ( always ) ] fn from ( variant : R12_A ) -> Self { match variant { R12_A :: _00 => 0 , R12_A :: _01 => 1 , R12_A :: _10 => 2 , R12_A :: _11 => 3 } } } # [ doc = "Reader of field `R12`" ] pub type R12_R = crate :: R < u8 , R12_A > ; impl R12_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R12_A { match self . bits { 0 => R12_A :: _00 , 1 => R12_A :: _01 , 2 => R12_A :: _10 , 3 => R12_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R12_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R12_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R12_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R12_A :: _11 } } # [ doc = "Write proxy for field `R12`" ] pub struct R12_W < 'a > { w : & 'a mut W , } impl < 'a > R12_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R12_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R12_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R12_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R12_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R12_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 6 ) ) | ( ( ( value as u32 ) & 0x03 ) << 6 ) ; self . w } } # [ doc = "Region 11 mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R11_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R11_A > for u8 { # [ inline ( always ) ] fn from ( variant : R11_A ) -> Self { match variant { R11_A :: _00 => 0 , R11_A :: _01 => 1 , R11_A :: _10 => 2 , R11_A :: _11 => 3 } } } # [ doc = "Reader of field `R11`" ] pub type R11_R = crate :: R < u8 , R11_A > ; impl R11_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R11_A { match self . bits { 0 => R11_A :: _00 , 1 => R11_A :: _01 , 2 => R11_A :: _10 , 3 => R11_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R11_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R11_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R11_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R11_A :: _11 } } # [ doc = "Write proxy for field `R11`" ] pub struct R11_W < 'a > { w : & 'a mut W , } impl < 'a > R11_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R11_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R11_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R11_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R11_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R11_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 8 ) ) | ( ( ( value as u32 ) & 0x03 ) << 8 ) ; self . w } } # [ doc = "Region 10 mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R10_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R10_A > for u8 { # [ inline ( always ) ] fn from ( variant : R10_A ) -> Self { match variant { R10_A :: _00 => 0 , R10_A :: _01 => 1 , R10_A :: _10 => 2 , R10_A :: _11 => 3 } } } # [ doc = "Reader of field `R10`" ] pub type R10_R = crate :: R < u8 , R10_A > ; impl R10_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R10_A { match self . bits { 0 => R10_A :: _00 , 1 => R10_A :: _01 , 2 => R10_A :: _10 , 3 => R10_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R10_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R10_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R10_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R10_A :: _11 } } # [ doc = "Write proxy for field `R10`" ] pub struct R10_W < 'a > { w : & 'a mut W , } impl < 'a > R10_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R10_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R10_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R10_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R10_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R10_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 10 ) ) | ( ( ( value as u32 ) & 0x03 ) << 10 ) ; self . w } } # [ doc = "Region 9 mode\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R9_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R9_A > for u8 { # [ inline ( always ) ] fn from ( variant : R9_A ) -> Self { match variant { R9_A :: _00 => 0 , R9_A :: _01 => 1 , R9_A :: _10 => 2 , R9_A :: _11 => 3 } } } # [ doc = "Reader of field `R9`" ] pub type R9_R = crate :: R < u8 , R9_A > ; impl R9_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R9_A { match self . bits { 0 => R9_A :: _00 , 1 => R9_A :: _01 , 2 => R9_A :: _10 , 3 => R9_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R9_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R9_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R9_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R9_A :: _11 } } # [ doc = "Write proxy for field `R9`" ] pub struct R9_W < 'a > { w : & 'a mut W , } impl < 'a > R9_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R9_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R9_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R9_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R9_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R9_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 12 ) ) | ( ( ( value as u32 ) & 0x03 ) << 12 ) ; self . w } } # [ doc = "Region 8 mode\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R8_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R8_A > for u8 { # [ inline ( always ) ] fn from ( variant : R8_A ) -> Self { match variant { R8_A :: _00 => 0 , R8_A :: _01 => 1 , R8_A :: _10 => 2 , R8_A :: _11 => 3 } } } # [ doc = "Reader of field `R8`" ] pub type R8_R = crate :: R < u8 , R8_A > ; impl R8_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R8_A { match self . bits { 0 => R8_A :: _00 , 1 => R8_A :: _01 , 2 => R8_A :: _10 , 3 => R8_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R8_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R8_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R8_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R8_A :: _11 } } # [ doc = "Write proxy for field `R8`" ] pub struct R8_W < 'a > { w : & 'a mut W , } impl < 'a > R8_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R8_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R8_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R8_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R8_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R8_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 14 ) ) | ( ( ( value as u32 ) & 0x03 ) << 14 ) ; self . w } } # [ doc = "Region 7 mode\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R7_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R7_A > for u8 { # [ inline ( always ) ] fn from ( variant : R7_A ) -> Self { match variant { R7_A :: _00 => 0 , R7_A :: _01 => 1 , R7_A :: _10 => 2 , R7_A :: _11 => 3 } } } # [ doc = "Reader of field `R7`" ] pub type R7_R = crate :: R < u8 , R7_A > ; impl R7_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R7_A { match self . bits { 0 => R7_A :: _00 , 1 => R7_A :: _01 , 2 => R7_A :: _10 , 3 => R7_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R7_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R7_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R7_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R7_A :: _11 } } # [ doc = "Write proxy for field `R7`" ] pub struct R7_W < 'a > { w : & 'a mut W , } impl < 'a > R7_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R7_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R7_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R7_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R7_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R7_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 16 ) ) | ( ( ( value as u32 ) & 0x03 ) << 16 ) ; self . w } } # [ doc = "Region 6 mode\n\nValue on reset: 3" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R6_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R6_A > for u8 { # [ inline ( always ) ] fn from ( variant : R6_A ) -> Self { match variant { R6_A :: _00 => 0 , R6_A :: _01 => 1 , R6_A :: _10 => 2 , R6_A :: _11 => 3 } } } # [ doc = "Reader of field `R6`" ] pub type R6_R = crate :: R < u8 , R6_A > ; impl R6_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R6_A { match self . bits { 0 => R6_A :: _00 , 1 => R6_A :: _01 , 2 => R6_A :: _10 , 3 => R6_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R6_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R6_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R6_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R6_A :: _11 } } # [ doc = "Write proxy for field `R6`" ] pub struct R6_W < 'a > { w : & 'a mut W , } impl < 'a > R6_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R6_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R6_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R6_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R6_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R6_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 18 ) ) | ( ( ( value as u32 ) & 0x03 ) << 18 ) ; self . w } } # [ doc = "Region 5 mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R5_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R5_A > for u8 { # [ inline ( always ) ] fn from ( variant : R5_A ) -> Self { match variant { R5_A :: _00 => 0 , R5_A :: _01 => 1 , R5_A :: _10 => 2 , R5_A :: _11 => 3 } } } # [ doc = "Reader of field `R5`" ] pub type R5_R = crate :: R < u8 , R5_A > ; impl R5_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R5_A { match self . bits { 0 => R5_A :: _00 , 1 => R5_A :: _01 , 2 => R5_A :: _10 , 3 => R5_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R5_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R5_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R5_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R5_A :: _11 } } # [ doc = "Write proxy for field `R5`" ] pub struct R5_W < 'a > { w : & 'a mut W , } impl < 'a > R5_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R5_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R5_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R5_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R5_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R5_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 20 ) ) | ( ( ( value as u32 ) & 0x03 ) << 20 ) ; self . w } } # [ doc = "Region 4 mode\n\nValue on reset: 0" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R4_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R4_A > for u8 { # [ inline ( always ) ] fn from ( variant : R4_A ) -> Self { match variant { R4_A :: _00 => 0 , R4_A :: _01 => 1 , R4_A :: _10 => 2 , R4_A :: _11 => 3 } } } # [ doc = "Reader of field `R4`" ] pub type R4_R = crate :: R < u8 , R4_A > ; impl R4_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R4_A { match self . bits { 0 => R4_A :: _00 , 1 => R4_A :: _01 , 2 => R4_A :: _10 , 3 => R4_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R4_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R4_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R4_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R4_A :: _11 } } # [ doc = "Write proxy for field `R4`" ] pub struct R4_W < 'a > { w : & 'a mut W , } impl < 'a > R4_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R4_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R4_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R4_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R4_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R4_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 22 ) ) | ( ( ( value as u32 ) & 0x03 ) << 22 ) ; self . w } } # [ doc = "Region 3 mode\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R3_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R3_A > for u8 { # [ inline ( always ) ] fn from ( variant : R3_A ) -> Self { match variant { R3_A :: _00 => 0 , R3_A :: _01 => 1 , R3_A :: _10 => 2 , R3_A :: _11 => 3 } } } # [ doc = "Reader of field `R3`" ] pub type R3_R = crate :: R < u8 , R3_A > ; impl R3_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R3_A { match self . bits { 0 => R3_A :: _00 , 1 => R3_A :: _01 , 2 => R3_A :: _10 , 3 => R3_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R3_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R3_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R3_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R3_A :: _11 } } # [ doc = "Write proxy for field `R3`" ] pub struct R3_W < 'a > { w : & 'a mut W , } impl < 'a > R3_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R3_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R3_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R3_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R3_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R3_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 24 ) ) | ( ( ( value as u32 ) & 0x03 ) << 24 ) ; self . w } } # [ doc = "Region 2 mode\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R2_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R2_A > for u8 { # [ inline ( always ) ] fn from ( variant : R2_A ) -> Self { match variant { R2_A :: _00 => 0 , R2_A :: _01 => 1 , R2_A :: _10 => 2 , R2_A :: _11 => 3 } } } # [ doc = "Reader of field `R2`" ] pub type R2_R = crate :: R < u8 , R2_A > ; impl R2_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R2_A { match self . bits { 0 => R2_A :: _00 , 1 => R2_A :: _01 , 2 => R2_A :: _10 , 3 => R2_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R2_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R2_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R2_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R2_A :: _11 } } # [ doc = "Write proxy for field `R2`" ] pub struct R2_W < 'a > { w : & 'a mut W , } impl < 'a > R2_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R2_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R2_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R2_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R2_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R2_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 26 ) ) | ( ( ( value as u32 ) & 0x03 ) << 26 ) ; self . w } } # [ doc = "Region 1 mode\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R1_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R1_A > for u8 { # [ inline ( always ) ] fn from ( variant : R1_A ) -> Self { match variant { R1_A :: _00 => 0 , R1_A :: _01 => 1 , R1_A :: _10 => 2 , R1_A :: _11 => 3 } } } # [ doc = "Reader of field `R1`" ] pub type R1_R = crate :: R < u8 , R1_A > ; impl R1_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R1_A { match self . bits { 0 => R1_A :: _00 , 1 => R1_A :: _01 , 2 => R1_A :: _10 , 3 => R1_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R1_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R1_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R1_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R1_A :: _11 } } # [ doc = "Write proxy for field `R1`" ] pub struct R1_W < 'a > { w : & 'a mut W , } impl < 'a > R1_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R1_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R1_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R1_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R1_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R1_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 28 ) ) | ( ( ( value as u32 ) & 0x03 ) << 28 ) ; self . w } } # [ doc = "Region 0 mode\n\nValue on reset: 2" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum R0_A { # [ doc = "0: Non-cacheable" ] _00 , # [ doc = "1: Non-cacheable" ] _01 , # [ doc = "2: Write-through" ] _10 , # [ doc = "3: Write-back" ] _11 } impl From < R0_A > for u8 { # [ inline ( always ) ] fn from ( variant : R0_A ) -> Self { match variant { R0_A :: _00 => 0 , R0_A :: _01 => 1 , R0_A :: _10 => 2 , R0_A :: _11 => 3 } } } # [ doc = "Reader of field `R0`" ] pub type R0_R = crate :: R < u8 , R0_A > ; impl R0_R { # [ doc = r"Get enumerated values variant" ] # [ inline ( always ) ] pub fn variant ( & self ) -> R0_A { match self . bits { 0 => R0_A :: _00 , 1 => R0_A :: _01 , 2 => R0_A :: _10 , 3 => R0_A :: _11 , _ => unreachable ! ( ) } } # [ doc = "Checks if the value of the field is `_00`" ] # [ inline ( always ) ] pub fn is_00 ( & self ) -> bool { * self == R0_A :: _00 } # [ doc = "Checks if the value of the field is `_01`" ] # [ inline ( always ) ] pub fn is_01 ( & self ) -> bool { * self == R0_A :: _01 } # [ doc = "Checks if the value of the field is `_10`" ] # [ inline ( always ) ] pub fn is_10 ( & self ) -> bool { * self == R0_A :: _10 } # [ doc = "Checks if the value of the field is `_11`" ] # [ inline ( always ) ] pub fn is_11 ( & self ) -> bool { * self == R0_A :: _11 } } # [ doc = "Write proxy for field `R0`" ] pub struct R0_W < 'a > { w : & 'a mut W , } impl < 'a > R0_W < 'a > { # [ doc = r"Writes `variant` to the field" ] # [ inline ( always ) ] pub fn variant ( self , variant : R0_A ) -> & 'a mut W { { self . bits ( variant . into ( ) ) } } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _00 ( self ) -> & 'a mut W { self . variant ( R0_A :: _00 ) } # [ doc = "Non-cacheable" ] # [ inline ( always ) ] pub fn _01 ( self ) -> & 'a mut W { self . variant ( R0_A :: _01 ) } # [ doc = "Write-through" ] # [ inline ( always ) ] pub fn _10 ( self ) -> & 'a mut W { self . variant ( R0_A :: _10 ) } # [ doc = "Write-back" ] # [ inline ( always ) ] pub fn _11 ( self ) -> & 'a mut W { self . variant ( R0_A :: _11 ) } # [ doc = r"Writes raw bits to the field" ] # [ inline ( always ) ] pub fn bits ( self , value : u8 ) -> & 'a mut W { self . w . bits = ( self . w . bits & ! ( 0x03 << 30 ) ) | ( ( ( value as u32 ) & 0x03 ) << 30 ) ; self . w } } impl R { # [ doc = "Bits 0:1 - Region 15 mode" ] # [ inline ( always ) ] pub fn r15 ( & self ) -> R15_R { R15_R :: new ( ( self . bits & 0x03 ) as u8 ) } # [ doc = "Bits 2:3 - Region 14 mode" ] # [ inline ( always ) ] pub fn r14 ( & self ) -> R14_R { R14_R :: new ( ( ( self . bits >> 2 ) & 0x03 ) as u8 ) } # [ doc = "Bits 4:5 - Region 13 mode" ] # [ inline ( always ) ] pub fn r13 ( & self ) -> R13_R { R13_R :: new ( ( ( self . bits >> 4 ) & 0x03 ) as u8 ) } # [ doc = "Bits 6:7 - Region 12 mode" ] # [ inline ( always ) ] pub fn r12 ( & self ) -> R12_R { R12_R :: new ( ( ( self . bits >> 6 ) & 0x03 ) as u8 ) } # [ doc = "Bits 8:9 - Region 11 mode" ] # [ inline ( always ) ] pub fn r11 ( & self ) -> R11_R { R11_R :: new ( ( ( self . bits >> 8 ) & 0x03 ) as u8 ) } # [ doc = "Bits 10:11 - Region 10 mode" ] # [ inline ( always ) ] pub fn r10 ( & self ) -> R10_R { R10_R :: new ( ( ( self . bits >> 10 ) & 0x03 ) as u8 ) } # [ doc = "Bits 12:13 - Region 9 mode" ] # [ inline ( always ) ] pub fn r9 ( & self ) -> R9_R { R9_R :: new ( ( ( self . bits >> 12 ) & 0x03 ) as u8 ) } # [ doc = "Bits 14:15 - Region 8 mode" ] # [ inline ( always ) ] pub fn r8 ( & self ) -> R8_R { R8_R :: new ( ( ( self . bits >> 14 ) & 0x03 ) as u8 ) } # [ doc = "Bits 16:17 - Region 7 mode" ] # [ inline ( always ) ] pub fn r7 ( & self ) -> R7_R { R7_R :: new ( ( ( self . bits >> 16 ) & 0x03 ) as u8 ) } # [ doc = "Bits 18:19 - Region 6 mode" ] # [ inline ( always ) ] pub fn r6 ( & self ) -> R6_R { R6_R :: new ( ( ( self . bits >> 18 ) & 0x03 ) as u8 ) } # [ doc = "Bits 20:21 - Region 5 mode" ] # [ inline ( always ) ] pub fn r5 ( & self ) -> R5_R { R5_R :: new ( ( ( self . bits >> 20 ) & 0x03 ) as u8 ) } # [ doc = "Bits 22:23 - Region 4 mode" ] # [ inline ( always ) ] pub fn r4 ( & self ) -> R4_R { R4_R :: new ( ( ( self . bits >> 22 ) & 0x03 ) as u8 ) } # [ doc = "Bits 24:25 - Region 3 mode" ] # [ inline ( always ) ] pub fn r3 ( & self ) -> R3_R { R3_R :: new ( ( ( self . bits >> 24 ) & 0x03 ) as u8 ) } # [ doc = "Bits 26:27 - Region 2 mode" ] # [ inline ( always ) ] pub fn r2 ( & self ) -> R2_R { R2_R :: new ( ( ( self . bits >> 26 ) & 0x03 ) as u8 ) } # [ doc = "Bits 28:29 - Region 1 mode" ] # [ inline ( always ) ] pub fn r1 ( & self ) -> R1_R { R1_R :: new ( ( ( self . bits >> 28 ) & 0x03 ) as u8 ) } # [ doc = "Bits 30:31 - Region 0 mode" ] # [ inline ( always ) ] pub fn r0 ( & self ) -> R0_R { R0_R :: new ( ( ( self . bits >> 30 ) & 0x03 ) as u8 ) } } impl W { # [ doc = "Bits 0:1 - Region 15 mode" ] # [ inline ( always ) ] pub fn r15 ( & mut self ) -> R15_W { R15_W { w : self } } # [ doc = "Bits 2:3 - Region 14 mode" ] # [ inline ( always ) ] pub fn r14 ( & mut self ) -> R14_W { R14_W { w : self } } # [ doc = "Bits 4:5 - Region 13 mode" ] # [ inline ( always ) ] pub fn r13 ( & mut self ) -> R13_W { R13_W { w : self } } # [ doc = "Bits 6:7 - Region 12 mode" ] # [ inline ( always ) ] pub fn r12 ( & mut self ) -> R12_W { R12_W { w : self } } # [ doc = "Bits 8:9 - Region 11 mode" ] # [ inline ( always ) ] pub fn r11 ( & mut self ) -> R11_W { R11_W { w : self } } # [ doc = "Bits 10:11 - Region 10 mode" ] # [ inline ( always ) ] pub fn r10 ( & mut self ) -> R10_W { R10_W { w : self } } # [ doc = "Bits 12:13 - Region 9 mode" ] # [ inline ( always ) ] pub fn r9 ( & mut self ) -> R9_W { R9_W { w : self } } # [ doc = "Bits 14:15 - Region 8 mode" ] # [ inline ( always ) ] pub fn r8 ( & mut self ) -> R8_W { R8_W { w : self } } # [ doc = "Bits 16:17 - Region 7 mode" ] # [ inline ( always ) ] pub fn r7 ( & mut self ) -> R7_W { R7_W { w : self } } # [ doc = "Bits 18:19 - Region 6 mode" ] # [ inline ( always ) ] pub fn r6 ( & mut self ) -> R6_W { R6_W { w : self } } # [ doc = "Bits 20:21 - Region 5 mode" ] # [ inline ( always ) ] pub fn r5 ( & mut self ) -> R5_W { R5_W { w : self } } # [ doc = "Bits 22:23 - Region 4 mode" ] # [ inline ( always ) ] pub fn r4 ( & mut self ) -> R4_W { R4_W { w : self } } # [ doc = "Bits 24:25 - Region 3 mode" ] # [ inline ( always ) ] pub fn r3 ( & mut self ) -> R3_W { R3_W { w : self } } # [ doc = "Bits 26:27 - Region 2 mode" ] # [ inline ( always ) ] pub fn r2 ( & mut self ) -> R2_W { R2_W { w : self } } # [ doc = "Bits 28:29 - Region 1 mode" ] # [ inline ( always ) ] pub fn r1 ( & mut self ) -> R1_W { R1_W { w : self } } # [ doc = "Bits 30:31 - Region 0 mode" ] # [ inline ( always ) ] pub fn r0 ( & mut self ) -> R0_W { R0_W { w : self } } } } } # [ no_mangle ] static mut DEVICE_PERIPHERALS : bool = false ; # [ doc = r"All the peripherals" ] # [ allow ( non_snake_case ) ] pub struct Peripherals { # [ doc = "FTFE_FLASHCONFIG" ] pub FTFE_FLASHCONFIG : FTFE_FLASHCONFIG , # [ doc = "AIPS0" ] pub AIPS0 : AIPS0 , # [ doc = "AIPS1" ] pub AIPS1 : AIPS1 , # [ doc = "AXBS" ] pub AXBS : AXBS , # [ doc = "DMA" ] pub DMA : DMA , # [ doc = "FB" ] pub FB : FB , # [ doc = "SYSMPU" ] pub SYSMPU : SYSMPU , # [ doc = "SDRAM" ] pub SDRAM : SDRAM , # [ doc = "FMC" ] pub FMC : FMC , # [ doc = "FTFE" ] pub FTFE : FTFE , # [ doc = "DMAMUX" ] pub DMAMUX : DMAMUX , # [ doc = "CAN0" ] pub CAN0 : CAN0 , # [ doc = "CAN1" ] pub CAN1 : CAN1 , # [ doc = "SPI0" ] pub SPI0 : SPI0 , # [ doc = "SPI1" ] pub SPI1 : SPI1 , # [ doc = "SPI2" ] pub SPI2 : SPI2 , # [ doc = "I2S0" ] pub I2S0 : I2S0 , # [ doc = "CRC" ] pub CRC : CRC , # [ doc = "USBDCD" ] pub USBDCD : USBDCD , # [ doc = "PDB0" ] pub PDB0 : PDB0 , # [ doc = "PIT" ] pub PIT : PIT , # [ doc = "FTM0" ] pub FTM0 : FTM0 , # [ doc = "FTM1" ] pub FTM1 : FTM1 , # [ doc = "FTM2" ] pub FTM2 : FTM2 , # [ doc = "FTM3" ] pub FTM3 : FTM3 , # [ doc = "ADC0" ] pub ADC0 : ADC0 , # [ doc = "ADC1" ] pub ADC1 : ADC1 , # [ doc = "RTC" ] pub RTC : RTC , # [ doc = "RFVBAT" ] pub RFVBAT : RFVBAT , # [ doc = "LPTMR0" ] pub LPTMR0 : LPTMR0 , # [ doc = "RFSYS" ] pub RFSYS : RFSYS , # [ doc = "TSI0" ] pub TSI0 : TSI0 , # [ doc = "SIM" ] pub SIM : SIM , # [ doc = "PORTA" ] pub PORTA : PORTA , # [ doc = "PORTB" ] pub PORTB : PORTB , # [ doc = "PORTC" ] pub PORTC : PORTC , # [ doc = "PORTD" ] pub PORTD : PORTD , # [ doc = "PORTE" ] pub PORTE : PORTE , # [ doc = "WDOG" ] pub WDOG : WDOG , # [ doc = "EWM" ] pub EWM : EWM , # [ doc = "CMT" ] pub CMT : CMT , # [ doc = "MCG" ] pub MCG : MCG , # [ doc = "OSC" ] pub OSC : OSC , # [ doc = "I2C0" ] pub I2C0 : I2C0 , # [ doc = "I2C1" ] pub I2C1 : I2C1 , # [ doc = "I2C2" ] pub I2C2 : I2C2 , # [ doc = "I2C3" ] pub I2C3 : I2C3 , # [ doc = "UART0" ] pub UART0 : UART0 , # [ doc = "UART1" ] pub UART1 : UART1 , # [ doc = "UART2" ] pub UART2 : UART2 , # [ doc = "UART3" ] pub UART3 : UART3 , # [ doc = "UART4" ] pub UART4 : UART4 , # [ doc = "USB0" ] pub USB0 : USB0 , # [ doc = "CMP0" ] pub CMP0 : CMP0 , # [ doc = "CMP1" ] pub CMP1 : CMP1 , # [ doc = "CMP2" ] pub CMP2 : CMP2 , # [ doc = "CMP3" ] pub CMP3 : CMP3 , # [ doc = "VREF" ] pub VREF : VREF , # [ doc = "LLWU" ] pub LLWU : LLWU , # [ doc = "PMC" ] pub PMC : PMC , # [ doc = "SMC" ] pub SMC : SMC , # [ doc = "RCM" ] pub RCM : RCM , # [ doc = "RNG" ] pub RNG : RNG , # [ doc = "USBHS" ] pub USBHS : USBHS , # [ doc = "USBPHY" ] pub USBPHY : USBPHY , # [ doc = "USBHSDCD" ] pub USBHSDCD : USBHSDCD , # [ doc = "SDHC" ] pub SDHC : SDHC , # [ doc = "ENET" ] pub ENET : ENET , # [ doc = "LPUART0" ] pub LPUART0 : LPUART0 , # [ doc = "TPM1" ] pub TPM1 : TPM1 , # [ doc = "TPM2" ] pub TPM2 : TPM2 , # [ doc = "DAC0" ] pub DAC0 : DAC0 , # [ doc = "DAC1" ] pub DAC1 : DAC1 , # [ doc = "GPIOA" ] pub GPIOA : GPIOA , # [ doc = "GPIOB" ] pub GPIOB : GPIOB , # [ doc = "GPIOC" ] pub GPIOC : GPIOC , # [ doc = "GPIOD" ] pub GPIOD : GPIOD , # [ doc = "GPIOE" ] pub GPIOE : GPIOE , # [ doc = "SYSTEMCONTROL" ] pub SYSTEMCONTROL : SYSTEMCONTROL , # [ doc = "SYSTICK" ] pub SYSTICK : SYSTICK , # [ doc = "MCM" ] pub MCM : MCM , # [ doc = "CAU" ] pub CAU : CAU , # [ doc = "LMEM" ] pub LMEM : LMEM , } impl Peripherals { # [ doc = r"Returns all the peripherals *once*" ] # [ inline ] pub fn take ( ) -> Option < Self > { cortex_m :: interrupt :: free ( | _ | { if unsafe { DEVICE_PERIPHERALS } { None } else { Some ( unsafe { Peripherals :: steal ( ) } ) } } ) } # [ doc = r"Unchecked version of `Peripherals::take`" ] pub unsafe fn steal ( ) -> Self { DEVICE_PERIPHERALS = true ; Peripherals { FTFE_FLASHCONFIG : FTFE_FLASHCONFIG { _marker : PhantomData } , AIPS0 : AIPS0 { _marker : PhantomData } , AIPS1 : AIPS1 { _marker : PhantomData } , AXBS : AXBS { _marker : PhantomData } , DMA : DMA { _marker : PhantomData } , FB : FB { _marker : PhantomData } , SYSMPU : SYSMPU { _marker : PhantomData } , SDRAM : SDRAM { _marker : PhantomData } , FMC : FMC { _marker : PhantomData } , FTFE : FTFE { _marker : PhantomData } , DMAMUX : DMAMUX { _marker : PhantomData } , CAN0 : CAN0 { _marker : PhantomData } , CAN1 : CAN1 { _marker : PhantomData } , SPI0 : SPI0 { _marker : PhantomData } , SPI1 : SPI1 { _marker : PhantomData } , SPI2 : SPI2 { _marker : PhantomData } , I2S0 : I2S0 { _marker : PhantomData } , CRC : CRC { _marker : PhantomData } , USBDCD : USBDCD { _marker : PhantomData } , PDB0 : PDB0 { _marker : PhantomData } , PIT : PIT { _marker : PhantomData } , FTM0 : FTM0 { _marker : PhantomData } , FTM1 : FTM1 { _marker : PhantomData } , FTM2 : FTM2 { _marker : PhantomData } , FTM3 : FTM3 { _marker : PhantomData } , ADC0 : ADC0 { _marker : PhantomData } , ADC1 : ADC1 { _marker : PhantomData } , RTC : RTC { _marker : PhantomData } , RFVBAT : RFVBAT { _marker : PhantomData } , LPTMR0 : LPTMR0 { _marker : PhantomData } , RFSYS : RFSYS { _marker : PhantomData } , TSI0 : TSI0 { _marker : PhantomData } , SIM : SIM { _marker : PhantomData } , PORTA : PORTA { _marker : PhantomData } , PORTB : PORTB { _marker : PhantomData } , PORTC : PORTC { _marker : PhantomData } , PORTD : PORTD { _marker : PhantomData } , PORTE : PORTE { _marker : PhantomData } , WDOG : WDOG { _marker : PhantomData } , EWM : EWM { _marker : PhantomData } , CMT : CMT { _marker : PhantomData } , MCG : MCG { _marker : PhantomData } , OSC : OSC { _marker : PhantomData } , I2C0 : I2C0 { _marker : PhantomData } , I2C1 : I2C1 { _marker : PhantomData } , I2C2 : I2C2 { _marker : PhantomData } , I2C3 : I2C3 { _marker : PhantomData } , UART0 : UART0 { _marker : PhantomData } , UART1 : UART1 { _marker : PhantomData } , UART2 : UART2 { _marker : PhantomData } , UART3 : UART3 { _marker : PhantomData } , UART4 : UART4 { _marker : PhantomData } , USB0 : USB0 { _marker : PhantomData } , CMP0 : CMP0 { _marker : PhantomData } , CMP1 : CMP1 { _marker : PhantomData } , CMP2 : CMP2 { _marker : PhantomData } , CMP3 : CMP3 { _marker : PhantomData } , VREF : VREF { _marker : PhantomData } , LLWU : LLWU { _marker : PhantomData } , PMC : PMC { _marker : PhantomData } , SMC : SMC { _marker : PhantomData } , RCM : RCM { _marker : PhantomData } , RNG : RNG { _marker : PhantomData } , USBHS : USBHS { _marker : PhantomData } , USBPHY : USBPHY { _marker : PhantomData } , USBHSDCD : USBHSDCD { _marker : PhantomData } , SDHC : SDHC { _marker : PhantomData } , ENET : ENET { _marker : PhantomData } , LPUART0 : LPUART0 { _marker : PhantomData } , TPM1 : TPM1 { _marker : PhantomData } , TPM2 : TPM2 { _marker : PhantomData } , DAC0 : DAC0 { _marker : PhantomData } , DAC1 : DAC1 { _marker : PhantomData } , GPIOA : GPIOA { _marker : PhantomData } , GPIOB : GPIOB { _marker : PhantomData } , GPIOC : GPIOC { _marker : PhantomData } , GPIOD : GPIOD { _marker : PhantomData } , GPIOE : GPIOE { _marker : PhantomData } , SYSTEMCONTROL : SYSTEMCONTROL { _marker : PhantomData } , SYSTICK : SYSTICK { _marker : PhantomData } , MCM : MCM { _marker : PhantomData } , CAU : CAU { _marker : PhantomData } , LMEM : LMEM { _marker : PhantomData } , } } }